decocms 4.367.1 → 4.367.3

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 (372) hide show
  1. package/dist/client/assets/{AlertCircle-DdgoOwtf.js → AlertCircle-JAw4DKWg.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BLqeL-Kr.js → AreaChart-BFPD44c-.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-BgfGskGd.js → ArrowLeft-C4ws2vta.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-JlpBR4ak.js → ArrowRight-CGkzbTs-.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-DjsVuNpG.js → ArrowUp-CW9s78t7.js} +1 -1
  6. package/dist/client/assets/{Check-BXALxZkV.js → Check-BnJHwdzA.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-CYg2Tr69.js → CheckCircle-D72wsOXz.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-Xore976n.js → ChevronRight-CIuRctG6.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-doBmaKp2.js → ChevronUp-CUHmZknM.js} +1 -1
  10. package/dist/client/assets/{Copy01-CYJaDzON.js → Copy01-CAnIcRR7.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-CKEZM-Nk.js → CreditCard01-Byf14Zko.js} +1 -1
  12. package/dist/client/assets/{Database01-Dy1ntHiO.js → Database01-DhxHwIba.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-k3X_09Zf.js → DotsVertical-DZxfXATf.js} +1 -1
  14. package/dist/client/assets/{Download01-DKDz2dFy.js → Download01-BKhvQC2t.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-BURHauSf.js → ErrorBarContext-IFeY1HCC.js} +1 -1
  16. package/dist/client/assets/{Eye-4t1Q1x_N.js → Eye-CeLsr2wK.js} +1 -1
  17. package/dist/client/assets/{File02-Cdpbi8-q.js → File02-Ic5DSfbF.js} +1 -1
  18. package/dist/client/assets/{GitBranch01-rv2uDVH5.js → GitBranch01-llYG9Xp9.js} +1 -1
  19. package/dist/client/assets/{Globe01-H_L1039P.js → Globe01-BxZcqfmG.js} +1 -1
  20. package/dist/client/assets/{HardDrive-Cxw5uymp.js → HardDrive-D8M2f43J.js} +1 -1
  21. package/dist/client/assets/{Image01-CXL1rUab.js → Image01-CAvGw-jw.js} +1 -1
  22. package/dist/client/assets/{Key01-Z_LVLfYi.js → Key01-MvLRbpTL.js} +1 -1
  23. package/dist/client/assets/{Link01-DKxJL9wE.js → Link01-BFGs7SHa.js} +1 -1
  24. package/dist/client/assets/{LinkExternal01-BaNEiZ-Z.js → LinkExternal01-_FElc0p1.js} +1 -1
  25. package/dist/client/assets/{MessageCircle01-nOnaif4r.js → MessageCircle01-BIIEDxFs.js} +1 -1
  26. package/dist/client/assets/{Monitor01-M9EpHieD.js → Monitor01-CgVSaEtw.js} +1 -1
  27. package/dist/client/assets/{Package-bors0uR9.js → Package-rfI0qNYd.js} +1 -1
  28. package/dist/client/assets/{Palette-BTRMSHWm.js → Palette-DWgPkj9P.js} +1 -1
  29. package/dist/client/assets/{Play-zxSLSkrU.js → Play-DkBjQzgn.js} +1 -1
  30. package/dist/client/assets/{Plus-DmIvdJjO.js → Plus-CWME9B9L.js} +1 -1
  31. package/dist/client/assets/{Printer-B-kmat8d.js → Printer-tuedaxzr.js} +1 -1
  32. package/dist/client/assets/{SearchLg-uwCH_Y0q.js → SearchLg-Dqhtv5dc.js} +1 -1
  33. package/dist/client/assets/{SearchMd-Cf2jyLeC.js → SearchMd-CZSs2LSf.js} +1 -1
  34. package/dist/client/assets/{Sector-DK0YvOHU.js → Sector-aLBxu6yc.js} +1 -1
  35. package/dist/client/assets/{Settings02-C3BFmQm6.js → Settings02-BhsH56Xz.js} +1 -1
  36. package/dist/client/assets/{Share07-amH04EUM.js → Share07-CzidgFZ5.js} +1 -1
  37. package/dist/client/assets/{Shield01-CoMwjqAo.js → Shield01-K4aGKNL2.js} +1 -1
  38. package/dist/client/assets/{Stars01-BJVFzy09.js → Stars01-C47JIet8.js} +1 -1
  39. package/dist/client/assets/{Sun-CG_-rnB-.js → Sun-CdOrW_VN.js} +1 -1
  40. package/dist/client/assets/{SwitchHorizontal01-G8wAJ_Hg.js → SwitchHorizontal01-Dqqx_KZP.js} +1 -1
  41. package/dist/client/assets/{Tool01-CzodsTwJ.js → Tool01-j5KBS7L_.js} +1 -1
  42. package/dist/client/assets/{Tool02-vcgsrI0t.js → Tool02-DJpbC_72.js} +1 -1
  43. package/dist/client/assets/{Trash01-DacQZEqw.js → Trash01-CrceRjD2.js} +1 -1
  44. package/dist/client/assets/{TrendUp01-D9hlSqa_.js → TrendUp01-DETtD9qe.js} +1 -1
  45. package/dist/client/assets/{Upload01-COWsdxp9.js → Upload01-B6QCJOOJ.js} +1 -1
  46. package/dist/client/assets/{User01-BvT7Fpbq.js → User01-DLqwauek.js} +1 -1
  47. package/dist/client/assets/{UserSquare-CXNLbwdE.js → UserSquare-CPabtqPY.js} +1 -1
  48. package/dist/client/assets/{Users01-DkoO6Vse.js → Users01-BFSgZvlS.js} +1 -1
  49. package/dist/client/assets/{Users03-1uHPeSQW.js → Users03-DdHJhs5B.js} +1 -1
  50. package/dist/client/assets/{X-BSqsmD1L.js → X-C_wX87Ke.js} +1 -1
  51. package/dist/client/assets/{XCircle-g7V7rkX9.js → XCircle-CHAGLbh6.js} +1 -1
  52. package/dist/client/assets/{XClose-DIddD6Et.js → XClose-wbQg8T5j.js} +1 -1
  53. package/dist/client/assets/{Zap-DLA4I1NQ.js → Zap-Blk6garZ.js} +1 -1
  54. package/dist/client/assets/{ZoomOut-DnzrRxMa.js → ZoomOut-B4s4anLX.js} +1 -1
  55. package/dist/client/assets/{access-gate-DF-Coy0Z.js → access-gate-64zcpMYD.js} +1 -1
  56. package/dist/client/assets/{add-connection-dialog-CXROHrx5.js → add-connection-dialog-BlgJR9S1.js} +1 -1
  57. package/dist/client/assets/{agent-analytics-DNpcK1Gm.js → agent-analytics-BzTuWP3y.js} +1 -1
  58. package/dist/client/assets/agent-app-C9zVa4ys.js +1 -0
  59. package/dist/client/assets/agent-assets-kaujtYut.js +1 -0
  60. package/dist/client/assets/{agent-automation-CHui58AS.js → agent-automation-B4K6SO5X.js} +1 -1
  61. package/dist/client/assets/{agent-automations-B_ep9dv9.js → agent-automations-C-1CPUHo.js} +1 -1
  62. package/dist/client/assets/{agent-connect-sources-TfQK-tl8.js → agent-connect-sources-D1cyYh2R.js} +1 -1
  63. package/dist/client/assets/agent-deck-BYn3-8ZT.js +1 -0
  64. package/dist/client/assets/{agent-e2e-1qCY8Ach.js → agent-e2e-TcP4h5N6.js} +1 -1
  65. package/dist/client/assets/agent-file-SY1u955u.js +1 -0
  66. package/dist/client/assets/{agent-git-Du4VEwxt.js → agent-git-BwwZtE0x.js} +2 -2
  67. package/dist/client/assets/{agent-hosting-DX0ovQKG.js → agent-hosting-CFYwXBfp.js} +1 -1
  68. package/dist/client/assets/{agent-icon-BNs8r1fO.js → agent-icon-CP4wb7Bx.js} +1 -1
  69. package/dist/client/assets/agent-library-file-CPAiSend.js +1 -0
  70. package/dist/client/assets/{agent-monitor-Dki9XKb-.js → agent-monitor-CPiRXYpW.js} +1 -1
  71. package/dist/client/assets/{agent-overview-Bxk83Bj1.js → agent-overview-qi-4gnij.js} +1 -1
  72. package/dist/client/assets/agent-settings-BMrZhBmd.js +1 -0
  73. package/dist/client/assets/agent-site-editor-code-SwjyZSI8.js +2 -0
  74. package/dist/client/assets/{agent-site-editor-content-B0MbcGKz.js → agent-site-editor-content-DHZEWqFy.js} +2 -2
  75. package/dist/client/assets/{agent-site-editor-preview-BXudlzau.js → agent-site-editor-preview-D4HUiy11.js} +3 -3
  76. package/dist/client/assets/{agent-site-editor-D_tYXiIA.js → agent-site-editor-wV3RTwJo.js} +2 -2
  77. package/dist/client/assets/agent-view-C28582_4.js +1 -0
  78. package/dist/client/assets/{agent-view-guard-BOalzzXB.js → agent-view-guard-B_GXgcjD.js} +1 -1
  79. package/dist/client/assets/{agents-list-BYAVvgSK.js → agents-list-88dH8d0e.js} +1 -1
  80. package/dist/client/assets/{ai-providers-Y5YFfgGF.js → ai-providers-BBzNm4vK.js} +1 -1
  81. package/dist/client/assets/{alert-clNuLo0b.js → alert-0hXqrFqy.js} +1 -1
  82. package/dist/client/assets/{alert-dialog-OOEFvLXD.js → alert-dialog-DJ3365Df.js} +1 -1
  83. package/dist/client/assets/{api-keys-D7YwTp1J.js → api-keys-C4z7q_7l.js} +1 -1
  84. package/dist/client/assets/api-keys-DVgRzadm.js +1 -0
  85. package/dist/client/assets/app-editor-ChHTI5Yo.js +1 -0
  86. package/dist/client/assets/{asset-utils-BVwTaEjS.js → asset-utils-Zi5dAmhU.js} +1 -1
  87. package/dist/client/assets/{auth-CvdEaJV2.js → auth-DiBJ6HTw.js} +1 -1
  88. package/dist/client/assets/{auth-catchall-915VHRoy.js → auth-catchall-C7kwTG_2.js} +1 -1
  89. package/dist/client/assets/{auth-entry-f4UNzctv.js → auth-entry-B_CmlfVr.js} +1 -1
  90. package/dist/client/assets/{auth-split-layout-DPITqUgY.js → auth-split-layout-Btl1AmCA.js} +1 -1
  91. package/dist/client/assets/{authenticate-and-persist-oauth-Bt5D1aJI.js → authenticate-and-persist-oauth-C-DK5QxU.js} +1 -1
  92. package/dist/client/assets/{automation-list-row-Btn-B-nL.js → automation-list-row-CUr8umQd.js} +1 -1
  93. package/dist/client/assets/{automation-runs-Bs_GJ0Mx.js → automation-runs-BEf7TmV5.js} +1 -1
  94. package/dist/client/assets/{automations-3-1PN8L4.js → automations-Bd5XDoWz.js} +1 -1
  95. package/dist/client/assets/{autosend-6z8b55g2.js → autosend-CbSGCC_z.js} +1 -1
  96. package/dist/client/assets/{avatar-Bh0VE7CU.js → avatar-D6EG4gpi.js} +1 -1
  97. package/dist/client/assets/{badge-mWPnqtIU.js → badge-CLjnzWV1.js} +1 -1
  98. package/dist/client/assets/{block-document-trAdhSx9.js → block-document-4SYSbn7x.js} +1 -1
  99. package/dist/client/assets/{blocks-preview-workspace-context-D0ptXqYk.js → blocks-preview-workspace-context-MvEJSPQ_.js} +1 -1
  100. package/dist/client/assets/{breadcrumb-_beni89t.js → breadcrumb-C6uIh2gx.js} +1 -1
  101. package/dist/client/assets/{buckets-BYBNe8ia.js → buckets-CySBr1l9.js} +1 -1
  102. package/dist/client/assets/{build-improve-prompt-doc-D-hybPI_.js → build-improve-prompt-doc-CAHrWdK8.js} +1 -1
  103. package/dist/client/assets/{bulk-category-panel-C-ReQn-t.js → bulk-category-panel-C7_VZQYs.js} +1 -1
  104. package/dist/client/assets/{calendar-B2gUskOO.js → calendar-D2NSI-Uo.js} +1 -1
  105. package/dist/client/assets/{capability-load-error-C0GnGW7-.js → capability-load-error-BUVFJ7FB.js} +1 -1
  106. package/dist/client/assets/{cards-CiAl_X__.js → cards-DvlbYgkR.js} +1 -1
  107. package/dist/client/assets/category-editor-DmycqfAD.js +1 -0
  108. package/dist/client/assets/{chart-B8YOBq-X.js → chart-DFnySnLX.js} +1 -1
  109. package/dist/client/assets/{chat-context-UOURpBqM.js → chat-context-BuaJtKiH.js} +1 -1
  110. package/dist/client/assets/{chat-draft-B5MSxR-_.js → chat-draft-jLiQk38U.js} +1 -1
  111. package/dist/client/assets/{checkbox-CEEHjhZX.js → checkbox-DhhXjWWn.js} +1 -1
  112. package/dist/client/assets/{choose-editor-DKIfo22i.js → choose-editor-DaIvuBND.js} +1 -1
  113. package/dist/client/assets/{cli-auth-success-Bpj9B3NE.js → cli-auth-success-qpJPzv7N.js} +1 -1
  114. package/dist/client/assets/{client-icons-ByqemS7h.js → client-icons-FMEp9w57.js} +1 -1
  115. package/dist/client/assets/{collapsible-BkZa6hsW.js → collapsible-BzgQJ9lm.js} +1 -1
  116. package/dist/client/assets/{collection-detail-BgNcj1ol.js → collection-detail-DUP3LeO6.js} +1 -1
  117. package/dist/client/assets/{collection-display-button-qKZaN8ZT.js → collection-display-button-D8RArnc4.js} +1 -1
  118. package/dist/client/assets/{collection-search-D8iv3eg2.js → collection-search-BTyqIFVo.js} +1 -1
  119. package/dist/client/assets/{collection-table-wrapper-aH-MdlHW.js → collection-table-wrapper-SNCTm6bL.js} +1 -1
  120. package/dist/client/assets/{collection-tabs-CVj5y6r4.js → collection-tabs-B2W6RR6x.js} +1 -1
  121. package/dist/client/assets/{command-B7C5C7Y5.js → command-Clfl-nd5.js} +1 -1
  122. package/dist/client/assets/{command-palette-store-CjxZ6IT4.js → command-palette-store-BbfrQfcx.js} +1 -1
  123. package/dist/client/assets/{commerce-onboarding-SbieDR3y.js → commerce-onboarding-CY49Pds0.js} +1 -1
  124. package/dist/client/assets/{companion-mcps-section-CLOb1jOm.js → companion-mcps-section-BdD0QBhg.js} +1 -1
  125. package/dist/client/assets/{connect-e-Zw7t6z.js → connect-CYMCRsXB.js} +1 -1
  126. package/dist/client/assets/{connect-layout-BqRPi9Iy.js → connect-layout-BiLm2_nf.js} +1 -1
  127. package/dist/client/assets/{connection-BqqlnV9S.js → connection-OBd7O6J-.js} +1 -1
  128. package/dist/client/assets/{connection-card-B7nNE-vi.js → connection-card-BHgG4WUC.js} +1 -1
  129. package/dist/client/assets/{connection-detail-CctjSUOt.js → connection-detail-CvIjBFuv.js} +1 -1
  130. package/dist/client/assets/{connection-form-helpers-CGZjLurm.js → connection-form-helpers-DBoRH_1_.js} +1 -1
  131. package/dist/client/assets/{connections-BGL4NLY3.js → connections-Dm8cSxb1.js} +1 -1
  132. package/dist/client/assets/{create-organization-dialog-Bhp8McTp.js → create-organization-dialog-CiG5KBv2.js} +1 -1
  133. package/dist/client/assets/{decofile-api-BN70hIQR.js → decofile-api-D0jjuK2s.js} +1 -1
  134. package/dist/client/assets/{decopilot-DcY6tZci.js → decopilot-BZgK_WKj.js} +1 -1
  135. package/dist/client/assets/{dialog-mUIvGRq9.js → dialog-T6SHF6tg.js} +1 -1
  136. package/dist/client/assets/{discover-BKUG1s4X.js → discover-DQrGBv1I.js} +1 -1
  137. package/dist/client/assets/{domain-settings-B10r9eIu.js → domain-settings-BZpnNB2z.js} +1 -1
  138. package/dist/client/assets/{download-app-dialog-DCvPoe1o.js → download-app-dialog-DgXSTIhm.js} +1 -1
  139. package/dist/client/assets/{drawer-Dx8RWA1y.js → drawer-CEwLHAjr.js} +1 -1
  140. package/dist/client/assets/{dropdown-menu-BREtR-L8.js → dropdown-menu-2R7EcIqz.js} +1 -1
  141. package/dist/client/assets/{editor-BOa0PPPC.js → editor-B-DDSBye.js} +1 -1
  142. package/dist/client/assets/{empty-state-D7Xnneh3.js → empty-state-B4vaZfVn.js} +1 -1
  143. package/dist/client/assets/{empty-state-DFwqUmKQ.js → empty-state-M-2HWd2b.js} +1 -1
  144. package/dist/client/assets/{extract-connection-data-BiMeraJX.js → extract-connection-data-C-i7_Byp.js} +1 -1
  145. package/dist/client/assets/{feature-gate-DMPPa5-x.js → feature-gate-BOpzUCGP.js} +1 -1
  146. package/dist/client/assets/{feature-paywall-DYwohGrL.js → feature-paywall-B6TDdJ96.js} +1 -1
  147. package/dist/client/assets/{file-explorer-CTzLtSY5.js → file-explorer-CQhq5b4s.js} +1 -1
  148. package/dist/client/assets/{file-preview-BFt64WsS.js → file-preview-B2vvETTL.js} +1 -1
  149. package/dist/client/assets/{file-share-button-BnNwXX5z.js → file-share-button-Zf8hU2Fg.js} +1 -1
  150. package/dist/client/assets/{file-type-icon-C1ZF3wAh.js → file-type-icon-CXd8pQq1.js} +1 -1
  151. package/dist/client/assets/{folder-icon-BOdYGMzM.js → folder-icon-2Jjh406i.js} +1 -1
  152. package/dist/client/assets/{form-DQ_IxFJc.js → form-DEQzyl-Z.js} +1 -1
  153. package/dist/client/assets/{gateway-client-TD7qk1zJ.js → gateway-client-DLNW7KMa.js} +1 -1
  154. package/dist/client/assets/{general-DHAVwBud.js → general-BWYX0eIc.js} +1 -1
  155. package/dist/client/assets/{github-icon-0MAxQvrZ.js → github-icon-CrJOrJCi.js} +1 -1
  156. package/dist/client/assets/{home-4CuixH7A.js → home-CokmjUfB.js} +1 -1
  157. package/dist/client/assets/{hooks-8z4xHskl.js → hooks-Cow3V6T6.js} +1 -1
  158. package/dist/client/assets/{hooks-_W3a7WUK.js → hooks-VIquBHyZ.js} +1 -1
  159. package/dist/client/assets/{index-GHrQksGb.js → index-B7kHFiyx.js} +1 -1
  160. package/dist/client/assets/{index-upEARtMg.js → index-BHUvdpQg.js} +1 -1
  161. package/dist/client/assets/{index-DWLxhElz.js → index-C7RTFckf.js} +1 -1
  162. package/dist/client/assets/{index-CGGT_6fr.js → index-CHMhjP76.js} +1 -1
  163. package/dist/client/assets/{index-CH2bkKoB.js → index-CJB5eESL.js} +1 -1
  164. package/dist/client/assets/{index-BOCVYrA7.js → index-CVKN3yqd.js} +1 -1
  165. package/dist/client/assets/{index-tJO3CeUw.js → index-CWvjApMn.js} +1 -1
  166. package/dist/client/assets/{index-BOl5mM-q.js → index-CZXQ4cPi.js} +1 -1
  167. package/dist/client/assets/{index-BzsHOaCZ.js → index-CtTWJzNy.js} +1 -1
  168. package/dist/client/assets/{index-BVY204en.js → index-D9F2hZ3H.js} +1 -1
  169. package/dist/client/assets/{index-DUTmqJR2.js → index-DTtAckpN.js} +1 -1
  170. package/dist/client/assets/{index-B4rsaStI.js → index-DgWiecJC.js} +1 -1
  171. package/dist/client/assets/{index-CFuvn2u8.js → index-DjqfD6aH.js} +1 -1
  172. package/dist/client/assets/{index-6zOcw-_z.js → index-Dsngyxdw.js} +1 -1
  173. package/dist/client/assets/{index-7tyXXYIG.js → index-LqGJKspm.js} +4 -4
  174. package/dist/client/assets/{index-redirect-CrNRrseY.js → index-redirect-cWZ6P9Fa.js} +1 -1
  175. package/dist/client/assets/{infiniteQueryObserver-Bd_Xe1TN.js → infiniteQueryObserver-D63coM0A.js} +1 -1
  176. package/dist/client/assets/{infra-billing-Bkdg0c4a.js → infra-billing-K0cnxhkq.js} +1 -1
  177. package/dist/client/assets/{input-B3Coacmv.js → input-BmnxcFX-.js} +1 -1
  178. package/dist/client/assets/{input-zuyzMVZz.js → input-CP1IqPwA.js} +1 -1
  179. package/dist/client/assets/{input-CdMnZiZ6.js → input-kaJnjge5.js} +1 -1
  180. package/dist/client/assets/{integration-icon-BQ1mVBw6.js → integration-icon-DWYnH6CS.js} +1 -1
  181. package/dist/client/assets/{label-CcvwjKY9.js → label-CycRXo8-.js} +1 -1
  182. package/dist/client/assets/{last-preview-page-DJUY91Ef.js → last-preview-page-CQ1xE-EE.js} +1 -1
  183. package/dist/client/assets/{layout-Bx-JxuJH.js → layout-UP0YxIJD.js} +1 -1
  184. package/dist/client/assets/{legacy-agents-deep-C_d7yysm.js → legacy-agents-deep-BJP4TvVX.js} +1 -1
  185. package/dist/client/assets/{legacy-main-redirect-hXwWhEx_.js → legacy-main-redirect-Dthqqfia.js} +1 -1
  186. package/dist/client/assets/{library-CmTD8FM5.js → library-BFRTDsFO.js} +1 -1
  187. package/dist/client/assets/{login-DZjafLYn.js → login-DnkqrrfW.js} +1 -1
  188. package/dist/client/assets/{markdown-D5lLIYiU.js → markdown-Dmz1YqdU.js} +1 -1
  189. package/dist/client/assets/{mcp-app-renderer-DMt9Mj45.js → mcp-app-renderer-msD9uif_.js} +1 -1
  190. package/dist/client/assets/{mcp-oauth-C2Ax-WHA.js → mcp-oauth-xX_w6J5G.js} +1 -1
  191. package/dist/client/assets/{members-CV2cvXXb.js → members-CJ3Mxxvl.js} +1 -1
  192. package/dist/client/assets/{message-templates-UcOvLxc0.js → message-templates-6cGt-pIL.js} +1 -1
  193. package/dist/client/assets/{mini-report-page-Dh9a9ind.js → mini-report-page-B4Ns89qY.js} +1 -1
  194. package/dist/client/assets/mock-board-DbDpPxx7.js +90 -0
  195. package/dist/client/assets/{monaco-editor-hMK6fFU_.js → monaco-editor-Bx15Pism.js} +1 -1
  196. package/dist/client/assets/{monitoring-stats-row-CVE13oo0.js → monitoring-stats-row-rYjMQ6mt.js} +1 -1
  197. package/dist/client/assets/{multi-select-tKtARyyq.js → multi-select-CYubUj6s.js} +1 -1
  198. package/dist/client/assets/{mustache-oMdVtXN4.js → mustache-D1E2hGFA.js} +1 -1
  199. package/dist/client/assets/{oauth-callback-DdIO8NT8.js → oauth-callback-Dw16VYyc.js} +1 -1
  200. package/dist/client/assets/{oauth-callback-ai-provider-TlGg4tOP.js → oauth-callback-ai-provider-fiDEFYgR.js} +1 -1
  201. package/dist/client/assets/{onboarding-Ub0zuBic.js → onboarding-CUFF9T7W.js} +1 -1
  202. package/dist/client/assets/{optimistic-project-sidebar-views-B-9sdXuu.js → optimistic-project-sidebar-views-D0-i9pGF.js} +1 -1
  203. package/dist/client/assets/{organization-choice-CzQIXa4P.js → organization-choice-K7nAtCuU.js} +1 -1
  204. package/dist/client/assets/{orgs-BRM3PteS.js → orgs-COtED4Mj.js} +1 -1
  205. package/dist/client/assets/{page-seo-form-r0j5X3EW.js → page-seo-form-CgDiqvps.js} +1 -1
  206. package/dist/client/assets/{pair-wB0pyGEY.js → pair-C9pBJLa3.js} +1 -1
  207. package/dist/client/assets/{plan-ladder-DcxOa_K9.js → plan-ladder-Fc9095b7.js} +1 -1
  208. package/dist/client/assets/{popover-B7n3n0Kr.js → popover-CqDWteKd.js} +1 -1
  209. package/dist/client/assets/post-calendar-Bf6TUCPx.js +1 -0
  210. package/dist/client/assets/post-editor-NhF6msAy.js +1 -0
  211. package/dist/client/assets/{preview-content-DXYNRyjB.js → preview-content-DpyA1UES.js} +1 -1
  212. package/dist/client/assets/{preview-dialog-CVBJYhZD.js → preview-dialog-D_2a7nng.js} +1 -1
  213. package/dist/client/assets/{primitives-B-BEySr2.js → primitives-xvmFW9M2.js} +1 -1
  214. package/dist/client/assets/{profile-CaMzH8op.js → profile-CYbA5Ac5.js} +1 -1
  215. package/dist/client/assets/project-app-view-B0AcfaAH.js +1 -0
  216. package/dist/client/assets/{project-feed-w-8IReEj.js → project-feed-DT93rByU.js} +1 -1
  217. package/dist/client/assets/{project-icon-BpNWgNmk.js → project-icon-4fy6jz5e.js} +1 -1
  218. package/dist/client/assets/project-reports-s0B4HdWk.js +1 -0
  219. package/dist/client/assets/project-tasks-DEqsfT_3.js +1 -0
  220. package/dist/client/assets/{prompts-DKbaoq3Z.js → prompts-BV9VgLKz.js} +1 -1
  221. package/dist/client/assets/record-editor-ClCzYt3f.js +1 -0
  222. package/dist/client/assets/redirect-editor-CDrKg3yi.js +1 -0
  223. package/dist/client/assets/registry-DmrsKU6X.js +2 -0
  224. package/dist/client/assets/{registry-layout-sSQ_Re_s.js → registry-layout-B4ymxlVH.js} +1 -1
  225. package/dist/client/assets/reports-B4ocqqeE.js +1 -0
  226. package/dist/client/assets/{reports-Bnp1xUWK.js → reports-BpsBbPeI.js} +1 -1
  227. package/dist/client/assets/reports-tab-BwNrhZ99.js +2 -0
  228. package/dist/client/assets/{repositories-B-B3nysE.js → repositories-B3Yj-p-O.js} +1 -1
  229. package/dist/client/assets/{repository-import-picker-C3le5Vbk.js → repository-import-picker-DJZT2bf1.js} +1 -1
  230. package/dist/client/assets/{repository-picker-AEJ-LXcd.js → repository-picker-ZWXqLUOz.js} +1 -1
  231. package/dist/client/assets/{require-capability-Cu6XAdHn.js → require-capability-D2ozGXMI.js} +1 -1
  232. package/dist/client/assets/{required-auth-layout-OWmh0cRB.js → required-auth-layout-AdYtaYp9.js} +1 -1
  233. package/dist/client/assets/{reset-password-Ch_88gpr.js → reset-password-9ciFm04R.js} +1 -1
  234. package/dist/client/assets/{resizable-YVuw9dmI.js → resizable-DdiAoyYr.js} +1 -1
  235. package/dist/client/assets/{review-settings-CyJPDt4q.js → review-settings-DKxd_W2B.js} +1 -1
  236. package/dist/client/assets/{rich-text-link-control-eNehg68D.js → rich-text-link-control-G1eIsiad.js} +1 -1
  237. package/dist/client/assets/{roles-D3F7v_9T.js → roles-CovnIYj9.js} +1 -1
  238. package/dist/client/assets/{route-DFUmVQUb.js → route-BE6U5YUg.js} +1 -1
  239. package/dist/client/assets/{route-vlLsUt2b.js → route-BVgwrj11.js} +1 -1
  240. package/dist/client/assets/route-DCN2VT7W.js +1 -0
  241. package/dist/client/assets/{runnable-block-editor-x1eaErrG.js → runnable-block-editor-BTuxOpmZ.js} +3 -3
  242. package/dist/client/assets/sandbox-lifecycle-context-DRuSe7YD.js +2 -0
  243. package/dist/client/assets/sandbox-start-errors-BK_aDCyt.js +1 -0
  244. package/dist/client/assets/{schema-DQWsrq7E.js → schema-Dn-PxCJQ.js} +1 -1
  245. package/dist/client/assets/{scroll-area-B9yM5Ryy.js → scroll-area-NimWyBPv.js} +1 -1
  246. package/dist/client/assets/{search-input-BhE4PfQC.js → search-input-DtAj9jJO.js} +1 -1
  247. package/dist/client/assets/{secrets-Cj1rvkY-.js → secrets-CJGI8AA1.js} +1 -1
  248. package/dist/client/assets/{sections-editor-BoHaugHP.js → sections-editor-BReV4_k0.js} +1 -1
  249. package/dist/client/assets/{select-DuiQIVh5.js → select-DTLRO2jP.js} +1 -1
  250. package/dist/client/assets/{select-model-C0XP2o1V.js → select-model-CiYu746H.js} +1 -1
  251. package/dist/client/assets/seo-editor-CBVXWrym.js +1 -0
  252. package/dist/client/assets/{settings-tab-CzbVS5Mz.js → settings-tab-D5ZWBgDS.js} +1 -1
  253. package/dist/client/assets/{sheet-c3fs301B.js → sheet-DcmUstYv.js} +1 -1
  254. package/dist/client/assets/{shell-layout-BXCDxtNa.js → shell-layout-C3r9cZwX.js} +1 -1
  255. package/dist/client/assets/{sidebar-MvEpPYgm.js → sidebar-CYiEz-wg.js} +1 -1
  256. package/dist/client/assets/{skill-preview-COsUucnC.js → skill-preview-B2dbgHoR.js} +1 -1
  257. package/dist/client/assets/{skills-CIZpxnix.js → skills-DZXROjVr.js} +1 -1
  258. package/dist/client/assets/{sso-N53Ugc3r.js → sso-BdkCoZP1.js} +1 -1
  259. package/dist/client/assets/{store-Bc9shtTF.js → store-UwmR5LPt.js} +1 -1
  260. package/dist/client/assets/store-registry-DP7bjXP_.js +2 -0
  261. package/dist/client/assets/{switch-XzCZqEVH.js → switch-DVOjL7QB.js} +1 -1
  262. package/dist/client/assets/{synced-repos-BUMAgO9J.js → synced-repos-n_6ncb-M.js} +1 -1
  263. package/dist/client/assets/{table-DIbp_l9d.js → table-y7Fq_8fL.js} +1 -1
  264. package/dist/client/assets/{tabs-a46RXUx5.js → tabs--SQ9MSoj.js} +1 -1
  265. package/dist/client/assets/{task-board-DgeGTQVc.js → task-board-CT88RfwA.js} +1 -1
  266. package/dist/client/assets/{task-route-zG_8Kz8w.js → task-route-DKkxhcBt.js} +1 -1
  267. package/dist/client/assets/{task-status-Dh1cVJUD.js → task-status-mkrsQtsp.js} +1 -1
  268. package/dist/client/assets/{tasks-CJoFG2AV.js → tasks-BoMO2gaD.js} +1 -1
  269. package/dist/client/assets/tasks-CBhZiB75.js +1 -0
  270. package/dist/client/assets/{textarea-CMbCiP_x.js → textarea-Ciqg70xj.js} +1 -1
  271. package/dist/client/assets/{thread-intent-BdvWnyh1.js → thread-intent-DczG93w-.js} +1 -1
  272. package/dist/client/assets/{thread-route-BMAI4jvc.js → thread-route-Csb0bQYU.js} +1 -1
  273. package/dist/client/assets/{thread-route-BYUOxJfV.js → thread-route-D9RjIb92.js} +1 -1
  274. package/dist/client/assets/{thread-sheet-body-DWIa1Psy.js → thread-sheet-body-BfsG-HPC.js} +1 -1
  275. package/dist/client/assets/{toggle-group-BpHZ2Rek.js → toggle-group-Cl0Nt_2b.js} +1 -1
  276. package/dist/client/assets/{toolbar-icon-button-CnZH_a-Q.js → toolbar-icon-button-CQM6O44g.js} +1 -1
  277. package/dist/client/assets/{tooltip-NOT5TvpW.js → tooltip-DsIeYtk8.js} +1 -1
  278. package/dist/client/assets/{track-B_vC-44V.js → track-Bmhzoq6y.js} +1 -1
  279. package/dist/client/assets/{types-D4bb4LPp.js → types-Uxwa5Ooo.js} +1 -1
  280. package/dist/client/assets/{usage-stats-CGQU1Ksj.js → usage-stats-BsX_MBqv.js} +1 -1
  281. package/dist/client/assets/{use-ai-providers-DZtU4a7C.js → use-ai-providers-CKFqZtob.js} +1 -1
  282. package/dist/client/assets/{use-automations-gpw6hXj-.js → use-automations-GlFDlb_o.js} +1 -1
  283. package/dist/client/assets/{use-autosave-CEQfTSV0.js → use-autosave-DT3tUP8x.js} +1 -1
  284. package/dist/client/assets/{use-commerce-diagnostic-Bm8pHB0W.js → use-commerce-diagnostic-D4lhjg3y.js} +1 -1
  285. package/dist/client/assets/{use-connect-companion-Bi6FmjC1.js → use-connect-companion-6hnymdU2.js} +1 -1
  286. package/dist/client/assets/{use-connection-CAG410NC.js → use-connection-71baAT9J.js} +1 -1
  287. package/dist/client/assets/{use-copy-BCCEejfm.js → use-copy-AldvBwzV.js} +1 -1
  288. package/dist/client/assets/{use-create-virtual-mcp-BJOm-ngO.js → use-create-virtual-mcp-Bkk62U-K.js} +1 -1
  289. package/dist/client/assets/{use-date-fns-locale-Beb2WcsD.js → use-date-fns-locale-7fNXmWDe.js} +1 -1
  290. package/dist/client/assets/{use-debounced-autosave-DKqaLPMf.js → use-debounced-autosave-DWpI7QzW.js} +1 -1
  291. package/dist/client/assets/{use-debounced-value-DW--CGi4.js → use-debounced-value-vcd9fBbq.js} +1 -1
  292. package/dist/client/assets/{use-deco-credits-Cr47M5pI.js → use-deco-credits-BCMPDE0p.js} +1 -1
  293. package/dist/client/assets/{use-decopilot-events-DFWXqRQJ.js → use-decopilot-events-y3CYynsq.js} +1 -1
  294. package/dist/client/assets/{use-delete-connection-CAzQMfwD.js → use-delete-connection-CNw_Su9n.js} +1 -1
  295. package/dist/client/assets/{use-deployment-admin-Cxul1bjy.js → use-deployment-admin-BVvdOjlP.js} +1 -1
  296. package/dist/client/assets/{use-entitlements-B5OCpL90.js → use-entitlements-CXdqFCsK.js} +1 -1
  297. package/dist/client/assets/{use-fast-preview-draft-url-5cYDDJXC.js → use-fast-preview-draft-url-C0fMLzwd.js} +1 -1
  298. package/dist/client/assets/{use-file-configs-KqSjwJ5Q.js → use-file-configs-Bv0ksYAm.js} +1 -1
  299. package/dist/client/assets/{use-infinite-scroll-DTu796P3.js → use-infinite-scroll-CaIDAWPs.js} +1 -1
  300. package/dist/client/assets/{use-join-requests-B-V3jp4-.js → use-join-requests-DqMwbPoZ.js} +1 -1
  301. package/dist/client/assets/{use-main-panel-tabs-DT1ewQsE.js → use-main-panel-tabs-Ctx_tfIw.js} +1 -1
  302. package/dist/client/assets/{use-mcp-auth-status-Dd2NLoP2.js → use-mcp-auth-status-BsIDowWZ.js} +1 -1
  303. package/dist/client/assets/{use-mcp-client-FKhTA-pP.js → use-mcp-client-D8jBM4Gn.js} +1 -1
  304. package/dist/client/assets/{use-mcp-prompts-BxcBhrg0.js → use-mcp-prompts-BI-W9BIZ.js} +1 -1
  305. package/dist/client/assets/{use-mcp-tools-B-mP6VIl.js → use-mcp-tools-BghY6B9H.js} +1 -1
  306. package/dist/client/assets/{use-members-uHE9_Ihn.js → use-members-CpAtdP1_.js} +1 -1
  307. package/dist/client/assets/{use-mobile-7gcXtaOp.js → use-mobile-Dqp4Jkm6.js} +1 -1
  308. package/dist/client/assets/{use-navigate-to-agent-C1krlEI1.js → use-navigate-to-agent-DckkpAZt.js} +1 -1
  309. package/dist/client/assets/{use-open-billing-url-bvxUc97O.js → use-open-billing-url-Casm2GPL.js} +1 -1
  310. package/dist/client/assets/{use-org-auth-client-CG0U5nVg.js → use-org-auth-client-C0d9QdYl.js} +1 -1
  311. package/dist/client/assets/{use-org-fs-Cu_kl9ub.js → use-org-fs-Dlw3vnpa.js} +1 -1
  312. package/dist/client/assets/{use-org-notice-CTR6LVO_.js → use-org-notice-oR0FnSz0.js} +1 -1
  313. package/dist/client/assets/{use-org-sso-pS2f0S9B.js → use-org-sso-6FHDtS1R.js} +1 -1
  314. package/dist/client/assets/{use-organization-roles-Btc3lo7d.js → use-organization-roles-BRfUGpr9.js} +1 -1
  315. package/dist/client/assets/{use-organization-settings-COYwjTmH.js → use-organization-settings-CR_gD2xz.js} +1 -1
  316. package/dist/client/assets/{use-panel-navigate-BJ__p2tn.js → use-panel-navigate-CPCeDjnd.js} +1 -1
  317. package/dist/client/assets/{use-project-native-view-presence-D84bfTQ8.js → use-project-native-view-presence-CHK-UQhq.js} +1 -1
  318. package/dist/client/assets/{use-project-scope-TUxrelMI.js → use-project-scope-OfDo_ODT.js} +1 -1
  319. package/dist/client/assets/{use-registry-connections-ClkWohn9.js → use-registry-connections-CNnDInfj.js} +1 -1
  320. package/dist/client/assets/{use-releases-r-llw2bS.js → use-releases-37cW1ZIN.js} +1 -1
  321. package/dist/client/assets/{use-route-default-main-B5V1SFYB.js → use-route-default-main-TI35rK7_.js} +1 -1
  322. package/dist/client/assets/{use-secrets-g7CJAYOM.js → use-secrets-DUfhij8R.js} +1 -1
  323. package/dist/client/assets/{use-section-preview-base-Dm9Y5bzG.js → use-section-preview-base-CwyR6gN7.js} +1 -1
  324. package/dist/client/assets/{use-session-runtime-C-KbNAJE.js → use-session-runtime-4Wsurepj.js} +1 -1
  325. package/dist/client/assets/{use-tags-Bn18lYbj.js → use-tags-D48vlCoY.js} +1 -1
  326. package/dist/client/assets/{use-task-metadata-DkqwNP5B.js → use-task-metadata-DWEBrPNn.js} +1 -1
  327. package/dist/client/assets/{use-thread-outputs-DX41qrVY.js → use-thread-outputs-DCO0QMln.js} +1 -1
  328. package/dist/client/assets/{use-view-mode-CJqE7xKq.js → use-view-mode-C2bFNRDM.js} +1 -1
  329. package/dist/client/assets/{use-virtual-mcp-BSZ-bXcO.js → use-virtual-mcp-Dpcooz6x.js} +1 -1
  330. package/dist/client/assets/useInfiniteQuery-D7Bn-Wtf.js +1 -0
  331. package/dist/client/assets/{useQueries-C3nFpV34.js → useQueries-CgbxQuEr.js} +1 -1
  332. package/dist/client/assets/useSuspenseInfiniteQuery-xIiKKe3g.js +1 -0
  333. package/dist/client/assets/{users-u-T0fIr0.js → users-BKXLASD6.js} +1 -1
  334. package/dist/client/assets/{utils-C15cMn2u.js → utils-BA5pzGOE.js} +1 -1
  335. package/dist/client/assets/variant-calendar-CMDBbmY-.js +1 -0
  336. package/dist/client/assets/{variant-matcher-override-BVtx6ImJ.js → variant-matcher-override-Cg0JbaMY.js} +1 -1
  337. package/dist/client/assets/{view-mode-toggle-BKffsaTK.js → view-mode-toggle-D0YJ2E_v.js} +1 -1
  338. package/dist/client/assets/{virtual-mcp-BmaMueuo.js → virtual-mcp-eG7E1rwY.js} +1 -1
  339. package/dist/client/index.html +1 -1
  340. package/dist/server/cli.js +1 -1
  341. package/dist/server/server.js +1 -1
  342. package/package.json +1 -1
  343. package/dist/client/assets/agent-app-Cw2C4r27.js +0 -1
  344. package/dist/client/assets/agent-assets-CIbYJxPo.js +0 -1
  345. package/dist/client/assets/agent-deck-DnZT949c.js +0 -1
  346. package/dist/client/assets/agent-file-D7NiOFwe.js +0 -1
  347. package/dist/client/assets/agent-library-file-DN5LWTop.js +0 -1
  348. package/dist/client/assets/agent-settings-DUNPZ5GO.js +0 -1
  349. package/dist/client/assets/agent-site-editor-code-B9IxiAD3.js +0 -2
  350. package/dist/client/assets/agent-view-2DQLRNXO.js +0 -1
  351. package/dist/client/assets/api-keys-C9cD8YKu.js +0 -1
  352. package/dist/client/assets/app-editor-xd8pnTu8.js +0 -1
  353. package/dist/client/assets/category-editor-BdieZfbz.js +0 -1
  354. package/dist/client/assets/mock-board-CVRQmzIM.js +0 -90
  355. package/dist/client/assets/post-calendar-D8zer4mS.js +0 -1
  356. package/dist/client/assets/post-editor-DISYwLg2.js +0 -1
  357. package/dist/client/assets/project-app-view-DRs3Sa2_.js +0 -1
  358. package/dist/client/assets/project-reports-V2QSEwY2.js +0 -1
  359. package/dist/client/assets/project-tasks-BEiifV6g.js +0 -1
  360. package/dist/client/assets/record-editor-SIb3whuJ.js +0 -1
  361. package/dist/client/assets/redirect-editor-0tJchwSd.js +0 -1
  362. package/dist/client/assets/registry-mYP4BRsJ.js +0 -2
  363. package/dist/client/assets/reports-CstMZYaF.js +0 -1
  364. package/dist/client/assets/reports-tab-nZawxQlD.js +0 -2
  365. package/dist/client/assets/route-DWh-Ygcx.js +0 -1
  366. package/dist/client/assets/sandbox-lifecycle-context-PuxU5FPA.js +0 -2
  367. package/dist/client/assets/seo-editor-Cj7-3t9Z.js +0 -1
  368. package/dist/client/assets/store-registry-Bv0M4LRp.js +0 -2
  369. package/dist/client/assets/tasks-IzIm8pv2.js +0 -1
  370. package/dist/client/assets/useInfiniteQuery-B50zYHZp.js +0 -1
  371. package/dist/client/assets/useSuspenseInfiniteQuery-DEvCQfg8.js +0 -1
  372. package/dist/client/assets/variant-calendar-wkFCgj1H.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as R,c as E,b as H,j as a,l as K,M as ge,n as ss,_ as ns,e as ls,K as he,t as ze,m as ft,E as as,h as os,B as He,as as mt,a3 as rs,dN as pt,p as is,d as qe,cF as cs,dA as us,dO as ds}from"./index-7tyXXYIG.js";import{at as fs,au as ms,av as ps,h as gs,I as De,a6 as xs,a5 as hs,aw as bs,ax as gt,ay as ys,g as Fe,az as xt,A as ht,aA as fe,aa as js,r as vs,c as Ns}from"./agent-icon-BNs8r1fO.js";import{t as Ie}from"./Stars01-BJVFzy09.js";import{t as Ss,d as bt}from"./Tool02-vcgsrI0t.js";import{i as yt}from"./ArrowRight-JlpBR4ak.js";import{i as jt}from"./Check-BXALxZkV.js";import{i as tt}from"./ChevronRight-Xore976n.js";import{a as ks}from"./Copy01-CYJaDzON.js";import{b as je,t as We,c as st}from"./format-time-BtXRrtv4.js";import{b as _s,C as ws,a as Cs}from"./collapsible-BkZa6hsW.js";import{u as Ts}from"./use-copy-BCCEejfm.js";import{a as vt,M as $e,b as Is}from"./usage-stats-CGQU1Ksj.js";import{f as $s,u as As,r as Ms,h as Es}from"./hooks-8z4xHskl.js";import{f as ve,r as Ls,u as Ne,v as Ps,a as Rs,w as zs,x as Ds}from"./chat-context-UOURpBqM.js";import{c as Fs}from"./content-blocks-o63cs2vh.js";import{M as Bs}from"./mcp-app-renderer-DMt9Mj45.js";import{g as Nt}from"./types-D4bb4LPp.js";import{o as Os}from"./omit-sandbox-map-jj4lCB2U.js";import{T as St,a as kt,c as _t}from"./tooltip-NOT5TvpW.js";import{c as Us,u as wt}from"./use-mcp-client-FKhTA-pP.js";import{g as Ct,s as Tt}from"./gateway-client-TD7qk1zJ.js";import{s as It}from"./tool-namespace-DmnQIdtF.js";import{t as Hs,g as pe,u as be}from"./utils-CVEq3hMx.js";import{i as $t}from"./AlertCircle-DdgoOwtf.js";import{s as qs}from"./Eye-4t1Q1x_N.js";import{s as Ws}from"./XClose-DIddD6Et.js";import{s as Gs}from"./Database01-Dy1ntHiO.js";import{d as Ks,a as Vs}from"./Tool01-CzodsTwJ.js";import{a as nt}from"./Printer-B-kmat8d.js";import{i as Js}from"./Share07-amH04EUM.js";import{i as Xs}from"./SearchMd-Cf2jyLeC.js";import{u as Qs,a as Ys}from"./shell-layout-BXCDxtNa.js";import{a as Ge}from"./use-panel-navigate-BJ__p2tn.js";import{a as _e}from"./Image01-CXL1rUab.js";import{b as At}from"./use-entitlements-B5OCpL90.js";import{I as Zs,M as Mt}from"./markdown-D5lLIYiU.js";import{n as Et}from"./LinkExternal01-BaNEiZ-Z.js";import{c as en,S as tn,a as sn,b as nn}from"./sheet-c3fs301B.js";import{I as Se}from"./integration-icon-BQ1mVBw6.js";import{a as Lt}from"./use-connection-CAG410NC.js";import{b as Ke}from"./Users03-1uHPeSQW.js";import{a as me}from"./Palette-BTRMSHWm.js";import{u as Pt}from"./use-navigate-to-agent-C1krlEI1.js";import{i as we}from"./Link01-DKxJL9wE.js";import{g as ln}from"./use-mcp-prompts-BxcBhrg0.js";import{c as an,P as on,u as rn,e as cn,F as un,s as dn,b as fn}from"./index-CGGT_6fr.js";import{i as mn}from"./Globe01-H_L1039P.js";import{i as pn}from"./Monitor01-M9EpHieD.js";import{a as gn}from"./use-thread-outputs-DX41qrVY.js";import{n as xn}from"./Download01-DKDz2dFy.js";import{F as hn}from"./file-type-icon-C1ZF3wAh.js";import{t as bn}from"./ChevronUp-doBmaKp2.js";const yn={damping:.7,stiffness:.05,mass:1.25},jn=70,vn=1e3/60,Nn=350;let Ae=!1;globalThis.document?.addEventListener("mousedown",()=>{Ae=!0});globalThis.document?.addEventListener("mouseup",()=>{Ae=!1});globalThis.document?.addEventListener("click",()=>{Ae=!1});const Sn=(s={})=>{const[e,t]=R.useState(!1),[n,l]=R.useState(s.initial!==!1),[c,u]=R.useState(!1),r=R.useRef(null);r.current=s;const o=R.useCallback(()=>{if(!Ae)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(x.current)||x.current?.contains(k.commonAncestorContainer)},[]),i=R.useCallback(b=>{d.isAtBottom=b,l(b)},[]),m=R.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=R.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return x.current?.scrollTop??0},set scrollTop(k){if(x.current){const{scrollBehavior:j}=getComputedStyle(x.current);j!=="auto"&&(x.current.style.scrollBehavior="auto"),x.current.scrollTop=k,d.ignoreScrollToTop=x.current.scrollTop,j!=="auto"&&(x.current.style.scrollBehavior=j)}},get targetScrollTop(){return!x.current||!v.current?0:x.current.scrollHeight-1-x.current.clientHeight},get calculatedTargetScrollTop(){if(!x.current||!v.current)return 0;const{targetScrollTop:k}=this;if(!s.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(k,{scrollElement:x.current,contentElement:v.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=jn}}},[]),f=R.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||i(!0);const k=Date.now()+(Number(b.wait)||0),j=Le(r.current,b.animation),{ignoreEscapes:_=!1}=b;let y,S=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{y=Date.now()}):y=k+(b.duration??0);const N=async()=>{const w=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:C}=d,M=performance.now(),A=(M-(d.lastTick??M))/vn;if(d.animation||(d.animation={behavior:j,promise:w,ignoreEscapes:_}),d.animation.behavior===j&&(d.lastTick=M),o()||k>Date.now())return N();if(C<Math.min(S,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,N();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*A,d.scrollTop+=d.accumulated,d.scrollTop!==C&&(d.accumulated=0)}return N()}return y>Date.now()?(S=d.calculatedTargetScrollTop,N()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:Le(r.current,r.current.resize),ignoreEscapes:_,duration:Math.max(0,y-Date.now())||void 0}):d.isAtBottom)});return w.then(C=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),C))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:N()},[i,o,d]),p=R.useCallback(()=>{m(!0),i(!1)},[m,i]),g=R.useCallback(({target:b})=>{if(b!==x.current)return;const{scrollTop:k,ignoreScrollToTop:j}=d;let{lastScrollTop:_=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,j&&j>k&&(_=j),u(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===j)return;if(o()){m(!0),i(!1);return}const y=k>_,S=k<_;if(d.animation?.ignoreEscapes){d.scrollTop=_;return}S&&(m(!0),i(!1)),y&&m(!1),!d.escapedFromLock&&d.isNearBottom&&i(!0)},1)},[m,i,o,d]),h=R.useCallback(({target:b,deltaY:k})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===x.current&&k<0&&x.current.scrollHeight>x.current.clientHeight&&!d.animation?.ignoreEscapes&&(m(!0),i(!1))},[m,i,d]),x=lt(b=>{x.current?.removeEventListener("scroll",g),x.current?.removeEventListener("wheel",h),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",h,{passive:!0})},[]),v=lt(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([j])=>{const{height:_}=j.contentRect,y=_-(k??_);if(d.resizeDifference=y,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),u(d.isNearBottom),y>=0){const S=Le(r.current,k?r.current.resize:r.current.initial);f({animation:S,wait:!0,preserveScrollPosition:!0,duration:S==="instant"?void 0:Nn})}else d.isNearBottom&&(m(!1),i(!0));k=_,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===y&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:v,scrollRef:x,scrollToBottom:f,stopScroll:p,isAtBottom:n||c,isNearBottom:c,escapedFromLock:e,state:d}};function lt(s,e){const t=R.useCallback(n=>(t.current=n,s(n)),e);return t}const Ee=new Map;function Le(...s){const e={...yn};let t=!1;for(const l of s){if(l==="instant"){t=!0;continue}typeof l=="object"&&(t=!1,e.damping=l.damping??e.damping,e.stiffness=l.stiffness??e.stiffness,e.mass=l.mass??e.mass)}const n=JSON.stringify(e);return Ee.has(n)||Ee.set(n,Object.freeze(e)),t?"instant":Ee.get(n)}function U({icon:s,title:e,usage:t,summary:n,state:l,detail:c,detailVariant:u="code",forceOpen:r,variant:o="default",trailing:i,iconDestructive:m,alwaysChevron:d,defaultOpen:f,children:p}){const g=H(),[h,x]=R.useState(f??!1),{handleCopy:v,copied:b}=Ts(),k=l==="loading",j=l==="error",y=!!(c&&c.trim())||!!p,S=o==="subtask",N=(r??!1)||h,w=Sn({initial:k?"instant":!1}),C=a.jsxs(_s,{open:N,onOpenChange:r?void 0:x,className:"min-w-0",children:[a.jsxs(ws,{disabled:!y,className:K("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",y&&"[@media(hover:hover)]:hover:bg-accent/30",!y&&"cursor-default",k&&"shimmer"),"aria-disabled":!y,children:[a.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?a.jsx(tt,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:K("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",m?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",y&&(N?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),y&&a.jsx("div",{className:K("absolute inset-0 flex items-center justify-center transition-opacity duration-150",N?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:a.jsx(tt,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")})})]})}),a.jsx("span",{className:K("shrink-0 text-[14px] font-normal",j?"text-warning/80":"text-foreground"),children:e}),n?a.jsx("span",{className:"min-w-0 flex-1 truncate",children:a.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:n})}):a.jsx("div",{className:"flex-1"}),i&&a.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:i}),a.jsx(vt,{usage:t})]}),y&&a.jsx(Cs,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(u==="prose"?a.jsx("div",{className:"mt-1 mb-1",children:a.jsx("div",{ref:w.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:a.jsx("p",{ref:w.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:c})})}):a.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:a.jsx("div",{ref:w.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:a.jsxs("div",{ref:w.contentRef,className:"flex items-start justify-between gap-2",children:[a.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:a.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:c})}),a.jsx("button",{type:"button",onClick:()=>v(c),className:"shrink-0 p-1.5 rounded-md text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?a.jsx(jt,{className:"size-3.5"}):a.jsx(ks,{className:"size-3.5"})})]})})}))})]});return S?a.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:C}):C}function ne(s){const e=E.c(4),{latency:t}=s;if(t==null||t<=0)return null;let n;e[0]!==t?(n=je(t),e[0]=t,e[1]=n):n=e[1];let l;return e[2]!==n?(l=a.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:n}),e[2]=n,e[3]=l):l=e[3],l}const Rt=4;function zt(s){const e=E.c(8),{count:t,noun:n,onClick:l}=s,c=H();let u;e[0]!==t||e[1]!==n||e[2]!==c?(u=c("common.seeAll",{count:t,noun:n}),e[0]=t,e[1]=n,e[2]=c,e[3]=u):u=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(yt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=r):r=e[4];let o;return e[5]!==l||e[6]!==u?(o=a.jsxs("button",{type:"button",onClick:l,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[u,r]}),e[5]=l,e[6]=u,e[7]=o):o=e[7],o}function Dt(s){const e=E.c(12),{message:t,className:n}=s,l=t.created_at??t.metadata?.created_at??null;let c,u,r,o;if(e[0]!==n||e[1]!==l){o=Symbol.for("react.early_return_sentinel");e:{const m=We(l);if(m===null){o=null;break e}const d=new Date(m);c=d.toLocaleString(),e[6]!==n?(u=K("text-[11px] text-muted-foreground/60 select-none",n),e[6]=n,e[7]=u):u=e[7],r=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=n,e[1]=l,e[2]=c,e[3]=u,e[4]=r,e[5]=o}else c=e[2],u=e[3],r=e[4],o=e[5];if(o!==Symbol.for("react.early_return_sentinel"))return o;let i;return e[8]!==c||e[9]!==u||e[10]!==r?(i=a.jsx("span",{title:c,className:u,children:r}),e[8]=c,e[9]=u,e[10]=r,e[11]=i):i=e[11],i}function Be(s){const e=E.c(9),{since:t}=s;let n;e[0]!==t?(n=()=>st(t,Date.now()),e[0]=t,e[1]=n):n=e[1];const[l,c]=R.useState(n);let u,r;e[2]!==t?(u=()=>{const d=setInterval(()=>c(st(t,Date.now())),100);return()=>clearInterval(d)},r=[t],e[2]=t,e[3]=u,e[4]=r):(u=e[3],r=e[4]),R.useEffect(u,r);const o=l/1e3;let i;e[5]!==o?(i=je(o),e[5]=o,e[6]=i):i=e[6];let m;return e[7]!==i?(m=a.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:i}),e[7]=i,e[8]=m):m=e[8],m}const Ft=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function kn(){const s=E.c(5),[e]=R.useState(_n);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let n;s[1]!==e?(n=Ft.map((c,u)=>{const{delay:r}=c;return a.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[u],animation:"grid-ripple 1s ease infinite",animationDelay:`${r}ms`}},u)}),s[1]=e,s[2]=n):n=s[2];let l;return s[3]!==n?(l=a.jsx("div",{className:"grid",style:t,children:n}),s[3]=n,s[4]=l):l=s[4],l}function _n(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Ft.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}const at=new Map;function Bt(s){let e=at.get(s);return e||(e={tick:0,subscribers:new Set,intervalId:null},at.set(s,e)),e}function wn(s,e){const t=Bt(s);return t.subscribers.add(e),t.intervalId===null&&(t.intervalId=setInterval(()=>{t.tick+=1;for(const n of t.subscribers)n()},s)),()=>{t.subscribers.delete(e),t.subscribers.size===0&&t.intervalId!==null&&(clearInterval(t.intervalId),t.intervalId=null)}}function Ve(s){const e=E.c(3),t=s===void 0?6e4:s;let n,l;return e[0]!==t?(n=c=>wn(t,c),l=()=>Bt(t).tick,e[0]=t,e[1]=n,e[2]=l):(n=e[1],l=e[2]),R.useSyncExternalStore(n,l,Cn)}function Cn(){return 0}function Tn(s){return{planning:{icon:a.jsx(ms,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:a.jsx(Ie,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const In=1200;function Oe(s){const e=E.c(8),{icon:t,title:n,summary:l,detail:c,state:u,detailVariant:r,trailing:o}=s,i=r===void 0?"prose":r;let m;return e[0]!==c||e[1]!==i||e[2]!==t||e[3]!==u||e[4]!==l||e[5]!==n||e[6]!==o?(m=a.jsx(U,{icon:t,title:n,summary:l,detail:c,state:u,detailVariant:i,trailing:o}),e[0]=c,e[1]=i,e[2]=t,e[3]=u,e[4]=l,e[5]=n,e[6]=o,e[7]=m):m=e[7],m}function $n(s){const e=E.c(22),{startedAt:t}=s,n=H(),l=ve()?.runStatusStage??null,[c,u]=R.useState("planning");let r,o;if(e[0]!==l?(r=()=>{if(l!==null)return;const h=setTimeout(()=>{u("thinking")},In);return()=>{clearTimeout(h)}},o=[l],e[0]=l,e[1]=r,e[2]=o):(r=e[1],o=e[2]),R.useEffect(r,o),l!==null){let h;e[3]!==l||e[4]!==n?(h=$s(n,l),e[3]=l,e[4]=n,e[5]=h):h=e[5];const x=h;let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=a.jsx(Ie,{className:"size-4"}),e[6]=v):v=e[6];const b=`${x.label}...`;let k;e[7]!==t?(k=t!==null&&a.jsx(Be,{since:t}),e[7]=t,e[8]=k):k=e[8];let j;return e[9]!==x.detail||e[10]!==b||e[11]!==k?(j=a.jsx(Oe,{icon:v,title:b,summary:x.detail,state:"loading",trailing:k}),e[9]=x.detail,e[10]=b,e[11]=k,e[12]=j):j=e[12],j}let i;e[13]!==n?(i=Tn(n),e[13]=n,e[14]=i):i=e[14];const d=i[c],f=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&a.jsx(Be,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==f||e[20]!==p?(g=a.jsx(Oe,{icon:d.icon,title:f,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=f,e[20]=p,e[21]=g):g=e[21],g}function An(s){const e=E.c(3),{startedAt:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(kn,{}),e[0]=n):n=e[0];let l;return e[1]!==t?(l=a.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[n,a.jsx(Be,{since:t})]}),e[1]=t,e[2]=l):l=e[2],l}const Mn=2e4;function En(s){const e=E.c(9),{startedAt:t}=s,n=H();Ve(1e3);const l=ve(),u=(t!==null?Date.now()-t:0)>=Mn;let r;e[0]!==t?(r=a.jsx($n,{startedAt:t}),e[0]=t,e[1]=r):r=e[1];let o;e[2]!==u||e[3]!==l||e[4]!==n?(o=u&&l?.stop&&a.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[a.jsx("span",{children:n("chat.thinkingIndicator.takingLonger")}),a.jsx("button",{type:"button",onClick:()=>l.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:n("chat.thinkingIndicator.cancel")})]}),e[2]=u,e[3]=l,e[4]=n,e[5]=o):o=e[5];let i;return e[6]!==r||e[7]!==o?(i=a.jsxs("div",{className:"flex flex-col gap-0.5",children:[r,o]}),e[6]=r,e[7]=o,e[8]=i):i=e[8],i}function Ln(s){const e=E.c(24),{duration:t,parts:n,isStreaming:l}=s,c=H();let u;e[0]!==n?(u=n.every(zn),e[0]=n,e[1]=u):u=e[1];const r=u;let o;e[2]!==t||e[3]!==c?(o=t&&t/1e3>1?c("chat.thinkingIndicator.thoughtFor",{duration:je(t/1e3)}):c("chat.thinkingIndicator.thought"),e[2]=t,e[3]=c,e[4]=o):o=e[4];const i=o;let m;if(e[5]!==r||e[6]!==l||e[7]!==n){const k=n.map(Rn).join(`
1
+ import{r as R,c as E,b as H,j as a,l as K,M as ge,n as ss,_ as ns,e as ls,K as he,t as ze,m as ft,E as as,h as os,B as He,as as mt,a3 as rs,dN as pt,p as is,d as qe,cF as cs,dA as us,dO as ds}from"./index-LqGJKspm.js";import{at as fs,au as ms,av as ps,h as gs,I as De,a6 as xs,a5 as hs,aw as bs,ax as gt,ay as ys,g as Fe,az as xt,A as ht,aA as fe,aa as js,r as vs,c as Ns}from"./agent-icon-CP4wb7Bx.js";import{t as Ie}from"./Stars01-C47JIet8.js";import{t as Ss,d as bt}from"./Tool02-DJpbC_72.js";import{i as yt}from"./ArrowRight-CGkzbTs-.js";import{i as jt}from"./Check-BnJHwdzA.js";import{i as tt}from"./ChevronRight-CIuRctG6.js";import{a as ks}from"./Copy01-CAnIcRR7.js";import{b as je,t as We,c as st}from"./format-time-BtXRrtv4.js";import{b as _s,C as ws,a as Cs}from"./collapsible-BzgQJ9lm.js";import{u as Ts}from"./use-copy-AldvBwzV.js";import{a as vt,M as $e,b as Is}from"./usage-stats-BsX_MBqv.js";import{f as $s,u as As,r as Ms,h as Es}from"./hooks-Cow3V6T6.js";import{f as ve,r as Ls,u as Ne,v as Ps,a as Rs,w as zs,x as Ds}from"./chat-context-BuaJtKiH.js";import{c as Fs}from"./content-blocks-o63cs2vh.js";import{M as Bs}from"./mcp-app-renderer-msD9uif_.js";import{g as Nt}from"./types-Uxwa5Ooo.js";import{o as Os}from"./omit-sandbox-map-jj4lCB2U.js";import{T as St,a as kt,c as _t}from"./tooltip-DsIeYtk8.js";import{c as Us,u as wt}from"./use-mcp-client-D8jBM4Gn.js";import{g as Ct,s as Tt}from"./gateway-client-DLNW7KMa.js";import{s as It}from"./tool-namespace-DmnQIdtF.js";import{t as Hs,g as pe,u as be}from"./utils-CVEq3hMx.js";import{i as $t}from"./AlertCircle-JAw4DKWg.js";import{s as qs}from"./Eye-CeLsr2wK.js";import{s as Ws}from"./XClose-wbQg8T5j.js";import{s as Gs}from"./Database01-DhxHwIba.js";import{d as Ks,a as Vs}from"./Tool01-j5KBS7L_.js";import{a as nt}from"./Printer-tuedaxzr.js";import{i as Js}from"./Share07-CzidgFZ5.js";import{i as Xs}from"./SearchMd-CZSs2LSf.js";import{u as Qs,a as Ys}from"./shell-layout-C3r9cZwX.js";import{a as Ge}from"./use-panel-navigate-CPCeDjnd.js";import{a as _e}from"./Image01-CAvGw-jw.js";import{b as At}from"./use-entitlements-CXdqFCsK.js";import{I as Zs,M as Mt}from"./markdown-Dmz1YqdU.js";import{n as Et}from"./LinkExternal01-_FElc0p1.js";import{c as en,S as tn,a as sn,b as nn}from"./sheet-DcmUstYv.js";import{I as Se}from"./integration-icon-DWYnH6CS.js";import{a as Lt}from"./use-connection-71baAT9J.js";import{b as Ke}from"./Users03-DdHJhs5B.js";import{a as me}from"./Palette-DWgPkj9P.js";import{u as Pt}from"./use-navigate-to-agent-DckkpAZt.js";import{i as we}from"./Link01-BFGs7SHa.js";import{g as ln}from"./use-mcp-prompts-BI-W9BIZ.js";import{c as an,P as on,u as rn,e as cn,F as un,s as dn,b as fn}from"./index-CHMhjP76.js";import{i as mn}from"./Globe01-BxZcqfmG.js";import{i as pn}from"./Monitor01-CgVSaEtw.js";import{a as gn}from"./use-thread-outputs-DCO0QMln.js";import{n as xn}from"./Download01-BKhvQC2t.js";import{F as hn}from"./file-type-icon-CXd8pQq1.js";import{t as bn}from"./ChevronUp-CUHmZknM.js";const yn={damping:.7,stiffness:.05,mass:1.25},jn=70,vn=1e3/60,Nn=350;let Ae=!1;globalThis.document?.addEventListener("mousedown",()=>{Ae=!0});globalThis.document?.addEventListener("mouseup",()=>{Ae=!1});globalThis.document?.addEventListener("click",()=>{Ae=!1});const Sn=(s={})=>{const[e,t]=R.useState(!1),[n,l]=R.useState(s.initial!==!1),[c,u]=R.useState(!1),r=R.useRef(null);r.current=s;const o=R.useCallback(()=>{if(!Ae)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(x.current)||x.current?.contains(k.commonAncestorContainer)},[]),i=R.useCallback(b=>{d.isAtBottom=b,l(b)},[]),m=R.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=R.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return x.current?.scrollTop??0},set scrollTop(k){if(x.current){const{scrollBehavior:j}=getComputedStyle(x.current);j!=="auto"&&(x.current.style.scrollBehavior="auto"),x.current.scrollTop=k,d.ignoreScrollToTop=x.current.scrollTop,j!=="auto"&&(x.current.style.scrollBehavior=j)}},get targetScrollTop(){return!x.current||!v.current?0:x.current.scrollHeight-1-x.current.clientHeight},get calculatedTargetScrollTop(){if(!x.current||!v.current)return 0;const{targetScrollTop:k}=this;if(!s.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(k,{scrollElement:x.current,contentElement:v.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=jn}}},[]),f=R.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||i(!0);const k=Date.now()+(Number(b.wait)||0),j=Le(r.current,b.animation),{ignoreEscapes:_=!1}=b;let y,S=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{y=Date.now()}):y=k+(b.duration??0);const N=async()=>{const w=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:C}=d,M=performance.now(),A=(M-(d.lastTick??M))/vn;if(d.animation||(d.animation={behavior:j,promise:w,ignoreEscapes:_}),d.animation.behavior===j&&(d.lastTick=M),o()||k>Date.now())return N();if(C<Math.min(S,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,N();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*A,d.scrollTop+=d.accumulated,d.scrollTop!==C&&(d.accumulated=0)}return N()}return y>Date.now()?(S=d.calculatedTargetScrollTop,N()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:Le(r.current,r.current.resize),ignoreEscapes:_,duration:Math.max(0,y-Date.now())||void 0}):d.isAtBottom)});return w.then(C=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),C))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:N()},[i,o,d]),p=R.useCallback(()=>{m(!0),i(!1)},[m,i]),g=R.useCallback(({target:b})=>{if(b!==x.current)return;const{scrollTop:k,ignoreScrollToTop:j}=d;let{lastScrollTop:_=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,j&&j>k&&(_=j),u(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===j)return;if(o()){m(!0),i(!1);return}const y=k>_,S=k<_;if(d.animation?.ignoreEscapes){d.scrollTop=_;return}S&&(m(!0),i(!1)),y&&m(!1),!d.escapedFromLock&&d.isNearBottom&&i(!0)},1)},[m,i,o,d]),h=R.useCallback(({target:b,deltaY:k})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===x.current&&k<0&&x.current.scrollHeight>x.current.clientHeight&&!d.animation?.ignoreEscapes&&(m(!0),i(!1))},[m,i,d]),x=lt(b=>{x.current?.removeEventListener("scroll",g),x.current?.removeEventListener("wheel",h),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",h,{passive:!0})},[]),v=lt(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([j])=>{const{height:_}=j.contentRect,y=_-(k??_);if(d.resizeDifference=y,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),u(d.isNearBottom),y>=0){const S=Le(r.current,k?r.current.resize:r.current.initial);f({animation:S,wait:!0,preserveScrollPosition:!0,duration:S==="instant"?void 0:Nn})}else d.isNearBottom&&(m(!1),i(!0));k=_,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===y&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:v,scrollRef:x,scrollToBottom:f,stopScroll:p,isAtBottom:n||c,isNearBottom:c,escapedFromLock:e,state:d}};function lt(s,e){const t=R.useCallback(n=>(t.current=n,s(n)),e);return t}const Ee=new Map;function Le(...s){const e={...yn};let t=!1;for(const l of s){if(l==="instant"){t=!0;continue}typeof l=="object"&&(t=!1,e.damping=l.damping??e.damping,e.stiffness=l.stiffness??e.stiffness,e.mass=l.mass??e.mass)}const n=JSON.stringify(e);return Ee.has(n)||Ee.set(n,Object.freeze(e)),t?"instant":Ee.get(n)}function U({icon:s,title:e,usage:t,summary:n,state:l,detail:c,detailVariant:u="code",forceOpen:r,variant:o="default",trailing:i,iconDestructive:m,alwaysChevron:d,defaultOpen:f,children:p}){const g=H(),[h,x]=R.useState(f??!1),{handleCopy:v,copied:b}=Ts(),k=l==="loading",j=l==="error",y=!!(c&&c.trim())||!!p,S=o==="subtask",N=(r??!1)||h,w=Sn({initial:k?"instant":!1}),C=a.jsxs(_s,{open:N,onOpenChange:r?void 0:x,className:"min-w-0",children:[a.jsxs(ws,{disabled:!y,className:K("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",y&&"[@media(hover:hover)]:hover:bg-accent/30",!y&&"cursor-default",k&&"shimmer"),"aria-disabled":!y,children:[a.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?a.jsx(tt,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:K("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",m?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",y&&(N?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),y&&a.jsx("div",{className:K("absolute inset-0 flex items-center justify-center transition-opacity duration-150",N?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:a.jsx(tt,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")})})]})}),a.jsx("span",{className:K("shrink-0 text-[14px] font-normal",j?"text-warning/80":"text-foreground"),children:e}),n?a.jsx("span",{className:"min-w-0 flex-1 truncate",children:a.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:n})}):a.jsx("div",{className:"flex-1"}),i&&a.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:i}),a.jsx(vt,{usage:t})]}),y&&a.jsx(Cs,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(u==="prose"?a.jsx("div",{className:"mt-1 mb-1",children:a.jsx("div",{ref:w.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:a.jsx("p",{ref:w.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:c})})}):a.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:a.jsx("div",{ref:w.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:a.jsxs("div",{ref:w.contentRef,className:"flex items-start justify-between gap-2",children:[a.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:a.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:c})}),a.jsx("button",{type:"button",onClick:()=>v(c),className:"shrink-0 p-1.5 rounded-md text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?a.jsx(jt,{className:"size-3.5"}):a.jsx(ks,{className:"size-3.5"})})]})})}))})]});return S?a.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:C}):C}function ne(s){const e=E.c(4),{latency:t}=s;if(t==null||t<=0)return null;let n;e[0]!==t?(n=je(t),e[0]=t,e[1]=n):n=e[1];let l;return e[2]!==n?(l=a.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:n}),e[2]=n,e[3]=l):l=e[3],l}const Rt=4;function zt(s){const e=E.c(8),{count:t,noun:n,onClick:l}=s,c=H();let u;e[0]!==t||e[1]!==n||e[2]!==c?(u=c("common.seeAll",{count:t,noun:n}),e[0]=t,e[1]=n,e[2]=c,e[3]=u):u=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(yt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=r):r=e[4];let o;return e[5]!==l||e[6]!==u?(o=a.jsxs("button",{type:"button",onClick:l,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[u,r]}),e[5]=l,e[6]=u,e[7]=o):o=e[7],o}function Dt(s){const e=E.c(12),{message:t,className:n}=s,l=t.created_at??t.metadata?.created_at??null;let c,u,r,o;if(e[0]!==n||e[1]!==l){o=Symbol.for("react.early_return_sentinel");e:{const m=We(l);if(m===null){o=null;break e}const d=new Date(m);c=d.toLocaleString(),e[6]!==n?(u=K("text-[11px] text-muted-foreground/60 select-none",n),e[6]=n,e[7]=u):u=e[7],r=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=n,e[1]=l,e[2]=c,e[3]=u,e[4]=r,e[5]=o}else c=e[2],u=e[3],r=e[4],o=e[5];if(o!==Symbol.for("react.early_return_sentinel"))return o;let i;return e[8]!==c||e[9]!==u||e[10]!==r?(i=a.jsx("span",{title:c,className:u,children:r}),e[8]=c,e[9]=u,e[10]=r,e[11]=i):i=e[11],i}function Be(s){const e=E.c(9),{since:t}=s;let n;e[0]!==t?(n=()=>st(t,Date.now()),e[0]=t,e[1]=n):n=e[1];const[l,c]=R.useState(n);let u,r;e[2]!==t?(u=()=>{const d=setInterval(()=>c(st(t,Date.now())),100);return()=>clearInterval(d)},r=[t],e[2]=t,e[3]=u,e[4]=r):(u=e[3],r=e[4]),R.useEffect(u,r);const o=l/1e3;let i;e[5]!==o?(i=je(o),e[5]=o,e[6]=i):i=e[6];let m;return e[7]!==i?(m=a.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:i}),e[7]=i,e[8]=m):m=e[8],m}const Ft=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function kn(){const s=E.c(5),[e]=R.useState(_n);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let n;s[1]!==e?(n=Ft.map((c,u)=>{const{delay:r}=c;return a.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[u],animation:"grid-ripple 1s ease infinite",animationDelay:`${r}ms`}},u)}),s[1]=e,s[2]=n):n=s[2];let l;return s[3]!==n?(l=a.jsx("div",{className:"grid",style:t,children:n}),s[3]=n,s[4]=l):l=s[4],l}function _n(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Ft.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}const at=new Map;function Bt(s){let e=at.get(s);return e||(e={tick:0,subscribers:new Set,intervalId:null},at.set(s,e)),e}function wn(s,e){const t=Bt(s);return t.subscribers.add(e),t.intervalId===null&&(t.intervalId=setInterval(()=>{t.tick+=1;for(const n of t.subscribers)n()},s)),()=>{t.subscribers.delete(e),t.subscribers.size===0&&t.intervalId!==null&&(clearInterval(t.intervalId),t.intervalId=null)}}function Ve(s){const e=E.c(3),t=s===void 0?6e4:s;let n,l;return e[0]!==t?(n=c=>wn(t,c),l=()=>Bt(t).tick,e[0]=t,e[1]=n,e[2]=l):(n=e[1],l=e[2]),R.useSyncExternalStore(n,l,Cn)}function Cn(){return 0}function Tn(s){return{planning:{icon:a.jsx(ms,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:a.jsx(Ie,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const In=1200;function Oe(s){const e=E.c(8),{icon:t,title:n,summary:l,detail:c,state:u,detailVariant:r,trailing:o}=s,i=r===void 0?"prose":r;let m;return e[0]!==c||e[1]!==i||e[2]!==t||e[3]!==u||e[4]!==l||e[5]!==n||e[6]!==o?(m=a.jsx(U,{icon:t,title:n,summary:l,detail:c,state:u,detailVariant:i,trailing:o}),e[0]=c,e[1]=i,e[2]=t,e[3]=u,e[4]=l,e[5]=n,e[6]=o,e[7]=m):m=e[7],m}function $n(s){const e=E.c(22),{startedAt:t}=s,n=H(),l=ve()?.runStatusStage??null,[c,u]=R.useState("planning");let r,o;if(e[0]!==l?(r=()=>{if(l!==null)return;const h=setTimeout(()=>{u("thinking")},In);return()=>{clearTimeout(h)}},o=[l],e[0]=l,e[1]=r,e[2]=o):(r=e[1],o=e[2]),R.useEffect(r,o),l!==null){let h;e[3]!==l||e[4]!==n?(h=$s(n,l),e[3]=l,e[4]=n,e[5]=h):h=e[5];const x=h;let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=a.jsx(Ie,{className:"size-4"}),e[6]=v):v=e[6];const b=`${x.label}...`;let k;e[7]!==t?(k=t!==null&&a.jsx(Be,{since:t}),e[7]=t,e[8]=k):k=e[8];let j;return e[9]!==x.detail||e[10]!==b||e[11]!==k?(j=a.jsx(Oe,{icon:v,title:b,summary:x.detail,state:"loading",trailing:k}),e[9]=x.detail,e[10]=b,e[11]=k,e[12]=j):j=e[12],j}let i;e[13]!==n?(i=Tn(n),e[13]=n,e[14]=i):i=e[14];const d=i[c],f=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&a.jsx(Be,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==f||e[20]!==p?(g=a.jsx(Oe,{icon:d.icon,title:f,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=f,e[20]=p,e[21]=g):g=e[21],g}function An(s){const e=E.c(3),{startedAt:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(kn,{}),e[0]=n):n=e[0];let l;return e[1]!==t?(l=a.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[n,a.jsx(Be,{since:t})]}),e[1]=t,e[2]=l):l=e[2],l}const Mn=2e4;function En(s){const e=E.c(9),{startedAt:t}=s,n=H();Ve(1e3);const l=ve(),u=(t!==null?Date.now()-t:0)>=Mn;let r;e[0]!==t?(r=a.jsx($n,{startedAt:t}),e[0]=t,e[1]=r):r=e[1];let o;e[2]!==u||e[3]!==l||e[4]!==n?(o=u&&l?.stop&&a.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[a.jsx("span",{children:n("chat.thinkingIndicator.takingLonger")}),a.jsx("button",{type:"button",onClick:()=>l.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:n("chat.thinkingIndicator.cancel")})]}),e[2]=u,e[3]=l,e[4]=n,e[5]=o):o=e[5];let i;return e[6]!==r||e[7]!==o?(i=a.jsxs("div",{className:"flex flex-col gap-0.5",children:[r,o]}),e[6]=r,e[7]=o,e[8]=i):i=e[8],i}function Ln(s){const e=E.c(24),{duration:t,parts:n,isStreaming:l}=s,c=H();let u;e[0]!==n?(u=n.every(zn),e[0]=n,e[1]=u):u=e[1];const r=u;let o;e[2]!==t||e[3]!==c?(o=t&&t/1e3>1?c("chat.thinkingIndicator.thoughtFor",{duration:je(t/1e3)}):c("chat.thinkingIndicator.thought"),e[2]=t,e[3]=c,e[4]=o):o=e[4];const i=o;let m;if(e[5]!==r||e[6]!==l||e[7]!==n){const k=n.map(Rn).join(`
2
2
  `).trim().split(`
3
3
  `).filter(Boolean),j=l?k[k.length-1]??"":k[0]??"";m=!r&&j?j.length>100?j.slice(0,100)+"…":j:void 0,e[5]=r,e[6]=l,e[7]=n,e[8]=m}else m=e[8];const d=m;let f;if(e[9]!==r||e[10]!==n){const b=n.map(Pn).join(`
4
4
 
@@ -1 +1 @@
1
- import{c as f,M as _,_ as y,K as P,m as b,l as A,j as d}from"./index-7tyXXYIG.js";import{u as x}from"./use-entitlements-B5OCpL90.js";function C(){const e=f.c(6),t=y(),r=x();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=P.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:c}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(c.map(v))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==r||e[4]!==n?(s={queryKey:o,enabled:r,staleTime:6e5,queryFn:n},e[3]=r,e[4]=n,e[5]=s):s=e[5],b(s)}function v(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function I(e,t){if(t!=="free")return e?.[t];const r=e&&Object.values(e)[0];return r?{amountCents:0,currency:r.currency,interval:r.interval}:void 0}function S(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const T=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function j(e,t){if(!e)return null;const r=e.findIndex(n=>n.features[t]===!0),o=r>=0?e[r]:void 0;return o?{plan:o,index:r}:null}function R(){const e=f.c(8),{org:t}=_(),r=y(),o=x();let n;e[0]!==t.id?(n=P.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==r?(s=async()=>{const{plans:a}=await r.call("AI_PLAN_LIST",{providerId:"deco"});return a},e[2]=r,e[3]=s):s=e[3];let c;return e[4]!==o||e[5]!==n||e[6]!==s?(c={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=c):c=e[7],b(c)}const u=[{symbol:"free",color:"text-chart-2"},{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],E=u[u.length-1];function F(e){return h(e).color}function h(e){return u[Math.min(e,u.length-1)]??E}function O(e){const t=f.c(13),{index:r,className:o}=e;let n,s,c,a;if(t[0]!==o||t[1]!==r){const{symbol:g,color:p}=h(r);n=g,s="0 0 16 16",c="true",a=A("size-8 shrink-0",p,o),t[0]=o,t[1]=r,t[2]=n,t[3]=s,t[4]=c,t[5]=a}else n=t[2],s=t[3],c=t[4],a=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==c||t[10]!==a||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":c,className:a,children:l}),t[8]=s,t[9]=c,t[10]=a,t[11]=l,t[12]=i):i=t[12],i}export{T as F,O as P,C as a,F as b,I as c,S as f,j as p,R as u};
1
+ import{c as f,M as _,_ as y,K as P,m as b,l as A,j as d}from"./index-LqGJKspm.js";import{u as x}from"./use-entitlements-CXdqFCsK.js";function C(){const e=f.c(6),t=y(),r=x();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=P.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:c}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(c.map(v))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==r||e[4]!==n?(s={queryKey:o,enabled:r,staleTime:6e5,queryFn:n},e[3]=r,e[4]=n,e[5]=s):s=e[5],b(s)}function v(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function I(e,t){if(t!=="free")return e?.[t];const r=e&&Object.values(e)[0];return r?{amountCents:0,currency:r.currency,interval:r.interval}:void 0}function S(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const T=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function j(e,t){if(!e)return null;const r=e.findIndex(n=>n.features[t]===!0),o=r>=0?e[r]:void 0;return o?{plan:o,index:r}:null}function R(){const e=f.c(8),{org:t}=_(),r=y(),o=x();let n;e[0]!==t.id?(n=P.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==r?(s=async()=>{const{plans:a}=await r.call("AI_PLAN_LIST",{providerId:"deco"});return a},e[2]=r,e[3]=s):s=e[3];let c;return e[4]!==o||e[5]!==n||e[6]!==s?(c={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=c):c=e[7],b(c)}const u=[{symbol:"free",color:"text-chart-2"},{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],E=u[u.length-1];function F(e){return h(e).color}function h(e){return u[Math.min(e,u.length-1)]??E}function O(e){const t=f.c(13),{index:r,className:o}=e;let n,s,c,a;if(t[0]!==o||t[1]!==r){const{symbol:g,color:p}=h(r);n=g,s="0 0 16 16",c="true",a=A("size-8 shrink-0",p,o),t[0]=o,t[1]=r,t[2]=n,t[3]=s,t[4]=c,t[5]=a}else n=t[2],s=t[3],c=t[4],a=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==c||t[10]!==a||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":c,className:a,children:l}),t[8]=s,t[9]=c,t[10]=a,t[11]=l,t[12]=i):i=t[12],i}export{T as F,O as P,C as a,F as b,I as c,S as f,j as p,R as u};
@@ -1 +1 @@
1
- import{r as i,j as a,b6 as A,da as O,ba as L,b2 as z,b3 as G,b4 as H,b5 as _,b7 as j,b8 as g,bb as w,bf as K,bh as U,bk as V,bl as W,bg as Z,bi as q,bj as B,bm as J,bn as Q,c as m,l as X}from"./index-7tyXXYIG.js";var C="Popover",[E]=V(C,[w]),P=w(),[Y,d]=E(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:c=!1}=t,p=P(e),l=i.useRef(null),[u,h]=i.useState(!1),[x,f]=z({prop:r,defaultProp:n??!1,onChange:s,caller:C});return a.jsx(G,{...p,children:a.jsx(Y,{scope:e,contentId:H(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(b=>!b),[f]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:c,children:o})})};N.displayName=C;var F="PopoverAnchor",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(F,o),s=P(o),{onCustomAnchorAdd:c,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(c(),()=>p()),[c,p]),a.jsx(A,{...s,...r,ref:e})});S.displayName=F;var y="PopoverTrigger",D=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(y,o),s=P(o),c=_(e,n.triggerRef),p=a.jsx(j.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":$(n.open),...r,ref:c,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:a.jsx(A,{asChild:!0,...s,children:p})});D.displayName=y;var R="PopoverPortal",[ee,oe]=E(R,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=d(R,e);return a.jsx(ee,{scope:e,forceMount:o,children:a.jsx(O,{present:o||s.open,children:a.jsx(L,{asChild:!0,container:n,children:r})})})};M.displayName=R;var v="PopoverContent",k=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=d(v,t.__scopePopover);return a.jsx(O,{present:r||s.open,children:s.modal?a.jsx(re,{...n,ref:e}):a.jsx(ne,{...n,ref:e})})});k.displayName=v;var te=W("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(null),n=_(e,r),s=i.useRef(!1);return i.useEffect(()=>{const c=r.current;if(c)return K(c)},[]),a.jsx(U,{as:te,allowPinchZoom:!0,children:a.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,c=>{c.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,c=>{const p=c.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,u=p.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return a.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const c=s.target;o.triggerRef.current?.contains(c)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:h,...x}=t,f=d(v,o),b=P(o);return Z(),a.jsx(q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:a.jsx(B,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:a.jsx(J,{"data-state":$(f.open),role:"dialog",id:f.contentId,...b,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),I="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(I,o);return a.jsx(j.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=I;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return a.jsx(Q,{...n,...r,ref:e})});ce.displayName=ae;function $(t){return t?"open":"closed"}var ie=N,pe=S,le=D,ue=M,de=k;function ve(t){const e=m.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=a.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=m.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=a.jsx(le,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=m.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const c=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=X("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let u;return e[7]!==c||e[8]!==r||e[9]!==p||e[10]!==l?(u=a.jsx(ue,{children:a.jsx(de,{"data-slot":"popover-content",align:c,sideOffset:p,translate:"no",className:l,...r})}),e[7]=c,e[8]=r,e[9]=p,e[10]=l,e[11]=u):u=e[11],u}function he(t){const e=m.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=a.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ve as P,ge as a,Pe as b,he as c};
1
+ import{r as i,j as a,b6 as A,da as O,ba as L,b2 as z,b3 as G,b4 as H,b5 as _,b7 as j,b8 as g,bb as w,bf as K,bh as U,bk as V,bl as W,bg as Z,bi as q,bj as B,bm as J,bn as Q,c as m,l as X}from"./index-LqGJKspm.js";var C="Popover",[E]=V(C,[w]),P=w(),[Y,d]=E(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:c=!1}=t,p=P(e),l=i.useRef(null),[u,h]=i.useState(!1),[x,f]=z({prop:r,defaultProp:n??!1,onChange:s,caller:C});return a.jsx(G,{...p,children:a.jsx(Y,{scope:e,contentId:H(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(b=>!b),[f]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:c,children:o})})};N.displayName=C;var F="PopoverAnchor",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(F,o),s=P(o),{onCustomAnchorAdd:c,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(c(),()=>p()),[c,p]),a.jsx(A,{...s,...r,ref:e})});S.displayName=F;var y="PopoverTrigger",D=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(y,o),s=P(o),c=_(e,n.triggerRef),p=a.jsx(j.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":$(n.open),...r,ref:c,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:a.jsx(A,{asChild:!0,...s,children:p})});D.displayName=y;var R="PopoverPortal",[ee,oe]=E(R,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=d(R,e);return a.jsx(ee,{scope:e,forceMount:o,children:a.jsx(O,{present:o||s.open,children:a.jsx(L,{asChild:!0,container:n,children:r})})})};M.displayName=R;var v="PopoverContent",k=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=d(v,t.__scopePopover);return a.jsx(O,{present:r||s.open,children:s.modal?a.jsx(re,{...n,ref:e}):a.jsx(ne,{...n,ref:e})})});k.displayName=v;var te=W("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(null),n=_(e,r),s=i.useRef(!1);return i.useEffect(()=>{const c=r.current;if(c)return K(c)},[]),a.jsx(U,{as:te,allowPinchZoom:!0,children:a.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,c=>{c.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,c=>{const p=c.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,u=p.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return a.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const c=s.target;o.triggerRef.current?.contains(c)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:h,...x}=t,f=d(v,o),b=P(o);return Z(),a.jsx(q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:a.jsx(B,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:a.jsx(J,{"data-state":$(f.open),role:"dialog",id:f.contentId,...b,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),I="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(I,o);return a.jsx(j.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=I;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return a.jsx(Q,{...n,...r,ref:e})});ce.displayName=ae;function $(t){return t?"open":"closed"}var ie=N,pe=S,le=D,ue=M,de=k;function ve(t){const e=m.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=a.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=m.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=a.jsx(le,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=m.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const c=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=X("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let u;return e[7]!==c||e[8]!==r||e[9]!==p||e[10]!==l?(u=a.jsx(ue,{children:a.jsx(de,{"data-slot":"popover-content",align:c,sideOffset:p,translate:"no",className:l,...r})}),e[7]=c,e[8]=r,e[9]=p,e[10]=l,e[11]=u):u=e[11],u}function he(t){const e=m.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=a.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ve as P,ge as a,Pe as b,he as c};
@@ -0,0 +1 @@
1
+ import{c as at,b as ct,r as ft,v as wt,l as Z,j as e,B as lt}from"./index-LqGJKspm.js";import{i as Tt}from"./AlertCircle-JAw4DKWg.js";import{K as zt,m as At}from"./agent-icon-CP4wb7Bx.js";import{i as Et}from"./ChevronRight-CIuRctG6.js";import{s as Pt}from"./Plus-CWME9B9L.js";import{A as _t,a as Mt,b as It}from"./alert-0hXqrFqy.js";import{S as Lt}from"./scroll-area-NimWyBPv.js";import{c as Ut,y as Ot,k as $t,t as Ht,v as Rt,z as Bt,q as ht,x as bt,A as Ft,B as Kt}from"./agent-site-editor-content-DHZEWqFy.js";import"./Tool01-j5KBS7L_.js";import"./ArrowUp-CW9s78t7.js";import"./ArrowLeft-C4ws2vta.js";import"./Tool02-DJpbC_72.js";import"./ArrowRight-CGkzbTs-.js";import"./TrendUp01-DETtD9qe.js";import"./ZoomOut-B4s4anLX.js";import"./Users03-DdHJhs5B.js";import"./CheckCircle-D72wsOXz.js";import"./Check-BnJHwdzA.js";import"./ChevronUp-CUHmZknM.js";import"./DotsVertical-DZxfXATf.js";import"./UserSquare-CPabtqPY.js";import"./Copy01-CAnIcRR7.js";import"./CreditCard01-Byf14Zko.js";import"./Database01-DhxHwIba.js";import"./MessageCircle01-BIIEDxFs.js";import"./Download01-BKhvQC2t.js";import"./Printer-tuedaxzr.js";import"./Settings02-BhsH56Xz.js";import"./Eye-CeLsr2wK.js";import"./File02-Ic5DSfbF.js";import"./Share07-CzidgFZ5.js";import"./GitBranch01-llYG9Xp9.js";import"./Globe01-BxZcqfmG.js";import"./SwitchHorizontal01-Dqqx_KZP.js";import"./HardDrive-D8M2f43J.js";import"./Image01-CAvGw-jw.js";import"./Key01-MvLRbpTL.js";import"./Link01-BFGs7SHa.js";import"./LinkExternal01-_FElc0p1.js";import"./Monitor01-CgVSaEtw.js";import"./Sun-CdOrW_VN.js";import"./Package-rfI0qNYd.js";import"./Palette-DWgPkj9P.js";import"./Play-DkBjQzgn.js";import"./SearchLg-Dqhtv5dc.js";import"./SearchMd-CZSs2LSf.js";import"./Shield01-K4aGKNL2.js";import"./Stars01-C47JIet8.js";import"./Trash01-CrceRjD2.js";import"./Upload01-B6QCJOOJ.js";import"./User01-DLqwauek.js";import"./Users01-BFSgZvlS.js";import"./XCircle-CHAGLbh6.js";import"./XClose-wbQg8T5j.js";import"./X-C_wX87Ke.js";import"./Zap-Blk6garZ.js";import"./select-DTLRO2jP.js";import"./index-DgWiecJC.js";import"./agent-view-guard-B_GXgcjD.js";import"./use-main-panel-tabs-Ctx_tfIw.js";import"./use-route-default-main-TI35rK7_.js";import"./use-connection-71baAT9J.js";import"./use-mcp-client-D8jBM4Gn.js";import"./auth-DiBJ6HTw.js";import"./use-mcp-tools-BghY6B9H.js";import"./use-virtual-mcp-Dpcooz6x.js";import"./types-Uxwa5Ooo.js";import"./utils-CVEq3hMx.js";import"./use-project-scope-OfDo_ODT.js";import"./github-repo-BknN0SVI.js";import"./index-Dsngyxdw.js";import"./chat-context-BuaJtKiH.js";import"./use-panel-navigate-CPCeDjnd.js";import"./thread-route-D9RjIb92.js";import"./autosend-CbSGCC_z.js";import"./thread-intent-DczG93w-.js";import"./slugify-CEUa2lfQ.js";import"./hooks-Cow3V6T6.js";import"./backoff-8mStPHYB.js";import"./task-board-CT88RfwA.js";import"./schema-Dn-PxCJQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-entitlements-CXdqFCsK.js";import"./use-ai-providers-CKFqZtob.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-y3CYynsq.js";import"./use-organization-settings-CR_gD2xz.js";import"./gateway-client-DLNW7KMa.js";import"./tooltip-DsIeYtk8.js";import"./dialog-T6SHF6tg.js";import"./drawer-CEwLHAjr.js";import"./collection-search-BTyqIFVo.js";import"./use-mobile-Dqp4Jkm6.js";import"./use-mcp-prompts-BI-W9BIZ.js";import"./index-CHMhjP76.js";import"./form-DEQzyl-Z.js";import"./label-CycRXo8-.js";import"./input-BmnxcFX-.js";import"./input-kaJnjge5.js";import"./command-palette-store-BbfrQfcx.js";import"./chat-draft-jLiQk38U.js";import"./use-session-runtime-4Wsurepj.js";import"./usage-stats-BsX_MBqv.js";import"./use-copy-AldvBwzV.js";import"./markdown-Dmz1YqdU.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./tabs--SQ9MSoj.js";import"./use-deco-credits-BCMPDE0p.js";import"./toggle-group-Cl0Nt_2b.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-Casm2GPL.js";import"./decopilot-BZgK_WKj.js";import"./checkbox-DhhXjWWn.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-D6EG4gpi.js";import"./download-app-dialog-DgXSTIhm.js";import"./popover-CqDWteKd.js";import"./index-CWvjApMn.js";import"./input-CP1IqPwA.js";import"./hooks-VIquBHyZ.js";import"./use-org-fs-Dlw3vnpa.js";import"./dropdown-menu-2R7EcIqz.js";import"./question-004-sINsf4GQ.js";import"./use-members-CpAtdP1_.js";import"./use-org-auth-client-C0d9QdYl.js";import"./feature-paywall-B6TDdJ96.js";import"./plan-ladder-Fc9095b7.js";import"./add-connection-dialog-BlgJR9S1.js";import"./extract-connection-data-C-i7_Byp.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-OBd7O6J-.js";import"./connection-card-BHgG4WUC.js";import"./use-registry-connections-CNnDInfj.js";import"./useInfiniteQuery-D7Bn-Wtf.js";import"./infiniteQueryObserver-D63coM0A.js";import"./retry-i8LvYSZg.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-DWYnH6CS.js";import"./textarea-Ciqg70xj.js";import"./connection-form-helpers-DBoRH_1_.js";import"./authenticate-and-persist-oauth-C-DK5QxU.js";import"./mcp-oauth-xX_w6J5G.js";import"./collection-tabs-B2W6RR6x.js";import"./badge-CLjnzWV1.js";import"./use-infinite-scroll-CaIDAWPs.js";import"./useSuspenseInfiniteQuery-xIiKKe3g.js";import"./pair-C9pBJLa3.js";import"./collapsible-BzgQJ9lm.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-msD9uif_.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./shell-layout-C3r9cZwX.js";import"./anchors-yqDzZN4K.js";import"./use-org-notice-oR0FnSz0.js";import"./command-Clfl-nd5.js";import"./index-CZXQ4cPi.js";import"./project-icon-4fy6jz5e.js";import"./required-auth-layout-AdYtaYp9.js";import"./use-org-sso-6FHDtS1R.js";import"./sheet-DcmUstYv.js";import"./use-navigate-to-agent-DckkpAZt.js";import"./use-thread-outputs-DCO0QMln.js";import"./file-type-icon-CXd8pQq1.js";import"./sandbox-lifecycle-context-DRuSe7YD.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-task-metadata-DWEBrPNn.js";import"./use-project-native-view-presence-CHK-UQhq.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-Bv0ksYAm.js";import"./site-slug-uya6Wp4-.js";import"./virtual-mcp-eG7E1rwY.js";import"./feature-gate-BOpzUCGP.js";import"./alert-dialog-DJ3365Df.js";import"./runnable-block-editor-BTuxOpmZ.js";import"./decofile-api-D0jjuK2s.js";import"./utils-BA5pzGOE.js";import"./claim-phase-copy-0btUuJoC.js";import"./monaco-editor-Bx15Pism.js";import"./editor-B-DDSBye.js";import"./calendar-D2NSI-Uo.js";import"./rich-text-link-control-G1eIsiad.js";import"./switch-DVOjL7QB.js";import"./safe-image-url-D5z803Ot.js";import"./search-input-DtAj9jJO.js";import"./use-debounced-value-vcd9fBbq.js";import"./asset-utils-Zi5dAmhU.js";import"./sandbox-git-api-CMdpE2TE.js";import"./mustache-D1E2hGFA.js";import"./empty-state-M-2HWd2b.js";import"./github-icon-CrJOrJCi.js";import"./repository-import-picker-DJZT2bf1.js";import"./repository-picker-ZWXqLUOz.js";const jt="border-success/30 bg-success/10 text-success hover:bg-success/20",vt="border-dashed border-border bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground";function qt(f){const t=at.c(17),{support:x}=f,s=ct(),o=x.kind==="unsupported-runtime";let m;t[0]===Symbol.for("react.memo_cache_sentinel")?(m=e.jsx(Tt,{}),t[0]=m):m=t[0];const l=o?"sandbox.postCalendar.unsupportedRuntimeTitle":"sandbox.postCalendar.outdatedAppsTitle";let c;t[1]!==s||t[2]!==l?(c=s(l),t[1]=s,t[2]=l,t[3]=c):c=t[3];let i;t[4]!==c?(i=e.jsx(_t,{children:c}),t[4]=c,t[5]=i):i=t[5];let d;t[6]!==o||t[7]!==s?(d=o?s("sandbox.postCalendar.unsupportedRuntimeDescription"):s("sandbox.postCalendar.outdatedAppsDescription",{required:Ft}),t[6]=o,t[7]=s,t[8]=d):d=t[8];let r;t[9]!==d?(r=e.jsx(Mt,{children:d}),t[9]=d,t[10]=r):r=t[10];let a;t[11]!==o?(a=!o&&e.jsx("code",{className:"mt-2 block rounded-md bg-muted px-2 py-1 font-mono text-xs text-foreground",children:Kt}),t[11]=o,t[12]=a):a=t[12];let p;return t[13]!==i||t[14]!==r||t[15]!==a?(p=e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/30 p-6",children:e.jsxs(It,{variant:"warning",className:"max-w-md bg-background/95 shadow-lg backdrop-blur",children:[m,e.jsxs("div",{children:[i,r,a]})]})}),t[13]=i,t[14]=r,t[15]=a,t[16]=p):p=t[16],p}function zi(f){const t=at.c(94),{decofile:x,support:s,selectedKey:o,onSelect:m,onCreate:l,onReschedule:c,isCreating:i}=f,d=i===void 0?!1:i,r=ct();let a;t[0]!==s?(a=Ut(s),t[0]=s,t[1]=a):a=t[1];const p=a,[g,v]=ft.useState(null),[C]=wt(),[h,w]=ft.useState(Vt),b=C.language;let D;t[2]!==h||t[3]!==b?(D=new Intl.DateTimeFormat(b,{month:"long",year:"numeric"}).format(h),t[2]=h,t[3]=b,t[4]=D):D=t[4];const u=D;let j,N,T,z,k,A,E,P,_,M,S;if(t[5]!==p||t[6]!==h||t[7]!==x||t[8]!==g||t[9]!==d||t[10]!==b||t[11]!==u||t[12]!==l||t[13]!==c||t[14]!==m||t[15]!==o||t[16]!==r){const yt=new Intl.DateTimeFormat(b,{weekday:"short"}),Nt=new Intl.DateTimeFormat(b,{dateStyle:"long"}),{byDay:Ct,undated:pt}=Ot($t(x)),dt=Ht(h),Dt=Rt(new Date);z="flex h-full w-full flex-col";let et;t[28]===Symbol.for("react.memo_cache_sentinel")?(et=()=>w(ht(new Date)),t[28]=et):et=t[28];let H;t[29]!==r?(H=r("sandbox.postCalendar.today"),t[29]=r,t[30]=H):H=t[30];let R;t[31]!==H?(R=e.jsx(lt,{variant:"outline",size:"sm",onClick:et,children:H}),t[31]=H,t[32]=R):R=t[32];let rt;t[33]===Symbol.for("react.memo_cache_sentinel")?(rt=()=>w(Gt),t[33]=rt):rt=t[33];let B;t[34]!==r?(B=r("sandbox.postCalendar.previous"),t[34]=r,t[35]=B):B=t[35];let ot;t[36]===Symbol.for("react.memo_cache_sentinel")?(ot=e.jsx(At,{size:16}),t[36]=ot):ot=t[36];let F;t[37]!==B?(F=e.jsx(lt,{variant:"ghost",size:"icon",className:"size-8",onClick:rt,"aria-label":B,children:ot}),t[37]=B,t[38]=F):F=t[38];let it;t[39]===Symbol.for("react.memo_cache_sentinel")?(it=()=>w(Wt),t[39]=it):it=t[39];let K;t[40]!==r?(K=r("sandbox.postCalendar.next"),t[40]=r,t[41]=K):K=t[41];let st;t[42]===Symbol.for("react.memo_cache_sentinel")?(st=e.jsx(Et,{size:16}),t[42]=st):st=t[42];let q;t[43]!==K?(q=e.jsx(lt,{variant:"ghost",size:"icon",className:"size-8",onClick:it,"aria-label":K,children:st}),t[43]=K,t[44]=q):q=t[44];let W;t[45]!==u?(W=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:u}),t[45]=u,t[46]=W):W=t[46];let G;t[47]!==r?(G=r("sandbox.postCalendar.legendScheduled"),t[47]=r,t[48]=G):G=t[48];let V;t[49]!==G?(V=e.jsx(xt,{className:jt,label:G}),t[49]=G,t[50]=V):V=t[50];let J;t[51]!==r?(J=r("sandbox.postCalendar.legendUnscheduled"),t[51]=r,t[52]=J):J=t[52];let Q;t[53]!==J?(Q=e.jsx(xt,{className:vt,label:J}),t[53]=J,t[54]=Q):Q=t[54];let X;t[55]!==V||t[56]!==Q?(X=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[V,Q]}),t[55]=V,t[56]=Q,t[57]=X):X=t[57],t[58]!==R||t[59]!==F||t[60]!==q||t[61]!==W||t[62]!==X?(k=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[R,F,q,W,X]}),t[58]=R,t[59]=F,t[60]=q,t[61]=W,t[62]=X,t[63]=k):k=t[63],T="relative flex-1 min-h-0",j=Lt;const nt=!p&&"blur-[2px] select-none";t[64]!==nt?(S=Z("h-full",nt),t[64]=nt,t[65]=S):S=t[65],N=!p,_="flex min-w-[880px] gap-4 p-4";let Y;t[66]!==r?(Y=r("sandbox.postCalendar.unscheduledHint"),t[66]=r,t[67]=Y):Y=t[67];let mt;t[68]!==Y?(mt=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Y}),t[68]=Y,t[69]=mt):mt=t[69],M=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:dt[0]?.map(n=>e.jsx("div",{className:"px-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:yt.format(n)},n.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:dt.flat().map(n=>{const kt=n.getMonth()===h.getMonth(),St=Ct.get(Bt(n))??[];return e.jsxs("div",{onDragOver:y=>{g&&(y.preventDefault(),y.dataTransfer.dropEffect="move")},onDrop:y=>{y.preventDefault();const ut=y.dataTransfer.getData("text/plain");v(null),ut&&c(ut,n)},className:Z("group/day min-h-28 space-y-1 p-2 transition-colors",kt?"bg-background":"bg-muted/40",g&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:Z("grid size-6 place-items-center rounded-full text-xs",n.getTime()===Dt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:n.getDate()}),p&&e.jsx(lt,{variant:"ghost",size:"icon",className:"size-6 opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:d,onClick:()=>l(n),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:Nt.format(n)}),children:e.jsx(Pt,{size:14})})]}),St.map(y=>e.jsx(gt,{entry:y,active:y.post.key===o,draggable:p&&y.scheduled,onSelect:m,onDragStateChange:v},y.post.key))]},n.getTime())})}),mt]}),A="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",E=e.jsx("p",{className:"px-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:pt.length})}),P=pt.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(zt,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):pt.map(n=>e.jsx(gt,{entry:n,active:n.post.key===o,draggable:!1,onSelect:m,onDragStateChange:v},n.post.key)),t[5]=p,t[6]=h,t[7]=x,t[8]=g,t[9]=d,t[10]=b,t[11]=u,t[12]=l,t[13]=c,t[14]=m,t[15]=o,t[16]=r,t[17]=j,t[18]=N,t[19]=T,t[20]=z,t[21]=k,t[22]=A,t[23]=E,t[24]=P,t[25]=_,t[26]=M,t[27]=S}else j=t[17],N=t[18],T=t[19],z=t[20],k=t[21],A=t[22],E=t[23],P=t[24],_=t[25],M=t[26],S=t[27];let I;t[70]!==A||t[71]!==E||t[72]!==P?(I=e.jsxs("div",{className:A,children:[E,P]}),t[70]=A,t[71]=E,t[72]=P,t[73]=I):I=t[73];let L;t[74]!==I||t[75]!==_||t[76]!==M?(L=e.jsxs("div",{className:_,children:[M,I]}),t[74]=I,t[75]=_,t[76]=M,t[77]=L):L=t[77];let U;t[78]!==j||t[79]!==N||t[80]!==L||t[81]!==S?(U=e.jsx(j,{className:S,inert:N,children:L}),t[78]=j,t[79]=N,t[80]=L,t[81]=S,t[82]=U):U=t[82];let O;t[83]!==p||t[84]!==s?(O=!p&&e.jsx(qt,{support:s}),t[83]=p,t[84]=s,t[85]=O):O=t[85];let $;t[86]!==T||t[87]!==U||t[88]!==O?($=e.jsxs("div",{className:T,children:[U,O]}),t[86]=T,t[87]=U,t[88]=O,t[89]=$):$=t[89];let tt;return t[90]!==z||t[91]!==k||t[92]!==$?(tt=e.jsxs("div",{className:z,children:[k,$]}),t[90]=z,t[91]=k,t[92]=$,t[93]=tt):tt=t[93],tt}function Wt(f){return bt(f,1)}function Gt(f){return bt(f,-1)}function Vt(){return ht(new Date)}function xt(f){const t=at.c(7),{className:x,label:s}=f;let o;t[0]!==x?(o=Z("size-3 rounded-sm border",x),t[0]=x,t[1]=o):o=t[1];let m;t[2]!==o?(m=e.jsx("span",{className:o}),t[2]=o,t[3]=m):m=t[3];let l;return t[4]!==s||t[5]!==m?(l=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[m,s]}),t[4]=s,t[5]=m,t[6]=l):l=t[6],l}function gt(f){const t=at.c(23),{entry:x,active:s,draggable:o,onSelect:m,onDragStateChange:l}=f,c=ct(),{post:i,scheduled:d}=x,r=d?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let a;t[0]!==c||t[1]!==r?(a=c(r),t[0]=c,t[1]=r,t[2]=a):a=t[2];const p=a;let g;t[3]!==l||t[4]!==i.key?(g=N=>{N.dataTransfer.setData("text/plain",i.key),N.dataTransfer.effectAllowed="move",l(i.key)},t[3]=l,t[4]=i.key,t[5]=g):g=t[5];let v;t[6]!==l?(v=()=>l(null),t[6]=l,t[7]=v):v=t[7];let C;t[8]!==m||t[9]!==i.key?(C=()=>m(i.key),t[8]=m,t[9]=i.key,t[10]=C):C=t[10];const h=`${i.title} · ${p}`,w=d?jt:vt,b=o&&"cursor-grab active:cursor-grabbing",D=s&&"ring-2 ring-primary";let u;t[11]!==w||t[12]!==b||t[13]!==D?(u=Z("w-full truncate rounded-md border px-2 py-1 text-left text-xs font-medium transition-colors",w,b,D),t[11]=w,t[12]=b,t[13]=D,t[14]=u):u=t[14];let j;return t[15]!==o||t[16]!==i.title||t[17]!==u||t[18]!==g||t[19]!==v||t[20]!==C||t[21]!==h?(j=e.jsx("button",{type:"button",draggable:o,onDragStart:g,onDragEnd:v,onClick:C,title:h,className:u,children:i.title}),t[15]=o,t[16]=i.title,t[17]=u,t[18]=g,t[19]=v,t[20]=C,t[21]=h,t[22]=j):j=t[22],j}export{zi as PostCalendar};
@@ -0,0 +1 @@
1
+ import{c as he,b as ge,j as t,B as Be}from"./index-LqGJKspm.js";import{u as Ie}from"./chat-context-BuaJtKiH.js";import{i as Ae}from"./AlertCircle-JAw4DKWg.js";import{n as Re}from"./LinkExternal01-_FElc0p1.js";import{bd as De,L as $e}from"./agent-icon-CP4wb7Bx.js";import{I as ue}from"./input-BmnxcFX-.js";import{L as xe}from"./label-CycRXo8-.js";import{M as Me}from"./multi-select-CYubUj6s.js";import{T as je,a as _e,c as ve,b as Ve}from"./tabs--SQ9MSoj.js";import{S as ye}from"./switch-DVOjL7QB.js";import{T as ke}from"./textarea-Ciqg70xj.js";import{u as ze,aL as Ue,aM as be,aN as Ne}from"./runnable-block-editor-BTuxOpmZ.js";import{u as Ye,g as qe,m as Se,b as He,s as Ke,a as Oe,c as Ge,p as Je,d as Ee,e as Qe,l as We,f as Xe}from"./agent-site-editor-content-DHZEWqFy.js";import{c as Le,T as Te,a as we}from"./tooltip-DsIeYtk8.js";import{b as Ze,a as et,B as tt}from"./block-document-4SYSbn7x.js";import{a as st}from"./use-fast-preview-draft-url-C0fMLzwd.js";import{u as it}from"./use-autosave-DT3tUP8x.js";import{s as Q,E as ot,R as lt,A as rt}from"./primitives-xvmFW9M2.js";import"./use-panel-navigate-CPCeDjnd.js";import"./thread-route-D9RjIb92.js";import"./use-project-scope-OfDo_ODT.js";import"./use-virtual-mcp-Dpcooz6x.js";import"./use-mcp-client-D8jBM4Gn.js";import"./auth-DiBJ6HTw.js";import"./github-repo-BknN0SVI.js";import"./autosend-CbSGCC_z.js";import"./thread-intent-DczG93w-.js";import"./slugify-CEUa2lfQ.js";import"./hooks-Cow3V6T6.js";import"./backoff-8mStPHYB.js";import"./task-board-CT88RfwA.js";import"./schema-Dn-PxCJQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-entitlements-CXdqFCsK.js";import"./use-ai-providers-CKFqZtob.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-y3CYynsq.js";import"./use-organization-settings-CR_gD2xz.js";import"./Tool01-j5KBS7L_.js";import"./ArrowUp-CW9s78t7.js";import"./ArrowLeft-C4ws2vta.js";import"./Tool02-DJpbC_72.js";import"./ArrowRight-CGkzbTs-.js";import"./TrendUp01-DETtD9qe.js";import"./ZoomOut-B4s4anLX.js";import"./Users03-DdHJhs5B.js";import"./CheckCircle-D72wsOXz.js";import"./Check-BnJHwdzA.js";import"./ChevronUp-CUHmZknM.js";import"./ChevronRight-CIuRctG6.js";import"./DotsVertical-DZxfXATf.js";import"./UserSquare-CPabtqPY.js";import"./Copy01-CAnIcRR7.js";import"./CreditCard01-Byf14Zko.js";import"./Database01-DhxHwIba.js";import"./MessageCircle01-BIIEDxFs.js";import"./Download01-BKhvQC2t.js";import"./Printer-tuedaxzr.js";import"./Settings02-BhsH56Xz.js";import"./Eye-CeLsr2wK.js";import"./File02-Ic5DSfbF.js";import"./Share07-CzidgFZ5.js";import"./GitBranch01-llYG9Xp9.js";import"./Globe01-BxZcqfmG.js";import"./SwitchHorizontal01-Dqqx_KZP.js";import"./HardDrive-D8M2f43J.js";import"./Image01-CAvGw-jw.js";import"./Key01-MvLRbpTL.js";import"./Link01-BFGs7SHa.js";import"./Monitor01-CgVSaEtw.js";import"./Sun-CdOrW_VN.js";import"./Package-rfI0qNYd.js";import"./Palette-DWgPkj9P.js";import"./Play-DkBjQzgn.js";import"./Plus-CWME9B9L.js";import"./SearchLg-Dqhtv5dc.js";import"./SearchMd-CZSs2LSf.js";import"./Shield01-K4aGKNL2.js";import"./Stars01-C47JIet8.js";import"./Trash01-CrceRjD2.js";import"./Upload01-B6QCJOOJ.js";import"./User01-DLqwauek.js";import"./Users01-BFSgZvlS.js";import"./XCircle-CHAGLbh6.js";import"./XClose-wbQg8T5j.js";import"./X-C_wX87Ke.js";import"./Zap-Blk6garZ.js";import"./badge-CLjnzWV1.js";import"./checkbox-DhhXjWWn.js";import"./command-Clfl-nd5.js";import"./index-CZXQ4cPi.js";import"./dialog-T6SHF6tg.js";import"./popover-CqDWteKd.js";import"./use-session-runtime-4Wsurepj.js";import"./decofile-api-D0jjuK2s.js";import"./utils-BA5pzGOE.js";import"./sandbox-url-D3mC8qhT.js";import"./claim-phase-copy-0btUuJoC.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-C9pBJLa3.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-BzgQJ9lm.js";import"./use-copy-AldvBwzV.js";import"./usage-stats-BsX_MBqv.js";import"./markdown-Dmz1YqdU.js";import"./use-mobile-Dqp4Jkm6.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-msD9uif_.js";import"./types-Uxwa5Ooo.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-DLNW7KMa.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./shell-layout-C3r9cZwX.js";import"./avatar-D6EG4gpi.js";import"./download-app-dialog-DgXSTIhm.js";import"./anchors-yqDzZN4K.js";import"./use-org-notice-oR0FnSz0.js";import"./command-palette-store-BbfrQfcx.js";import"./integration-icon-DWYnH6CS.js";import"./project-icon-4fy6jz5e.js";import"./required-auth-layout-AdYtaYp9.js";import"./use-org-sso-6FHDtS1R.js";import"./sheet-DcmUstYv.js";import"./use-connection-71baAT9J.js";import"./use-navigate-to-agent-DckkpAZt.js";import"./use-mcp-prompts-BI-W9BIZ.js";import"./index-CHMhjP76.js";import"./form-DEQzyl-Z.js";import"./use-thread-outputs-DCO0QMln.js";import"./file-type-icon-CXd8pQq1.js";import"./scroll-area-NimWyBPv.js";import"./select-DTLRO2jP.js";import"./index-DgWiecJC.js";import"./monaco-editor-Bx15Pism.js";import"./editor-B-DDSBye.js";import"./calendar-D2NSI-Uo.js";import"./rich-text-link-control-G1eIsiad.js";import"./safe-image-url-D5z803Ot.js";import"./dropdown-menu-2R7EcIqz.js";import"./search-input-DtAj9jJO.js";import"./use-debounced-value-vcd9fBbq.js";import"./use-file-configs-Bv0ksYAm.js";import"./asset-utils-Zi5dAmhU.js";import"./useInfiniteQuery-D7Bn-Wtf.js";import"./infiniteQueryObserver-D63coM0A.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-Cl0Nt_2b.js";import"./alert-dialog-DJ3365Df.js";import"./sandbox-git-api-CMdpE2TE.js";import"./agent-view-guard-B_GXgcjD.js";import"./use-main-panel-tabs-Ctx_tfIw.js";import"./use-route-default-main-TI35rK7_.js";import"./use-mcp-tools-BghY6B9H.js";import"./index-Dsngyxdw.js";import"./drawer-CEwLHAjr.js";import"./collection-search-BTyqIFVo.js";import"./input-kaJnjge5.js";import"./chat-draft-jLiQk38U.js";import"./use-deco-credits-BCMPDE0p.js";import"./use-open-billing-url-Casm2GPL.js";import"./decopilot-BZgK_WKj.js";import"./ai-providers-logos-DD3qZ33J.js";import"./index-CWvjApMn.js";import"./input-CP1IqPwA.js";import"./hooks-VIquBHyZ.js";import"./use-org-fs-Dlw3vnpa.js";import"./question-004-sINsf4GQ.js";import"./use-members-CpAtdP1_.js";import"./use-org-auth-client-C0d9QdYl.js";import"./feature-paywall-B6TDdJ96.js";import"./plan-ladder-Fc9095b7.js";import"./add-connection-dialog-BlgJR9S1.js";import"./extract-connection-data-C-i7_Byp.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-OBd7O6J-.js";import"./connection-card-BHgG4WUC.js";import"./use-registry-connections-CNnDInfj.js";import"./retry-i8LvYSZg.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-DBoRH_1_.js";import"./authenticate-and-persist-oauth-C-DK5QxU.js";import"./mcp-oauth-xX_w6J5G.js";import"./collection-tabs-B2W6RR6x.js";import"./use-infinite-scroll-CaIDAWPs.js";import"./useSuspenseInfiniteQuery-xIiKKe3g.js";import"./sandbox-lifecycle-context-DRuSe7YD.js";import"./use-task-metadata-DWEBrPNn.js";import"./use-project-native-view-presence-CHK-UQhq.js";import"./site-slug-uya6Wp4-.js";import"./virtual-mcp-eG7E1rwY.js";import"./feature-gate-BOpzUCGP.js";import"./mustache-D1E2hGFA.js";import"./empty-state-M-2HWd2b.js";import"./github-icon-CrJOrJCi.js";import"./repository-import-picker-DJZT2bf1.js";import"./repository-picker-ZWXqLUOz.js";import"./section-preview-url-Csj0_ZDg.js";import"./index-D9F2hZ3H.js";function at(M){return Array.isArray(M)?M.map(e=>({key:Q(e?.key),value:Q(e?.value)})):[]}function Zo(M){const e=he.c(125),{orgSlug:s,virtualMcpId:n,branch:o,blockKey:l,block:p,decofile:i,meta:a,previewBaseUrl:c}=M,r=ge(),x=Ie()?.taskId??null;let h;e[0]!==o||e[1]!==s||e[2]!==n?(h={orgSlug:s,virtualMcpId:n,branch:o},e[0]=o,e[1]=s,e[2]=n,e[3]=h):h=e[3];const f=ze(h);let u;e[4]!==o||e[5]!==a||e[6]!==s||e[7]!==n?(u={orgSlug:s,virtualMcpId:n,branch:o,meta:a},e[4]=o,e[5]=a,e[6]=s,e[7]=n,e[8]=u):u=e[8];const C=Ye(u);let g;e[9]!==o||e[10]!==s||e[11]!==n?(g={orgSlug:s,virtualMcpId:n,branch:o},e[9]=o,e[10]=s,e[11]=n,e[12]=g):g=e[12];const b=st(g);let j;e[13]!==p?(j=qe(p,"posts"),e[13]=p,e[14]=j):j=e[14];const k=j;let P;e[15]!==l||e[16]!==f?(P=m=>{f.mutate({blockKey:l,data:He(l,"posts",Ke(m))})},e[15]=l,e[16]=f,e[17]=P):P=e[17];let S;e[18]!==f.isPending?(S={isSaving:f.isPending},e[18]=f.isPending,e[19]=S):S=e[19];const[d,L]=it(k,P,S);let _;e[20]!==d||e[21]!==L?(_=(m,Fe)=>L({...d,[m]:Fe}),e[20]=d,e[21]=L,e[22]=_):_=e[22];const y=_;let V;e[23]!==i||e[24]!==b||e[25]!==d||e[26]!==c?(V=Ze({decofile:i,post:d,previewBaseUrl:c,draftPointer:b}),e[23]=i,e[24]=b,e[25]=d,e[26]=c,e[27]=V):V=e[27];const N=V;let O,v,z;e[28]!==d||e[29]!==r?(v=Se(d),O=v.length>0,z=v.length===1?r("sandbox.postEditor.missingFieldSingular",{fields:v.join(", ")}):r("sandbox.postEditor.missingFieldPlural",{fields:v.join(", ")}),e[28]=d,e[29]=r,e[30]=O,e[31]=v,e[32]=z):(O=e[30],v=e[31],z=e[32]);const q=z;let T;e[33]!==d.title||e[34]!==r?(T=Q(d.title)||r("sandbox.postEditor.untitledPost"),e[33]=d.title,e[34]=r,e[35]=T):T=e[35];let w;e[36]!==T?(w=t.jsx("span",{className:"truncate text-sm font-medium",children:T}),e[36]=T,e[37]=w):w=e[37];let F;e[38]!==O||e[39]!==v||e[40]!==q||e[41]!==r?(F=O&&t.jsxs(Le,{children:[t.jsx(Te,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx(Ae,{size:14}),v.length," ",v.length===1?r("sandbox.postEditor.issueSingular"):r("sandbox.postEditor.issuePlural")]})}),t.jsx(we,{side:"bottom",children:q})]}),e[38]=O,e[39]=v,e[40]=q,e[41]=r,e[42]=F):F=e[42];let B;e[43]!==f.isError||e[44]!==f.isPending?(B=t.jsx(Ue,{isPending:f.isPending,isError:f.isError}),e[43]=f.isError,e[44]=f.isPending,e[45]=B):B=e[45];const H=!N;let I;e[46]!==N||e[47]!==r?(I=r(N?"sandbox.postEditor.previewTooltip":"sandbox.postEditor.previewRequiresSlugAndCategory"),e[46]=N,e[47]=r,e[48]=I):I=e[48];let A;e[49]!==N?(A=()=>{N&&window.open(N,"_blank","noopener,noreferrer")},e[49]=N,e[50]=A):A=e[50];let U;e[51]===Symbol.for("react.memo_cache_sentinel")?(U=t.jsx(Re,{size:14}),e[51]=U):U=e[51];let R;e[52]!==r?(R=r("sandbox.postEditor.seePreview"),e[52]=r,e[53]=R):R=e[53];let K;e[54]!==H||e[55]!==I||e[56]!==A||e[57]!==R?(K=t.jsxs(Be,{type:"button",variant:"outline",size:"sm",disabled:H,title:I,onClick:A,children:[U,R]}),e[54]=H,e[55]=I,e[56]=A,e[57]=R,e[58]=K):K=e[58];let G;e[59]!==F||e[60]!==B||e[61]!==K?(G=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[F,B,K]}),e[59]=F,e[60]=B,e[61]=K,e[62]=G):G=e[62];let D;e[63]!==w||e[64]!==G?(D=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[w,G]}),e[63]=w,e[64]=G,e[65]=D):D=e[65];let $;e[66]!==d.title?($=Q(d.title),e[66]=d.title,e[67]=$):$=e[67];let Y;e[68]!==y?(Y=m=>y("title",m),e[68]=y,e[69]=Y):Y=e[69];let E;e[70]!==r?(E=r("sandbox.postEditor.postTitlePlaceholder"),e[70]=r,e[71]=E):E=e[71];let J;e[72]!==$||e[73]!==Y||e[74]!==E?(J=t.jsx(ot,{value:$,onChange:Y,placeholder:E,className:"py-1 text-4xl font-bold text-foreground"}),e[72]=$,e[73]=Y,e[74]=E,e[75]=J):J=e[75];let de;e[76]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsx(De,{}),e[76]=de):de=e[76];let W;e[77]!==r?(W=r("sandbox.postEditor.contentTab"),e[77]=r,e[78]=W):W=e[78];let X;e[79]!==W?(X=t.jsxs(je,{value:"content",children:[de,W]}),e[79]=W,e[80]=X):X=e[80];let ce;e[81]===Symbol.for("react.memo_cache_sentinel")?(ce=t.jsx($e,{}),e[81]=ce):ce=e[81];let Z;e[82]!==r?(Z=r("sandbox.postEditor.settingsTab"),e[82]=r,e[83]=Z):Z=e[83];let ee;e[84]!==Z?(ee=t.jsxs(je,{value:"settings",children:[ce,Z]}),e[84]=Z,e[85]=ee):ee=e[85];let te;e[86]!==X||e[87]!==ee?(te=t.jsxs(_e,{children:[X,ee]}),e[86]=X,e[87]=ee,e[88]=te):te=e[88];let se;e[89]!==d.sections?(se=et(d.sections),e[89]=d.sections,e[90]=se):se=e[90];let ie;e[91]!==y?(ie=m=>y("sections",m),e[91]=y,e[92]=ie):ie=e[92];let oe;e[93]!==o||e[94]!==s||e[95]!==x||e[96]!==n?(oe={orgSlug:s,virtualMcpId:n,branch:o,threadId:x},e[93]=o,e[94]=s,e[95]=x,e[96]=n,e[97]=oe):oe=e[97];let le;e[98]!==r?(le=r("sandbox.postEditor.noContentYet"),e[98]=r,e[99]=le):le=e[99];let re;e[100]!==a||e[101]!==se||e[102]!==ie||e[103]!==oe||e[104]!==le?(re=t.jsx(ve,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(tt,{value:se,onChange:ie,meta:a,sandboxRef:oe,emptyMessage:le})})}),e[100]=a,e[101]=se,e[102]=ie,e[103]=oe,e[104]=le,e[105]=re):re=e[105];let ae;e[106]!==d||e[107]!==L?(ae=m=>L({...d,...m}),e[106]=d,e[107]=L,e[108]=ae):ae=e[108];let ne;e[109]!==i||e[110]!==d||e[111]!==y||e[112]!==C||e[113]!==ae?(ne=t.jsx(ve,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(nt,{post:d,decofile:i,support:C,onChange:y,onPatch:ae})})}),e[109]=i,e[110]=d,e[111]=y,e[112]=C,e[113]=ae,e[114]=ne):ne=e[114];let pe;e[115]!==te||e[116]!==re||e[117]!==ne?(pe=t.jsxs(Ve,{defaultValue:"content",className:"mt-6 gap-4",children:[te,re,ne]}),e[115]=te,e[116]=re,e[117]=ne,e[118]=pe):pe=e[118];let me;e[119]!==J||e[120]!==pe?(me=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[J,pe]})}),e[119]=J,e[120]=pe,e[121]=me):me=e[121];let fe;return e[122]!==D||e[123]!==me?(fe=t.jsxs("div",{className:"flex h-full flex-col",children:[D,me]}),e[122]=D,e[123]=me,e[124]=fe):fe=e[124],fe}function Ce(M){const e=he.c(18),{id:s,label:n,checked:o,blocked:l,blockedReason:p,className:i,onCheckedChange:a}=M;let c;e[0]!==s||e[1]!==n?(c=t.jsx(xe,{htmlFor:s,children:n}),e[0]=s,e[1]=n,e[2]=c):c=e[2];let r;e[3]!==l||e[4]!==o||e[5]!==i||e[6]!==s||e[7]!==a?(r=t.jsx(Te,{asChild:!0,children:t.jsx("span",{children:t.jsx(ye,{id:s,className:i,checked:o,disabled:l,onCheckedChange:a})})}),e[3]=l,e[4]=o,e[5]=i,e[6]=s,e[7]=a,e[8]=r):r=e[8];let x;e[9]!==l||e[10]!==p?(x=l&&t.jsx(we,{side:"bottom",children:p}),e[9]=l,e[10]=p,e[11]=x):x=e[11];let h;e[12]!==r||e[13]!==x?(h=t.jsxs(Le,{children:[r,x]}),e[12]=r,e[13]=x,e[14]=h):h=e[14];let f;return e[15]!==c||e[16]!==h?(f=t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c,h]}),e[15]=c,e[16]=h,e[17]=f):f=e[17],f}function nt(M){const e=he.c(142),{post:s,decofile:n,support:o,onChange:l,onPatch:p}=M,i=ge();let a;e[0]!==o?(a=Oe(o),e[0]=o,e[1]=a):a=e[1];const c=a;let r;e[2]!==o?(r=Ge(o),e[2]=o,e[3]=r):r=e[3];const x=r;let h;e[4]!==s?(h=Je(s),e[4]=s,e[5]=h):h=e[5];const f=h,u=x&&f==="scheduled";let C;if(e[6]!==s||e[7]!==i){const m=Se(s);C=m.length===1?i("sandbox.postEditor.missingFieldSingular",{fields:m.join(", ")}):i("sandbox.postEditor.missingFieldPlural",{fields:m.join(", ")}),e[6]=s,e[7]=i,e[8]=C}else C=e[8];const g=C;let b;e[9]!==p||e[10]!==s?(b=m=>p(Xe(s,m,new Date)),e[9]=p,e[10]=s,e[11]=b):b=e[11];const j=b;let k;e[12]!==c||e[13]!==x||e[14]!==u||e[15]!==g||e[16]!==l||e[17]!==s||e[18]!==j||e[19]!==f||e[20]!==i?(k=c&&t.jsxs("div",{className:"space-y-4 border-b pb-4",children:[x&&t.jsx(Ce,{id:"post-scheduled",label:i("sandbox.postEditor.schedulingLabel"),checked:u,blocked:Ee(s,"scheduled"),blockedReason:g,onCheckedChange:m=>j(m?"scheduled":"draft")}),u?t.jsx(be,{schema:{type:"string",format:"date-time",title:i("sandbox.postEditor.scheduledDatetimeLabel"),description:i("sandbox.postEditor.scheduledDatetimeDescription")},value:Q(s.scheduledDatetime),onChange:m=>l("scheduledDatetime",m),path:"post-scheduled-datetime",label:i("sandbox.postEditor.scheduledDatetimeLabel")}):t.jsx(Ce,{id:"post-published",label:i("sandbox.postEditor.publishedLabel"),className:"data-[state=checked]:bg-success",checked:f==="published",blocked:Ee(s,"published"),blockedReason:g,onCheckedChange:m=>j(m?"published":"draft")})]}),e[12]=c,e[13]=x,e[14]=u,e[15]=g,e[16]=l,e[17]=s,e[18]=j,e[19]=f,e[20]=i,e[21]=k):k=e[21];let P;e[22]!==i?(P=i("sandbox.postEditor.excerptLabel"),e[22]=i,e[23]=P):P=e[23];let S;e[24]!==P?(S=t.jsx(xe,{htmlFor:"post-excerpt",children:P}),e[24]=P,e[25]=S):S=e[25];let d;e[26]!==s.excerpt?(d=Q(s.excerpt),e[26]=s.excerpt,e[27]=d):d=e[27];let L;e[28]!==l?(L=m=>l("excerpt",m.target.value),e[28]=l,e[29]=L):L=e[29];let _;e[30]!==L||e[31]!==d?(_=t.jsx(ke,{id:"post-excerpt",value:d,onChange:L,rows:2}),e[30]=L,e[31]=d,e[32]=_):_=e[32];let y;e[33]!==_||e[34]!==S?(y=t.jsxs("div",{className:"space-y-2",children:[S,_]}),e[33]=_,e[34]=S,e[35]=y):y=e[35];let V;e[36]!==i?(V=i("sandbox.postEditor.slugLabel"),e[36]=i,e[37]=V):V=e[37];let N;e[38]!==V?(N=t.jsx(xe,{htmlFor:"post-slug",children:V}),e[38]=V,e[39]=N):N=e[39];let O;e[40]!==s.slug?(O=Q(s.slug),e[40]=s.slug,e[41]=O):O=e[41];let v;e[42]!==l?(v=m=>l("slug",m.target.value),e[42]=l,e[43]=v):v=e[43];let z;e[44]!==i?(z=i("sandbox.postEditor.slugPlaceholder"),e[44]=i,e[45]=z):z=e[45];let q;e[46]!==O||e[47]!==v||e[48]!==z?(q=t.jsx(ue,{id:"post-slug",value:O,onChange:v,placeholder:z,className:"h-10"}),e[46]=O,e[47]=v,e[48]=z,e[49]=q):q=e[49];let T;e[50]!==N||e[51]!==q?(T=t.jsxs("div",{className:"space-y-2",children:[N,q]}),e[50]=N,e[51]=q,e[52]=T):T=e[52];let w;e[53]!==i?(w=i("sandbox.postEditor.dateLabel"),e[53]=i,e[54]=w):w=e[54];let F;e[55]!==w?(F={type:"string",format:"date",title:w},e[55]=w,e[56]=F):F=e[56];let B;e[57]!==s.date?(B=Q(s.date),e[57]=s.date,e[58]=B):B=e[58];let H;e[59]!==l?(H=m=>l("date",m),e[59]=l,e[60]=H):H=e[60];let I;e[61]!==i?(I=i("sandbox.postEditor.dateLabel"),e[61]=i,e[62]=I):I=e[62];let A;e[63]!==F||e[64]!==B||e[65]!==H||e[66]!==I?(A=t.jsx(be,{schema:F,value:B,onChange:H,path:"post-date",label:I}),e[63]=F,e[64]=B,e[65]=H,e[66]=I,e[67]=A):A=e[67];let U;e[68]!==T||e[69]!==A?(U=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T,A]}),e[68]=T,e[69]=A,e[70]=U):U=e[70];let R;e[71]!==i?(R=i("sandbox.postEditor.coverImageLabel"),e[71]=i,e[72]=R):R=e[72];let K;e[73]!==R?(K={type:"string",format:"image-uri",title:R},e[73]=R,e[74]=K):K=e[74];const G=s.image;let D;e[75]!==l?(D=m=>l("image",m),e[75]=l,e[76]=D):D=e[76];let $;e[77]!==i?($=i("sandbox.postEditor.coverImageLabel"),e[77]=i,e[78]=$):$=e[78];let Y;e[79]!==s.image||e[80]!==K||e[81]!==D||e[82]!==$?(Y=t.jsx(Ne,{schema:K,value:G,onChange:D,path:"post-image",label:$}),e[79]=s.image,e[80]=K,e[81]=D,e[82]=$,e[83]=Y):Y=e[83];let E;e[84]!==i?(E=i("sandbox.postEditor.coverAltLabel"),e[84]=i,e[85]=E):E=e[85];let J;e[86]!==i?(J=i("sandbox.postEditor.coverAltDescription"),e[86]=i,e[87]=J):J=e[87];let de;e[88]!==E||e[89]!==J?(de={type:"string",title:E,description:J},e[88]=E,e[89]=J,e[90]=de):de=e[90];let W;e[91]!==s.alt?(W=Q(s.alt),e[91]=s.alt,e[92]=W):W=e[92];let X;e[93]!==l?(X=m=>l("alt",m),e[93]=l,e[94]=X):X=e[94];let ce;e[95]!==i?(ce=i("sandbox.postEditor.coverAltLabel"),e[95]=i,e[96]=ce):ce=e[96];let Z;e[97]!==de||e[98]!==W||e[99]!==X||e[100]!==ce?(Z=t.jsx(be,{schema:de,value:W,onChange:X,path:"post-alt",label:ce}),e[97]=de,e[98]=W,e[99]=X,e[100]=ce,e[101]=Z):Z=e[101];let ee;e[102]!==Y||e[103]!==Z?(ee=t.jsxs("div",{className:"space-y-2",children:[Y,Z]}),e[102]=Y,e[103]=Z,e[104]=ee):ee=e[104];let te;e[105]!==i?(te=i("sandbox.postEditor.authorsLabel"),e[105]=i,e[106]=te):te=e[106];let se;e[107]!==l?(se=m=>l("authors",m),e[107]=l,e[108]=se):se=e[108];let ie;e[109]!==n||e[110]!==s.authors||e[111]!==te||e[112]!==se?(ie=t.jsx(Pe,{label:te,decofile:n,kind:"authors",valueField:"email",toRef:mt,selected:s.authors,onChange:se}),e[109]=n,e[110]=s.authors,e[111]=te,e[112]=se,e[113]=ie):ie=e[113];let oe;e[114]!==i?(oe=i("sandbox.postEditor.categoriesLabel"),e[114]=i,e[115]=oe):oe=e[115];let le;e[116]!==l?(le=m=>l("categories",m),e[116]=l,e[117]=le):le=e[117];let re;e[118]!==n||e[119]!==s.categories||e[120]!==oe||e[121]!==le?(re=t.jsx(Pe,{label:oe,decofile:n,kind:"categories",valueField:"slug",toRef:pt,selected:s.categories,onChange:le}),e[118]=n,e[119]=s.categories,e[120]=oe,e[121]=le,e[122]=re):re=e[122];let ae;e[123]!==l?(ae=m=>l("extraProps",m),e[123]=l,e[124]=ae):ae=e[124];let ne;e[125]!==s.extraProps||e[126]!==ae?(ne=t.jsx(ct,{value:s.extraProps,onChange:ae}),e[125]=s.extraProps,e[126]=ae,e[127]=ne):ne=e[127];let pe;e[128]!==l?(pe=m=>l("seo",m),e[128]=l,e[129]=pe):pe=e[129];let me;e[130]!==s.seo||e[131]!==pe?(me=t.jsx(dt,{value:s.seo,onChange:pe}),e[130]=s.seo,e[131]=pe,e[132]=me):me=e[132];let fe;return e[133]!==y||e[134]!==U||e[135]!==ee||e[136]!==ie||e[137]!==re||e[138]!==ne||e[139]!==me||e[140]!==k?(fe=t.jsxs("div",{className:"space-y-5",children:[k,y,U,ee,ie,re,ne,me]}),e[133]=y,e[134]=U,e[135]=ee,e[136]=ie,e[137]=re,e[138]=ne,e[139]=me,e[140]=k,e[141]=fe):fe=e[141],fe}function pt(M){return{name:Q(M.name),slug:Q(M.slug)}}function mt(M){return{...M}}function dt(M){const e=he.c(93),{value:s,onChange:n}=M,o=ge();let l;e[0]!==s?(l=s&&typeof s=="object"&&!Array.isArray(s)?s:{},e[0]=s,e[1]=l):l=e[1];const p=l;let i;e[2]!==n||e[3]!==p?(i=(E,J)=>n({...p,[E]:J}),e[2]=n,e[3]=p,e[4]=i):i=e[4];const a=i;let c;e[5]!==o?(c=o("sandbox.postEditor.seoSectionLabel"),e[5]=o,e[6]=c):c=e[6];let r;e[7]!==c?(r=t.jsx("p",{className:"text-sm font-medium",children:c}),e[7]=c,e[8]=r):r=e[8];let x;e[9]!==o?(x=o("sandbox.postEditor.seoSectionHint"),e[9]=o,e[10]=x):x=e[10];let h;e[11]!==x?(h=t.jsx("p",{className:"text-xs text-muted-foreground",children:x}),e[11]=x,e[12]=h):h=e[12];let f;e[13]!==r||e[14]!==h?(f=t.jsxs("div",{className:"space-y-1",children:[r,h]}),e[13]=r,e[14]=h,e[15]=f):f=e[15];let u;e[16]!==o?(u=o("sandbox.postEditor.seoTitleLabel"),e[16]=o,e[17]=u):u=e[17];let C;e[18]!==u?(C=t.jsx(xe,{htmlFor:"post-seo-title",children:u}),e[18]=u,e[19]=C):C=e[19];let g;e[20]!==p.title?(g=Q(p.title),e[20]=p.title,e[21]=g):g=e[21];let b;e[22]!==a?(b=E=>a("title",E.target.value),e[22]=a,e[23]=b):b=e[23];let j;e[24]!==g||e[25]!==b?(j=t.jsx(ue,{id:"post-seo-title",value:g,onChange:b,className:"h-10"}),e[24]=g,e[25]=b,e[26]=j):j=e[26];let k;e[27]!==j||e[28]!==C?(k=t.jsxs("div",{className:"space-y-2",children:[C,j]}),e[27]=j,e[28]=C,e[29]=k):k=e[29];let P;e[30]!==o?(P=o("sandbox.postEditor.seoDescriptionLabel"),e[30]=o,e[31]=P):P=e[31];let S;e[32]!==P?(S=t.jsx(xe,{htmlFor:"post-seo-description",children:P}),e[32]=P,e[33]=S):S=e[33];let d;e[34]!==p.description?(d=Q(p.description),e[34]=p.description,e[35]=d):d=e[35];let L;e[36]!==a?(L=E=>a("description",E.target.value),e[36]=a,e[37]=L):L=e[37];let _;e[38]!==d||e[39]!==L?(_=t.jsx(ke,{id:"post-seo-description",value:d,onChange:L,rows:2}),e[38]=d,e[39]=L,e[40]=_):_=e[40];let y;e[41]!==S||e[42]!==_?(y=t.jsxs("div",{className:"space-y-2",children:[S,_]}),e[41]=S,e[42]=_,e[43]=y):y=e[43];let V;e[44]!==o?(V=o("sandbox.postEditor.seoImageLabel"),e[44]=o,e[45]=V):V=e[45];let N;e[46]!==V?(N={type:"string",format:"image-uri",title:V},e[46]=V,e[47]=N):N=e[47];const O=p.image;let v;e[48]!==a?(v=E=>a("image",E),e[48]=a,e[49]=v):v=e[49];let z;e[50]!==o?(z=o("sandbox.postEditor.seoImageLabel"),e[50]=o,e[51]=z):z=e[51];let q;e[52]!==p.image||e[53]!==N||e[54]!==v||e[55]!==z?(q=t.jsx(Ne,{schema:N,value:O,onChange:v,path:"post-seo-image",label:z}),e[52]=p.image,e[53]=N,e[54]=v,e[55]=z,e[56]=q):q=e[56];let T;e[57]!==o?(T=o("sandbox.postEditor.seoCanonicalLabel"),e[57]=o,e[58]=T):T=e[58];let w;e[59]!==T?(w=t.jsx(xe,{htmlFor:"post-seo-canonical",children:T}),e[59]=T,e[60]=w):w=e[60];let F;e[61]!==p.canonical?(F=Q(p.canonical),e[61]=p.canonical,e[62]=F):F=e[62];let B;e[63]!==a?(B=E=>a("canonical",E.target.value),e[63]=a,e[64]=B):B=e[64];let H;e[65]!==o?(H=o("sandbox.postEditor.seoCanonicalPlaceholder"),e[65]=o,e[66]=H):H=e[66];let I;e[67]!==F||e[68]!==B||e[69]!==H?(I=t.jsx(ue,{id:"post-seo-canonical",value:F,onChange:B,placeholder:H,className:"h-10"}),e[67]=F,e[68]=B,e[69]=H,e[70]=I):I=e[70];let A;e[71]!==w||e[72]!==I?(A=t.jsxs("div",{className:"space-y-2",children:[w,I]}),e[71]=w,e[72]=I,e[73]=A):A=e[73];let U;e[74]!==o?(U=o("sandbox.postEditor.seoNoIndexingLabel"),e[74]=o,e[75]=U):U=e[75];let R;e[76]!==U?(R=t.jsx(xe,{htmlFor:"post-seo-no-indexing",children:U}),e[76]=U,e[77]=R):R=e[77];const K=p.noIndexing===!0;let G;e[78]!==a?(G=E=>a("noIndexing",E),e[78]=a,e[79]=G):G=e[79];let D;e[80]!==K||e[81]!==G?(D=t.jsx(ye,{id:"post-seo-no-indexing",checked:K,onCheckedChange:G}),e[80]=K,e[81]=G,e[82]=D):D=e[82];let $;e[83]!==R||e[84]!==D?($=t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[R,D]}),e[83]=R,e[84]=D,e[85]=$):$=e[85];let Y;return e[86]!==k||e[87]!==y||e[88]!==q||e[89]!==A||e[90]!==$||e[91]!==f?(Y=t.jsxs("div",{className:"space-y-5 border-t pt-5",children:[f,k,y,q,A,$]}),e[86]=k,e[87]=y,e[88]=q,e[89]=A,e[90]=$,e[91]=f,e[92]=Y):Y=e[92],Y}function ct(M){const e=he.c(24),{value:s,onChange:n}=M,o=ge();let l,p,i,a;if(e[0]!==n||e[1]!==o||e[2]!==s){l=at(s);const f=(C,g)=>n(l.map((b,j)=>j===C?{...b,...g}:b));p="space-y-2";let u;e[7]!==o?(u=o("sandbox.postEditor.extraPropsLabel"),e[7]=o,e[8]=u):u=e[8],e[9]!==u?(i=t.jsx(xe,{children:u}),e[9]=u,e[10]=i):i=e[10],a=l.length>0&&t.jsx("ul",{className:"space-y-2",children:l.map((C,g)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(ue,{value:C.key,onChange:b=>f(g,{key:b.target.value}),placeholder:o("sandbox.postEditor.keyPlaceholder"),className:"h-9 flex-1"}),t.jsx(ue,{value:C.value,onChange:b=>f(g,{value:b.target.value}),placeholder:o("sandbox.postEditor.valuePlaceholder"),className:"h-9 flex-1"}),t.jsx(lt,{label:o("sandbox.postEditor.removePropLabel"),onClick:()=>n(l.filter((b,j)=>j!==g))})]},g))}),e[0]=n,e[1]=o,e[2]=s,e[3]=l,e[4]=p,e[5]=i,e[6]=a}else l=e[3],p=e[4],i=e[5],a=e[6];let c;e[11]!==o?(c=o("sandbox.postEditor.addPropLabel"),e[11]=o,e[12]=c):c=e[12];let r;e[13]!==l||e[14]!==n?(r=()=>n([...l,{key:"",value:""}]),e[13]=l,e[14]=n,e[15]=r):r=e[15];let x;e[16]!==c||e[17]!==r?(x=t.jsx(rt,{label:c,onClick:r}),e[16]=c,e[17]=r,e[18]=x):x=e[18];let h;return e[19]!==p||e[20]!==i||e[21]!==a||e[22]!==x?(h=t.jsxs("div",{className:p,children:[i,a,x]}),e[19]=p,e[20]=i,e[21]=a,e[22]=x,e[23]=h):h=e[23],h}function Pe(M){const e=he.c(24),{label:s,decofile:n,kind:o,valueField:l,toRef:p,selected:i,onChange:a}=M,c=ge();let r;e[0]!==n||e[1]!==o||e[2]!==i||e[3]!==p||e[4]!==l?(r=Qe({records:We(n,o),selected:i,valueField:l,toRef:p}),e[0]=n,e[1]=o,e[2]=i,e[3]=p,e[4]=l,e[5]=r):r=e[5];const{options:x,selectedValues:h,refsForValues:f}=r;let u;e[6]!==o||e[7]!==c?(u=c(o==="authors"?"sandbox.postEditor.noAuthorsYet":"sandbox.postEditor.noCategoriesYet"),e[6]=o,e[7]=c,e[8]=u):u=e[8];const C=u;let g;e[9]!==o||e[10]!==c?(g=c(o==="authors"?"sandbox.postEditor.selectAuthorsPlaceholder":"sandbox.postEditor.selectCategoriesPlaceholder"),e[9]=o,e[10]=c,e[11]=g):g=e[11];const b=g;let j;e[12]!==s?(j=t.jsx(xe,{children:s}),e[12]=s,e[13]=j):j=e[13];let k;e[14]!==C||e[15]!==a||e[16]!==x||e[17]!==f||e[18]!==b||e[19]!==h?(k=x.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:C}):t.jsx(Me,{options:x,defaultValue:h,onValueChange:S=>a(f(S)),placeholder:b,maxCount:4}),e[14]=C,e[15]=a,e[16]=x,e[17]=f,e[18]=b,e[19]=h,e[20]=k):k=e[20];let P;return e[21]!==j||e[22]!==k?(P=t.jsxs("div",{className:"space-y-2",children:[j,k]}),e[21]=j,e[22]=k,e[23]=P):P=e[23],P}export{Zo as PostEditor};
@@ -1 +1 @@
1
- import{c as J,b as K,d as Z,f as ee,a1 as te,j as t,B as L,l as se}from"./index-7tyXXYIG.js";import{d as Q}from"./dialog-mUIvGRq9.js";import{c as A,T as q,a as G}from"./tooltip-NOT5TvpW.js";import{n as ie}from"./Download01-DKDz2dFy.js";import{n as le}from"./LinkExternal01-BaNEiZ-Z.js";import{s as re}from"./XClose-DIddD6Et.js";import{i as ne}from"./Share07-amH04EUM.js";import{f as oe,F as ae,a as ce}from"./file-preview-BFt64WsS.js";import{F as V,H as de}from"./file-share-button-BnNwXX5z.js";import{F as W}from"./file-type-icon-C1ZF3wAh.js";import{u as fe,b as me,e as he}from"./use-org-fs-Cu_kl9ub.js";import{p as xe,b as pe}from"./location-oTTXFrSF.js";function ue(u){const e=J.c(13),{previewPath:i}=u,a=K(),x=Z(),c=ee({strict:!1}).org??"";let o;e[0]!==i?(o=i.split("/").slice(0,-1).join("/"),e[0]=i,e[1]=o):o=e[1];const r=o;let d;e[2]!==x||e[3]!==c||e[4]!==r||e[5]!==i?(d=()=>{x({to:te.library,params:{org:c},search:{path:r||void 0,preview:i}})},e[2]=x,e[3]=c,e[4]=r,e[5]=i,e[6]=d):d=e[6];const S=d;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(ne,{size:14}),e[7]=f):f=e[7];let n;e[8]!==a?(n=a("library.seeInLibrary.label"),e[8]=a,e[9]=n):n=e[9];let s;return e[10]!==S||e[11]!==n?(s=t.jsxs(L,{variant:"ghost",size:"sm",onClick:S,className:"shrink-0 gap-1.5 text-xs text-muted-foreground",children:[f,n]}),e[10]=S,e[11]=n,e[12]=s):s=e[12],s}const je=u=>/\.html?$/i.test(u);function X(u){const e=J.c(10),{onClose:i}=u,a=K();let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(re,{size:14}),e[0]=x):x=e[0];let c;e[1]!==i?(c=t.jsx(q,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",onClick:i,children:x})}),e[1]=i,e[2]=c):c=e[2];let o;e[3]!==a?(o=a("library.previewContent.close"),e[3]=a,e[4]=o):o=e[4];let r;e[5]!==o?(r=t.jsx(G,{side:"bottom",children:o}),e[5]=o,e[6]=r):r=e[6];let d;return e[7]!==c||e[8]!==r?(d=t.jsxs(A,{children:[c,r]}),e[7]=c,e[8]=r,e[9]=d):d=e[9],d}function Te(u){const e=J.c(67),{previewPath:i,onClose:a,showSeeInLibrary:x,variant:c}=u,o=x===void 0?!1:x,r=K();let d;e[0]!==i?(d=xe(i),e[0]=i,e[1]=d):d=e[1];const S=d,{volume:f,dirPath:n}=S,{data:s,isPending:M}=fe(f,n),$=me(f??"");let l,m,h,j,b,v,g,p,w;if(e[2]!==$||e[3]!==s||e[4]!==n||e[5]!==a||e[6]!==i||e[7]!==o||e[8]!==c||e[9]!==f){w=Symbol.for("react.early_return_sentinel");e:{m=pe(n),h=c==="dialog";let U;e[19]!==i||e[20]!==o?(U=o?t.jsx(ue,{previewPath:i}):null,e[19]=i,e[20]=o,e[21]=U):U=e[21];const B=U;if(l=s&&s.kind==="file"?{key:i,filename:m,size:s.size,downloadUrl:$(s.path)}:null,l&&s&&je(m)){const Y=l.downloadUrl;let _;e[22]!==s?(_=he(s),e[22]=s,e[23]=_):_=e[23];const E=f??"",O=s.shareMode??"private",H=s.effectivePublic??!1,R=window.location.origin+l.downloadUrl;let F;e[24]!==n||e[25]!==E||e[26]!==O||e[27]!==H||e[28]!==R?(F=t.jsx(V,{volume:E,path:n,shareMode:O,effectivePublic:H,url:R}),e[24]=n,e[25]=E,e[26]=O,e[27]=H,e[28]=R,e[29]=F):F=e[29];let z;e[30]!==h||e[31]!==a?(z=h?t.jsx("div",{className:"w-8 shrink-0"}):t.jsx(X,{onClose:a}),e[30]=h,e[31]=a,e[32]=z):z=e[32];let I;e[33]!==B||e[34]!==F||e[35]!==z?(I=t.jsxs(t.Fragment,{children:[F,B,z]}),e[33]=B,e[34]=F,e[35]=z,e[36]=I):I=e[36],w=t.jsxs(t.Fragment,{children:[h&&t.jsx(Q,{className:"sr-only",children:m}),t.jsx(de,{readUrl:Y,marker:_,title:m,savePath:f==="home"?n:void 0,trailing:I},i)]});break e}const D=h?"h-11 py-1 pr-12 pl-2":"h-9 px-2";e[37]!==D?(p=se("flex shrink-0 items-center gap-1 border-b border-border/60",D),e[37]=D,e[38]=p):p=e[38],j="flex min-w-0 flex-1 items-center gap-2 px-2",b=t.jsx(W,{filename:m,className:"h-4.5 w-3.5 shrink-0"}),v=h?t.jsx(Q,{className:"truncate text-xs font-medium text-foreground",children:m}):t.jsx("span",{className:"truncate text-xs font-medium text-foreground",children:m}),g=l&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:oe(l.size)})}e[2]=$,e[3]=s,e[4]=n,e[5]=a,e[6]=i,e[7]=o,e[8]=c,e[9]=f,e[10]=l,e[11]=m,e[12]=h,e[13]=j,e[14]=b,e[15]=v,e[16]=g,e[17]=p,e[18]=w}else l=e[10],m=e[11],h=e[12],j=e[13],b=e[14],v=e[15],g=e[16],p=e[17],w=e[18];if(w!==Symbol.for("react.early_return_sentinel"))return w;let y;e[39]!==j||e[40]!==b||e[41]!==v||e[42]!==g?(y=t.jsxs("div",{className:j,children:[b,v,g]}),e[39]=j,e[40]=b,e[41]=v,e[42]=g,e[43]=y):y=e[43];let P;e[44]!==s?.effectivePublic||e[45]!==s?.shareMode||e[46]!==l||e[47]!==n||e[48]!==r||e[49]!==f?(P=l&&t.jsxs(t.Fragment,{children:[t.jsx(V,{volume:f??"",path:n,shareMode:s?.shareMode??"private",effectivePublic:s?.effectivePublic??!1,url:window.location.origin+l.downloadUrl}),t.jsxs(A,{children:[t.jsx(q,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",asChild:!0,children:t.jsx("a",{href:l.downloadUrl,download:l.filename,children:t.jsx(ie,{size:14})})})}),t.jsx(G,{side:"bottom",children:r("library.previewContent.download")})]}),t.jsxs(A,{children:[t.jsx(q,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",onClick:()=>window.open(l.downloadUrl,"_blank","noopener"),children:t.jsx(le,{size:14})})}),t.jsx(G,{side:"bottom",children:r("library.previewContent.openInNewTab")})]})]}),e[44]=s?.effectivePublic,e[45]=s?.shareMode,e[46]=l,e[47]=n,e[48]=r,e[49]=f,e[50]=P):P=e[50];let N;e[51]!==h||e[52]!==a?(N=!h&&t.jsx(X,{onClose:a}),e[51]=h,e[52]=a,e[53]=N):N=e[53];let k;e[54]!==P||e[55]!==N||e[56]!==p||e[57]!==y?(k=t.jsxs("div",{className:p,children:[y,P,N]}),e[54]=P,e[55]=N,e[56]=p,e[57]=y,e[58]=k):k=e[58];let C;e[59]!==l||e[60]!==m||e[61]!==M||e[62]!==r?(C=t.jsx("div",{className:"relative min-h-0 flex-1 bg-background",children:l?t.jsx(ae,{file:l}):M?t.jsx(ce,{}):t.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[t.jsx(W,{filename:m,className:"h-7.5 w-6"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:r("library.previewContent.fileNotAvailable")})]})}),e[59]=l,e[60]=m,e[61]=M,e[62]=r,e[63]=C):C=e[63];let T;return e[64]!==k||e[65]!==C?(T=t.jsxs(t.Fragment,{children:[k,C]}),e[64]=k,e[65]=C,e[66]=T):T=e[66],T}export{Te as L};
1
+ import{c as J,b as K,d as Z,f as ee,a1 as te,j as t,B as L,l as se}from"./index-LqGJKspm.js";import{d as Q}from"./dialog-T6SHF6tg.js";import{c as A,T as q,a as G}from"./tooltip-DsIeYtk8.js";import{n as ie}from"./Download01-BKhvQC2t.js";import{n as le}from"./LinkExternal01-_FElc0p1.js";import{s as re}from"./XClose-wbQg8T5j.js";import{i as ne}from"./Share07-CzidgFZ5.js";import{f as oe,F as ae,a as ce}from"./file-preview-B2vvETTL.js";import{F as V,H as de}from"./file-share-button-Zf8hU2Fg.js";import{F as W}from"./file-type-icon-CXd8pQq1.js";import{u as fe,b as me,e as he}from"./use-org-fs-Dlw3vnpa.js";import{p as xe,b as pe}from"./location-oTTXFrSF.js";function ue(u){const e=J.c(13),{previewPath:i}=u,a=K(),x=Z(),c=ee({strict:!1}).org??"";let o;e[0]!==i?(o=i.split("/").slice(0,-1).join("/"),e[0]=i,e[1]=o):o=e[1];const r=o;let d;e[2]!==x||e[3]!==c||e[4]!==r||e[5]!==i?(d=()=>{x({to:te.library,params:{org:c},search:{path:r||void 0,preview:i}})},e[2]=x,e[3]=c,e[4]=r,e[5]=i,e[6]=d):d=e[6];const S=d;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(ne,{size:14}),e[7]=f):f=e[7];let n;e[8]!==a?(n=a("library.seeInLibrary.label"),e[8]=a,e[9]=n):n=e[9];let s;return e[10]!==S||e[11]!==n?(s=t.jsxs(L,{variant:"ghost",size:"sm",onClick:S,className:"shrink-0 gap-1.5 text-xs text-muted-foreground",children:[f,n]}),e[10]=S,e[11]=n,e[12]=s):s=e[12],s}const je=u=>/\.html?$/i.test(u);function X(u){const e=J.c(10),{onClose:i}=u,a=K();let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(re,{size:14}),e[0]=x):x=e[0];let c;e[1]!==i?(c=t.jsx(q,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",onClick:i,children:x})}),e[1]=i,e[2]=c):c=e[2];let o;e[3]!==a?(o=a("library.previewContent.close"),e[3]=a,e[4]=o):o=e[4];let r;e[5]!==o?(r=t.jsx(G,{side:"bottom",children:o}),e[5]=o,e[6]=r):r=e[6];let d;return e[7]!==c||e[8]!==r?(d=t.jsxs(A,{children:[c,r]}),e[7]=c,e[8]=r,e[9]=d):d=e[9],d}function Te(u){const e=J.c(67),{previewPath:i,onClose:a,showSeeInLibrary:x,variant:c}=u,o=x===void 0?!1:x,r=K();let d;e[0]!==i?(d=xe(i),e[0]=i,e[1]=d):d=e[1];const S=d,{volume:f,dirPath:n}=S,{data:s,isPending:M}=fe(f,n),$=me(f??"");let l,m,h,j,b,v,g,p,w;if(e[2]!==$||e[3]!==s||e[4]!==n||e[5]!==a||e[6]!==i||e[7]!==o||e[8]!==c||e[9]!==f){w=Symbol.for("react.early_return_sentinel");e:{m=pe(n),h=c==="dialog";let U;e[19]!==i||e[20]!==o?(U=o?t.jsx(ue,{previewPath:i}):null,e[19]=i,e[20]=o,e[21]=U):U=e[21];const B=U;if(l=s&&s.kind==="file"?{key:i,filename:m,size:s.size,downloadUrl:$(s.path)}:null,l&&s&&je(m)){const Y=l.downloadUrl;let _;e[22]!==s?(_=he(s),e[22]=s,e[23]=_):_=e[23];const E=f??"",O=s.shareMode??"private",H=s.effectivePublic??!1,R=window.location.origin+l.downloadUrl;let F;e[24]!==n||e[25]!==E||e[26]!==O||e[27]!==H||e[28]!==R?(F=t.jsx(V,{volume:E,path:n,shareMode:O,effectivePublic:H,url:R}),e[24]=n,e[25]=E,e[26]=O,e[27]=H,e[28]=R,e[29]=F):F=e[29];let z;e[30]!==h||e[31]!==a?(z=h?t.jsx("div",{className:"w-8 shrink-0"}):t.jsx(X,{onClose:a}),e[30]=h,e[31]=a,e[32]=z):z=e[32];let I;e[33]!==B||e[34]!==F||e[35]!==z?(I=t.jsxs(t.Fragment,{children:[F,B,z]}),e[33]=B,e[34]=F,e[35]=z,e[36]=I):I=e[36],w=t.jsxs(t.Fragment,{children:[h&&t.jsx(Q,{className:"sr-only",children:m}),t.jsx(de,{readUrl:Y,marker:_,title:m,savePath:f==="home"?n:void 0,trailing:I},i)]});break e}const D=h?"h-11 py-1 pr-12 pl-2":"h-9 px-2";e[37]!==D?(p=se("flex shrink-0 items-center gap-1 border-b border-border/60",D),e[37]=D,e[38]=p):p=e[38],j="flex min-w-0 flex-1 items-center gap-2 px-2",b=t.jsx(W,{filename:m,className:"h-4.5 w-3.5 shrink-0"}),v=h?t.jsx(Q,{className:"truncate text-xs font-medium text-foreground",children:m}):t.jsx("span",{className:"truncate text-xs font-medium text-foreground",children:m}),g=l&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:oe(l.size)})}e[2]=$,e[3]=s,e[4]=n,e[5]=a,e[6]=i,e[7]=o,e[8]=c,e[9]=f,e[10]=l,e[11]=m,e[12]=h,e[13]=j,e[14]=b,e[15]=v,e[16]=g,e[17]=p,e[18]=w}else l=e[10],m=e[11],h=e[12],j=e[13],b=e[14],v=e[15],g=e[16],p=e[17],w=e[18];if(w!==Symbol.for("react.early_return_sentinel"))return w;let y;e[39]!==j||e[40]!==b||e[41]!==v||e[42]!==g?(y=t.jsxs("div",{className:j,children:[b,v,g]}),e[39]=j,e[40]=b,e[41]=v,e[42]=g,e[43]=y):y=e[43];let P;e[44]!==s?.effectivePublic||e[45]!==s?.shareMode||e[46]!==l||e[47]!==n||e[48]!==r||e[49]!==f?(P=l&&t.jsxs(t.Fragment,{children:[t.jsx(V,{volume:f??"",path:n,shareMode:s?.shareMode??"private",effectivePublic:s?.effectivePublic??!1,url:window.location.origin+l.downloadUrl}),t.jsxs(A,{children:[t.jsx(q,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",asChild:!0,children:t.jsx("a",{href:l.downloadUrl,download:l.filename,children:t.jsx(ie,{size:14})})})}),t.jsx(G,{side:"bottom",children:r("library.previewContent.download")})]}),t.jsxs(A,{children:[t.jsx(q,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",onClick:()=>window.open(l.downloadUrl,"_blank","noopener"),children:t.jsx(le,{size:14})})}),t.jsx(G,{side:"bottom",children:r("library.previewContent.openInNewTab")})]})]}),e[44]=s?.effectivePublic,e[45]=s?.shareMode,e[46]=l,e[47]=n,e[48]=r,e[49]=f,e[50]=P):P=e[50];let N;e[51]!==h||e[52]!==a?(N=!h&&t.jsx(X,{onClose:a}),e[51]=h,e[52]=a,e[53]=N):N=e[53];let k;e[54]!==P||e[55]!==N||e[56]!==p||e[57]!==y?(k=t.jsxs("div",{className:p,children:[y,P,N]}),e[54]=P,e[55]=N,e[56]=p,e[57]=y,e[58]=k):k=e[58];let C;e[59]!==l||e[60]!==m||e[61]!==M||e[62]!==r?(C=t.jsx("div",{className:"relative min-h-0 flex-1 bg-background",children:l?t.jsx(ae,{file:l}):M?t.jsx(ce,{}):t.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[t.jsx(W,{filename:m,className:"h-7.5 w-6"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:r("library.previewContent.fileNotAvailable")})]})}),e[59]=l,e[60]=m,e[61]=M,e[62]=r,e[63]=C):C=e[63];let T;return e[64]!==k||e[65]!==C?(T=t.jsxs(t.Fragment,{children:[k,C]}),e[64]=k,e[65]=C,e[66]=T):T=e[66],T}export{Te as L};
@@ -1 +1 @@
1
- import{c as p,j as n}from"./index-7tyXXYIG.js";import{b as x,D as c}from"./dialog-mUIvGRq9.js";import{L as w}from"./preview-content-DXYNRyjB.js";function g(m){const e=p.c(9),{previewPath:t,onClose:o,showSeeInLibrary:l}=m,a=l===void 0?!1:l;let i;e[0]!==o?(i=f=>{f||o()},e[0]=o,e[1]=i):i=e[1];let r;e[2]!==o||e[3]!==t||e[4]!==a?(r=n.jsx(x,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",children:n.jsx(w,{previewPath:t,onClose:o,showSeeInLibrary:a,variant:"dialog"})}),e[2]=o,e[3]=t,e[4]=a,e[5]=r):r=e[5];let s;return e[6]!==i||e[7]!==r?(s=n.jsx(c,{open:!0,onOpenChange:i,children:r}),e[6]=i,e[7]=r,e[8]=s):s=e[8],s}export{g as L};
1
+ import{c as p,j as n}from"./index-LqGJKspm.js";import{b as x,D as c}from"./dialog-T6SHF6tg.js";import{L as w}from"./preview-content-DpyA1UES.js";function g(m){const e=p.c(9),{previewPath:t,onClose:o,showSeeInLibrary:l}=m,a=l===void 0?!1:l;let i;e[0]!==o?(i=f=>{f||o()},e[0]=o,e[1]=i):i=e[1];let r;e[2]!==o||e[3]!==t||e[4]!==a?(r=n.jsx(x,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",children:n.jsx(w,{previewPath:t,onClose:o,showSeeInLibrary:a,variant:"dialog"})}),e[2]=o,e[3]=t,e[4]=a,e[5]=r):r=e[5];let s;return e[6]!==i||e[7]!==r?(s=n.jsx(c,{open:!0,onOpenChange:i,children:r}),e[6]=i,e[7]=r,e[8]=s):s=e[8],s}export{g as L};
@@ -1 +1 @@
1
- import{c as f,l as h,j as a}from"./index-7tyXXYIG.js";import{a5 as y}from"./agent-icon-BNs8r1fO.js";import{s as v}from"./Plus-DmIvdJjO.js";import{s as j}from"./Trash01-DacQZEqw.js";function N(o){const e=f.c(14),{value:t,onChange:r,placeholder:s,className:n,onFocus:i,onBlur:l,onKeyDown:c,spellCheck:b,inputRef:p}=o,x=b===void 0?!0:b;let u;e[0]!==r?(u=g=>r(g.target.value),e[0]=r,e[1]=u):u=e[1];let d;e[2]!==n?(d=h("w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-muted-foreground/50 focus:ring-0",n),e[2]=n,e[3]=d):d=e[3];let m;return e[4]!==p||e[5]!==l||e[6]!==i||e[7]!==c||e[8]!==s||e[9]!==x||e[10]!==u||e[11]!==d||e[12]!==t?(m=a.jsx("textarea",{ref:p,value:t,onChange:u,onInput:w,onFocus:i,onBlur:l,onKeyDown:c,placeholder:s,spellCheck:x,rows:1,className:d}),e[4]=p,e[5]=l,e[6]=i,e[7]=c,e[8]=s,e[9]=x,e[10]=u,e[11]=d,e[12]=t,e[13]=m):m=e[13],m}function w(o){const e=o.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function z(o){return typeof o=="string"?o:""}function T(o){const e=f.c(11);let t,r;e[0]!==o?({className:t,...r}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=h(t,"pr-9"),e[3]=t,e[4]=s):s=e[4];let n;e[5]!==r||e[6]!==s?(n=a.jsx(N,{...r,className:s}),e[5]=r,e[6]=s,e[7]=n):n=e[7];let i;e[8]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(y,{size:18,"aria-hidden":!0,className:"pointer-events-none absolute right-2 top-3 text-muted-foreground/40 transition-opacity group-hover/editable:text-muted-foreground group-focus-within/editable:text-muted-foreground"}),e[8]=i):i=e[8];let l;return e[9]!==n?(l=a.jsxs("div",{className:"group/editable relative -mx-2 rounded-md px-2 transition-colors hover:bg-muted/50 focus-within:bg-muted/50",children:[n,i]}),e[9]=n,e[10]=l):l=e[10],l}function R(o){const e=f.c(5),{label:t,onClick:r,disabled:s}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(v,{size:13}),e[0]=n):n=e[0];let i;return e[1]!==s||e[2]!==t||e[3]!==r?(i=a.jsxs("button",{type:"button",onClick:r,disabled:s,className:"flex items-center gap-1.5 rounded-md border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground disabled:opacity-40 disabled:hover:border-dashed disabled:hover:text-muted-foreground cursor-pointer",children:[n,t]}),e[1]=s,e[2]=t,e[3]=r,e[4]=i):i=e[4],i}function B(o){const e=f.c(4),{label:t,onClick:r}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(j,{size:13}),e[0]=s):s=e[0];let n;return e[1]!==t||e[2]!==r?(n=a.jsx("button",{type:"button","aria-label":t,onClick:r,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground/60 opacity-0 transition-opacity hover:text-destructive group-hover/item:opacity-100 cursor-pointer",children:s}),e[1]=t,e[2]=r,e[3]=n):n=e[3],n}function E(o){const e=f.c(2),{children:t}=o;let r;return e[0]!==t?(r=a.jsx("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md border bg-popover p-0.5 shadow-md",children:t}),e[0]=t,e[1]=r):r=e[1],r}function S(o){const e=f.c(8),{active:t,label:r,onClick:s,children:n}=o,i=t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let l;e[0]!==i?(l=h("flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-sm transition-colors cursor-pointer",i),e[0]=i,e[1]=l):l=e[1];let c;return e[2]!==t||e[3]!==n||e[4]!==r||e[5]!==s||e[6]!==l?(c=a.jsx("button",{type:"button","aria-label":r,"aria-pressed":t,onMouseDown:_,onClick:s,className:l,children:n}),e[2]=t,e[3]=n,e[4]=r,e[5]=s,e[6]=l,e[7]=c):c=e[7],c}function _(o){return o.preventDefault()}function D(o){if(Array.isArray(o))return o;if(typeof o!="string"||o.trim()==="")return[];try{const e=JSON.parse(o);return Array.isArray(e)?e:[]}catch{return[]}}export{R as A,T as E,E as F,N as I,B as R,S as T,D as p,z as s};
1
+ import{c as f,l as h,j as a}from"./index-LqGJKspm.js";import{a5 as y}from"./agent-icon-CP4wb7Bx.js";import{s as v}from"./Plus-CWME9B9L.js";import{s as j}from"./Trash01-CrceRjD2.js";function N(o){const e=f.c(14),{value:t,onChange:r,placeholder:s,className:n,onFocus:i,onBlur:l,onKeyDown:c,spellCheck:b,inputRef:p}=o,x=b===void 0?!0:b;let u;e[0]!==r?(u=g=>r(g.target.value),e[0]=r,e[1]=u):u=e[1];let d;e[2]!==n?(d=h("w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-muted-foreground/50 focus:ring-0",n),e[2]=n,e[3]=d):d=e[3];let m;return e[4]!==p||e[5]!==l||e[6]!==i||e[7]!==c||e[8]!==s||e[9]!==x||e[10]!==u||e[11]!==d||e[12]!==t?(m=a.jsx("textarea",{ref:p,value:t,onChange:u,onInput:w,onFocus:i,onBlur:l,onKeyDown:c,placeholder:s,spellCheck:x,rows:1,className:d}),e[4]=p,e[5]=l,e[6]=i,e[7]=c,e[8]=s,e[9]=x,e[10]=u,e[11]=d,e[12]=t,e[13]=m):m=e[13],m}function w(o){const e=o.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function z(o){return typeof o=="string"?o:""}function T(o){const e=f.c(11);let t,r;e[0]!==o?({className:t,...r}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=h(t,"pr-9"),e[3]=t,e[4]=s):s=e[4];let n;e[5]!==r||e[6]!==s?(n=a.jsx(N,{...r,className:s}),e[5]=r,e[6]=s,e[7]=n):n=e[7];let i;e[8]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(y,{size:18,"aria-hidden":!0,className:"pointer-events-none absolute right-2 top-3 text-muted-foreground/40 transition-opacity group-hover/editable:text-muted-foreground group-focus-within/editable:text-muted-foreground"}),e[8]=i):i=e[8];let l;return e[9]!==n?(l=a.jsxs("div",{className:"group/editable relative -mx-2 rounded-md px-2 transition-colors hover:bg-muted/50 focus-within:bg-muted/50",children:[n,i]}),e[9]=n,e[10]=l):l=e[10],l}function R(o){const e=f.c(5),{label:t,onClick:r,disabled:s}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(v,{size:13}),e[0]=n):n=e[0];let i;return e[1]!==s||e[2]!==t||e[3]!==r?(i=a.jsxs("button",{type:"button",onClick:r,disabled:s,className:"flex items-center gap-1.5 rounded-md border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground disabled:opacity-40 disabled:hover:border-dashed disabled:hover:text-muted-foreground cursor-pointer",children:[n,t]}),e[1]=s,e[2]=t,e[3]=r,e[4]=i):i=e[4],i}function B(o){const e=f.c(4),{label:t,onClick:r}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(j,{size:13}),e[0]=s):s=e[0];let n;return e[1]!==t||e[2]!==r?(n=a.jsx("button",{type:"button","aria-label":t,onClick:r,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground/60 opacity-0 transition-opacity hover:text-destructive group-hover/item:opacity-100 cursor-pointer",children:s}),e[1]=t,e[2]=r,e[3]=n):n=e[3],n}function E(o){const e=f.c(2),{children:t}=o;let r;return e[0]!==t?(r=a.jsx("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md border bg-popover p-0.5 shadow-md",children:t}),e[0]=t,e[1]=r):r=e[1],r}function S(o){const e=f.c(8),{active:t,label:r,onClick:s,children:n}=o,i=t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let l;e[0]!==i?(l=h("flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-sm transition-colors cursor-pointer",i),e[0]=i,e[1]=l):l=e[1];let c;return e[2]!==t||e[3]!==n||e[4]!==r||e[5]!==s||e[6]!==l?(c=a.jsx("button",{type:"button","aria-label":r,"aria-pressed":t,onMouseDown:_,onClick:s,className:l,children:n}),e[2]=t,e[3]=n,e[4]=r,e[5]=s,e[6]=l,e[7]=c):c=e[7],c}function _(o){return o.preventDefault()}function D(o){if(Array.isArray(o))return o;if(typeof o!="string"||o.trim()==="")return[];try{const e=JSON.parse(o);return Array.isArray(e)?e:[]}catch{return[]}}export{R as A,T as E,E as F,N as I,B as R,S as T,D as p,z as s};
@@ -1 +1 @@
1
- import{c as I,b as Pe,n as Ze,m as Je,K as We,a as ke,t as E,l as De,j as s,r as L,B as Ee,h as et,P as Re,eU as tt,ad as st,az as at,v as it,o as M,dR as R,dP as Ke,dQ as Ye}from"./index-7tyXXYIG.js";import{A as lt}from"./avatar-Bh0VE7CU.js";import{D as nt,b as rt,c as ot,d as ct,h as ft,e as dt}from"./dialog-mUIvGRq9.js";import{T as ut,a as pt,R as mt,b as gt}from"./index-GHrQksGb.js";import{s as ht}from"./Trash01-DacQZEqw.js";import{i as xt}from"./Upload01-COWsdxp9.js";import{S as Oe}from"./switch-XzCZqEVH.js";import{d as Ve,S as Be,c as Ge,b as Fe}from"./select-DuiQIVh5.js";import{T as Ie,a as vt}from"./toggle-group-BpHZ2Rek.js";import{I as bt}from"./input-B3Coacmv.js";import{i as jt}from"./Monitor01-M9EpHieD.js";import{n as yt,a as wt}from"./Sun-CG_-rnB-.js";import{i as St}from"./Play-zxSLSkrU.js";import{u as _t}from"./use-debounced-autosave-DKqaLPMf.js";import{p as At,q as Nt}from"./question-004-sINsf4GQ.js";import"./User01-BvT7Fpbq.js";import"./X-BSqsmD1L.js";import"./index-B4rsaStI.js";import"./Check-BXALxZkV.js";import"./ChevronUp-doBmaKp2.js";const Ct=2*1024*1024,kt=["image/png","image/jpeg","image/gif","image/webp"];async function Pt(e){try{return(await e.json()).error??""}catch{return""}}async function ze(e){if(!e.ok)throw new Error(await Pt(e));return e}function Ut(e){const t=I.c(3);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=We.userAvatars(),t[0]=i):i=t[0];let a;return t[1]!==e?(a={queryKey:i,enabled:e,queryFn:Dt},t[1]=e,t[2]=a):a=t[2],Je(a)}async function Dt(){return(await(await ze(await fetch("/api/_users/avatars"))).json()).avatars}function zt(){const e=I.c(22),t=Pe(),i=Ze();let a;e[0]!==i?(a=async()=>{await Promise.all([i.invalidateQueries({queryKey:We.userAvatars()}),ke.getSession({query:{disableCookieCache:!0}})])},e[0]=i,e[1]=a):a=e[1];const l=a;let o;e[2]!==l||e[3]!==t?(o=async(f,v)=>{try{return await f(),await l(),E.success(v),!0}catch(y){const x=y;return E.error(x instanceof Error&&x.message?x.message:t("settings.profile.avatarUploadError")),!1}},e[2]=l,e[3]=t,e[4]=o):o=e[4];const n=o;let u;e[5]!==t||e[6]!==n?(u=async f=>{let v=null;return await n(async()=>{v=(await(await ze(await fetch("/api/_users/avatar",{method:"POST",headers:{"content-type":f.type||"image/webp"},body:f}))).json()).url,await ke.updateUser({image:v})},t("settings.profile.avatarUpdated"))?v:null},e[5]=t,e[6]=n,e[7]=u):u=e[7];const p=u;let b;e[8]!==t||e[9]!==n?(b=f=>n(async()=>{const v=await ze(await fetch("/api/_users/avatar/select",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:f})})),{url:y}=await v.json();await ke.updateUser({image:y})},t("settings.profile.avatarUpdated")),e[8]=t,e[9]=n,e[10]=b):b=e[10];const d=b;let j;e[11]!==t||e[12]!==n?(j=f=>n(async()=>{await ze(await fetch(`/api/_users/avatar?path=${encodeURIComponent(f)}`,{method:"DELETE"}))},t("settings.profile.avatarDeleted")),e[11]=t,e[12]=n,e[13]=j):j=e[13];const g=j;let c;e[14]!==t||e[15]!==n?(c=()=>n(Mt,t("settings.profile.avatarRemoved")),e[14]=t,e[15]=n,e[16]=c):c=e[16];const h=c;let m;return e[17]!==g||e[18]!==h||e[19]!==d||e[20]!==p?(m={uploadAvatar:p,selectAvatar:d,deleteStoredAvatar:g,removeAvatar:h},e[17]=g,e[18]=h,e[19]=d,e[20]=p,e[21]=m):m=e[21],m}async function Mt(){await ke.updateUser({image:null}),await ze(await fetch("/api/_users/avatar",{method:"DELETE"}))}function Tt(e){const t=I.c(26);let i,a,l,o,n,u;t[0]!==e?({className:i,defaultValue:a,value:u,min:o,max:n,...l}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=l,t[4]=o,t[5]=n,t[6]=u):(i=t[1],a=t[2],l=t[3],o=t[4],n=t[5],u=t[6]);const p=o===void 0?0:o,b=n===void 0?100:n;let d;t[7]!==a||t[8]!==b||t[9]!==p||t[10]!==u?(d=Array.isArray(u)?u:Array.isArray(a)?a:[p,b],t[7]=a,t[8]=b,t[9]=p,t[10]=u,t[11]=d):d=t[11];const j=d;let g;t[12]!==i?(g=De("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",i),t[12]=i,t[13]=g):g=t[13];let c;t[14]===Symbol.for("react.memo_cache_sentinel")?(c=De("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),t[14]=c):c=t[14];let h;t[15]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ut,{"data-slot":"slider-track",className:c,children:s.jsx(pt,{"data-slot":"slider-range",className:De("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),t[15]=h):h=t[15];let m;t[16]!==j.length?(m=Array.from({length:j.length},Rt),t[16]=j.length,t[17]=m):m=t[17];let f;return t[18]!==a||t[19]!==b||t[20]!==p||t[21]!==l||t[22]!==g||t[23]!==m||t[24]!==u?(f=s.jsxs(mt,{"data-slot":"slider",defaultValue:a,value:u,min:p,max:b,className:g,...l,children:[h,m]}),t[18]=a,t[19]=b,t[20]=p,t[21]=l,t[22]=g,t[23]=m,t[24]=u,t[25]=f):f=t[25],f}function Rt(e,t){return s.jsx(gt,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},t)}function $e(e){return Math.max(e.viewport/e.imageWidth,e.viewport/e.imageHeight)}function Et(e){const t=$e(e)*e.zoom;return{x:Math.max(0,(e.imageWidth*t-e.viewport)/2),y:Math.max(0,(e.imageHeight*t-e.viewport)/2)}}function Qe(e){const t=Et(e);return{x:Math.min(t.x,Math.max(-t.x,e.offset.x)),y:Math.min(t.y,Math.max(-t.y,e.offset.y))}}function Ot(e){const t=$e(e)*e.zoom,i=Qe(e),a=e.viewport/t,l=e.imageWidth/2-a/2-i.x/t,o=e.imageHeight/2-a/2-i.y/t;return{sx:Math.min(Math.max(0,l),Math.max(0,e.imageWidth-a)),sy:Math.min(Math.max(0,o),Math.max(0,e.imageHeight-a)),size:a}}function It(e,t){return Math.max(1,Math.round(Math.min(t,e.size)))}const Le=288,Ue=1,qe=4;function Lt(e){return new Promise((t,i)=>{const a=URL.createObjectURL(e),l=new Image;l.onload=()=>t({element:l,url:a,width:l.naturalWidth,height:l.naturalHeight}),l.onerror=()=>{URL.revokeObjectURL(a),i(new Error("decode failed"))},l.src=a})}function Gt(e,t,i){const a=Ot(t),l=It(a,i),o=document.createElement("canvas");o.width=l,o.height=l;const n=o.getContext("2d");return n?(n.drawImage(e.element,a.sx,a.sy,a.size,a.size,0,0,l,l),new Promise(u=>{o.toBlob(p=>u(p),"image/webp",.92)})):Promise.resolve(null)}function $t({open:e,onOpenChange:t,title:i,description:a,shape:l="circle",maxOutputSize:o=512,accept:n,maxBytes:u,onUpload:p,gallery:b}){const d=Pe(),j=L.useRef(null),g=L.useRef(null),[c,h]=L.useState(null),[m,f]=L.useState(Ue),[v,y]=L.useState({x:0,y:0}),[x,w]=L.useState(!1),N=l==="circle"?"rounded-full":"rounded-xl";function S(){c&&URL.revokeObjectURL(c.url),h(null),f(Ue),y({x:0,y:0})}function _(){S(),t(!1)}async function U(r){if(!n.includes(r.type)){E.error(d("imageUpload.unsupportedType"));return}if(r.size>u){E.error(d("imageUpload.tooLarge",{max:String(Math.round(u/(1024*1024)))}));return}try{S(),h(await Lt(r))}catch{E.error(d("imageUpload.decodeFailed"))}}const C=c&&{imageWidth:c.width,imageHeight:c.height,viewport:Le,zoom:m,offset:v},k=C?Qe(C):{x:0,y:0},D=C?$e(C)*m:1;async function O(){if(!(!c||!C)){w(!0);try{const r=await Gt(c,C,o);if(!r){E.error(d("imageUpload.encodeFailed"));return}await p(r)&&_()}finally{w(!1)}}}async function T(r){w(!0);try{await r}finally{w(!1)}}return s.jsx(nt,{open:e,onOpenChange:r=>r?t(!0):_(),children:s.jsxs(rt,{className:"sm:max-w-[26rem]",children:[s.jsxs(ot,{children:[s.jsx(ct,{children:i}),a?s.jsx(ft,{children:a}):null]}),c&&C?s.jsxs("div",{className:"flex flex-col items-center gap-4",children:[s.jsx("div",{className:De("relative overflow-hidden bg-muted touch-none cursor-grab active:cursor-grabbing",N),style:{width:Le,height:Le},onPointerDown:r=>{g.current={x:r.clientX-k.x,y:r.clientY-k.y},r.currentTarget.setPointerCapture(r.pointerId)},onPointerMove:r=>{const P=g.current;P&&y({x:r.clientX-P.x,y:r.clientY-P.y})},onPointerUp:r=>{g.current=null,r.currentTarget.releasePointerCapture(r.pointerId)},onPointerCancel:()=>{g.current=null},onWheel:r=>{const P=m-r.deltaY*.002;f(Math.min(qe,Math.max(Ue,P)))},children:s.jsx("img",{src:c.url,alt:"",draggable:!1,className:"absolute left-1/2 top-1/2 max-w-none select-none",style:{width:c.width*D,height:c.height*D,transform:`translate(calc(-50% + ${k.x}px), calc(-50% + ${k.y}px))`}})}),s.jsxs("div",{className:"flex w-full items-center gap-3 px-1",children:[s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:d("imageUpload.zoom")}),s.jsx(Tt,{value:[m],min:Ue,max:qe,step:.01,onValueChange:([r])=>f(r??Ue),"aria-label":d("imageUpload.zoom")})]})]}):s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("button",{type:"button",onClick:()=>j.current?.click(),className:"flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-border py-10 text-sm text-muted-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[s.jsx(xt,{className:"size-5"}),d("imageUpload.choose")]}),b&&b.items.length>0?s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:d("imageUpload.recent")}),s.jsx("div",{className:"flex flex-wrap gap-2",children:b.items.map(r=>s.jsxs("div",{className:"group relative",children:[s.jsx("button",{type:"button",disabled:x,onClick:()=>{T(b.onSelect(r.path)).then(_)},"aria-label":d("imageUpload.usePicture"),className:De("size-14 overflow-hidden border transition-opacity hover:opacity-80 disabled:opacity-50",N,r.current?"border-primary ring-2 ring-primary/40":"border-border"),children:s.jsx("img",{src:r.url,alt:"",className:"size-full object-cover"})}),b.onDelete&&!r.current?s.jsx("button",{type:"button",disabled:x,onClick:()=>{T(b.onDelete(r.path))},"aria-label":d("imageUpload.deletePicture"),className:"absolute -right-1 -top-1 hidden rounded-full bg-background p-1 text-muted-foreground shadow-sm hover:text-destructive group-hover:block",children:s.jsx(ht,{className:"size-3"})}):null]},r.path))})]}):null]}),s.jsx("input",{ref:j,type:"file",accept:n.join(","),className:"hidden",onChange:r=>{const P=r.target.files?.[0];r.target.value="",P&&U(P)}}),s.jsx(dt,{children:c?s.jsxs(s.Fragment,{children:[s.jsx(Ee,{variant:"ghost",onClick:S,disabled:x,children:d("imageUpload.back")}),s.jsxs(Ee,{onClick:()=>{O()},disabled:x,children:[x?s.jsx(et,{size:"sm"}):null,d("imageUpload.save")]})]}):s.jsx(Ee,{variant:"ghost",onClick:_,children:d("imageUpload.cancel")})})]})})}const He=[{value:"en",label:"English"},{value:"pt-BR",label:"Português (Brasil)"}];function Vt(e){const t=I.c(36),{url:i,fallback:a}=e,l=Pe(),[o,n]=L.useState(!1),{uploadAvatar:u,selectAvatar:p,deleteStoredAvatar:b,removeAvatar:d}=zt(),j=Ut(o);let g;t[0]!==d||t[1]!==l||t[2]!==i?(g=i?s.jsx(Ee,{variant:"ghost",size:"sm",onClick:()=>{d()},children:l("settings.profile.avatarRemove")}):null,t[0]=d,t[1]=l,t[2]=i,t[3]=g):g=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=()=>n(!0),t[4]=c):c=t[4];let h;t[5]!==l?(h=l("settings.profile.avatarUpload"),t[5]=l,t[6]=h):h=t[6];let m;t[7]!==l?(m=l("settings.profile.avatarUpload"),t[7]=l,t[8]=m):m=t[8];let f;t[9]!==a||t[10]!==i?(f=s.jsx(lt,{url:i,fallback:a,shape:"circle",size:"base"}),t[9]=a,t[10]=i,t[11]=f):f=t[11];let v;t[12]!==h||t[13]!==m||t[14]!==f?(v=s.jsx("button",{type:"button",onClick:c,"aria-label":h,title:m,className:"rounded-full transition-opacity hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:f}),t[12]=h,t[13]=m,t[14]=f,t[15]=v):v=t[15];let y;t[16]!==l?(y=l("settings.profile.avatarDialogTitle"),t[16]=l,t[17]=y):y=t[17];let x;t[18]!==l?(x=l("settings.profile.avatarDialogDescription"),t[18]=l,t[19]=x):x=t[19];let w;t[20]!==j.data?(w=j.data??[],t[20]=j.data,t[21]=w):w=t[21];let N;t[22]!==b||t[23]!==p||t[24]!==w?(N={items:w,onSelect:p,onDelete:b},t[22]=b,t[23]=p,t[24]=w,t[25]=N):N=t[25];let S;t[26]!==o||t[27]!==N||t[28]!==y||t[29]!==x||t[30]!==u?(S=s.jsx($t,{open:o,onOpenChange:n,title:y,description:x,shape:"circle",accept:kt,maxBytes:Ct,onUpload:u,gallery:N}),t[26]=o,t[27]=N,t[28]=y,t[29]=x,t[30]=u,t[31]=S):S=t[31];let _;return t[32]!==g||t[33]!==S||t[34]!==v?(_=s.jsxs("div",{className:"flex items-center gap-2",children:[g,v,S]}),t[32]=g,t[33]=S,t[34]=v,t[35]=_):_=t[35],_}function Bt(){const e=I.c(36),t=Pe(),{data:i,isPending:a}=ke.useSession(),l=i?.user,o=l?.image,n=l?.name??"";let u;e[0]!==n?(u={values:{name:n}},e[0]=n,e[1]=u):u=e[1];const p=st(u);let b;e[2]!==p||e[3]!==t?(b={save:async()=>{const C=p.control._formState.dirtyFields;if(Object.keys(C).length===0)return;const k=p.getValues(),D=p.control._defaultValues;p.reset(k,{keepValues:!0});try{await ke.updateUser({name:k.name}),M("profile_updated",{fields:["name"]}),E.success(t("settings.profile.updateSuccess"))}catch{p.reset(D,{keepValues:!0}),E.error(t("settings.profile.updateError"))}}},e[2]=p,e[3]=t,e[4]=b):b=e[4];const{schedule:d,flush:j}=_t(b);if(a)return null;let g;e[5]!==t?(g=t("settings.profile.avatar"),e[5]=t,e[6]=g):g=e[6];const c=l?.name??"U";let h;e[7]!==c||e[8]!==o?(h=s.jsx(Vt,{url:o,fallback:c}),e[7]=c,e[8]=o,e[9]=h):h=e[9];let m;e[10]!==g||e[11]!==h?(m=s.jsx(R,{title:g,action:h}),e[10]=g,e[11]=h,e[12]=m):m=e[12];let f;e[13]!==t?(f=t("settings.profile.displayName"),e[13]=t,e[14]=f):f=e[14];let v;e[15]!==j||e[16]!==d||e[17]!==t?(v=C=>{const{field:k}=C;return s.jsx(bt,{id:"display-name",...k,onChange:D=>{k.onChange(D),d()},onBlur:()=>{k.onBlur(),j()},onKeyDown:D=>{D.key==="Enter"&&j()},placeholder:t("settings.profile.displayNamePlaceholder"),className:"w-[280px]"})},e[15]=j,e[16]=d,e[17]=t,e[18]=v):v=e[18];let y;e[19]!==p.control||e[20]!==v?(y=s.jsx(at,{control:p.control,name:"name",render:v}),e[19]=p.control,e[20]=v,e[21]=y):y=e[21];let x;e[22]!==f||e[23]!==y?(x=s.jsx(R,{title:f,action:y}),e[22]=f,e[23]=y,e[24]=x):x=e[24];let w;e[25]!==t?(w=t("settings.profile.email"),e[25]=t,e[26]=w):w=e[26];const N=l?.email;let S;e[27]!==N?(S=s.jsx("span",{className:"text-sm text-muted-foreground",children:N}),e[27]=N,e[28]=S):S=e[28];let _;e[29]!==w||e[30]!==S?(_=s.jsx(R,{title:w,action:S}),e[29]=w,e[30]=S,e[31]=_):_=e[31];let U;return e[32]!==x||e[33]!==_||e[34]!==m?(U=s.jsx(Ke,{children:s.jsxs(Ye,{children:[m,x,_]})}),e[32]=x,e[33]=_,e[34]=m,e[35]=U):U=e[35],U}function Ft(){const e=I.c(180),t=Pe(),[i,a]=it();let l;e[0]!==a||e[1]!==t?(l=async A=>{if(A&&await Notification.requestPermission()!=="granted"){M("preferences_notifications_permission_denied"),E.error(t("settings.preferences.notificationsDenied")),a(Qt);return}M("preferences_notifications_toggled",{enabled:A}),a(z=>({...z,enableNotifications:A}))},e[0]=a,e[1]=t,e[2]=l):l=e[2];const o=l;let n;e[3]!==t?(n=t("settings.preferences.title"),e[3]=t,e[4]=n):n=e[4];let u;e[5]!==t?(u=t("settings.preferences.theme"),e[5]=t,e[6]=u):u=e[6];let p;e[7]!==t?(p=t("settings.preferences.themeDescription"),e[7]=t,e[8]=p):p=e[8];const b=i.theme;let d;e[9]!==a?(d=A=>{A&&(M("preferences_theme_changed",{to_value:A}),a(z=>({...z,theme:A})))},e[9]=a,e[10]=d):d=e[10];let j;e[11]!==t?(j=t("settings.preferences.themeLight"),e[11]=t,e[12]=j):j=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(yt,{size:14}),e[13]=g):g=e[13];let c;e[14]!==j?(c=s.jsx(Ie,{value:"light","aria-label":j,children:g}),e[14]=j,e[15]=c):c=e[15];let h;e[16]!==t?(h=t("settings.preferences.themeDark"),e[16]=t,e[17]=h):h=e[17];let m;e[18]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(wt,{size:14}),e[18]=m):m=e[18];let f;e[19]!==h?(f=s.jsx(Ie,{value:"dark","aria-label":h,children:m}),e[19]=h,e[20]=f):f=e[20];let v;e[21]!==t?(v=t("settings.preferences.themeSystem"),e[21]=t,e[22]=v):v=e[22];let y;e[23]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(jt,{size:14}),e[23]=y):y=e[23];let x;e[24]!==v?(x=s.jsx(Ie,{value:"system","aria-label":v,children:y}),e[24]=v,e[25]=x):x=e[25];let w;e[26]!==i.theme||e[27]!==f||e[28]!==x||e[29]!==d||e[30]!==c?(w=s.jsxs(vt,{type:"single",size:"sm",variant:"outline",value:b,onValueChange:d,children:[c,f,x]}),e[26]=i.theme,e[27]=f,e[28]=x,e[29]=d,e[30]=c,e[31]=w):w=e[31];let N;e[32]!==w||e[33]!==u||e[34]!==p?(N=s.jsx(R,{title:u,description:p,action:w}),e[32]=w,e[33]=u,e[34]=p,e[35]=N):N=e[35];let S;e[36]!==t?(S=t("settings.preferences.language"),e[36]=t,e[37]=S):S=e[37];let _;e[38]!==t?(_=t("settings.preferences.languageDescription"),e[38]=t,e[39]=_):_=e[39];let U;e[40]!==a?(U=A=>{M("preferences_language_changed",{to_value:A}),a(z=>({...z,language:A}))},e[40]=a,e[41]=U):U=e[41];let C;e[42]!==i.language?(C=He.find(A=>A.value===i.language)?.label,e[42]=i.language,e[43]=C):C=e[43];let k;e[44]!==C?(k=s.jsx(Fe,{className:"w-44 h-7 text-xs",children:s.jsx("span",{children:C})}),e[44]=C,e[45]=k):k=e[45];let D;e[46]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Ve,{children:He.map(Yt)}),e[46]=D):D=e[46];let O;e[47]!==i.language||e[48]!==U||e[49]!==k?(O=s.jsxs(Be,{value:i.language,onValueChange:U,children:[k,D]}),e[47]=i.language,e[48]=U,e[49]=k,e[50]=O):O=e[50];let T;e[51]!==S||e[52]!==_||e[53]!==O?(T=s.jsx(R,{title:S,description:_,action:O}),e[51]=S,e[52]=_,e[53]=O,e[54]=T):T=e[54];let r;e[55]!==t?(r=t("settings.preferences.notifications"),e[55]=t,e[56]=r):r=e[56];let P;e[57]!==t?(P=t("settings.preferences.notificationsDescription"),e[57]=t,e[58]=P):P=e[58];let G;e[59]!==o||e[60]!==i.enableNotifications?(G=typeof Notification<"u"?()=>o(!i.enableNotifications):void 0,e[59]=o,e[60]=i.enableNotifications,e[61]=G):G=e[61];let $;e[62]!==o||e[63]!==i.enableNotifications?($=s.jsx(Oe,{disabled:typeof Notification>"u",checked:i.enableNotifications,onCheckedChange:o}),e[62]=o,e[63]=i.enableNotifications,e[64]=$):$=e[64];let V;e[65]!==r||e[66]!==P||e[67]!==G||e[68]!==$?(V=s.jsx(R,{title:r,description:P,onClick:G,action:$}),e[65]=r,e[66]=P,e[67]=G,e[68]=$,e[69]=V):V=e[69];let B;e[70]!==t?(B=t("settings.preferences.sounds"),e[70]=t,e[71]=B):B=e[71];let F;e[72]!==t?(F=t("settings.preferences.soundsDescription"),e[72]=t,e[73]=F):F=e[73];let q;e[74]!==i.enableSounds||e[75]!==a?(q=()=>{M("preferences_sounds_toggled",{enabled:!i.enableSounds}),a(Kt)},e[74]=i.enableSounds,e[75]=a,e[76]=q):q=e[76];let H;e[77]!==t?(H=t("settings.preferences.soundsPreview"),e[77]=t,e[78]=H):H=e[78];let Me;e[79]===Symbol.for("react.memo_cache_sentinel")?(Me=s.jsx(St,{size:11}),e[79]=Me):Me=e[79];let W;e[80]!==H?(W=s.jsx("button",{type:"button","aria-label":H,onClick:Ht,className:"size-6 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",children:Me}),e[80]=H,e[81]=W):W=e[81];let K;e[82]!==a?(K=A=>{M("preferences_sounds_toggled",{enabled:A}),a(z=>({...z,enableSounds:A}))},e[82]=a,e[83]=K):K=e[83];let Y;e[84]!==i.enableSounds||e[85]!==K?(Y=s.jsx(Oe,{checked:i.enableSounds,onCheckedChange:K}),e[84]=i.enableSounds,e[85]=K,e[86]=Y):Y=e[86];let Q;e[87]!==W||e[88]!==Y?(Q=s.jsxs("div",{className:"flex items-center gap-2",children:[W,Y]}),e[87]=W,e[88]=Y,e[89]=Q):Q=e[89];let X;e[90]!==B||e[91]!==F||e[92]!==q||e[93]!==Q?(X=s.jsx(R,{title:B,description:F,onClick:q,action:Q}),e[90]=B,e[91]=F,e[92]=q,e[93]=Q,e[94]=X):X=e[94];let Z;e[95]!==t?(Z=t("settings.preferences.projectSettingsGear"),e[95]=t,e[96]=Z):Z=e[96];let J;e[97]!==t?(J=t("settings.preferences.projectSettingsGearDescription"),e[97]=t,e[98]=J):J=e[98];let ee;e[99]!==i.showProjectSettingsGear||e[100]!==a?(ee=()=>{M("preferences_project_settings_gear_toggled",{enabled:!i.showProjectSettingsGear}),a(qt)},e[99]=i.showProjectSettingsGear,e[100]=a,e[101]=ee):ee=e[101];let te;e[102]!==t?(te=t("settings.preferences.projectSettingsGear"),e[102]=t,e[103]=te):te=e[103];let se;e[104]!==a?(se=A=>{M("preferences_project_settings_gear_toggled",{enabled:A}),a(z=>({...z,showProjectSettingsGear:A}))},e[104]=a,e[105]=se):se=e[105];let ae;e[106]!==i.showProjectSettingsGear||e[107]!==te||e[108]!==se?(ae=s.jsx(Oe,{"aria-label":te,checked:i.showProjectSettingsGear,onCheckedChange:se}),e[106]=i.showProjectSettingsGear,e[107]=te,e[108]=se,e[109]=ae):ae=e[109];let ie;e[110]!==Z||e[111]!==J||e[112]!==ee||e[113]!==ae?(ie=s.jsx(R,{title:Z,description:J,onClick:ee,action:ae}),e[110]=Z,e[111]=J,e[112]=ee,e[113]=ae,e[114]=ie):ie=e[114];let le;e[115]!==t?(le=t("settings.preferences.toolApproval"),e[115]=t,e[116]=le):le=e[116];let ne;e[117]!==t?(ne=t("settings.preferences.toolApprovalDescription"),e[117]=t,e[118]=ne):ne=e[118];const Xe=i.toolApprovalLevel;let re;e[119]!==a?(re=A=>{M("preferences_tool_approval_changed",{to_value:A}),a(z=>({...z,toolApprovalLevel:A}))},e[119]=a,e[120]=re):re=e[120];let oe;e[121]!==i.toolApprovalLevel||e[122]!==t?(oe={readonly:t("settings.preferences.toolApprovalAsk"),auto:t("settings.preferences.toolApprovalAuto")}[i.toolApprovalLevel]??t("settings.preferences.toolApprovalAsk"),e[121]=i.toolApprovalLevel,e[122]=t,e[123]=oe):oe=e[123];let ce;e[124]!==oe?(ce=s.jsx(Fe,{className:"w-36 h-7 text-xs",children:s.jsx("span",{children:oe})}),e[124]=oe,e[125]=ce):ce=e[125];let fe;e[126]!==t?(fe=t("settings.preferences.toolApprovalAsk"),e[126]=t,e[127]=fe):fe=e[127];let de;e[128]!==t?(de=t("settings.preferences.toolApprovalAsk"),e[128]=t,e[129]=de):de=e[129];let ue;e[130]!==de?(ue=s.jsx("span",{className:"font-medium",children:de}),e[130]=de,e[131]=ue):ue=e[131];let pe;e[132]!==t?(pe=t("settings.preferences.toolApprovalAskDescription"),e[132]=t,e[133]=pe):pe=e[133];let me;e[134]!==pe?(me=s.jsx("span",{className:"text-xs text-muted-foreground",children:pe}),e[134]=pe,e[135]=me):me=e[135];let ge;e[136]!==ue||e[137]!==me?(ge=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[ue,me]}),e[136]=ue,e[137]=me,e[138]=ge):ge=e[138];let he;e[139]!==fe||e[140]!==ge?(he=s.jsx(Ge,{value:"readonly",textValue:fe,children:ge}),e[139]=fe,e[140]=ge,e[141]=he):he=e[141];let xe;e[142]!==t?(xe=t("settings.preferences.toolApprovalAuto"),e[142]=t,e[143]=xe):xe=e[143];let ve;e[144]!==t?(ve=t("settings.preferences.toolApprovalAuto"),e[144]=t,e[145]=ve):ve=e[145];let be;e[146]!==ve?(be=s.jsx("span",{className:"font-medium",children:ve}),e[146]=ve,e[147]=be):be=e[147];let je;e[148]!==t?(je=t("settings.preferences.toolApprovalAutoDescription"),e[148]=t,e[149]=je):je=e[149];let ye;e[150]!==je?(ye=s.jsx("span",{className:"text-xs text-muted-foreground",children:je}),e[150]=je,e[151]=ye):ye=e[151];let we;e[152]!==be||e[153]!==ye?(we=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[be,ye]}),e[152]=be,e[153]=ye,e[154]=we):we=e[154];let Se;e[155]!==xe||e[156]!==we?(Se=s.jsx(Ge,{value:"auto",textValue:xe,children:we}),e[155]=xe,e[156]=we,e[157]=Se):Se=e[157];let _e;e[158]!==he||e[159]!==Se?(_e=s.jsxs(Ve,{children:[he,Se]}),e[158]=he,e[159]=Se,e[160]=_e):_e=e[160];let Ae;e[161]!==i.toolApprovalLevel||e[162]!==re||e[163]!==ce||e[164]!==_e?(Ae=s.jsxs(Be,{value:Xe,onValueChange:re,children:[ce,_e]}),e[161]=i.toolApprovalLevel,e[162]=re,e[163]=ce,e[164]=_e,e[165]=Ae):Ae=e[165];let Ne;e[166]!==le||e[167]!==ne||e[168]!==Ae?(Ne=s.jsx(R,{title:le,description:ne,action:Ae}),e[166]=le,e[167]=ne,e[168]=Ae,e[169]=Ne):Ne=e[169];let Ce;e[170]!==N||e[171]!==T||e[172]!==V||e[173]!==X||e[174]!==ie||e[175]!==Ne?(Ce=s.jsxs(Ye,{children:[N,T,V,X,ie,Ne]}),e[170]=N,e[171]=T,e[172]=V,e[173]=X,e[174]=ie,e[175]=Ne,e[176]=Ce):Ce=e[176];let Te;return e[177]!==n||e[178]!==Ce?(Te=s.jsx(Ke,{title:n,children:Ce}),e[177]=n,e[178]=Ce,e[179]=Te):Te=e[179],Te}function qt(e){return{...e,showProjectSettingsGear:!e.showProjectSettingsGear}}function Ht(){M("preferences_sounds_previewed"),At(Nt.dataUri).catch(Wt)}function Wt(){}function Kt(e){return{...e,enableSounds:!e.enableSounds}}function Yt(e){return s.jsx(Ge,{value:e.value,textValue:e.label,children:e.label},e.value)}function Qt(e){return{...e,enableNotifications:!1}}function Xt(){const e=I.c(8),t=Pe();let i;e[0]!==t?(i=t("settings.title"),e[0]=t,e[1]=i):i=e[1];let a;e[2]!==i?(a=s.jsx(Re.Title,{children:i}),e[2]=i,e[3]=a):a=e[3];let l,o;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Bt,{}),o=s.jsx(Ft,{}),e[4]=l,e[5]=o):(l=e[4],o=e[5]);let n;return e[6]!==a?(n=s.jsx(Re,{children:s.jsx(Re.Content,{children:s.jsx(Re.Container,{children:s.jsxs(tt,{children:[a,l,o]})})})}),e[6]=a,e[7]=n):n=e[7],n}function vs(){const e=I.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Xt,{}),e[0]=t):t=e[0],t}export{vs as default};
1
+ import{c as I,b as Pe,n as Ze,m as Je,K as We,a as ke,t as E,l as De,j as s,r as L,B as Ee,h as et,P as Re,eU as tt,ad as st,az as at,v as it,o as M,dR as R,dP as Ke,dQ as Ye}from"./index-LqGJKspm.js";import{A as lt}from"./avatar-D6EG4gpi.js";import{D as nt,b as rt,c as ot,d as ct,h as ft,e as dt}from"./dialog-T6SHF6tg.js";import{T as ut,a as pt,R as mt,b as gt}from"./index-B7kHFiyx.js";import{s as ht}from"./Trash01-CrceRjD2.js";import{i as xt}from"./Upload01-B6QCJOOJ.js";import{S as Oe}from"./switch-DVOjL7QB.js";import{d as Ve,S as Be,c as Ge,b as Fe}from"./select-DTLRO2jP.js";import{T as Ie,a as vt}from"./toggle-group-Cl0Nt_2b.js";import{I as bt}from"./input-BmnxcFX-.js";import{i as jt}from"./Monitor01-CgVSaEtw.js";import{n as yt,a as wt}from"./Sun-CdOrW_VN.js";import{i as St}from"./Play-DkBjQzgn.js";import{u as _t}from"./use-debounced-autosave-DWpI7QzW.js";import{p as At,q as Nt}from"./question-004-sINsf4GQ.js";import"./User01-DLqwauek.js";import"./X-C_wX87Ke.js";import"./index-DgWiecJC.js";import"./Check-BnJHwdzA.js";import"./ChevronUp-CUHmZknM.js";const Ct=2*1024*1024,kt=["image/png","image/jpeg","image/gif","image/webp"];async function Pt(e){try{return(await e.json()).error??""}catch{return""}}async function ze(e){if(!e.ok)throw new Error(await Pt(e));return e}function Ut(e){const t=I.c(3);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=We.userAvatars(),t[0]=i):i=t[0];let a;return t[1]!==e?(a={queryKey:i,enabled:e,queryFn:Dt},t[1]=e,t[2]=a):a=t[2],Je(a)}async function Dt(){return(await(await ze(await fetch("/api/_users/avatars"))).json()).avatars}function zt(){const e=I.c(22),t=Pe(),i=Ze();let a;e[0]!==i?(a=async()=>{await Promise.all([i.invalidateQueries({queryKey:We.userAvatars()}),ke.getSession({query:{disableCookieCache:!0}})])},e[0]=i,e[1]=a):a=e[1];const l=a;let o;e[2]!==l||e[3]!==t?(o=async(f,v)=>{try{return await f(),await l(),E.success(v),!0}catch(y){const x=y;return E.error(x instanceof Error&&x.message?x.message:t("settings.profile.avatarUploadError")),!1}},e[2]=l,e[3]=t,e[4]=o):o=e[4];const n=o;let u;e[5]!==t||e[6]!==n?(u=async f=>{let v=null;return await n(async()=>{v=(await(await ze(await fetch("/api/_users/avatar",{method:"POST",headers:{"content-type":f.type||"image/webp"},body:f}))).json()).url,await ke.updateUser({image:v})},t("settings.profile.avatarUpdated"))?v:null},e[5]=t,e[6]=n,e[7]=u):u=e[7];const p=u;let b;e[8]!==t||e[9]!==n?(b=f=>n(async()=>{const v=await ze(await fetch("/api/_users/avatar/select",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:f})})),{url:y}=await v.json();await ke.updateUser({image:y})},t("settings.profile.avatarUpdated")),e[8]=t,e[9]=n,e[10]=b):b=e[10];const d=b;let j;e[11]!==t||e[12]!==n?(j=f=>n(async()=>{await ze(await fetch(`/api/_users/avatar?path=${encodeURIComponent(f)}`,{method:"DELETE"}))},t("settings.profile.avatarDeleted")),e[11]=t,e[12]=n,e[13]=j):j=e[13];const g=j;let c;e[14]!==t||e[15]!==n?(c=()=>n(Mt,t("settings.profile.avatarRemoved")),e[14]=t,e[15]=n,e[16]=c):c=e[16];const h=c;let m;return e[17]!==g||e[18]!==h||e[19]!==d||e[20]!==p?(m={uploadAvatar:p,selectAvatar:d,deleteStoredAvatar:g,removeAvatar:h},e[17]=g,e[18]=h,e[19]=d,e[20]=p,e[21]=m):m=e[21],m}async function Mt(){await ke.updateUser({image:null}),await ze(await fetch("/api/_users/avatar",{method:"DELETE"}))}function Tt(e){const t=I.c(26);let i,a,l,o,n,u;t[0]!==e?({className:i,defaultValue:a,value:u,min:o,max:n,...l}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=l,t[4]=o,t[5]=n,t[6]=u):(i=t[1],a=t[2],l=t[3],o=t[4],n=t[5],u=t[6]);const p=o===void 0?0:o,b=n===void 0?100:n;let d;t[7]!==a||t[8]!==b||t[9]!==p||t[10]!==u?(d=Array.isArray(u)?u:Array.isArray(a)?a:[p,b],t[7]=a,t[8]=b,t[9]=p,t[10]=u,t[11]=d):d=t[11];const j=d;let g;t[12]!==i?(g=De("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",i),t[12]=i,t[13]=g):g=t[13];let c;t[14]===Symbol.for("react.memo_cache_sentinel")?(c=De("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),t[14]=c):c=t[14];let h;t[15]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ut,{"data-slot":"slider-track",className:c,children:s.jsx(pt,{"data-slot":"slider-range",className:De("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),t[15]=h):h=t[15];let m;t[16]!==j.length?(m=Array.from({length:j.length},Rt),t[16]=j.length,t[17]=m):m=t[17];let f;return t[18]!==a||t[19]!==b||t[20]!==p||t[21]!==l||t[22]!==g||t[23]!==m||t[24]!==u?(f=s.jsxs(mt,{"data-slot":"slider",defaultValue:a,value:u,min:p,max:b,className:g,...l,children:[h,m]}),t[18]=a,t[19]=b,t[20]=p,t[21]=l,t[22]=g,t[23]=m,t[24]=u,t[25]=f):f=t[25],f}function Rt(e,t){return s.jsx(gt,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},t)}function $e(e){return Math.max(e.viewport/e.imageWidth,e.viewport/e.imageHeight)}function Et(e){const t=$e(e)*e.zoom;return{x:Math.max(0,(e.imageWidth*t-e.viewport)/2),y:Math.max(0,(e.imageHeight*t-e.viewport)/2)}}function Qe(e){const t=Et(e);return{x:Math.min(t.x,Math.max(-t.x,e.offset.x)),y:Math.min(t.y,Math.max(-t.y,e.offset.y))}}function Ot(e){const t=$e(e)*e.zoom,i=Qe(e),a=e.viewport/t,l=e.imageWidth/2-a/2-i.x/t,o=e.imageHeight/2-a/2-i.y/t;return{sx:Math.min(Math.max(0,l),Math.max(0,e.imageWidth-a)),sy:Math.min(Math.max(0,o),Math.max(0,e.imageHeight-a)),size:a}}function It(e,t){return Math.max(1,Math.round(Math.min(t,e.size)))}const Le=288,Ue=1,qe=4;function Lt(e){return new Promise((t,i)=>{const a=URL.createObjectURL(e),l=new Image;l.onload=()=>t({element:l,url:a,width:l.naturalWidth,height:l.naturalHeight}),l.onerror=()=>{URL.revokeObjectURL(a),i(new Error("decode failed"))},l.src=a})}function Gt(e,t,i){const a=Ot(t),l=It(a,i),o=document.createElement("canvas");o.width=l,o.height=l;const n=o.getContext("2d");return n?(n.drawImage(e.element,a.sx,a.sy,a.size,a.size,0,0,l,l),new Promise(u=>{o.toBlob(p=>u(p),"image/webp",.92)})):Promise.resolve(null)}function $t({open:e,onOpenChange:t,title:i,description:a,shape:l="circle",maxOutputSize:o=512,accept:n,maxBytes:u,onUpload:p,gallery:b}){const d=Pe(),j=L.useRef(null),g=L.useRef(null),[c,h]=L.useState(null),[m,f]=L.useState(Ue),[v,y]=L.useState({x:0,y:0}),[x,w]=L.useState(!1),N=l==="circle"?"rounded-full":"rounded-xl";function S(){c&&URL.revokeObjectURL(c.url),h(null),f(Ue),y({x:0,y:0})}function _(){S(),t(!1)}async function U(r){if(!n.includes(r.type)){E.error(d("imageUpload.unsupportedType"));return}if(r.size>u){E.error(d("imageUpload.tooLarge",{max:String(Math.round(u/(1024*1024)))}));return}try{S(),h(await Lt(r))}catch{E.error(d("imageUpload.decodeFailed"))}}const C=c&&{imageWidth:c.width,imageHeight:c.height,viewport:Le,zoom:m,offset:v},k=C?Qe(C):{x:0,y:0},D=C?$e(C)*m:1;async function O(){if(!(!c||!C)){w(!0);try{const r=await Gt(c,C,o);if(!r){E.error(d("imageUpload.encodeFailed"));return}await p(r)&&_()}finally{w(!1)}}}async function T(r){w(!0);try{await r}finally{w(!1)}}return s.jsx(nt,{open:e,onOpenChange:r=>r?t(!0):_(),children:s.jsxs(rt,{className:"sm:max-w-[26rem]",children:[s.jsxs(ot,{children:[s.jsx(ct,{children:i}),a?s.jsx(ft,{children:a}):null]}),c&&C?s.jsxs("div",{className:"flex flex-col items-center gap-4",children:[s.jsx("div",{className:De("relative overflow-hidden bg-muted touch-none cursor-grab active:cursor-grabbing",N),style:{width:Le,height:Le},onPointerDown:r=>{g.current={x:r.clientX-k.x,y:r.clientY-k.y},r.currentTarget.setPointerCapture(r.pointerId)},onPointerMove:r=>{const P=g.current;P&&y({x:r.clientX-P.x,y:r.clientY-P.y})},onPointerUp:r=>{g.current=null,r.currentTarget.releasePointerCapture(r.pointerId)},onPointerCancel:()=>{g.current=null},onWheel:r=>{const P=m-r.deltaY*.002;f(Math.min(qe,Math.max(Ue,P)))},children:s.jsx("img",{src:c.url,alt:"",draggable:!1,className:"absolute left-1/2 top-1/2 max-w-none select-none",style:{width:c.width*D,height:c.height*D,transform:`translate(calc(-50% + ${k.x}px), calc(-50% + ${k.y}px))`}})}),s.jsxs("div",{className:"flex w-full items-center gap-3 px-1",children:[s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:d("imageUpload.zoom")}),s.jsx(Tt,{value:[m],min:Ue,max:qe,step:.01,onValueChange:([r])=>f(r??Ue),"aria-label":d("imageUpload.zoom")})]})]}):s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("button",{type:"button",onClick:()=>j.current?.click(),className:"flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-border py-10 text-sm text-muted-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[s.jsx(xt,{className:"size-5"}),d("imageUpload.choose")]}),b&&b.items.length>0?s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:d("imageUpload.recent")}),s.jsx("div",{className:"flex flex-wrap gap-2",children:b.items.map(r=>s.jsxs("div",{className:"group relative",children:[s.jsx("button",{type:"button",disabled:x,onClick:()=>{T(b.onSelect(r.path)).then(_)},"aria-label":d("imageUpload.usePicture"),className:De("size-14 overflow-hidden border transition-opacity hover:opacity-80 disabled:opacity-50",N,r.current?"border-primary ring-2 ring-primary/40":"border-border"),children:s.jsx("img",{src:r.url,alt:"",className:"size-full object-cover"})}),b.onDelete&&!r.current?s.jsx("button",{type:"button",disabled:x,onClick:()=>{T(b.onDelete(r.path))},"aria-label":d("imageUpload.deletePicture"),className:"absolute -right-1 -top-1 hidden rounded-full bg-background p-1 text-muted-foreground shadow-sm hover:text-destructive group-hover:block",children:s.jsx(ht,{className:"size-3"})}):null]},r.path))})]}):null]}),s.jsx("input",{ref:j,type:"file",accept:n.join(","),className:"hidden",onChange:r=>{const P=r.target.files?.[0];r.target.value="",P&&U(P)}}),s.jsx(dt,{children:c?s.jsxs(s.Fragment,{children:[s.jsx(Ee,{variant:"ghost",onClick:S,disabled:x,children:d("imageUpload.back")}),s.jsxs(Ee,{onClick:()=>{O()},disabled:x,children:[x?s.jsx(et,{size:"sm"}):null,d("imageUpload.save")]})]}):s.jsx(Ee,{variant:"ghost",onClick:_,children:d("imageUpload.cancel")})})]})})}const He=[{value:"en",label:"English"},{value:"pt-BR",label:"Português (Brasil)"}];function Vt(e){const t=I.c(36),{url:i,fallback:a}=e,l=Pe(),[o,n]=L.useState(!1),{uploadAvatar:u,selectAvatar:p,deleteStoredAvatar:b,removeAvatar:d}=zt(),j=Ut(o);let g;t[0]!==d||t[1]!==l||t[2]!==i?(g=i?s.jsx(Ee,{variant:"ghost",size:"sm",onClick:()=>{d()},children:l("settings.profile.avatarRemove")}):null,t[0]=d,t[1]=l,t[2]=i,t[3]=g):g=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=()=>n(!0),t[4]=c):c=t[4];let h;t[5]!==l?(h=l("settings.profile.avatarUpload"),t[5]=l,t[6]=h):h=t[6];let m;t[7]!==l?(m=l("settings.profile.avatarUpload"),t[7]=l,t[8]=m):m=t[8];let f;t[9]!==a||t[10]!==i?(f=s.jsx(lt,{url:i,fallback:a,shape:"circle",size:"base"}),t[9]=a,t[10]=i,t[11]=f):f=t[11];let v;t[12]!==h||t[13]!==m||t[14]!==f?(v=s.jsx("button",{type:"button",onClick:c,"aria-label":h,title:m,className:"rounded-full transition-opacity hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:f}),t[12]=h,t[13]=m,t[14]=f,t[15]=v):v=t[15];let y;t[16]!==l?(y=l("settings.profile.avatarDialogTitle"),t[16]=l,t[17]=y):y=t[17];let x;t[18]!==l?(x=l("settings.profile.avatarDialogDescription"),t[18]=l,t[19]=x):x=t[19];let w;t[20]!==j.data?(w=j.data??[],t[20]=j.data,t[21]=w):w=t[21];let N;t[22]!==b||t[23]!==p||t[24]!==w?(N={items:w,onSelect:p,onDelete:b},t[22]=b,t[23]=p,t[24]=w,t[25]=N):N=t[25];let S;t[26]!==o||t[27]!==N||t[28]!==y||t[29]!==x||t[30]!==u?(S=s.jsx($t,{open:o,onOpenChange:n,title:y,description:x,shape:"circle",accept:kt,maxBytes:Ct,onUpload:u,gallery:N}),t[26]=o,t[27]=N,t[28]=y,t[29]=x,t[30]=u,t[31]=S):S=t[31];let _;return t[32]!==g||t[33]!==S||t[34]!==v?(_=s.jsxs("div",{className:"flex items-center gap-2",children:[g,v,S]}),t[32]=g,t[33]=S,t[34]=v,t[35]=_):_=t[35],_}function Bt(){const e=I.c(36),t=Pe(),{data:i,isPending:a}=ke.useSession(),l=i?.user,o=l?.image,n=l?.name??"";let u;e[0]!==n?(u={values:{name:n}},e[0]=n,e[1]=u):u=e[1];const p=st(u);let b;e[2]!==p||e[3]!==t?(b={save:async()=>{const C=p.control._formState.dirtyFields;if(Object.keys(C).length===0)return;const k=p.getValues(),D=p.control._defaultValues;p.reset(k,{keepValues:!0});try{await ke.updateUser({name:k.name}),M("profile_updated",{fields:["name"]}),E.success(t("settings.profile.updateSuccess"))}catch{p.reset(D,{keepValues:!0}),E.error(t("settings.profile.updateError"))}}},e[2]=p,e[3]=t,e[4]=b):b=e[4];const{schedule:d,flush:j}=_t(b);if(a)return null;let g;e[5]!==t?(g=t("settings.profile.avatar"),e[5]=t,e[6]=g):g=e[6];const c=l?.name??"U";let h;e[7]!==c||e[8]!==o?(h=s.jsx(Vt,{url:o,fallback:c}),e[7]=c,e[8]=o,e[9]=h):h=e[9];let m;e[10]!==g||e[11]!==h?(m=s.jsx(R,{title:g,action:h}),e[10]=g,e[11]=h,e[12]=m):m=e[12];let f;e[13]!==t?(f=t("settings.profile.displayName"),e[13]=t,e[14]=f):f=e[14];let v;e[15]!==j||e[16]!==d||e[17]!==t?(v=C=>{const{field:k}=C;return s.jsx(bt,{id:"display-name",...k,onChange:D=>{k.onChange(D),d()},onBlur:()=>{k.onBlur(),j()},onKeyDown:D=>{D.key==="Enter"&&j()},placeholder:t("settings.profile.displayNamePlaceholder"),className:"w-[280px]"})},e[15]=j,e[16]=d,e[17]=t,e[18]=v):v=e[18];let y;e[19]!==p.control||e[20]!==v?(y=s.jsx(at,{control:p.control,name:"name",render:v}),e[19]=p.control,e[20]=v,e[21]=y):y=e[21];let x;e[22]!==f||e[23]!==y?(x=s.jsx(R,{title:f,action:y}),e[22]=f,e[23]=y,e[24]=x):x=e[24];let w;e[25]!==t?(w=t("settings.profile.email"),e[25]=t,e[26]=w):w=e[26];const N=l?.email;let S;e[27]!==N?(S=s.jsx("span",{className:"text-sm text-muted-foreground",children:N}),e[27]=N,e[28]=S):S=e[28];let _;e[29]!==w||e[30]!==S?(_=s.jsx(R,{title:w,action:S}),e[29]=w,e[30]=S,e[31]=_):_=e[31];let U;return e[32]!==x||e[33]!==_||e[34]!==m?(U=s.jsx(Ke,{children:s.jsxs(Ye,{children:[m,x,_]})}),e[32]=x,e[33]=_,e[34]=m,e[35]=U):U=e[35],U}function Ft(){const e=I.c(180),t=Pe(),[i,a]=it();let l;e[0]!==a||e[1]!==t?(l=async A=>{if(A&&await Notification.requestPermission()!=="granted"){M("preferences_notifications_permission_denied"),E.error(t("settings.preferences.notificationsDenied")),a(Qt);return}M("preferences_notifications_toggled",{enabled:A}),a(z=>({...z,enableNotifications:A}))},e[0]=a,e[1]=t,e[2]=l):l=e[2];const o=l;let n;e[3]!==t?(n=t("settings.preferences.title"),e[3]=t,e[4]=n):n=e[4];let u;e[5]!==t?(u=t("settings.preferences.theme"),e[5]=t,e[6]=u):u=e[6];let p;e[7]!==t?(p=t("settings.preferences.themeDescription"),e[7]=t,e[8]=p):p=e[8];const b=i.theme;let d;e[9]!==a?(d=A=>{A&&(M("preferences_theme_changed",{to_value:A}),a(z=>({...z,theme:A})))},e[9]=a,e[10]=d):d=e[10];let j;e[11]!==t?(j=t("settings.preferences.themeLight"),e[11]=t,e[12]=j):j=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(yt,{size:14}),e[13]=g):g=e[13];let c;e[14]!==j?(c=s.jsx(Ie,{value:"light","aria-label":j,children:g}),e[14]=j,e[15]=c):c=e[15];let h;e[16]!==t?(h=t("settings.preferences.themeDark"),e[16]=t,e[17]=h):h=e[17];let m;e[18]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(wt,{size:14}),e[18]=m):m=e[18];let f;e[19]!==h?(f=s.jsx(Ie,{value:"dark","aria-label":h,children:m}),e[19]=h,e[20]=f):f=e[20];let v;e[21]!==t?(v=t("settings.preferences.themeSystem"),e[21]=t,e[22]=v):v=e[22];let y;e[23]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(jt,{size:14}),e[23]=y):y=e[23];let x;e[24]!==v?(x=s.jsx(Ie,{value:"system","aria-label":v,children:y}),e[24]=v,e[25]=x):x=e[25];let w;e[26]!==i.theme||e[27]!==f||e[28]!==x||e[29]!==d||e[30]!==c?(w=s.jsxs(vt,{type:"single",size:"sm",variant:"outline",value:b,onValueChange:d,children:[c,f,x]}),e[26]=i.theme,e[27]=f,e[28]=x,e[29]=d,e[30]=c,e[31]=w):w=e[31];let N;e[32]!==w||e[33]!==u||e[34]!==p?(N=s.jsx(R,{title:u,description:p,action:w}),e[32]=w,e[33]=u,e[34]=p,e[35]=N):N=e[35];let S;e[36]!==t?(S=t("settings.preferences.language"),e[36]=t,e[37]=S):S=e[37];let _;e[38]!==t?(_=t("settings.preferences.languageDescription"),e[38]=t,e[39]=_):_=e[39];let U;e[40]!==a?(U=A=>{M("preferences_language_changed",{to_value:A}),a(z=>({...z,language:A}))},e[40]=a,e[41]=U):U=e[41];let C;e[42]!==i.language?(C=He.find(A=>A.value===i.language)?.label,e[42]=i.language,e[43]=C):C=e[43];let k;e[44]!==C?(k=s.jsx(Fe,{className:"w-44 h-7 text-xs",children:s.jsx("span",{children:C})}),e[44]=C,e[45]=k):k=e[45];let D;e[46]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Ve,{children:He.map(Yt)}),e[46]=D):D=e[46];let O;e[47]!==i.language||e[48]!==U||e[49]!==k?(O=s.jsxs(Be,{value:i.language,onValueChange:U,children:[k,D]}),e[47]=i.language,e[48]=U,e[49]=k,e[50]=O):O=e[50];let T;e[51]!==S||e[52]!==_||e[53]!==O?(T=s.jsx(R,{title:S,description:_,action:O}),e[51]=S,e[52]=_,e[53]=O,e[54]=T):T=e[54];let r;e[55]!==t?(r=t("settings.preferences.notifications"),e[55]=t,e[56]=r):r=e[56];let P;e[57]!==t?(P=t("settings.preferences.notificationsDescription"),e[57]=t,e[58]=P):P=e[58];let G;e[59]!==o||e[60]!==i.enableNotifications?(G=typeof Notification<"u"?()=>o(!i.enableNotifications):void 0,e[59]=o,e[60]=i.enableNotifications,e[61]=G):G=e[61];let $;e[62]!==o||e[63]!==i.enableNotifications?($=s.jsx(Oe,{disabled:typeof Notification>"u",checked:i.enableNotifications,onCheckedChange:o}),e[62]=o,e[63]=i.enableNotifications,e[64]=$):$=e[64];let V;e[65]!==r||e[66]!==P||e[67]!==G||e[68]!==$?(V=s.jsx(R,{title:r,description:P,onClick:G,action:$}),e[65]=r,e[66]=P,e[67]=G,e[68]=$,e[69]=V):V=e[69];let B;e[70]!==t?(B=t("settings.preferences.sounds"),e[70]=t,e[71]=B):B=e[71];let F;e[72]!==t?(F=t("settings.preferences.soundsDescription"),e[72]=t,e[73]=F):F=e[73];let q;e[74]!==i.enableSounds||e[75]!==a?(q=()=>{M("preferences_sounds_toggled",{enabled:!i.enableSounds}),a(Kt)},e[74]=i.enableSounds,e[75]=a,e[76]=q):q=e[76];let H;e[77]!==t?(H=t("settings.preferences.soundsPreview"),e[77]=t,e[78]=H):H=e[78];let Me;e[79]===Symbol.for("react.memo_cache_sentinel")?(Me=s.jsx(St,{size:11}),e[79]=Me):Me=e[79];let W;e[80]!==H?(W=s.jsx("button",{type:"button","aria-label":H,onClick:Ht,className:"size-6 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",children:Me}),e[80]=H,e[81]=W):W=e[81];let K;e[82]!==a?(K=A=>{M("preferences_sounds_toggled",{enabled:A}),a(z=>({...z,enableSounds:A}))},e[82]=a,e[83]=K):K=e[83];let Y;e[84]!==i.enableSounds||e[85]!==K?(Y=s.jsx(Oe,{checked:i.enableSounds,onCheckedChange:K}),e[84]=i.enableSounds,e[85]=K,e[86]=Y):Y=e[86];let Q;e[87]!==W||e[88]!==Y?(Q=s.jsxs("div",{className:"flex items-center gap-2",children:[W,Y]}),e[87]=W,e[88]=Y,e[89]=Q):Q=e[89];let X;e[90]!==B||e[91]!==F||e[92]!==q||e[93]!==Q?(X=s.jsx(R,{title:B,description:F,onClick:q,action:Q}),e[90]=B,e[91]=F,e[92]=q,e[93]=Q,e[94]=X):X=e[94];let Z;e[95]!==t?(Z=t("settings.preferences.projectSettingsGear"),e[95]=t,e[96]=Z):Z=e[96];let J;e[97]!==t?(J=t("settings.preferences.projectSettingsGearDescription"),e[97]=t,e[98]=J):J=e[98];let ee;e[99]!==i.showProjectSettingsGear||e[100]!==a?(ee=()=>{M("preferences_project_settings_gear_toggled",{enabled:!i.showProjectSettingsGear}),a(qt)},e[99]=i.showProjectSettingsGear,e[100]=a,e[101]=ee):ee=e[101];let te;e[102]!==t?(te=t("settings.preferences.projectSettingsGear"),e[102]=t,e[103]=te):te=e[103];let se;e[104]!==a?(se=A=>{M("preferences_project_settings_gear_toggled",{enabled:A}),a(z=>({...z,showProjectSettingsGear:A}))},e[104]=a,e[105]=se):se=e[105];let ae;e[106]!==i.showProjectSettingsGear||e[107]!==te||e[108]!==se?(ae=s.jsx(Oe,{"aria-label":te,checked:i.showProjectSettingsGear,onCheckedChange:se}),e[106]=i.showProjectSettingsGear,e[107]=te,e[108]=se,e[109]=ae):ae=e[109];let ie;e[110]!==Z||e[111]!==J||e[112]!==ee||e[113]!==ae?(ie=s.jsx(R,{title:Z,description:J,onClick:ee,action:ae}),e[110]=Z,e[111]=J,e[112]=ee,e[113]=ae,e[114]=ie):ie=e[114];let le;e[115]!==t?(le=t("settings.preferences.toolApproval"),e[115]=t,e[116]=le):le=e[116];let ne;e[117]!==t?(ne=t("settings.preferences.toolApprovalDescription"),e[117]=t,e[118]=ne):ne=e[118];const Xe=i.toolApprovalLevel;let re;e[119]!==a?(re=A=>{M("preferences_tool_approval_changed",{to_value:A}),a(z=>({...z,toolApprovalLevel:A}))},e[119]=a,e[120]=re):re=e[120];let oe;e[121]!==i.toolApprovalLevel||e[122]!==t?(oe={readonly:t("settings.preferences.toolApprovalAsk"),auto:t("settings.preferences.toolApprovalAuto")}[i.toolApprovalLevel]??t("settings.preferences.toolApprovalAsk"),e[121]=i.toolApprovalLevel,e[122]=t,e[123]=oe):oe=e[123];let ce;e[124]!==oe?(ce=s.jsx(Fe,{className:"w-36 h-7 text-xs",children:s.jsx("span",{children:oe})}),e[124]=oe,e[125]=ce):ce=e[125];let fe;e[126]!==t?(fe=t("settings.preferences.toolApprovalAsk"),e[126]=t,e[127]=fe):fe=e[127];let de;e[128]!==t?(de=t("settings.preferences.toolApprovalAsk"),e[128]=t,e[129]=de):de=e[129];let ue;e[130]!==de?(ue=s.jsx("span",{className:"font-medium",children:de}),e[130]=de,e[131]=ue):ue=e[131];let pe;e[132]!==t?(pe=t("settings.preferences.toolApprovalAskDescription"),e[132]=t,e[133]=pe):pe=e[133];let me;e[134]!==pe?(me=s.jsx("span",{className:"text-xs text-muted-foreground",children:pe}),e[134]=pe,e[135]=me):me=e[135];let ge;e[136]!==ue||e[137]!==me?(ge=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[ue,me]}),e[136]=ue,e[137]=me,e[138]=ge):ge=e[138];let he;e[139]!==fe||e[140]!==ge?(he=s.jsx(Ge,{value:"readonly",textValue:fe,children:ge}),e[139]=fe,e[140]=ge,e[141]=he):he=e[141];let xe;e[142]!==t?(xe=t("settings.preferences.toolApprovalAuto"),e[142]=t,e[143]=xe):xe=e[143];let ve;e[144]!==t?(ve=t("settings.preferences.toolApprovalAuto"),e[144]=t,e[145]=ve):ve=e[145];let be;e[146]!==ve?(be=s.jsx("span",{className:"font-medium",children:ve}),e[146]=ve,e[147]=be):be=e[147];let je;e[148]!==t?(je=t("settings.preferences.toolApprovalAutoDescription"),e[148]=t,e[149]=je):je=e[149];let ye;e[150]!==je?(ye=s.jsx("span",{className:"text-xs text-muted-foreground",children:je}),e[150]=je,e[151]=ye):ye=e[151];let we;e[152]!==be||e[153]!==ye?(we=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[be,ye]}),e[152]=be,e[153]=ye,e[154]=we):we=e[154];let Se;e[155]!==xe||e[156]!==we?(Se=s.jsx(Ge,{value:"auto",textValue:xe,children:we}),e[155]=xe,e[156]=we,e[157]=Se):Se=e[157];let _e;e[158]!==he||e[159]!==Se?(_e=s.jsxs(Ve,{children:[he,Se]}),e[158]=he,e[159]=Se,e[160]=_e):_e=e[160];let Ae;e[161]!==i.toolApprovalLevel||e[162]!==re||e[163]!==ce||e[164]!==_e?(Ae=s.jsxs(Be,{value:Xe,onValueChange:re,children:[ce,_e]}),e[161]=i.toolApprovalLevel,e[162]=re,e[163]=ce,e[164]=_e,e[165]=Ae):Ae=e[165];let Ne;e[166]!==le||e[167]!==ne||e[168]!==Ae?(Ne=s.jsx(R,{title:le,description:ne,action:Ae}),e[166]=le,e[167]=ne,e[168]=Ae,e[169]=Ne):Ne=e[169];let Ce;e[170]!==N||e[171]!==T||e[172]!==V||e[173]!==X||e[174]!==ie||e[175]!==Ne?(Ce=s.jsxs(Ye,{children:[N,T,V,X,ie,Ne]}),e[170]=N,e[171]=T,e[172]=V,e[173]=X,e[174]=ie,e[175]=Ne,e[176]=Ce):Ce=e[176];let Te;return e[177]!==n||e[178]!==Ce?(Te=s.jsx(Ke,{title:n,children:Ce}),e[177]=n,e[178]=Ce,e[179]=Te):Te=e[179],Te}function qt(e){return{...e,showProjectSettingsGear:!e.showProjectSettingsGear}}function Ht(){M("preferences_sounds_previewed"),At(Nt.dataUri).catch(Wt)}function Wt(){}function Kt(e){return{...e,enableSounds:!e.enableSounds}}function Yt(e){return s.jsx(Ge,{value:e.value,textValue:e.label,children:e.label},e.value)}function Qt(e){return{...e,enableNotifications:!1}}function Xt(){const e=I.c(8),t=Pe();let i;e[0]!==t?(i=t("settings.title"),e[0]=t,e[1]=i):i=e[1];let a;e[2]!==i?(a=s.jsx(Re.Title,{children:i}),e[2]=i,e[3]=a):a=e[3];let l,o;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Bt,{}),o=s.jsx(Ft,{}),e[4]=l,e[5]=o):(l=e[4],o=e[5]);let n;return e[6]!==a?(n=s.jsx(Re,{children:s.jsx(Re.Content,{children:s.jsx(Re.Container,{children:s.jsxs(tt,{children:[a,l,o]})})})}),e[6]=a,e[7]=n):n=e[7],n}function vs(){const e=I.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Xt,{}),e[0]=t):t=e[0],t}export{vs as default};
@@ -0,0 +1 @@
1
+ import{e$ as Z,c as w,b as L,j as n,r as H,E as ee,M as q,W as te,x as oe,a as ie,B as se,h as ne,f0 as re}from"./index-LqGJKspm.js";import{g as z,s as F}from"./gateway-client-DLNW7KMa.js";import{s as le}from"./tool-namespace-DmnQIdtF.js";import{u as G}from"./use-mcp-client-D8jBM4Gn.js";import{a as ce,b as ae}from"./use-mcp-tools-BghY6B9H.js";import{d as me}from"./sandbox-lifecycle-context-DRuSe7YD.js";import{c as pe}from"./content-blocks-o63cs2vh.js";import{M as de}from"./mcp-app-renderer-msD9uif_.js";import{g as fe,M as K}from"./types-Uxwa5Ooo.js";import{a as ue,c as ge}from"./chat-context-BuaJtKiH.js";import{u as xe}from"./shell-layout-C3r9cZwX.js";import{s as he}from"./site-url-en5df9c-.js";import{d as W,c as J,b as Q,D as X}from"./dialog-T6SHF6tg.js";import{I as Ce}from"./integration-icon-DWYnH6CS.js";import{c as Se,u as je,a as Ie,P as be,d as Ne,S as De}from"./use-connect-companion-6hnymdU2.js";import{u as ve}from"./use-is-desktop-app-BNujXJc_.js";import"./auth-DiBJ6HTw.js";import"./use-session-runtime-4Wsurepj.js";import"./thread-intent-DczG93w-.js";import"./slugify-CEUa2lfQ.js";import"./use-virtual-mcp-Dpcooz6x.js";import"./hooks-Cow3V6T6.js";import"./backoff-8mStPHYB.js";import"./task-board-CT88RfwA.js";import"./schema-Dn-PxCJQ.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-panel-navigate-CPCeDjnd.js";import"./thread-route-D9RjIb92.js";import"./use-project-scope-OfDo_ODT.js";import"./github-repo-BknN0SVI.js";import"./autosend-CbSGCC_z.js";import"./use-entitlements-CXdqFCsK.js";import"./use-ai-providers-CKFqZtob.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-y3CYynsq.js";import"./use-organization-settings-CR_gD2xz.js";import"./avatar-D6EG4gpi.js";import"./User01-DLqwauek.js";import"./Users03-DdHJhs5B.js";import"./SearchLg-Dqhtv5dc.js";import"./agent-icon-CP4wb7Bx.js";import"./AlertCircle-JAw4DKWg.js";import"./Tool01-j5KBS7L_.js";import"./ArrowUp-CW9s78t7.js";import"./ArrowLeft-C4ws2vta.js";import"./Tool02-DJpbC_72.js";import"./ArrowRight-CGkzbTs-.js";import"./TrendUp01-DETtD9qe.js";import"./ZoomOut-B4s4anLX.js";import"./CheckCircle-D72wsOXz.js";import"./Check-BnJHwdzA.js";import"./ChevronUp-CUHmZknM.js";import"./ChevronRight-CIuRctG6.js";import"./DotsVertical-DZxfXATf.js";import"./UserSquare-CPabtqPY.js";import"./Copy01-CAnIcRR7.js";import"./CreditCard01-Byf14Zko.js";import"./Database01-DhxHwIba.js";import"./MessageCircle01-BIIEDxFs.js";import"./Download01-BKhvQC2t.js";import"./Printer-tuedaxzr.js";import"./Settings02-BhsH56Xz.js";import"./Eye-CeLsr2wK.js";import"./File02-Ic5DSfbF.js";import"./Share07-CzidgFZ5.js";import"./GitBranch01-llYG9Xp9.js";import"./Globe01-BxZcqfmG.js";import"./SwitchHorizontal01-Dqqx_KZP.js";import"./HardDrive-D8M2f43J.js";import"./Image01-CAvGw-jw.js";import"./Key01-MvLRbpTL.js";import"./Link01-BFGs7SHa.js";import"./LinkExternal01-_FElc0p1.js";import"./Monitor01-CgVSaEtw.js";import"./Sun-CdOrW_VN.js";import"./Package-rfI0qNYd.js";import"./Palette-DWgPkj9P.js";import"./Play-DkBjQzgn.js";import"./Plus-CWME9B9L.js";import"./SearchMd-CZSs2LSf.js";import"./Shield01-K4aGKNL2.js";import"./Stars01-C47JIet8.js";import"./Trash01-CrceRjD2.js";import"./Upload01-B6QCJOOJ.js";import"./Users01-BFSgZvlS.js";import"./XCircle-CHAGLbh6.js";import"./XClose-wbQg8T5j.js";import"./X-C_wX87Ke.js";import"./Zap-Blk6garZ.js";import"./download-app-dialog-DgXSTIhm.js";import"./anchors-yqDzZN4K.js";import"./use-org-notice-oR0FnSz0.js";import"./command-palette-store-BbfrQfcx.js";import"./command-Clfl-nd5.js";import"./index-CZXQ4cPi.js";import"./project-icon-4fy6jz5e.js";import"./required-auth-layout-AdYtaYp9.js";import"./use-org-sso-6FHDtS1R.js";import"./tooltip-DsIeYtk8.js";import"./index-DgWiecJC.js";import"./companions-core-CZwGf1b1.js";import"./github-D4UJ99TO.js";import"./github-repo-scope-C8GSbvaz.js";import"./metadata-dUsYcpuu.js";import"./form-DEQzyl-Z.js";import"./label-CycRXo8-.js";import"./input-BmnxcFX-.js";import"./use-debounced-value-vcd9fBbq.js";import"./provision-repo-scoped-github-connection-B6zdkC6p.js";import"./extract-connection-data-C-i7_Byp.js";import"./connection-OBd7O6J-.js";import"./useQueries-CgbxQuEr.js";import"./authenticate-and-persist-oauth-C-DK5QxU.js";import"./mcp-oauth-xX_w6J5G.js";import"./track-Bmhzoq6y.js";const Me="studio://navigate",_e=new Set(["vtex","ga4","gsc","github"]);function ye(N){const[e]=N;if(N.length!==1||e?.type!=="resource_link"||!e.uri.startsWith(Me))return{isNavigate:!1};let o=null,i=null;try{const s=new URL(e.uri).searchParams;o=s.get("main"),i=s.get("field")}catch{}return{isNavigate:!0,tab:o&&Z.has(o)?o:null,field:i&&_e.has(i)?i:null}}function B(N){const e=w.c(12),{onClose:o,children:i}=N,s=L();let t;e[0]!==o?(t=u=>!u&&o(),e[0]=o,e[1]=t):t=e[1];let m;e[2]!==s?(m=s("commerceOnboarding.connectSourceDialog.title"),e[2]=s,e[3]=m):m=e[3];let l;e[4]!==m?(l=n.jsx(J,{children:n.jsx(W,{children:m})}),e[4]=m,e[5]=l):l=e[5];let d;e[6]!==i||e[7]!==l?(d=n.jsxs(Q,{"aria-describedby":void 0,className:"sm:max-w-lg",children:[l,i]}),e[6]=i,e[7]=l,e[8]=d):d=e[8];let r;return e[9]!==t||e[10]!==d?(r=n.jsx(X,{open:!0,onOpenChange:t,children:d}),e[9]=t,e[10]=d,e[11]=r):r=e[11],r}function V(N){const e=w.c(3),{label:o}=N;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(ne,{className:"size-4"}),e[0]=i):i=e[0];let s;return e[1]!==o?(s=n.jsxs("div",{className:"flex items-center gap-2 py-2 text-sm text-muted-foreground",children:[i,n.jsx("span",{children:o})]}),e[1]=o,e[2]=s):s=e[2],s}function Oe(N){const e=w.c(19),{field:o,onClose:i}=N,s=L();let t;e[0]!==i||e[1]!==s?(t=()=>n.jsx(B,{onClose:i,children:n.jsx("p",{className:"text-sm text-muted-foreground",children:s("routes.commerceOnboarding.connectModal.loadError")})}),e[0]=i,e[1]=s,e[2]=t):t=e[2];let m;e[3]!==s?(m=s("commerceOnboarding.connectSourceDialog.loading"),e[3]=s,e[4]=m):m=e[4];let l;e[5]!==m?(l=n.jsx(V,{label:m}),e[5]=m,e[6]=l):l=e[6];let d;e[7]!==i||e[8]!==l?(d=n.jsx(B,{onClose:i,children:l}),e[7]=i,e[8]=l,e[9]=d):d=e[9];let r;e[10]!==o||e[11]!==i?(r=n.jsx(Te,{field:o,onClose:i}),e[10]=o,e[11]=i,e[12]=r):r=e[12];let u;e[13]!==d||e[14]!==r?(u=n.jsx(H.Suspense,{fallback:d,children:r}),e[13]=d,e[14]=r,e[15]=u):u=e[15];let g;return e[16]!==t||e[17]!==u?(g=n.jsx(ee,{fallback:t,children:u}),e[16]=t,e[17]=u,e[18]=g):g=e[18],g}function Te(N){const e=w.c(75),{field:o,onClose:i}=N,s=L(),{org:t}=q();let m;e[0]!==t.id?(m=te.COMMERCE_DISCOVERY(t.id),e[0]=t.id,e[1]=m):m=e[1];const l=m;let d;e[2]!==t.id||e[3]!==t.slug?(d={connectionId:oe,orgId:t.id,orgSlug:t.slug},e[2]=t.id,e[3]=t.slug,e[4]=d):d=e[4];const r=G(d),{data:u}=ie.useSession(),g=u?.user?.id??"";let S;e[5]!==l||e[6]!==t||e[7]!==r?(S={selfClient:r,org:t,cdConnectionId:l},e[5]=l,e[6]=t,e[7]=r,e[8]=S):S=e[8];const c=Se(S);let f;e[9]!==l||e[10]!==t||e[11]!==r||e[12]!==c?(f={selfClient:r,org:t,cdConnectionId:l,siteUrl:c},e[9]=l,e[10]=t,e[11]=r,e[12]=c,e[13]=f):f=e[13];const{cards:j}=je(f);let h;e[14]!==c?(h=he(c)??void 0,e[14]=c,e[15]=h):h=e[15];let b;e[16]!==l||e[17]!==t||e[18]!==r||e[19]!==c||e[20]!==h||e[21]!==g?(b={selfClient:r,org:t,userId:g,cdConnectionId:l,domain:h,siteUrl:c},e[16]=l,e[17]=t,e[18]=r,e[19]=c,e[20]=h,e[21]=g,e[22]=b):b=e[22];const{connect:D,connectingFieldKey:I,error:_}=Ie(b);let E;if(e[23]!==j||e[24]!==o){let p;e[26]!==o?(p=x=>x.fieldKey===o,e[26]=o,e[27]=p):p=e[27],E=j.find(p),e[23]=j,e[24]=o,e[25]=E}else E=e[25];const a=E;if(!a){let p;e[28]!==s?(p=s("routes.commerceOnboarding.connectModal.loadError"),e[28]=s,e[29]=p):p=e[29];let x;e[30]!==p?(x=n.jsx("p",{className:"text-sm text-muted-foreground",children:p}),e[30]=p,e[31]=x):x=e[31];let C;return e[32]!==i||e[33]!==x?(C=n.jsx(B,{onClose:i,children:x}),e[32]=i,e[33]=x,e[34]=C):C=e[34],C}const P=be[a.bindingType];if(P&&a.boundVia!=="oauth"){let p;e[35]!==i?(p=v=>!v&&i(),e[35]=i,e[36]=p):p=e[36];let x;e[37]!==a||e[38]!==D?(x=a.satisfied?void 0:()=>{D(a)},e[37]=a,e[38]=D,e[39]=x):x=e[39];let C;return e[40]!==a||e[41]!==t||e[42]!==P||e[43]!==r||e[44]!==c||e[45]!==p||e[46]!==x?(C=n.jsx(De,{card:a,provider:P,org:t,selfClient:r,siteUrl:c,open:!0,onOpenChange:p,onOAuthInstead:x}),e[40]=a,e[41]=t,e[42]=P,e[43]=r,e[44]=c,e[45]=p,e[46]=x,e[47]=C):C=e[47],C}if(a.satisfied&&a.linkedConnectionId){let p;e[48]!==s?(p=s("commerceOnboarding.connectSourceDialog.loading"),e[48]=s,e[49]=p):p=e[49];let x;e[50]!==p?(x=n.jsx(V,{label:p}),e[50]=p,e[51]=x):x=e[51];let C;e[52]!==i||e[53]!==x?(C=n.jsx(B,{onClose:i,children:x}),e[52]=i,e[53]=x,e[54]=C):C=e[54];let v;e[55]!==i?(v=A=>!A&&i(),e[55]=i,e[56]=v):v=e[56];let M;e[57]!==a||e[58]!==t||e[59]!==r||e[60]!==c||e[61]!==v?(M=n.jsx(Ne,{card:a,org:t,selfClient:r,connectionId:a.linkedConnectionId,contextSiteUrl:c,open:!0,onOpenChange:v}),e[57]=a,e[58]=t,e[59]=r,e[60]=c,e[61]=v,e[62]=M):M=e[62];let O;return e[63]!==C||e[64]!==M?(O=n.jsx(H.Suspense,{fallback:C,children:M}),e[63]=C,e[64]=M,e[65]=O):O=e[65],O}const T=I===a.fieldKey;let y;e[66]!==a||e[67]!==D?(y=()=>{D(a)},e[66]=a,e[67]=D,e[68]=y):y=e[68];let R;return e[69]!==a||e[70]!==_||e[71]!==i||e[72]!==T||e[73]!==y?(R=n.jsx(Ee,{card:a,connecting:T,error:_,onConnect:y,onClose:i}),e[69]=a,e[70]=_,e[71]=i,e[72]=T,e[73]=y,e[74]=R):R=e[74],R}function Ee(N){const e=w.c(22),{card:o,connecting:i,error:s,onConnect:t,onClose:m}=N,l=L(),[d,r]=H.useState(!1);d||(r(!0),queueMicrotask(t));let u;e[0]!==i||e[1]!==m?(u=b=>{!b&&i||b||m()},e[0]=i,e[1]=m,e[2]=u):u=e[2];let g;e[3]!==o.icon||e[4]!==o.title?(g=n.jsx(Ce,{icon:o.icon,name:o.title,size:"sm",fit:"contain",className:"p-1"}),e[3]=o.icon,e[4]=o.title,e[5]=g):g=e[5];let S;e[6]!==o.title?(S=n.jsx(W,{className:"min-w-0 flex-1",children:o.title}),e[6]=o.title,e[7]=S):S=e[7];let c;e[8]!==g||e[9]!==S?(c=n.jsxs(J,{className:"flex-row items-center gap-3 space-y-0 text-left",children:[g,S]}),e[8]=g,e[9]=S,e[10]=c):c=e[10];let f;e[11]!==o.title||e[12]!==s||e[13]!==t||e[14]!==l?(f=s?n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("p",{role:"alert",className:"text-sm text-destructive",children:s}),n.jsx(se,{type:"button",variant:"outline",size:"sm",className:"self-start",onClick:t,children:l("routes.commerceOnboarding.companionSection.retry")})]}):n.jsx(V,{label:l("commerceOnboarding.connectSourceDialog.connecting",{title:o.title})}),e[11]=o.title,e[12]=s,e[13]=t,e[14]=l,e[15]=f):f=e[15];let j;e[16]!==c||e[17]!==f?(j=n.jsxs(Q,{"aria-describedby":void 0,className:"sm:max-w-lg",children:[c,f]}),e[16]=c,e[17]=f,e[18]=j):j=e[18];let h;return e[19]!==u||e[20]!==j?(h=n.jsx(X,{open:!0,onOpenChange:u,children:j}),e[19]=u,e[20]=j,e[21]=h):h=e[21],h}const Pe={};function Re(N){const e=w.c(43),{client:o,resourceURI:i,tool:s,connectionId:t,orgId:m,args:l}=N,{sendMessage:d}=ue(),{setAppContext:r,clearAppContext:u}=ge(),{openSidePanel:g,openTab:S,closeTab:c}=xe(),f=`${t}:${s.name}`,[j,h]=H.useState(null);let b;e[0]!==c?(b=U=>U==="inline"?(c(),"inline"):"fullscreen",e[0]=c,e[1]=b):b=e[1];const D=b,I=l??Pe;let _;e[2]!==o||e[3]!==s.name||e[4]!==I?(_={client:o,toolName:s.name,toolArguments:I},e[2]=o,e[3]=s.name,e[4]=I,e[5]=_):_=e[5];const{data:E}=ae(_);let a;if(e[6]!==s._meta||e[7]!==s.name){const U=z(s._meta);a=F(s.name,U),e[6]=s._meta,e[7]=s.name,e[8]=a}else a=e[8];const P=a;let T;e[9]!==s.inputSchema?(T=s.inputSchema??{type:"object"},e[9]=s.inputSchema,e[10]=T):T=e[10];let y;e[11]!==P||e[12]!==T||e[13]!==s?(y={...s,name:P,inputSchema:T},e[11]=P,e[12]=T,e[13]=s,e[14]=y):y=e[14];const R=y;let p;e[15]!==g||e[16]!==S||e[17]!==d?(p=U=>{const k=ye(U.content);if(k.isNavigate){k.tab==="connect-sources"&&k.field?h(k.field):k.tab&&S(k.tab);return}const Y=pe(U.content);Y.content.length>0&&(g(),d({tiptapDoc:Y}))},e[15]=g,e[16]=S,e[17]=d,e[18]=p):p=e[18];const x=p;let C;e[19]!==R?(C={tool:R},e[19]=R,e[20]=C):C=e[20];let v;e[21]!==r||e[22]!==f?(v=U=>r(f,U),e[21]=r,e[22]=f,e[23]=v):v=e[23];let M;e[24]!==u||e[25]!==f?(M=()=>u(f),e[24]=u,e[25]=f,e[26]=M):M=e[26];let O;e[27]!==o||e[28]!==x||e[29]!==D||e[30]!==m||e[31]!==i||e[32]!==C||e[33]!==v||e[34]!==M||e[35]!==I||e[36]!==E?(O=n.jsx(de,{resourceURI:i,orgId:m,toolInfo:C,toolInput:I,toolResult:E,displayMode:"fullscreen",minHeight:K.fullscreen.minHeight,maxHeight:K.fullscreen.maxHeight,client:o,onMessage:x,onUpdateModelContext:v,onTeardown:M,onRequestDisplayMode:D,className:"h-full"}),e[27]=o,e[28]=x,e[29]=D,e[30]=m,e[31]=i,e[32]=C,e[33]=v,e[34]=M,e[35]=I,e[36]=E,e[37]=O):O=e[37];let A;e[38]!==j?(A=j&&n.jsx(Oe,{field:j,onClose:()=>h(null)}),e[38]=j,e[39]=A):A=e[39];let $;return e[40]!==O||e[41]!==A?($=n.jsxs(n.Fragment,{children:[O,A]}),e[40]=O,e[41]=A,e[42]=$):$=e[42],$}function Vo(N){const e=w.c(25),{connectionId:o,toolName:i,args:s}=N,{org:t}=q(),m=me(),l=ve();let d;e[0]!==o||e[1]!==l||e[2]!==m?(d=re(o)&&l?`${m.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,e[0]=o,e[1]=l,e[2]=m,e[3]=d):d=e[3];const r=d;let u;e[4]!==o||e[5]!==r||e[6]!==t.id||e[7]!==t.slug?(u={connectionId:o,orgId:t.id,orgSlug:t.slug,mcpUrl:r},e[4]=o,e[5]=r,e[6]=t.id,e[7]=t.slug,e[8]=u):u=e[8];const g=G(u);let S;e[9]!==g?(S={client:g},e[9]=g,e[10]=S):S=e[10];const{data:c}=ce(S);let f,j,h;e[11]!==i||e[12]!==c.tools?(f=le(decodeURIComponent(i)),h=c.tools.find(I=>I.name===f)??c.tools.find(I=>{const _=z(I._meta);if(!_)return!1;if(F(I.name,_)===f)return!0;const a=F(f,_);return a!==f&&I.name===a}),j=h?._meta?fe(h._meta):void 0,e[11]=i,e[12]=c.tools,e[13]=f,e[14]=j,e[15]=h):(f=e[13],j=e[14],h=e[15]);const b=j;if(!h||!b){let I;return e[16]!==f?(I=n.jsx("div",{className:"flex items-center justify-center h-full w-full",children:n.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',f,'" not found or has no UI']})}),e[16]=f,e[17]=I):I=e[17],I}let D;return e[18]!==s||e[19]!==g||e[20]!==o||e[21]!==t.id||e[22]!==b||e[23]!==h?(D=n.jsx(Re,{client:g,resourceURI:b,tool:h,connectionId:o,orgId:t.id,args:s}),e[18]=s,e[19]=g,e[20]=o,e[21]=t.id,e[22]=b,e[23]=h,e[24]=D):D=e[24],D}export{Vo as AppViewContent};
@@ -1 +1 @@
1
- import{c as O,j as s,l as U,M as V,_ as X,z as J,b as L,r as W,d as Z,f as ee,a5 as te,B as se}from"./index-7tyXXYIG.js";import{i as ne}from"./Tool02-vcgsrI0t.js";import{d as Y,D as ae,b as le,e as ie,c as oe}from"./dropdown-menu-BREtR-L8.js";import{P as re}from"./project-icon-BpNWgNmk.js";import{G as ce}from"./github-icon-0MAxQvrZ.js";import{L as de}from"./anchors-yqDzZN4K.js";import{S as me,g as ue,h as fe,j as pe,d as xe,b as ge,l as he,e as je,f as Ne,t as be,k as q,a as ye}from"./task-route-zG_8Kz8w.js";import{u as Ie}from"./use-navigate-to-agent-C1krlEI1.js";import{A as ke}from"./avatar-Bh0VE7CU.js";import{g as ve}from"./get-initials-D-f_fDFw.js";import{S as H,D as Ae}from"./task-board-DgeGTQVc.js";import{u as Ce}from"./use-members-uHE9_Ihn.js";import{a as Te}from"./format-time-BtXRrtv4.js";function Se(n){const e=O.c(10),{assigneeId:r,assignee:o,size:a,title:l,className:i}=n,d=a===void 0?20:a;if(!r)return null;let t;e[0]!==o||e[1]!==r||e[2]!==d?(t=r===H?s.jsx(me,{size:d}):o?s.jsx(ke,{url:o.user?.image??void 0,fallback:ve(o.user?.name),shape:"circle",size:"xs"}):null,e[0]=o,e[1]=r,e[2]=d,e[3]=t):t=e[3];const f=t;if(!f)return null;let c;e[4]!==i?(c=U("inline-flex shrink-0",i),e[4]=i,e[5]=c):c=e[5];let p;return e[6]!==f||e[7]!==c||e[8]!==l?(p=s.jsx("span",{className:c,title:l,children:f}),e[6]=f,e[7]=c,e[8]=l,e[9]=p):p=e[9],p}const Fe=20,_e=new Set(["high","urgent"]);function we(n,e,r){const o=r?q(r,n):void 0,a=[];for(const l of e){if(l.status==="archived")continue;const i=fe(l,n);i&&(r&&i!==o||a.push({task:l,bucket:i,project:pe(l,n)}))}return a.sort((l,i)=>(i.task.updatedAt??"").localeCompare(l.task.updatedAt??"")).slice(0,Fe)}function Pe(n){const e=O.c(25),{index:r,value:o,onChange:a}=n,l=L();let i;e[0]!==r||e[1]!==o?(i=o?q(o,r):void 0,e[0]=r,e[1]=o,e[2]=i):i=e[2];const d=i;let t;e[3]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ne,{size:14}),e[3]=t):t=e[3];let f;e[4]!==d||e[5]!==l?(f=d?d.title:l("home.projectFeed.filterAll"),e[4]=d,e[5]=l,e[6]=f):f=e[6];let c;e[7]!==f?(c=s.jsx(ae,{asChild:!0,children:s.jsxs(se,{size:"sm",variant:"outline",className:"gap-1.5",children:[t,f]})}),e[7]=f,e[8]=c):c=e[8];const p=o??"";let u;e[9]!==a?(u=h=>a(h||null),e[9]=a,e[10]=u):u=e[10];let j;e[11]!==l?(j=l("home.projectFeed.filterAll"),e[11]=l,e[12]=j):j=e[12];let g;e[13]!==j?(g=s.jsx(Y,{value:"",children:j}),e[13]=j,e[14]=g):g=e[14];let x;e[15]!==r.entries?(x=r.entries.map(Ee),e[15]=r.entries,e[16]=x):x=e[16];let m;e[17]!==p||e[18]!==u||e[19]!==g||e[20]!==x?(m=s.jsx(le,{align:"end",className:"w-56",children:s.jsxs(ie,{value:p,onValueChange:u,children:[g,x]})}),e[17]=p,e[18]=u,e[19]=g,e[20]=x,e[21]=m):m=e[21];let N;return e[22]!==m||e[23]!==c?(N=s.jsxs(oe,{children:[c,m]}),e[22]=m,e[23]=c,e[24]=N):N=e[24],N}function Ee(n){return s.jsx(Y,{value:n.id,children:s.jsxs("span",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"truncate",children:n.title}),n.projects.length>1&&s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:n.projects.map(Re).join(", ")})]})},n.id)}function Re(n){return n.title}function G(n){const e=O.c(8),{icon:r,iconClassName:o,children:a}=n;let l;e[0]!==o?(l=U("size-3.5 shrink-0",o),e[0]=o,e[1]=l):l=e[1];let i;e[2]!==r||e[3]!==l?(i=s.jsx(r,{className:l}),e[2]=r,e[3]=l,e[4]=i):i=e[4];let d;return e[5]!==a||e[6]!==i?(d=s.jsxs("span",{className:"inline-flex h-6 items-center gap-1.5 rounded-full border-[length:var(--border-hairline)] border-border px-2 text-xs text-muted-foreground",children:[i,a]}),e[5]=a,e[6]=i,e[7]=d):d=e[7],d}function De(n){const e=O.c(69),{entry:r,memberById:o}=n,a=L(),l=Z(),i=Ie(),d=ee({strict:!1}).org??"",{task:t,bucket:f,project:c}=r;let p;e[0]!==a||e[1]!==t.status?(p=he(t.status,a),e[0]=a,e[1]=t.status,e[2]=p):p=e[2];const u=p,j=u.visual.icon,g=je[t.priority],x=g.icon,m=Ne[t.type??Ae],N=m.icon;let h;e[3]!==d||e[4]!==t.keySeq?(h=be(d,t.keySeq),e[3]=d,e[4]=t.keySeq,e[5]=h):h=e[5];const I=h;let b;e[6]!==o||e[7]!==t.assigneeId?(b=t.assigneeId?o.get(t.assigneeId):void 0,e[6]=o,e[7]=t.assigneeId,e[8]=b):b=e[8];const y=b;let B;e[9]!==y?.user?.name||e[10]!==a||e[11]!==t.assigneeId?(B=t.assigneeId===H?a("taskBoard.taskDialog.superAgentLabel"):y?.user?.name??void 0,e[9]=y?.user?.name,e[10]=a,e[11]=t.assigneeId,e[12]=B):B=e[12];const $=B;let k;e[13]!==f||e[14]!==i||e[15]!==c?(k=c?s.jsxs("button",{type:"button",onClick:()=>i(c.id,{panel:te(c.metadata?.ui?.layout)}),className:"flex min-w-0 cursor-pointer items-center gap-2 rounded-md text-left text-sm font-medium text-foreground transition-colors hover:text-primary",children:[s.jsx(re,{icon:c.icon,name:c.title}),s.jsx("span",{className:"truncate",children:c.title})]}):s.jsxs("span",{className:"flex min-w-0 items-center gap-2 text-sm font-medium text-muted-foreground",children:[s.jsx(ce,{className:"size-4 shrink-0"}),s.jsx("span",{className:"truncate",children:f.title})]}),e[13]=f,e[14]=i,e[15]=c,e[16]=k):k=e[16];let v;e[17]!==I?(v=I&&s.jsx("span",{className:"shrink-0 rounded-md bg-muted px-1.5 py-0.5 font-mono text-xs text-muted-foreground",children:I}),e[17]=I,e[18]=v):v=e[18];let A;e[19]!==t.updatedAt?(A=Te(new Date(t.updatedAt)),e[19]=t.updatedAt,e[20]=A):A=e[20];let C;e[21]!==A?(C=s.jsx("span",{className:"ml-auto shrink-0 text-sm text-muted-foreground",children:A}),e[21]=A,e[22]=C):C=e[22];let T;e[23]!==y||e[24]!==$||e[25]!==t.assigneeId?(T=s.jsx(Se,{assigneeId:t.assigneeId,assignee:y,title:$}),e[23]=y,e[24]=$,e[25]=t.assigneeId,e[26]=T):T=e[26];let S;e[27]!==k||e[28]!==v||e[29]!==C||e[30]!==T?(S=s.jsxs("div",{className:"flex items-center gap-2.5",children:[k,v,C,T]}),e[27]=k,e[28]=v,e[29]=C,e[30]=T,e[31]=S):S=e[31];let F;e[32]!==l||e[33]!==d||e[34]!==t?(F=()=>l({to:"/$org/tasks/{-$taskKey}",params:{org:d,taskKey:ye(d,t)}}),e[32]=l,e[33]=d,e[34]=t,e[35]=F):F=e[35];let _;e[36]!==t.title?(_=s.jsx("span",{className:"text-lg leading-snug font-semibold text-foreground transition-colors hover:text-primary",children:t.title}),e[36]=t.title,e[37]=_):_=e[37];let w;e[38]!==j||e[39]!==u.label||e[40]!==u.visual.iconClassName?(w=s.jsx(G,{icon:j,iconClassName:u.visual.iconClassName,children:u.label}),e[38]=j,e[39]=u.label,e[40]=u.visual.iconClassName,e[41]=w):w=e[41];const Q=m.iconClassName;let P;e[42]!==a||e[43]!==m.labelKey?(P=a(m.labelKey),e[42]=a,e[43]=m.labelKey,e[44]=P):P=e[44];let E;e[45]!==N||e[46]!==P||e[47]!==m.iconClassName?(E=s.jsx(G,{icon:N,iconClassName:Q,children:P}),e[45]=N,e[46]=P,e[47]=m.iconClassName,e[48]=E):E=e[48];let R;e[49]!==x||e[50]!==g.iconClassName||e[51]!==g.labelKey||e[52]!==a||e[53]!==t.priority?(R=_e.has(t.priority)&&s.jsx(G,{icon:x,iconClassName:g.iconClassName,children:a(g.labelKey)}),e[49]=x,e[50]=g.iconClassName,e[51]=g.labelKey,e[52]=a,e[53]=t.priority,e[54]=R):R=e[54];let D;e[55]!==w||e[56]!==E||e[57]!==R?(D=s.jsxs("span",{className:"flex flex-wrap items-center gap-1.5",children:[w,E,R]}),e[55]=w,e[56]=E,e[57]=R,e[58]=D):D=e[58];let K;e[59]!==F||e[60]!==_||e[61]!==D?(K=s.jsxs("button",{type:"button",onClick:F,className:"flex cursor-pointer flex-col items-start gap-2.5 text-left",children:[_,D]}),e[59]=F,e[60]=_,e[61]=D,e[62]=K):K=e[62];let M;e[63]!==t.description?(M=t.description&&s.jsx("p",{className:"line-clamp-3 text-sm leading-relaxed text-muted-foreground",children:t.description}),e[63]=t.description,e[64]=M):M=e[64];let z;return e[65]!==S||e[66]!==K||e[67]!==M?(z=s.jsxs("article",{className:"card-shadow flex flex-col gap-4 rounded-xl bg-card p-6",children:[S,K,M]}),e[65]=S,e[66]=K,e[67]=M,e[68]=z):z=e[68],z}function Xe(){const n=O.c(3),{locator:e}=V(),r=X();ue();let o;n[0]!==e||n[1]!==r?(o=xe(e,r),n[0]=e,n[1]=r,n[2]=o):o=n[2];const{data:a}=J(o);return a.items}function Je(n){const e=O.c(12),{projects:r,tasks:o,showFilter:a}=n,l=a===void 0?!0:a,i=L(),[d,t]=W.useState(null),f=ge(r),c=we(f,o,d),{data:p}=Ce();let u;e[0]!==p?.data?.members?(u=new Map((p?.data?.members??[]).map(Ke)),e[0]=p?.data?.members,e[1]=u):u=e[1];const j=u,g="flex flex-col gap-4";let x;e[2]!==i?(x=i("home.projectFeed.heading"),e[2]=i,e[3]=x):x=e[3];let m;e[4]!==x?(m=s.jsx("h2",{className:"text-lg font-medium text-foreground","data-tour":de.recentActivity,children:x}),e[4]=x,e[5]=m):m=e[5];const N=l&&s.jsx(Pe,{index:f,value:d,onChange:t});let h;e[6]!==m||e[7]!==N?(h=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m,N]}),e[6]=m,e[7]=N,e[8]=h):h=e[8];const I=c.length===0?s.jsx("p",{className:"rounded-xl border border-dashed border-border p-12 text-center text-sm text-muted-foreground",children:i("home.projectFeed.empty")}):s.jsx("div",{className:"flex flex-col gap-4",children:c.map(y=>s.jsx(De,{entry:y,memberById:j},y.task.id))});let b;return e[9]!==h||e[10]!==I?(b=s.jsxs("section",{className:g,children:[h,I]}),e[9]=h,e[10]=I,e[11]=b):b=e[11],b}function Ke(n){return[n.userId,n]}export{Je as P,we as b,Xe as u};
1
+ import{c as O,j as s,l as U,M as V,_ as X,z as J,b as L,r as W,d as Z,f as ee,a5 as te,B as se}from"./index-LqGJKspm.js";import{i as ne}from"./Tool02-DJpbC_72.js";import{d as Y,D as ae,b as le,e as ie,c as oe}from"./dropdown-menu-2R7EcIqz.js";import{P as re}from"./project-icon-4fy6jz5e.js";import{G as ce}from"./github-icon-CrJOrJCi.js";import{L as de}from"./anchors-yqDzZN4K.js";import{S as me,g as ue,h as fe,j as pe,d as xe,b as ge,l as he,e as je,f as Ne,t as be,k as q,a as ye}from"./task-route-DKkxhcBt.js";import{u as Ie}from"./use-navigate-to-agent-DckkpAZt.js";import{A as ke}from"./avatar-D6EG4gpi.js";import{g as ve}from"./get-initials-D-f_fDFw.js";import{S as H,D as Ae}from"./task-board-CT88RfwA.js";import{u as Ce}from"./use-members-CpAtdP1_.js";import{a as Te}from"./format-time-BtXRrtv4.js";function Se(n){const e=O.c(10),{assigneeId:r,assignee:o,size:a,title:l,className:i}=n,d=a===void 0?20:a;if(!r)return null;let t;e[0]!==o||e[1]!==r||e[2]!==d?(t=r===H?s.jsx(me,{size:d}):o?s.jsx(ke,{url:o.user?.image??void 0,fallback:ve(o.user?.name),shape:"circle",size:"xs"}):null,e[0]=o,e[1]=r,e[2]=d,e[3]=t):t=e[3];const f=t;if(!f)return null;let c;e[4]!==i?(c=U("inline-flex shrink-0",i),e[4]=i,e[5]=c):c=e[5];let p;return e[6]!==f||e[7]!==c||e[8]!==l?(p=s.jsx("span",{className:c,title:l,children:f}),e[6]=f,e[7]=c,e[8]=l,e[9]=p):p=e[9],p}const Fe=20,_e=new Set(["high","urgent"]);function we(n,e,r){const o=r?q(r,n):void 0,a=[];for(const l of e){if(l.status==="archived")continue;const i=fe(l,n);i&&(r&&i!==o||a.push({task:l,bucket:i,project:pe(l,n)}))}return a.sort((l,i)=>(i.task.updatedAt??"").localeCompare(l.task.updatedAt??"")).slice(0,Fe)}function Pe(n){const e=O.c(25),{index:r,value:o,onChange:a}=n,l=L();let i;e[0]!==r||e[1]!==o?(i=o?q(o,r):void 0,e[0]=r,e[1]=o,e[2]=i):i=e[2];const d=i;let t;e[3]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ne,{size:14}),e[3]=t):t=e[3];let f;e[4]!==d||e[5]!==l?(f=d?d.title:l("home.projectFeed.filterAll"),e[4]=d,e[5]=l,e[6]=f):f=e[6];let c;e[7]!==f?(c=s.jsx(ae,{asChild:!0,children:s.jsxs(se,{size:"sm",variant:"outline",className:"gap-1.5",children:[t,f]})}),e[7]=f,e[8]=c):c=e[8];const p=o??"";let u;e[9]!==a?(u=h=>a(h||null),e[9]=a,e[10]=u):u=e[10];let j;e[11]!==l?(j=l("home.projectFeed.filterAll"),e[11]=l,e[12]=j):j=e[12];let g;e[13]!==j?(g=s.jsx(Y,{value:"",children:j}),e[13]=j,e[14]=g):g=e[14];let x;e[15]!==r.entries?(x=r.entries.map(Ee),e[15]=r.entries,e[16]=x):x=e[16];let m;e[17]!==p||e[18]!==u||e[19]!==g||e[20]!==x?(m=s.jsx(le,{align:"end",className:"w-56",children:s.jsxs(ie,{value:p,onValueChange:u,children:[g,x]})}),e[17]=p,e[18]=u,e[19]=g,e[20]=x,e[21]=m):m=e[21];let N;return e[22]!==m||e[23]!==c?(N=s.jsxs(oe,{children:[c,m]}),e[22]=m,e[23]=c,e[24]=N):N=e[24],N}function Ee(n){return s.jsx(Y,{value:n.id,children:s.jsxs("span",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"truncate",children:n.title}),n.projects.length>1&&s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:n.projects.map(Re).join(", ")})]})},n.id)}function Re(n){return n.title}function G(n){const e=O.c(8),{icon:r,iconClassName:o,children:a}=n;let l;e[0]!==o?(l=U("size-3.5 shrink-0",o),e[0]=o,e[1]=l):l=e[1];let i;e[2]!==r||e[3]!==l?(i=s.jsx(r,{className:l}),e[2]=r,e[3]=l,e[4]=i):i=e[4];let d;return e[5]!==a||e[6]!==i?(d=s.jsxs("span",{className:"inline-flex h-6 items-center gap-1.5 rounded-full border-[length:var(--border-hairline)] border-border px-2 text-xs text-muted-foreground",children:[i,a]}),e[5]=a,e[6]=i,e[7]=d):d=e[7],d}function De(n){const e=O.c(69),{entry:r,memberById:o}=n,a=L(),l=Z(),i=Ie(),d=ee({strict:!1}).org??"",{task:t,bucket:f,project:c}=r;let p;e[0]!==a||e[1]!==t.status?(p=he(t.status,a),e[0]=a,e[1]=t.status,e[2]=p):p=e[2];const u=p,j=u.visual.icon,g=je[t.priority],x=g.icon,m=Ne[t.type??Ae],N=m.icon;let h;e[3]!==d||e[4]!==t.keySeq?(h=be(d,t.keySeq),e[3]=d,e[4]=t.keySeq,e[5]=h):h=e[5];const I=h;let b;e[6]!==o||e[7]!==t.assigneeId?(b=t.assigneeId?o.get(t.assigneeId):void 0,e[6]=o,e[7]=t.assigneeId,e[8]=b):b=e[8];const y=b;let B;e[9]!==y?.user?.name||e[10]!==a||e[11]!==t.assigneeId?(B=t.assigneeId===H?a("taskBoard.taskDialog.superAgentLabel"):y?.user?.name??void 0,e[9]=y?.user?.name,e[10]=a,e[11]=t.assigneeId,e[12]=B):B=e[12];const $=B;let k;e[13]!==f||e[14]!==i||e[15]!==c?(k=c?s.jsxs("button",{type:"button",onClick:()=>i(c.id,{panel:te(c.metadata?.ui?.layout)}),className:"flex min-w-0 cursor-pointer items-center gap-2 rounded-md text-left text-sm font-medium text-foreground transition-colors hover:text-primary",children:[s.jsx(re,{icon:c.icon,name:c.title}),s.jsx("span",{className:"truncate",children:c.title})]}):s.jsxs("span",{className:"flex min-w-0 items-center gap-2 text-sm font-medium text-muted-foreground",children:[s.jsx(ce,{className:"size-4 shrink-0"}),s.jsx("span",{className:"truncate",children:f.title})]}),e[13]=f,e[14]=i,e[15]=c,e[16]=k):k=e[16];let v;e[17]!==I?(v=I&&s.jsx("span",{className:"shrink-0 rounded-md bg-muted px-1.5 py-0.5 font-mono text-xs text-muted-foreground",children:I}),e[17]=I,e[18]=v):v=e[18];let A;e[19]!==t.updatedAt?(A=Te(new Date(t.updatedAt)),e[19]=t.updatedAt,e[20]=A):A=e[20];let C;e[21]!==A?(C=s.jsx("span",{className:"ml-auto shrink-0 text-sm text-muted-foreground",children:A}),e[21]=A,e[22]=C):C=e[22];let T;e[23]!==y||e[24]!==$||e[25]!==t.assigneeId?(T=s.jsx(Se,{assigneeId:t.assigneeId,assignee:y,title:$}),e[23]=y,e[24]=$,e[25]=t.assigneeId,e[26]=T):T=e[26];let S;e[27]!==k||e[28]!==v||e[29]!==C||e[30]!==T?(S=s.jsxs("div",{className:"flex items-center gap-2.5",children:[k,v,C,T]}),e[27]=k,e[28]=v,e[29]=C,e[30]=T,e[31]=S):S=e[31];let F;e[32]!==l||e[33]!==d||e[34]!==t?(F=()=>l({to:"/$org/tasks/{-$taskKey}",params:{org:d,taskKey:ye(d,t)}}),e[32]=l,e[33]=d,e[34]=t,e[35]=F):F=e[35];let _;e[36]!==t.title?(_=s.jsx("span",{className:"text-lg leading-snug font-semibold text-foreground transition-colors hover:text-primary",children:t.title}),e[36]=t.title,e[37]=_):_=e[37];let w;e[38]!==j||e[39]!==u.label||e[40]!==u.visual.iconClassName?(w=s.jsx(G,{icon:j,iconClassName:u.visual.iconClassName,children:u.label}),e[38]=j,e[39]=u.label,e[40]=u.visual.iconClassName,e[41]=w):w=e[41];const Q=m.iconClassName;let P;e[42]!==a||e[43]!==m.labelKey?(P=a(m.labelKey),e[42]=a,e[43]=m.labelKey,e[44]=P):P=e[44];let E;e[45]!==N||e[46]!==P||e[47]!==m.iconClassName?(E=s.jsx(G,{icon:N,iconClassName:Q,children:P}),e[45]=N,e[46]=P,e[47]=m.iconClassName,e[48]=E):E=e[48];let R;e[49]!==x||e[50]!==g.iconClassName||e[51]!==g.labelKey||e[52]!==a||e[53]!==t.priority?(R=_e.has(t.priority)&&s.jsx(G,{icon:x,iconClassName:g.iconClassName,children:a(g.labelKey)}),e[49]=x,e[50]=g.iconClassName,e[51]=g.labelKey,e[52]=a,e[53]=t.priority,e[54]=R):R=e[54];let D;e[55]!==w||e[56]!==E||e[57]!==R?(D=s.jsxs("span",{className:"flex flex-wrap items-center gap-1.5",children:[w,E,R]}),e[55]=w,e[56]=E,e[57]=R,e[58]=D):D=e[58];let K;e[59]!==F||e[60]!==_||e[61]!==D?(K=s.jsxs("button",{type:"button",onClick:F,className:"flex cursor-pointer flex-col items-start gap-2.5 text-left",children:[_,D]}),e[59]=F,e[60]=_,e[61]=D,e[62]=K):K=e[62];let M;e[63]!==t.description?(M=t.description&&s.jsx("p",{className:"line-clamp-3 text-sm leading-relaxed text-muted-foreground",children:t.description}),e[63]=t.description,e[64]=M):M=e[64];let z;return e[65]!==S||e[66]!==K||e[67]!==M?(z=s.jsxs("article",{className:"card-shadow flex flex-col gap-4 rounded-xl bg-card p-6",children:[S,K,M]}),e[65]=S,e[66]=K,e[67]=M,e[68]=z):z=e[68],z}function Xe(){const n=O.c(3),{locator:e}=V(),r=X();ue();let o;n[0]!==e||n[1]!==r?(o=xe(e,r),n[0]=e,n[1]=r,n[2]=o):o=n[2];const{data:a}=J(o);return a.items}function Je(n){const e=O.c(12),{projects:r,tasks:o,showFilter:a}=n,l=a===void 0?!0:a,i=L(),[d,t]=W.useState(null),f=ge(r),c=we(f,o,d),{data:p}=Ce();let u;e[0]!==p?.data?.members?(u=new Map((p?.data?.members??[]).map(Ke)),e[0]=p?.data?.members,e[1]=u):u=e[1];const j=u,g="flex flex-col gap-4";let x;e[2]!==i?(x=i("home.projectFeed.heading"),e[2]=i,e[3]=x):x=e[3];let m;e[4]!==x?(m=s.jsx("h2",{className:"text-lg font-medium text-foreground","data-tour":de.recentActivity,children:x}),e[4]=x,e[5]=m):m=e[5];const N=l&&s.jsx(Pe,{index:f,value:d,onChange:t});let h;e[6]!==m||e[7]!==N?(h=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m,N]}),e[6]=m,e[7]=N,e[8]=h):h=e[8];const I=c.length===0?s.jsx("p",{className:"rounded-xl border border-dashed border-border p-12 text-center text-sm text-muted-foreground",children:i("home.projectFeed.empty")}):s.jsx("div",{className:"flex flex-col gap-4",children:c.map(y=>s.jsx(De,{entry:y,memberById:j},y.task.id))});let b;return e[9]!==h||e[10]!==I?(b=s.jsxs("section",{className:g,children:[h,I]}),e[9]=h,e[10]=I,e[11]=b):b=e[11],b}function Ke(n){return[n.userId,n]}export{Je as P,we as b,Xe as u};
@@ -1 +1 @@
1
- import{c as n,j as c}from"./index-7tyXXYIG.js";import{A as i}from"./agent-icon-BNs8r1fO.js";function p(r){const t=n.c(3),{icon:s,name:e}=r;let o;return t[0]!==s||t[1]!==e?(o=c.jsx(i,{icon:s,name:e,size:"2xs"}),t[0]=s,t[1]=e,t[2]=o):o=t[2],o}export{p as P};
1
+ import{c as n,j as c}from"./index-LqGJKspm.js";import{A as i}from"./agent-icon-CP4wb7Bx.js";function p(r){const t=n.c(3),{icon:s,name:e}=r;let o;return t[0]!==s||t[1]!==e?(o=c.jsx(i,{icon:s,name:e,size:"2xs"}),t[0]=s,t[1]=e,t[2]=o):o=t[2],o}export{p as P};
@@ -0,0 +1 @@
1
+ import{c as m,j as r}from"./index-LqGJKspm.js";import{C as i}from"./index-CVKN3yqd.js";import{R as p}from"./reports-tab-BwNrhZ99.js";import"./use-mobile-Dqp4Jkm6.js";import"./index-DTtAckpN.js";import"./resizable-DdiAoyYr.js";import"./MessageCircle01-BIIEDxFs.js";import"./thread-route-D9RjIb92.js";import"./use-panel-navigate-CPCeDjnd.js";import"./use-project-scope-OfDo_ODT.js";import"./use-virtual-mcp-Dpcooz6x.js";import"./use-mcp-client-D8jBM4Gn.js";import"./auth-DiBJ6HTw.js";import"./github-repo-BknN0SVI.js";import"./use-route-default-main-TI35rK7_.js";import"./hooks-Cow3V6T6.js";import"./backoff-8mStPHYB.js";import"./task-board-CT88RfwA.js";import"./schema-Dn-PxCJQ.js";import"./tooltip-DsIeYtk8.js";import"./index-DgWiecJC.js";import"./toolbar-icon-button-CQM6O44g.js";import"./ArrowRight-CGkzbTs-.js";import"./site-url-en5df9c-.js";import"./input-BmnxcFX-.js";import"./use-commerce-diagnostic-D4lhjg3y.js";import"./companions-core-CZwGf1b1.js";import"./github-D4UJ99TO.js";import"./github-repo-scope-C8GSbvaz.js";import"./metadata-dUsYcpuu.js";import"./mini-report-page-B4Ns89qY.js";import"./self-tool-result-8OxPN9Nm.js";import"./site-error--i37Vnuw.js";function G(){const o=m.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(i.Content,{children:r.jsx(p,{})}),o[0]=t):t=o[0],t}export{G as default};