decocms 4.572.0 → 4.574.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 (433) hide show
  1. package/dist/client/assets/{AlertCircle-kYtqXGU8.js → AlertCircle-Co3RPbIZ.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DDNkWSZu.js → AreaChart-BvS2pAoE.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-B1m5qQi9.js → ArrowLeft-XBSBGQal.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-DcYpepHk.js → ArrowUp-DLnkUu9S.js} +1 -1
  5. package/dist/client/assets/{CartesianChart-BfCEFz3y.js → CartesianChart-DOb1QHVF.js} +1 -1
  6. package/dist/client/assets/{CategoricalChart-Bp-vLaQf.js → CategoricalChart-BkeCXQf9.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-B4NfGYxe.js → CheckCircle-kNwBDDVU.js} +1 -1
  8. package/dist/client/assets/{ChevronSelectorVertical-EqyUOMMk.js → ChevronSelectorVertical-Gg7YcxlH.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-DRG0w_P4.js → ChevronUp-D1T3kSyr.js} +1 -1
  10. package/dist/client/assets/{CreditCard01-BLl0RgXC.js → CreditCard01-D65BAIaV.js} +1 -1
  11. package/dist/client/assets/{Globe04--FaZazgw.js → Globe04-D17A2x5l.js} +1 -1
  12. package/dist/client/assets/{Key01-D0Pq98hT.js → Key01-awxHKnoL.js} +1 -1
  13. package/dist/client/assets/{LinkBroken01-C9GtmpYY.js → LinkBroken01-loTkm0G5.js} +1 -1
  14. package/dist/client/assets/{Minus-eGpg4-RN.js → Minus-CYrsmoRb.js} +1 -1
  15. package/dist/client/assets/{Monitor01-Su614Ctg.js → Monitor01-DalIAdj7.js} +1 -1
  16. package/dist/client/assets/{Play-D_ph4pZ0.js → Play-C6Weq-wk.js} +1 -1
  17. package/dist/client/assets/{Plus-D8rFucQH.js → Plus-D7X8Q2-q.js} +1 -1
  18. package/dist/client/assets/{ReferenceLine-BsZk9TgE.js → ReferenceLine-HGyXAqMo.js} +1 -1
  19. package/dist/client/assets/{SearchMd-2MPq0KPN.js → SearchMd-e6xPeRPD.js} +1 -1
  20. package/dist/client/assets/{ShoppingBag01-DDCYsqx9.js → ShoppingBag01-zloi0TDl.js} +1 -1
  21. package/dist/client/assets/{Sun-Dvv08Urq.js → Sun-C1lyqton.js} +1 -1
  22. package/dist/client/assets/{SwitchHorizontal01-D7HAXgYP.js → SwitchHorizontal01-elXb4-4d.js} +1 -1
  23. package/dist/client/assets/{Tool01-BTDYOKsB.js → Tool01-Bo2g-Ylw.js} +1 -1
  24. package/dist/client/assets/{Tooltip-CPoCGNVz.js → Tooltip-C2g-R1Ae.js} +1 -1
  25. package/dist/client/assets/{Trash01-CHCe7_6o.js → Trash01-C-PU5Hm-.js} +1 -1
  26. package/dist/client/assets/{Upload01-Q6ECKQXp.js → Upload01-NPnXKs-J.js} +1 -1
  27. package/dist/client/assets/{UserSquare-BJHrMhrM.js → UserSquare-Qd-FKVqK.js} +1 -1
  28. package/dist/client/assets/{Users01-DHfg9AEk.js → Users01-CTNixqdX.js} +1 -1
  29. package/dist/client/assets/{XClose-BDiB_Nvo.js → XClose-BuJ6u6eL.js} +1 -1
  30. package/dist/client/assets/{Zap-DpvU6Dp2.js → Zap-pmN7zSOE.js} +1 -1
  31. package/dist/client/assets/{access-gate-BjRwuLrP.js → access-gate-Bj4L1Bay.js} +1 -1
  32. package/dist/client/assets/{add-connection-dialog-Bh0vHlQ5.js → add-connection-dialog-BL3Uj9Py.js} +1 -1
  33. package/dist/client/assets/agent-app-C3J9IT10.js +1 -0
  34. package/dist/client/assets/agent-assets-CvnH7aBA.js +1 -0
  35. package/dist/client/assets/{agent-automation-C1Vdho1R.js → agent-automation-Bea1eB6T.js} +3 -3
  36. package/dist/client/assets/agent-automations-R-Eaz2To.js +1 -0
  37. package/dist/client/assets/agent-calendar-Cd8km6Ln.js +1 -0
  38. package/dist/client/assets/{agent-capabilities-C80Nj8dH.js → agent-capabilities-BGShibnD.js} +1 -1
  39. package/dist/client/assets/agent-connect-sources-BrM4y83H.js +1 -0
  40. package/dist/client/assets/agent-deck-DRKoTD-S.js +1 -0
  41. package/dist/client/assets/agent-e2e-BuKHozb1.js +1 -0
  42. package/dist/client/assets/agent-experiments-CgtwbbvZ.js +1 -0
  43. package/dist/client/assets/agent-file-wlYMcv_9.js +1 -0
  44. package/dist/client/assets/agent-hosting-BaITgwKU.js +1 -0
  45. package/dist/client/assets/{agent-icon-DqjTL3cE.js → agent-icon-CTbTFMnU.js} +1 -1
  46. package/dist/client/assets/agent-library-CC7Sh_px.js +1 -0
  47. package/dist/client/assets/agent-library-file-DB9_i_YI.js +1 -0
  48. package/dist/client/assets/agent-overview-BkJ7Az2Q.js +1 -0
  49. package/dist/client/assets/agent-releases-Dh0xH2nd.js +2 -0
  50. package/dist/client/assets/agent-settings-B8F88lFa.js +1 -0
  51. package/dist/client/assets/{agent-site-editor-gGRvmvu9.js → agent-site-editor-D_QBdAc9.js} +2 -2
  52. package/dist/client/assets/agent-site-editor-code-TQZ-nnUV.js +2 -0
  53. package/dist/client/assets/agent-site-editor-content-CAE4z8AF.js +1 -0
  54. package/dist/client/assets/agent-site-editor-preview-gLgYeQTA.js +1 -0
  55. package/dist/client/assets/{agent-view-guard-Bppi7Mra.js → agent-view-guard-CL3qLzE2.js} +1 -1
  56. package/dist/client/assets/agent-view-mJs78en_.js +1 -0
  57. package/dist/client/assets/{ai-providers-JXuyHqZ0.js → ai-providers-CKuZmBiu.js} +1 -1
  58. package/dist/client/assets/{alert-Cddl0pAs.js → alert-wYcDlQSf.js} +1 -1
  59. package/dist/client/assets/{analytics-sections-DFGgGKah.js → analytics-sections-BjzpdbBT.js} +1 -1
  60. package/dist/client/assets/api-keys-BtDMAyj2.js +1 -0
  61. package/dist/client/assets/{api-keys-CyRPnxt1.js → api-keys-am7hNPgd.js} +1 -1
  62. package/dist/client/assets/app-editor-D88RxUP1.js +1 -0
  63. package/dist/client/assets/{asset-utils-Cekn7DV3.js → asset-utils-C5mv1eiH.js} +1 -1
  64. package/dist/client/assets/{auth-qAWEiaXq.js → auth-CQxDIkM-.js} +1 -1
  65. package/dist/client/assets/{auth-catchall-BEu29rgq.js → auth-catchall-DX0dhfK_.js} +1 -1
  66. package/dist/client/assets/{auth-entry-C-rkFm2s.js → auth-entry-Bkznmv5L.js} +1 -1
  67. package/dist/client/assets/{auth-split-layout-E78PPbPV.js → auth-split-layout-BRZioxOZ.js} +1 -1
  68. package/dist/client/assets/{authenticate-and-persist-oauth-D7iMHNSW.js → authenticate-and-persist-oauth-o7XKLq_6.js} +1 -1
  69. package/dist/client/assets/{automation-list-row-guzwZg5A.js → automation-list-row-knBDKeRb.js} +1 -1
  70. package/dist/client/assets/{automation-runs-BHP_sOU-.js → automation-runs-CvC4BqLv.js} +1 -1
  71. package/dist/client/assets/{automations-BgweD4e5.js → automations-Ajx2woko.js} +1 -1
  72. package/dist/client/assets/{autosend-_WPHuuuS.js → autosend-B0POegpm.js} +1 -1
  73. package/dist/client/assets/{badge-DtxRsHGH.js → badge-BpzeYR5Z.js} +1 -1
  74. package/dist/client/assets/{block-document-CT7wSVO4.js → block-document-DIhkVhEf.js} +1 -1
  75. package/dist/client/assets/{blocks-preview-workspace-context-BoHWp5NJ.js → blocks-preview-workspace-context-BnkXYZX_.js} +1 -1
  76. package/dist/client/assets/{blocks-tab-states-2A_KUVRA.js → blocks-tab-states-BRjgrPty.js} +1 -1
  77. package/dist/client/assets/{blog-schema-DyhIMTKN.js → blog-schema-BdMdKJFM.js} +1 -1
  78. package/dist/client/assets/{buckets-B6SQeYKj.js → buckets-C62arTZK.js} +1 -1
  79. package/dist/client/assets/{build-improve-prompt-doc--GJGk9lj.js → build-improve-prompt-doc-DNVGwsoG.js} +1 -1
  80. package/dist/client/assets/{calendar-gF784tOB.js → calendar-SB5YBzj8.js} +1 -1
  81. package/dist/client/assets/{capability-load-error-gokttFVD.js → capability-load-error-BkOUGX51.js} +1 -1
  82. package/dist/client/assets/category-editor-CozNeVRI.js +1 -0
  83. package/dist/client/assets/{chart-2s7SvZtT.js → chart-D-gatwT8.js} +1 -1
  84. package/dist/client/assets/{chat-context-aSjAR9mm.js → chat-context-PvP_Q1CV.js} +6 -6
  85. package/dist/client/assets/{chat-draft-C4Ql1o7U.js → chat-draft-C714j1Wd.js} +1 -1
  86. package/dist/client/assets/{checkbox-CBfkrmis.js → checkbox-Bk98t4UK.js} +1 -1
  87. package/dist/client/assets/{choose-editor-DOrF20ax.js → choose-editor-DmqmkbHo.js} +1 -1
  88. package/dist/client/assets/{cli-auth-success-B188GHrd.js → cli-auth-success-D4NODEkN.js} +1 -1
  89. package/dist/client/assets/{client-icons-CGEm3mRa.js → client-icons-WHlOXnmn.js} +1 -1
  90. package/dist/client/assets/cms-settings-editor-kiB9O6al.js +1 -0
  91. package/dist/client/assets/{cms-store-drafts-CSMnfrKb.js → cms-store-drafts-DEGbfccc.js} +1 -1
  92. package/dist/client/assets/collapsible-C7N88_dp.js +1 -0
  93. package/dist/client/assets/collection-detail-a6oC0bB8.js +1 -0
  94. package/dist/client/assets/{collection-display-button-CiexA8e6.js → collection-display-button-Dl9vfdLR.js} +1 -1
  95. package/dist/client/assets/{collection-search-iHJVqUHB.js → collection-search-Din8SB5Y.js} +1 -1
  96. package/dist/client/assets/{collection-table-wrapper-Dw3f1ge7.js → collection-table-wrapper-BYDcFi4z.js} +1 -1
  97. package/dist/client/assets/{collection-tabs-Trcf-II9.js → collection-tabs-BJDa_4_F.js} +1 -1
  98. package/dist/client/assets/{combobox-DqTAA7CX.js → combobox-CVchGkTE.js} +1 -1
  99. package/dist/client/assets/{command-CtR4gjCr.js → command-DA2t4jTW.js} +1 -1
  100. package/dist/client/assets/{companion-mcps-section-CMxxXZB8.js → companion-mcps-section-BKP3xr1j.js} +1 -1
  101. package/dist/client/assets/{config-BpJVAl-p.js → config-B1mE6oOL.js} +1 -1
  102. package/dist/client/assets/{connect-DjUzAPce.js → connect-CAAYdS8d.js} +2 -2
  103. package/dist/client/assets/{connect-layout-atO8SWTe.js → connect-layout-DUesEwTl.js} +1 -1
  104. package/dist/client/assets/{connect-source-dialog-CpTTYi_l.js → connect-source-dialog-DQtWLoYH.js} +1 -1
  105. package/dist/client/assets/{connection-card-Dt4OQ0Zk.js → connection-card-CPhS4jEh.js} +1 -1
  106. package/dist/client/assets/{connection-detail-weWLbsDk.js → connection-detail-D0-sYPQS.js} +1 -1
  107. package/dist/client/assets/{connection-form-helpers-KX0UMFtC.js → connection-form-helpers-CRMRmqMW.js} +1 -1
  108. package/dist/client/assets/{connection-CZHWvxVM.js → connection-giFDA0-u.js} +1 -1
  109. package/dist/client/assets/{connection-slug-BQwcAWfG.js → connection-slug-DTdYIX0A.js} +1 -1
  110. package/dist/client/assets/{connections-i22Te-Si.js → connections-D-1tH9cf.js} +1 -1
  111. package/dist/client/assets/{content-tab-CxWiT9yK.js → content-tab-DH5bq_bz.js} +3 -3
  112. package/dist/client/assets/context-DK_qXRQL.js +1 -0
  113. package/dist/client/assets/{context-menu-CmlGLO8r.js → context-menu-CsBFFEsr.js} +1 -1
  114. package/dist/client/assets/{context-shell-PkAxZmyt.js → context-shell-l0daBgQ1.js} +3 -3
  115. package/dist/client/assets/{core.esm-DkzVh4mV.js → core.esm-tIHbtjKb.js} +1 -1
  116. package/dist/client/assets/{create-organization-dialog-_VIsUUpV.js → create-organization-dialog-Dy6I2vcX.js} +1 -1
  117. package/dist/client/assets/{device-hint-CdtW8Ayx.js → device-hint-DslC2w9a.js} +1 -1
  118. package/dist/client/assets/discover-DzzEIO43.js +1 -0
  119. package/dist/client/assets/{domain-settings-BuPEVvED.js → domain-settings-Dq_m7HYl.js} +1 -1
  120. package/dist/client/assets/{drawer-ChCkx76W.js → drawer-BYGTIOoj.js} +1 -1
  121. package/dist/client/assets/{editor-classes-BNXGx3Ep.js → editor-classes-LFKjNX_0.js} +1 -1
  122. package/dist/client/assets/{editor-BKO3Ouyu.js → editor-x1lgFdfy.js} +1 -1
  123. package/dist/client/assets/{empty-state-ajQCApN0.js → empty-state-CH3GYanB.js} +1 -1
  124. package/dist/client/assets/{empty-state-DiGOrU7G.js → empty-state-CtwVPMDf.js} +1 -1
  125. package/dist/client/assets/{experiments-tab-choice-BUQKBcCh.js → experiments-tab-choice-DMVM7f3S.js} +1 -1
  126. package/dist/client/assets/{extract-connection-data-CTb_9Cpr.js → extract-connection-data-hvaA6rrK.js} +1 -1
  127. package/dist/client/assets/{feature-gate-DReJia4Z.js → feature-gate-ru6FBLZU.js} +1 -1
  128. package/dist/client/assets/{feature-paywall-DbaCusI2.js → feature-paywall-eifo7eqe.js} +1 -1
  129. package/dist/client/assets/feedback-BqoIMOg7.js +1 -0
  130. package/dist/client/assets/file-explorer-Bgho9rLt.js +2 -0
  131. package/dist/client/assets/{file-preview-CO8Jx_5T.js → file-preview-BzUEEwEK.js} +1 -1
  132. package/dist/client/assets/{file-share-button-B1R4GS_L.js → file-share-button-CFBrVPAQ.js} +1 -1
  133. package/dist/client/assets/{file-type-icon-Bo3Nsgdh.js → file-type-icon-DM9o0Fkb.js} +1 -1
  134. package/dist/client/assets/{folder-icon-DHVgg162.js → folder-icon-DSGoR_x6.js} +1 -1
  135. package/dist/client/assets/{form-BhXakrt_.js → form-gd_hA5VT.js} +1 -1
  136. package/dist/client/assets/{general-BvxlAOrY.js → general-Cn8XvemK.js} +1 -1
  137. package/dist/client/assets/{github-icon-BBNizm_E.js → github-icon-BVy-v7gH.js} +1 -1
  138. package/dist/client/assets/home-C9onXt5U.js +1 -0
  139. package/dist/client/assets/{home-overview-6RI8kIqs.js → home-overview-DZBjDQoG.js} +1 -1
  140. package/dist/client/assets/{hosted-reconcile-C9_-UERm.js → hosted-reconcile-DNkBVm-1.js} +1 -1
  141. package/dist/client/assets/{icon-button-muPqJd-h.js → icon-button-Ze0c1pwp.js} +1 -1
  142. package/dist/client/assets/{index-Bcy7_FA1.js → index-B-T__H4R.js} +1 -1
  143. package/dist/client/assets/{index-B6_lV1vO.js → index-Bbmo8mh-.js} +1 -1
  144. package/dist/client/assets/{index-DhM4mrtt.js → index-Bgxp_wDH.js} +1 -1
  145. package/dist/client/assets/index-BkJtJQz4.css +1 -0
  146. package/dist/client/assets/{index-TupjNSVk.js → index-C3XZ4Hr3.js} +2 -2
  147. package/dist/client/assets/{index-BRwiTdyd.js → index-CQQpem-0.js} +1 -1
  148. package/dist/client/assets/{index-8ANyj4B7.js → index-CnOVjrIG.js} +1 -1
  149. package/dist/client/assets/{index-GYpV5EH9.js → index-D5i1_B2b.js} +1 -1
  150. package/dist/client/assets/{index-878qqrH2.js → index-D8y5KFA4.js} +1 -1
  151. package/dist/client/assets/index-DB454549.js +1 -0
  152. package/dist/client/assets/{index-CcqLnTyv.js → index-DEZ1imMJ.js} +41 -41
  153. package/dist/client/assets/{index-DCh3kkGn.js → index-DYgzDE_k.js} +1 -1
  154. package/dist/client/assets/{index-BlAiq0AL.js → index-DkhsKOTp.js} +1 -1
  155. package/dist/client/assets/{index-D146teOp.js → index-DsbWutG1.js} +1 -1
  156. package/dist/client/assets/index-Kbjjvu85.js +1 -0
  157. package/dist/client/assets/{index-n9xCS6Sf.js → index-_l1iac4T.js} +1 -1
  158. package/dist/client/assets/{index-QDvBZCSy.js → index-i75UpmlW.js} +1 -1
  159. package/dist/client/assets/{index-redirect-BUCPvmVN.js → index-redirect-BbZ_bzp6.js} +1 -1
  160. package/dist/client/assets/{infiniteQueryObserver-uDA4YvYL.js → infiniteQueryObserver-C0Gb02df.js} +1 -1
  161. package/dist/client/assets/{infra-billing-Bql8vBuZ.js → infra-billing-BCVZN9OG.js} +1 -1
  162. package/dist/client/assets/{input-COtL628i.js → input-CxHdmxHa.js} +1 -1
  163. package/dist/client/assets/{input-BDAmWj4c.js → input-Dla4T1vA.js} +4 -4
  164. package/dist/client/assets/{integration-icon-ChQEBlMz.js → integration-icon-CFHOt7sY.js} +1 -1
  165. package/dist/client/assets/{jira-icon-CJhoZQuc.js → jira-icon-_AEc9Yhw.js} +1 -1
  166. package/dist/client/assets/{label-CsfAEF08.js → label-BEWDSeNl.js} +1 -1
  167. package/dist/client/assets/{layout-B-LTaCR7.js → layout--y8zVnrP.js} +1 -1
  168. package/dist/client/assets/legacy-admin-welcome-dialog-B223MrIf.js +1 -0
  169. package/dist/client/assets/{legacy-agents-deep-B3LnX3dE.js → legacy-agents-deep-PO1FuZ04.js} +1 -1
  170. package/dist/client/assets/{legacy-main-redirect-KlovZkVM.js → legacy-main-redirect-CLP7AoCb.js} +1 -1
  171. package/dist/client/assets/library-Cx1S-GVi.js +1 -0
  172. package/dist/client/assets/{library-tab-DdqY20-1.js → library-tab-CqMcp5u0.js} +1 -1
  173. package/dist/client/assets/login-BuRZE0OR.js +1 -0
  174. package/dist/client/assets/{markdown-CPuTm6Mv.js → markdown-Db8a3LUX.js} +1 -1
  175. package/dist/client/assets/{mcp-app-renderer-Cigj7X9N.js → mcp-app-renderer-C8G6NLBz.js} +1 -1
  176. package/dist/client/assets/{mcp-oauth-ChfuZkYU.js → mcp-oauth-BBT3ip6Z.js} +1 -1
  177. package/dist/client/assets/{mcp-oauth-BU_Qloaj.js → mcp-oauth-CHmbtYyN.js} +1 -1
  178. package/dist/client/assets/{members-BDBxWp17.js → members-CF1S2ayK.js} +1 -1
  179. package/dist/client/assets/{memory-B9jEAxkU.js → memory-Bk61fr1m.js} +2 -2
  180. package/dist/client/assets/mock-board-CYJBKLD5.js +10 -0
  181. package/dist/client/assets/{monaco-editor-XS1Vx7aB.js → monaco-editor-DTwBEUg_.js} +1 -1
  182. package/dist/client/assets/{monitoring-B3WSTrVO.js → monitoring-Cqe9DCsk.js} +2 -2
  183. package/dist/client/assets/{monitoring-stats-row-CuWemrnJ.js → monitoring-stats-row-GkTmJnnE.js} +1 -1
  184. package/dist/client/assets/{multi-select-C2R3RZPE.js → multi-select-GRYee_BH.js} +1 -1
  185. package/dist/client/assets/{mustache-ByRkTjky.js → mustache-DtDLolVD.js} +1 -1
  186. package/dist/client/assets/{named-rule-view-D9J5jfxv.js → named-rule-view-BNwXQD8T.js} +1 -1
  187. package/dist/client/assets/{new-project-dialog-C_1Rs0SG.js → new-project-dialog-Dfe2Pik9.js} +1 -1
  188. package/dist/client/assets/{oauth-callback-Du4CoqhX.js → oauth-callback-C9LKZChW.js} +1 -1
  189. package/dist/client/assets/{oauth-callback-ai-provider-CGOatJwS.js → oauth-callback-ai-provider-C7LWQiJX.js} +1 -1
  190. package/dist/client/assets/{oauth-consent-DP5dM3Bl.js → oauth-consent-Dm4zOEtc.js} +1 -1
  191. package/dist/client/assets/{onboarding-CNJgq5g8.js → onboarding-xP-6CuuS.js} +1 -1
  192. package/dist/client/assets/{openai-conversation-RmvHRGWP.js → openai-conversation-BH1GqT3q.js} +2 -2
  193. package/dist/client/assets/{optimistic-project-sidebar-views-BF6tqK9w.js → optimistic-project-sidebar-views-BcV4r24I.js} +1 -1
  194. package/dist/client/assets/{order-monitor-day-Cs26_K8M.js → order-monitor-day-BrCrwZlv.js} +1 -1
  195. package/dist/client/assets/{organization-choice-Bntbf3d6.js → organization-choice-Bb3OozNa.js} +1 -1
  196. package/dist/client/assets/{orgs-CGfTnYKc.js → orgs-BwWx4Gpo.js} +1 -1
  197. package/dist/client/assets/{own-accounts-section-Dv_Ox_cI.js → own-accounts-section-CL57nUX5.js} +1 -1
  198. package/dist/client/assets/{pair-h0916MQd.js → pair-D5JEvK2M.js} +7 -7
  199. package/dist/client/assets/{parse-sections-BhaTg9vA.js → parse-sections-Ca4qHQSq.js} +3 -3
  200. package/dist/client/assets/{plan-ladder-BLc0_1i8.js → plan-ladder-DdqVPKf9.js} +1 -1
  201. package/dist/client/assets/plan-q4Vm_z4g.js +1 -0
  202. package/dist/client/assets/{plan-usage-card-DWVVT2WQ.js → plan-usage-card-397aTXRB.js} +2 -2
  203. package/dist/client/assets/{popover-BQnTqyWU.js → popover-DsvzKyw_.js} +1 -1
  204. package/dist/client/assets/post-calendar-CvHtHQHg.js +1 -0
  205. package/dist/client/assets/{post-editor-B1Q3Pcgn.js → post-editor-0bthmrQK.js} +2 -2
  206. package/dist/client/assets/{preview-content-DHz0okBk.js → preview-content-Bs_qZ8yA.js} +1 -1
  207. package/dist/client/assets/{preview-dialog-geLovY3F.js → preview-dialog-Bn3JJkpc.js} +1 -1
  208. package/dist/client/assets/{preview-panel-5qTld6rM.js → preview-panel-CX3l3cru.js} +1 -1
  209. package/dist/client/assets/{preview-tab-DTmM7FWc.js → preview-tab-C506bsNP.js} +3 -3
  210. package/dist/client/assets/{product-picker-dialog-CkKwZuBF.js → product-picker-dialog-DRJETx9Q.js} +1 -1
  211. package/dist/client/assets/{profile-DDg9c8sx.js → profile-BlRaDfot.js} +1 -1
  212. package/dist/client/assets/project-app-view-CKUZlcwf.js +1 -0
  213. package/dist/client/assets/{project-apps-sFKq8oaX.js → project-apps-B_xWF85u.js} +1 -1
  214. package/dist/client/assets/{project-icon-BlOLnUr2.js → project-icon-rrJh6PJx.js} +1 -1
  215. package/dist/client/assets/{project-index-C12cl71J.js → project-index-CoA3rtsT.js} +1 -1
  216. package/dist/client/assets/project-reports-bT7h-_SM.js +1 -0
  217. package/dist/client/assets/project-tasks-CqL0-1p3.js +1 -0
  218. package/dist/client/assets/{projects-APtBmhWY.js → projects-CM1tg94T.js} +1 -1
  219. package/dist/client/assets/{projects-empty-state-B_-RYmNY.js → projects-empty-state-llpcLXG9.js} +1 -1
  220. package/dist/client/assets/{prompts-rGT4H9HS.js → prompts-B0OAMamK.js} +1 -1
  221. package/dist/client/assets/record-editor-fYL_geiT.js +1 -0
  222. package/dist/client/assets/redirect-editor-CqeB0Mu0.js +1 -0
  223. package/dist/client/assets/reports-CtLMPNBD.js +1 -0
  224. package/dist/client/assets/{reports-B5SaRV3H.js → reports-Rgui-AzR.js} +1 -1
  225. package/dist/client/assets/{reports-onboarding-C3O3uPM5.js → reports-onboarding-Bb3vI6W8.js} +1 -1
  226. package/dist/client/assets/reports-tab-BaN84XaS.js +2 -0
  227. package/dist/client/assets/repositories-DR2_ORl-.js +1 -0
  228. package/dist/client/assets/{repositories-EzK0gp8T.js → repositories-OwZ7bC1j.js} +1 -1
  229. package/dist/client/assets/{repository-binding-CuR-5wbj.js → repository-binding-C0msapZZ.js} +1 -1
  230. package/dist/client/assets/{repository-picker-DEa_L5X-.js → repository-picker-BYFeDBpn.js} +1 -1
  231. package/dist/client/assets/{require-capability-s4T8ky9G.js → require-capability-cQiPB2TO.js} +1 -1
  232. package/dist/client/assets/{required-auth-layout-BnfTNype.js → required-auth-layout-DfUx9vzb.js} +1 -1
  233. package/dist/client/assets/{reset-password-DyQQJ8dn.js → reset-password-CwNbLDfo.js} +1 -1
  234. package/dist/client/assets/{resizable-G0IV9sBv.js → resizable-CHI5UJHW.js} +1 -1
  235. package/dist/client/assets/resolve-tab-icon-BWeUUKzK.js +1 -0
  236. package/dist/client/assets/review-settings-DUhDHWEg.js +1 -0
  237. package/dist/client/assets/{role-color-DsX-V5ks.js → role-color-DlPdNUQM.js} +1 -1
  238. package/dist/client/assets/{roles-Dx9qwbnQ.js → roles-ChXNdo9W.js} +1 -1
  239. package/dist/client/assets/route-8zXp8Zmg.js +1 -0
  240. package/dist/client/assets/route-DW6RzQLd.js +1 -0
  241. package/dist/client/assets/route-oGUs3Dt9.js +1 -0
  242. package/dist/client/assets/{sandbox-lifecycle-context-BbXRjeM5.js → sandbox-lifecycle-context-WXIR2CMZ.js} +1 -1
  243. package/dist/client/assets/{schema-D4ZSsKIV.js → schema-9jBUPMLq.js} +1 -1
  244. package/dist/client/assets/{schema-DyZV-W0g.js → schema-BFmIytlm.js} +1 -1
  245. package/dist/client/assets/{scroll-area-Dc2A2LkE.js → scroll-area-CQ_g6hBm.js} +1 -1
  246. package/dist/client/assets/search-input-Co3g-t6C.js +1 -0
  247. package/dist/client/assets/{search-toggle-B9QbSQeA.js → search-toggle-CO5TN956.js} +1 -1
  248. package/dist/client/assets/{secret-picker-DmxIms9y.js → secret-picker-VlsiGxPi.js} +1 -1
  249. package/dist/client/assets/{secrets-AGU75gav.js → secrets-DJboETC0.js} +1 -1
  250. package/dist/client/assets/{section-array-field-ClWKGp_4.js → section-array-field-CvmfLv3q.js} +1 -1
  251. package/dist/client/assets/{sections-BVT_1GZf.js → sections-C_Jmzzpn.js} +1 -1
  252. package/dist/client/assets/sections-editor-D1U5_lZq.js +1 -0
  253. package/dist/client/assets/{select-DQqbq83t.js → select-BJaUvbIR.js} +1 -1
  254. package/dist/client/assets/{select-model-DrY_3vXN.js → select-model-CftP-ks_.js} +1 -1
  255. package/dist/client/assets/{seo-editor-BlBhyBAl.js → seo-editor-B6UrHPko.js} +1 -1
  256. package/dist/client/assets/{separator-C0H8Yj6d.js → separator-BXKmXRi8.js} +1 -1
  257. package/dist/client/assets/settings-tab-CHBeACws.js +1 -0
  258. package/dist/client/assets/{sheet-B2jsXlHJ.js → sheet-D2hfPw7P.js} +1 -1
  259. package/dist/client/assets/shell-layout-BLRNx2fV.js +1 -0
  260. package/dist/client/assets/{site-draft-actions-CD85gRfI.js → site-draft-actions-5nXph2SS.js} +3 -3
  261. package/dist/client/assets/{site-draft-view-D0hJTk9N.js → site-draft-view-3CfqUHrV.js} +1 -1
  262. package/dist/client/assets/site-editor-BqlLTFw0.js +1 -0
  263. package/dist/client/assets/{site-editor-toast-CIOA7Zq3.js → site-editor-toast-Cgezu0A5.js} +1 -1
  264. package/dist/client/assets/skills-B_05tfLr.js +1 -0
  265. package/dist/client/assets/{slider-84yNNCUP.js → slider-C6h9g0cI.js} +1 -1
  266. package/dist/client/assets/{sortable.esm-BHALCXRV.js → sortable.esm-D2_ALuVf.js} +1 -1
  267. package/dist/client/assets/{sso-6pnL0iJa.js → sso-CtTl7KnN.js} +1 -1
  268. package/dist/client/assets/{suggestion-C3enCUG8.js → suggestion-C8VoNVDk.js} +2 -2
  269. package/dist/client/assets/super-agent-icon-B-73GF60.js +1 -0
  270. package/dist/client/assets/{switch-2cMTOO8e.js → switch-C53DVv3y.js} +1 -1
  271. package/dist/client/assets/{synced-repos-bmkfQV3e.js → synced-repos-Cqz-evGv.js} +1 -1
  272. package/dist/client/assets/{tab-icon-glyph-lzQzl_Ov.js → tab-icon-glyph-I3aa1qRZ.js} +1 -1
  273. package/dist/client/assets/{table-DvZCTg5z.js → table-DjgVXWdP.js} +1 -1
  274. package/dist/client/assets/{tabs-BzwzpfZ1.js → tabs-DtOFAaIp.js} +1 -1
  275. package/dist/client/assets/{task-board-DcTNURQy.js → task-board-D3wT6_aG.js} +1 -1
  276. package/dist/client/assets/{task-route-DfbZq1yE.js → task-route-DngvTiyh.js} +1 -1
  277. package/dist/client/assets/{task-status-CxLWWnTs.js → task-status-BfFZ6nf8.js} +1 -1
  278. package/dist/client/assets/taskboard-analytics-D-vAg9Px.js +1 -0
  279. package/dist/client/assets/{tasks-CzV2b6I-.js → tasks-BHa2qCWg.js} +3 -3
  280. package/dist/client/assets/tasks-adXvugV8.js +1 -0
  281. package/dist/client/assets/{textarea-CpPhDLVU.js → textarea-_jcGqOvl.js} +1 -1
  282. package/dist/client/assets/thread-analytics-DPDga_ap.js +1 -0
  283. package/dist/client/assets/{thread-intent-pegObLq9.js → thread-intent-DuI80508.js} +1 -1
  284. package/dist/client/assets/{thread-route-D5E5K-lU.js → thread-route-B-uAlF3E.js} +1 -1
  285. package/dist/client/assets/{thread-route-DORnlP1l.js → thread-route-Ci8rIker.js} +1 -1
  286. package/dist/client/assets/{thread-sheet-body-BFBUt-Sx.js → thread-sheet-body-BiNfUUQ_.js} +1 -1
  287. package/dist/client/assets/{time-range-picker-CO070soZ.js → time-range-picker-F9SEOG2b.js} +1 -1
  288. package/dist/client/assets/{toggle-group-D9bXIbAb.js → toggle-group-C6oiEKlf.js} +1 -1
  289. package/dist/client/assets/{tool-namespace-BQSaNq7N.js → tool-namespace-DdU5nhii.js} +1 -1
  290. package/dist/client/assets/{tool-set-selector-DM-ejAZy.js → tool-set-selector-2nfgy8us.js} +1 -1
  291. package/dist/client/assets/{toolbar-icon-button-CTRAa2ng.js → toolbar-icon-button-BmJKmAUK.js} +1 -1
  292. package/dist/client/assets/{tooltip-AKf-E49i.js → tooltip-Dam-ym8O.js} +1 -1
  293. package/dist/client/assets/{tooltipContext-C6xZbBgY.js → tooltipContext-PzKiic-J.js} +1 -1
  294. package/dist/client/assets/{track-ClB7tKVt.js → track-Dj7QHX2C.js} +1 -1
  295. package/dist/client/assets/{types-BQOtvCBo.js → types-gyofjZHf.js} +6 -6
  296. package/dist/client/assets/{url-slug-ihGFL5bo.js → url-slug-BMHzx0XY.js} +1 -1
  297. package/dist/client/assets/{usage-stats-CVX23WNU.js → usage-stats-C3KvQP9T.js} +1 -1
  298. package/dist/client/assets/{use-ai-providers-BrqJh5BT.js → use-ai-providers-DwpUgHpj.js} +1 -1
  299. package/dist/client/assets/{use-apply-named-rule-BVdRelp-.js → use-apply-named-rule-BnEs0jP7.js} +1 -1
  300. package/dist/client/assets/use-ask-in-chat-BIANNd7Z.js +1 -0
  301. package/dist/client/assets/{use-automations-B64sqUmg.js → use-automations-CyrAu8XA.js} +1 -1
  302. package/dist/client/assets/{use-autosave-CXs3BFTf.js → use-autosave-TV-hF63e.js} +1 -1
  303. package/dist/client/assets/use-blocks-v8-project-4PZwWSEO.js +1 -0
  304. package/dist/client/assets/{use-chat-layout-state-Be9vIJ9A.js → use-chat-layout-state-BG2-xqQp.js} +1 -1
  305. package/dist/client/assets/{use-cms-publish-actions-_yzMD1wJ.js → use-cms-publish-actions-CmQuU9AY.js} +5 -5
  306. package/dist/client/assets/{use-connect-companion-CB7F6AWc.js → use-connect-companion-CowVgnp9.js} +1 -1
  307. package/dist/client/assets/use-connection-BozgIoMu.js +1 -0
  308. package/dist/client/assets/{use-content-sync-D6gXnizV.js → use-content-sync-BBbOIir0.js} +1 -1
  309. package/dist/client/assets/{use-copy-CtSedmtg.js → use-copy-o0P-kroy.js} +1 -1
  310. package/dist/client/assets/{use-date-fns-locale-DQTvoMF-.js → use-date-fns-locale-bKU2Q73X.js} +1 -1
  311. package/dist/client/assets/{use-debounced-autosave-BLJ3k7wG.js → use-debounced-autosave-BmvZzlB_.js} +1 -1
  312. package/dist/client/assets/{use-debounced-value-CcMMD4Qy.js → use-debounced-value-yZdJ1f2K.js} +1 -1
  313. package/dist/client/assets/{use-deco-credits-C6qbWrOQ.js → use-deco-credits-Bjfx0bAt.js} +1 -1
  314. package/dist/client/assets/{use-decopilot-events-Dc1L96mp.js → use-decopilot-events-C_C16-Ln.js} +1 -1
  315. package/dist/client/assets/{use-delete-connection-Cw1Qu4uu.js → use-delete-connection-B4rX1qgg.js} +1 -1
  316. package/dist/client/assets/{use-deployment-admin-D9sSgOb1.js → use-deployment-admin-CS9K9Ea9.js} +1 -1
  317. package/dist/client/assets/{use-entitlements-BKF4jYfc.js → use-entitlements-DidlVdLU.js} +1 -1
  318. package/dist/client/assets/{use-fast-preview-draft-url-TUtYOptx.js → use-fast-preview-draft-url-KJzyk03O.js} +1 -1
  319. package/dist/client/assets/{use-file-configs-D7-mFpqA.js → use-file-configs-DhXDYO83.js} +1 -1
  320. package/dist/client/assets/{use-id-selection-JEuFRU8t.js → use-id-selection-BHXFVfAt.js} +1 -1
  321. package/dist/client/assets/{use-inbox-feed-RrCfNvIm.js → use-inbox-feed-CKkWXum7.js} +1 -1
  322. package/dist/client/assets/{use-infinite-scroll-Z_9MLZyx.js → use-infinite-scroll-CED9GMTE.js} +1 -1
  323. package/dist/client/assets/{use-join-requests-CANHKzNj.js → use-join-requests-DAuosANz.js} +1 -1
  324. package/dist/client/assets/use-main-panel-tabs-DfOwinBC.js +1 -0
  325. package/dist/client/assets/{use-mcp-auth-status-CMC6AisX.js → use-mcp-auth-status-Dls0bLQE.js} +1 -1
  326. package/dist/client/assets/{use-mcp-client-DvDomB9A.js → use-mcp-client-DJjkIlNp.js} +1 -1
  327. package/dist/client/assets/{use-mcp-prompts-CgDM8qHG.js → use-mcp-prompts-it9pO2QZ.js} +1 -1
  328. package/dist/client/assets/{use-mcp-tools-mI5K7YKF.js → use-mcp-tools-wfurU0oX.js} +1 -1
  329. package/dist/client/assets/{use-mobile-BgN1E82d.js → use-mobile-CJITN8uI.js} +1 -1
  330. package/dist/client/assets/{use-move-blocks-CPMJkp5h.js → use-move-blocks-CC1C41-K.js} +1 -1
  331. package/dist/client/assets/{use-navigate-to-agent-DmfSMV3R.js → use-navigate-to-agent-MlXDIBYX.js} +1 -1
  332. package/dist/client/assets/{use-org-fs-BWA2rFQC.js → use-org-fs-BH012Up0.js} +1 -1
  333. package/dist/client/assets/{use-org-repo-syncs-CTHMawzN.js → use-org-repo-syncs-jV2kVf-q.js} +1 -1
  334. package/dist/client/assets/{use-org-sso-CGB_T6WF.js → use-org-sso-Bo72RJ5p.js} +1 -1
  335. package/dist/client/assets/{use-organization-settings-sxurgilE.js → use-organization-settings-bWX185lw.js} +1 -1
  336. package/dist/client/assets/{use-project-native-view-presence-CwgTlxOv.js → use-project-native-view-presence-DhhbOsoh.js} +1 -1
  337. package/dist/client/assets/use-project-scope-pwqcjGo8.js +1 -0
  338. package/dist/client/assets/{use-recent-apps-DD97o_H1.js → use-recent-apps-Rr1jTj-T.js} +1 -1
  339. package/dist/client/assets/{use-reports-diagnostic-BA9L8p6c.js → use-reports-diagnostic-0n4ScjpC.js} +1 -1
  340. package/dist/client/assets/{use-sandbox-events-CdAdPYjL.js → use-sandbox-events-D1_GHzsF.js} +1 -1
  341. package/dist/client/assets/{use-secrets-rjK8WMv5.js → use-secrets-Dim43C3b.js} +1 -1
  342. package/dist/client/assets/{use-section-preview-base-DcuAqWGB.js → use-section-preview-base-B6FS0lTt.js} +1 -1
  343. package/dist/client/assets/{use-sidebar-collapsed-B34u6RwD.js → use-sidebar-collapsed-DcAIYhdp.js} +1 -1
  344. package/dist/client/assets/{use-tags-0YxcWwJI.js → use-tags-6ljf50Kl.js} +1 -1
  345. package/dist/client/assets/{use-task-board-analytics-tpDvOzAs.js → use-task-board-analytics-5XuzJjLw.js} +1 -1
  346. package/dist/client/assets/{use-task-board-events-CGZxY00s.js → use-task-board-events-DnEp5edD.js} +1 -1
  347. package/dist/client/assets/{use-task-board-item-prs-B6YW8nsa.js → use-task-board-item-prs-CycVEDhs.js} +1 -1
  348. package/dist/client/assets/{use-task-board-items-BcL-6L6N.js → use-task-board-items-pvi4Vcv1.js} +1 -1
  349. package/dist/client/assets/{use-task-board-prompts-B9dDmO_e.js → use-task-board-prompts-CE5ytMaB.js} +1 -1
  350. package/dist/client/assets/{use-task-metadata-hgLXNv36.js → use-task-metadata-D4kXdUwO.js} +1 -1
  351. package/dist/client/assets/{use-thread-outputs-X5IsW797.js → use-thread-outputs-BPYn8k3d.js} +1 -1
  352. package/dist/client/assets/{use-voice-input-DmZaOhTZ.js → use-voice-input-BKZpbbiI.js} +1 -1
  353. package/dist/client/assets/useInfiniteQuery-CtNfxLxq.js +1 -0
  354. package/dist/client/assets/{useQueries-BbhbAWNG.js → useQueries-B3iHMIbL.js} +1 -1
  355. package/dist/client/assets/useSuspenseInfiniteQuery-OzDVxqdl.js +1 -0
  356. package/dist/client/assets/{users-BNwLmtY6.js → users-7Hqe-w13.js} +1 -1
  357. package/dist/client/assets/{utils-KeMhVvdQ.js → utils-BbEfYi1l.js} +1 -1
  358. package/dist/client/assets/{variant-calendar-VCJbhkWd.js → variant-calendar-vayISj1w.js} +1 -1
  359. package/dist/client/assets/{variant-matcher-override-DLQRivi9.js → variant-matcher-override-ulDJ4YBu.js} +1 -1
  360. package/dist/client/assets/{view-header-cnfShdRT.js → view-header-y27ISHbd.js} +1 -1
  361. package/dist/client/assets/{virtual-mcp-YmAa-VVd.js → virtual-mcp-vRvxAZ15.js} +1 -1
  362. package/dist/client/assets/{watch-sse-pool-CYcZM1HP.js → watch-sse-pool-DhoYakYc.js} +1 -1
  363. package/dist/client/index.html +2 -2
  364. package/dist/client/legacy-admin-welcome.webp +0 -0
  365. package/dist/server/server.js +528 -528
  366. package/package.json +1 -1
  367. package/dist/client/assets/agent-app-IWHPMxEK.js +0 -1
  368. package/dist/client/assets/agent-assets-BZWSLrfd.js +0 -1
  369. package/dist/client/assets/agent-automations-BOxoQlGs.js +0 -1
  370. package/dist/client/assets/agent-calendar-CdFd9RbD.js +0 -1
  371. package/dist/client/assets/agent-connect-sources-CEmlztKl.js +0 -1
  372. package/dist/client/assets/agent-deck-CtBABaGT.js +0 -1
  373. package/dist/client/assets/agent-e2e-CFF1rulz.js +0 -1
  374. package/dist/client/assets/agent-experiments-ui7FfvYG.js +0 -1
  375. package/dist/client/assets/agent-file-Cq3onOpE.js +0 -1
  376. package/dist/client/assets/agent-hosting-vCUxyXYf.js +0 -1
  377. package/dist/client/assets/agent-library-CrZB4N_E.js +0 -1
  378. package/dist/client/assets/agent-library-file-BOxLy0sn.js +0 -1
  379. package/dist/client/assets/agent-overview-BcgCBEmB.js +0 -1
  380. package/dist/client/assets/agent-releases-aYJGzx-T.js +0 -2
  381. package/dist/client/assets/agent-settings-CxJPBxUl.js +0 -1
  382. package/dist/client/assets/agent-site-editor-code-CLO4vASe.js +0 -2
  383. package/dist/client/assets/agent-site-editor-content-DwQjPdJR.js +0 -1
  384. package/dist/client/assets/agent-site-editor-preview-DVAXUJER.js +0 -1
  385. package/dist/client/assets/agent-view-BWBpZVUF.js +0 -1
  386. package/dist/client/assets/api-keys-G9chtY31.js +0 -1
  387. package/dist/client/assets/app-editor-XjHMyWR2.js +0 -1
  388. package/dist/client/assets/category-editor-DH5eEcV-.js +0 -1
  389. package/dist/client/assets/cms-settings-editor-CLowE0HB.js +0 -1
  390. package/dist/client/assets/collapsible-C6tkGF0M.js +0 -1
  391. package/dist/client/assets/collection-detail-EKABwIVL.js +0 -1
  392. package/dist/client/assets/context-BHoetvxj.js +0 -1
  393. package/dist/client/assets/discover-DylE9QvC.js +0 -1
  394. package/dist/client/assets/feedback-CVUSSdB5.js +0 -1
  395. package/dist/client/assets/file-explorer-CgN8XtEL.js +0 -2
  396. package/dist/client/assets/home-CppOBOPg.js +0 -1
  397. package/dist/client/assets/index-2LwpmkET.js +0 -1
  398. package/dist/client/assets/index-A822oipr.js +0 -1
  399. package/dist/client/assets/index-CKEKSTrk.css +0 -1
  400. package/dist/client/assets/library-B2C1_FfB.js +0 -1
  401. package/dist/client/assets/login-DRAz2Byx.js +0 -1
  402. package/dist/client/assets/mock-board-Bsls4MQk.js +0 -10
  403. package/dist/client/assets/plan-GL1imSbx.js +0 -1
  404. package/dist/client/assets/post-calendar-HNq1Smaq.js +0 -1
  405. package/dist/client/assets/project-app-view-BTrJDLFt.js +0 -1
  406. package/dist/client/assets/project-reports-AxUmLNIH.js +0 -1
  407. package/dist/client/assets/project-tasks-CAr2Cqy5.js +0 -1
  408. package/dist/client/assets/record-editor-Ci0iG6uP.js +0 -1
  409. package/dist/client/assets/redirect-editor-CMuoDESV.js +0 -1
  410. package/dist/client/assets/reports-D-qIr9kO.js +0 -1
  411. package/dist/client/assets/reports-tab-BU0ZPXc5.js +0 -2
  412. package/dist/client/assets/repositories-DcYP84R5.js +0 -1
  413. package/dist/client/assets/resolve-tab-icon-73RgcuQe.js +0 -1
  414. package/dist/client/assets/review-settings-CuOWj38_.js +0 -1
  415. package/dist/client/assets/route-BhRhH95H.js +0 -1
  416. package/dist/client/assets/route-CSMzYXoN.js +0 -1
  417. package/dist/client/assets/route-DyaXyBfS.js +0 -1
  418. package/dist/client/assets/search-input-DFXG_UYw.js +0 -1
  419. package/dist/client/assets/sections-editor-CYlxI1p5.js +0 -1
  420. package/dist/client/assets/settings-tab-DWTMFT0X.js +0 -1
  421. package/dist/client/assets/shell-layout-CBX9BtMX.js +0 -1
  422. package/dist/client/assets/site-editor-CWVoX5OY.js +0 -1
  423. package/dist/client/assets/skills-XkOrIlnS.js +0 -1
  424. package/dist/client/assets/taskboard-analytics-Cmr5hCm9.js +0 -1
  425. package/dist/client/assets/tasks-140YlmT4.js +0 -1
  426. package/dist/client/assets/thread-analytics-9huoP8m_.js +0 -1
  427. package/dist/client/assets/use-ask-in-chat-CtKzpyFU.js +0 -1
  428. package/dist/client/assets/use-blocks-v8-project-BPQNHFav.js +0 -1
  429. package/dist/client/assets/use-connection-CECJF8rf.js +0 -1
  430. package/dist/client/assets/use-main-panel-tabs-DA6Ypr8r.js +0 -1
  431. package/dist/client/assets/use-project-scope-Cb4T7-Pe.js +0 -1
  432. package/dist/client/assets/useInfiniteQuery-WRSkkanY.js +0 -1
  433. package/dist/client/assets/useSuspenseInfiniteQuery-B1s2URZC.js +0 -1
@@ -1 +0,0 @@
1
- import{c as E,j as t,B as K,h as Z,aF as Xe,aG as re,b as W,R as Ee,r as A,a5 as fe,eh as Ze,ej as Oe,aE as et,n as Re,I as pe,m as G,cs as tt,as as st,u as ot,L as se,t as lt,f as he,d5 as Fe}from"./index-CcqLnTyv.js";import{E as Me}from"./empty-state-DiGOrU7G.js";import{u as ge}from"./use-mcp-client-DvDomB9A.js";import{F as ae,a as nt,b as ce,d as de}from"./form-BhXakrt_.js";import{T as xe}from"./textarea-CpPhDLVU.js";import{D as je,O as it,M as rt}from"./index-BlAiq0AL.js";import{bJ as at,ab as ct,bT as dt,S as mt,aJ as ut,T as pt,aO as xt,Y as ye,e as ft}from"./agent-icon-DqjTL3cE.js";import{M as ht}from"./mcp-app-renderer-Cigj7X9N.js";import{g as gt,M as we}from"./types-BQOtvCBo.js";import{A as jt,a as bt,b as Nt}from"./alert-Cddl0pAs.js";import{S as Ce,b as Ie,a as Te,d as $e,c as me}from"./select-DQqbq83t.js";import{b as vt,c as Pe,T as De,a as ke}from"./tooltip-AKf-E49i.js";import{i as St}from"./AlertCircle-kYtqXGU8.js";import{i as yt}from"./Play-D_ph4pZ0.js";import{g as wt}from"./connection-slug-BQwcAWfG.js";import{u as Ct,T as It}from"./use-mcp-auth-status-CMC6AisX.js";import{a as ze,u as Be}from"./use-connection-CECJF8rf.js";import{u as Tt}from"./use-mcp-tools-mI5K7YKF.js";import{c as $t}from"./content-blocks-o63cs2vh.js";import{I as Ae}from"./integration-icon-ChQEBlMz.js";import{f as Pt,y as Dt}from"./chat-context-aSjAR9mm.js";import{g as kt}from"./shell-layout-CBX9BtMX.js";import{MonacoCodeEditor as At}from"./monaco-editor-XS1Vx7aB.js";import{E as Et}from"./empty-state-ajQCApN0.js";import{n as Ot}from"./LinkBroken01-C9GtmpYY.js";import"./auth-qAWEiaXq.js";import"./label-CsfAEF08.js";import"./Key01-D0Pq98hT.js";import"./extract-connection-data-CTb_9Cpr.js";import"./metadata-D72DunRR.js";import"./connection-CZHWvxVM.js";import"./url-slug-ihGFL5bo.js";import"./Plus-D8rFucQH.js";import"./index-GYpV5EH9.js";import"./index-2LwpmkET.js";import"./index-Bcy7_FA1.js";import"./index-BdQq_4o_.js";import"./index-DCh3kkGn.js";import"./popover-BQnTqyWU.js";import"./repository-binding-CuR-5wbj.js";import"./SearchMd-2MPq0KPN.js";import"./use-mobile-BgN1E82d.js";import"./use-navigate-to-agent-DmfSMV3R.js";import"./thread-intent-pegObLq9.js";import"./delay-CnY5UFtP.js";import"./watch-sse-pool-CYcZM1HP.js";import"./task-board-DcTNURQy.js";import"./schema-D4ZSsKIV.js";import"./schema-DyZV-W0g.js";import"./Tool01-BTDYOKsB.js";import"./ArrowUp-DcYpepHk.js";import"./ArrowLeft-B1m5qQi9.js";import"./ShoppingBag01-DDCYsqx9.js";import"./Globe04--FaZazgw.js";import"./CheckCircle-B4NfGYxe.js";import"./ChevronUp-DRG0w_P4.js";import"./ChevronSelectorVertical-EqyUOMMk.js";import"./UserSquare-BJHrMhrM.js";import"./CreditCard01-BLl0RgXC.js";import"./SwitchHorizontal01-D7HAXgYP.js";import"./Minus-eGpg4-RN.js";import"./Monitor01-Su614Ctg.js";import"./Sun-Dvv08Urq.js";import"./Trash01-CHCe7_6o.js";import"./Upload01-Q6ECKQXp.js";import"./Users01-DHfg9AEk.js";import"./XClose-BDiB_Nvo.js";import"./Zap-DpvU6Dp2.js";import"./index-D146teOp.js";import"./badge-DtxRsHGH.js";import"./mcp-oauth-ChfuZkYU.js";import"./autosend-_WPHuuuS.js";import"./thread-route-D5E5K-lU.js";import"./use-project-scope-Cb4T7-Pe.js";import"./use-entitlements-BKF4jYfc.js";import"./use-ai-providers-BrqJh5BT.js";import"./use-decopilot-events-Dc1L96mp.js";import"./use-organization-settings-sxurgilE.js";import"./use-deployment-admin-D9sSgOb1.js";import"./admin-fetch-BhTJlAsX.js";import"./command-CtR4gjCr.js";import"./project-icon-BlOLnUr2.js";import"./use-debounced-value-CcMMD4Qy.js";import"./new-project-dialog-C_1Rs0SG.js";import"./repository-picker-DEa_L5X-.js";import"./github-icon-BBNizm_E.js";import"./useInfiniteQuery-WRSkkanY.js";import"./infiniteQueryObserver-uDA4YvYL.js";import"./collection-search-iHJVqUHB.js";import"./required-auth-layout-BnfTNype.js";import"./use-org-sso-CGB_T6WF.js";import"./editor-BKO3Ouyu.js";function Rt(s){const e=E.c(15),{onSave:n,onUndo:o,isDirty:l,isSaving:i,saveLabel:a,undoLabel:c}=s,d=a===void 0?"Save":a,r=c===void 0?"Undo":c;if(!l)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(at,{size:14}),e[0]=x):x=e[0];let h;e[1]!==i||e[2]!==o||e[3]!==r?(h=t.jsxs(K,{variant:"outline",size:"sm",onClick:o,disabled:i,"aria-label":r,children:[x,r]}),e[1]=i,e[2]=o,e[3]=r,e[4]=h):h=e[4];let u;e[5]!==i?(u=i?t.jsx(Z,{className:"size-3.5"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=u):u=e[6];let g;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==u?(g=t.jsxs(K,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[u,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=u,e[11]=g):g=e[11];let p;return e[12]!==h||e[13]!==g?(p=t.jsxs(t.Fragment,{children:[h,g]}),e[12]=h,e[13]=g,e[14]=p):p=e[14],p}Xe({title:re().min(1),description:re().nullable(),body:re()});function ue(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ft(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(o=>o==="mcps"),n=e>=0?s[e+1]:void 0;return n?decodeURIComponent(n):void 0}function Mt(s){const e=E.c(43),{form:n}=s,o=W();let l;e[0]!==o?(l=o("details.prompt.details"),e[0]=o,e[1]=l):l=e[1];let i;e[2]!==l?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:l}),e[2]=l,e[3]=i):i=e[3];let a;e[4]!==o?(a=C=>{const{field:b}=C;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.title")}),t.jsx(de,{children:t.jsx(pe,{...b,placeholder:o("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=o,e[5]=a):a=e[5];let c;e[6]!==n.control||e[7]!==a?(c=t.jsx(ae,{control:n.control,name:"title",render:a}),e[6]=n.control,e[7]=a,e[8]=c):c=e[8];let d;e[9]!==o?(d=C=>{const{field:b}=C;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.description")}),t.jsx(de,{children:t.jsx(pe,{...b,value:b.value??"",placeholder:o("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=o,e[10]=d):d=e[10];let r;e[11]!==n.control||e[12]!==d?(r=t.jsx(ae,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=r):r=e[13];let x;e[14]!==c||e[15]!==r?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,r]}),e[14]=c,e[15]=r,e[16]=x):x=e[16];let h;e[17]!==i||e[18]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=h):h=e[19];let u;e[20]!==o?(u=o("details.prompt.message"),e[20]=o,e[21]=u):u=e[21];let g;e[22]!==u?(g=t.jsx("div",{className:"text-sm font-medium text-foreground",children:u}),e[22]=u,e[23]=g):g=e[23];let p;e[24]!==o?(p=o("details.prompt.messageDescription"),e[24]=o,e[25]=p):p=e[25];let j;e[26]!==p?(j=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=j):j=e[27];let N;e[28]!==o?(N=C=>{const{field:b}=C;return t.jsx(ce,{children:t.jsx(de,{children:t.jsx(xe,{...b,value:b.value??"",placeholder:o("details.prompt.bodyPlaceholder"),className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})},e[28]=o,e[29]=N):N=e[29];let v;e[30]!==n.control||e[31]!==N?(v=t.jsx(ae,{control:n.control,name:"body",render:N}),e[30]=n.control,e[31]=N,e[32]=v):v=e[32];let y;e[33]!==g||e[34]!==j||e[35]!==v?(y=t.jsxs("div",{className:"flex flex-col gap-2",children:[g,j,v]}),e[33]=g,e[34]=j,e[35]=v,e[36]=y):y=e[36];let w;e[37]!==y||e[38]!==h?(w=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[h,y]}),e[37]=y,e[38]=h,e[39]=w):w=e[39];let P;return e[40]!==n||e[41]!==w?(P=t.jsx(nt,{...n,children:w}),e[40]=n,e[41]=w,e[42]=P):P=e[42],P}function zt(s){const e=E.c(42),{providerId:n,promptId:o}=s,l=W(),{org:i}=fe(),a=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==a?(c={connectionId:a,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=a,e[3]=c):c=e[3];const d=ge(c),r=Ze(n,"PROMPT",o,d),x=Oe(n,"PROMPT",d),h=x.update.isPending;let u;e[4]!==r?(u=r?{title:r.title,description:r.description??null,body:ue(r)}:void 0,e[4]=r,e[5]=u):u=e[5];let g;e[6]!==u?(g={values:u},e[6]=u,e[7]=g):g=e[7];const p=et(g);let j;e[8]!==p||e[9]!==r?(j=()=>{r&&p.reset({title:r.title,description:r.description??null,body:ue(r)})},e[8]=p,e[9]=r,e[10]=j):j=e[10];const N=j;let v;e[11]!==x.update||e[12]!==p||e[13]!==o?(v=p.handleSubmit(async I=>{const T=await x.update.mutateAsync({id:o,data:{title:I.title,description:I.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:I.body}}]}});p.reset({title:T.title,description:T.description??null,body:ue(T)})}),e[11]=x.update,e[12]=p,e[13]=o,e[14]=v):v=e[14];const y=v;if(!r){let I;e[15]!==l?(I=l("details.prompt.notFoundTitle"),e[15]=l,e[16]=I):I=e[16];let T;e[17]!==l?(T=l("details.prompt.notFoundDescription"),e[17]=l,e[18]=T):T=e[18];let R;return e[19]!==I||e[20]!==T?(R=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Me,{title:I,description:T})}),e[19]=I,e[20]=T,e[21]=R):R=e[21],R}let w;e[22]!==y?(w=()=>{y()},e[22]=y,e[23]=w):w=e[23];let P;e[24]!==p.formState.isDirty||e[25]!==h||e[26]!==N||e[27]!==w?(P=t.jsx(Rt,{onSave:w,onUndo:N,isDirty:p.formState.isDirty,isSaving:h}),e[24]=p.formState.isDirty,e[25]=h,e[26]=N,e[27]=w,e[28]=P):P=e[28];let C;e[29]!==r.title||e[30]!==P?(C=t.jsx(Re.Title,{actions:P,children:r.title}),e[29]=r.title,e[30]=P,e[31]=C):C=e[31];let b;e[32]!==r.description?(b=r.description&&t.jsx("p",{className:"px-4 py-3 text-sm text-muted-foreground",children:r.description}),e[32]=r.description,e[33]=b):b=e[33];let D;e[34]!==b||e[35]!==C?(D=t.jsxs(t.Fragment,{children:[C,b]}),e[34]=b,e[35]=C,e[36]=D):D=e[36];let k;e[37]!==p?(k=t.jsx("div",{className:"h-full",children:t.jsx(Mt,{form:p})}),e[37]=p,e[38]=k):k=e[38];let O;return e[39]!==D||e[40]!==k?(O=t.jsxs(je,{children:[D,k]}),e[39]=D,e[40]=k,e[41]=O):O=e[41],O}function Bt(s){const e=E.c(10),{itemId:n}=s,o=W();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Ft(),e[0]=l):l=e[0];const i=l;if(!i){let c;e[1]!==o?(c=o("details.prompt.notFoundTitle"),e[1]=o,e[2]=c):c=e[2];let d;e[3]!==o?(d=o("details.prompt.missingConnectionDescription"),e[3]=o,e[4]=d):d=e[4];let r;return e[5]!==c||e[6]!==d?(r=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Me,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=r):r=e[7],r}let a;return e[8]!==n?(a=t.jsx(Ee,{children:t.jsx(A.Suspense,{fallback:null,children:t.jsx(zt,{providerId:i,promptId:n})})}),e[8]=n,e[9]=a):a=e[9],a}function Le(s){const e=E.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=G("min-w-0 overflow-hidden",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function Ue(s){const e=E.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=G("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden text-muted-foreground",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function Y(s){const e=E.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=G("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function oe(s){const e=E.c(10);let n,o,l;e[0]!==s?({asChild:n,className:o,...l}=s,e[0]=s,e[1]=n,e[2]=o,e[3]=l):(n=e[1],o=e[2],l=e[3]);const i=n?tt:"a";let a;e[4]!==o?(a=G("hover:text-foreground transition-colors truncate",o),e[4]=o,e[5]=a):a=e[5];let c;return e[6]!==i||e[7]!==l||e[8]!==a?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:a,...l}),e[6]=i,e[7]=l,e[8]=a,e[9]=c):c=e[9],c}function _e(s){const e=E.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=G("text-foreground font-medium truncate",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function le(s){const e=E.c(12);let n,o,l;e[0]!==s?({children:n,className:o,...l}=s,e[0]=s,e[1]=n,e[2]=o,e[3]=l):(n=e[1],o=e[2],l=e[3]);let i;e[4]!==o?(i=G("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",o),e[4]=o,e[5]=i):i=e[5];let a;e[6]!==n?(a=n??t.jsx(st,{}),e[6]=n,e[7]=a):a=e[7];let c;return e[8]!==l||e[9]!==i||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...l,children:a}),e[8]=l,e[9]=i,e[10]=a,e[11]=c):c=e[11],c}const Lt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(s){const e=E.c(12),{toolName:n,connectionId:o,siblings:l,onSelectInstance:i,onBack:a}=s,c=W();let d;e[0]!==o?(d={connectionId:o},e[0]=o,e[1]=d):d=e[1];const r=Ct(d);if(!r.isAuthenticated){let u;return e[2]!==r.supportsOAuth||e[3]!==a||e[4]!==c?(u=t.jsx("div",{className:"flex h-full items-center justify-center",children:r.supportsOAuth?t.jsx(it,{onAuthenticate:()=>a(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=r.supportsOAuth,e[3]=a,e[4]=c,e[5]=u):u=e[5],u}const x=`${o}:${n}`;let h;return e[6]!==o||e[7]!==i||e[8]!==l||e[9]!==x||e[10]!==n?(h=t.jsx(_t,{toolName:n,connectionId:o,siblings:l,onSelectInstance:i},x),e[6]=o,e[7]=i,e[8]=l,e[9]=x,e[10]=n,e[11]=h):h=e[11],h}function _t({toolName:s,connectionId:e,siblings:n,onSelectInstance:o}){const l=W(),{replayId:i}=ot({strict:!1}),a=(()=>{if(!i)return null;const m=`replay-${i}`,f=sessionStorage.getItem(m);if(!f)return null;sessionStorage.removeItem(m);try{return JSON.parse(f)}catch{return null}})(),c=(()=>{if(!a)return null;const m={};for(const[f,$]of Object.entries(a))$!==null&&typeof $=="object"?m[f]=JSON.stringify($,null,2):m[f]=$;return m})(),[d,r]=A.useState(c??{}),[x,h]=A.useState(a?JSON.stringify(a,null,2):"{}"),[u,g]=A.useState(null),[p,j]=A.useState(null),[N,v]=A.useState(null),[y,w]=A.useState(null),[P,C]=A.useState(!1),[b,D]=A.useState(null),{org:k}=fe(),O=ze(e),I=Pt(),T=Dt(),{openSidePanel:R}=kt(),U=`${e}:${s}`,M=ge({connectionId:e,orgId:k.id,orgSlug:k.slug}),_=Tt({client:M}),S=_.data?.tools?.find(m=>m.name===s),F=gt(S?._meta),V=m=>{if(!I)return;const f=$t(m.content);f.content.length>0&&(R(),I.sendMessage({tiptapDoc:f}))},[z,B]=A.useState("json"),[q,Q]=A.useState(!1);F&&!q&&(B("ui"),Q(!0));const J=S?.inputSchema?.properties,be=J?Object.keys(J):[],X=be.length>0,ee={};if(X&&S?.inputSchema?.properties)for(const m of be)ee[m]=S.inputSchema.required?.includes(m)?"":void 0;const ne=m=>Object.prototype.hasOwnProperty.call(d,m),Je=async()=>{C(!0),w(null),g(null),j(null),v(null),D(null);const m=performance.now();try{if(!M)throw new Error("MCP client is not available");const f=X?{...ee,...d}:(()=>{const L=x.trim();if(!L)return{};const H=JSON.parse(L);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();X&&S?.inputSchema?.properties&&Object.entries(S.inputSchema.properties).forEach(([L,H])=>{if((H.type==="object"||H.type==="array")&&typeof f[L]=="string")try{f[L]=JSON.parse(f[L])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof f[L]=="string"&&f[L]!==""){const Se=Number(f[L]);Number.isNaN(Se)||(f[L]=Se)}});const $=await M.callTool({name:s,arguments:f}),te=$.structuredContent??$,Qe=performance.now(),Ye=Math.round(Qe-m);g(te),j($),v(f);const Ge=JSON.stringify(te),ve=new TextEncoder().encode(Ge).length;D({duration:`${Ye}ms`,bytes:`${ve} bytes`,tokens:`~${Math.ceil(ve/4)} tokens`,cost:"$0.0000"})}catch(f){const $=f instanceof Error?f.message:String(f);w($||"Unknown error occurred");const te=performance.now();D({duration:`${Math.round(te-m)}ms`})}finally{C(!1)}},ie=(m,f)=>{r($=>({...$,[m]:f}))},Ve=()=>{g(null),j(null),v(null),w(null),D(null)},qe=S?.name??Lt(s),He=t.jsx(Le,{children:t.jsxs(Ue,{children:[t.jsx(Y,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections",params:{org:k.slug},children:l("details.tool.connections")})})}),t.jsx(le,{}),O&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections/$appSlug",params:{org:k.slug,appSlug:wt(O)},search:{tab:"tools"},children:O.title})})}),t.jsx(le,{})]}),t.jsx(Y,{children:t.jsx(_e,{children:qe})})]})}),Ne=n.length>1&&t.jsxs(Ce,{value:e,onValueChange:o,children:[t.jsx(Ie,{size:"sm",className:"w-auto min-w-[200px]",children:t.jsx(Te,{})}),t.jsx($e,{children:n.map(m=>t.jsx(me,{value:m.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ae,{icon:m.icon,name:m.title,size:"xs",className:"shrink-0"}),m.title]})},m.id))})]}),Ke=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground",children:l("details.tool.parameters")}),S?.inputSchema?.required&&S.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",l("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:X&&S?.inputSchema?.properties?Object.entries(S.inputSchema.properties).map(([m,f])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[m,S.inputSchema?.required?.includes(m)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:f.type})]}),f.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:f.description}),f.type==="object"||f.type==="array"?t.jsx(xe,{className:"font-mono text-xs",value:ne(m)?d[m]??"":ee[m]??"",onChange:$=>ie(m,$.target.value),placeholder:l("details.tool.enterAsJson",{key:m}),rows:3}):f.type==="boolean"?t.jsxs(Ce,{value:ne(m)?String(d[m]??""):"",onValueChange:$=>ie(m,$==="true"),children:[t.jsx(Ie,{children:t.jsx(Te,{placeholder:l("details.tool.selectTrueOrFalse")})}),t.jsxs($e,{children:[t.jsx(me,{value:"true",children:"true"}),t.jsx(me,{value:"false",children:"false"})]})]}):t.jsx(pe,{value:ne(m)?d[m]??"":ee[m]??"",onChange:$=>ie(m,$.target.value),placeholder:l("details.tool.enter",{key:m})})]},m)):S?.inputSchema&&!X?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:l("details.tool.rawJsonInput")}),t.jsx(xe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:m=>h(m.target.value),placeholder:l("details.tool.rawJsonExample")})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:l("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(K,{variant:"destructive",className:"gap-2",onClick:Ve,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),l("details.tool.cancel")]}):t.jsxs(K,{variant:"default",className:"gap-2",onClick:Je,children:[t.jsx(yt,{className:"h-3.5 w-3.5 fill-current"}),l("details.tool.executeTool")]})})]}),We=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground",children:l("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(pt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),F&&t.jsx(vt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Pe,{children:[t.jsx(De,{asChild:!0,children:t.jsx(K,{size:"icon",variant:z==="ui"?"secondary":"ghost",onClick:()=>B("ui"),children:t.jsx(xt,{size:14})})}),t.jsx(ke,{children:l("details.tool.interactiveView")})]}),t.jsxs(Pe,{children:[t.jsx(De,{asChild:!0,children:t.jsx(K,{size:"icon",variant:z==="json"?"secondary":"ghost",onClick:()=>B("json"),children:t.jsx(ye,{size:14})})}),t.jsx(ke,{children:l("details.tool.jsonView")})]})]})})]})]}),y&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(jt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(St,{className:"h-4 w-4"}),t.jsx(bt,{className:"mb-0",children:l("details.tool.executionFailed")})]}),t.jsx(Nt,{className:"text-xs text-destructive",children:y})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:F&&z==="ui"&&M?t.jsx(A.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(Z,{className:"size-4"}),t.jsx("span",{className:"text-sm",children:l("details.tool.loadingApp")})]})}),children:t.jsx(ht,{resourceURI:F,toolInfo:S?{tool:S}:void 0,toolInput:N??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:we.view.minHeight,maxHeight:we.view.maxHeight,client:M,onMessage:V,onUpdateModelContext:m=>T?.setAppContext(U,m),onTeardown:()=>T?.clearAppContext(U),className:"h-full"})}):u?t.jsxs(t.Fragment,{children:[t.jsx(At,{code:JSON.stringify(u,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{size:"icon",variant:"outline",className:"absolute top-4 right-4",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(u,null,2)),lt.success(l("details.tool.copiedToClipboard"))},children:t.jsx(ft,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(ye,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:l("details.tool.runToolToSeeResults")})]})})]});return t.jsx(je,{leading:He,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Ae,{icon:O?.icon||null,name:O?.title||s,size:"xl",className:"shrink-0"}),t.jsx(Re.Title,{children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[_.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):_.isLoading?t.jsx(Z,{className:"size-[10px] text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:_.isSuccess?"ready":_.isLoading?"connecting":"error"})]}),t.jsx(It,{annotations:S?.annotations,_meta:S?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:Ne})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:S?.description||"No description available"})]}),n.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:l("details.tool.instance")}),Ne]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Ke}),We]})})]})})}function Jt(s){const e=E.c(21),{itemId:n,siblings:o,onBack:l}=s,i=W(),[a,c]=A.useState(o[0]?.id??"");let d;e[0]!==a||e[1]!==o?(d=o.find(p=>p.id===a)?.id??o[0]?.id??"",e[0]=a,e[1]=o,e[2]=d):d=e[2];const r=d;if(!ze(r||void 0)||!r){let p;e[3]!==i?(p=i("details.tool.connectionNotFound"),e[3]=i,e[4]=p):p=e[4];let j;e[5]!==p?(j=t.jsx("h3",{className:"text-lg font-semibold",children:p}),e[5]=p,e[6]=j):j=e[6];let N;e[7]!==i?(N=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=N):N=e[8];let v;e[9]!==N?(v=t.jsx("p",{className:"text-sm text-muted-foreground",children:N}),e[9]=N,e[10]=v):v=e[10];let y;return e[11]!==j||e[12]!==v?(y=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[j,v]})}),e[11]=j,e[12]=v,e[13]=y):y=e[13],y}let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Z,{className:"size-8 text-muted-foreground"})}),e[14]=h):h=e[14];let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=p=>A.startTransition(()=>c(p)),e[15]=u):u=e[15];let g;return e[16]!==r||e[17]!==l||e[18]!==o||e[19]!==n?(g=t.jsx(A.Suspense,{fallback:h,children:t.jsx(Ut,{toolName:n,connectionId:r,siblings:o,onSelectInstance:u,onBack:l})}),e[16]=r,e[17]=l,e[18]=o,e[19]=n,e[20]=g):g=e[20],g}const Vt={prompt:Bt};function qt(){const s=E.c(9),e=Fe();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const o=he(n),l=decodeURIComponent(o.itemId);let i;s[1]!==o.appSlug?(i={slug:o.appSlug},s[1]=o.appSlug,s[2]=i):i=s[2];const a=Be(i);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const d=c,r=Ht;let x;return s[5]!==d||s[6]!==l||s[7]!==a?(x=t.jsx(Jt,{itemId:l,siblings:a,onBack:d,onUpdate:r}),s[5]=d,s[6]=l,s[7]=a,s[8]=x):x=s[8],x}async function Ht(s){return Promise.resolve()}function Kt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Wt(){const s=E.c(52),e=Fe();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const o=he(n),l=W(),i=decodeURIComponent(o.collectionName),a=decodeURIComponent(o.itemId);let c;s[1]!==e.history?(c=()=>{e.history.back()},s[1]=e.history,s[2]=c):c=s[2];const d=c,{org:r}=fe();let x;s[3]!==o.appSlug?(x={slug:o.appSlug},s[3]=o.appSlug,s[4]=x):x=s[4];const u=Be(x)[0]??null,g=u?.id??"",p=g||"no-connection",j=g??null;let N;s[5]!==r.id||s[6]!==r.slug||s[7]!==j?(N={connectionId:j,orgId:r.id,orgSlug:r.slug},s[5]=r.id,s[6]=r.slug,s[7]=j,s[8]=N):N=s[8];const v=ge(N),y=Oe(p,i,v);let w;s[9]!==y||s[10]!==a?(w=async J=>{a&&await y.update.mutateAsync({id:a,data:J})},s[9]=y,s[10]=a,s[11]=w):w=s[11];const P=w;let C;s[12]!==i?(C=i?.toLowerCase(),s[12]=i,s[13]=C):C=s[13];const b=C,D=b&&Vt[b];let k;s[14]!==i?(k=Kt(i),s[14]=i,s[15]=k):k=s[15];const O=k;let I;s[16]!==r.slug?(I=t.jsx(Y,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections",params:{org:r.slug},children:"Connections"})})}),s[16]=r.slug,s[17]=I):I=s[17];let T;s[18]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(le,{}),s[18]=T):T=s[18];let R;s[19]!==i||s[20]!==u||s[21]!==r.slug||s[22]!==o.appSlug?(R=u&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:o.appSlug},search:{tab:i},children:u.title})})}),t.jsx(le,{})]}),s[19]=i,s[20]=u,s[21]=r.slug,s[22]=o.appSlug,s[23]=R):R=s[23];let U;s[24]!==O?(U=t.jsx(Y,{children:t.jsx(_e,{children:O})}),s[24]=O,s[25]=U):U=s[25];let M;s[26]!==R||s[27]!==U||s[28]!==I?(M=t.jsx(Le,{children:t.jsxs(Ue,{children:[I,T,R,U]})}),s[26]=R,s[27]=U,s[28]=I,s[29]=M):M=s[29];const _=M;if(D){let J;return s[30]!==D||s[31]!==d||s[32]!==P||s[33]!==a?(J=t.jsx(D,{itemId:a,onBack:d,onUpdate:P}),s[30]=D,s[31]=d,s[32]=P,s[33]=a,s[34]=J):J=s[34],J}let S;s[35]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(Ot,{size:36,className:"text-muted-foreground"}),s[35]=S):S=s[35];let F;s[36]!==l?(F=l("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=l,s[37]=F):F=s[37];let V;s[38]!==l?(V=l("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=l,s[39]=V):V=s[39];let z;s[40]!==l?(z=l("orgs.collectionDetail.goBackButton"),s[40]=l,s[41]=z):z=s[41];let B;s[42]!==d||s[43]!==z?(B={onClick:d,children:z},s[42]=d,s[43]=z,s[44]=B):B=s[44];let q;s[45]!==F||s[46]!==V||s[47]!==B?(q=t.jsx(Et,{icon:S,title:F,description:V,buttonProps:B}),s[45]=F,s[46]=V,s[47]=B,s[48]=q):q=s[48];let Q;return s[49]!==_||s[50]!==q?(Q=t.jsx(je,{leading:_,children:q}),s[49]=_,s[50]=q,s[51]=Q):Q=s[51],Q}function Qt(){const s=E.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const n=he(e);if(decodeURIComponent(n.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(qt,{}),s[1]=a):a=s[1],a}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Wt,{}),s[2]=i):i=s[2],i}function Ro(){const s=E.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ee,{children:t.jsx(A.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Z,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Qt,{})})}),s[0]=e):e=s[0],e}export{Ro as default};
@@ -1 +0,0 @@
1
- import{c as W,m as le,j as s,as as Vt,b as be,r as T,b2 as _t,I as q,ak as Xt,D as Xs,v as Ws,w as jt,x as Ys,aT as Wt,bx as St,h as ba,a6 as ha,y as fa,B as Z,t as de,s as ja,aN as va,aM as ya,aJ as Na,aH as Ca,aI as ka,aL as wa,aK as Ba,bj as Sa}from"./index-CcqLnTyv.js";import{u as Yt,c as Jt}from"./hosted-reconcile-C9_-UERm.js";import{s as Pa}from"./thread-intent-pegObLq9.js";import{J as qt,a0 as Ea,O as Ta,n as Da,a6 as Pt}from"./agent-icon-DqjTL3cE.js";import{s as vs,i as La}from"./UserSquare-BJHrMhrM.js";import{B as js}from"./badge-DtxRsHGH.js";import{L as H}from"./label-CsfAEF08.js";import{S as Aa}from"./switch-2cMTOO8e.js";import{T as hs}from"./textarea-CpPhDLVU.js";import{a as vt,b as yt,P as Nt}from"./popover-BQnTqyWU.js";import{R as Js,A as Ns,O as Ra,Q as Ct,S as Qt,x as Zt,T as Ga,U as Oa,V as Fa,X as Ia,Y as ut,Z as mt,_ as pt,$ as Is,a0 as Et,a1 as Ks,a2 as ea,a3 as Us,c as se,a4 as Tt,a5 as Dt,a6 as $a,a7 as Ms,a8 as bs,a9 as Vs,aa as Lt,K as za,ab as Ha,ac as Ka,ad as Ua,ae as Ma,af as At,ag as Va,ah as _a,ai as Xa,aj as Wa,ak as Rt,al as Ya,am as Ja,an as qa,ao as Gt,ap as Qa,aq as Za}from"./content-tab-CxWiT9yK.js";import{u as sa}from"./use-ai-providers-BrqJh5BT.js";import{U as en,u as ta,I as aa}from"./parse-sections-BhaTg9vA.js";import{e as sn}from"./blocks-tab-states-2A_KUVRA.js";import{u as _s}from"./use-autosave-CXs3BFTf.js";import{u as tn}from"./use-debounced-value-CcMMD4Qy.js";import{h as an}from"./index-BRwiTdyd.js";import{t as na}from"./ChevronUp-DRG0w_P4.js";import{i as nn}from"./SwitchHorizontal01-D7HAXgYP.js";import{s as on}from"./Plus-D8rFucQH.js";import{s as oa}from"./Trash01-CHCe7_6o.js";import{u as ln}from"./mustache-ByRkTjky.js";import{C as rn}from"./calendar-gF784tOB.js";import{P as cn,r as la,C as dn}from"./product-picker-dialog-CkKwZuBF.js";import"./ArrowLeft-B1m5qQi9.js";import"./command-CtR4gjCr.js";import"./index-DCh3kkGn.js";import"./SearchMd-2MPq0KPN.js";import"./slider-84yNNCUP.js";import"./index-Bcy7_FA1.js";import"./index-BdQq_4o_.js";import"./tooltipContext-C6xZbBgY.js";import"./CategoricalChart-Bp-vLaQf.js";import"./index-GYpV5EH9.js";import"./site-editor-toast-CIOA7Zq3.js";import"./use-voice-input-DmZaOhTZ.js";import"./chat-context-aSjAR9mm.js";import"./autosend-_WPHuuuS.js";import"./thread-route-D5E5K-lU.js";import"./use-project-scope-Cb4T7-Pe.js";import"./repository-binding-CuR-5wbj.js";import"./use-mcp-client-DvDomB9A.js";import"./auth-qAWEiaXq.js";import"./use-entitlements-BKF4jYfc.js";import"./use-decopilot-events-Dc1L96mp.js";import"./watch-sse-pool-CYcZM1HP.js";import"./task-board-DcTNURQy.js";import"./schema-D4ZSsKIV.js";import"./use-organization-settings-sxurgilE.js";import"./drawer-ChCkx76W.js";import"./tooltip-AKf-E49i.js";import"./index-D146teOp.js";import"./use-mobile-BgN1E82d.js";import"./Tool01-BTDYOKsB.js";import"./index-DhM4mrtt.js";import"./checkbox-CBfkrmis.js";import"./Minus-eGpg4-RN.js";import"./select-DQqbq83t.js";import"./ChevronSelectorVertical-EqyUOMMk.js";import"./Key01-D0Pq98hT.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./Monitor01-Su614Ctg.js";import"./AlertCircle-kYtqXGU8.js";import"./use-blocks-v8-project-BPQNHFav.js";import"./sandbox-url-D3mC8qhT.js";import"./utils-KeMhVvdQ.js";import"./use-sandbox-events-CdAdPYjL.js";import"./sandbox-git-api-DcqI6XE4.js";import"./delay-CnY5UFtP.js";import"./ArrowUp-DcYpepHk.js";import"./LinkBroken01-C9GtmpYY.js";import"./ShoppingBag01-DDCYsqx9.js";import"./Globe04--FaZazgw.js";import"./CheckCircle-B4NfGYxe.js";import"./CreditCard01-BLl0RgXC.js";import"./Sun-Dvv08Urq.js";import"./Play-D_ph4pZ0.js";import"./Upload01-Q6ECKQXp.js";import"./Users01-DHfg9AEk.js";import"./XClose-BDiB_Nvo.js";import"./Zap-DpvU6Dp2.js";import"./view-header-cnfShdRT.js";import"./scroll-area-Dc2A2LkE.js";import"./use-cms-publish-actions-_yzMD1wJ.js";import"./use-content-sync-D6gXnizV.js";import"./section-array-field-ClWKGp_4.js";import"./collapsible-C6tkGF0M.js";import"./sandbox-lifecycle-context-BbXRjeM5.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./date-utils-CrvIKg-s.js";import"./use-move-blocks-CPMJkp5h.js";import"./empty-state-ajQCApN0.js";import"./use-file-configs-D7-mFpqA.js";import"./monaco-editor-XS1Vx7aB.js";import"./editor-BKO3Ouyu.js";import"./core.esm-DkzVh4mV.js";import"./sortable.esm-BHALCXRV.js";import"./search-input-DFXG_UYw.js";import"./toggle-group-D9bXIbAb.js";import"./active-indicator-CCMhAsc_.js";import"./collection-table-wrapper-Dw3f1ge7.js";import"./table-DvZCTg5z.js";import"./agent-capabilities-C80Nj8dH.js";import"./empty-state-DiGOrU7G.js";import"./github-icon-BBNizm_E.js";import"./new-project-dialog-C_1Rs0SG.js";import"./use-navigate-to-agent-DmfSMV3R.js";import"./repository-picker-DEa_L5X-.js";import"./useInfiniteQuery-WRSkkanY.js";import"./infiniteQueryObserver-uDA4YvYL.js";import"./collection-search-iHJVqUHB.js";import"./pair-h0916MQd.js";import"./use-copy-CtSedmtg.js";import"./usage-stats-CVX23WNU.js";import"./tool-namespace-BQSaNq7N.js";import"./form-BhXakrt_.js";import"./utils-CVEq3hMx.js";import"./markdown-CPuTm6Mv.js";import"./shell-layout-CBX9BtMX.js";import"./use-deployment-admin-D9sSgOb1.js";import"./admin-fetch-BhTJlAsX.js";import"./integration-icon-ChQEBlMz.js";import"./project-icon-BlOLnUr2.js";import"./required-auth-layout-BnfTNype.js";import"./use-org-sso-CGB_T6WF.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Cigj7X9N.js";import"./types-BQOtvCBo.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-B2jsXlHJ.js";import"./use-connection-CECJF8rf.js";import"./use-mcp-prompts-CgDM8qHG.js";import"./use-thread-outputs-X5IsW797.js";import"./file-type-icon-Bo3Nsgdh.js";import"./editor-classes-BNXGx3Ep.js";import"./combobox-DqTAA7CX.js";import"./tabs-BzwzpfZ1.js";import"./asset-utils-Cekn7DV3.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./suggestion-C3enCUG8.js";import"./index-878qqrH2.js";import"./use-org-fs-BWA2rFQC.js";import"./icon-button-muPqJd-h.js";function bt(u){const e=W.c(2),{children:a}=u;let i;return e[0]!==a?(i=s.jsx("ul",{className:"divide-y overflow-hidden rounded-lg border",children:a}),e[0]=a,e[1]=i):i=e[1],i}function ht(u){const e=W.c(22),{open:a,onToggle:i,title:r,untitledLabel:c,removeLabel:l,onRemove:p,leading:d,children:x}=u;let m;e[0]!==a?(m=a?s.jsx(na,{size:14,className:"shrink-0"}):s.jsx(Vt,{size:14,className:"shrink-0 text-muted-foreground"}),e[0]=a,e[1]=m):m=e[1];const n=!r&&"text-muted-foreground";let t;e[2]!==n?(t=le("truncate",n),e[2]=n,e[3]=t):t=e[3];const j=r||c;let f;e[4]!==t||e[5]!==j?(f=s.jsx("span",{className:t,children:j}),e[4]=t,e[5]=j,e[6]=f):f=e[6];let C;e[7]!==d||e[8]!==i||e[9]!==a||e[10]!==m||e[11]!==f?(C=s.jsxs("button",{type:"button",onClick:i,"aria-expanded":a,className:"flex min-w-0 flex-1 cursor-pointer items-center gap-2 px-3 py-2.5 text-left text-sm transition-colors hover:bg-accent",children:[m,d,f]}),e[7]=d,e[8]=i,e[9]=a,e[10]=m,e[11]=f,e[12]=C):C=e[12];let h;e[13]!==p||e[14]!==l?(h=s.jsx(Js,{label:l,onClick:p}),e[13]=p,e[14]=l,e[15]=h):h=e[15];let k;e[16]!==C||e[17]!==h?(k=s.jsxs("div",{className:"flex items-center gap-1 pr-2",children:[C,h]}),e[16]=C,e[17]=h,e[18]=k):k=e[18];const w=a&&x;let P;return e[19]!==k||e[20]!==w?(P=s.jsxs("li",{className:"group/item bg-card",children:[k,w]}),e[19]=k,e[20]=w,e[21]=P):P=e[21],P}function kt(u){const e=W.c(24),{terms:a,onChange:i,placeholder:r,removeLabel:c}=u,[l,p]=T.useState("");let d;e[0]!==i||e[1]!==a?(d=h=>{const k=h.split(",").map(mn).filter(w=>w&&!a.includes(w));k.length>0&&i([...a,...k]),p("")},e[0]=i,e[1]=a,e[2]=d):d=e[2];const x=d;let m;e[3]!==i||e[4]!==c||e[5]!==a?(m=a.length>0&&s.jsx("ul",{className:"flex flex-wrap gap-1.5",children:a.map((h,k)=>s.jsx("li",{children:s.jsxs(js,{variant:"secondary",className:"gap-1 pr-1",children:[s.jsx("span",{className:"truncate",children:h}),s.jsx("button",{type:"button","aria-label":`${c}: ${h}`,onClick:()=>i(a.filter((w,P)=>P!==k)),className:"cursor-pointer rounded-sm p-0.5 hover:bg-foreground/10",children:s.jsx(_t,{size:11})})]})},`${h}-${k}`))}),e[3]=i,e[4]=c,e[5]=a,e[6]=m):m=e[6];let n;e[7]===Symbol.for("react.memo_cache_sentinel")?(n=h=>p(h.target.value),e[7]=n):n=e[7];let t;e[8]!==x||e[9]!==l?(t=()=>x(l),e[8]=x,e[9]=l,e[10]=t):t=e[10];let j;e[11]!==x||e[12]!==l||e[13]!==i||e[14]!==a?(j=h=>{if(h.key==="Enter"||h.key===","){h.preventDefault(),x(l);return}h.key==="Backspace"&&l===""&&a.length>0&&i(a.slice(0,-1))},e[11]=x,e[12]=l,e[13]=i,e[14]=a,e[15]=j):j=e[15];let f;e[16]!==l||e[17]!==r||e[18]!==t||e[19]!==j?(f=s.jsx(q,{value:l,placeholder:r,onChange:n,onBlur:t,onKeyDown:j,className:"border-0 shadow-none focus-visible:ring-0"}),e[16]=l,e[17]=r,e[18]=t,e[19]=j,e[20]=f):f=e[20];let C;return e[21]!==m||e[22]!==f?(C=s.jsxs("div",{className:"space-y-2 rounded-lg border bg-card p-2",children:[m,f]}),e[21]=m,e[22]=f,e[23]=C):C=e[23],C}function mn(u){return u.trim()}function ft(u){const e=W.c(40),{rules:a,onChange:i,revision:r,idPrefix:c,add:l,namePlaceholder:p,bodyPlaceholder:d,mentions:x,citationWarning:m}=u,n=be(),[t,j]=T.useState(null);let f;e[0]!==i||e[1]!==a?(f=(O,S)=>i(a.map((v,G)=>G===O?{...v,...S}:v)),e[0]=i,e[1]=a,e[2]=f):f=e[2];const C=f;let h;e[3]!==i||e[4]!==a?(h=O=>{i(a.filter((S,v)=>v!==O)),j(S=>S===null||S<O?S:null)},e[3]=i,e[4]=a,e[5]=h):h=e[5];const k=h;let w;if(e[6]!==d||e[7]!==m||e[8]!==c||e[9]!==x||e[10]!==p||e[11]!==t||e[12]!==k||e[13]!==C||e[14]!==r||e[15]!==a||e[16]!==n){let O;e[18]!==d||e[19]!==m||e[20]!==c||e[21]!==x||e[22]!==p||e[23]!==t||e[24]!==k||e[25]!==C||e[26]!==r||e[27]!==n?(O=(S,v)=>s.jsx(ht,{open:t===v,onToggle:()=>j(t===v?null:v),title:S.name,untitledLabel:n("sandbox.blogBrand.untitledRule"),removeLabel:n("sandbox.blogBrand.removeItem"),onRemove:()=>k(v),children:s.jsx(xn,{rule:S,editorKey:`${c}-${v}-${r}`,namePlaceholder:p,bodyPlaceholder:d,mentions:x,citationWarning:m,onPatch:G=>C(v,G)})},v),e[18]=d,e[19]=m,e[20]=c,e[21]=x,e[22]=p,e[23]=t,e[24]=k,e[25]=C,e[26]=r,e[27]=n,e[28]=O):O=e[28],w=a.map(O),e[6]=d,e[7]=m,e[8]=c,e[9]=x,e[10]=p,e[11]=t,e[12]=k,e[13]=C,e[14]=r,e[15]=a,e[16]=n,e[17]=w}else w=e[17];let P;e[29]!==w?(P=s.jsx(bt,{children:w}),e[29]=w,e[30]=P):P=e[30];let L;e[31]!==i||e[32]!==a?(L=()=>{i([...a,{name:"",value:""}]),j(a.length)},e[31]=i,e[32]=a,e[33]=L):L=e[33];let F;e[34]!==l||e[35]!==L?(F=s.jsx(Ns,{label:l,onClick:L}),e[34]=l,e[35]=L,e[36]=F):F=e[36];let I;return e[37]!==P||e[38]!==F?(I=s.jsxs("div",{className:"space-y-2",children:[P,F]}),e[37]=P,e[38]=F,e[39]=I):I=e[39],I}const pn=600;function xn(u){const e=W.c(23),{rule:a,editorKey:i,namePlaceholder:r,bodyPlaceholder:c,mentions:l,citationWarning:p,onPatch:d}=u,x=tn(a.value,pn);let m;e[0]!==p||e[1]!==x?(m=p?.(x),e[0]=p,e[1]=x,e[2]=m):m=e[2];const n=m;let t;e[3]!==d?(t=w=>d({name:w.target.value}),e[3]=d,e[4]=t):t=e[4];let j;e[5]!==r||e[6]!==a.name||e[7]!==t?(j=s.jsx(q,{value:a.name,placeholder:r,onChange:t,className:"h-9 font-medium"}),e[5]=r,e[6]=a.name,e[7]=t,e[8]=j):j=e[8];let f;e[9]!==d?(f=w=>d({value:w}),e[9]=d,e[10]=f):f=e[10];let C;e[11]!==c||e[12]!==i||e[13]!==l||e[14]!==a.value||e[15]!==f?(C=s.jsx(an,{defaultValue:a.value,placeholder:c,attachments:!1,mentions:l,onChange:f},i),e[11]=c,e[12]=i,e[13]=l,e[14]=a.value,e[15]=f,e[16]=C):C=e[16];let h;e[17]!==n?(h=n&&s.jsx("p",{className:"text-xs text-warning",children:n}),e[17]=n,e[18]=h):h=e[18];let k;return e[19]!==j||e[20]!==C||e[21]!==h?(k=s.jsxs("div",{className:"space-y-3 border-t bg-background px-3 py-3",children:[j,C,h]}),e[19]=j,e[20]=C,e[21]=h,e[22]=k):k=e[22],k}const Ot=[{id:"seed",label:"sandbox.campaignGen.stepSeed"},{id:"running",label:"sandbox.campaignGen.stepRunning"},{id:"pick",label:"sandbox.campaignGen.stepPick"}],gn={strong:"sandbox.campaignGen.verdictStrong",workable:"sandbox.campaignGen.verdictWorkable",weak:"sandbox.campaignGen.verdictWeak"},un={strong:"default",workable:"secondary",weak:"outline"},bn=["sandbox.campaignGen.phaseReading","sandbox.campaignGen.phaseWriting","sandbox.campaignGen.phaseReviewing"],hn={"no-site":"sandbox.campaignGen.gapNoSite","no-tools":"sandbox.campaignGen.gapNoTools","timeout-partial":"sandbox.campaignGen.gapTimeoutPartial","timeout-empty":"sandbox.campaignGen.gapTimeoutEmpty",failed:"sandbox.campaignGen.gapFailed","nothing-useful":"sandbox.campaignGen.gapNothingUseful","targets-dropped":"sandbox.campaignGen.gapTargetsDropped","products-dropped":"sandbox.campaignGen.gapProductsDropped"};function fn({open:u,onOpenChange:e,decofile:a,virtualMcpId:i,hasAi:r,onCreate:c}){const l=be(),{call:p}=Xt(),[d,x]=T.useState("seed"),[m,n]=T.useState(null),[t,j]=T.useState(""),[f,C]=T.useState([]),[h,k]=T.useState(""),[w,P]=T.useState(3),[L,F]=T.useState(0),[I,O]=T.useState(null),[S,v]=T.useState(new Set),[G,z]=T.useState(!1),X=Ra(a),te=Ct(a).map(o=>o.name).filter(Boolean),Q=Qt(Zt(a).merged),Y=Ot.findIndex(o=>o.id===d),V=h.trim().length>0&&r;function ae(){x("seed"),n(null),j(""),C([]),k(""),P(3),F(0),O(null),v(new Set),z(!1)}function ee(o){o||ae(),e(o)}function ne(o){n(o.key),j(o.name),C(o.keywords),k(o.prompt)}async function K(){x("running"),F(0);try{const o=await p("BLOG_SITE_GROUND",{virtualMcpId:i,purpose:"campaign",focus:h,language:Q.language}).catch(E=>{console.warn("[campaignGen] grounding failed",E)}),N=o?await p("BLOG_SITE_CATALOGUE",{grounding:{report:o.report,outcome:o.outcome,evidence:o.evidence||void 0,evidenceUri:o.evidenceUri},storeUrl:Q.storeUrl}).catch(E=>{console.warn("[campaignGen] reading the catalogue failed",E)}):void 0;F(1);const A=await p("BLOG_CAMPAIGN_SUGGEST",{seed:{keywords:f,prompt:h},brand:Q,existingNames:te,count:w,virtualMcpId:i,grounding:o?{report:o.report,outcome:o.outcome}:void 0,catalogue:N?.read?{products:N.products,targets:N.targets}:void 0});F(2),O(A),v(new Set(A.campaigns.map((E,D)=>D))),x("pick")}catch(o){de.error(o instanceof Error?o.message:l("sandbox.campaignGen.failed")),x("seed")}}async function U(){if(!I)return;const o=I.campaigns.filter((N,A)=>S.has(A));if(o.length!==0){z(!0);try{const N=new Date;await c({key:m??Oa(),entry:{...Ga(N),name:t||h.slice(0,60),keywords:f,prompt:h}},o),ee(!1)}catch(N){de.error(N instanceof Error?N.message:l("sandbox.campaignGen.failed")),z(!1)}}}return s.jsx(Xs,{open:u,onOpenChange:ee,children:s.jsxs(Ws,{className:"flex max-h-[85vh] flex-col sm:max-w-2xl",children:[s.jsxs(jt,{children:[s.jsx(Ys,{children:l("sandbox.campaignGen.title")}),s.jsx(Wt,{children:l("sandbox.campaignGen.subtitle")})]}),s.jsx("ol",{className:"flex shrink-0 items-center gap-1.5 text-xs",children:Ot.map((o,N)=>s.jsx("li",{className:le("rounded-md px-2 py-1",N===Y?"bg-primary text-primary-foreground":N<Y?"text-foreground":"text-muted-foreground"),children:l(o.label)},o.id))}),s.jsxs("div",{className:"min-h-0 flex-1 space-y-4 overflow-y-auto py-1",children:[d==="seed"&&s.jsxs(s.Fragment,{children:[X.length>0&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(H,{children:l("sandbox.campaignGen.savedSeeds")}),s.jsx("ul",{className:"divide-y overflow-hidden rounded-lg border",children:X.map(o=>s.jsx("li",{children:s.jsxs("button",{type:"button",onClick:()=>ne(o),className:le("flex w-full cursor-pointer flex-col gap-0.5 px-3 py-2 text-left text-sm transition-colors hover:bg-accent",m===o.key&&"bg-muted/60"),children:[s.jsx("span",{className:"truncate font-medium",children:o.name||l("sandbox.campaignGen.untitledSeed")}),s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:o.prompt})]})},o.key))})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(H,{htmlFor:"seed-name",children:l("sandbox.campaignGen.seedNameLabel")}),s.jsx(q,{id:"seed-name",value:t,placeholder:l("sandbox.campaignGen.seedNamePlaceholder"),onChange:o=>j(o.target.value)})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(H,{htmlFor:"seed-prompt",children:l("sandbox.campaignGen.promptLabel")}),s.jsx("p",{className:"text-xs text-muted-foreground",children:l("sandbox.campaignGen.promptHint")}),s.jsx(hs,{id:"seed-prompt",value:h,rows:4,placeholder:l("sandbox.campaignGen.promptPlaceholder"),onChange:o=>k(o.target.value)})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(H,{children:l("sandbox.campaignGen.keywordsLabel")}),s.jsx("p",{className:"text-xs text-muted-foreground",children:l("sandbox.campaignGen.keywordsHint")}),s.jsx(kt,{terms:f,onChange:C,placeholder:l("sandbox.campaignGen.keywordsPlaceholder"),removeLabel:l("sandbox.campaignGen.removeKeyword")})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(H,{htmlFor:"seed-count",children:l("sandbox.campaignGen.countLabel")}),s.jsx("p",{className:"text-xs text-muted-foreground",children:l("sandbox.campaignGen.countHint")}),s.jsx(q,{id:"seed-count",type:"number",min:1,max:3,value:w,onChange:o=>P(Math.min(3,Math.max(1,Number(o.target.value)||1))),className:"w-24"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:l("sandbox.postBoard.usesCredits")})]})]}),d==="running"&&s.jsx("ul",{className:"space-y-3 py-6",children:bn.map((o,N)=>s.jsxs("li",{className:le("flex items-center gap-2 text-sm",N>L&&"text-muted-foreground"),children:[N<L?s.jsx(St,{size:14,className:"text-success"}):N===L?s.jsx(ba,{size:"xs"}):s.jsx("span",{className:"size-3.5"}),l(o)]},o))}),d==="pick"&&I&&s.jsxs(s.Fragment,{children:[I.gaps.length>0&&s.jsxs("div",{className:"flex gap-2 rounded-lg border border-warning/40 bg-warning/5 p-3",children:[s.jsx(ha,{size:14,className:"mt-0.5 shrink-0 text-warning"}),s.jsx("ul",{className:"space-y-1 text-xs text-muted-foreground",children:I.gaps.map(o=>s.jsx("li",{children:l(hn[o.code],{count:o.count??0})},o.code))})]}),I.campaigns.length===0?s.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:l("sandbox.campaignGen.noCandidates")}):s.jsx("ul",{className:"space-y-2",children:I.campaigns.map((o,N)=>s.jsx("li",{children:s.jsxs("button",{type:"button",onClick:()=>v(A=>{const E=new Set(A);return E.has(N)?E.delete(N):E.add(N),E}),className:le("w-full cursor-pointer space-y-2 rounded-lg border p-3 text-left transition-colors",S.has(N)?"border-primary bg-primary/5":"bg-card hover:bg-accent"),children:[s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx("span",{className:le("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded border",S.has(N)&&"border-primary bg-primary text-primary-foreground"),children:S.has(N)&&s.jsx(St,{size:11})}),s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:o.name}),s.jsx(js,{variant:un[o.review.verdict],children:l(gn[o.review.verdict])})]}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[l("sandbox.campaignGen.cardSummary",{targets:String(o.intent.targets.length),products:String(o.intent.products.length)}),o.period.start||o.period.end?` · ${o.period.start??"—"} / ${o.period.end??"—"}`:""]}),o.review.rationale&&s.jsx("p",{className:"text-xs text-muted-foreground",children:o.review.rationale}),o.review.risks.length>0&&s.jsx("ul",{className:"space-y-0.5 text-xs text-muted-foreground",children:o.review.risks.map(A=>s.jsxs("li",{children:["— ",A]},A))})]})},N))})]})]}),s.jsxs(fa,{className:"shrink-0 sm:justify-between",children:[s.jsx(Z,{type:"button",variant:"outline",disabled:d!=="pick",onClick:()=>x("seed"),children:l("sandbox.campaignGen.back")}),d==="pick"?s.jsx(Z,{type:"button",disabled:S.size===0||G,onClick:U,children:l("sandbox.campaignGen.create",{count:String(S.size)})}):s.jsxs(Z,{type:"button",disabled:!V||d==="running",onClick:K,children:[s.jsx(vs,{size:14}),l("sandbox.campaignGen.generate")]})]})]})})}const $s={awareness:"sandbox.campaigns.objectiveAwareness",education:"sandbox.campaigns.objectiveEducation",conversion:"sandbox.campaigns.objectiveConversion",retention:"sandbox.campaigns.objectiveRetention",repositioning:"sandbox.campaigns.objectiveRepositioning"},zs={category:"sandbox.campaigns.targetCategory",collection:"sandbox.campaigns.targetCollection"},jn={launch:"sandbox.campaigns.triggerLaunchHelp",seasonal:"sandbox.campaigns.triggerSeasonalHelp",trend:"sandbox.campaigns.triggerTrendHelp",seo_gap:"sandbox.campaigns.triggerSeoGapHelp",inventory:"sandbox.campaigns.triggerInventoryHelp",partnership:"sandbox.campaigns.triggerPartnershipHelp",reputation:"sandbox.campaigns.triggerReputationHelp"},vn={awareness:"sandbox.campaigns.objectiveAwarenessHelp",education:"sandbox.campaigns.objectiveEducationHelp",conversion:"sandbox.campaigns.objectiveConversionHelp",retention:"sandbox.campaigns.objectiveRetentionHelp",repositioning:"sandbox.campaigns.objectiveRepositioningHelp"},yn={awareness:{content:"sandbox.campaigns.objectiveAwarenessContent",product:"sandbox.campaigns.objectiveAwarenessProduct",cta:"sandbox.campaigns.objectiveAwarenessCta",metric:"sandbox.campaigns.objectiveAwarenessMetric"},education:{content:"sandbox.campaigns.objectiveEducationContent",product:"sandbox.campaigns.objectiveEducationProduct",cta:"sandbox.campaigns.objectiveEducationCta",metric:"sandbox.campaigns.objectiveEducationMetric"},conversion:{content:"sandbox.campaigns.objectiveConversionContent",product:"sandbox.campaigns.objectiveConversionProduct",cta:"sandbox.campaigns.objectiveConversionCta",metric:"sandbox.campaigns.objectiveConversionMetric"},retention:{content:"sandbox.campaigns.objectiveRetentionContent",product:"sandbox.campaigns.objectiveRetentionProduct",cta:"sandbox.campaigns.objectiveRetentionCta",metric:"sandbox.campaigns.objectiveRetentionMetric"},repositioning:{content:"sandbox.campaigns.objectiveRepositioningContent",product:"sandbox.campaigns.objectiveRepositioningProduct",cta:"sandbox.campaigns.objectiveRepositioningCta",metric:"sandbox.campaigns.objectiveRepositioningMetric"}},Nn={education:"sandbox.campaigns.objectiveEducationNote",conversion:"sandbox.campaigns.objectiveConversionNote"},Cn={};function Ft(u){return new Date(u.getTime()-u.getTimezoneOffset()*6e4).toISOString().slice(0,10)}function It(u){if(!u)return;const e=new Date(`${u}T00:00:00`);return Number.isNaN(e.getTime())?void 0:e}function kn(u,e){const[a]=Ct({[u]:e??{}}),{key:i,...r}=a??{key:u,name:"",seedKey:"",status:"draft",period:{start:null,end:null},trigger:{type:"seasonal",note:""},intent:{objective:"awareness",targets:[],products:[],keywords:[]},guardrails:{avoidComplements:[],toneOverrides:""},createdAt:"",updatedAt:""};return r}function $t(u){const e=W.c(264),{blockKey:a,block:i,onSave:r,onRemove:c,onClose:l,isSaving:p,onSeed:d,onEdit:x,sandboxRef:m,storeUrl:n}=u,t=be(),[j,f]=T.useState(!1),[C,h]=T.useState(null),[k,w]=T.useState(null);let P;e[0]!==r?(P=(ue,Ee)=>r(ue,Ee),e[0]=r,e[1]=P):P=e[1];let L;e[2]!==p||e[3]!==x||e[4]!==d?(L={isSaving:p,onSeed:d,onEdit:x},e[2]=p,e[3]=x,e[4]=d,e[5]=L):L=e[5];const[F,I,O]=_s(i??Cn,P,L);let S,v,G,z,X,te,Q,Y,V,ae,ee,ne,K,U,o;if(e[6]!==a||e[7]!==F||e[8]!==l||e[9]!==r||e[10]!==k||e[11]!==C||e[12]!==m||e[13]!==I||e[14]!==n||e[15]!==O||e[16]!==t){v=kn(a,F);const ue=g=>Us(a,{...v,...g,updatedAt:new Date().toISOString()});G=g=>I(ue(g));const Ee=g=>{const y=ue(g);O(y),r(y)},$e=Fa(v.intent.targets);z=Ia(v.intent.products);const Qs=g=>Ee({intent:{...v.intent,targets:g}}),ws=g=>Ee({intent:{...v.intent,products:g}}),wt=(g,y)=>$e.map((B,Pe)=>Pe===g?{...B,...y}:B),Bs=(g,y)=>G({intent:{...v.intent,targets:wt(g,y)}}),da=(g,y)=>Qs(wt(g,y)),Bt=g=>{Qs([...$e,{kind:"category",id:"",name:"",url:"",description:"",...g}]),h($e.length)},ma=g=>{Qs($e.filter((y,B)=>B!==g)),h(y=>y===null||y<g?y:null)};S=()=>{ws([...z,{id:"",name:"",url:"",images:[],category:"",description:""}]),w(z.length)};const pa=g=>{ws(z.filter((y,B)=>B!==g)),w(y=>y===null||y<g?y:null)},ze=(g,y)=>G({intent:{...v.intent,products:z.map((B,Pe)=>Pe===g?{...B,...y}:B)}});o=(g,y)=>{if(!y){ws(z.filter(B=>B.id!==g.id));return}z.some(B=>B.id===g.id)||ws([...z,{id:g.id,name:g.label,url:la(g.url,n),images:(g.images??[]).slice(0,ea),category:g.category??"",description:g.description??""}])},ne="min-w-0 max-w-3xl space-y-6 px-8 py-6";let He;e[32]!==t?(He=t("sandbox.campaigns.nameLabel"),e[32]=t,e[33]=He):He=e[33];let Ss;e[34]!==He?(Ss=s.jsx(H,{htmlFor:"campaign-name",children:He}),e[34]=He,e[35]=Ss):Ss=e[35];const xa=v.name;let Ps;e[36]!==t?(Ps=t("sandbox.campaigns.namePlaceholder"),e[36]=t,e[37]=Ps):Ps=e[37];const Zs=s.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[Ss,s.jsx(q,{id:"campaign-name",value:xa,placeholder:Ps,onChange:g=>G({name:g.target.value})})]});let Ke;e[38]!==l||e[39]!==t?(Ke=l&&s.jsx(Z,{type:"button",variant:"ghost",size:"icon",className:"mt-6 shrink-0","aria-label":t("sandbox.campaigns.close"),onClick:l,children:s.jsx(_t,{size:14})}),e[38]=l,e[39]=t,e[40]=Ke):Ke=e[40],e[41]!==Zs||e[42]!==Ke?(K=s.jsxs("div",{className:"flex items-start gap-3",children:[Zs,Ke]}),e[41]=Zs,e[42]=Ke,e[43]=K):K=e[43];let Ue;e[44]!==t?(Ue=t("sandbox.campaigns.statusLabel"),e[44]=t,e[45]=Ue):Ue=e[45];let Es;e[46]!==Ue?(Es=s.jsx(H,{children:Ue}),e[46]=Ue,e[47]=Es):Es=e[47];let Ts;e[48]!==t?(Ts=ut.map(g=>t(ys[g])),e[48]=t,e[49]=Ts):Ts=e[49];const et=ys[v.status];let Ds;e[50]!==t||e[51]!==et?(Ds=t(et),e[50]=t,e[51]=et,e[52]=Ds):Ds=e[52];const st=s.jsxs("div",{className:"space-y-1.5",children:[Es,s.jsx(Is,{options:Ts,value:Ds,onChange:g=>{const y=ut.find(B=>t(ys[B])===g);y&&Ee({status:y})}})]});let Me;e[53]!==t?(Me=t("sandbox.campaigns.periodLabel"),e[53]=t,e[54]=Me):Me=e[54];let Ve;e[55]!==Me?(Ve=s.jsx(H,{children:Me}),e[55]=Me,e[56]=Ve):Ve=e[56];const tt=s.jsx(Dn,{period:v.period,onChange:g=>G({period:g})});let _e;e[57]!==Ve||e[58]!==tt?(_e=s.jsxs("div",{className:"space-y-1.5",children:[Ve,tt]}),e[57]=Ve,e[58]=tt,e[59]=_e):_e=e[59],e[60]!==st||e[61]!==_e?(U=s.jsxs("div",{className:"flex flex-wrap items-end gap-6",children:[st,_e]}),e[60]=st,e[61]=_e,e[62]=U):U=e[62];let Xe;e[63]!==t?(Xe=t("sandbox.campaigns.triggerLabel"),e[63]=t,e[64]=Xe):Xe=e[64];let We;e[65]!==Xe?(We=s.jsx(H,{children:Xe}),e[65]=Xe,e[66]=We):We=e[66];let Ye;e[67]!==t?(Ye=t("sandbox.campaigns.triggerHelpLabel"),e[67]=t,e[68]=Ye):Ye=e[68];let Je;e[69]!==t?(Je=mt.map(g=>({name:t(fs[g]),help:t(jn[g])})),e[69]=t,e[70]=Je):Je=e[70];let qe;e[71]!==Ye||e[72]!==Je?(qe=s.jsx(zt,{label:Ye,options:Je}),e[71]=Ye,e[72]=Je,e[73]=qe):qe=e[73];let Qe;e[74]!==We||e[75]!==qe?(Qe=s.jsxs("div",{className:"flex items-center gap-1",children:[We,qe]}),e[74]=We,e[75]=qe,e[76]=Qe):Qe=e[76];let Ze;e[77]!==t?(Ze=t("sandbox.campaigns.triggerHint"),e[77]=t,e[78]=Ze):Ze=e[78];let es;e[79]!==Ze?(es=s.jsx("p",{className:"text-xs text-muted-foreground",children:Ze}),e[79]=Ze,e[80]=es):es=e[80];let Ls;e[81]!==t?(Ls=mt.map(g=>t(fs[g])),e[81]=t,e[82]=Ls):Ls=e[82];const at=fs[v.trigger.type];let As;e[83]!==t||e[84]!==at?(As=t(at),e[83]=t,e[84]=at,e[85]=As):As=e[85];const nt=s.jsx(Is,{options:Ls,value:As,onChange:g=>{const y=mt.find(B=>t(fs[B])===g);y&&Ee({trigger:{...v.trigger,type:y}})}}),ga=v.trigger.note;let Rs;e[86]!==t?(Rs=t("sandbox.campaigns.triggerNotePlaceholder"),e[86]=t,e[87]=Rs):Rs=e[87];const ot=s.jsx(hs,{value:ga,rows:3,placeholder:Rs,onChange:g=>G({trigger:{...v.trigger,note:g.target.value}})});e[88]!==Qe||e[89]!==es||e[90]!==nt||e[91]!==ot?(X=s.jsxs("section",{className:"space-y-2",children:[Qe,es,nt,ot]}),e[88]=Qe,e[89]=es,e[90]=nt,e[91]=ot,e[92]=X):X=e[92];let ss;e[93]!==t?(ss=t("sandbox.campaigns.objectiveLabel"),e[93]=t,e[94]=ss):ss=e[94];let ts;e[95]!==ss?(ts=s.jsx(H,{children:ss}),e[95]=ss,e[96]=ts):ts=e[96];let as;e[97]!==t?(as=t("sandbox.campaigns.objectiveHelpLabel"),e[97]=t,e[98]=as):as=e[98];let ns;e[99]!==t?(ns=pt.map(g=>{const y=yn[g],B=Nn[g];return{name:t($s[g]),help:t(vn[g]),facets:[{label:t("sandbox.campaigns.facetContent"),value:t(y.content)},{label:t("sandbox.campaigns.facetProduct"),value:t(y.product)},{label:t("sandbox.campaigns.facetCta"),value:t(y.cta)},{label:t("sandbox.campaigns.facetMetric"),value:t(y.metric)}],note:B?t(B):void 0}}),e[99]=t,e[100]=ns):ns=e[100];let os;e[101]!==as||e[102]!==ns?(os=s.jsx(zt,{label:as,options:ns}),e[101]=as,e[102]=ns,e[103]=os):os=e[103];let ls;e[104]!==ts||e[105]!==os?(ls=s.jsxs("div",{className:"flex items-center gap-1",children:[ts,os]}),e[104]=ts,e[105]=os,e[106]=ls):ls=e[106];let rs;e[107]!==t?(rs=t("sandbox.campaigns.objectiveHint"),e[107]=t,e[108]=rs):rs=e[108];let is;e[109]!==rs?(is=s.jsx("p",{className:"text-xs text-muted-foreground",children:rs}),e[109]=rs,e[110]=is):is=e[110];let Gs;e[111]!==t?(Gs=pt.map(g=>t($s[g])),e[111]=t,e[112]=Gs):Gs=e[112];const lt=$s[v.intent.objective];let Os;e[113]!==t||e[114]!==lt?(Os=t(lt),e[113]=t,e[114]=lt,e[115]=Os):Os=e[115];const rt=s.jsx(Is,{options:Gs,value:Os,onChange:g=>{const y=pt.find(B=>t($s[B])===g);y&&Ee({intent:{...v.intent,objective:y}})}});e[116]!==ls||e[117]!==is||e[118]!==rt?(te=s.jsxs("section",{className:"space-y-2",children:[ls,is,rt]}),e[116]=ls,e[117]=is,e[118]=rt,e[119]=te):te=e[119];let cs;e[120]!==t?(cs=t("sandbox.campaigns.targetsLabel"),e[120]=t,e[121]=cs):cs=e[121];let ds;e[122]!==cs?(ds=s.jsx(H,{children:cs}),e[122]=cs,e[123]=ds):ds=e[123];let ms;e[124]!==t?(ms=t("sandbox.campaigns.targetsHint"),e[124]=t,e[125]=ms):ms=e[125];let ps;e[126]!==ms?(ps=s.jsx("p",{className:"text-xs text-muted-foreground",children:ms}),e[126]=ms,e[127]=ps):ps=e[127];const it=$e.length>0&&s.jsx(bt,{children:$e.map((g,y)=>s.jsx(ht,{open:C===y,onToggle:()=>h(C===y?null:y),title:g.name,untitledLabel:t("sandbox.campaigns.untitledTarget"),removeLabel:t("sandbox.campaigns.removeTarget"),onRemove:()=>ma(y),leading:s.jsx(js,{variant:"secondary",className:"shrink-0",children:t(zs[g.kind])}),children:s.jsxs("div",{className:"space-y-2 border-t px-3 py-3",children:[s.jsx(Is,{options:Et.map(B=>t(zs[B])),value:t(zs[g.kind]),onChange:B=>{const Pe=Et.find(ua=>t(zs[ua])===B);Pe&&da(y,Pe==="collection"?{kind:Pe,url:""}:{kind:Pe})}}),s.jsx(q,{value:g.name,placeholder:t("sandbox.campaigns.targetNamePlaceholder"),onChange:B=>Bs(y,{name:B.target.value}),className:"h-9"}),g.kind!=="collection"&&s.jsx(q,{value:g.url,placeholder:t("sandbox.campaigns.targetUrlPlaceholder"),onChange:B=>Bs(y,{url:B.target.value}),className:"h-9"}),s.jsx(q,{value:g.id,placeholder:t(g.kind==="collection"?"sandbox.campaigns.targetCollectionIdPlaceholder":"sandbox.campaigns.targetIdPlaceholder"),onChange:B=>Bs(y,{id:B.target.value}),className:"h-9"}),s.jsx(hs,{value:g.description,rows:2,placeholder:t("sandbox.campaigns.targetDescriptionPlaceholder"),onChange:B=>Bs(y,{description:B.target.value})}),g.kind!=="collection"&&!g.url.trim()&&s.jsx("p",{className:"text-xs text-warning",children:t("sandbox.campaigns.targetUrlRequired")})]})},y))}),ct=m&&s.jsx(Pn,{sandboxRef:m,storeUrl:n,onPick:g=>Bt(g)});let Fs;e[128]!==t?(Fs=t("sandbox.campaigns.addTarget"),e[128]=t,e[129]=Fs):Fs=e[129];const dt=s.jsx(Ns,{label:Fs,onClick:()=>Bt({})});let xs;e[130]!==ct||e[131]!==dt?(xs=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[ct,dt]}),e[130]=ct,e[131]=dt,e[132]=xs):xs=e[132],e[133]!==ds||e[134]!==ps||e[135]!==it||e[136]!==xs?(Q=s.jsxs("section",{className:"space-y-2",children:[ds,ps,it,xs]}),e[133]=ds,e[134]=ps,e[135]=it,e[136]=xs,e[137]=Q):Q=e[137],Y="space-y-2";let gs;e[138]!==t?(gs=t("sandbox.campaigns.productsLabel"),e[138]=t,e[139]=gs):gs=e[139],e[140]!==gs?(V=s.jsx(H,{children:gs}),e[140]=gs,e[141]=V):V=e[141];let us;e[142]!==t?(us=t("sandbox.campaigns.productsHint"),e[142]=t,e[143]=us):us=e[143],e[144]!==us?(ae=s.jsx("p",{className:"text-xs text-muted-foreground",children:us}),e[144]=us,e[145]=ae):ae=e[145],ee=z.length>0&&s.jsx(bt,{children:z.map((g,y)=>s.jsx(ht,{open:k===y,onToggle:()=>w(k===y?null:y),title:g.name,untitledLabel:t("sandbox.campaigns.untitledProduct"),removeLabel:t("sandbox.campaigns.removeProduct"),onRemove:()=>pa(y),leading:g.images[0]?s.jsx("img",{src:g.images[0],alt:"",className:"size-6 shrink-0 rounded border object-cover"}):s.jsx("div",{className:"size-6 shrink-0 rounded border bg-muted"}),children:s.jsxs("div",{className:"space-y-2 border-t px-3 py-3",children:[s.jsx(q,{value:g.name,placeholder:t("sandbox.campaigns.productNamePlaceholder"),onChange:B=>ze(y,{name:B.target.value}),className:"h-9"}),s.jsx(q,{value:g.url,placeholder:t("sandbox.campaigns.productUrlPlaceholder"),onChange:B=>ze(y,{url:B.target.value}),className:"h-9"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(q,{value:g.id,placeholder:t("sandbox.campaigns.productIdPlaceholder"),onChange:B=>ze(y,{id:B.target.value}),className:"h-9"}),s.jsx(q,{value:g.category,placeholder:t("sandbox.campaigns.productCategoryPlaceholder"),onChange:B=>ze(y,{category:B.target.value}),className:"h-9"})]}),s.jsx(hs,{value:g.description,rows:2,placeholder:t("sandbox.campaigns.productDescriptionPlaceholder"),onChange:B=>ze(y,{description:B.target.value})}),s.jsx(Sn,{images:g.images,idPrefix:`${a}-product-${y}`,sandbox:m,onChange:B=>ze(y,{images:B})})]})},`${g.id}-${y}`))}),e[6]=a,e[7]=F,e[8]=l,e[9]=r,e[10]=k,e[11]=C,e[12]=m,e[13]=I,e[14]=n,e[15]=O,e[16]=t,e[17]=S,e[18]=v,e[19]=G,e[20]=z,e[21]=X,e[22]=te,e[23]=Q,e[24]=Y,e[25]=V,e[26]=ae,e[27]=ee,e[28]=ne,e[29]=K,e[30]=U,e[31]=o}else S=e[17],v=e[18],G=e[19],z=e[20],X=e[21],te=e[22],Q=e[23],Y=e[24],V=e[25],ae=e[26],ee=e[27],ne=e[28],K=e[29],U=e[30],o=e[31];let N;e[146]!==m||e[147]!==t?(N=m&&s.jsxs(Z,{type:"button",variant:"outline",size:"sm",onClick:()=>f(!0),children:[s.jsx(qt,{size:14}),t("sandbox.campaigns.pickProducts")]}),e[146]=m,e[147]=t,e[148]=N):N=e[148];let A;e[149]!==t?(A=t("sandbox.campaigns.addProduct"),e[149]=t,e[150]=A):A=e[150];let E;e[151]!==S?(E=()=>S(),e[151]=S,e[152]=E):E=e[152];let D;e[153]!==A||e[154]!==E?(D=s.jsx(Ns,{label:A,onClick:E}),e[153]=A,e[154]=E,e[155]=D):D=e[155];let ke;e[156]!==N||e[157]!==D?(ke=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[N,D]}),e[156]=N,e[157]=D,e[158]=ke):ke=e[158];let me;e[159]!==j||e[160]!==z||e[161]!==m||e[162]!==o?(me=m&&s.jsx(cn,{open:j,onOpenChange:f,sandboxRef:m,selectedIds:z.map(Bn).filter(Boolean),onChange:wn,onPicked:o}),e[159]=j,e[160]=z,e[161]=m,e[162]=o,e[163]=me):me=e[163];let we;e[164]!==ke||e[165]!==me||e[166]!==Y||e[167]!==V||e[168]!==ae||e[169]!==ee?(we=s.jsxs("section",{className:Y,children:[V,ae,ee,ke,me]}),e[164]=ke,e[165]=me,e[166]=Y,e[167]=V,e[168]=ae,e[169]=ee,e[170]=we):we=e[170];let pe;e[171]!==t?(pe=t("sandbox.campaigns.keywordsLabel"),e[171]=t,e[172]=pe):pe=e[172];let he;e[173]!==pe?(he=s.jsx(H,{children:pe}),e[173]=pe,e[174]=he):he=e[174];let fe;e[175]!==t?(fe=t("sandbox.campaigns.keywordsHint"),e[175]=t,e[176]=fe):fe=e[176];let J;e[177]!==fe?(J=s.jsx("p",{className:"text-xs text-muted-foreground",children:fe}),e[177]=fe,e[178]=J):J=e[178];const qs=v.intent.keywords;let je;e[179]!==v.intent||e[180]!==G?(je=ue=>G({intent:{...v.intent,keywords:ue}}),e[179]=v.intent,e[180]=G,e[181]=je):je=e[181];let ve;e[182]!==t?(ve=t("sandbox.campaigns.keywordsPlaceholder"),e[182]=t,e[183]=ve):ve=e[183];let Be;e[184]!==t?(Be=t("sandbox.campaigns.removeKeyword"),e[184]=t,e[185]=Be):Be=e[185];let ye;e[186]!==v.intent.keywords||e[187]!==je||e[188]!==ve||e[189]!==Be?(ye=s.jsx(kt,{terms:qs,onChange:je,placeholder:ve,removeLabel:Be}),e[186]=v.intent.keywords,e[187]=je,e[188]=ve,e[189]=Be,e[190]=ye):ye=e[190];let oe;e[191]!==he||e[192]!==J||e[193]!==ye?(oe=s.jsxs("section",{className:"space-y-2",children:[he,J,ye]}),e[191]=he,e[192]=J,e[193]=ye,e[194]=oe):oe=e[194];let Se;e[195]!==t?(Se=t("sandbox.campaigns.avoidLabel"),e[195]=t,e[196]=Se):Se=e[196];let b;e[197]!==Se?(b=s.jsx(H,{children:Se}),e[197]=Se,e[198]=b):b=e[198];let R;e[199]!==t?(R=t("sandbox.campaigns.avoidHint"),e[199]=t,e[200]=R):R=e[200];let _;e[201]!==R?(_=s.jsx("p",{className:"text-xs text-muted-foreground",children:R}),e[201]=R,e[202]=_):_=e[202];let M;e[203]!==v.guardrails.avoidComplements?(M=Ks(v.guardrails.avoidComplements),e[203]=v.guardrails.avoidComplements,e[204]=M):M=e[204];let $;e[205]!==v.guardrails||e[206]!==G?($=ue=>G({guardrails:{...v.guardrails,avoidComplements:ue}}),e[205]=v.guardrails,e[206]=G,e[207]=$):$=e[207];const xe=`campaign-avoid-${a}`;let ie;e[208]!==t?(ie=t("sandbox.campaigns.addAvoid"),e[208]=t,e[209]=ie):ie=e[209];let ce;e[210]!==t?(ce=t("sandbox.campaigns.avoidNamePlaceholder"),e[210]=t,e[211]=ce):ce=e[211];let Ne;e[212]!==t?(Ne=t("sandbox.campaigns.avoidBodyPlaceholder"),e[212]=t,e[213]=Ne):Ne=e[213];let Ce;e[214]!==M||e[215]!==$||e[216]!==xe||e[217]!==ie||e[218]!==ce||e[219]!==Ne?(Ce=s.jsx(ft,{rules:M,onChange:$,revision:0,idPrefix:xe,add:ie,namePlaceholder:ce,bodyPlaceholder:Ne}),e[214]=M,e[215]=$,e[216]=xe,e[217]=ie,e[218]=ce,e[219]=Ne,e[220]=Ce):Ce=e[220];let ge;e[221]!==b||e[222]!==_||e[223]!==Ce?(ge=s.jsxs("section",{className:"space-y-2",children:[b,_,Ce]}),e[221]=b,e[222]=_,e[223]=Ce,e[224]=ge):ge=e[224];let re;e[225]!==t?(re=t("sandbox.campaigns.toneLabel"),e[225]=t,e[226]=re):re=e[226];let Te;e[227]!==re?(Te=s.jsx(H,{htmlFor:"campaign-tone",children:re}),e[227]=re,e[228]=Te):Te=e[228];let De;e[229]!==t?(De=t("sandbox.campaigns.toneHint"),e[229]=t,e[230]=De):De=e[230];let Le;e[231]!==De?(Le=s.jsx("p",{className:"text-xs text-muted-foreground",children:De}),e[231]=De,e[232]=Le):Le=e[232];const ca=v.guardrails.toneOverrides;let Ae;e[233]!==t?(Ae=t("sandbox.campaigns.tonePlaceholder"),e[233]=t,e[234]=Ae):Ae=e[234];let Re;e[235]!==v.guardrails||e[236]!==G?(Re=ue=>G({guardrails:{...v.guardrails,toneOverrides:ue.target.value}}),e[235]=v.guardrails,e[236]=G,e[237]=Re):Re=e[237];let Ge;e[238]!==v.guardrails.toneOverrides||e[239]!==Ae||e[240]!==Re?(Ge=s.jsx(hs,{id:"campaign-tone",value:ca,rows:3,placeholder:Ae,onChange:Re}),e[238]=v.guardrails.toneOverrides,e[239]=Ae,e[240]=Re,e[241]=Ge):Ge=e[241];let Oe;e[242]!==Te||e[243]!==Le||e[244]!==Ge?(Oe=s.jsxs("section",{className:"space-y-2",children:[Te,Le,Ge]}),e[242]=Te,e[243]=Le,e[244]=Ge,e[245]=Oe):Oe=e[245];let Cs;e[246]===Symbol.for("react.memo_cache_sentinel")?(Cs=s.jsx(oa,{size:14}),e[246]=Cs):Cs=e[246];let Fe;e[247]!==t?(Fe=t("sandbox.campaigns.remove"),e[247]=t,e[248]=Fe):Fe=e[248];let Ie;e[249]!==c||e[250]!==Fe?(Ie=s.jsx("div",{className:"border-t pt-4",children:s.jsxs(Z,{type:"button",variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive",onClick:c,children:[Cs,Fe]})}),e[249]=c,e[250]=Fe,e[251]=Ie):Ie=e[251];let ks;return e[252]!==X||e[253]!==te||e[254]!==Q||e[255]!==we||e[256]!==oe||e[257]!==ge||e[258]!==Oe||e[259]!==Ie||e[260]!==ne||e[261]!==K||e[262]!==U?(ks=s.jsxs("div",{className:ne,children:[K,U,X,te,Q,we,oe,ge,Oe,Ie]}),e[252]=X,e[253]=te,e[254]=Q,e[255]=we,e[256]=oe,e[257]=ge,e[258]=Oe,e[259]=Ie,e[260]=ne,e[261]=K,e[262]=U,e[263]=ks):ks=e[263],ks}function wn(){}function Bn(u){return u.id}function Sn(u){const e=W.c(13),{images:a,idPrefix:i,sandbox:r,onChange:c}=u,l=be();let p;e[0]!==i||e[1]!==a||e[2]!==c||e[3]!==r||e[4]!==l?(p=a.map((m,n)=>s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx("div",{className:"min-w-0 flex-1",children:s.jsx(en,{schema:{type:"string",format:"image-uri",title:l("sandbox.campaigns.productImageLabel")},value:m,onChange:t=>c(a.map((j,f)=>f===n?String(t??""):j)),path:`${i}-image-${n}`,label:"",sandbox:r,compact:!0})}),s.jsx(Js,{label:l("sandbox.campaigns.removeImage"),onClick:()=>c(a.filter((t,j)=>j!==n))})]},n)),e[0]=i,e[1]=a,e[2]=c,e[3]=r,e[4]=l,e[5]=p):p=e[5];let d;e[6]!==a||e[7]!==c||e[8]!==l?(d=a.length<ea&&s.jsx(Ns,{label:l("sandbox.campaigns.addImage"),onClick:()=>c([...a,""])}),e[6]=a,e[7]=c,e[8]=l,e[9]=d):d=e[9];let x;return e[10]!==p||e[11]!==d?(x=s.jsxs("div",{className:"space-y-2",children:[p,d]}),e[10]=p,e[11]=d,e[12]=x):x=e[12],x}function Pn(u){const e=W.c(16),{sandboxRef:a,storeUrl:i,onPick:r}=u,c=be(),[l,p]=T.useState(!1);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(qt,{size:14}),e[0]=d):d=e[0];let x;e[1]!==c?(x=c("sandbox.campaigns.pickCategory"),e[1]=c,e[2]=x):x=e[2];let m;e[3]!==x?(m=s.jsx(vt,{asChild:!0,children:s.jsxs(Z,{type:"button",variant:"outline",size:"default",children:[d,x]})}),e[3]=x,e[4]=m):m=e[4];let n;e[5]!==r||e[6]!==i?(n=f=>{r({id:f.path,name:f.label,url:la(f.url,i)}),p(!1)},e[5]=r,e[6]=i,e[7]=n):n=e[7];let t;e[8]!==l||e[9]!==a||e[10]!==n?(t=s.jsx(yt,{align:"end",className:"w-80",children:s.jsx(dn,{sandboxRef:a,enabled:l,className:"h-56",onSelect:n})}),e[8]=l,e[9]=a,e[10]=n,e[11]=t):t=e[11];let j;return e[12]!==l||e[13]!==m||e[14]!==t?(j=s.jsxs(Nt,{open:l,onOpenChange:p,children:[m,t]}),e[12]=l,e[13]=m,e[14]=t,e[15]=j):j=e[15],j}function zt(u){const e=W.c(15),{label:a,options:i}=u;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ta,{size:14}),e[0]=r):r=e[0];let c;e[1]!==a?(c=s.jsx(ja,{asChild:!0,children:s.jsx(Z,{type:"button",variant:"ghost",size:"icon",className:"size-5 text-muted-foreground","aria-label":a,children:r})}),e[1]=a,e[2]=c):c=e[2];let l;e[3]!==a?(l=s.jsx(jt,{children:s.jsx(Ys,{children:a})}),e[3]=a,e[4]=l):l=e[4];let p;e[5]!==i?(p=i.map(En),e[5]=i,e[6]=p):p=e[6];let d;e[7]!==p?(d=s.jsx("dl",{className:"max-h-[70svh] space-y-5 overflow-y-auto pr-1",children:p}),e[7]=p,e[8]=d):d=e[8];let x;e[9]!==l||e[10]!==d?(x=s.jsxs(Ws,{className:"sm:max-w-lg",children:[l,d]}),e[9]=l,e[10]=d,e[11]=x):x=e[11];let m;return e[12]!==c||e[13]!==x?(m=s.jsxs(Xs,{children:[c,x]}),e[12]=c,e[13]=x,e[14]=m):m=e[14],m}function En(u){return s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("dt",{className:"text-sm font-medium",children:u.name}),s.jsxs("dd",{className:"space-y-1.5 text-sm text-muted-foreground",children:[s.jsx("p",{children:u.help}),u.facets&&s.jsx("ul",{className:"space-y-0.5",children:u.facets.map(Tn)}),u.note&&s.jsx("p",{className:"italic",children:u.note})]})]},u.name)}function Tn(u){return s.jsxs("li",{children:[s.jsxs("span",{className:"text-foreground",children:[u.label,":"]})," ",u.value]},u.label)}function Dn(u){const e=W.c(30),{period:a,onChange:i}=u,r=be();let c;e[0]!==a.start?(c=It(a.start),e[0]=a.start,e[1]=c):c=e[1];const l=c;let p;e[2]!==a.end?(p=It(a.end),e[2]=a.end,e[3]=p):p=e[3];const d=p;let x;e[4]!==a.end||e[5]!==a.start||e[6]!==r?(x=a.start||a.end?`${a.start??"—"} / ${a.end??"—"}`:r("sandbox.campaigns.periodEmpty"),e[4]=a.end,e[5]=a.start,e[6]=r,e[7]=x):x=e[7];const m=x;let n;e[8]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Ea,{size:14}),e[8]=n):n=e[8];let t;e[9]!==m?(t=s.jsx(vt,{asChild:!0,children:s.jsxs(Z,{type:"button",variant:"outline",size:"sm",className:"h-9",children:[n,s.jsx("span",{className:"tabular-nums",children:m})]})}),e[9]=m,e[10]=t):t=e[10];let j;e[11]!==l||e[12]!==d?(j=l||d?{from:l,to:d}:void 0,e[11]=l,e[12]=d,e[13]=j):j=e[13];let f;e[14]!==i?(f=P=>i({start:P?.from?Ft(P.from):null,end:P?.to?Ft(P.to):null}),e[14]=i,e[15]=f):f=e[15];let C;e[16]!==j||e[17]!==f?(C=s.jsx(yt,{align:"start",className:"w-auto p-0",children:s.jsx(rn,{mode:"range",selected:j,onSelect:f})}),e[16]=j,e[17]=f,e[18]=C):C=e[18];let h;e[19]!==t||e[20]!==C?(h=s.jsxs(Nt,{children:[t,C]}),e[19]=t,e[20]=C,e[21]=h):h=e[21];let k;e[22]!==i||e[23]!==a.end||e[24]!==a.start||e[25]!==r?(k=(a.start||a.end)&&s.jsx(Js,{label:r("sandbox.campaigns.periodClear"),onClick:()=>i({start:null,end:null})}),e[22]=i,e[23]=a.end,e[24]=a.start,e[25]=r,e[26]=k):k=e[26];let w;return e[27]!==k||e[28]!==h?(w=s.jsxs("div",{className:"flex items-center gap-1",children:[h,k]}),e[27]=k,e[28]=h,e[29]=w):w=e[29],w}const ra="application/x-campaign-key",ys={draft:"sandbox.campaigns.statusDraft",active:"sandbox.campaigns.statusActive",paused:"sandbox.campaigns.statusPaused",finished:"sandbox.campaigns.statusFinished"},Ln={draft:"outline",active:"success",paused:"warning",finished:"secondary"},fs={launch:"sandbox.campaigns.triggerLaunch",seasonal:"sandbox.campaigns.triggerSeasonal",trend:"sandbox.campaigns.triggerTrend",seo_gap:"sandbox.campaigns.triggerSeoGap",inventory:"sandbox.campaigns.triggerInventory",partnership:"sandbox.campaigns.triggerPartnership",reputation:"sandbox.campaigns.triggerReputation"};function An(u){const{start:e,end:a}=u.period;return!e&&!a?null:`${e??"—"} / ${a??"—"}`}function Rn({orgSlug:u,virtualMcpId:e,branch:a,decofile:i}){const r=be(),c=ta({orgSlug:u,virtualMcpId:e,branch:a},{holdsCopy:!0}),l=Yt(Jt({orgSlug:u,virtualMcpId:e,branch:a})),p=ln({orgSlug:u,virtualMcpId:e,branch:a}),d={orgSlug:u,virtualMcpId:e,branch:a,threadId:null},x=sa().length>0,[m,n]=T.useState(!1),[t,j]=T.useState("board"),[f,C]=T.useState(null),[h,k]=T.useState(""),[w,P]=T.useState(null),[L,F]=T.useState({}),[I,O]=T.useState(new Set),S=Ct(i),v=se(Zt(i).merged.storeUrl),G=(o,N)=>L[o]??N,z=(o,N)=>F(A=>({...A,[o]:N})),X=()=>{const o=Tt();c.mutate({blockKey:o,data:Us(o,Dt(new Date))}),C(o)},te=async(o,N)=>{const A=S.find(E=>E.key===o);if(!(!A||A.status===N||I.has(o))){O(E=>new Set(E).add(o));try{await c.mutateAsync({blockKey:o,data:Us(o,{...A,status:N,updatedAt:new Date().toISOString()})})}catch(E){de.error(E instanceof Error?E.message:r("sandbox.campaigns.moveFailed"))}finally{O(E=>{const D=new Set(E);return D.delete(o),D})}}},Q=async(o,N)=>{const A=new Date().toISOString();await c.mutateAsync({blockKey:o.key,data:$a(o.key,{...o.entry,updatedAt:A})});for(const E of N){const D=Tt();await c.mutateAsync({blockKey:D,data:Us(D,{...Dt(new Date),name:E.name,seedKey:o.key,period:E.period,trigger:E.trigger,intent:E.intent,guardrails:E.guardrails})})}},[Y,V]=T.useState(null),ae=o=>{p.mutate({blockKey:o}),C(N=>N===o?null:N)},ee=h.trim().toLowerCase(),ne=ee?S.filter(o=>`${o.name} ${o.trigger.note}`.toLowerCase().includes(ee)):S,K=f&&i[f]!==void 0?f:null,U=f&&S.some(o=>o.key===f)?f:ne[0]?.key??null;return s.jsxs("div",{className:"flex h-full min-w-0 flex-col",children:[s.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-3 px-8 pb-3 pt-4",children:[s.jsxs("div",{className:"flex items-center gap-0.5 rounded-lg border p-0.5",children:[s.jsx(Ht,{active:t==="board",onClick:()=>j("board"),icon:s.jsx(Da,{size:14}),label:r("sandbox.campaigns.viewBoard")}),s.jsx(Ht,{active:t==="list",onClick:()=>j("list"),icon:s.jsx(nn,{size:14}),label:r("sandbox.campaigns.viewList")})]}),s.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[s.jsxs(Z,{type:"button",size:"sm",variant:"outline",disabled:!x,onClick:()=>n(!0),children:[s.jsx(vs,{size:14}),r("sandbox.campaignGen.open")]}),s.jsxs(Z,{type:"button",size:"sm",onClick:X,children:[s.jsx(on,{size:14}),r("sandbox.campaigns.add")]}),s.jsx(aa,{isPending:c.isPending||p.isPending,isError:c.isError||p.isError})]})]}),t==="board"?s.jsx("div",{className:"flex min-h-0 flex-1 gap-3 overflow-x-auto px-8 pb-6",children:ut.map(o=>{const N=r(ys[o]),A=S.filter(D=>D.status===o),E=G(o,A.length===0);return s.jsx(T.Fragment,{children:s.jsx("div",{onDragOver:D=>{D.preventDefault(),P(o)},onDragLeave:()=>P(D=>D===o?null:D),onDrop:D=>{D.preventDefault(),P(null),te(D.dataTransfer.getData(ra),o)},className:le("flex shrink-0 flex-col rounded-xl border bg-muted/30 transition-colors",E?"w-11":"w-72",w===o&&"border-primary bg-primary/5"),children:E?s.jsxs("button",{type:"button",onClick:()=>z(o,!1),"aria-label":r("sandbox.campaigns.expandLane",{lane:N}),"aria-expanded":!1,className:"flex min-h-0 flex-1 cursor-pointer flex-col items-center gap-2 py-2.5 text-muted-foreground hover:text-foreground",children:[s.jsx(Vt,{size:14,className:"shrink-0"}),s.jsx("span",{className:"text-xs tabular-nums",children:A.length}),s.jsx("span",{className:"[writing-mode:vertical-rl] text-sm font-medium",children:N})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center justify-between gap-2 px-3 py-2.5 text-sm font-medium",children:[s.jsxs("button",{type:"button",onClick:()=>z(o,!0),"aria-label":r("sandbox.campaigns.collapseLane",{lane:N}),"aria-expanded":!0,className:"flex min-w-0 cursor-pointer items-center gap-1.5 text-left hover:text-muted-foreground",children:[s.jsx(na,{size:14,className:"shrink-0"}),s.jsx("span",{className:"truncate",children:N})]}),s.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:A.length})]}),s.jsx("div",{className:"min-h-0 flex-1 space-y-2 overflow-y-auto px-2 pb-2",children:A.length===0?s.jsx("p",{className:"px-1 py-6 text-center text-xs text-muted-foreground",children:r("sandbox.campaigns.laneEmpty")}):A.map(D=>s.jsx(Gn,{campaign:D,moving:I.has(D.key),onOpen:()=>C(D.key),onDelete:()=>V(D)},D.key))})]})})},o)})}):s.jsxs("div",{className:"flex min-h-0 flex-1 border-t",children:[s.jsxs("div",{className:"flex w-80 shrink-0 flex-col border-r",children:[s.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2",children:[s.jsx(La,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx(q,{value:h,onChange:o=>k(o.target.value),placeholder:r("sandbox.campaigns.searchPlaceholder"),className:"h-8 border-0 shadow-none focus-visible:ring-0"})]}),s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:ne.length===0?s.jsx("p",{className:"px-4 py-6 text-center text-xs text-muted-foreground",children:S.length===0?r("sandbox.campaigns.empty"):r("sandbox.campaigns.noMatches")}):s.jsx("ul",{className:"divide-y",children:ne.map(o=>s.jsxs("li",{className:"group/row relative",children:[s.jsx(ia,{label:r("sandbox.campaigns.remove"),onDelete:()=>V(o)}),s.jsxs("button",{type:"button",onClick:()=>C(o.key),"aria-current":o.key===U,className:le("w-full cursor-pointer px-4 py-3 text-left transition-colors hover:bg-accent",o.key===U&&"bg-muted hover:bg-secondary-hover"),children:[s.jsx("p",{className:"truncate pr-6 text-sm font-medium",children:o.name||r("sandbox.campaigns.untitled")}),s.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:[s.jsx(js,{variant:Ln[o.status],children:r(ys[o.status])}),s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:r(fs[o.trigger.type])})]})]})]},o.key))})})]}),s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:U?s.jsx($t,{blockKey:U,block:i[U],onSave:(o,N)=>c.mutate({blockKey:U,data:o,edit:N}),onSeed:()=>c.hold(U),onEdit:()=>c.edited(U),onRemove:()=>{const o=S.find(N=>N.key===U);o&&V(o)},isSaving:c.isPending,sandboxRef:d,storeUrl:v},`${U}:${l(U)}`):s.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:r("sandbox.campaigns.selectPrompt")})})]}),s.jsx(va,{open:!!Y,onOpenChange:o=>{o||V(null)},children:s.jsxs(ya,{children:[s.jsxs(Na,{children:[s.jsx(Ca,{children:r("sandbox.campaigns.deleteTitle")}),s.jsx(ka,{children:r("sandbox.campaigns.deleteDescription",{name:Y?.name||r("sandbox.campaigns.untitled")})})]}),s.jsxs(wa,{children:[s.jsx(Ba,{children:r("sandbox.campaigns.deleteCancel")}),s.jsx(Sa,{variant:"destructive",onClick:()=>{Y&&ae(Y.key),V(null)},children:r("sandbox.campaigns.deleteConfirm")})]})]})}),s.jsx(fn,{open:m,onOpenChange:n,decofile:i,virtualMcpId:e,hasAi:x,onCreate:Q}),s.jsx(Xs,{open:t==="board"&&!!K,onOpenChange:o=>{o||C(null)},children:s.jsxs(Ws,{closeButtonClassName:"hidden",className:"left-auto right-4 top-4 bottom-4 flex h-auto translate-x-0 translate-y-0 flex-col gap-0 overflow-y-auto p-0 sm:max-w-2xl",children:[s.jsx(Ys,{className:"sr-only",children:r("sandbox.blogContext.tabCampaigns")}),K&&s.jsx($t,{blockKey:K,block:i[K],onSave:(o,N)=>c.mutate({blockKey:K,data:o,edit:N}),onSeed:()=>c.hold(K),onEdit:()=>c.edited(K),onRemove:()=>{const o=S.find(N=>N.key===K);o&&V(o)},onClose:()=>C(null),isSaving:c.isPending,sandboxRef:d,storeUrl:v},`${K}:${l(K)}`)]})})]})}function Gn(u){const e=W.c(40),{campaign:a,moving:i,onOpen:r,onDelete:c}=u,l=be();let p;e[0]!==a?(p=An(a),e[0]=a,e[1]=p):p=e[1];const d=p,x=i&&"opacity-80";let m;e[2]!==x?(m=le("group/card relative rounded-lg bg-card shadow-edge transition-shadow hover:shadow-lift",x),e[2]=x,e[3]=m):m=e[3];let n;e[4]!==l?(n=l("sandbox.campaigns.remove"),e[4]=l,e[5]=n):n=e[5];let t;e[6]!==i||e[7]!==c||e[8]!==n?(t=s.jsx(ia,{label:n,disabled:i,onDelete:c}),e[6]=i,e[7]=c,e[8]=n,e[9]=t):t=e[9];const j=!i;let f;e[10]!==a.key?(f=G=>G.dataTransfer.setData(ra,a.key),e[10]=a.key,e[11]=f):f=e[11];const C=i?"cursor-wait":"cursor-grab active:cursor-grabbing";let h;e[12]!==C?(h=le("block w-full p-3 text-left",C),e[12]=C,e[13]=h):h=e[13];let k;e[14]!==a.name||e[15]!==l?(k=a.name||l("sandbox.campaigns.untitled"),e[14]=a.name,e[15]=l,e[16]=k):k=e[16];let w;e[17]!==k?(w=s.jsx("p",{className:"line-clamp-2 pr-6 text-sm font-medium",children:k}),e[17]=k,e[18]=w):w=e[18];const P=fs[a.trigger.type];let L;e[19]!==l||e[20]!==P?(L=l(P),e[19]=l,e[20]=P,e[21]=L):L=e[21];let F;e[22]!==L?(F=s.jsx(js,{variant:"secondary",className:"max-w-full truncate",children:L}),e[22]=L,e[23]=F):F=e[23];let I;e[24]!==d?(I=d&&s.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:d}),e[24]=d,e[25]=I):I=e[25];let O;e[26]!==F||e[27]!==I?(O=s.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[F,I]}),e[26]=F,e[27]=I,e[28]=O):O=e[28];let S;e[29]!==r||e[30]!==w||e[31]!==O||e[32]!==j||e[33]!==f||e[34]!==h?(S=s.jsxs("button",{type:"button",draggable:j,onDragStart:f,onClick:r,className:h,children:[w,O]}),e[29]=r,e[30]=w,e[31]=O,e[32]=j,e[33]=f,e[34]=h,e[35]=S):S=e[35];let v;return e[36]!==S||e[37]!==m||e[38]!==t?(v=s.jsxs("div",{className:m,children:[t,S]}),e[36]=S,e[37]=m,e[38]=t,e[39]=v):v=e[39],v}function ia(u){const e=W.c(7),{label:a,onDelete:i,disabled:r}=u;let c;e[0]!==i?(c=d=>{d.stopPropagation(),i()},e[0]=i,e[1]=c):c=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(oa,{className:"size-3.25"}),e[2]=l):l=e[2];let p;return e[3]!==r||e[4]!==a||e[5]!==c?(p=s.jsx(Z,{variant:"ghost-destructive",size:"icon-xs",type:"button",disabled:r,"aria-label":a,title:a,onClick:c,className:"absolute right-2 top-2 z-10 opacity-0 transition-opacity disabled:pointer-events-auto focus-visible:opacity-100 group-hover/card:opacity-100 group-hover/row:opacity-100",children:l}),e[3]=r,e[4]=a,e[5]=c,e[6]=p):p=e[6],p}function Ht(u){const e=W.c(8),{active:a,onClick:i,icon:r,label:c}=u,l=a?"bg-accent text-accent-foreground":"text-muted-foreground hover:text-foreground";let p;e[0]!==l?(p=le("inline-flex cursor-pointer items-center gap-1.5 rounded-md px-2 py-1 text-xs transition-colors",l),e[0]=l,e[1]=p):p=e[1];let d;return e[2]!==a||e[3]!==r||e[4]!==c||e[5]!==i||e[6]!==p?(d=s.jsxs("button",{type:"button",onClick:i,"aria-pressed":a,className:p,children:[r,c]}),e[2]=a,e[3]=r,e[4]=c,e[5]=i,e[6]=p,e[7]=d):d=e[7],d}const On={},Fn=["description","targetAudience"],In=["values","competitors","commercialPolicies","specialDates"],$n=["keywords"],Kt=["dos","avoid","vocabulary"],zn=["voiceExamples"],Hn=[{id:"basics",label:"sandbox.blogBrand.tabBasics"},{id:"dos",label:"sandbox.blogBrand.tabDos"},{id:"guardrails",label:"sandbox.blogBrand.tabGuardrails"},{id:"extra",label:"sandbox.blogBrand.tabExtra"}],Ut="sandbox.blogBrand.phaseReading",Mt="sandbox.formats.phaseReading";function Kn(u,e){return{name:u("sandbox.formats.starterName"),value:e.length?u("sandbox.formats.starterBody",{sections:e.map(a=>`@${a}`).join(", ")}):u("sandbox.formats.starterBodyNoSections")}}function Pr(u){const e=W.c(9),[a,i]=T.useState("brand"),[r,c]=T.useState("basics");let l;e[0]!==u?(l=Jt(u),e[0]=u,e[1]=l):l=e[1];const p=Yt(l);let d;e[2]!==p?(d=[Ms,bs,Vs].map(p),e[2]=p,e[3]=d):d=e[3];const x=d.join(":");let m;return e[4]!==x||e[5]!==u||e[6]!==r||e[7]!==a?(m=s.jsx(Un,{...u,tab:a,setTab:i,section:r,setSection:c},x),e[4]=x,e[5]=u,e[6]=r,e[7]=a,e[8]=m):m=e[8],m}function Un({orgSlug:u,virtualMcpId:e,branch:a,decofile:i,meta:r,tab:c,setTab:l,section:p,setSection:d}){const x=Lt(i[Ms]),m=Lt(i[bs]),n=be(),t=Xt(),j=ta({orgSlug:u,virtualMcpId:e,branch:a},{holdsCopy:!0}),f=sa().length>0,C=za(),[h,k]=_s(x,b=>{j.mutate({blockKey:Ms,data:Xa(b,x,i[bs])})},{onSeed:()=>j.hold(Ms)}),[w,P]=_s(i[bs]?m:x,b=>{j.mutate({blockKey:bs,data:Wa(b,At)})},{onSeed:()=>j.hold(bs)}),L=(b,R)=>k({...h,[b]:R}),F=(b,R)=>P({...w,[b]:R}),I=i[Vs],[O,S]=_s(I??On,b=>j.mutate({blockKey:Vs,data:b}),{onSeed:()=>j.hold(Vs)}),v=Ks(O.formats),G=b=>S({...O,formats:b}),z=Ha(r,{hideDefaults:C}),X=Ka(r,{hideDefaults:C}),te=z.map(b=>b.resolveType),Q={items:z.map(b=>({...b,href:b.resolveType})),hint:n("sandbox.formats.mentionHint"),emptyLabel:n("sandbox.formats.mentionEmpty")},[Y,V]=T.useState(!1),[ae,ee]=T.useState(Mt),[ne,K]=T.useState(!1),[U,o]=T.useState(""),[N,A]=T.useState(3),[E,D]=T.useState(!1),[ke,me]=T.useState(!1),[we,pe]=T.useState(Ut),[he,fe]=T.useState(0),J=Ua(i,sn(i)),qs=[...Ma.map(b=>h[b]),...At.map(b=>w[b])].some(b=>typeof b=="string"?b.trim().length>0:Va(Ks(b)).length>0),je=async b=>{if(J.blocks.length!==0){D(!0),pe(Ut);try{const R=await t.call("BLOG_SITE_GROUND",{virtualMcpId:e,purpose:"brand",language:se(h.language)||void 0}).catch(re=>{console.warn("[blogBrand] grounding failed",re)}),_=R?{report:R.report,outcome:R.outcome}:void 0,M=await t.call("BLOG_BRAND_EXTRACT",{virtualMcpId:e,blocks:J.blocks,seo:J.seo,grounding:_});pe("sandbox.blogBrand.phaseResearching");const $=await t.call("BLOG_BRAND_ENRICH",{profile:M,blocks:J.blocks,seo:J.seo,grounding:_}).catch(re=>(console.warn("[blog] enriching the brand failed",re),{...M,specialDates:[],researchSources:[],searched:!1,discarded:0,judged:!1})),xe={companyName:$.companyName||se(h.companyName),language:$.language||se(h.language),description:$.description||se(h.description),targetAudience:$.targetAudience||se(h.targetAudience)},ie={...h},ce=Rt(ie,$,{mode:b,textFields:["companyName","language","storeUrl",...Fn],ruleFields:In,termFields:$n});k(ie),pe("sandbox.blogBrand.phaseInferring");const Ne=await t.call("BLOG_CONTEXT_EXTRACT",{brand:{...$,...xe},blocks:J.blocks,seo:J.seo}),Ce={...w};ce.push(...Rt(Ce,Ne,{mode:b,textFields:["tone"],ruleFields:Kt,exampleFields:zn})),P(Ce),fe(re=>re+1);const ge=$.discarded+Ne.discarded;de.success(ce.length>0?n(b==="replace"?"sandbox.blogBrand.extractReplaced":"sandbox.blogBrand.extractFilled",{count:String(ce.length)}):n(ge>0?"sandbox.blogBrand.extractAllDiscarded":"sandbox.blogBrand.extractNothingEmpty"),ge>0&&ce.length>0?{description:n("sandbox.blogBrand.extractDiscarded",{count:String(ge)})}:void 0),$.searched&&$.competitors.length===0&&de.info(n("sandbox.blogBrand.noCompetitorsFound"))}catch(R){de.error(R instanceof Error?R.message:n("sandbox.blogBrand.extractFailed"))}finally{D(!1)}}},ve=b=>{const R=new Set(v.map(M=>Gt(M.name))),_=b.filter(M=>M.name.trim()&&!R.has(Gt(M.name))).map(M=>({...M,value:Qa(M.value,X)}));return _.length===0?0:(G([...v,..._]),fe(M=>M+1),_.length)},Be=()=>{if(ve([Kn(n,Za(X))])===0){de.info(n("sandbox.formats.noNewFormats"));return}de.success(n("sandbox.formats.starterAdded"))},ye=async()=>{V(!0),ee(Mt);const b=setTimeout(()=>ee("sandbox.formats.phaseWriting"),6e3);try{const R=await t.call("BLOG_SITE_GROUND",{virtualMcpId:e,purpose:"format",language:se(h.language)||void 0}).catch($=>{console.warn("[blogFormats] grounding failed",$)}),_=await t.call("BLOG_FORMAT_SUGGEST",{grounding:R?{report:R.report,outcome:R.outcome}:void 0,virtualMcpId:e,brand:Qt({...h,...w}),sections:Object.keys(X).map($=>{const xe=z.find(ie=>ie.name===$);return{name:$,title:xe?.title??$,description:xe?.description}}),postStructures:Ya(i).map($=>({title:$.title,sections:$.sections})),guidance:U.trim()||void 0,count:N}),M=ve(_.formats);if(M===0){de.info(n("sandbox.formats.noNewFormats"));return}de.success(n("sandbox.formats.suggested",{count:String(M)}))}catch(R){de.error(R instanceof Error?R.message:n("sandbox.formats.suggestFailed"))}finally{clearTimeout(b),V(!1)}},oe=(b,R)=>{const _=Kt.includes(b),M=_?w:h,$=_?F:L;return s.jsx(ft,{rules:Ks(M[b]),onChange:xe=>$(b,xe),revision:he,idPrefix:b,...R})},Se=()=>{switch(p){case"basics":return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[s.jsx(xt,{id:"brand-company-name",label:n("sandbox.blogBrand.companyNameLabel"),value:se(h.companyName),onChange:b=>L("companyName",b)}),s.jsx(xt,{id:"brand-language",label:n("sandbox.blogBrand.languageLabel"),placeholder:"pt-BR",value:se(h.language),onChange:b=>L("language",b)})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(xt,{id:"brand-store-url",label:n("sandbox.blogBrand.storeUrlLabel"),placeholder:"https://loja.com.br",value:se(h.storeUrl),onChange:b=>L("storeUrl",b)}),se(h.storeUrl).trim()&&!Pa(se(h.storeUrl).trim())?s.jsx("p",{className:"text-xs text-warning",children:n("sandbox.blogBrand.storeUrlInvalid")}):s.jsx("p",{className:"text-xs text-muted-foreground",children:n("sandbox.blogBrand.storeUrlHint")})]}),s.jsx(gt,{id:"brand-description",label:n("sandbox.blogBrand.descriptionLabel"),value:se(h.description),onChange:b=>L("description",b)}),s.jsx(gt,{id:"brand-tone",label:n("sandbox.blogBrand.toneLabel"),hint:n("sandbox.blogBrand.toneHint"),value:se(w.tone),onChange:b=>F("tone",b),rows:5}),s.jsx(gt,{id:"brand-audience",label:n("sandbox.blogBrand.audienceLabel"),value:se(h.targetAudience),onChange:b=>L("targetAudience",b)}),s.jsxs("section",{className:"space-y-2",children:[s.jsx(H,{children:n("sandbox.blogBrand.voiceExamplesLabel")}),s.jsx("p",{className:"text-xs text-muted-foreground",children:n("sandbox.blogBrand.voiceExamplesHint")}),s.jsx(Mn,{examples:qa(w.voiceExamples),onChange:b=>F("voiceExamples",b)})]})]});case"dos":return s.jsxs("div",{className:"space-y-3",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:n("sandbox.blogBrand.dosHint")}),oe("dos",{add:n("sandbox.blogBrand.addDo"),namePlaceholder:n("sandbox.blogBrand.dosNamePlaceholder"),bodyPlaceholder:n("sandbox.blogBrand.dosBodyPlaceholder")}),s.jsxs("section",{className:"space-y-2 pt-4",children:[s.jsx(H,{children:n("sandbox.blogBrand.vocabularyLabel")}),s.jsx("p",{className:"text-xs text-muted-foreground",children:n("sandbox.blogBrand.vocabularyHint")}),oe("vocabulary",{add:n("sandbox.blogBrand.addVocabulary"),namePlaceholder:n("sandbox.blogBrand.vocabularyNamePlaceholder"),bodyPlaceholder:n("sandbox.blogBrand.vocabularyBodyPlaceholder")})]})]});case"guardrails":return s.jsxs("div",{className:"space-y-3",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:n("sandbox.blogBrand.dontsHint")}),oe("avoid",{add:n("sandbox.blogBrand.addDont"),namePlaceholder:n("sandbox.blogBrand.dontsNamePlaceholder"),bodyPlaceholder:n("sandbox.blogBrand.dontsBodyPlaceholder")})]});case"extra":return s.jsxs("div",{className:"space-y-8",children:[s.jsxs("section",{className:"space-y-2",children:[s.jsx(H,{children:n("sandbox.blogBrand.valuesLabel")}),oe("values",{add:n("sandbox.blogBrand.addValue"),namePlaceholder:n("sandbox.blogBrand.valuesNamePlaceholder"),bodyPlaceholder:n("sandbox.blogBrand.valuesBodyPlaceholder")})]}),s.jsxs("section",{className:"space-y-2",children:[s.jsx(H,{children:n("sandbox.blogBrand.competitorsLabel")}),s.jsx("p",{className:"text-xs text-muted-foreground",children:n("sandbox.blogBrand.competitorsHint")}),oe("competitors",{add:n("sandbox.blogBrand.addCompetitor"),namePlaceholder:n("sandbox.blogBrand.competitorsNamePlaceholder"),bodyPlaceholder:n("sandbox.blogBrand.competitorsBodyPlaceholder")})]}),s.jsxs("section",{className:"space-y-2",children:[s.jsx(H,{children:n("sandbox.blogBrand.keywordsLabel")}),s.jsx("p",{className:"text-xs text-muted-foreground",children:n("sandbox.blogBrand.keywordsHint")}),s.jsx(kt,{terms:Ja(h.keywords),onChange:b=>L("keywords",b),placeholder:n("sandbox.blogBrand.keywordsPlaceholder"),removeLabel:n("sandbox.blogBrand.removeKeyword")})]}),s.jsxs("section",{className:"space-y-2",children:[s.jsx(H,{children:n("sandbox.blogBrand.specialDatesLabel")}),s.jsx("p",{className:"text-xs text-muted-foreground",children:n("sandbox.blogBrand.specialDatesHint")}),oe("specialDates",{add:n("sandbox.blogBrand.addSpecialDate"),namePlaceholder:n("sandbox.blogBrand.specialDatesNamePlaceholder"),bodyPlaceholder:n("sandbox.blogBrand.specialDatesBodyPlaceholder")})]}),s.jsxs("section",{className:"space-y-2",children:[s.jsx(H,{children:n("sandbox.blogBrand.policiesLabel")}),s.jsx("p",{className:"text-xs text-muted-foreground",children:n("sandbox.blogBrand.policiesHint")}),oe("commercialPolicies",{add:n("sandbox.blogBrand.addPolicy"),namePlaceholder:n("sandbox.blogBrand.policiesNamePlaceholder"),bodyPlaceholder:n("sandbox.blogBrand.policiesBodyPlaceholder")})]})]})}};return s.jsxs("div",{className:"flex h-full min-w-0 flex-col",children:[s.jsxs("div",{className:"flex shrink-0 items-start justify-between gap-4 px-8 pt-6",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("h2",{className:"text-lg font-semibold",children:n("sandbox.blogContext.title")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:n("sandbox.blogContext.subtitle")})]}),s.jsx(aa,{isPending:j.isPending,isError:j.isError})]}),s.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-4 border-b px-8",children:[s.jsxs("div",{className:"flex gap-1",children:[s.jsx(Hs,{active:c==="brand",onClick:()=>l("brand"),children:n("sandbox.blogContext.tabBrand")}),s.jsx(Hs,{active:c==="formats",onClick:()=>l("formats"),children:n("sandbox.blogContext.tabFormats")}),s.jsx(Hs,{active:c==="campaigns",onClick:()=>l("campaigns"),children:n("sandbox.blogContext.tabCampaigns")}),s.jsxs(Hs,{active:!1,disabled:!0,onClick:()=>{},children:[n("sandbox.blogContext.tabAutomations"),s.jsx(js,{variant:"secondary",children:n("common.soon")})]})]}),c==="brand"&&s.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[E&&s.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground","aria-live":"polite",role:"status",children:[s.jsx(Pt,{size:12,className:"shrink-0 animate-spin"}),s.jsx("span",{className:"truncate",children:n(we)})]}),s.jsxs(Z,{type:"button",variant:"outline",size:"sm",className:"my-2 shrink-0",disabled:E||J.blocks.length===0||!f,title:f?J.blocks.length>0?n("sandbox.blogBrand.extractHint",{count:String(J.blocks.length)}):n("sandbox.blogBrand.extractNoContent"):n("sandbox.autonomous.noAiProvider"),onClick:()=>{qs?me(!0):je("empty")},children:[s.jsx(vs,{size:14}),n("sandbox.blogBrand.extractButton")]}),s.jsx(Xs,{open:ke,onOpenChange:me,children:s.jsxs(Ws,{className:"sm:max-w-md",children:[s.jsxs(jt,{children:[s.jsx(Ys,{children:n("sandbox.blogBrand.fillDialogTitle")}),s.jsx(Wt,{children:n("sandbox.blogBrand.fillDialogDescription")})]}),s.jsx("div",{className:"flex flex-col gap-2",children:[{mode:"empty",label:"sandbox.blogBrand.fillOnlyEmpty",hint:"sandbox.blogBrand.fillOnlyEmptyHint"},{mode:"replace",label:"sandbox.blogBrand.fillReplace",hint:"sandbox.blogBrand.fillReplaceHint"}].map(b=>s.jsxs("button",{type:"button",onClick:()=>{me(!1),je(b.mode)},className:"cursor-pointer rounded-lg border p-3 text-left transition-colors hover:bg-accent",children:[s.jsx("span",{className:"text-sm font-medium",children:n(b.label)}),s.jsx("span",{className:"mt-0.5 block text-xs text-muted-foreground",children:n(b.hint)})]},b.mode))})]})})]}),c==="formats"&&s.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[Y&&s.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground","aria-live":"polite",role:"status",children:[s.jsx(Pt,{size:12,className:"shrink-0 animate-spin"}),s.jsx("span",{className:"truncate",children:n(ae)})]}),s.jsx(Z,{type:"button",variant:"ghost",size:"sm",className:"my-2 shrink-0",title:n("sandbox.formats.starterHint"),onClick:Be,children:n("sandbox.formats.starterButton")}),s.jsxs(Nt,{open:ne,onOpenChange:K,children:[s.jsx(vt,{asChild:!0,children:s.jsxs(Z,{type:"button",variant:"outline",size:"sm",className:"my-2 shrink-0",disabled:Y||!f,title:n(f?"sandbox.formats.suggestHint":"sandbox.autonomous.noAiProvider"),children:[s.jsx(vs,{size:14}),n("sandbox.formats.suggestButton")]})}),s.jsxs(yt,{align:"end",className:"w-80 space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(H,{htmlFor:"format-guidance",children:n("sandbox.formats.guidanceLabel")}),s.jsx("p",{className:"text-xs text-muted-foreground",children:n("sandbox.formats.guidanceHint")})]}),s.jsx(q,{id:"format-guidance",value:U,onChange:b=>o(b.target.value),placeholder:n("sandbox.formats.guidancePlaceholder"),onKeyDown:b=>{b.key==="Enter"&&(b.preventDefault(),K(!1),ye())},className:"h-9"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(H,{htmlFor:"format-count",className:"text-xs",children:n("sandbox.formats.countLabel")}),s.jsx(q,{id:"format-count",type:"number",min:1,max:5,value:N,onChange:b=>A(Math.max(1,Math.min(5,Number(b.target.value)||1))),className:"h-9 w-16"}),s.jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:n("sandbox.postBoard.usesCredits")})]}),s.jsxs(Z,{type:"button",size:"sm",className:"w-full",onClick:()=>{K(!1),ye()},children:[s.jsx(vs,{size:14}),n("sandbox.formats.suggestButton")]})]})]})]})]}),s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:c==="campaigns"?s.jsx(Rn,{orgSlug:u,virtualMcpId:e,branch:a,decofile:i}):c==="formats"?s.jsxs("div",{className:"min-w-0 max-w-3xl space-y-3 px-8 py-6",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:n("sandbox.formats.hint")}),s.jsx(ft,{rules:v,onChange:G,revision:he,idPrefix:"format",add:n("sandbox.formats.add"),namePlaceholder:n("sandbox.formats.namePlaceholder"),bodyPlaceholder:n("sandbox.formats.bodyPlaceholder"),mentions:Q,citationWarning:b=>{const R=_a(b,te,X);return R.length===0?null:n("sandbox.formats.unknownCitations",{names:R.map(_=>`@${_}`).join(", ")})}})]}):s.jsxs("div",{className:"grid grid-cols-[240px_1fr] gap-8 px-8 py-6",children:[s.jsx("nav",{className:"sticky top-0 h-fit space-y-0.5 surface p-1.5",children:Hn.map(b=>s.jsx("button",{type:"button",onClick:()=>d(b.id),className:le("w-full rounded-lg px-2.5 py-2 text-left text-sm transition-colors cursor-pointer",p===b.id?"bg-muted font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:n(b.label)},b.id))}),s.jsx("div",{className:"min-w-0 max-w-3xl",children:Se()})]})})]})}function Hs(u){const e=W.c(10),{active:a,onClick:i,disabled:r,children:c}=u,l=r&&"cursor-not-allowed text-muted-foreground opacity-70",p=!r&&"cursor-pointer",d=a?"border-foreground font-medium text-foreground":"border-transparent text-muted-foreground",x=!r&&!a&&"hover:text-foreground";let m;e[0]!==l||e[1]!==p||e[2]!==d||e[3]!==x?(m=le("-mb-px flex items-center gap-1.5 border-b-2 px-3 py-3 text-sm transition-colors",l,p,d,x),e[0]=l,e[1]=p,e[2]=d,e[3]=x,e[4]=m):m=e[4];let n;return e[5]!==c||e[6]!==r||e[7]!==i||e[8]!==m?(n=s.jsx("button",{type:"button",onClick:i,disabled:r,className:m,children:c}),e[5]=c,e[6]=r,e[7]=i,e[8]=m,e[9]=n):n=e[9],n}function xt(u){const e=W.c(13),{id:a,label:i,value:r,onChange:c,placeholder:l}=u;let p;e[0]!==a||e[1]!==i?(p=s.jsx(H,{htmlFor:a,children:i}),e[0]=a,e[1]=i,e[2]=p):p=e[2];let d;e[3]!==c?(d=n=>c(n.target.value),e[3]=c,e[4]=d):d=e[4];let x;e[5]!==a||e[6]!==l||e[7]!==d||e[8]!==r?(x=s.jsx(q,{id:a,value:r,placeholder:l,onChange:d,className:"h-10"}),e[5]=a,e[6]=l,e[7]=d,e[8]=r,e[9]=x):x=e[9];let m;return e[10]!==p||e[11]!==x?(m=s.jsxs("div",{className:"space-y-2",children:[p,x]}),e[10]=p,e[11]=x,e[12]=m):m=e[12],m}function gt(u){const e=W.c(16),{id:a,label:i,hint:r,value:c,onChange:l,rows:p}=u,d=p===void 0?3:p;let x;e[0]!==a||e[1]!==i?(x=s.jsx(H,{htmlFor:a,children:i}),e[0]=a,e[1]=i,e[2]=x):x=e[2];let m;e[3]!==r?(m=r&&s.jsx("p",{className:"text-xs text-muted-foreground",children:r}),e[3]=r,e[4]=m):m=e[4];let n;e[5]!==l?(n=f=>l(f.target.value),e[5]=l,e[6]=n):n=e[6];let t;e[7]!==a||e[8]!==d||e[9]!==n||e[10]!==c?(t=s.jsx(hs,{id:a,value:c,rows:d,onChange:n}),e[7]=a,e[8]=d,e[9]=n,e[10]=c,e[11]=t):t=e[11];let j;return e[12]!==x||e[13]!==m||e[14]!==t?(j=s.jsxs("div",{className:"space-y-2",children:[x,m,t]}),e[12]=x,e[13]=m,e[14]=t,e[15]=j):j=e[15],j}function Mn(u){const e=W.c(19),{examples:a,onChange:i}=u,r=be();let c;e[0]!==a||e[1]!==i?(c=(t,j)=>i(a.map((f,C)=>C===t?{...f,...j}:f)),e[0]=a,e[1]=i,e[2]=c):c=e[2];const l=c;let p;e[3]!==a||e[4]!==i||e[5]!==l||e[6]!==r?(p=a.length>0&&s.jsx("ul",{className:"divide-y overflow-hidden rounded-lg border",children:a.map((t,j)=>s.jsxs("li",{className:"flex items-center gap-2 bg-card px-3 py-2",children:[s.jsx(q,{"aria-label":r("sandbox.blogBrand.voiceExamplesLabel"),placeholder:r("sandbox.blogBrand.voiceExamplesPlaceholder"),value:t.text,onChange:f=>l(j,{text:f.target.value}),className:"min-w-0 flex-1 border-0 shadow-none focus-visible:ring-0"}),s.jsxs("label",{className:"flex shrink-0 cursor-pointer items-center gap-2 text-xs text-muted-foreground",children:[s.jsx(Aa,{checked:t.sounds,onCheckedChange:f=>l(j,{sounds:f})}),s.jsx("span",{className:"whitespace-nowrap",children:r(t.sounds?"sandbox.blogBrand.voiceExamplesSounds":"sandbox.blogBrand.voiceExamplesDoesNotSound")})]}),s.jsx(Js,{label:r("sandbox.blogBrand.removeItem"),onClick:()=>i(a.filter((f,C)=>C!==j))})]},j))}),e[3]=a,e[4]=i,e[5]=l,e[6]=r,e[7]=p):p=e[7];let d;e[8]!==r?(d=r("sandbox.blogBrand.addVoiceExample"),e[8]=r,e[9]=d):d=e[9];let x;e[10]!==a||e[11]!==i?(x=()=>i([...a,{text:"",sounds:!0}]),e[10]=a,e[11]=i,e[12]=x):x=e[12];let m;e[13]!==d||e[14]!==x?(m=s.jsx(Ns,{label:d,onClick:x}),e[13]=d,e[14]=x,e[15]=m):m=e[15];let n;return e[16]!==p||e[17]!==m?(n=s.jsxs("div",{className:"space-y-2",children:[p,m]}),e[16]=p,e[17]=m,e[18]=n):n=e[18],n}export{Pr as BlogContext};
@@ -1 +0,0 @@
1
- import{W as U,c as L,b as J,a5 as Z,j as s,n as le,fd as oe,bx as ee,m as K,B as O,L as G,af as re,gN as ne,E as ce}from"./index-CcqLnTyv.js";import{C as ae}from"./index-8ANyj4B7.js";import{i as me}from"./LinkBroken01-C9GtmpYY.js";import{T as fe,_ as X}from"./agent-icon-DqjTL3cE.js";import{b as de}from"./Tool01-BTDYOKsB.js";import{s as pe}from"./Plus-D8rFucQH.js";import{t as ue}from"./Users01-DHfg9AEk.js";import{G as te}from"./github-icon-BBNizm_E.js";import{u as V}from"./use-connection-CECJF8rf.js";import{a as se}from"./use-project-scope-Cb4T7-Pe.js";import{g as ie}from"./repository-binding-CuR-5wbj.js";import{u as xe}from"./use-file-configs-D7-mFpqA.js";import{m as he}from"./match-site-slug-config-D3fUJ6vX.js";import{r as ge}from"./virtual-mcp-YmAa-VVd.js";import"./use-mobile-BgN1E82d.js";import"./use-sidebar-collapsed-B34u6RwD.js";import"./use-chat-layout-state-Be9vIJ9A.js";import"./thread-route-D5E5K-lU.js";import"./autosend-_WPHuuuS.js";import"./thread-intent-pegObLq9.js";import"./use-mcp-client-DvDomB9A.js";import"./auth-qAWEiaXq.js";import"./delay-CnY5UFtP.js";import"./watch-sse-pool-CYcZM1HP.js";import"./task-board-DcTNURQy.js";import"./schema-D4ZSsKIV.js";import"./tooltip-AKf-E49i.js";import"./index-D146teOp.js";import"./toolbar-icon-button-CTRAa2ng.js";import"./shell-layout-CBX9BtMX.js";import"./Globe04--FaZazgw.js";import"./UserSquare-BJHrMhrM.js";import"./use-deployment-admin-D9sSgOb1.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-BDiB_Nvo.js";import"./CheckCircle-B4NfGYxe.js";import"./Monitor01-Su614Ctg.js";import"./Zap-DpvU6Dp2.js";import"./command-CtR4gjCr.js";import"./index-DCh3kkGn.js";import"./SearchMd-2MPq0KPN.js";import"./integration-icon-ChQEBlMz.js";import"./project-icon-BlOLnUr2.js";import"./use-navigate-to-agent-DmfSMV3R.js";import"./use-debounced-value-CcMMD4Qy.js";import"./new-project-dialog-C_1Rs0SG.js";import"./ArrowLeft-B1m5qQi9.js";import"./label-CsfAEF08.js";import"./repository-picker-DEa_L5X-.js";import"./useInfiniteQuery-WRSkkanY.js";import"./infiniteQueryObserver-uDA4YvYL.js";import"./collection-search-iHJVqUHB.js";import"./ShoppingBag01-DDCYsqx9.js";import"./use-organization-settings-sxurgilE.js";import"./required-auth-layout-BnfTNype.js";import"./use-org-sso-CGB_T6WF.js";import"./sheet-B2jsXlHJ.js";import"./resizable-G0IV9sBv.js";import"./AlertCircle-kYtqXGU8.js";import"./ArrowUp-DcYpepHk.js";import"./ChevronUp-DRG0w_P4.js";import"./ChevronSelectorVertical-EqyUOMMk.js";import"./CreditCard01-BLl0RgXC.js";import"./SwitchHorizontal01-D7HAXgYP.js";import"./Key01-D0Pq98hT.js";import"./Minus-eGpg4-RN.js";import"./Sun-Dvv08Urq.js";import"./Play-D_ph4pZ0.js";import"./Trash01-CHCe7_6o.js";import"./Upload01-Q6ECKQXp.js";import"./url-slug-ihGFL5bo.js";function je(e){return[U.SELF(e),U.REGISTRY(e),U.COMMUNITY_REGISTRY(e),U.DEV_ASSETS(e)]}function be(e,t){const i=new Set(je(t));return e.some(o=>!i.has(o.id))}function ve(){const e=L.c(77),t=J(),{org:i}=Z(),o=V();let $;e[0]===Symbol.for("react.memo_cache_sentinel")?($={slug:"mcp-github"},e[0]=$):$=e[0];const u=V($),{projects:_}=se(),l=oe();let r;e[1]!==i.slug?(r={org:i.slug},e[1]=i.slug,e[2]=r):r=e[2];const n=r;let x;e[3]!==t?(x=t("discover.setup.connectTitle"),e[3]=t,e[4]=x):x=e[4];let S;e[5]!==t?(S=t("discover.setup.connectBody"),e[5]=t,e[6]=S):S=e[6];let c;e[7]!==o||e[8]!==i.id?(c=be(o,i.id),e[7]=o,e[8]=i.id,e[9]=c):c=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(fe,{size:18}),e[10]=h):h=e[10];let z;e[11]===Symbol.for("react.memo_cache_sentinel")?(z={tab:"all"},e[11]=z):z=e[11];let a;e[12]!==t?(a=t("discover.setup.connectAction"),e[12]=t,e[13]=a):a=e[13];let m;e[14]!==n||e[15]!==a?(m=s.jsx(O,{asChild:!0,variant:"outline",size:"sm",children:s.jsx(G,{to:"/$org/settings/connections",params:n,search:z,children:a})}),e[14]=n,e[15]=a,e[16]=m):m=e[16];let f;e[17]!==x||e[18]!==S||e[19]!==c||e[20]!==m?(f={key:"connect",title:x,body:S,done:c,icon:h,action:m},e[17]=x,e[18]=S,e[19]=c,e[20]=m,e[21]=f):f=e[21];let N;e[22]!==t?(N=t("discover.setup.githubTitle"),e[22]=t,e[23]=N):N=e[23];let g;e[24]!==t?(g=t("discover.setup.githubBody"),e[24]=t,e[25]=g):g=e[25];const C=u.length>0;let j;e[26]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(te,{className:"size-[18px]"}),e[26]=j):j=e[26];let b;e[27]===Symbol.for("react.memo_cache_sentinel")?(b={tab:"all"},e[27]=b):b=e[27];let v;e[28]!==t?(v=t("discover.setup.githubAction"),e[28]=t,e[29]=v):v=e[29];let d;e[30]!==n||e[31]!==v?(d=s.jsx(O,{asChild:!0,variant:"outline",size:"sm",children:s.jsx(G,{to:"/$org/settings/connections",params:n,search:b,children:v})}),e[30]=n,e[31]=v,e[32]=d):d=e[32];let y;e[33]!==N||e[34]!==g||e[35]!==C||e[36]!==d?(y={key:"github",title:N,body:g,done:C,icon:j,action:d},e[33]=N,e[34]=g,e[35]=C,e[36]=d,e[37]=y):y=e[37];let p;e[38]!==t?(p=t("discover.setup.projectTitle"),e[38]=t,e[39]=p):p=e[39];let k;e[40]!==t?(k=t("discover.setup.projectBody"),e[40]=t,e[41]=k):k=e[41];const T=_.length>0;let R;e[42]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(pe,{size:18}),e[42]=R):R=e[42];let w;e[43]!==i.slug?(w={org:i.slug},e[43]=i.slug,e[44]=w):w=e[44];let q;e[45]!==t?(q=t("discover.setup.projectAction"),e[45]=t,e[46]=q):q=e[46];let E;e[47]!==w||e[48]!==q?(E=s.jsx(O,{asChild:!0,variant:"outline",size:"sm",children:s.jsx(G,{to:re.home,params:w,children:q})}),e[47]=w,e[48]=q,e[49]=E):E=e[49];let A;e[50]!==p||e[51]!==k||e[52]!==T||e[53]!==E?(A={key:"project",title:p,body:k,done:T,icon:R,action:E},e[50]=p,e[51]=k,e[52]=T,e[53]=E,e[54]=A):A=e[54];let B;e[55]!==t?(B=t("discover.setup.inviteTitle"),e[55]=t,e[56]=B):B=e[56];let P;e[57]!==t?(P=t("discover.setup.inviteBody"),e[57]=t,e[58]=P):P=e[58];let Y;e[59]!==l.data?.data?.members?(Y=l.data?.data?.members??[],e[59]=l.data?.data?.members,e[60]=Y):Y=e[60];const W=Y.length>1;let F;e[61]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(ue,{size:18}),e[61]=F):F=e[61];let D;e[62]!==t?(D=t("discover.setup.inviteAction"),e[62]=t,e[63]=D):D=e[63];let I;e[64]!==n||e[65]!==D?(I=s.jsx(O,{asChild:!0,variant:"outline",size:"sm",children:s.jsx(G,{to:"/$org/settings/members",params:n,children:D})}),e[64]=n,e[65]=D,e[66]=I):I=e[66];let M;e[67]!==B||e[68]!==P||e[69]!==W||e[70]!==I?(M={key:"invite",title:B,body:P,done:W,icon:F,action:I},e[67]=B,e[68]=P,e[69]=W,e[70]=I,e[71]=M):M=e[71];let Q;return e[72]!==y||e[73]!==A||e[74]!==M||e[75]!==f?(Q=[f,y,A,M],e[72]=y,e[73]=A,e[74]=M,e[75]=f,e[76]=Q):Q=e[76],Q}function ye(){const e=L.c(51),t=J(),{projects:i}=se();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={slug:"mcp-github"},e[0]=o):o=e[0];const $=V(o),u=xe();let _;e[1]!==i?(_=i.some(Se),e[1]=i,e[2]=_):_=e[2];const l=_;let r;e[3]!==i?(r=i.some(_e),e[3]=i,e[4]=r):r=e[4];const n=r;let x;if(e[5]!==u||e[6]!==i){let w;e[8]!==u?(w=q=>he(u.data?.configs??[],ne(q)),e[8]=u,e[9]=w):w=e[9],x=i.some(w),e[5]=u,e[6]=i,e[7]=x}else x=e[7];const S=x;let c;e[10]!==t?(c=t("discover.capabilities.previewTitle"),e[10]=t,e[11]=c):c=e[11];let h;e[12]!==t?(h=t("discover.capabilities.previewRequirement"),e[12]=t,e[13]=h):h=e[13];let z;e[14]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(X,{size:18}),e[14]=z):z=e[14];let a;e[15]!==l||e[16]!==c||e[17]!==h?(a={key:"preview",title:c,requirement:h,satisfied:l,icon:z},e[15]=l,e[16]=c,e[17]=h,e[18]=a):a=e[18];let m;e[19]!==t?(m=t("discover.capabilities.gitTitle"),e[19]=t,e[20]=m):m=e[20];let f;e[21]!==t?(f=t("discover.capabilities.gitRequirement"),e[21]=t,e[22]=f):f=e[22];const N=$.length>0&&l;let g;e[23]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(te,{className:"size-[18px]"}),e[23]=g):g=e[23];let C;e[24]!==N||e[25]!==m||e[26]!==f?(C={key:"git",title:m,requirement:f,satisfied:N,icon:g},e[24]=N,e[25]=m,e[26]=f,e[27]=C):C=e[27];let j;e[28]!==t?(j=t("discover.capabilities.contentTitle"),e[28]=t,e[29]=j):j=e[29];let b;e[30]!==t?(b=t("discover.capabilities.contentRequirement"),e[30]=t,e[31]=b):b=e[31];let v;e[32]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(X,{size:18}),e[32]=v):v=e[32];let d;e[33]!==n||e[34]!==j||e[35]!==b?(d={key:"content",title:j,requirement:b,satisfied:n,icon:v},e[33]=n,e[34]=j,e[35]=b,e[36]=d):d=e[36];let y;e[37]!==t?(y=t("discover.capabilities.assetsTitle"),e[37]=t,e[38]=y):y=e[38];let p;e[39]!==t?(p=t("discover.capabilities.assetsRequirement"),e[39]=t,e[40]=p):p=e[40];let k;e[41]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(de,{size:18}),e[41]=k):k=e[41];let T;e[42]!==S||e[43]!==y||e[44]!==p?(T={key:"assets",title:y,requirement:p,satisfied:S,icon:k},e[42]=S,e[43]=y,e[44]=p,e[45]=T):T=e[45];let R;return e[46]!==C||e[47]!==d||e[48]!==T||e[49]!==a?(R=[a,C,d,T],e[46]=C,e[47]=d,e[48]=T,e[49]=a,e[50]=R):R=e[50],R}function _e(e){return!!ie(e)&&ge(e.metadata?.ui?.layout)!=="off"}function Se(e){return ie(e)}function H(e){const t=L.c(10),{title:i,description:o,children:$}=e;let u;t[0]!==i?(u=s.jsx("h2",{className:"text-base font-semibold text-foreground",children:i}),t[0]=i,t[1]=u):u=t[1];let _;t[2]!==o?(_=s.jsx("p",{className:"max-w-prose text-sm text-muted-foreground",children:o}),t[2]=o,t[3]=_):_=t[3];let l;t[4]!==u||t[5]!==_?(l=s.jsxs("div",{className:"flex flex-col gap-1",children:[u,_]}),t[4]=u,t[5]=_,t[6]=l):l=t[6];let r;return t[7]!==$||t[8]!==l?(r=s.jsxs("section",{className:"flex flex-col gap-3",children:[l,$]}),t[7]=$,t[8]=l,t[9]=r):r=t[9],r}function Ne(){const e=L.c(63),t=J(),{org:i}=Z(),o=ve(),$=ye();let u;e[0]!==o?(u=o.filter(ze),e[0]=o,e[1]=u):u=e[1];const _=u;let l;e[2]!==t?(l=t("discover.title"),e[2]=t,e[3]=l):l=e[3];let r;e[4]!==l?(r=s.jsx(le.Title,{children:l}),e[4]=l,e[5]=r):r=e[5];let n;e[6]!==t?(n=t("discover.subtitle"),e[6]=t,e[7]=n):n=e[7];let x;e[8]!==n?(x=s.jsx("p",{className:"max-w-prose text-sm text-muted-foreground",children:n}),e[8]=n,e[9]=x):x=e[9];let S;e[10]!==r||e[11]!==x?(S=s.jsxs("header",{className:"flex flex-col gap-2",children:[r,x]}),e[10]=r,e[11]=x,e[12]=S):S=e[12];let c;e[13]!==t?(c=t("discover.setup.title"),e[13]=t,e[14]=c):c=e[14];let h;e[15]!==_.length||e[16]!==t?(h=_.length===0?t("discover.setup.allDone"):t("discover.setup.description"),e[15]=_.length,e[16]=t,e[17]=h):h=e[17];let z;e[18]!==o?(z=o.map(Te),e[18]=o,e[19]=z):z=e[19];let a;e[20]!==z?(a=s.jsx("ul",{className:"flex flex-col gap-2",children:z}),e[20]=z,e[21]=a):a=e[21];let m;e[22]!==c||e[23]!==h||e[24]!==a?(m=s.jsx(H,{title:c,description:h,children:a}),e[22]=c,e[23]=h,e[24]=a,e[25]=m):m=e[25];let f;e[26]!==t?(f=t("discover.capabilities.title"),e[26]=t,e[27]=f):f=e[27];let N;e[28]!==t?(N=t("discover.capabilities.description"),e[28]=t,e[29]=N):N=e[29];let g;if(e[30]!==$||e[31]!==t){let q;e[33]!==t?(q=E=>s.jsxs("li",{className:"surface flex items-start gap-3 p-4",children:[s.jsx("span",{className:K("mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-lg",E.satisfied?"bg-success/10 text-success":"bg-muted text-muted-foreground"),children:E.satisfied?s.jsx(ee,{size:18}):E.icon}),s.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:E.title}),s.jsx("span",{className:"text-sm text-muted-foreground",children:E.satisfied?t("discover.capabilities.ready"):E.requirement})]})]},E.key),e[33]=t,e[34]=q):q=e[34],g=$.map(q),e[30]=$,e[31]=t,e[32]=g}else g=e[32];let C;e[35]!==g?(C=s.jsx("ul",{className:"grid gap-2 sm:grid-cols-2",children:g}),e[35]=g,e[36]=C):C=e[36];let j;e[37]!==f||e[38]!==N||e[39]!==C?(j=s.jsx(H,{title:f,description:N,children:C}),e[37]=f,e[38]=N,e[39]=C,e[40]=j):j=e[40];let b;e[41]!==t?(b=t("discover.catalog.title"),e[41]=t,e[42]=b):b=e[42];let v;e[43]!==t?(v=t("discover.catalog.description"),e[43]=t,e[44]=v):v=e[44];let d;e[45]!==i.slug?(d={org:i.slug},e[45]=i.slug,e[46]=d):d=e[46];let y;e[47]===Symbol.for("react.memo_cache_sentinel")?(y={tab:"all"},e[47]=y):y=e[47];let p;e[48]!==t?(p=t("discover.catalog.action"),e[48]=t,e[49]=p):p=e[49];let k;e[50]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(me,{size:18}),e[50]=k):k=e[50];let T;e[51]!==d||e[52]!==p?(T=s.jsx("div",{children:s.jsx(O,{asChild:!0,size:"lg",children:s.jsxs(G,{to:"/$org/settings/connections",params:d,search:y,onClick:Ce,children:[p,k]})})}),e[51]=d,e[52]=p,e[53]=T):T=e[53];let R;e[54]!==b||e[55]!==v||e[56]!==T?(R=s.jsx(H,{title:b,description:v,children:T}),e[54]=b,e[55]=v,e[56]=T,e[57]=R):R=e[57];let w;return e[58]!==m||e[59]!==j||e[60]!==R||e[61]!==S?(w=s.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-y-auto",children:s.jsxs("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-10 p-6 md:p-10",children:[S,m,j,R]})}),e[58]=m,e[59]=j,e[60]=R,e[61]=S,e[62]=w):w=e[62],w}function Ce(){return ce("discover_catalog_opened",{})}function Te(e){return s.jsxs("li",{className:K("surface flex items-start gap-3 p-4",e.done&&"opacity-60"),children:[s.jsx("span",{className:K("mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-lg",e.done?"bg-success/10 text-success":"bg-muted text-muted-foreground"),children:e.done?s.jsx(ee,{size:18}):e.icon}),s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:e.title}),s.jsx("span",{className:"text-sm text-muted-foreground",children:e.body})]}),!e.done&&s.jsx("div",{className:"shrink-0",children:e.action})]},e.key)}function ze(e){return!e.done}function Qt(){const e=L.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ae.Content,{children:s.jsx(Ne,{})}),e[0]=t):t=e[0],t}export{Qt as default};
@@ -1 +0,0 @@
1
- import{c as i,m as S,j as A,gP as _}from"./index-CcqLnTyv.js";function l(a){const e=i.c(8),{size:o,className:n}=a,s=o===void 0?16:o;let t;e[0]!==s?(t={width:s,height:s},e[0]=s,e[1]=t):t=e[1];let E;e[2]!==n?(E=S("shrink-0 rounded-full object-cover",n),e[2]=n,e[3]=E):E=e[3];let c;return e[4]!==s||e[5]!==t||e[6]!==E?(c=A.jsx("img",{src:_,alt:"Super Agent",width:s,height:s,style:t,className:E}),e[4]=s,e[5]=t,e[6]=E,e[7]=c):c=e[7],c}const m=1e4,g=3,p=5*1024*1024,C=["image/png","image/jpeg","image/webp"],u="feedback button";export{m as F,l as S,g as a,C as b,p as c,u as d};
@@ -1,2 +0,0 @@
1
- import{c as Se,b as ve,r as f,j as s,I as Ye,h as fe,x as It,aT as Gt,w as Vt,B as Ce,y as Bt,v as qt,D as Ht,aH as Wt,aI as Qt,aJ as Ut,aK as Jt,bj as Xt,aL as Yt,aM as Zt,aN as _t,m as me,as as en,q as tn,t as ee,K as Ze}from"./index-CcqLnTyv.js";import{m as nn,J as rn,bZ as sn,b_ as ln}from"./agent-icon-DqjTL3cE.js";import{s as on}from"./XClose-BDiB_Nvo.js";import{S as an}from"./scroll-area-Dc2A2LkE.js";import{c as _e,T as et,a as tt}from"./tooltip-AKf-E49i.js";import{b as cn}from"./chat-context-aSjAR9mm.js";import{F as dn}from"./editor-BKO3Ouyu.js";import{g as fn}from"./shell-layout-CBX9BtMX.js";import{s as je}from"./save-changes-debug-nBi-n9eV.js";import{s as nt,f as un}from"./sandbox-git-api-DcqI6XE4.js";import{f as xn,C as de,d as rt,g as mn,e as pn}from"./context-menu-CmlGLO8r.js";import{t as hn}from"./ChevronUp-DRG0w_P4.js";import{b as gn}from"./sandbox-url-D3mC8qhT.js";import{i as yn,E as bn,c as Pe,e as wn,f as jn,h as Nn,j as Dn,t as ne,k as Ne,l as Me,m as De,g as Ke,n as Ae,o as En,s as Cn,v as Sn,p as Oe,q as Ee,r as ze,u as vn,w as Fn,x as Tn,y as kn}from"./utils-KeMhVvdQ.js";import"./AlertCircle-kYtqXGU8.js";import"./Tool01-BTDYOKsB.js";import"./ArrowUp-DcYpepHk.js";import"./ArrowLeft-B1m5qQi9.js";import"./LinkBroken01-C9GtmpYY.js";import"./ShoppingBag01-DDCYsqx9.js";import"./Globe04--FaZazgw.js";import"./CheckCircle-B4NfGYxe.js";import"./ChevronSelectorVertical-EqyUOMMk.js";import"./UserSquare-BJHrMhrM.js";import"./CreditCard01-BLl0RgXC.js";import"./SwitchHorizontal01-D7HAXgYP.js";import"./Key01-D0Pq98hT.js";import"./Minus-eGpg4-RN.js";import"./Monitor01-Su614Ctg.js";import"./Sun-Dvv08Urq.js";import"./Play-D_ph4pZ0.js";import"./Plus-D8rFucQH.js";import"./SearchMd-2MPq0KPN.js";import"./Trash01-CHCe7_6o.js";import"./Upload01-Q6ECKQXp.js";import"./Users01-DHfg9AEk.js";import"./Zap-DpvU6Dp2.js";import"./index-BdQq_4o_.js";import"./index-D146teOp.js";import"./autosend-_WPHuuuS.js";import"./thread-route-D5E5K-lU.js";import"./use-project-scope-Cb4T7-Pe.js";import"./repository-binding-CuR-5wbj.js";import"./use-mcp-client-DvDomB9A.js";import"./auth-qAWEiaXq.js";import"./thread-intent-pegObLq9.js";import"./delay-CnY5UFtP.js";import"./watch-sse-pool-CYcZM1HP.js";import"./task-board-DcTNURQy.js";import"./schema-D4ZSsKIV.js";import"./use-entitlements-BKF4jYfc.js";import"./use-ai-providers-BrqJh5BT.js";import"./use-decopilot-events-Dc1L96mp.js";import"./use-organization-settings-sxurgilE.js";import"./use-deployment-admin-D9sSgOb1.js";import"./admin-fetch-BhTJlAsX.js";import"./command-CtR4gjCr.js";import"./index-DCh3kkGn.js";import"./integration-icon-ChQEBlMz.js";import"./project-icon-BlOLnUr2.js";import"./use-navigate-to-agent-DmfSMV3R.js";import"./use-debounced-value-CcMMD4Qy.js";import"./new-project-dialog-C_1Rs0SG.js";import"./label-CsfAEF08.js";import"./repository-picker-DEa_L5X-.js";import"./github-icon-BBNizm_E.js";import"./useInfiniteQuery-WRSkkanY.js";import"./infiniteQueryObserver-uDA4YvYL.js";import"./collection-search-iHJVqUHB.js";import"./required-auth-layout-BnfTNype.js";import"./use-org-sso-CGB_T6WF.js";const Rn={"new-file":{titleKey:"sandbox.fileExplorerNameDialog.newFileTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFileDescription",submitKey:"sandbox.fileExplorerNameDialog.newFileSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFilePlaceholder"},"new-folder":{titleKey:"sandbox.fileExplorerNameDialog.newFolderTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFolderDescription",submitKey:"sandbox.fileExplorerNameDialog.newFolderSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFolderPlaceholder"},rename:{titleKey:"sandbox.fileExplorerNameDialog.renameTitle",descriptionKey:"sandbox.fileExplorerNameDialog.renameDescription",submitKey:"sandbox.fileExplorerNameDialog.renameSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.renamePlaceholder"}};function Ln(A){const e=Se.c(71),{open:x,mode:J,initialName:b,parentLabel:N,isPending:L,onSubmit:d,onOpenChange:w}=A,O=b===void 0?"":b,m=L===void 0?!1:L,a=ve(),[o,P]=f.useState(O),[X,M]=f.useState(x),p=Rn[J];x!==X&&(M(x),x&&P(O));let c;e[0]!==m||e[1]!==w?(c=U=>{!U&&!m&&w(!1)},e[0]=m,e[1]=w,e[2]=c):c=e[2];const C=c;let z;e[3]!==m||e[4]!==o||e[5]!==d?(z=async U=>{U.preventDefault();const te=o.trim();!te||m||await d(te)},e[3]=m,e[4]=o,e[5]=d,e[6]=z):z=e[6];const R=z;let S;e[7]!==p.titleKey||e[8]!==a?(S=a(p.titleKey),e[7]=p.titleKey,e[8]=a,e[9]=S):S=e[9];let v;e[10]!==S?(v=s.jsx(It,{children:S}),e[10]=S,e[11]=v):v=e[11];let D;e[12]!==p.descriptionKey||e[13]!==a?(D=a(p.descriptionKey),e[12]=p.descriptionKey,e[13]=a,e[14]=D):D=e[14];let j;e[15]!==D?(j=s.jsx(Gt,{children:D}),e[15]=D,e[16]=j):j=e[16];let g;e[17]!==v||e[18]!==j?(g=s.jsxs(Vt,{children:[v,j]}),e[17]=v,e[18]=j,e[19]=g):g=e[19];let E;e[20]!==N||e[21]!==a?(E=N&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:a("sandbox.fileExplorerNameDialog.location")}),s.jsx(Ye,{value:N,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=N,e[21]=a,e[22]=E):E=e[22];let y;e[23]!==a?(y=a("sandbox.fileExplorerNameDialog.name"),e[23]=a,e[24]=y):y=e[24];let T;e[25]!==y?(T=s.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:y}),e[25]=y,e[26]=T):T=e[26];let H;e[27]===Symbol.for("react.memo_cache_sentinel")?(H=U=>P(U.target.value),e[27]=H):H=e[27];let $;e[28]!==p.placeholderKey||e[29]!==a?($=a(p.placeholderKey),e[28]=p.placeholderKey,e[29]=a,e[30]=$):$=e[30];let Y;e[31]!==m||e[32]!==o||e[33]!==$?(Y=s.jsx(Ye,{id:"file-explorer-name",value:o,onChange:H,placeholder:$,autoFocus:!0,disabled:m}),e[31]=m,e[32]=o,e[33]=$,e[34]=Y):Y=e[34];let Z;e[35]!==T||e[36]!==Y?(Z=s.jsxs("div",{className:"space-y-1.5",children:[T,Y]}),e[35]=T,e[36]=Y,e[37]=Z):Z=e[37];let _;e[38]!==E||e[39]!==Z?(_=s.jsxs("div",{className:"space-y-4 py-4",children:[E,Z]}),e[38]=E,e[39]=Z,e[40]=_):_=e[40];let I;e[41]!==w?(I=()=>w(!1),e[41]=w,e[42]=I):I=e[42];let k;e[43]!==a?(k=a("sandbox.fileExplorerNameDialog.cancel"),e[43]=a,e[44]=k):k=e[44];let W;e[45]!==m||e[46]!==I||e[47]!==k?(W=s.jsx(Ce,{type:"button",variant:"outline",onClick:I,disabled:m,children:k}),e[45]=m,e[46]=I,e[47]=k,e[48]=W):W=e[48];let K;e[49]!==m||e[50]!==o?(K=!o.trim()||m,e[49]=m,e[50]=o,e[51]=K):K=e[51];let Q;e[52]!==p.submitKey||e[53]!==m||e[54]!==a?(Q=m?s.jsxs(s.Fragment,{children:[s.jsx(fe,{className:"size-3.5"}),a("sandbox.fileExplorerNameDialog.saving")]}):a(p.submitKey),e[52]=p.submitKey,e[53]=m,e[54]=a,e[55]=Q):Q=e[55];let G;e[56]!==K||e[57]!==Q?(G=s.jsx(Ce,{type:"submit",disabled:K,children:Q}),e[56]=K,e[57]=Q,e[58]=G):G=e[58];let F;e[59]!==W||e[60]!==G?(F=s.jsxs(Bt,{children:[W,G]}),e[59]=W,e[60]=G,e[61]=F):F=e[61];let V;e[62]!==R||e[63]!==_||e[64]!==F||e[65]!==g?(V=s.jsx(qt,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:R,children:[g,_,F]})}),e[62]=R,e[63]=_,e[64]=F,e[65]=g,e[66]=V):V=e[66];let B;return e[67]!==C||e[68]!==x||e[69]!==V?(B=s.jsx(Ht,{open:x,onOpenChange:C,children:V}),e[67]=C,e[68]=x,e[69]=V,e[70]=B):B=e[70],B}function Pn(A){const e=Se.c(47),{deleteTarget:x,deleteDirtyPaths:J,fsActionPending:b,onOpenChange:N,onConfirm:L}=A,d=ve(),w=x?.kind==="directory",O=x!==null,m=w?"sandbox.fileExplorerDeleteDialog.titleFolder":"sandbox.fileExplorerDeleteDialog.titleFile";let a;e[0]!==d||e[1]!==m?(a=d(m),e[0]=d,e[1]=m,e[2]=a):a=e[2];let o;e[3]!==a?(o=s.jsx(Wt,{children:a}),e[3]=a,e[4]=o):o=e[4];let P;e[5]!==d?(P=d("sandbox.fileExplorerDeleteDialog.description"),e[5]=d,e[6]=P):P=e[6];const X=x?.name;let M;e[7]!==X?(M=s.jsx("span",{className:"font-mono",children:X}),e[7]=X,e[8]=M):M=e[8];let p;e[9]!==w||e[10]!==d?(p=w?d("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=w,e[10]=d,e[11]=p):p=e[11];let c;e[12]!==J.length||e[13]!==d?(c=J.length>0&&s.jsxs(s.Fragment,{children:[" ",J.length===1?d("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):d("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:J.length})]}),e[12]=J.length,e[13]=d,e[14]=c):c=e[14];let C;e[15]!==P||e[16]!==M||e[17]!==p||e[18]!==c?(C=s.jsxs(Qt,{children:[P," ",M,p,c]}),e[15]=P,e[16]=M,e[17]=p,e[18]=c,e[19]=C):C=e[19];let z;e[20]!==C||e[21]!==o?(z=s.jsxs(Ut,{children:[o,C]}),e[20]=C,e[21]=o,e[22]=z):z=e[22];let R;e[23]!==d?(R=d("sandbox.fileExplorerDeleteDialog.cancel"),e[23]=d,e[24]=R):R=e[24];let S;e[25]!==b||e[26]!==R?(S=s.jsx(Jt,{disabled:b,children:R}),e[25]=b,e[26]=R,e[27]=S):S=e[27];const v=b||!x;let D;e[28]!==x||e[29]!==L?(D=H=>{H.preventDefault(),x&&L(x)},e[28]=x,e[29]=L,e[30]=D):D=e[30];let j;e[31]!==d?(j=d("sandbox.fileExplorerDeleteDialog.delete"),e[31]=d,e[32]=j):j=e[32];let g;e[33]!==v||e[34]!==D||e[35]!==j?(g=s.jsx(Xt,{disabled:v,onClick:D,children:j}),e[33]=v,e[34]=D,e[35]=j,e[36]=g):g=e[36];let E;e[37]!==S||e[38]!==g?(E=s.jsxs(Yt,{children:[S,g]}),e[37]=S,e[38]=g,e[39]=E):E=e[39];let y;e[40]!==z||e[41]!==E?(y=s.jsxs(Zt,{children:[z,E]}),e[40]=z,e[41]=E,e[42]=y):y=e[42];let T;return e[43]!==N||e[44]!==O||e[45]!==y?(T=s.jsx(_t,{open:O,onOpenChange:N,children:y}),e[43]=N,e[44]=O,e[45]=y,e[46]=T):T=e[46],T}const Mn="#d9a441";function Kn(A){const e=Se.c(63),{node:x,depth:J,isExpanded:b,isSelected:N,isLoading:L,fileVisual:d,onOpen:w,onSelect:O,onNewFile:m,onNewFolder:a,onCopyPath:o,onCopyRelativePath:P,onRename:X,onDelete:M}=A,p=L===void 0?!1:L,c=ve(),C=x.kind==="directory",{Icon:z,color:R}=d,S=N&&"bg-accent";let v;e[0]!==S?(v=me("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-sm hover:bg-accent transition-colors",S),e[0]=S,e[1]=v):v=e[1];const D=`${J*14+8}px`;let j;e[2]!==D?(j={paddingLeft:D},e[2]=D,e[3]=j):j=e[3];let g;e[4]!==w||e[5]!==O?(g=()=>{O(),w()},e[4]=w,e[5]=O,e[6]=g):g=e[6];let E;e[7]!==z||e[8]!==R||e[9]!==C||e[10]!==b||e[11]!==p?(E=C?s.jsxs(s.Fragment,{children:[p?s.jsx(fe,{className:"size-3.5 shrink-0 text-muted-foreground"}):b?s.jsx(hn,{size:14,className:"shrink-0 text-muted-foreground"}):s.jsx(en,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx(nn,{size:16,className:"shrink-0",style:{color:Mn}})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"w-3.5 shrink-0"}),s.jsx(z,{size:16,className:"shrink-0",style:{color:R}})]}),e[7]=z,e[8]=R,e[9]=C,e[10]=b,e[11]=p,e[12]=E):E=e[12];let y;e[13]!==x.name?(y=s.jsx("span",{className:"truncate",children:x.name}),e[13]=x.name,e[14]=y):y=e[14];let T;e[15]!==v||e[16]!==j||e[17]!==g||e[18]!==E||e[19]!==y?(T=s.jsx(xn,{asChild:!0,children:s.jsxs("button",{type:"button",className:v,style:j,onClick:g,children:[E,y]})}),e[15]=v,e[16]=j,e[17]=g,e[18]=E,e[19]=y,e[20]=T):T=e[20];let H;e[21]!==c?(H=c("sandbox.fileTreeRow.newFile"),e[21]=c,e[22]=H):H=e[22];let $;e[23]!==m||e[24]!==H?($=s.jsx(de,{onSelect:m,children:H}),e[23]=m,e[24]=H,e[25]=$):$=e[25];let Y;e[26]!==c?(Y=c("sandbox.fileTreeRow.newFolder"),e[26]=c,e[27]=Y):Y=e[27];let Z;e[28]!==a||e[29]!==Y?(Z=s.jsx(de,{onSelect:a,children:Y}),e[28]=a,e[29]=Y,e[30]=Z):Z=e[30];let _;e[31]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(rt,{}),e[31]=_):_=e[31];let I;e[32]!==c?(I=c("sandbox.fileTreeRow.copyPath"),e[32]=c,e[33]=I):I=e[33];let k;e[34]!==o||e[35]!==I?(k=s.jsx(de,{onSelect:o,children:I}),e[34]=o,e[35]=I,e[36]=k):k=e[36];let W;e[37]!==c?(W=c("sandbox.fileTreeRow.copyRelativePath"),e[37]=c,e[38]=W):W=e[38];let K;e[39]!==P||e[40]!==W?(K=s.jsx(de,{onSelect:P,children:W}),e[39]=P,e[40]=W,e[41]=K):K=e[41];let Q;e[42]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(rt,{}),e[42]=Q):Q=e[42];let G;e[43]!==c?(G=c("sandbox.fileTreeRow.rename"),e[43]=c,e[44]=G):G=e[44];let F;e[45]!==X||e[46]!==G?(F=s.jsx(de,{onSelect:X,children:G}),e[45]=X,e[46]=G,e[47]=F):F=e[47];let V;e[48]!==c?(V=c("sandbox.fileTreeRow.delete"),e[48]=c,e[49]=V):V=e[49];let B;e[50]!==M||e[51]!==V?(B=s.jsx(de,{variant:"destructive",onSelect:M,children:V}),e[50]=M,e[51]=V,e[52]=B):B=e[52];let U;e[53]!==$||e[54]!==Z||e[55]!==k||e[56]!==K||e[57]!==F||e[58]!==B?(U=s.jsxs(mn,{className:"w-52",children:[$,Z,_,k,K,Q,F,B]}),e[53]=$,e[54]=Z,e[55]=k,e[56]=K,e[57]=F,e[58]=B,e[59]=U):U=e[59];let te;return e[60]!==U||e[61]!==T?(te=s.jsxs(pn,{children:[T,U]}),e[60]=U,e[61]=T,e[62]=te):te=e[62],te}const st=200,An=2,On=250,it=200;function zn(A,e){return gn(A,e)}function $n(A){const e=Se.c(9),{text:x,query:J}=A;let b,N,L;if(e[0]!==J||e[1]!==x){const{leadingEllipsis:w,segments:O}=En(x,J);b="truncate font-mono text-muted-foreground",N=w&&s.jsx("span",{className:"text-muted-foreground/50",children:"…"}),L=O.map(In),e[0]=J,e[1]=x,e[2]=b,e[3]=N,e[4]=L}else b=e[2],N=e[3],L=e[4];let d;return e[5]!==b||e[6]!==N||e[7]!==L?(d=s.jsxs("span",{className:b,children:[N,L]}),e[5]=b,e[6]=N,e[7]=L,e[8]=d):d=e[8],d}function In(A,e){return A.match?s.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:A.text},e):s.jsx("span",{children:A.text},e)}function ss({orgSlug:A,virtualMcpId:e,branch:x,threadId:J,openPath:b}){const N={orgSlug:A,virtualMcpId:e,branch:x,threadId:J},[L,d]=f.useState({files:[],directories:[],truncated:!1}),{files:w,directories:O}=L,[m,a]=f.useState(new Set),[o,P]=f.useState(null),[X,M]=f.useState(null),[p,c]=f.useState([]),[C,z]=f.useState(""),[R,S]=f.useState(null),[v,D]=f.useState(null),[j,g]=f.useState(!1),[E,y]=f.useState(!1),[T,H]=f.useState(!1),[$,Y]=f.useState(!1),[,Z]=f.useState(new Set),[_,I]=f.useState(new Set),k=f.useRef(0),W=f.useRef(null),K=f.useRef(new Set),Q=f.useRef(new Map),G=f.useRef(null),F=f.useRef(0),V=f.useRef(null),B=f.useRef(null),U=f.useRef(null);function te(t){Z(n=>{const r=typeof t=="function"?t(n):t;return K.current=r,r})}const[oe,ae]=f.useState(new Map),Fe=f.useRef(null),[se,pe]=f.useState(null),{sendMessage:lt}=cn(),{openSidePanel:ot}=fn(),he=tn(),[q,re]=f.useState(null),[Te,ke]=f.useState(null),[ge,ye]=f.useState(!1);async function ie(t,n){const r=await fetch(zn(N,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const i=await r.json().catch(()=>({}));throw new Error(i.error??`Request failed (${r.status})`)}return r.json()}async function be(){he.invalidateQueries({queryKey:nt(N)})}function $e(t,n,r){navigator.clipboard.writeText(r).then(()=>ee.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>ee.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function at(t){const n=Tn(t);if(!n)return;const r=`${A}/${e}/${x}`;he.setQueryData(Ze.decofile(r),i=>{if(!i)return i;const{[n]:l,...u}=i;return u}),he.invalidateQueries({queryKey:Ze.liveMeta(A,e,x)})}function ct(t){const n=t.kind==="file"?[t.path]:w.filter(r=>r.startsWith(".deco/blocks/")).map(r=>Ne(r)).filter(r=>r===t.path||r.startsWith(`${t.path}/`));for(const r of n)at(r)}function dt(t){const n=Ne(t);return p.filter(r=>{if(r!==n&&!r.startsWith(`${n}/`))return!1;const i=oe.get(r);return!!(i?.loaded&&i.editorValue!==i.savedContent)})}function Ie(t){c(n=>n.map(r=>t(r)).filter(r=>r!==null)),P(n=>n&&t(n)),ae(n=>{const r=new Map;for(const[i,l]of n){const u=t(i);u&&r.set(u,l)}return r}),M(n=>{if(!n)return n;const r=t(n.path);return r?r===n.path?n:{...n,path:r,name:r.split("/").pop()??r}:null})}function ft(t){const n=Ne(t);M(r=>r&&(r.path===n||r.path.startsWith(`${n}/`)?null:r)),Ie(r=>r===n||r.startsWith(`${n}/`)?null:r)}async function ut(t,n){if(!q)return;const r=Ee(q.parentDir,n);if(ze(r,w,O))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("write",{path:ne(r),content:""}),await ue(),await be(),re(null),xe(r)}async function xt(t,n){if(!q)return;const r=Ee(q.parentDir,n);if(ze(r,w,O))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const i=ne(r);await ie("mkdir",{path:i}),d(l=>({...l,directories:l.directories.includes(i)?l.directories:[...l.directories,i]})),await ue(),await be(),re(null),a(l=>{const u=new Set(l);for(const le of Ae(r))u.add(le);return u.add(r),u}),M({name:n,path:r,kind:"directory",children:[]})}async function mt(t,n){if(!q)return;const r=q.node.path,i=De(r),l=Ee(i,n);if(l===r){re(null);return}if(ze(l,w,O))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("rename",{from:ne(r),to:ne(l)}),Ie(u=>u===r?l:u.startsWith(`${r}/`)?Ee(l,u.slice(r.length+1)):u),await ue(),await be(),re(null)}async function pt(t,n){ye(!0);try{await ie("unlink",{path:ne(n.path),recursive:n.kind==="directory"}),ct(n),ft(n.path),await ue(),await be(),ke(null),ee.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(r){ee.error(r instanceof Error?r.message:t("sandbox.fileExplorer.deleteFailed"))}finally{ye(!1)}}async function ht(t,n){const r=Sn(n);if(r){ee.error(r);return}ye(!0);try{q?.mode==="new-file"?(await ut(t,n),ee.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):q?.mode==="new-folder"?(await xt(t,n),ee.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):q?.mode==="rename"&&(await mt(t,n),ee.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(i){ee.error(i instanceof Error?i.message:t("sandbox.fileExplorer.operationFailed"))}finally{ye(!1)}}const Ge=f.useRef(!1);Ge.current||(Ge.current=!0,W.current=ue());const[gt,yt]=f.useState(null),h=ve();if(b&&b!==gt){yt(b);const t=b;queueMicrotask(()=>{yn(t)&&xe(t)})}async function Re(t){const n=await ie("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ve(t,n,r){if(r!==k.current)return!1;let i=!1;return d(l=>{const u=n?kn(l.files,l.directories,t,l.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return i=!!u.truncated,{files:u.files,directories:u.directories,truncated:i}}),i&&ee.warning(h("sandbox.fileExplorer.fileListTruncated")),i}async function bt(t){const n=Q.current.get(t);if(n)return n;const r=k.current,i=(async()=>{const l=await Re({pattern:"**/*",path:ne(t),limit:Pe}),u=Ve(l,!0,r);return!u&&r===k.current&&te(le=>{const we=new Set(le);return we.add(t),we}),u})();Q.current.set(t,i);try{return await i}finally{Q.current.delete(t)}}async function Be(t){if(!Oe(t,K.current))return!1;I(n=>new Set(n).add(t));try{return await bt(t)}finally{I(n=>{const r=new Set(n);return r.delete(t),r})}}async function wt(t,n){const r=new Set(K.current);for(const i of Ae(n)){if(!Oe(i,r))continue;if(await Be(i))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));r.add(i)}}async function ue(){const t=++k.current;V.current=null,B.current=null,Q.current.clear(),H(!0),te(new Set),a(new Set),I(new Set);try{const n=await Re({pattern:"**/*",limit:Pe,maxDepth:bn});Ve(n,!1,t),Y(!0)}catch{$&&ee.error(h("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{H(!1)}}async function qe(t){if(!oe.get(t)?.loaded){ae(r=>{const i=new Map(r);return i.set(t,{savedContent:"",editorValue:"",loaded:!1}),i});try{const r=await ie("read",{path:ne(t),full:!0}),i=Cn(r.content??"");ae(l=>{const u=new Map(l);return u.set(t,{savedContent:i,editorValue:i,loaded:!0}),u})}catch{}}}function jt(){F.current++,S(null),D(null),g(!1),y(!1)}async function Nt(){const t=k.current,n=V.current;if(n&&n.generation===t)return n.files;const r=B.current;if(r&&r.generation===t)return r.promise;const i=(async()=>{const l=await Re({pattern:"**/*",limit:Pe});return k.current===t&&(V.current={generation:t,files:l.files}),l.files})();B.current={generation:t,promise:i};try{return await i}finally{B.current?.generation===t&&(B.current=null)}}async function Dt(t,n){try{const r=await Nt();if(n!==F.current)return;S(vn(r,t,it))}catch{if(n!==F.current)return;S([])}}async function Et(t,n){g(!0);try{const r=await ie("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:st});if(n!==F.current)return;D(Fn(r.results??"")),y((r.matchCount??0)>=st)}catch{if(n!==F.current)return;D([]),y(!1)}finally{n===F.current&&g(!1)}}function Ct(t){const n=t.trim(),r=++F.current;Dt(n,r),n.length<An?(D(null),g(!1),y(!1)):Et(n,r)}function St(t){if(z(t),G.current&&clearTimeout(G.current),!t.trim()){jt();return}G.current=setTimeout(()=>{Ct(t)},On)}function He(t){const n=U.current;if(!n||n.path!==o)return;U.current=null;const r=Math.max(1,n.line);t.revealLineInCenter(r),t.setPosition({lineNumber:r,column:1}),t.focus()}function vt(t){U.current={path:t.path,line:t.line};const n=o===t.path&&oe.get(t.path)?.loaded;xe(t.path),n&&Fe.current&&He(Fe.current)}async function Ft(t,n){try{await ie("write",{path:ne(t),content:n}),je("file saved via sandbox /write",{path:t}),he.invalidateQueries({queryKey:nt(N)});try{const r=await un(N);je("git status after save",r)}catch(r){je("git status after save failed",{path:t,error:r instanceof Error?r.message:String(r)})}ae(r=>{const i=new Map(r),l=i.get(t);return l&&i.set(t,{...l,savedContent:n}),i})}catch(r){je("file save failed",{path:t,error:r instanceof Error?r.message:String(r)})}}function Tt(t){P(t),M({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),pe(null),p.includes(t)||c(n=>[...n,t]),qe(t)}function kt(t){const n=oe.get(t);n?.loaded&&n.editorValue!==n.savedContent&&!window.confirm(h("sandbox.fileExplorer.discardUnsavedChangesConfirm"))||(c(i=>{const l=i.filter(u=>u!==t);return o===t&&P(l[l.length-1]??null),l}),ae(i=>{const l=new Map(i);return l.delete(t),l}))}function We(t){a(n=>{const r=new Set(n);return r.has(t)?r.delete(t):r.add(t),r})}async function Rt(t){if(Oe(t,K.current))try{if(await Be(t))return}catch(n){ee.error(n instanceof Error?n.message:h("sandbox.fileExplorer.failedToLoadFolder"));return}We(t)}async function Lt(t,n){if(n){We(t);return}await Rt(t)}async function Pt(t){await W.current,await wt(h,t);const n=Ae(t);a(r=>{const i=new Set(r);for(const l of n)i.add(l);return i}),Tt(t)}function xe(t){Pt(t).catch(n=>{ee.error(n instanceof Error?n.message:h("sandbox.fileExplorer.failedToOpenFile"))})}function Mt(){return X?.kind==="directory"?X.path:X?.kind==="file"?De(X.path):o?De(o):"/"}function Qe(t){const n=Mt();re({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Kt=wn(w,O),Ue=jn(Kt,m),Le=R?.length??0,Je=Nn(v??[]),Xe=v?.length??0,ce=o?oe.get(o):null,At=ce?.loaded&&ce.editorValue!==ce.savedContent,Ot=Te?dt(Te.path):[],zt=(t,n)=>{Fe.current=t,He(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!o)return;const r=t.getValue();await Ft(o,r)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const r=t.getSelection(),i=t.getModel();if(!r||!i||!o)return;const l=i.getValueInRange(r);pe({filePath:o,lineStart:r.startLineNumber,lineEnd:r.endLineNumber,selectedCode:l})})};function $t(t){if(!se)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${se.filePath}\``,`**Lines:** ${se.lineStart}–${se.lineEnd}`];if(se.selectedCode){const r=Ke(se.filePath),i=se.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+r,i,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),ot(),lt({parts:[{type:"text",text:n.join(`
2
- `)}]}),pe(null)}return T&&!$?s.jsx("div",{className:"flex items-center justify-center h-full w-full",children:s.jsx(fe,{className:"size-5 text-muted-foreground"})}):s.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[s.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[s.jsxs("div",{className:"relative min-w-0 flex-1",children:[s.jsx(rn,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx("input",{type:"text",value:C,onChange:t=>St(t.target.value),placeholder:h("sandbox.fileExplorer.searchFilesPlaceholder"),"aria-label":h("sandbox.fileExplorer.searchFilesLabel"),className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs placeholder:text-muted-foreground focus-ring"})]}),s.jsxs(_e,{children:[s.jsx(et,{asChild:!0,children:s.jsx(Ce,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0","aria-label":h("sandbox.fileExplorer.newFileLabel"),onClick:()=>Qe("new-file"),children:s.jsx(sn,{size:14})})}),s.jsx(tt,{side:"bottom",children:h("sandbox.fileExplorer.newFile")})]}),s.jsxs(_e,{children:[s.jsx(et,{asChild:!0,children:s.jsx(Ce,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0","aria-label":h("sandbox.fileExplorer.newFolderLabel"),onClick:()=>Qe("new-folder"),children:s.jsx(ln,{size:14})})}),s.jsx(tt,{side:"bottom",children:h("sandbox.fileExplorer.newFolder")})]})]}),s.jsx(an,{className:"flex-1",children:s.jsxs("div",{className:"py-1",children:[!C&&Ue.map(t=>{const{node:n,depth:r}=t,i=n.kind==="directory",l=m.has(n.path),u=X?.path===n.path,le=Dn(n.path,n.kind),we=i&&_.has(n.path);return s.jsx(Kn,{node:n,depth:r,isExpanded:l,isSelected:u,isLoading:we,fileVisual:Me(n.name),onSelect:()=>M(n),onOpen:()=>{i?Lt(n.path,l):xe(n.path)},onNewFile:()=>re({mode:"new-file",node:n,parentDir:le}),onNewFolder:()=>re({mode:"new-folder",node:n,parentDir:le}),onCopyPath:()=>$e(h,"Path",Ne(n.path)),onCopyRelativePath:()=>$e(h,"Relative path",ne(n.path)),onRename:()=>re({mode:"rename",node:n,parentDir:le}),onDelete:()=>ke(n)},n.path)}),!C&&$&&Ue.length===0&&s.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:h("sandbox.fileExplorer.noFilesFound")}),C&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-2xs font-medium text-muted-foreground",children:[s.jsx("span",{children:h("sandbox.fileExplorer.files")}),Le>0&&s.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[Le,Le>=it?"+":""]})]}),R!==null&&R.length===0&&s.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:h("sandbox.fileExplorer.noFileNamesMatch")}),R?.map(t=>{const n=t.split("/").pop()??t,r=De(t),{Icon:i,color:l}=Me(n),u=o===t;return s.jsxs("button",{type:"button",onClick:()=>xe(t),title:t,className:me("flex w-full items-center gap-1.5 px-3 py-1 text-left text-xs hover:bg-accent",u&&"bg-accent"),children:[s.jsx(i,{size:14,className:me("shrink-0",l)}),s.jsx("span",{className:"max-w-40 shrink-0 truncate",children:n}),r!=="/"&&s.jsx("span",{className:"truncate text-muted-foreground/60",children:r})]},t)})]}),C&&s.jsxs("div",{className:"mt-1 border-t pt-1",children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-2xs font-medium text-muted-foreground",children:[s.jsx("span",{children:h("sandbox.fileExplorer.inFiles")}),Xe>0&&s.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[Xe,E?"+":""]}),j&&s.jsx(fe,{className:"size-[10px]"})]}),!j&&v!==null&&Je.length===0&&s.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:h("sandbox.fileExplorer.noMatchesInFileContents")}),Je.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:r,color:i}=Me(n);return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs text-muted-foreground",children:[s.jsx(r,{size:14,className:me("shrink-0",i)}),s.jsx("span",{className:"truncate",children:n}),s.jsx("span",{className:"text-muted-foreground/60",children:t.matches.length})]}),t.matches.map(l=>s.jsxs("button",{type:"button",onClick:()=>vt(l),title:`${t.path}:${l.line}`,className:"flex w-full items-baseline gap-2 pl-8 pr-3 py-0.5 text-left text-xs hover:bg-accent",children:[s.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:l.line}),s.jsx($n,{text:l.text,query:C})]},`${t.path}:${l.line}`))]},t.path)})]})]})})]}),s.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[p.length>0&&s.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:p.map(t=>{const n=oe.get(t),r=n?.loaded&&n.editorValue!==n.savedContent,i=o===t,l=t.split("/").pop()??t;return s.jsxs("div",{className:me("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",i?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{P(t),qe(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":i,children:[s.jsx("span",{className:"truncate max-w-32",children:l}),r&&s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),s.jsx("button",{type:"button",className:"ml-1 p-0.5 hover:bg-accent-foreground/10 rounded-lg",onClick:u=>{u.stopPropagation(),kt(t)},children:s.jsx(on,{size:12})})]},t)})}),se&&s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:s.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl glass px-3 py-1.5",onSubmit:t=>{t.preventDefault();const r=t.currentTarget.elements.namedItem("askAiInput");r.value.trim()&&$t(r.value)},children:[s.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:h("sandbox.fileExplorer.askTheAiPlaceholder"),className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&pe(null)}}),s.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity",title:h("sandbox.fileExplorer.send"),children:s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[s.jsx("title",{children:h("sandbox.fileExplorer.send")}),s.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),s.jsx("div",{className:"flex-1 overflow-hidden",children:o&&ce?.loaded?s.jsx(dn,{language:Ke(o),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:ce.editorValue,path:o,onChange:t=>{const n=o;n&&ae(r=>{const i=new Map(r),l=i.get(n);return l&&i.set(n,{...l,editorValue:t??""}),i})},onMount:zt,loading:s.jsx("div",{className:"flex items-center justify-center h-full w-full",children:s.jsx(fe,{className:"size-5 text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},o):o&&!ce?.loaded?s.jsx("div",{className:"flex items-center justify-center h-full w-full",children:s.jsx(fe,{className:"size-5 text-muted-foreground"})}):s.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:h("sandbox.fileExplorer.selectFileToEdit")})}),o&&s.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-2xs text-muted-foreground shrink-0",children:[s.jsx("span",{className:"truncate",children:o}),s.jsxs("span",{children:[h(At?"sandbox.fileExplorer.modified":"sandbox.fileExplorer.saved")," ","· ",Ke(o)]})]})]}),s.jsx(Ln,{open:q!==null,mode:q?.mode??"new-file",initialName:q?.mode==="rename"?q.node.name:"",parentLabel:q&&q.mode!=="rename"?q.parentDir==="/"?"/":ne(q.parentDir):void 0,isPending:ge,onSubmit:t=>ht(h,t),onOpenChange:t=>{!t&&!ge&&re(null)}}),s.jsx(Pn,{deleteTarget:Te,deleteDirtyPaths:Ot,fsActionPending:ge,onOpenChange:t=>{!t&&!ge&&ke(null)},onConfirm:t=>{pt(h,t)}})]})}export{ss as FileExplorer};
@@ -1 +0,0 @@
1
- import{c as M,b as Z,J as X,a as q,r as z,j as r,aq as re,n as R,a5 as oe,h as ie}from"./index-CcqLnTyv.js";import{C as ne}from"./index-8ANyj4B7.js";import{b as se}from"./input-BDAmWj4c.js";import{D as ae,a as le}from"./chat-context-aSjAR9mm.js";import{a as me}from"./use-organization-settings-sxurgilE.js";import{C as ce,u as pe,F as fe,R as ue,M as ge}from"./home-overview-6RI8kIqs.js";import{I as de}from"./icon-button-muPqJd-h.js";import{a as he,T as V}from"./toggle-group-D9bXIbAb.js";import{N as xe}from"./agent-icon-DqjTL3cE.js";import{i as be}from"./sprints-C1z9xhcL.js";import{F as ye}from"./file-preview-CO8Jx_5T.js";import{u as W,a as je}from"./use-org-fs-BWA2rFQC.js";import{L as Se}from"./preview-dialog-geLovY3F.js";import{t as _e,r as we,s as De}from"./use-task-board-items-BcL-6L6N.js";import{N as ke}from"./new-project-dialog-C_1Rs0SG.js";import{P as ve}from"./projects-empty-state-B_-RYmNY.js";import{b as Ce}from"./project-index-C12cl71J.js";import{u as Ne}from"./use-inbox-feed-RrCfNvIm.js";import{b as Be}from"./use-recent-apps-DD97o_H1.js";import{s as Pe}from"./use-project-scope-Cb4T7-Pe.js";import{a as $e}from"./repository-binding-CuR-5wbj.js";import"./use-mobile-BgN1E82d.js";import"./use-sidebar-collapsed-B34u6RwD.js";import"./use-chat-layout-state-Be9vIJ9A.js";import"./thread-route-D5E5K-lU.js";import"./autosend-_WPHuuuS.js";import"./thread-intent-pegObLq9.js";import"./use-mcp-client-DvDomB9A.js";import"./auth-qAWEiaXq.js";import"./delay-CnY5UFtP.js";import"./watch-sse-pool-CYcZM1HP.js";import"./task-board-DcTNURQy.js";import"./schema-D4ZSsKIV.js";import"./tooltip-AKf-E49i.js";import"./index-D146teOp.js";import"./toolbar-icon-button-CTRAa2ng.js";import"./shell-layout-CBX9BtMX.js";import"./Globe04--FaZazgw.js";import"./UserSquare-BJHrMhrM.js";import"./use-deployment-admin-D9sSgOb1.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-BDiB_Nvo.js";import"./CheckCircle-B4NfGYxe.js";import"./Monitor01-Su614Ctg.js";import"./Zap-DpvU6Dp2.js";import"./Plus-D8rFucQH.js";import"./Tool01-BTDYOKsB.js";import"./command-CtR4gjCr.js";import"./index-DCh3kkGn.js";import"./SearchMd-2MPq0KPN.js";import"./integration-icon-ChQEBlMz.js";import"./LinkBroken01-C9GtmpYY.js";import"./project-icon-BlOLnUr2.js";import"./use-navigate-to-agent-DmfSMV3R.js";import"./use-debounced-value-CcMMD4Qy.js";import"./required-auth-layout-BnfTNype.js";import"./use-org-sso-CGB_T6WF.js";import"./sheet-B2jsXlHJ.js";import"./resizable-G0IV9sBv.js";import"./usage-stats-CVX23WNU.js";import"./tool-namespace-BQSaNq7N.js";import"./form-BhXakrt_.js";import"./label-CsfAEF08.js";import"./utils-CVEq3hMx.js";import"./markdown-CPuTm6Mv.js";import"./use-copy-CtSedmtg.js";import"./use-entitlements-BKF4jYfc.js";import"./file-type-icon-Bo3Nsgdh.js";import"./chat-draft-C4Ql1o7U.js";import"./use-voice-input-DmZaOhTZ.js";import"./popover-BQnTqyWU.js";import"./drawer-ChCkx76W.js";import"./ChevronUp-DRG0w_P4.js";import"./use-ai-providers-BrqJh5BT.js";import"./index-DhM4mrtt.js";import"./checkbox-CBfkrmis.js";import"./Minus-eGpg4-RN.js";import"./select-DQqbq83t.js";import"./index-BdQq_4o_.js";import"./ArrowLeft-B1m5qQi9.js";import"./ChevronSelectorVertical-EqyUOMMk.js";import"./Key01-D0Pq98hT.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./AlertCircle-kYtqXGU8.js";import"./ArrowUp-DcYpepHk.js";import"./ShoppingBag01-DDCYsqx9.js";import"./Upload01-Q6ECKQXp.js";import"./tabs-BzwzpfZ1.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-C6qbWrOQ.js";import"./input-COtL628i.js";import"./suggestion-C3enCUG8.js";import"./use-mcp-prompts-CgDM8qHG.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-DbaCusI2.js";import"./plan-ladder-BLc0_1i8.js";import"./add-connection-dialog-Bh0vHlQ5.js";import"./collection-search-iHJVqUHB.js";import"./extract-connection-data-CTb_9Cpr.js";import"./metadata-D72DunRR.js";import"./connection-CZHWvxVM.js";import"./url-slug-ihGFL5bo.js";import"./connection-card-Dt4OQ0Zk.js";import"./useInfiniteQuery-WRSkkanY.js";import"./infiniteQueryObserver-uDA4YvYL.js";import"./connection-slug-BQwcAWfG.js";import"./textarea-CpPhDLVU.js";import"./use-connection-CECJF8rf.js";import"./schema-DyZV-W0g.js";import"./connection-form-helpers-KX0UMFtC.js";import"./Trash01-CHCe7_6o.js";import"./authenticate-and-persist-oauth-D7iMHNSW.js";import"./mcp-oauth-BU_Qloaj.js";import"./mcp-oauth-ChfuZkYU.js";import"./collection-tabs-Trcf-II9.js";import"./badge-DtxRsHGH.js";import"./use-infinite-scroll-Z_9MLZyx.js";import"./useSuspenseInfiniteQuery-B1s2URZC.js";import"./use-task-board-events-CGZxY00s.js";import"./use-decopilot-events-Dc1L96mp.js";import"./client-icons-CGEm3mRa.js";import"./chart-2s7SvZtT.js";import"./CategoricalChart-Bp-vLaQf.js";import"./index-GYpV5EH9.js";import"./tooltipContext-C6xZbBgY.js";import"./CartesianChart-BfCEFz3y.js";import"./project-apps-sFKq8oaX.js";import"./config-BpJVAl-p.js";import"./core.esm-DkzVh4mV.js";import"./task-route-DfbZq1yE.js";import"./task-key-BCHdFiOO.js";import"./ReferenceLine-BsZk9TgE.js";import"./CreditCard01-BLl0RgXC.js";import"./SwitchHorizontal01-D7HAXgYP.js";import"./Sun-Dvv08Urq.js";import"./Play-D_ph4pZ0.js";import"./Users01-DHfg9AEk.js";import"./utils-KeMhVvdQ.js";import"./editor-BKO3Ouyu.js";import"./preview-content-DHz0okBk.js";import"./file-share-button-B1R4GS_L.js";import"./repository-picker-DEa_L5X-.js";import"./github-icon-BBNizm_E.js";const O="home",Q="brief";function ee(e){return`users/${e}/brief`}function Ee(e,t){return`${e}/${t}.html`}function Fe(e){const t=String(e.getFullYear()).padStart(4,"0"),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}function Ie(e){if(!e.endsWith(".html"))return null;const t=e.slice(0,-5);return be(t)?t:null}const Te=7;function te(e,t){return Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/864e5)}function Me(e,t){let i=null;for(const s of e){const a=Ie(s);if(!a||i&&a<=i.day)continue;const n=te(a,t);n>=0&&n<Te&&(i={name:s,day:a})}return i}const K=e=>e.slice(e.lastIndexOf("/")+1);function J(e,t,i,s){const a=i.filter(o=>o.kind==="file"),n=Me(a.map(o=>K(o.path)),s),m=n&&a.find(o=>K(o.path)===n.name);return n&&m?{scope:e,path:Ee(t,n.day),filename:n.name,size:m.size,day:n.day,ageDays:te(n.day,s)}:null}function Ae({userId:e,personal:t,org:i,today:s}){return[e?J("personal",ee(e),t,s):null,J("org",Q,i,s)].filter(a=>a!==null)}function Le(e,t){return t===0?e("home.dailyBrief.today"):t===1?e("home.dailyBrief.yesterday"):e("home.dailyBrief.daysAgo",{count:t})}function He(e,t){return new Date(`${t}T12:00:00Z`).toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long",timeZone:"UTC"})}function Re(){const e=M.c(54),t=Z(),[i]=X(),{data:s}=q.useSession(),a=s?.user?.id,n=W(O,Q),m=a??"";let o;e[0]!==m?(o=ee(m),e[0]=m,e[1]=o):o=e[1];const D=!!a;let h;e[2]!==D?(h={enabled:D},e[2]=D,e[3]=h):h=e[3];const k=W(O,o,h),c=je(O),[d,v]=z.useState(null),[x,u]=z.useState(!1);let f,l,p,b,g,y,j,C,S,_;if(e[4]!==n.data||e[5]!==k.data||e[6]!==i||e[7]!==c||e[8]!==d||e[9]!==t||e[10]!==a){b=Symbol.for("react.early_return_sentinel");e:{const G=Ae({userId:a,personal:k.data??[],org:n.data??[],today:Fe(new Date)});if(l=G.find(T=>T.scope===d)??G[0],!l){b=null;break e}_="flex flex-col overflow-hidden surface";let A;e[21]!==t?(A=t("home.dailyBrief.title"),e[21]=t,e[22]=A):A=e[22];const U=r.jsxs("h2",{className:"flex min-w-0 items-baseline gap-2 text-[0.9rem] font-medium tracking-tight text-foreground",children:[A,r.jsxs("span",{className:"truncate text-xs font-normal text-muted-foreground",children:[Le(t,l.ageDays)," ·"," ",He(i.language,l.day)]})]}),Y=G.length>1&&r.jsxs(he,{type:"single",variant:"segmented",size:"sm",value:l.scope,onValueChange:T=>{(T==="personal"||T==="org")&&v(T)},children:[r.jsx(V,{value:"personal",className:"px-2.5 text-xs",children:t("home.dailyBrief.personal")}),r.jsx(V,{value:"org",className:"px-2.5 text-xs",children:t("home.dailyBrief.org")})]});let E;e[23]!==t?(E=t("home.dailyBrief.fullscreen"),e[23]=t,e[24]=E):E=e[24];let L,H;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=()=>u(!0),H=r.jsx(xe,{size:14}),e[25]=L,e[26]=H):(L=e[25],H=e[26]);let F;e[27]!==E?(F=r.jsx(de,{label:E,onClick:L,children:H}),e[27]=E,e[28]=F):F=e[28];let I;e[29]!==Y||e[30]!==F?(I=r.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[Y,F]}),e[29]=Y,e[30]=F,e[31]=I):I=e[31],e[32]!==U||e[33]!==I?(p=r.jsxs("div",{className:"flex h-12 items-center justify-between gap-3 border-b border-border/70 px-5",children:[U,I]}),e[32]=U,e[33]=I,e[34]=p):p=e[34],S="h-[32rem]",f=ye,g=l.path,y=l.filename,j=l.size,C=c(l.path)}e[4]=n.data,e[5]=k.data,e[6]=i,e[7]=c,e[8]=d,e[9]=t,e[10]=a,e[11]=f,e[12]=l,e[13]=p,e[14]=b,e[15]=g,e[16]=y,e[17]=j,e[18]=C,e[19]=S,e[20]=_}else f=e[11],l=e[12],p=e[13],b=e[14],g=e[15],y=e[16],j=e[17],C=e[18],S=e[19],_=e[20];if(b!==Symbol.for("react.early_return_sentinel"))return b;let w;e[35]!==g||e[36]!==y||e[37]!==j||e[38]!==C?(w={key:g,filename:y,size:j,downloadUrl:C},e[35]=g,e[36]=y,e[37]=j,e[38]=C,e[39]=w):w=e[39];let N;e[40]!==f||e[41]!==w?(N=r.jsx(f,{file:w}),e[40]=f,e[41]=w,e[42]=N):N=e[42];let B;e[43]!==N||e[44]!==S?(B=r.jsx("div",{className:S,children:N}),e[43]=N,e[44]=S,e[45]=B):B=e[45];let $;e[46]!==l||e[47]!==x?($=x&&r.jsx(Se,{previewPath:`${O}/${l.path}`,onClose:()=>u(!1),showSeeInLibrary:!0}),e[46]=l,e[47]=x,e[48]=$):$=e[48];let P;return e[49]!==p||e[50]!==B||e[51]!==$||e[52]!==_?(P=r.jsxs("section",{className:_,children:[p,B,$]}),e[49]=p,e[50]=B,e[51]=$,e[52]=_,e[53]=P):P=e[53],P}function Oe(e){return e<12?"morning":e<18?"afternoon":"evening"}function ze(e){const t=(e??"").trim().split(/\s+/)[0];return t||null}function Ge(e,t){return t.toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long"})}function Ue(e){return e==="morning"?"overnight":"today"}function Ye(e,t){const i=new Date(t);return i.setHours(0,0,0,0),e==="morning"&&i.setHours(-6),i.getTime()}const Ze={morning:{named:"home.orgHome.greetingMorning",bare:"home.orgHome.greetingMorningBare"},afternoon:{named:"home.orgHome.greetingAfternoon",bare:"home.orgHome.greetingAfternoonBare"},evening:{named:"home.orgHome.greetingEvening",bare:"home.orgHome.greetingEveningBare"}};function qe(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx("div",{className:"flex min-h-64 items-center justify-center",children:r.jsx(ie,{className:"size-5 text-muted-foreground"})}),e[0]=t):t=e[0],t}function Ve(e,t,i,s,a){const n=Ue(i)==="overnight",m=[];if(t>0){const o=e(t===1?"home.brief.changeOne":"home.brief.changeMany",{count:t});m.push(e(n?"home.brief.overnightShipped":"home.brief.todayShipped",{changes:o}))}else s===0&&m.push(e(a>0?"home.brief.working":n?"home.brief.quietNight":"home.brief.quietDay"));return m.push(s===0?e("home.brief.waitingNone"):e(s===1?"home.brief.waitingOne":"home.brief.waitingMany",{count:s})),m.join(" ")}function We(e){const t=M.c(41),{canManageProjects:i,eyebrow:s,greeting:a,slot:n}=e,m=Z(),{org:o}=oe(),{data:D}=q.useSession();let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h={pageSize:1e3},t[0]=h):h=t[0];const k=$e(h),c=pe(),d=Ne(),{recent:v}=Be(o.slug);let x,u;if(t[1]!==k||t[2]!==i||t[3]!==o.id){u=Symbol.for("react.early_return_sentinel");e:{let B;t[6]!==o.id?(B=P=>P.id!==o.id,t[6]=o.id,t[7]=B):B=t[7];const $=Pe(k).filter(B);if($.length===0){let P;t[8]!==i?(P=r.jsx(ve,{canCreate:i}),t[8]=i,t[9]=P):P=t[9],u=P;break e}x=Ce($)}t[1]=k,t[2]=i,t[3]=o.id,t[4]=x,t[5]=u}else x=t[4],u=t[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;const f=x;let l,p;t[10]!==D?.user?.id||t[11]!==n||t[12]!==m||t[13]!==c?(p=_e(c,D?.user?.id),l=Ve(m,De(c,Ye(n,new Date)),n,p.length,we(c).length),t[10]=D?.user?.id,t[11]=n,t[12]=m,t[13]=c,t[14]=l,t[15]=p):(l=t[14],p=t[15]);const b=l;let g;t[16]!==s?(g=r.jsx("span",{className:"text-xs text-muted-foreground",children:s}),t[16]=s,t[17]=g):g=t[17];let y;t[18]!==b||t[19]!==a?(y=r.jsxs("h1",{className:"max-w-[40ch] text-2xl font-medium text-balance text-foreground",children:[a," ",b]}),t[18]=b,t[19]=a,t[20]=y):y=t[20];let j;t[21]!==g||t[22]!==y?(j=r.jsxs("div",{className:"flex flex-col gap-1",children:[g,y]}),t[21]=g,t[22]=y,t[23]=j):j=t[23];let C;t[24]===Symbol.for("react.memo_cache_sentinel")?(C=r.jsx(Re,{}),t[24]=C):C=t[24];let S;t[25]!==d.updates||t[26]!==f||t[27]!==o.slug||t[28]!==c||t[29]!==p?(S=r.jsx(fe,{waiting:p,tasks:c,mentions:d.updates,index:f,orgSlug:o.slug}),t[25]=d.updates,t[26]=f,t[27]=o.slug,t[28]=c,t[29]=p,t[30]=S):S=t[30];let _;t[31]!==o.slug||t[32]!==v?(_=r.jsx(ue,{recent:v,orgSlug:o.slug}),t[31]=o.slug,t[32]=v,t[33]=_):_=t[33];let w;t[34]!==c?(w=r.jsx(ge,{tasks:c}),t[34]=c,t[35]=w):w=t[35];let N;return t[36]!==_||t[37]!==w||t[38]!==j||t[39]!==S?(N=r.jsxs("div",{className:"flex flex-col gap-8",children:[j,C,S,_,w]}),t[36]=_,t[37]=w,t[38]=j,t[39]=S,t[40]=N):N=t[40],N}function Ke(){const e=M.c(25),t=Z(),[i]=X(),s=me("home_task_intake_enabled"),{data:a}=q.useSession(),{granted:n}=re("agents:manage");let m,o,D;if(e[0]!==i.language||e[1]!==a?.user?.name||e[2]!==t){const p=new Date,b=ze(a?.user?.name);o=Oe(p.getHours());const g=Ze[o];m=Ge(i.language,p),D=b?t(g.named,{name:b}):t(g.bare),e[0]=i.language,e[1]=a?.user?.name,e[2]=t,e[3]=m,e[4]=o,e[5]=D}else m=e[3],o=e[4],D=e[5];const h=D;let k;e[6]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(ce,{}),e[6]=k):k=e[6];let c;e[7]!==n?(c=n&&r.jsx(ke,{source:"org_home_header"}),e[7]=n,e[8]=c):c=e[8];let d;e[9]!==c?(d=r.jsx(R.Actions,{secondary:k,children:c}),e[9]=c,e[10]=d):d=e[10];let v;e[11]!==s?(v=s&&r.jsx(z.Suspense,{fallback:null,children:r.jsx(ae,{children:r.jsx(le,{children:r.jsx(se,{homeTaskComposer:!0})})})}),e[11]=s,e[12]=v):v=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(qe,{}),e[13]=x):x=e[13];let u;e[14]!==n||e[15]!==m||e[16]!==h||e[17]!==o?(u=r.jsx(z.Suspense,{fallback:x,children:r.jsx(We,{canManageProjects:n,eyebrow:m,greeting:h,slot:o})}),e[14]=n,e[15]=m,e[16]=h,e[17]=o,e[18]=u):u=e[18];let f;e[19]!==v||e[20]!==u?(f=r.jsx(R.Content,{children:r.jsxs(R.Container,{width:"wide",className:"flex min-h-full flex-col gap-10",children:[v,u]})}),e[19]=v,e[20]=u,e[21]=f):f=e[21];let l;return e[22]!==d||e[23]!==f?(l=r.jsxs(R,{children:[d,f]}),e[22]=d,e[23]=f,e[24]=l):l=e[24],l}function Io(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(ne.Content,{children:r.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{Io as default};
@@ -1 +0,0 @@
1
- import{r as s,cv as F,cw as L,j as c,fT as T,cB as x,cz as b,fS as U,cC as E,fU as w,ep as q,cO as _,cH as K,cS as V}from"./index-CcqLnTyv.js";var I="Radio",[z,P]=_(I),[H,W]=z(I),k=s.forwardRef((t,d)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:a,value:l="on",onCheck:f,form:R,...v}=t,[p,m]=s.useState(null),i=b(d,C=>m(C)),u=s.useRef(!1),h=p?R||!!p.closest("form"):!0;return c.jsxs(H,{scope:o,checked:e,disabled:a,children:[c.jsx(x.button,{type:"button",role:"radio","aria-checked":e,"data-state":A(e),"data-disabled":a?"":void 0,disabled:a,value:l,...v,ref:i,onClick:E(t.onClick,C=>{e||f?.(),h&&(u.current=C.isPropagationStopped(),u.current||C.stopPropagation())})}),h&&c.jsx(G,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:a,form:R,style:{transform:"translateX(-100%)"}})]})});k.displayName=I;var S="RadioIndicator",g=s.forwardRef((t,d)=>{const{__scopeRadio:o,forceMount:n,...e}=t,r=W(S,o);return c.jsx(q,{present:n||r.checked,children:c.jsx(x.span,{"data-state":A(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:d})})});g.displayName=S;var X="RadioBubbleInput",G=s.forwardRef(({__scopeRadio:t,control:d,checked:o,bubbles:n=!0,...e},r)=>{const a=s.useRef(null),l=b(a,r),f=K(o),R=V(d);return s.useEffect(()=>{const v=a.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),c.jsx(x.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});G.displayName=X;function A(t){return t?"checked":"unchecked"}var Y=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],y="RadioGroup",[J]=_(y,[w,P]),j=w(),N=P(),[Q,Z]=J(y),D=s.forwardRef((t,d)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:a=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=t,i=j(o),u=F(R),[h,C]=L({prop:r,defaultProp:e??null,onChange:p,caller:y});return c.jsx(Q,{scope:o,name:n,required:a,disabled:l,value:h,onValueChange:C,children:c.jsx(T,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:c.jsx(x.div,{role:"radiogroup","aria-required":a,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:d})})})});D.displayName=y;var M="RadioGroupItem",O=s.forwardRef((t,d)=>{const{__scopeRadioGroup:o,disabled:n,...e}=t,r=Z(M,o),a=r.disabled||n,l=j(o),f=N(o),R=s.useRef(null),v=b(d,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=h=>{Y.includes(h.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),c.jsx(U,{asChild:!0,...l,focusable:!a,active:p,children:c.jsx(k,{disabled:a,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:E(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:E(e.onFocus,()=>{m.current&&R.current?.click()})})})});O.displayName=M;var $="RadioGroupIndicator",B=s.forwardRef((t,d)=>{const{__scopeRadioGroup:o,...n}=t,e=N(o);return c.jsx(g,{...e,...n,ref:d})});B.displayName=$;var oe=D,re=O,te=B;export{re as I,oe as R,te as a};
@@ -1 +0,0 @@
1
- import{c as H,b as U,r as Y,m as B,j as t,a5 as Ke,d as Ge,aB as Je,l as Ve,H as Qe,ar as Pe,L as Me,$ as Ze,E as ge,at as We,aC as et,P as tt}from"./index-CcqLnTyv.js";import{u as ke,c as He,i as st,j as it,k as nt,l as rt}from"./use-sidebar-collapsed-B34u6RwD.js";import{S as lt,a as ot,b as at}from"./sheet-B2jsXlHJ.js";import{u as ct}from"./use-mobile-BgN1E82d.js";import{u as dt,a as ut,D as ft,c as mt,C as ht,P as gt}from"./core.esm-DkzVh4mV.js";import{S as pt,v as xt,u as bt}from"./sortable.esm-BHALCXRV.js";import{i as jt}from"./Tool01-BTDYOKsB.js";import{B as vt,A as yt,C as De,l as St}from"./agent-icon-DqjTL3cE.js";import{s as wt}from"./Plus-D8rFucQH.js";import{i as Ct}from"./UserSquare-BJHrMhrM.js";import{s as Ot}from"./XClose-BDiB_Nvo.js";import{a as pe,T as xe,c as be}from"./tooltip-AKf-E49i.js";import{C as Le,f as _t,g as zt,e as Rt}from"./context-menu-CmlGLO8r.js";import{a as Nt,O as Be,w as Tt,b as Lt,c as Et,E as Pt,r as we,d as kt,e as At,h as Dt,t as It,f as Fe,m as $t,o as Kt}from"./shell-layout-CBX9BtMX.js";import{C as Mt}from"./create-organization-dialog-_VIsUUpV.js";import{P as Wt}from"./project-apps-sFKq8oaX.js";import{u as Ht,a as Bt}from"./use-recent-apps-DD97o_H1.js";import{a as Ft}from"./use-navigate-to-agent-DmfSMV3R.js";import{a as Xt,u as Yt}from"./use-project-scope-Cb4T7-Pe.js";import{C as Ie,a as Ut,b as qt,c as Gt,d as Jt}from"./command-CtR4gjCr.js";import{u as Vt}from"./use-debounced-value-CcMMD4Qy.js";function Qt(n){const e=H.c(48),{open:s,onOpenChange:i,orgs:l,currentSlug:c,onSelect:r}=n,o=U(),[a,u]=Y.useState("");let g;e[0]!==a?(g=a.trim(),e[0]=a,e[1]=g):g=e[1];const h=g,m=Vt(h,150),f=h.length>0,d=m===h,{hits:b,isSearching:x,isStale:w,isError:y}=Nt(f?m:""),j=f?b:l;let S;e[2]!==i?(S=k=>{i(k),k||u("")},e[2]=i,e[3]=S):S=e[3];const p=S;let v;e[4]!==o?(v=o("sidebar.rail.searchOrganizations"),e[4]=o,e[5]=v):v=e[5];let C;e[6]!==o?(C=o("sidebar.rail.searchPlaceholder"),e[6]=o,e[7]=C):C=e[7];let N;e[8]!==o?(N=o("sidebar.rail.searchPlaceholder"),e[8]=o,e[9]=N):N=e[9];let O;e[10]!==a||e[11]!==N?(O=t.jsx(Ut,{value:a,onValueChange:u,placeholder:N}),e[10]=a,e[11]=N,e[12]=O):O=e[12];const P=f&&(w||!d)&&"opacity-50";let R;e[13]!==P?(R=B(P),e[13]=P,e[14]=R):R=e[14];let _;e[15]!==y||e[16]!==f||e[17]!==o?(_=f&&y&&t.jsx(Ie,{children:o("sidebar.rail.searchFailed")}),e[15]=y,e[16]=f,e[17]=o,e[18]=_):_=e[18];let T;e[19]!==y||e[20]!==x||e[21]!==j.length||e[22]!==d||e[23]!==o?(T=!y&&d&&!x&&j.length===0&&t.jsx(Ie,{children:o("sidebar.rail.searchEmpty")}),e[19]=y,e[20]=x,e[21]=j.length,e[22]=d,e[23]=o,e[24]=T):T=e[24];let L;if(e[25]!==c||e[26]!==r||e[27]!==p||e[28]!==j||e[29]!==o){let k;e[31]!==c||e[32]!==r||e[33]!==p||e[34]!==o?(k=A=>t.jsxs(qt,{value:A.slug,onSelect:()=>{p(!1),A.slug!==c&&r(A.slug)},className:"gap-2.5",children:[t.jsx(Be,{org:A,size:"sm"}),t.jsx("span",{className:"min-w-0 flex-1 truncate",children:A.name}),A.slug===c&&t.jsx("span",{className:"text-meta shrink-0",children:o("sidebar.rail.currentOrganization")})]},A.id),e[31]=c,e[32]=r,e[33]=p,e[34]=o,e[35]=k):k=e[35],L=j.map(k),e[25]=c,e[26]=r,e[27]=p,e[28]=j,e[29]=o,e[30]=L}else L=e[30];let z;e[36]!==T||e[37]!==L||e[38]!==R||e[39]!==_?(z=t.jsxs(Gt,{className:R,children:[_,T,L]}),e[36]=T,e[37]=L,e[38]=R,e[39]=_,e[40]=z):z=e[40];let D;return e[41]!==s||e[42]!==p||e[43]!==z||e[44]!==v||e[45]!==C||e[46]!==O?(D=t.jsxs(Jt,{open:s,onOpenChange:p,title:v,description:C,shouldFilter:!1,children:[O,z]}),e[41]=s,e[42]=p,e[43]=z,e[44]=v,e[45]=C,e[46]=O,e[47]=D):D=e[47],D}function Ce(n){const e=H.c(11),{active:s,label:i,children:l}=n,c=s?"h-7 opacity-100":"h-2 opacity-0 group-hover/rail:opacity-60";let r;e[0]!==c?(r=B("w-1 rounded-r-full bg-foreground","transition-[height,opacity] duration-200 ease-[var(--ease-out-cubic)]","motion-reduce:transition-none",c),e[0]=c,e[1]=r):r=e[1];let o;e[2]!==r?(o=t.jsx("span",{"aria-hidden":!0,className:"absolute top-0 -left-2.5 flex h-9 items-center",children:t.jsx("span",{className:r})}),e[2]=r,e[3]=o):o=e[3];let a;e[4]!==s||e[5]!==i?(a=i&&t.jsx("span",{"aria-hidden":!0,className:B("line-clamp-2 w-full px-0.5 text-center text-2xs text-ellipsis transition-colors",s?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground"),children:i}),e[4]=s,e[5]=i,e[6]=a):a=e[6];let u;return e[7]!==l||e[8]!==o||e[9]!==a?(u=t.jsxs("div",{className:"group/rail relative flex w-full shrink-0 flex-col items-center gap-1",children:[o,l,a]}),e[7]=l,e[8]=o,e[9]=a,e[10]=u):u=e[10],u}function Zt(n){return globalThis.addEventListener("resize",n),()=>globalThis.removeEventListener("resize",n)}const es=()=>Fe(globalThis.innerHeight),ts=()=>Fe(0);function ss(n){const e=H.c(59),{org:s,active:i,onSelect:l,pinned:c,onOpenSettings:r,onTogglePin:o,onHide:a}=n,u=U();let g;e[0]!==s.slug?(g={id:s.slug},e[0]=s.slug,e[1]=g):g=e[1];const{setNodeRef:h,listeners:m,transform:f,transition:d,isDragging:b}=bt(g);let x;e[2]!==f?(x=ht.Transform.toString(f?{...f,x:0}:null),e[2]=f,e[3]=x):x=e[3];const w=b?1:void 0,y=`rail-org-${s.slug}`;let j;e[4]!==x||e[5]!==w||e[6]!==y||e[7]!==d?(j={transform:x,transition:d,zIndex:w,viewTransitionName:y},e[4]=x,e[5]=w,e[6]=y,e[7]=d,e[8]=j):j=e[8];const S=s.name,p=i||void 0,v=i?"opacity-100":"opacity-60 hover:scale-105 hover:opacity-100",C=l&&"cursor-pointer";let N;e[9]!==v||e[10]!==C?(N=B("relative flex shrink-0 items-center justify-center rounded-xl focus-ring","transition-[opacity,transform] duration-150 ease-out",v,C),e[9]=v,e[10]=C,e[11]=N):N=e[11];let O;e[12]!==s?(O=t.jsx(Be,{org:s,size:"lg"}),e[12]=s,e[13]=O):O=e[13];let P;e[14]!==c?(P=c&&t.jsx("span",{"aria-hidden":!0,className:"absolute -top-1 -right-1 flex size-4 items-center justify-center rounded-full bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar",children:t.jsx(De,{size:9})}),e[14]=c,e[15]=P):P=e[15];let R;e[16]!==l||e[17]!==s.name||e[18]!==N||e[19]!==O||e[20]!==P||e[21]!==p?(R=t.jsx(xe,{asChild:!0,children:t.jsx(_t,{asChild:!0,children:t.jsxs("button",{type:"button","aria-label":S,"aria-current":p,onClick:l,className:N,children:[O,P]})})}),e[16]=l,e[17]=s.name,e[18]=N,e[19]=O,e[20]=P,e[21]=p,e[22]=R):R=e[22];let _;e[23]!==s.name?(_=t.jsx(pe,{side:"right",children:s.name}),e[23]=s.name,e[24]=_):_=e[24];let T;e[25]!==R||e[26]!==_?(T=t.jsxs(be,{children:[R,_]}),e[25]=R,e[26]=_,e[27]=T):T=e[27];let L;e[28]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(St,{}),e[28]=L):L=e[28];let z;e[29]!==u?(z=u("sidebar.rail.organizationSettings"),e[29]=u,e[30]=z):z=e[30];let D;e[31]!==r||e[32]!==z?(D=t.jsxs(Le,{onSelect:r,children:[L,z]}),e[31]=r,e[32]=z,e[33]=D):D=e[33];let k;e[34]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(De,{}),e[34]=k):k=e[34];let A;e[35]!==c||e[36]!==u?(A=u(c?"sidebar.rail.unpinOrganization":"sidebar.rail.pinOrganization"),e[35]=c,e[36]=u,e[37]=A):A=e[37];let K;e[38]!==o||e[39]!==A?(K=t.jsxs(Le,{onSelect:o,children:[k,A]}),e[38]=o,e[39]=A,e[40]=K):K=e[40];let M;e[41]!==a||e[42]!==u?(M=a&&t.jsxs(Le,{onSelect:a,children:[t.jsx(jt,{}),u("sidebar.rail.hideOrganization")]}),e[41]=a,e[42]=u,e[43]=M):M=e[43];let F;e[44]!==D||e[45]!==K||e[46]!==M?(F=t.jsxs(zt,{children:[D,K,M]}),e[44]=D,e[45]=K,e[46]=M,e[47]=F):F=e[47];let $;e[48]!==T||e[49]!==F?($=t.jsxs(Rt,{children:[T,F]}),e[48]=T,e[49]=F,e[50]=$):$=e[50];let W;e[51]!==i||e[52]!==$?(W=t.jsx(Ce,{active:i,children:$}),e[51]=i,e[52]=$,e[53]=W):W=e[53];let X;return e[54]!==m||e[55]!==h||e[56]!==W||e[57]!==j?(X=t.jsx("div",{ref:h,...m,style:j,className:"w-full shrink-0 touch-none",children:W}),e[54]=m,e[55]=h,e[56]=W,e[57]=j,e[58]=X):X=e[58],X}function is(n){const e=H.c(64),{project:s,orgSlug:i,active:l,onClose:c,onNavigate:r}=n,o=U();let a,u,g,h,m,f,d,b,x,w,y;if(e[0]!==l||e[1]!==r||e[2]!==i||e[3]!==s.icon||e[4]!==s.id||e[5]!==s.title){const k=vt(s.icon,s.title);y="group/rail relative flex w-full flex-col items-center gap-1",g=be,u=xe,w=!0,a=Me,h=Ze.root,e[17]!==i||e[18]!==s.id?(m={org:i,agentId:s.id},e[17]=i,e[18]=s.id,e[19]=m):m=e[19],f=s.title,d=l||void 0,e[20]!==r?(b=()=>{ge("org_rail_recent_project_opened"),r?.()},e[20]=r,e[21]=b):b=e[21],x=B("flex shrink-0 rounded-lg focus-ring",k.text,l&&"ring-[1.5px] ring-current"),e[0]=l,e[1]=r,e[2]=i,e[3]=s.icon,e[4]=s.id,e[5]=s.title,e[6]=a,e[7]=u,e[8]=g,e[9]=h,e[10]=m,e[11]=f,e[12]=d,e[13]=b,e[14]=x,e[15]=w,e[16]=y}else a=e[6],u=e[7],g=e[8],h=e[9],m=e[10],f=e[11],d=e[12],b=e[13],x=e[14],w=e[15],y=e[16];let j;e[22]!==s.icon||e[23]!==s.title?(j=t.jsx(yt,{icon:s.icon,name:s.title,size:"sm",className:"size-8 rounded-lg"}),e[22]=s.icon,e[23]=s.title,e[24]=j):j=e[24];let S;e[25]!==a||e[26]!==h||e[27]!==m||e[28]!==f||e[29]!==d||e[30]!==b||e[31]!==x||e[32]!==j?(S=t.jsx(a,{to:h,params:m,"aria-label":f,"aria-current":d,onClick:b,className:x,children:j}),e[25]=a,e[26]=h,e[27]=m,e[28]=f,e[29]=d,e[30]=b,e[31]=x,e[32]=j,e[33]=S):S=e[33];let p;e[34]!==u||e[35]!==S||e[36]!==w?(p=t.jsx(u,{asChild:w,children:S}),e[34]=u,e[35]=S,e[36]=w,e[37]=p):p=e[37];let v;e[38]!==s.title?(v=t.jsx(pe,{side:"right",children:s.title}),e[38]=s.title,e[39]=v):v=e[39];let C;e[40]!==g||e[41]!==p||e[42]!==v?(C=t.jsxs(g,{children:[p,v]}),e[40]=g,e[41]=p,e[42]=v,e[43]=C):C=e[43];const N=l?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground";let O;e[44]!==N?(O=B("line-clamp-2 w-full text-center text-2xs break-words transition-colors",N),e[44]=N,e[45]=O):O=e[45];let P;e[46]!==s.title||e[47]!==O?(P=t.jsx("span",{"aria-hidden":!0,className:O,children:s.title}),e[46]=s.title,e[47]=O,e[48]=P):P=e[48];let R;e[49]!==s.title||e[50]!==o?(R=o("sidebar.rail.closeApp",{name:s.title}),e[49]=s.title,e[50]=o,e[51]=R):R=e[51];let _;e[52]!==c?(_=()=>{ge("org_rail_recent_project_closed"),c()},e[52]=c,e[53]=_):_=e[53];let T,L;e[54]===Symbol.for("react.memo_cache_sentinel")?(T=B("absolute -top-1.5 right-[calc(50%-1.25rem)] flex size-4 cursor-pointer items-center justify-center rounded-full","bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar hover:text-foreground","opacity-0 transition-opacity duration-150 group-hover/rail:opacity-100 focus-visible:opacity-100 focus-visible:outline-none"),L=t.jsx(Ot,{size:10}),e[54]=T,e[55]=L):(T=e[54],L=e[55]);let z;e[56]!==R||e[57]!==_?(z=t.jsx("button",{type:"button","aria-label":R,onClick:_,className:T,children:L}),e[56]=R,e[57]=_,e[58]=z):z=e[58];let D;return e[59]!==C||e[60]!==P||e[61]!==z||e[62]!==y?(D=t.jsxs("div",{className:y,children:[C,P,z]}),e[59]=C,e[60]=P,e[61]=z,e[62]=y,e[63]=D):D=e[63],D}const ns={"site-editor":"/site-editor"};function rs(n){const e=H.c(26),{app:s}=n,i=U(),l=Wt[s],c=ns[s];if(!l||!c)return null;let r;e[0]!==l.labelKey||e[1]!==i?(r=i(l.labelKey),e[0]=l.labelKey,e[1]=i,e[2]=r):r=e[2];let o;e[3]!==l.labelKey||e[4]!==i?(o=i(l.labelKey),e[3]=l.labelKey,e[4]=i,e[5]=o):o=e[5];let a;e[6]!==l.tone?(a=B("flex size-9 shrink-0 items-center justify-center rounded-xl focus-ring opacity-100",l.tone),e[6]=l.tone,e[7]=a):a=e[7];let u;e[8]!==l.Icon?(u=t.jsx(l.Icon,{size:18}),e[8]=l.Icon,e[9]=u):u=e[9];let g;e[10]!==o||e[11]!==a||e[12]!==u||e[13]!==c?(g=t.jsx(xe,{asChild:!0,children:t.jsx(Me,{to:c,"aria-label":o,"aria-current":"page","data-testid":"org-rail-local-app",className:a,children:u})}),e[10]=o,e[11]=a,e[12]=u,e[13]=c,e[14]=g):g=e[14];let h;e[15]!==l.labelKey||e[16]!==i?(h=i(l.labelKey),e[15]=l.labelKey,e[16]=i,e[17]=h):h=e[17];let m;e[18]!==h?(m=t.jsx(pe,{side:"right",children:h}),e[18]=h,e[19]=m):m=e[19];let f;e[20]!==g||e[21]!==m?(f=t.jsxs(be,{children:[g,m]}),e[20]=g,e[21]=m,e[22]=f):f=e[22];let d;return e[23]!==r||e[24]!==f?(d=t.jsx(Ce,{active:!0,label:r,children:f}),e[23]=r,e[24]=f,e[25]=d):d=e[25],d}function ls(){const{org:n}=Ke();return Ht(n.slug),null}function Xe(n){const e=H.c(76),{onNavigate:s}=n===void 0?{}:n,i=U(),l=Ge(),{org:c}=Ke(),r=Je();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={select:ds},e[0]=o):o=e[0];const a=Ve(o);let u;e[1]!==a||e[2]!==r?(u=a?r({to:"/$org",fuzzy:!0,pending:!0}):!1,e[1]=a,e[2]=r,e[3]=u):u=e[3];const g=u,h=g?g.org:c.slug,{data:m}=Qe(),[f,d]=Y.useState(!1),[b,x]=Y.useState(!1),w=ke(),{recent:y,forget:j}=Ft(c.slug),{projects:S}=Xt(),p=Yt(),v=Bt(),C=v&&v.projectId===null?v.app:null,N=C?[]:y.flatMap(E=>S.filter(I=>I.id===E)),O=Tt(m??[],c),{recent:P}=Lt(),R=Et();let _;e[4]===Symbol.for("react.memo_cache_sentinel")?(_=We.railOrgPrefs(),e[4]=_):_=e[4];const[T,L]=Pe(_,Pt),z=we(T),D=Y.useSyncExternalStore(Zt,es,ts),{shown:k}=kt(At(O,z,c.slug),P,c.slug,D,z.pinned);let A;e[5]===Symbol.for("react.memo_cache_sentinel")?(A={activationConstraint:{distance:8}},e[5]=A):A=e[5];const K=dt(ut(gt,A)),M=E=>{const{active:I,over:Ae}=E;Ae&&(ge("org_rail_reordered"),L(qe=>$t(we(qe),k.map(cs),String(I.id),String(Ae.id))))},F=E=>{s?.(),l({to:"/$org/home",params:{org:E},viewTransition:!0})},$=E=>{ge("org_rail_travel"),s?.(),R(E,k.map(as))},W=()=>{if(ge("org_rail_search_opened"),!c.id){x(!0);return}s?.(),Kt()},X=!w&&"border-r border-sidebar-border";let q;e[6]!==X?(q=B("flex w-[68px] shrink-0 flex-col bg-sidebar",X),e[6]=X,e[7]=q):q=e[7];const Ue="flex min-h-0 flex-1 flex-col items-center gap-2.5 overflow-y-auto px-2.5 pt-3 pb-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden";let G;e[8]!==i?(G=i("sidebar.rail.ariaLabel"),e[8]=i,e[9]=G):G=e[9];const Oe=ft,_e=mt,ze=pt,Re=k.map(os),Ne=xt,Te=k.map(E=>t.jsxs(Y.Fragment,{children:[t.jsx(ss,{org:E,active:E.slug===h,pinned:z.pinned.includes(E.slug),onSelect:E.slug!==c.slug?()=>$(E.slug):p?()=>F(E.slug):void 0,onOpenSettings:()=>{s?.(),l({to:"/$org/settings",params:{org:E.slug}})},onTogglePin:()=>L(I=>It(we(I),E.slug)),onHide:E.slug===c.slug?void 0:()=>L(I=>Dt(we(I),E.slug))}),E.slug===c.slug&&N.length>0&&t.jsx("div",{style:{viewTransitionName:"rail-projects"},className:"-mx-1.5 flex w-[calc(100%+0.75rem)] flex-col items-center gap-3 rounded-[12px] bg-foreground/4 px-1 py-3",children:N.map(I=>t.jsx(is,{project:I,orgSlug:c.slug,active:p===I.id,onClose:()=>j(I.id),onNavigate:s},I.id))})]},E.id));let J;e[10]!==ze||e[11]!==Re||e[12]!==Ne||e[13]!==Te?(J=t.jsx(ze,{items:Re,strategy:Ne,children:Te}),e[10]=ze,e[11]=Re,e[12]=Ne,e[13]=Te,e[14]=J):J=e[14];let V;e[15]!==Oe||e[16]!==M||e[17]!==K||e[18]!==_e||e[19]!==J?(V=t.jsx(Oe,{sensors:K,collisionDetection:_e,onDragEnd:M,children:J}),e[15]=Oe,e[16]=M,e[17]=K,e[18]=_e,e[19]=J,e[20]=V):V=e[20];let Q;e[21]!==C?(Q=C&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"my-2 h-px w-6 shrink-0 bg-sidebar-border","aria-hidden":!0}),t.jsx(rs,{app:C})]}),e[21]=C,e[22]=Q):Q=e[22];let Z;e[23]!==V||e[24]!==Q||e[25]!==G?(Z=t.jsxs("div",{className:Ue,"aria-label":G,children:[V,Q]}),e[23]=V,e[24]=Q,e[25]=G,e[26]=Z):Z=e[26];let ee;e[27]!==i?(ee=i("sidebar.rail.search"),e[27]=i,e[28]=ee):ee=e[28];let je;e[29]===Symbol.for("react.memo_cache_sentinel")?(je=t.jsx(Ct,{size:18}),e[29]=je):je=e[29];let te;e[30]!==W||e[31]!==ee?(te=t.jsx(xe,{asChild:!0,children:t.jsx("button",{type:"button","aria-label":ee,"aria-keyshortcuts":"Meta+K Control+K",onClick:W,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:je})}),e[30]=W,e[31]=ee,e[32]=te):te=e[32];let se;e[33]!==i?(se=i("sidebar.rail.search"),e[33]=i,e[34]=se):se=e[34];let ve;e[35]===Symbol.for("react.memo_cache_sentinel")?(ve=t.jsx("span",{className:"ml-2 text-muted-foreground",children:et.commandPalette.keys.join("")}),e[35]=ve):ve=e[35];let ie;e[36]!==se?(ie=t.jsxs(pe,{side:"right",children:[se,ve]}),e[36]=se,e[37]=ie):ie=e[37];let ne;e[38]!==te||e[39]!==ie?(ne=t.jsx(Ce,{active:!1,children:t.jsxs(be,{children:[te,ie]})}),e[38]=te,e[39]=ie,e[40]=ne):ne=e[40];let re;e[41]!==i?(re=i("sidebar.picker.newOrganization"),e[41]=i,e[42]=re):re=e[42];let le;e[43]!==d?(le=()=>d(!0),e[43]=d,e[44]=le):le=e[44];let ye;e[45]===Symbol.for("react.memo_cache_sentinel")?(ye=t.jsx(wt,{size:18}),e[45]=ye):ye=e[45];let oe;e[46]!==re||e[47]!==le?(oe=t.jsx(xe,{asChild:!0,children:t.jsx("button",{type:"button","aria-label":re,onClick:le,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:ye})}),e[46]=re,e[47]=le,e[48]=oe):oe=e[48];let ae;e[49]!==i?(ae=i("sidebar.picker.newOrganization"),e[49]=i,e[50]=ae):ae=e[50];let ce;e[51]!==ae?(ce=t.jsx(pe,{side:"right",children:ae}),e[51]=ae,e[52]=ce):ce=e[52];let de;e[53]!==oe||e[54]!==ce?(de=t.jsx(Ce,{active:!1,children:t.jsxs(be,{children:[oe,ce]})}),e[53]=oe,e[54]=ce,e[55]=de):de=e[55];let ue;e[56]!==ne||e[57]!==de?(ue=t.jsxs("div",{className:"flex shrink-0 flex-col items-center gap-1 px-2.5 pt-2 pb-3",children:[ne,de]}),e[56]=ne,e[57]=de,e[58]=ue):ue=e[58];let fe;e[59]!==Z||e[60]!==ue||e[61]!==q?(fe=t.jsxs("div",{className:q,children:[Z,ue]}),e[59]=Z,e[60]=ue,e[61]=q,e[62]=fe):fe=e[62];let me;e[63]!==c.slug||e[64]!==O||e[65]!==b||e[66]!==x||e[67]!==$?(me=t.jsx(Qt,{open:b,onOpenChange:x,orgs:O,currentSlug:c.slug,onSelect:$}),e[63]=c.slug,e[64]=O,e[65]=b,e[66]=x,e[67]=$,e[68]=me):me=e[68];let he;e[69]!==f||e[70]!==d?(he=t.jsx(Mt,{open:f,onOpenChange:d}),e[69]=f,e[70]=d,e[71]=he):he=e[71];let Se;return e[72]!==fe||e[73]!==me||e[74]!==he?(Se=t.jsxs(t.Fragment,{children:[fe,me,he]}),e[72]=fe,e[73]=me,e[74]=he,e[75]=Se):Se=e[75],Se}function os(n){return n.slug}function as(n){return n.slug}function cs(n){return n.slug}function ds(n){return n.isLoading}function us(n){const e=H.c(15),{width:s,minWidth:i,maxWidth:l,onPointerDown:c,onKeyDown:r,onDoubleClick:o}=n,a=U(),{isMobile:u}=He(),g=ke();if(u||g)return null;let h;e[0]!==a?(h=a("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=a,e[1]=h):h=e[1];let m;e[2]!==a?(m=a("sidebar.sidebarResizeHandle.title"),e[2]=a,e[3]=m):m=e[3];let f,d;e[4]===Symbol.for("react.memo_cache_sentinel")?(f={left:"var(--sidebar-width)"},d=t.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 group-focus-visible/resize:bg-ring"}),e[4]=f,e[5]=d):(f=e[4],d=e[5]);let b;return e[6]!==l||e[7]!==i||e[8]!==o||e[9]!==r||e[10]!==c||e[11]!==h||e[12]!==m||e[13]!==s?(b=t.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":h,"aria-valuenow":s,"aria-valuemin":i,"aria-valuemax":l,title:m,tabIndex:0,onPointerDown:c,onKeyDown:r,onDoubleClick:o,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize focus-visible:outline-none",style:f,children:d}),e[6]=l,e[7]=i,e[8]=o,e[9]=r,e[10]=c,e[11]=h,e[12]=m,e[13]=s,e[14]=b):b=e[14],b}const Ee=400,$e=16,fs="sidebar.width.v2";function ms(){const n=H.c(14),e=hs;let s;n[0]===Symbol.for("react.memo_cache_sentinel")?(s=d=>typeof d=="number"?e(d):192,n[0]=s):s=n[0];const[i,l]=Pe(fs,s),c=Y.useRef(null);let r;n[1]!==l||n[2]!==i?(r=d=>{d.preventDefault();const b=d.clientX,x=e(i),w=c.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),y=w?Array.from(w.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const p of y)p.style.transition="none";const j=p=>{const v=e(x+(p.clientX-b));w?.style.setProperty("--sidebar-width",`${v}px`)},S=p=>{const v=e(x+(p.clientX-b));l(v);for(const C of y)C.style.transition="";window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",S),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",j),window.addEventListener("pointerup",S),window.addEventListener("pointercancel",S)},n[1]=l,n[2]=i,n[3]=r):r=n[3];const o=r;let a;n[4]!==l?(a=()=>{l(192)},n[4]=l,n[5]=a):a=n[5];const u=a;let g;n[6]!==l||n[7]!==i?(g=d=>{if(d.key==="ArrowLeft")l(e(i-$e));else if(d.key==="ArrowRight")l(e(i+$e));else if(d.key==="Home")l(192);else if(d.key==="End")l(Ee);else return;d.preventDefault()},n[6]=l,n[7]=i,n[8]=g):g=n[8];const h=g,m=e(i);let f;return n[9]!==h||n[10]!==o||n[11]!==u||n[12]!==m?(f={width:m,minWidth:192,maxWidth:Ee,wrapperRef:c,onStartResize:o,onKeyDownResize:h,resetWidth:u},n[9]=h,n[10]=o,n[11]=u,n[12]=m,n[13]=f):f=n[13],f}function hs(n){return Math.max(192,Math.min(Ee,n))}const Ye=Y.createContext(null);function gs(){const n=Y.use(Ye);if(!n)throw new Error("Layout regions require a Layout");return n}function ps({children:n,notice:e,outsideOrg:s}){const i=ct(),[l,c]=Pe(We.sidebarOpen(),!0),r=ms();return t.jsx(Ye,{value:{isMobile:i,resize:r},children:t.jsx(st,{open:l,onOpenChange:c,children:t.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,t.jsxs("div",{className:"flex flex-1 flex-row min-h-0",children:[!s&&t.jsx(ls,{}),!i&&(s?.rail??!0)&&t.jsx(Xe,{}),t.jsx(it,{ref:r.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${r.width}px`,"--sidebar-width-icon":"0px"},children:t.jsx(nt,{children:n})})]})]})})})}function xs(n){const e=H.c(36),{children:s,renderMobile:i}=n,l=U(),{isMobile:c,resize:r}=gs(),{openMobile:o,setOpenMobile:a}=He(),u=ke();let g;e[0]!==a?(g=()=>a(!1),e[0]=a,e[1]=g):g=e[1];const h=g;if(!c){let S;e[2]!==s||e[3]!==u?(S=t.jsx("div",{className:"contents",inert:u,children:s}),e[2]=s,e[3]=u,e[4]=S):S=e[4];let p;e[5]!==r.maxWidth||e[6]!==r.minWidth||e[7]!==r.onKeyDownResize||e[8]!==r.onStartResize||e[9]!==r.resetWidth||e[10]!==r.width?(p=t.jsx(us,{width:r.width,minWidth:r.minWidth,maxWidth:r.maxWidth,onPointerDown:r.onStartResize,onKeyDown:r.onKeyDownResize,onDoubleClick:r.resetWidth}),e[5]=r.maxWidth,e[6]=r.minWidth,e[7]=r.onKeyDownResize,e[8]=r.onStartResize,e[9]=r.resetWidth,e[10]=r.width,e[11]=p):p=e[11];let v;return e[12]!==S||e[13]!==p?(v=t.jsxs(t.Fragment,{children:[S,p]}),e[12]=S,e[13]=p,e[14]=v):v=e[14],v}let m;e[15]!==l?(m=l("layouts.shellControls.navigationTitle"),e[15]=l,e[16]=m):m=e[16];let f;e[17]!==m?(f=t.jsx(lt,{className:"sr-only",children:m}),e[17]=m,e[18]=f):f=e[18];let d;e[19]!==h?(d=t.jsx(Xe,{onNavigate:h}),e[19]=h,e[20]=d):d=e[20];let b;e[21]!==h||e[22]!==i?(b=i({onClose:h}),e[21]=h,e[22]=i,e[23]=b):b=e[23];let x;e[24]!==b?(x=t.jsx("div",{className:"min-w-0 flex-1",children:b}),e[24]=b,e[25]=x):x=e[25];let w;e[26]!==d||e[27]!==x?(w=t.jsxs("div",{className:"flex h-full min-h-0",children:[d,x]}),e[26]=d,e[27]=x,e[28]=w):w=e[28];let y;e[29]!==f||e[30]!==w?(y=t.jsxs(ot,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",onOpenAutoFocus:bs,children:[f,w]}),e[29]=f,e[30]=w,e[31]=y):y=e[31];let j;return e[32]!==o||e[33]!==a||e[34]!==y?(j=t.jsx(at,{open:o,onOpenChange:a,children:y}),e[32]=o,e[33]=a,e[34]=y,e[35]=j):j=e[35],j}function bs(n){return n.preventDefault()}function js(n){const e=H.c(3),{children:s}=n;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={background:"transparent",containerType:"inline-size"},e[0]=i):i=e[0];let l;return e[1]!==s?(l=t.jsx(rt,{className:"flex flex-col min-h-0",style:i,children:t.jsx(tt,{variant:"plain",className:"bg-sidebar",children:t.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s})})}),e[1]=s,e[2]=l):l=e[2],l}const Ws=Object.assign(ps,{Sidebar:xs,Content:js});export{Ws as L};