decocms 2.285.1 → 2.286.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/dist/client/assets/{AlertCircle-Ljx3VIeb.js → AlertCircle-DTmaHldD.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-B8YVT66M.js → ArrowNarrowLeft-DlPeFc4v.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-BFRWTTWo.js → CheckCircle-DJ3lme5R.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-BqFspEzt.js → ChevronDown-DGnjAtqs.js} +1 -1
  5. package/dist/client/assets/{ChevronRight-DCsBjQ-n.js → ChevronRight-DV9No7GF.js} +1 -1
  6. package/dist/client/assets/{ChevronUp-D7S3j_fa.js → ChevronUp-BkSgkwhO.js} +1 -1
  7. package/dist/client/assets/{Container-SHbLkl7K.js → Container-B1nHZdmn.js} +1 -1
  8. package/dist/client/assets/DotsVertical-Bp2tW8JI.js +1 -0
  9. package/dist/client/assets/{LinkExternal01-XmkIm96u.js → LinkExternal01-BBbCPDtX.js} +1 -1
  10. package/dist/client/assets/{Lock01-CXrm99F-.js → Lock01-DpPIS3K7.js} +1 -1
  11. package/dist/client/assets/{Palette-B46VjX8F.js → Palette-CI8n49a8.js} +1 -1
  12. package/dist/client/assets/{Play-9pX5w5-3.js → Play-DKFUTU3G.js} +1 -1
  13. package/dist/client/assets/{Plus-Bmk1thjl.js → Plus-oXFwCrYz.js} +1 -1
  14. package/dist/client/assets/RefreshCcw01-B10mKiE2.js +1 -0
  15. package/dist/client/assets/SearchMd-BRJBvWf4.js +1 -0
  16. package/dist/client/assets/{Settings02-C88OtRRq.js → Settings02-Dm9dFDqk.js} +1 -1
  17. package/dist/client/assets/Shield01-BZJVBd5S.js +1 -0
  18. package/dist/client/assets/{Star01-fuGmPeeu.js → Star01-_IJK5Yjt.js} +1 -1
  19. package/dist/client/assets/{Sun-ndN_CHuQ.js → Sun-QqE1VnS_.js} +1 -1
  20. package/dist/client/assets/{Tool01-DBxgF1Y_.js → Tool01-CKowkGsd.js} +1 -1
  21. package/dist/client/assets/{Trash01-BHBjIGXE.js → Trash01-C6bAXG6g.js} +1 -1
  22. package/dist/client/assets/{User01-DCiwOMBU.js → User01-C2-anwoO.js} +1 -1
  23. package/dist/client/assets/{Users03-Bgfd1KM0.js → Users03-DqYvPeZM.js} +1 -1
  24. package/dist/client/assets/{X-BWV-b86T.js → X-i9zBn6Hn.js} +1 -1
  25. package/dist/client/assets/XCircle-C1sJYG9R.js +1 -0
  26. package/dist/client/assets/XClose-BbIo6xHe.js +1 -0
  27. package/dist/client/assets/{Zap-K9sQXDlC.js → Zap-KmbRMccM.js} +1 -1
  28. package/dist/client/assets/{ZapSquare-CTcr_tRy.js → ZapSquare-DT93lGV4.js} +1 -1
  29. package/dist/client/assets/{accordion-COmeMo5z.js → accordion-BV3tm7bj.js} +1 -1
  30. package/dist/client/assets/agent-icon-CyE6nkC1.js +1 -0
  31. package/dist/client/assets/agents-list-7o6gZt-q.js +1 -0
  32. package/dist/client/assets/ai-providers-DI3UF9nU.js +1 -0
  33. package/dist/client/assets/{alert-dialog-DaP8t8su.js → alert-dialog-CicrCOay.js} +2 -2
  34. package/dist/client/assets/{auth-catchall-CerK6T4u.js → auth-catchall-Cyd7fWQv.js} +1 -1
  35. package/dist/client/assets/automation-list-row-B4Vfg4UC.js +1 -0
  36. package/dist/client/assets/automations-DRM_lJom.js +1 -0
  37. package/dist/client/assets/{avatar-gTIcZioB.js → avatar-CF1bgUpD.js} +1 -1
  38. package/dist/client/assets/{badge-DsWPcX1V.js → badge-s_TAXGUN.js} +1 -1
  39. package/dist/client/assets/{brand-context-CnnwTWNT.js → brand-context-iopLFZ2k.js} +1 -1
  40. package/dist/client/assets/{card-CPVRwbgl.js → card-CaekC2K0.js} +1 -1
  41. package/dist/client/assets/{chat-context-CZAEwDWp.js → chat-context-DP5UfIrn.js} +1 -1
  42. package/dist/client/assets/{checkbox-CPqdqI54.js → checkbox-DznLgPgR.js} +1 -1
  43. package/dist/client/assets/collection-detail-CTQuhG7N.js +1 -0
  44. package/dist/client/assets/collection-display-button-BgYKhoGQ.js +1 -0
  45. package/dist/client/assets/{collection-search-DgokupF2.js → collection-search-Bo2bOvRn.js} +1 -1
  46. package/dist/client/assets/{collection-search-lfil19IA.js → collection-search-DMqppne6.js} +1 -1
  47. package/dist/client/assets/collection-table-wrapper-KnWZIddd.js +1 -0
  48. package/dist/client/assets/{collection-tabs-BRY4wHvH.js → collection-tabs-CU6MCzSn.js} +1 -1
  49. package/dist/client/assets/{collections-lJhN2k9k.js → collections-DHmXATua.js} +1 -1
  50. package/dist/client/assets/command-D4w2xkZT.js +1 -0
  51. package/dist/client/assets/{connection-card-BrctpSfE.js → connection-card-DBz-rrLk.js} +1 -1
  52. package/dist/client/assets/connection-detail-zHqb5ZSw.js +1 -0
  53. package/dist/client/assets/{connection-form-helpers-C1FnnBdL.js → connection-form-helpers-CBEV0IXi.js} +1 -1
  54. package/dist/client/assets/connections-CHiGbl1F.js +1 -0
  55. package/dist/client/assets/{constants-D8VkIs2c.js → constants-DDHDU3PV.js} +1 -1
  56. package/dist/client/assets/{constants-D_Nupw5-.js → constants-v4RUVkEN.js} +1 -1
  57. package/dist/client/assets/{dialog-BOagZAx2.js → dialog-C4lREl-t.js} +1 -1
  58. package/dist/client/assets/{drawer-BRUzFEdi.js → drawer-BTCEaGGQ.js} +1 -1
  59. package/dist/client/assets/dropdown-menu-v2GifVOh.js +1 -0
  60. package/dist/client/assets/{dynamic-plugin-layout-ltkevohS.js → dynamic-plugin-layout-CVBBnlEt.js} +1 -1
  61. package/dist/client/assets/{empty-state-BokLRSGE.js → empty-state-BdQTFnZA.js} +1 -1
  62. package/dist/client/assets/{empty-state-DCK4Z2GX.js → empty-state-DdKZ_is7.js} +1 -1
  63. package/dist/client/assets/{extract-connection-data-V-eInhlP.js → extract-connection-data-CfXvFcGA.js} +1 -1
  64. package/dist/client/assets/{features-DIBFVG_b.js → features-fsR9zLkr.js} +1 -1
  65. package/dist/client/assets/{form-DHQjt1Tk.js → form-D7DN8UcB.js} +1 -1
  66. package/dist/client/assets/general-WQbdllPl.js +1 -0
  67. package/dist/client/assets/{github-repo-picker-CIYxcUMn.js → github-repo-picker-DZqLC6FL.js} +2 -2
  68. package/dist/client/assets/index-BCwsJqWc.css +1 -0
  69. package/dist/client/assets/{index-sYNl3b-7.js → index-C5AR7k1c.js} +1 -1
  70. package/dist/client/assets/{index-DWOvEgKr.js → index-CHKi_s_a.js} +1 -1
  71. package/dist/client/assets/{index-DvxSs9Po.js → index-D-RCnwJQ.js} +1 -1
  72. package/dist/client/assets/{index-CNolBSVE.js → index-D34n6J5J.js} +22 -22
  73. package/dist/client/assets/{index-DbNFtLRR.js → index-DBclwIf_.js} +3 -3
  74. package/dist/client/assets/{index-Di0ylaLI.js → index-DnJZfbsP.js} +3 -3
  75. package/dist/client/assets/{index-uSGXbgq4.js → index-FnxI6OGR.js} +1 -1
  76. package/dist/client/assets/{index-BWvVdWtP.js → index-e3AFJ_dX.js} +1 -1
  77. package/dist/client/assets/{index-gfedyrlZ.js → index-qXZ0t4XR.js} +16 -16
  78. package/dist/client/assets/{index-PT6VRyBL.js → index-zDq2Zqio.js} +1 -1
  79. package/dist/client/assets/{infiniteQueryObserver-B8q-YDXm.js → infiniteQueryObserver-1_M-sq16.js} +1 -1
  80. package/dist/client/assets/{input-B8j75XZ_.js → input-urtyHxks.js} +1 -1
  81. package/dist/client/assets/{integration-icon-De50Mm7k.js → integration-icon-Cdkk9YPE.js} +1 -1
  82. package/dist/client/assets/{label-KH35YAYU.js → label-Bt4h_QUk.js} +1 -1
  83. package/dist/client/assets/{layout-E2py7rYQ.js → layout-B5SDe6IW.js} +1 -1
  84. package/dist/client/assets/{login-agOBj-o2.js → login-7zFMf3C1.js} +1 -1
  85. package/dist/client/assets/members-Dy7hWkQ8.js +3 -0
  86. package/dist/client/assets/{monaco-editor-CzAT2DWn.js → monaco-editor-lveN-AoO.js} +1 -1
  87. package/dist/client/assets/{monitoring-stats-row-k0blCMgl.js → monitoring-stats-row-D3x0_phM.js} +1 -1
  88. package/dist/client/assets/{oauth-callback-ViEW-3g2.js → oauth-callback-BJALVgfT.js} +1 -1
  89. package/dist/client/assets/{oauth-callback-ai-provider-cSZy9hW7.js → oauth-callback-ai-provider-o8Hfz-wL.js} +1 -1
  90. package/dist/client/assets/{onboarding-CquRdW5q.js → onboarding-DlI3PsIA.js} +1 -1
  91. package/dist/client/assets/{org-layout-DY9vqUg9.js → org-layout-DPzm8vzJ.js} +1 -1
  92. package/dist/client/assets/{org-plugin-layout-HyePbhDN.js → org-plugin-layout-DB72TzxO.js} +1 -1
  93. package/dist/client/assets/{plugin-empty-state-tSKwN8yW.js → plugin-empty-state-BzyxU1IF.js} +1 -1
  94. package/dist/client/assets/{plugin-header-CgMEgROC.js → plugin-header-hJH6-4Nr.js} +1 -1
  95. package/dist/client/assets/{plugin-layout-B0f9qTk_.js → plugin-layout-l_MDXBYc.js} +1 -1
  96. package/dist/client/assets/{popover-BK6PL-XB.js → popover-j_PzMtdY.js} +1 -1
  97. package/dist/client/assets/{profile-C_xBhvj7.js → profile-lf_QL3Ye.js} +1 -1
  98. package/dist/client/assets/project-app-view-DuFzKNXE.js +1 -0
  99. package/dist/client/assets/registry-D3m_WKwq.js +2 -0
  100. package/dist/client/assets/{registry-layout-7nSgT8Ua.js → registry-layout-DRb_iR_v.js} +3 -3
  101. package/dist/client/assets/{required-auth-layout-D-NWWr5P.js → required-auth-layout-C2o7AZ4K.js} +1 -1
  102. package/dist/client/assets/{reset-password-C7m0cAdE.js → reset-password-DTEY3I_i.js} +1 -1
  103. package/dist/client/assets/roles-DW1_Kn6r.js +1 -0
  104. package/dist/client/assets/{scroll-area-Da2hNrch.js → scroll-area-BebfgLv6.js} +1 -1
  105. package/dist/client/assets/{search-input-BZmdDW7A.js → search-input-dmuYGYsk.js} +1 -1
  106. package/dist/client/assets/{select-JPYD20it.js → select-CePxsPeP.js} +1 -1
  107. package/dist/client/assets/{select-model-DMVU-2Gx.js → select-model-QQ7yjZl9.js} +2 -2
  108. package/dist/client/assets/settings-layout-Cd1tdTnr.js +1 -0
  109. package/dist/client/assets/{shell-layout-DkN8Q_tp.js → shell-layout-BE22YA40.js} +1 -1
  110. package/dist/client/assets/{skeleton-DPqifXUx.js → skeleton-C9NsUzIb.js} +1 -1
  111. package/dist/client/assets/{sso-BdiVJFM8.js → sso-QSGlyP2n.js} +1 -1
  112. package/dist/client/assets/{store-D9lb1Gph.js → store-BB9yi6PD.js} +1 -1
  113. package/dist/client/assets/store-registry-BSp-W72J.js +2 -0
  114. package/dist/client/assets/{switch-CVtXvreH.js → switch-VBeL01bM.js} +1 -1
  115. package/dist/client/assets/{table-C-JSrHQJ.js → table-CQMW-Toa.js} +1 -1
  116. package/dist/client/assets/{tabs-DtgWLQ6i.js → tabs-DOoLL5wa.js} +1 -1
  117. package/dist/client/assets/{task-status-DTuLfGhm.js → task-status-vvRP86lz.js} +7 -7
  118. package/dist/client/assets/{textarea-p_oNKH-r.js → textarea-Ie4QUdo5.js} +1 -1
  119. package/dist/client/assets/{toggle-group-B6-etMEh.js → toggle-group-C077Smww.js} +1 -1
  120. package/dist/client/assets/tools-list-UnPsMGhr.js +1 -0
  121. package/dist/client/assets/{types-BP7V6N8z.js → types-D4PfKOFF.js} +1 -1
  122. package/dist/client/assets/{use-ai-providers-oN1cKhaJ.js → use-ai-providers-DHuVj1kn.js} +1 -1
  123. package/dist/client/assets/{use-collections-BTXUmiDi.js → use-collections-DRlHpXQL.js} +1 -1
  124. package/dist/client/assets/{use-connection-DIvNoxL5.js → use-connection-Cif-LY0f.js} +1 -1
  125. package/dist/client/assets/{use-copy-D8L6lrfC.js → use-copy-uiSuMvtc.js} +1 -1
  126. package/dist/client/assets/{use-create-virtual-mcp-DUKkySGS.js → use-create-virtual-mcp-CBpw3zXA.js} +1 -1
  127. package/dist/client/assets/{use-decopilot-events-BRc3SX00.js → use-decopilot-events-Dpt6CcIN.js} +1 -1
  128. package/dist/client/assets/{use-delete-connection-IDpzSpRp.js → use-delete-connection-BZmW9ZAz.js} +1 -1
  129. package/dist/client/assets/{use-infinite-scroll-WKRKMI2J.js → use-infinite-scroll-CWlV3gJA.js} +1 -1
  130. package/dist/client/assets/{use-list-state-Dyh2zhb9.js → use-list-state-BJZWeXjY.js} +1 -1
  131. package/dist/client/assets/{use-mcp-tools-tZ37UBLL.js → use-mcp-tools-BYVtg7WH.js} +1 -1
  132. package/dist/client/assets/{use-members-AvAHjkiq.js → use-members-M_p47epa.js} +1 -1
  133. package/dist/client/assets/{use-mobile-Ctb5URy7.js → use-mobile-CxvYCzu9.js} +1 -1
  134. package/dist/client/assets/{use-navigate-to-agent-CLfSU3ru.js → use-navigate-to-agent-CFIKBq0L.js} +1 -1
  135. package/dist/client/assets/{use-org-sso-CmuM4ieo.js → use-org-sso-CACnH9GQ.js} +1 -1
  136. package/dist/client/assets/use-organization-roles-o4lVU0iD.js +1 -0
  137. package/dist/client/assets/{use-organization-settings-dQpmtQzl.js → use-organization-settings-BD9CIHH5.js} +1 -1
  138. package/dist/client/assets/{use-registry-connections-CP0QI7iA.js → use-registry-connections-DR_etJ2H.js} +1 -1
  139. package/dist/client/assets/{use-status-sounds-CObwI0DY.js → use-status-sounds-Ce7WandB.js} +1 -1
  140. package/dist/client/assets/{use-tasks-7rX1bsHL.js → use-tasks-Dpp1DK1f.js} +1 -1
  141. package/dist/client/assets/{use-view-mode-BkbloGkm.js → use-view-mode-CZPzVaxj.js} +1 -1
  142. package/dist/client/assets/{use-virtual-mcp-CDOk_IIy.js → use-virtual-mcp-0vHwLInn.js} +1 -1
  143. package/dist/client/assets/useInfiniteQuery-B4w-6TrV.js +1 -0
  144. package/dist/client/assets/useSuspenseInfiniteQuery-WURyRq6p.js +1 -0
  145. package/dist/client/assets/{user-lj8QRtGG.js → user-xj80BAo3.js} +1 -1
  146. package/dist/client/assets/{view-mode-toggle-BiPtlB_S.js → view-mode-toggle-D5CGwPOj.js} +1 -1
  147. package/dist/client/assets/workflow-CD_DiE5j.js +1 -0
  148. package/dist/client/assets/workflow-detail-CxWEb-ID.js +1 -0
  149. package/dist/client/index.html +2 -2
  150. package/dist/server/cli.js +2 -2
  151. package/dist/server/node_modules/figures/index.d.ts +279 -0
  152. package/dist/server/node_modules/figures/index.js +292 -0
  153. package/dist/server/node_modules/figures/license +9 -0
  154. package/dist/server/node_modules/figures/package.json +49 -0
  155. package/dist/server/node_modules/figures/readme.md +337 -0
  156. package/dist/server/node_modules/ink/build/ansi-tokenizer.d.ts +38 -0
  157. package/dist/server/node_modules/ink/build/ansi-tokenizer.js +316 -0
  158. package/dist/server/node_modules/ink/build/ansi-tokenizer.js.map +1 -0
  159. package/dist/server/node_modules/ink/build/apply-styles.js +175 -0
  160. package/dist/server/node_modules/ink/build/build-layout.js +77 -0
  161. package/dist/server/node_modules/ink/build/calculate-wrapped-text.js +53 -0
  162. package/dist/server/node_modules/ink/build/colorize.d.ts +3 -0
  163. package/dist/server/node_modules/ink/build/colorize.js +48 -0
  164. package/dist/server/node_modules/ink/build/colorize.js.map +1 -0
  165. package/dist/server/node_modules/ink/build/components/AccessibilityContext.d.ts +3 -0
  166. package/dist/server/node_modules/ink/build/components/AccessibilityContext.js +5 -0
  167. package/dist/server/node_modules/ink/build/components/AccessibilityContext.js.map +1 -0
  168. package/dist/server/node_modules/ink/build/components/App.d.ts +18 -0
  169. package/dist/server/node_modules/ink/build/components/App.js +351 -0
  170. package/dist/server/node_modules/ink/build/components/App.js.map +1 -0
  171. package/dist/server/node_modules/ink/build/components/AppContext.d.ts +15 -0
  172. package/dist/server/node_modules/ink/build/components/AppContext.js +11 -0
  173. package/dist/server/node_modules/ink/build/components/AppContext.js.map +1 -0
  174. package/dist/server/node_modules/ink/build/components/BackgroundContext.d.ts +4 -0
  175. package/dist/server/node_modules/ink/build/components/BackgroundContext.js +3 -0
  176. package/dist/server/node_modules/ink/build/components/BackgroundContext.js.map +1 -0
  177. package/dist/server/node_modules/ink/build/components/Box.d.ts +117 -0
  178. package/dist/server/node_modules/ink/build/components/Box.js +34 -0
  179. package/dist/server/node_modules/ink/build/components/Box.js.map +1 -0
  180. package/dist/server/node_modules/ink/build/components/Color.js +62 -0
  181. package/dist/server/node_modules/ink/build/components/Cursor.d.ts +83 -0
  182. package/dist/server/node_modules/ink/build/components/Cursor.js +53 -0
  183. package/dist/server/node_modules/ink/build/components/Cursor.js.map +1 -0
  184. package/dist/server/node_modules/ink/build/components/CursorContext.d.ts +11 -0
  185. package/dist/server/node_modules/ink/build/components/CursorContext.js +8 -0
  186. package/dist/server/node_modules/ink/build/components/CursorContext.js.map +1 -0
  187. package/dist/server/node_modules/ink/build/components/ErrorBoundary.d.ts +18 -0
  188. package/dist/server/node_modules/ink/build/components/ErrorBoundary.js +23 -0
  189. package/dist/server/node_modules/ink/build/components/ErrorBoundary.js.map +1 -0
  190. package/dist/server/node_modules/ink/build/components/ErrorOverview.d.ts +6 -0
  191. package/dist/server/node_modules/ink/build/components/ErrorOverview.js +84 -0
  192. package/dist/server/node_modules/ink/build/components/ErrorOverview.js.map +1 -0
  193. package/dist/server/node_modules/ink/build/components/FocusContext.d.ts +16 -0
  194. package/dist/server/node_modules/ink/build/components/FocusContext.js +17 -0
  195. package/dist/server/node_modules/ink/build/components/FocusContext.js.map +1 -0
  196. package/dist/server/node_modules/ink/build/components/Newline.d.ts +13 -0
  197. package/dist/server/node_modules/ink/build/components/Newline.js +8 -0
  198. package/dist/server/node_modules/ink/build/components/Newline.js.map +1 -0
  199. package/dist/server/node_modules/ink/build/components/Spacer.d.ts +7 -0
  200. package/dist/server/node_modules/ink/build/components/Spacer.js +11 -0
  201. package/dist/server/node_modules/ink/build/components/Spacer.js.map +1 -0
  202. package/dist/server/node_modules/ink/build/components/Static.d.ts +24 -0
  203. package/dist/server/node_modules/ink/build/components/Static.js +28 -0
  204. package/dist/server/node_modules/ink/build/components/Static.js.map +1 -0
  205. package/dist/server/node_modules/ink/build/components/StderrContext.d.ts +15 -0
  206. package/dist/server/node_modules/ink/build/components/StderrContext.js +13 -0
  207. package/dist/server/node_modules/ink/build/components/StderrContext.js.map +1 -0
  208. package/dist/server/node_modules/ink/build/components/StdinContext.d.ts +22 -0
  209. package/dist/server/node_modules/ink/build/components/StdinContext.js +19 -0
  210. package/dist/server/node_modules/ink/build/components/StdinContext.js.map +1 -0
  211. package/dist/server/node_modules/ink/build/components/StdoutContext.d.ts +15 -0
  212. package/dist/server/node_modules/ink/build/components/StdoutContext.js +13 -0
  213. package/dist/server/node_modules/ink/build/components/StdoutContext.js.map +1 -0
  214. package/dist/server/node_modules/ink/build/components/Text.d.ts +55 -0
  215. package/dist/server/node_modules/ink/build/components/Text.js +50 -0
  216. package/dist/server/node_modules/ink/build/components/Text.js.map +1 -0
  217. package/dist/server/node_modules/ink/build/components/Transform.d.ts +16 -0
  218. package/dist/server/node_modules/ink/build/components/Transform.js +15 -0
  219. package/dist/server/node_modules/ink/build/components/Transform.js.map +1 -0
  220. package/dist/server/node_modules/ink/build/cursor-helpers.d.ts +38 -0
  221. package/dist/server/node_modules/ink/build/cursor-helpers.js +56 -0
  222. package/dist/server/node_modules/ink/build/cursor-helpers.js.map +1 -0
  223. package/dist/server/node_modules/ink/build/devtools-window-polyfill.d.ts +1 -0
  224. package/dist/server/node_modules/ink/build/devtools-window-polyfill.js +65 -0
  225. package/dist/server/node_modules/ink/build/devtools-window-polyfill.js.map +1 -0
  226. package/dist/server/node_modules/ink/build/devtools.d.ts +1 -0
  227. package/dist/server/node_modules/ink/build/devtools.js +11 -0
  228. package/dist/server/node_modules/ink/build/devtools.js.map +1 -0
  229. package/dist/server/node_modules/ink/build/dom.d.ts +56 -0
  230. package/dist/server/node_modules/ink/build/dom.js +124 -0
  231. package/dist/server/node_modules/ink/build/dom.js.map +1 -0
  232. package/dist/server/node_modules/ink/build/experimental/apply-style.js +140 -0
  233. package/dist/server/node_modules/ink/build/experimental/dom.js +123 -0
  234. package/dist/server/node_modules/ink/build/experimental/output.js +91 -0
  235. package/dist/server/node_modules/ink/build/experimental/reconciler.js +141 -0
  236. package/dist/server/node_modules/ink/build/experimental/renderer.js +81 -0
  237. package/dist/server/node_modules/ink/build/get-max-width.d.ts +3 -0
  238. package/dist/server/node_modules/ink/build/get-max-width.js +10 -0
  239. package/dist/server/node_modules/ink/build/get-max-width.js.map +1 -0
  240. package/dist/server/node_modules/ink/build/hooks/use-app.d.ts +5 -0
  241. package/dist/server/node_modules/ink/build/hooks/use-app.js +8 -0
  242. package/dist/server/node_modules/ink/build/hooks/use-app.js.map +1 -0
  243. package/dist/server/node_modules/ink/build/hooks/use-cursor.d.ts +12 -0
  244. package/dist/server/node_modules/ink/build/hooks/use-cursor.js +29 -0
  245. package/dist/server/node_modules/ink/build/hooks/use-cursor.js.map +1 -0
  246. package/dist/server/node_modules/ink/build/hooks/use-focus-manager.d.ts +28 -0
  247. package/dist/server/node_modules/ink/build/hooks/use-focus-manager.js +17 -0
  248. package/dist/server/node_modules/ink/build/hooks/use-focus-manager.js.map +1 -0
  249. package/dist/server/node_modules/ink/build/hooks/use-focus.d.ts +29 -0
  250. package/dist/server/node_modules/ink/build/hooks/use-focus.js +42 -0
  251. package/dist/server/node_modules/ink/build/hooks/use-focus.js.map +1 -0
  252. package/dist/server/node_modules/ink/build/hooks/use-input.d.ts +131 -0
  253. package/dist/server/node_modules/ink/build/hooks/use-input.js +124 -0
  254. package/dist/server/node_modules/ink/build/hooks/use-input.js.map +1 -0
  255. package/dist/server/node_modules/ink/build/hooks/use-is-screen-reader-enabled.d.ts +5 -0
  256. package/dist/server/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js +11 -0
  257. package/dist/server/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js.map +1 -0
  258. package/dist/server/node_modules/ink/build/hooks/use-stderr.d.ts +5 -0
  259. package/dist/server/node_modules/ink/build/hooks/use-stderr.js +8 -0
  260. package/dist/server/node_modules/ink/build/hooks/use-stderr.js.map +1 -0
  261. package/dist/server/node_modules/ink/build/hooks/use-stdin.d.ts +5 -0
  262. package/dist/server/node_modules/ink/build/hooks/use-stdin.js +8 -0
  263. package/dist/server/node_modules/ink/build/hooks/use-stdin.js.map +1 -0
  264. package/dist/server/node_modules/ink/build/hooks/use-stdout.d.ts +5 -0
  265. package/dist/server/node_modules/ink/build/hooks/use-stdout.js +8 -0
  266. package/dist/server/node_modules/ink/build/hooks/use-stdout.js.map +1 -0
  267. package/dist/server/node_modules/ink/build/hooks/useInput.js +38 -0
  268. package/dist/server/node_modules/ink/build/index.d.ts +34 -0
  269. package/dist/server/node_modules/ink/build/index.js +20 -0
  270. package/dist/server/node_modules/ink/build/index.js.map +1 -0
  271. package/dist/server/node_modules/ink/build/ink.d.ts +90 -0
  272. package/dist/server/node_modules/ink/build/ink.js +637 -0
  273. package/dist/server/node_modules/ink/build/ink.js.map +1 -0
  274. package/dist/server/node_modules/ink/build/input-parser.d.ts +7 -0
  275. package/dist/server/node_modules/ink/build/input-parser.js +154 -0
  276. package/dist/server/node_modules/ink/build/input-parser.js.map +1 -0
  277. package/dist/server/node_modules/ink/build/instance.js +205 -0
  278. package/dist/server/node_modules/ink/build/instances.d.ts +3 -0
  279. package/dist/server/node_modules/ink/build/instances.js +8 -0
  280. package/dist/server/node_modules/ink/build/instances.js.map +1 -0
  281. package/dist/server/node_modules/ink/build/kitty-keyboard.d.ts +23 -0
  282. package/dist/server/node_modules/ink/build/kitty-keyboard.js +32 -0
  283. package/dist/server/node_modules/ink/build/kitty-keyboard.js.map +1 -0
  284. package/dist/server/node_modules/ink/build/layout.d.ts +7 -0
  285. package/dist/server/node_modules/ink/build/layout.js +33 -0
  286. package/dist/server/node_modules/ink/build/layout.js.map +1 -0
  287. package/dist/server/node_modules/ink/build/log-update.d.ts +19 -0
  288. package/dist/server/node_modules/ink/build/log-update.js +242 -0
  289. package/dist/server/node_modules/ink/build/log-update.js.map +1 -0
  290. package/dist/server/node_modules/ink/build/measure-element.d.ts +16 -0
  291. package/dist/server/node_modules/ink/build/measure-element.js +9 -0
  292. package/dist/server/node_modules/ink/build/measure-element.js.map +1 -0
  293. package/dist/server/node_modules/ink/build/measure-text.d.ts +6 -0
  294. package/dist/server/node_modules/ink/build/measure-text.js +21 -0
  295. package/dist/server/node_modules/ink/build/measure-text.js.map +1 -0
  296. package/dist/server/node_modules/ink/build/options.d.ts +52 -0
  297. package/dist/server/node_modules/ink/build/options.js +2 -0
  298. package/dist/server/node_modules/ink/build/options.js.map +1 -0
  299. package/dist/server/node_modules/ink/build/output.d.ts +35 -0
  300. package/dist/server/node_modules/ink/build/output.js +183 -0
  301. package/dist/server/node_modules/ink/build/output.js.map +1 -0
  302. package/dist/server/node_modules/ink/build/parse-keypress.d.ts +22 -0
  303. package/dist/server/node_modules/ink/build/parse-keypress.js +493 -0
  304. package/dist/server/node_modules/ink/build/parse-keypress.js.map +1 -0
  305. package/dist/server/node_modules/ink/build/reconciler.d.ts +4 -0
  306. package/dist/server/node_modules/ink/build/reconciler.js +274 -0
  307. package/dist/server/node_modules/ink/build/reconciler.js.map +1 -0
  308. package/dist/server/node_modules/ink/build/render-background.d.ts +4 -0
  309. package/dist/server/node_modules/ink/build/render-background.js +25 -0
  310. package/dist/server/node_modules/ink/build/render-background.js.map +1 -0
  311. package/dist/server/node_modules/ink/build/render-border.d.ts +4 -0
  312. package/dist/server/node_modules/ink/build/render-border.js +73 -0
  313. package/dist/server/node_modules/ink/build/render-border.js.map +1 -0
  314. package/dist/server/node_modules/ink/build/render-node-to-output.d.ts +14 -0
  315. package/dist/server/node_modules/ink/build/render-node-to-output.js +147 -0
  316. package/dist/server/node_modules/ink/build/render-node-to-output.js.map +1 -0
  317. package/dist/server/node_modules/ink/build/render-to-string.d.ts +38 -0
  318. package/dist/server/node_modules/ink/build/render-to-string.js +115 -0
  319. package/dist/server/node_modules/ink/build/render-to-string.js.map +1 -0
  320. package/dist/server/node_modules/ink/build/render.d.ts +121 -0
  321. package/dist/server/node_modules/ink/build/render.js +55 -0
  322. package/dist/server/node_modules/ink/build/render.js.map +1 -0
  323. package/dist/server/node_modules/ink/build/renderer.d.ts +8 -0
  324. package/dist/server/node_modules/ink/build/renderer.js +55 -0
  325. package/dist/server/node_modules/ink/build/renderer.js.map +1 -0
  326. package/dist/server/node_modules/ink/build/sanitize-ansi.d.ts +2 -0
  327. package/dist/server/node_modules/ink/build/sanitize-ansi.js +27 -0
  328. package/dist/server/node_modules/ink/build/sanitize-ansi.js.map +1 -0
  329. package/dist/server/node_modules/ink/build/screen-reader-update.d.ts +13 -0
  330. package/dist/server/node_modules/ink/build/screen-reader-update.js +38 -0
  331. package/dist/server/node_modules/ink/build/screen-reader-update.js.map +1 -0
  332. package/dist/server/node_modules/ink/build/squash-text-nodes.d.ts +3 -0
  333. package/dist/server/node_modules/ink/build/squash-text-nodes.js +36 -0
  334. package/dist/server/node_modules/ink/build/squash-text-nodes.js.map +1 -0
  335. package/dist/server/node_modules/ink/build/styles.d.ts +240 -0
  336. package/dist/server/node_modules/ink/build/styles.js +232 -0
  337. package/dist/server/node_modules/ink/build/styles.js.map +1 -0
  338. package/dist/server/node_modules/ink/build/utils.d.ts +2 -0
  339. package/dist/server/node_modules/ink/build/utils.js +4 -0
  340. package/dist/server/node_modules/ink/build/utils.js.map +1 -0
  341. package/dist/server/node_modules/ink/build/wrap-text.d.ts +3 -0
  342. package/dist/server/node_modules/ink/build/wrap-text.js +31 -0
  343. package/dist/server/node_modules/ink/build/wrap-text.js.map +1 -0
  344. package/dist/server/node_modules/ink/build/write-synchronized.d.ts +4 -0
  345. package/dist/server/node_modules/ink/build/write-synchronized.js +7 -0
  346. package/dist/server/node_modules/ink/build/write-synchronized.js.map +1 -0
  347. package/dist/server/node_modules/ink/license +10 -0
  348. package/dist/server/node_modules/ink/package.json +201 -0
  349. package/dist/server/node_modules/ink/readme.md +2636 -0
  350. package/dist/server/node_modules/onetime/index.d.ts +64 -0
  351. package/dist/server/node_modules/onetime/index.js +44 -0
  352. package/dist/server/node_modules/onetime/license +9 -0
  353. package/dist/server/node_modules/onetime/package.json +43 -0
  354. package/dist/server/node_modules/onetime/readme.md +94 -0
  355. package/dist/server/server.js +1 -1
  356. package/package.json +1 -1
  357. package/dist/client/assets/SearchMd-VdXbz8fL.js +0 -1
  358. package/dist/client/assets/XCircle-BiHPX6_R.js +0 -1
  359. package/dist/client/assets/agent-icon-DCE-D-qC.js +0 -1
  360. package/dist/client/assets/agents-list-8_yOp3iD.js +0 -1
  361. package/dist/client/assets/ai-providers-DxQNSEJT.js +0 -1
  362. package/dist/client/assets/automation-list-row-BWjwKsQ5.js +0 -1
  363. package/dist/client/assets/automations-D6LOd0hH.js +0 -1
  364. package/dist/client/assets/collection-detail-BTibo6D3.js +0 -1
  365. package/dist/client/assets/collection-display-button-CfjJ9SIP.js +0 -1
  366. package/dist/client/assets/collection-table-wrapper-B4l_6tOy.js +0 -1
  367. package/dist/client/assets/command-BPSv-8-5.js +0 -1
  368. package/dist/client/assets/connection-detail-DgKIsKao.js +0 -1
  369. package/dist/client/assets/connections-rM_I7gvv.js +0 -1
  370. package/dist/client/assets/dropdown-menu-DO26Q0bD.js +0 -1
  371. package/dist/client/assets/general-VnUbEBHT.js +0 -1
  372. package/dist/client/assets/index-DeSgX7LP.css +0 -1
  373. package/dist/client/assets/members-6PieW-Nu.js +0 -3
  374. package/dist/client/assets/project-app-view-EMrqjiux.js +0 -1
  375. package/dist/client/assets/registry-CYL2cMC0.js +0 -2
  376. package/dist/client/assets/settings-layout-hwviWS6Q.js +0 -1
  377. package/dist/client/assets/store-registry-DAeO63_G.js +0 -2
  378. package/dist/client/assets/tools-list-C0RCBhOc.js +0 -1
  379. package/dist/client/assets/useInfiniteQuery-Ci00Hw-m.js +0 -1
  380. package/dist/client/assets/workflow-BrBlpNSn.js +0 -1
  381. package/dist/client/assets/workflow-detail-NqGVn5hy.js +0 -1
@@ -0,0 +1 @@
1
+ import{e as ge,C as ke,j as s,B as pe,s as Ae,r as P,t as w,z as we}from"./index-D34n6J5J.js";import{D as U,e as Ce,d as ue,c as xe}from"./dropdown-menu-v2GifVOh.js";import{a as Pe}from"./Users03-DqYvPeZM.js";import{b as Te,G as Me,I as Oe,S as ze,L as Le,a as Ie}from"./github-repo-picker-DZqLC6FL.js";import{W as Ee,a as Ge}from"./constants-DDHDU3PV.js";import{u as Be,b as He}from"./use-virtual-mcp-0vHwLInn.js";import{P as ne}from"./index-zDq2Zqio.js";import{i as $e}from"./DotsVertical-Bp2tW8JI.js";import{a as Re}from"./Settings02-Dm9dFDqk.js";import{s as Fe}from"./Trash01-C6bAXG6g.js";import{A as ve,ag as Ve}from"./agent-icon-CyE6nkC1.js";import{u as be}from"./use-navigate-to-agent-CFIKBq0L.js";import{C as Ne}from"./card-CaekC2K0.js";import{f as We}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as Ke}from"./empty-state-BdQTFnZA.js";import{u as qe}from"./use-create-virtual-mcp-CBpw3zXA.js";import{c as Je,b as Qe,d as Ue,A as Xe,e as Ye,g as Ze,a as et,f as tt}from"./alert-dialog-CicrCOay.js";import{S as st}from"./search-input-dmuYGYsk.js";import{s as je}from"./Plus-oXFwCrYz.js";import"./ChevronDown-DGnjAtqs.js";import"./ChevronRight-DV9No7GF.js";import"./dialog-C4lREl-t.js";import"./X-i9zBn6Hn.js";import"./RefreshCcw01-B10mKiE2.js";import"./collection-search-Bo2bOvRn.js";import"./SearchMd-BRJBvWf4.js";import"./drawer-BTCEaGGQ.js";import"./use-mobile-CxvYCzu9.js";import"./integration-icon-Cdkk9YPE.js";import"./Container-B1nHZdmn.js";import"./use-connection-Cif-LY0f.js";import"./use-collections-DRlHpXQL.js";import"./use-mcp-tools-BYVtg7WH.js";import"./checkbox-DznLgPgR.js";import"./Lock01-DpPIS3K7.js";import"./extract-connection-data-CfXvFcGA.js";import"./constants-v4RUVkEN.js";import"./collections-DHmXATua.js";import"./AlertCircle-DTmaHldD.js";import"./Tool01-CKowkGsd.js";import"./XClose-BbIo6xHe.js";import"./ArrowNarrowLeft-DlPeFc4v.js";import"./XCircle-C1sJYG9R.js";import"./ZapSquare-DT93lGV4.js";import"./CheckCircle-DJ3lme5R.js";import"./ChevronUp-BkSgkwhO.js";import"./Star01-_IJK5Yjt.js";import"./Palette-CI8n49a8.js";import"./LinkExternal01-BBbCPDtX.js";import"./Sun-QqE1VnS_.js";import"./Play-DKFUTU3G.js";import"./Shield01-BZJVBd5S.js";import"./User01-C2-anwoO.js";import"./Zap-KmbRMccM.js";import"./differenceInSeconds-NQ4PDo0z.js";function _e(e){const t=ge.c(17),{onCreateFromScratch:i,onImportGitHub:g,onImportDeco:d,isCreating:o,align:j,side:f,showBetaBadge:p}=e,a=j===void 0?"end":j,[n]=ke();let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Pe,{size:14}),t[0]=u):u=t[0];let c;t[1]!==o||t[2]!==i?(c=s.jsxs(U,{disabled:o,onClick:i,children:[u,"Create from scratch"]}),t[1]=o,t[2]=i,t[3]=c):c=t[3];let r;t[4]!==g||t[5]!==n.experimental_vibecode||t[6]!==p?(r=n.experimental_vibecode&&s.jsxs(U,{onClick:g,children:[s.jsx(Te,{className:"size-3.5"}),"Import from GitHub",p&&s.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"})]}),t[4]=g,t[5]=n.experimental_vibecode,t[6]=p,t[7]=r):r=t[7];let x;t[8]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),t[8]=x):x=t[8];let m;t[9]!==d?(m=s.jsxs(U,{onClick:d,children:[x,"Import from deco.cx"]}),t[9]=d,t[10]=m):m=t[10];let _;return t[11]!==a||t[12]!==f||t[13]!==c||t[14]!==r||t[15]!==m?(_=s.jsxs(Ce,{side:f,align:a,className:"w-48",children:[c,r,m]}),t[11]=a,t[12]=f,t[13]=c,t[14]=r,t[15]=m,t[16]=_):_=t[16],_}function it(e){const t=ge.c(44),{project:i,onDeleteClick:g}=e,d=be();let o;t[0]!==d||t[1]!==i.id?(o=()=>d(i.id),t[0]=d,t[1]=i.id,t[2]=o):o=t[2];let j;t[3]!==i.title||t[4]!==o?(j=s.jsx("button",{type:"button",onClick:o,className:"absolute inset-0 z-0","aria-label":i.title}),t[3]=i.title,t[4]=o,t[5]=j):j=t[5];let f;t[6]!==i.icon||t[7]!==i.title?(f=s.jsx(ve,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),t[6]=i.icon,t[7]=i.title,t[8]=f):f=t[8];let p;t[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ue,{asChild:!0,children:s.jsx(pe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx($e,{size:20})})}),t[9]=p):p=t[9];let a;t[10]!==d||t[11]!==i.id?(a=()=>d(i.id,{search:{main:"settings"}}),t[10]=d,t[11]=i.id,t[12]=a):a=t[12];let n;t[13]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Re,{size:16}),t[13]=n):n=t[13];let u;t[14]!==a?(u=s.jsxs(U,{onClick:a,children:[n,"Settings"]}),t[14]=a,t[15]=u):u=t[15];let c;t[16]!==g?(c=g&&s.jsxs(U,{variant:"destructive",onClick:y=>{y.stopPropagation(),g(y)},children:[s.jsx(Fe,{size:16}),"Delete"]}),t[16]=g,t[17]=c):c=t[17];let r;t[18]!==u||t[19]!==c?(r=s.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:s.jsxs(xe,{children:[p,s.jsxs(Ce,{align:"end",children:[u,c]})]})}),t[18]=u,t[19]=c,t[20]=r):r=t[20];let x;t[21]!==f||t[22]!==r?(x=s.jsxs("div",{className:"flex items-start justify-between",children:[f,r]}),t[21]=f,t[22]=r,t[23]=x):x=t[23];let m;t[24]!==i.title?(m=s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),t[24]=i.title,t[25]=m):m=t[25];const _=i.description||"No description";let N;t[26]!==_?(N=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:_}),t[26]=_,t[27]=N):N=t[27];let v;t[28]!==m||t[29]!==N?(v=s.jsxs("div",{className:"flex flex-col gap-1",children:[m,N]}),t[28]=m,t[29]=N,t[30]=v):v=t[30];let D;t[31]!==x||t[32]!==v?(D=s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[x,v]}),t[31]=x,t[32]=v,t[33]=D):D=t[33];let b;t[34]!==i.updated_at?(b=We(new Date(i.updated_at),{addSuffix:!0}),t[34]=i.updated_at,t[35]=b):b=t[35];let S;t[36]!==b?(S=s.jsx("div",{className:"border-t border-border mt-auto",children:s.jsx("div",{className:"h-10 flex items-center px-4.5",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:b})})}),t[36]=b,t[37]=S):S=t[37];let h;t[38]!==D||t[39]!==S?(h=s.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[D,S]}),t[38]=D,t[39]=S,t[40]=h):h=t[40];let C;return t[41]!==h||t[42]!==j?(C=s.jsxs(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[j,h]}),t[41]=h,t[42]=j,t[43]=C):C=t[43],C}function ns(){const e=ge.c(80),{org:t}=Ae(),i=Be(),g=He(),d=be(),[o,j]=P.useState("");let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={navigateOnCreate:!0},e[0]=f):f=e[0];const{createVirtualMCP:p,isCreating:a}=qe(f),[n,u]=P.useState(null),[c,r]=P.useState(!1),[x,m]=P.useState(!1),[_,N]=P.useState(!1),[v,D]=P.useState(!1),[b,S]=P.useState(!1);let h,C,y,T,k,A,M,O,z;if(e[1]!==g||e[2]!==i||e[3]!==p||e[4]!==n||e[5]!==a||e[6]!==d||e[7]!==t||e[8]!==o){const Q=o.toLowerCase(),de=i.filter(l=>l.id!==t.id&&(l.title.toLowerCase().includes(Q)||l.description?.toLowerCase().includes(Q)));let te;e[18]!==i?(te=i.some(rt),e[18]=i,e[19]=te):te=e[19];const De=te,fe=Ee.filter(l=>(!o||l.title.toLowerCase().includes(Q))&&!(l.id==="studio-pack"&&De)),he=i.find(ot);k=i.find(lt);const Se=l=>{w("agents_list_template_clicked",{template_id:l}),l==="site-editor"?r(!0):l==="site-diagnostics"?he?d(he.id):N(!0):l==="lean-canvas"?k?d(k.id):S(!0):l==="studio-pack"&&D(!0)};let se;e[20]!==g||e[21]!==n?(se=async()=>{if(!n)return;const{id:l,title:ye}=n;u(null);try{await g.delete.mutateAsync(l),w("agent_deleted",{agent_id:l,source:"agents_list"}),we.success(`Deleted "${ye}"`)}catch{}},e[20]=g,e[21]=n,e[22]=se):se=e[22],T=se,y=ne,C=ne.Content,h=ne.Body;let ie;e[23]===Symbol.for("react.memo_cache_sentinel")?(ie=s.jsx(ne.Title,{children:"Agents"}),e[23]=ie):ie=e[23];let le;e[24]===Symbol.for("react.memo_cache_sentinel")?(le=l=>{l.key==="Escape"&&(j(""),l.target.blur())},e[24]=le):le=e[24];let K;e[25]!==o?(K=s.jsx(st,{value:o,onChange:j,placeholder:"Search for an agent...",className:"w-full md:w-[375px]",onKeyDown:le}),e[25]=o,e[26]=K):K=e[26];let oe;e[27]===Symbol.for("react.memo_cache_sentinel")?(oe=s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),e[27]=oe):oe=e[27];let q;e[28]!==p?(q=()=>{w("agent_create_clicked",{source:"agents_list",method:"scratch"}),p()},e[28]=p,e[29]=q):q=e[29];let re,ae;e[30]===Symbol.for("react.memo_cache_sentinel")?(re=()=>{w("agent_create_clicked",{source:"agents_list",method:"github"}),m(!0)},ae=()=>{w("agent_create_clicked",{source:"agents_list",method:"deco"}),r(!0)},e[30]=re,e[31]=ae):(re=e[30],ae=e[31]);let J;e[32]!==a||e[33]!==q?(J=s.jsxs(xe,{children:[oe,s.jsx(_e,{onCreateFromScratch:q,onImportGitHub:re,onImportDeco:ae,isCreating:a,align:"end"})]}),e[32]=a,e[33]=q,e[34]=J):J=e[34],e[35]!==J||e[36]!==K?(A=s.jsxs("div",{className:"flex flex-col gap-6",children:[ie,s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[K,J]})]}),e[35]=J,e[36]=K,e[37]=A):A=e[37],M=de.length===0&&fe.length===0&&s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(Ke,{image:s.jsx(Ve,{size:48,className:"text-muted-foreground"}),title:o?"No agents found":"No agents yet",description:o?`No agents match "${o}"`:"Create an agent to get started.",actions:!o&&s.jsxs(xe,{children:[s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),s.jsx(_e,{onCreateFromScratch:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),p()},onImportGitHub:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"github"}),m(!0)},onImportDeco:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),r(!0)},isCreating:a,align:"center",showBetaBadge:!0})]})})}),O=de.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:de.map(l=>s.jsx(it,{project:l,onDeleteClick:()=>u({id:l.id,title:l.title})},l.id))})]}),z=fe.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agent Templates"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:fe.map(l=>s.jsx(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50 cursor-pointer",onClick:()=>Se(l.id),children:s.jsx("div",{className:"flex flex-col flex-1",children:s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[s.jsx(ve,{icon:l.icon,name:l.title,size:"sm",className:"shrink-0 shadow-sm"}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Click to set up"})]})]})})},l.id))})]}),e[1]=g,e[2]=i,e[3]=p,e[4]=n,e[5]=a,e[6]=d,e[7]=t,e[8]=o,e[9]=h,e[10]=C,e[11]=y,e[12]=T,e[13]=k,e[14]=A,e[15]=M,e[16]=O,e[17]=z}else h=e[9],C=e[10],y=e[11],T=e[12],k=e[13],A=e[14],M=e[15],O=e[16],z=e[17];let L;e[38]!==h||e[39]!==A||e[40]!==M||e[41]!==O||e[42]!==z?(L=s.jsxs(h,{children:[A,M,O,z]}),e[38]=h,e[39]=A,e[40]=M,e[41]=O,e[42]=z,e[43]=L):L=e[43];let I;e[44]!==C||e[45]!==L?(I=s.jsx(C,{children:L}),e[44]=C,e[45]=L,e[46]=I):I=e[46];let E;e[47]!==x?(E=s.jsx(Me,{open:x,onOpenChange:m}),e[47]=x,e[48]=E):E=e[48];let G;e[49]!==c?(G=s.jsx(Oe,{open:c,onOpenChange:r}),e[49]=c,e[50]=G):G=e[50];let B;e[51]!==_?(B=s.jsx(ze,{open:_,onOpenChange:N}),e[51]=_,e[52]=B):B=e[52];let H;e[53]!==k||e[54]!==b?(H=s.jsx(Le,{open:b,onOpenChange:S,existingAgent:k}),e[53]=k,e[54]=b,e[55]=H):H=e[55];let $;e[56]!==v?($=s.jsx(Ie,{open:v,onOpenChange:D}),e[56]=v,e[57]=$):$=e[57];const ce=!!n;let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=Q=>!Q&&u(null),e[58]=X):X=e[58];let Y;e[59]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(Je,{children:"Delete Agent?"}),e[59]=Y):Y=e[59];const me=n?.title;let R;e[60]!==me?(R=s.jsxs(Qe,{children:[Y,s.jsxs(Ue,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:me}),"."]})]}),e[60]=me,e[61]=R):R=e[61];let Z;e[62]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx(Xe,{children:"Cancel"}),e[62]=Z):Z=e[62];let F;e[63]!==T?(F=s.jsxs(Ye,{children:[Z,s.jsx(Ze,{onClick:T,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[63]=T,e[64]=F):F=e[64];let V;e[65]!==R||e[66]!==F?(V=s.jsxs(et,{children:[R,F]}),e[65]=R,e[66]=F,e[67]=V):V=e[67];let W;e[68]!==ce||e[69]!==V?(W=s.jsx(tt,{open:ce,onOpenChange:X,children:V}),e[68]=ce,e[69]=V,e[70]=W):W=e[70];let ee;return e[71]!==y||e[72]!==H||e[73]!==$||e[74]!==W||e[75]!==I||e[76]!==E||e[77]!==G||e[78]!==B?(ee=s.jsxs(y,{children:[I,E,G,B,H,$,W]}),e[71]=y,e[72]=H,e[73]=$,e[74]=W,e[75]=I,e[76]=E,e[77]=G,e[78]=B,e[79]=ee):ee=e[79],ee}function lt(e){return e.metadata?.type==="lean-canvas"}function ot(e){return e.metadata?.type==="site-diagnostics"}function rt(e){return Ge(e.id)}export{ns as default};
@@ -0,0 +1 @@
1
+ import{e as t,j as i}from"./index-D34n6J5J.js";import{O as m}from"./select-model-QQ7yjZl9.js";import"./checkbox-DznLgPgR.js";import"./ChevronDown-DGnjAtqs.js";import"./input-urtyHxks.js";import"./dialog-C4lREl-t.js";import"./X-i9zBn6Hn.js";import"./drawer-BTCEaGGQ.js";import"./use-mobile-CxvYCzu9.js";import"./select-CePxsPeP.js";import"./ChevronUp-BkSgkwhO.js";import"./skeleton-C9NsUzIb.js";import"./Tool01-CKowkGsd.js";import"./RefreshCcw01-B10mKiE2.js";import"./SearchMd-BRJBvWf4.js";import"./Settings02-Dm9dFDqk.js";import"./use-ai-providers-DHuVj1kn.js";import"./constants-DDHDU3PV.js";import"./chat-context-DP5UfIrn.js";import"./use-virtual-mcp-0vHwLInn.js";import"./use-collections-DRlHpXQL.js";import"./use-decopilot-events-Dpt6CcIN.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-Dpp1DK1f.js";import"./use-organization-settings-BD9CIHH5.js";import"./ai-providers-logos-CS4PCiqI.js";import"./Zap-KmbRMccM.js";import"./AlertCircle-DTmaHldD.js";import"./CheckCircle-DJ3lme5R.js";import"./Trash01-C6bAXG6g.js";import"./index-zDq2Zqio.js";import"./card-CaekC2K0.js";import"./switch-VBeL01bM.js";import"./toggle-group-C077Smww.js";import"./avatar-CF1bgUpD.js";import"./User01-C2-anwoO.js";import"./alert-dialog-CicrCOay.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./unwrap-tool-result-BYXdCQMg.js";function N(){const o=t.c(1);let r;return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(m,{}),o[0]=r):r=o[0],r}export{N as default};
@@ -1,7 +1,7 @@
1
- import{r as i,b6 as m,j as r,cJ as A,cH as w,cI as T,dt as O,be as M,ai as I,b$ as z,du as D,c0 as F,de as L,ao as G,cK as H,c1 as k,e as n,c as p,ba as v}from"./index-CNolBSVE.js";var x="AlertDialog",[V]=G(x,[D]),d=D(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(z,{...a,...t,modal:!0})};N.displayName=x;var W="AlertDialogTrigger",Y=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(H,{...o,...a,ref:e})});Y.displayName=W;var q="AlertDialogPortal",y=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(F,{...a,...t})};y.displayName=q;var B="AlertDialogOverlay",_=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(k,{...o,...a,ref:e})});_.displayName=B;var f="AlertDialogContent",[J,K]=V(f),Q=L("AlertDialogContent"),j=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=i.useRef(null),P=m(e,c),u=i.useRef(null);return r.jsx(O,{contentName:f,titleName:b,docsSlug:"alert-dialog",children:r.jsx(J,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[r.jsx(Q,{children:a}),r.jsx(X,{contentRef:c})]})})})});j.displayName=f;var b="AlertDialogTitle",h=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(w,{...o,...a,ref:e})});h.displayName=b;var E="AlertDialogDescription",R=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(T,{...o,...a,ref:e})});R.displayName=E;var U="AlertDialogAction",$=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});$.displayName=U;var C="AlertDialogCancel",S=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K(C,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});S.displayName=C;var X=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
1
+ import{r as i,b6 as m,j as r,cJ as A,cH as w,cI as T,dt as O,be as M,ai as I,bZ as z,du as D,b_ as F,de as L,ao as G,cK as H,b$ as k,e as n,c as p,ba as v}from"./index-D34n6J5J.js";var x="AlertDialog",[V]=G(x,[D]),d=D(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(z,{...a,...t,modal:!0})};N.displayName=x;var W="AlertDialogTrigger",Y=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(H,{...o,...a,ref:e})});Y.displayName=W;var q="AlertDialogPortal",y=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(F,{...a,...t})};y.displayName=q;var B="AlertDialogOverlay",_=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(k,{...o,...a,ref:e})});_.displayName=B;var f="AlertDialogContent",[J,K]=V(f),Z=L("AlertDialogContent"),b=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=i.useRef(null),P=m(e,c),u=i.useRef(null);return r.jsx(O,{contentName:f,titleName:j,docsSlug:"alert-dialog",children:r.jsx(J,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[r.jsx(Z,{children:a}),r.jsx(U,{contentRef:c})]})})})});b.displayName=f;var j="AlertDialogTitle",h=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(w,{...o,...a,ref:e})});h.displayName=j;var E="AlertDialogDescription",R=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(T,{...o,...a,ref:e})});R.displayName=E;var Q="AlertDialogAction",$=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});$.displayName=Q;var C="AlertDialogCancel",S=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K(C,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});S.displayName=C;var U=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
2
2
 
3
3
  You can add a description to the \`${f}\` by passing a \`${E}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
4
 
5
5
  Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${f}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
6
6
 
7
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return i.useEffect(()=>{document.getElementById(l.current?.getAttribute("aria-describedby"))||console.warn(e)},[e,l]),null},Z=N,ee=y,te=_,ae=j,oe=$,le=S,se=h,re=R;function de(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(Z,{"data-slot":"alert-dialog",...t}),e[2]=t,e[3]=a):a=e[3],a}function ie(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(ee,{"data-slot":"alert-dialog-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function ne(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(te,{"data-slot":"alert-dialog-overlay",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function pe(l){const e=n.c(9);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(ne,{}),e[3]=o):o=e[3];let s;e[4]!==t?(s=p("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-lg duration-200 sm:max-w-lg",t),e[4]=t,e[5]=s):s=e[5];let c;return e[6]!==a||e[7]!==s?(c=r.jsxs(ie,{children:[o,r.jsx(ae,{"data-slot":"alert-dialog-content",className:s,...a})]}),e[6]=a,e[7]=s,e[8]=c):c=e[8],c}function fe(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx("div",{"data-slot":"alert-dialog-header",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function ge(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx("div",{"data-slot":"alert-dialog-footer",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function ue(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("text-lg font-semibold",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(se,{"data-slot":"alert-dialog-title",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function me(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("text-muted-foreground text-sm",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(re,{"data-slot":"alert-dialog-description",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function Ae(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p(v(),t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(oe,{className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function De(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p(v({variant:"outline"}),t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(le,{className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}export{De as A,pe as a,fe as b,ue as c,me as d,ge as e,de as f,Ae as g};
7
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return i.useEffect(()=>{document.getElementById(l.current?.getAttribute("aria-describedby"))||console.warn(e)},[e,l]),null},X=N,ee=y,te=_,ae=b,oe=$,le=S,se=h,re=R;function de(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(X,{"data-slot":"alert-dialog",...t}),e[2]=t,e[3]=a):a=e[3],a}function ie(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(ee,{"data-slot":"alert-dialog-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function ne(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(te,{"data-slot":"alert-dialog-overlay",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function pe(l){const e=n.c(9);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(ne,{}),e[3]=o):o=e[3];let s;e[4]!==t?(s=p("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-lg duration-200 sm:max-w-lg",t),e[4]=t,e[5]=s):s=e[5];let c;return e[6]!==a||e[7]!==s?(c=r.jsxs(ie,{children:[o,r.jsx(ae,{"data-slot":"alert-dialog-content",className:s,...a})]}),e[6]=a,e[7]=s,e[8]=c):c=e[8],c}function fe(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx("div",{"data-slot":"alert-dialog-header",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function ge(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx("div",{"data-slot":"alert-dialog-footer",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function ue(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("text-lg font-semibold",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(se,{"data-slot":"alert-dialog-title",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function me(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("text-muted-foreground text-sm",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(re,{"data-slot":"alert-dialog-description",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function Ae(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p(v(),t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(oe,{className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function De(l){const e=n.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p(v({variant:"outline"}),t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(le,{className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}export{De as A,pe as a,fe as b,ue as c,me as d,ge as e,de as f,Ae as g};
@@ -1 +1 @@
1
- import{e as l,g as m,j as t,A as f,S as h,h as x,i as r,k as p,N as u}from"./index-CNolBSVE.js";function d(){const e=l.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(u,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function g(){const e=l.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=m(a);if(n==="accept-invitation"){let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(f,{children:t.jsx(h,{})}),e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(x,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:"accept-invitation"})})}),e[2]=i):i=e[2];let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(t.Fragment,{children:[c,i,t.jsx(p,{children:t.jsx(d,{})})]}),e[3]=o):o=e[3],o}let s;return e[4]!==n?(s=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:n})}),e[4]=n,e[5]=s):s=e[5],s}export{g as default};
1
+ import{e as l,g as m,j as t,A as f,S as h,h as x,i as r,k as p,N as u}from"./index-D34n6J5J.js";function d(){const e=l.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(u,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function g(){const e=l.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=m(a);if(n==="accept-invitation"){let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(f,{children:t.jsx(h,{})}),e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(x,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:"accept-invitation"})})}),e[2]=i):i=e[2];let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(t.Fragment,{children:[c,i,t.jsx(p,{children:t.jsx(d,{})})]}),e[3]=o):o=e[3],o}let s;return e[4]!==n?(s=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:n})}),e[4]=n,e[5]=s):s=e[5],s}export{g as default};
@@ -0,0 +1 @@
1
+ import{e as P,s as q,K as k,n as G,o as U,a as K,z as L,r as M,c as Q,j as o,B}from"./index-D34n6J5J.js";import{b as V,d as H,e as Y,g as J,c as W,A as X,a as Z,f as ee}from"./alert-dialog-CicrCOay.js";import{d as te,c as ne,e as se,D as ie}from"./dropdown-menu-v2GifVOh.js";import{A as oe,N as re}from"./agent-icon-CyE6nkC1.js";import{i as ae}from"./DotsVertical-Bp2tW8JI.js";import{s as le}from"./Trash01-C6bAXG6g.js";import{i as ce}from"./Zap-KmbRMccM.js";import{a as ue}from"./use-virtual-mcp-0vHwLInn.js";import{S as $,u as z}from"./constants-DDHDU3PV.js";function me(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const n of t.params)e[n.name]={type:n.type,description:n.description,enum:n.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function Ee(t){const e=P.c(11),{org:n}=q(),s=t??$;let r;e[0]!==n.id||e[1]!==s?(r={connectionId:s,orgId:n.id},e[0]=n.id,e[1]=s,e[2]=r):r=e[2];const a=z(r);let i;e[3]!==t?(i=k.toolCall(t??"","TRIGGER_LIST",""),e[3]=t,e[4]=i):i=e[4];let u;e[5]!==a?(u=async()=>{const f=await a.callTool({name:"TRIGGER_LIST",arguments:{}});return(f.structuredContent??f).triggers.map(me)},e[5]=a,e[6]=u):u=e[6];const l=!!t;let d;return e[7]!==i||e[8]!==u||e[9]!==l?(d={queryKey:i,queryFn:u,enabled:l,staleTime:3e4},e[7]=i,e[8]=u,e[9]=l,e[10]=d):d=e[10],G(d)}function Se(t){const e=P.c(11),{org:n}=q();let s;e[0]!==n.id?(s={connectionId:$,orgId:n.id},e[0]=n.id,e[1]=s):s=e[1];const r=z(s);let a;e[2]!==n.id||e[3]!==t?(a=k.automations(n.id,t),e[2]=n.id,e[3]=t,e[4]=a):a=e[4];let i;e[5]!==r||e[6]!==t?(i=async()=>{const l=t!=null?{virtual_mcp_id:t}:{},d=await r.callTool({name:"AUTOMATION_LIST",arguments:l});return(d.structuredContent??d).automations},e[5]=r,e[6]=t,e[7]=i):i=e[7];let u;return e[8]!==a||e[9]!==i?(u={queryKey:a,queryFn:i,staleTime:1e4},e[8]=a,e[9]=i,e[10]=u):u=e[10],G(u)}function Oe(t){const e=P.c(12),{org:n}=q();let s;e[0]!==n.id?(s={connectionId:$,orgId:n.id},e[0]=n.id,e[1]=s):s=e[1];const r=z(s);let a;e[2]!==t||e[3]!==n.id?(a=k.automation(n.id,t),e[2]=t,e[3]=n.id,e[4]=a):a=e[4];let i;e[5]!==r||e[6]!==t?(i=async()=>{const d=await r.callTool({name:"AUTOMATION_GET",arguments:{id:t}});return(d.structuredContent??d).automation},e[5]=r,e[6]=t,e[7]=i):i=e[7];const u=!!t;let l;return e[8]!==a||e[9]!==i||e[10]!==u?(l={queryKey:a,queryFn:i,enabled:u,staleTime:1e4},e[8]=a,e[9]=i,e[10]=u,e[11]=l):l=e[11],G(l)}function we(t){return{name:"New Automation",agent:t?{id:t}:void 0,messages:[],models:{credentialId:"",thinking:{id:""}},temperature:.5,active:!0,virtual_mcp_id:t}}function de(){const t=P.c(54),{org:e}=q();let n;t[0]!==e.id?(n={connectionId:$,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const s=z(n),r=U();let a;t[2]!==e.id||t[3]!==r?(a=()=>r.invalidateQueries({queryKey:k.automationsAll(e.id)}),t[2]=e.id,t[3]=r,t[4]=a):a=t[4];const i=a;let u;t[5]!==e.id||t[6]!==r?(u=m=>r.invalidateQueries({queryKey:k.automation(e.id,m)}),t[5]=e.id,t[6]=r,t[7]=u):u=t[7];const l=u;let d;t[8]!==s?(d=async m=>{const c=await s.callTool({name:"AUTOMATION_CREATE",arguments:m});return c.structuredContent??c},t[8]=s,t[9]=d):d=t[9];let f;t[10]!==i?(f=()=>{i()},t[10]=i,t[11]=f):f=t[11];let b;t[12]!==d||t[13]!==f?(b={mutationFn:d,onSuccess:f,onError:pe},t[12]=d,t[13]=f,t[14]=b):b=t[14];const F=K(b);let D;t[15]!==s?(D=async m=>{const c=await s.callTool({name:"AUTOMATION_UPDATE",arguments:m});return c.structuredContent??c},t[15]=s,t[16]=D):D=t[16];let g;t[17]!==i||t[18]!==l?(g=(m,c)=>{i(),typeof c.id=="string"&&l(c.id)},t[17]=i,t[18]=l,t[19]=g):g=t[19];let S;t[20]!==D||t[21]!==g?(S={mutationFn:D,onSuccess:g,onError:ge},t[20]=D,t[21]=g,t[22]=S):S=t[22];const N=K(S);let p;t[23]!==s?(p=async m=>{const c=await s.callTool({name:"AUTOMATION_DELETE",arguments:{id:m}});return c.structuredContent??c},t[23]=s,t[24]=p):p=t[24];let x;t[25]!==i||t[26]!==e.id||t[27]!==r?(x=(m,c)=>{r.removeQueries({queryKey:k.automation(e.id,c)}),i()},t[25]=i,t[26]=e.id,t[27]=r,t[28]=x):x=t[28];let A;t[29]!==x||t[30]!==p?(A={mutationFn:p,onSuccess:x,onError:fe},t[29]=x,t[30]=p,t[31]=A):A=t[31];const v=K(A);let _;t[32]!==s?(_=async m=>{const c=await s.callTool({name:"AUTOMATION_TRIGGER_ADD",arguments:m});if(c.isError){const I=c.content?.[0]?.text??"Failed to add trigger";throw new Error(I)}return c.structuredContent??c},t[32]=s,t[33]=_):_=t[33];let y;t[34]!==i||t[35]!==l?(y=m=>{i(),l(m.automation_id)},t[34]=i,t[35]=l,t[36]=y):y=t[36];let E;t[37]!==_||t[38]!==y?(E={mutationFn:_,onSuccess:y},t[37]=_,t[38]=y,t[39]=E):E=t[39];const O=K(E);let h;t[40]!==s?(h=async m=>{const c=await s.callTool({name:"AUTOMATION_TRIGGER_REMOVE",arguments:{trigger_id:m.trigger_id}});return c.structuredContent??c},t[40]=s,t[41]=h):h=t[41];let T;t[42]!==i||t[43]!==l?(T=(m,c)=>{i(),l(c.automation_id)},t[42]=i,t[43]=l,t[44]=T):T=t[44];let j;t[45]!==h||t[46]!==T?(j={mutationFn:h,onSuccess:T},t[45]=h,t[46]=T,t[47]=j):j=t[47];const w=K(j);let C;return t[48]!==F||t[49]!==v||t[50]!==O||t[51]!==w||t[52]!==N?(C={create:F,update:N,remove:v,triggerAdd:O,triggerRemove:w},t[48]=F,t[49]=v,t[50]=O,t[51]=w,t[52]=N,t[53]=C):C=t[53],C}function fe(t){L.error(t instanceof Error?t.message:"Failed to delete automation")}function ge(t){L.error(t instanceof Error?t.message:"Failed to update automation")}function pe(t){L.error(t instanceof Error?t.message:"Failed to create automation")}function Fe(t){const e=P.c(51),{automation:n,showAgent:s,onClick:r}=t,{remove:a}=de(),[i,u]=M.useState(!1),l=ue(s?n.agent?.id??void 0:void 0);let d;e[0]!==n.id||e[1]!==a?(d=()=>{a.mutate(n.id),u(!1)},e[0]=n.id,e[1]=a,e[2]=d):d=e[2];const f=d;let b;e[3]!==r?(b=R=>{R.target===R.currentTarget&&(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),r())},e[3]=r,e[4]=b):b=e[4];const F=b,D=n.active&&n.trigger_count>0?"bg-emerald-500":"bg-muted-foreground/40";let g;e[5]!==D?(g=Q("inline-block size-2 rounded-full shrink-0",D),e[5]=D,e[6]=g):g=e[6];const S=n.active&&n.trigger_count>0?"Active":n.active?"No triggers configured":"Paused";let N;e[7]!==g||e[8]!==S?(N=o.jsx("span",{className:g,"aria-label":S}),e[7]=g,e[8]=S,e[9]=N):N=e[9];let p;e[10]!==l||e[11]!==s?(p=s&&l&&o.jsx(oe,{icon:l.icon??null,name:l.title,size:"xs",className:"shrink-0"}),e[10]=l,e[11]=s,e[12]=p):p=e[12];let x;e[13]!==n.name?(x=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:n.name}),e[13]=n.name,e[14]=x):x=e[14];let A;e[15]!==l||e[16]!==s?(A=s&&l&&o.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",l.title]}),e[15]=l,e[16]=s,e[17]=A):A=e[17];let v;e[18]!==x||e[19]!==A?(v=o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,A]}),e[18]=x,e[19]=A,e[20]=v):v=e[20];let _;e[21]!==n.nearest_next_run_at||e[22]!==n.trigger_count?(_=o.jsx(ye,{triggerCount:n.trigger_count,nextRunAt:n.nearest_next_run_at}),e[21]=n.nearest_next_run_at,e[22]=n.trigger_count,e[23]=_):_=e[23];let y;e[24]!==v||e[25]!==_?(y=o.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[v,_]}),e[24]=v,e[25]=_,e[26]=y):y=e[26];let E;e[27]===Symbol.for("react.memo_cache_sentinel")?(E=o.jsx(te,{asChild:!0,children:o.jsx(B,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:o.jsx(ae,{size:16})})}),e[27]=E):E=e[27];let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=o.jsx("div",{onClick:_e,onKeyDown:xe,role:"presentation",className:"shrink-0",children:o.jsxs(ne,{children:[E,o.jsx(se,{align:"end",children:o.jsxs(ie,{variant:"destructive",onClick:R=>{R.stopPropagation(),u(!0)},children:[o.jsx(le,{size:16}),"Delete"]})})]})}),e[28]=O):O=e[28];let h;e[29]!==F||e[30]!==r||e[31]!==y||e[32]!==N||e[33]!==p?(h=o.jsxs("div",{role:"button",tabIndex:0,onClick:r,onKeyDown:F,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[N,p,y,O]}),e[29]=F,e[30]=r,e[31]=y,e[32]=N,e[33]=p,e[34]=h):h=e[34];let T;e[35]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx(W,{children:"Delete automation?"}),e[35]=T):T=e[35];let j;e[36]!==n.name?(j=o.jsxs(V,{children:[T,o.jsxs(H,{children:["This removes"," ",o.jsx("span",{className:"font-medium text-foreground",children:n.name})," ","and all of its triggers. This action cannot be undone."]})]}),e[36]=n.name,e[37]=j):j=e[37];let w;e[38]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(X,{children:"Cancel"}),e[38]=w):w=e[38];let C;e[39]!==f||e[40]!==a.isPending?(C=o.jsxs(Y,{children:[w,o.jsx(J,{onClick:f,disabled:a.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[39]=f,e[40]=a.isPending,e[41]=C):C=e[41];let m;e[42]!==j||e[43]!==C?(m=o.jsxs(Z,{children:[j,C]}),e[42]=j,e[43]=C,e[44]=m):m=e[44];let c;e[45]!==i||e[46]!==m?(c=o.jsx(ee,{open:i,onOpenChange:u,children:m}),e[45]=i,e[46]=m,e[47]=c):c=e[47];let I;return e[48]!==h||e[49]!==c?(I=o.jsxs(o.Fragment,{children:[h,c]}),e[48]=h,e[49]=c,e[50]=I):I=e[50],I}function xe(t){return t.stopPropagation()}function _e(t){return t.stopPropagation()}function ye(t){const e=P.c(4),{triggerCount:n,nextRunAt:s}=t;if(n===0){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("span",{className:"text-xs text-muted-foreground",children:"No triggers configured"}),e[0]=a):a=e[0],a}let r;return e[1]!==s||e[2]!==n?(r=o.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:s?o.jsxs(o.Fragment,{children:[o.jsx(re,{size:12,className:"shrink-0"}),o.jsxs("span",{className:"truncate",children:["Next run ",new Date(s).toLocaleString()]})]}):o.jsxs(o.Fragment,{children:[o.jsx(ce,{size:12,className:"shrink-0"}),o.jsxs("span",{className:"truncate",children:[n," trigger",n===1?"":"s"]})]})}),e[1]=s,e[2]=n,e[3]=r):r=e[3],r}export{Fe as A,Ee as a,Oe as b,Se as c,we as d,de as u};
@@ -0,0 +1 @@
1
+ import{e as L,s as R,f as T,r as M,j as e,B as $,t as S}from"./index-D34n6J5J.js";import{s as O}from"./Plus-oXFwCrYz.js";import{i as _}from"./Zap-KmbRMccM.js";import{S as V}from"./search-input-dmuYGYsk.js";import{P as p}from"./index-zDq2Zqio.js";import{E as B}from"./empty-state-BdQTFnZA.js";import{c as q,A as D}from"./automation-list-row-B4Vfg4UC.js";import{u as F}from"./use-navigate-to-agent-CFIKBq0L.js";import{u as G}from"./use-virtual-mcp-0vHwLInn.js";import"./SearchMd-BRJBvWf4.js";import"./use-mobile-CxvYCzu9.js";import"./X-i9zBn6Hn.js";import"./alert-dialog-CicrCOay.js";import"./dropdown-menu-v2GifVOh.js";import"./ChevronDown-DGnjAtqs.js";import"./ChevronRight-DV9No7GF.js";import"./DotsVertical-Bp2tW8JI.js";import"./agent-icon-CyE6nkC1.js";import"./AlertCircle-DTmaHldD.js";import"./Tool01-CKowkGsd.js";import"./XClose-BbIo6xHe.js";import"./RefreshCcw01-B10mKiE2.js";import"./ArrowNarrowLeft-DlPeFc4v.js";import"./XCircle-C1sJYG9R.js";import"./ZapSquare-DT93lGV4.js";import"./Users03-DqYvPeZM.js";import"./CheckCircle-DJ3lme5R.js";import"./ChevronUp-BkSgkwhO.js";import"./Container-B1nHZdmn.js";import"./Star01-_IJK5Yjt.js";import"./Palette-CI8n49a8.js";import"./LinkExternal01-BBbCPDtX.js";import"./Lock01-DpPIS3K7.js";import"./Sun-QqE1VnS_.js";import"./Play-DKFUTU3G.js";import"./Settings02-Dm9dFDqk.js";import"./Shield01-BZJVBd5S.js";import"./Trash01-C6bAXG6g.js";import"./User01-C2-anwoO.js";import"./constants-DDHDU3PV.js";import"./use-collections-DRlHpXQL.js";function zt(){const t=L.c(18),{org:u}=R(),{data:y}=q(void 0),d=y===void 0?[]:y,b=G(),f=F(),g=T(),[x,k]=M.useState(""),h=x.toLowerCase(),E=new Map(b.map(H)),A=d.filter(o=>{if(!h||o.name.toLowerCase().includes(h))return!0;const n=o.agent?E.get(o.agent.id):void 0;return!!(n&&n.title.toLowerCase().includes(h))});let a;t[0]!==f?(a=(o,n)=>{n&&(S("automations_list_row_clicked",{automation_id:o,agent_id:n,source:"settings_automations"}),f(n,{search:{main:"automation:"+o}}))},t[0]=f,t[1]=a):a=t[1];const P=a;let m;t[2]!==g||t[3]!==u.slug?(m=()=>{S("automations_empty_state_browse_agents_clicked"),g({to:"/$org/settings/agents",params:{org:u.slug}})},t[2]=g,t[3]=u.slug,t[4]=m):m=t[4];const z=m,j=p,w=p,v=p;let c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c=e.jsx(p.Title,{children:"Automations"}),t[5]=c):c=t[5];const C=d.length>0&&e.jsx(V,{value:x,onChange:k,placeholder:"Search automations...",className:"w-full md:w-[375px]"});let s;t[6]!==C?(s=e.jsxs("div",{className:"flex flex-col gap-6",children:[c,C]}),t[6]=C,t[7]=s):s=t[7];const N=d.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(B,{image:e.jsx(_,{size:48,className:"text-muted-foreground"}),title:"No automations yet",description:"Automations are created per agent. Open an agent and add one from its Automations tab.",actions:e.jsxs($,{size:"sm",onClick:z,children:[e.jsx(O,{size:14}),"Browse agents"]})})}):A.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(B,{image:e.jsx(_,{size:48,className:"text-muted-foreground"}),title:"No automations found",description:`No automations match "${x}"`})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:A.map(o=>e.jsx(D,{automation:o,showAgent:!0,onClick:()=>P(o.id,o.agent?.id??null)},o.id))});let i;t[8]!==v.Body||t[9]!==s||t[10]!==N?(i=e.jsxs(v.Body,{children:[s,N]}),t[8]=v.Body,t[9]=s,t[10]=N,t[11]=i):i=t[11];let r;t[12]!==w.Content||t[13]!==i?(r=e.jsx(w.Content,{children:i}),t[12]=w.Content,t[13]=i,t[14]=r):r=t[14];let l;return t[15]!==j||t[16]!==r?(l=e.jsx(j,{children:r}),t[15]=j,t[16]=r,t[17]=l):l=t[17],l}function H(t){return[t.id,t]}export{zt as default};
@@ -1 +1 @@
1
- import{e as k,j as i,r as V,c as m,aX as S,cf as $,cg as O,ch as U}from"./index-CNolBSVE.js";import{s as L}from"./User01-DCiwOMBU.js";function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(U,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function T(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function _(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(O,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const R=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],D="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function W(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%R.length;return R[s]}const I=S("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),X=S("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),B=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function G(r){const e=k.c(35);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,[f,x]=V.useState(!1);let F;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],F=c;break e}F=t}const C=F;let z;e:{if(j){z=D;break e}if(typeof t=="string"){let c;e[11]!==t?(c=W(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=R[0]}const y=z;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const E=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=m(I({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==y||e[23]!==C||e[24]!==E||e[25]!==f||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:m("flex items-center justify-center w-full h-full",y),children:i.jsx(L,{size:B(h)})}):i.jsxs(i.Fragment,{children:[l&&!f&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:m(X({objectFit:u})),onError:()=>x(!0)}),(!l||f)&&i.jsx(_,{className:m(y,"rounded-none"),children:C})]}),e[22]=y,e[23]=C,e[24]=E,e[25]=f,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let A;return e[31]!==o||e[32]!==v||e[33]!==w?(A=i.jsx(M,{className:w,...o,children:v}),e[31]=o,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function H(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,f=h??"base";let x;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==f||e[16]!==l?(x=i.jsx(G,{shape:b,url:l,fallback:t,size:f,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=b,e[15]=f,e[16]=l,e[17]=x):x=e[17],x}H.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:m(I({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{H as A};
1
+ import{e as k,j as i,r as V,c as m,aX as S,cf as $,cg as O,ch as U}from"./index-D34n6J5J.js";import{s as L}from"./User01-C2-anwoO.js";function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(U,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function T(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function _(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(O,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const R=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],D="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function W(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%R.length;return R[s]}const I=S("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),X=S("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),B=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function G(r){const e=k.c(35);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,[f,x]=V.useState(!1);let F;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],F=c;break e}F=t}const C=F;let z;e:{if(j){z=D;break e}if(typeof t=="string"){let c;e[11]!==t?(c=W(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=R[0]}const y=z;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const E=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=m(I({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==y||e[23]!==C||e[24]!==E||e[25]!==f||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:m("flex items-center justify-center w-full h-full",y),children:i.jsx(L,{size:B(h)})}):i.jsxs(i.Fragment,{children:[l&&!f&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:m(X({objectFit:u})),onError:()=>x(!0)}),(!l||f)&&i.jsx(_,{className:m(y,"rounded-none"),children:C})]}),e[22]=y,e[23]=C,e[24]=E,e[25]=f,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let A;return e[31]!==o||e[32]!==v||e[33]!==w?(A=i.jsx(M,{className:w,...o,children:v}),e[31]=o,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function H(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,f=h??"base";let x;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==f||e[16]!==l?(x=i.jsx(G,{shape:b,url:l,fallback:t,size:f,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=b,e[15]=f,e[16]=l,e[17]=x):x=e[17],x}H.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:m(I({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{H as A};
@@ -1 +1 @@
1
- import{e as d,c as g,j as u,aY as l,aX as v}from"./index-CNolBSVE.js";const b=v("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function x(o){const e=d.c(12);let r,s,a,i;e[0]!==o?({className:r,variant:i,asChild:a,...s}=o,e[0]=o,e[1]=r,e[2]=s,e[3]=a,e[4]=i):(r=e[1],s=e[2],a=e[3],i=e[4]);const c=(a===void 0?!1:a)?l:"span";let t;e[5]!==r||e[6]!==i?(t=g(b({variant:i}),r),e[5]=r,e[6]=i,e[7]=t):t=e[7];let n;return e[8]!==c||e[9]!==s||e[10]!==t?(n=u.jsx(c,{"data-slot":"badge",className:t,...s}),e[8]=c,e[9]=s,e[10]=t,e[11]=n):n=e[11],n}export{x as B};
1
+ import{e as d,c as g,j as u,aY as l,aX as v}from"./index-D34n6J5J.js";const b=v("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function x(o){const e=d.c(12);let r,s,a,i;e[0]!==o?({className:r,variant:i,asChild:a,...s}=o,e[0]=o,e[1]=r,e[2]=s,e[3]=a,e[4]=i):(r=e[1],s=e[2],a=e[3],i=e[4]);const c=(a===void 0?!1:a)?l:"span";let t;e[5]!==r||e[6]!==i?(t=g(b({variant:i}),r),e[5]=r,e[6]=i,e[7]=t):t=e[7];let n;return e[8]!==c||e[9]!==s||e[10]!==t?(n=u.jsx(c,{"data-slot":"badge",className:t,...s}),e[8]=c,e[9]=s,e[10]=t,e[11]=n):n=e[11],n}export{x as B};
@@ -1 +1 @@
1
- import{e as $,a9 as le,s as ie,o as ce,K as ee,n as de,r as w,a as Q,j as s,B as Z,c as H,t as U,z as R}from"./index-CNolBSVE.js";import{S as me,u as fe}from"./constants-D8VkIs2c.js";import{t as ue,i as xe}from"./ChevronDown-BqFspEzt.js";import{i as re}from"./ChevronRight-DCsBjQ-n.js";import{t as ge,s as he,i as pe}from"./Star01-fuGmPeeu.js";import{n as ve}from"./LinkExternal01-XmkIm96u.js";import{s as te}from"./Plus-Bmk1thjl.js";import{s as be}from"./Trash01-BHBjIGXE.js";import{i as je}from"./X-BWV-b86T.js";import{i as ye}from"./Zap-K9sQXDlC.js";import{I as L}from"./input-B8j75XZ_.js";import{T as Ne}from"./textarea-p_oNKH-r.js";import{P as J}from"./index-PT6VRyBL.js";import{u as se}from"./unwrap-tool-result-BYXdCQMg.js";import"./use-mobile-Ctb5URy7.js";function V(n){const e=$.c(17),{title:t,children:i,onEdit:o,editing:g,onSave:a,onCancel:c,className:x}=n,b=g&&"ring-2 ring-ring/30";let d;e[0]!==x||e[1]!==b?(d=H("group relative rounded-2xl border border-border/60 bg-background p-5",b,x),e[0]=x,e[1]=b,e[2]=d):d=e[2];let h;e[3]!==t?(h=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),e[3]=t,e[4]=h):h=e[4];let m;e[5]!==g||e[6]!==c||e[7]!==o||e[8]!==a?(m=g?s.jsxs("div",{className:"flex gap-1",children:[s.jsx("button",{type:"button",onClick:c,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted hover:bg-muted-foreground/15",children:s.jsx(je,{size:13,className:"text-muted-foreground"})}),s.jsx("button",{type:"button",onClick:a,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary/10 hover:bg-primary/20",children:s.jsx(xe,{size:13,className:"text-primary"})})]}):o&&s.jsx("button",{type:"button",onClick:o,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted opacity-0 transition-opacity duration-150 hover:bg-muted-foreground/15 group-hover:opacity-100",children:s.jsx(pe,{size:13,className:"text-muted-foreground"})}),e[5]=g,e[6]=c,e[7]=o,e[8]=a,e[9]=m):m=e[9];let u;e[10]!==h||e[11]!==m?(u=s.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[h,m]}),e[10]=h,e[11]=m,e[12]=u):u=e[12];let p;return e[13]!==i||e[14]!==d||e[15]!==u?(p=s.jsxs("div",{className:d,children:[u,i]}),e[13]=i,e[14]=d,e[15]=u,e[16]=p):p=e[16],p}function _e(n){const e=$.c(25),{onExtract:t,isExtracting:i}=n,[o,g]=w.useState("");let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10",children:s.jsx(ye,{size:18,className:"text-primary"})}),e[0]=a):a=e[0];let c,x;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Auto-extract brand context"}),x=s.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Enter your website URL and we'll automatically extract your brand colors, fonts, logos, and company overview."}),e[1]=c,e[2]=x):(c=e[1],x=e[2]);let b;e[3]===Symbol.for("react.memo_cache_sentinel")?(b=r=>g(r.target.value),e[3]=b):b=e[3];let d;e[4]!==o||e[5]!==i||e[6]!==t?(d=r=>{r.key==="Enter"&&o.trim()&&!i&&t(o.trim())},e[4]=o,e[5]=i,e[6]=t,e[7]=d):d=e[7];let h;e[8]!==o||e[9]!==d?(h=s.jsx(L,{placeholder:"acme.com",value:o,onChange:b,className:"max-w-xs",onKeyDown:d}),e[8]=o,e[9]=d,e[10]=h):h=e[10];let m;e[11]!==o||e[12]!==i?(m=!o.trim()||i,e[11]=o,e[12]=i,e[13]=m):m=e[13];let u;e[14]!==o||e[15]!==t?(u=()=>t(o.trim()),e[14]=o,e[15]=t,e[16]=u):u=e[16];let p;e[17]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(he,{size:14}),e[17]=p):p=e[17];const j=i?"Extracting...":"Extract";let l;e[18]!==j||e[19]!==m||e[20]!==u?(l=s.jsxs(Z,{variant:"outline",disabled:m,onClick:u,children:[p,j]}),e[18]=j,e[19]=m,e[20]=u,e[21]=l):l=e[21];let v;return e[22]!==l||e[23]!==h?(v=s.jsx("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-5",children:s.jsxs("div",{className:"flex items-start gap-4",children:[a,s.jsxs("div",{className:"flex-1",children:[c,x,s.jsxs("div",{className:"mt-3 flex gap-2",children:[h,l]})]})]})}),e[22]=l,e[23]=h,e[24]=v):v=e[24],v}function ke(n){const e=$.c(24),{brand:t,onSave:i}=n,[o,g]=w.useState(!1),[a,c]=w.useState(t.name??""),[x,b]=w.useState(t.domain??""),[d,h]=w.useState(t.overview??"");let m;e[0]!==t.domain||e[1]!==t.name||e[2]!==t.overview?(m=()=>{c(t.name??""),b(t.domain??""),h(t.overview??""),g(!0)},e[0]=t.domain,e[1]=t.name,e[2]=t.overview,e[3]=m):m=e[3];const u=m;let p;e[4]!==x||e[5]!==a||e[6]!==i||e[7]!==d?(p=()=>{i({name:a,domain:x,overview:d}),g(!1)},e[4]=x,e[5]=a,e[6]=i,e[7]=d,e[8]=p):p=e[8];const j=p,l=!t.name&&!t.domain&&!t.overview;let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=()=>g(!1),e[9]=v):v=e[9];let r;e[10]!==t.domain||e[11]!==t.name||e[12]!==t.overview||e[13]!==x||e[14]!==o||e[15]!==l||e[16]!==a||e[17]!==d?(r=o?s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Company name"}),s.jsx(L,{value:a,onChange:y=>c(y.target.value),placeholder:"Acme Corp"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Domain"}),s.jsx(L,{value:x,onChange:y=>b(y.target.value),placeholder:"acme.com"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Overview"}),s.jsx(Ne,{value:d,onChange:y=>h(y.target.value),placeholder:"Brief description of what the company does...",rows:3})]})]}):l?s.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No company info yet. Click edit to add your company name, domain, and overview."}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[s.jsx("h2",{className:"text-xl font-semibold leading-tight text-foreground",children:t.name}),t.domain&&s.jsxs("a",{href:`https://${t.domain}`,target:"_blank",rel:"noopener noreferrer",className:"mt-0.5 flex shrink-0 items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[s.jsx(ve,{size:11}),t.domain]})]}),t.overview&&s.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:t.overview})]}),e[10]=t.domain,e[11]=t.name,e[12]=t.overview,e[13]=x,e[14]=o,e[15]=l,e[16]=a,e[17]=d,e[18]=r):r=e[18];let f;return e[19]!==o||e[20]!==j||e[21]!==u||e[22]!==r?(f=s.jsx(V,{title:"Company Overview",onEdit:u,editing:o,onSave:j,onCancel:v,children:r}),e[19]=o,e[20]=j,e[21]=u,e[22]=r,e[23]=f):f=e[23],f}function we(n){const e=$.c(24),{brand:t,onSave:i}=n,[o,g]=w.useState(!1),[a,c]=w.useState(t.logo??""),[x,b]=w.useState(t.favicon??""),[d,h]=w.useState(t.ogImage??"");let m;e[0]!==t.favicon||e[1]!==t.logo||e[2]!==t.ogImage?(m=()=>{c(t.logo??""),b(t.favicon??""),h(t.ogImage??""),g(!0)},e[0]=t.favicon,e[1]=t.logo,e[2]=t.ogImage,e[3]=m):m=e[3];const u=m;let p;e[4]!==x||e[5]!==a||e[6]!==d||e[7]!==i?(p=()=>{i({logo:a||null,favicon:x||null,ogImage:d||null}),g(!1)},e[4]=x,e[5]=a,e[6]=d,e[7]=i,e[8]=p):p=e[8];const j=p,l=t.logo||t.favicon||t.ogImage;let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=()=>g(!1),e[9]=v):v=e[9];let r;e[10]!==t.favicon||e[11]!==t.logo||e[12]!==t.ogImage||e[13]!==o||e[14]!==x||e[15]!==l||e[16]!==a||e[17]!==d?(r=o?s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Logo URL"}),s.jsx(L,{value:a,onChange:y=>c(y.target.value),placeholder:"https://..."})]}),s.jsxs("div",{children:[s.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Favicon URL"}),s.jsx(L,{value:x,onChange:y=>b(y.target.value),placeholder:"https://..."})]}),s.jsxs("div",{children:[s.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"OG Image URL"}),s.jsx(L,{value:d,onChange:y=>h(y.target.value),placeholder:"https://..."})]})]}):l?s.jsxs("div",{className:"flex gap-2",children:[t.logo&&s.jsx("div",{className:"flex h-16 w-24 shrink-0 items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:s.jsx("img",{src:t.logo,alt:"Logo",className:"h-full w-full object-contain p-2"})}),t.favicon&&s.jsx("div",{className:"flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:s.jsx("img",{src:t.favicon,alt:"Favicon",className:"h-8 w-8 object-contain"})}),t.ogImage&&s.jsx("div",{className:"h-16 flex-1 overflow-hidden rounded-xl",children:s.jsx("img",{src:t.ogImage,alt:"OG",className:"h-full w-full object-cover",loading:"lazy"})})]}):s.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No logos added yet. Click edit to add logo, favicon, and OG image URLs."}),e[10]=t.favicon,e[11]=t.logo,e[12]=t.ogImage,e[13]=o,e[14]=x,e[15]=l,e[16]=a,e[17]=d,e[18]=r):r=e[18];let f;return e[19]!==o||e[20]!==j||e[21]!==u||e[22]!==r?(f=s.jsx(V,{title:"Logos & Images",onEdit:u,editing:o,onSave:j,onCancel:v,children:r}),e[19]=o,e[20]=j,e[21]=u,e[22]=r,e[23]=f):f=e[23],f}const ne=[{key:"heading",label:"Headings"},{key:"body",label:"Body"},{key:"code",label:"Code"}];function Ce(n){const e=$.c(20),{brand:t,onSave:i}=n,[o,g]=w.useState(!1);let a;e[0]!==t.fonts?(a=t.fonts??{},e[0]=t.fonts,e[1]=a):a=e[1];const[c,x]=w.useState(a);let b;e[2]!==t.fonts?(b=()=>{x(t.fonts??{}),g(!0)},e[2]=t.fonts,e[3]=b):b=e[3];const d=b;let h;e[4]!==c||e[5]!==i?(h=()=>{const r=Object.values(c).some(Se);i({fonts:r?c:null}),g(!1)},e[4]=c,e[5]=i,e[6]=h):h=e[6];const m=h;let u;e[7]!==t.fonts?(u=t.fonts&&Object.values(t.fonts).some(Ee),e[7]=t.fonts,e[8]=u):u=e[8];const p=u;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>g(!1),e[9]=j):j=e[9];let l;e[10]!==t.fonts||e[11]!==o||e[12]!==c||e[13]!==p?(l=o?s.jsx("div",{className:"space-y-2",children:ne.map(r=>{const{key:f,label:y}=r;return s.jsxs("div",{children:[s.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:y}),s.jsx(L,{value:c[f]??"",onChange:k=>x({...c,[f]:k.target.value}),placeholder:`Font family for ${y.toLowerCase()}`})]},f)})}):p?s.jsx("div",{className:"space-y-3",children:ne.filter(r=>{const{key:f}=r;return t.fonts?.[f]}).map(r=>{const{key:f,label:y}=r;return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"w-9 text-xl font-medium leading-none text-foreground",children:"Aa"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium leading-none text-foreground",children:t.fonts[f]}),s.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:y})]})]},f)})}):s.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No fonts defined. Click edit to add your brand fonts."}),e[10]=t.fonts,e[11]=o,e[12]=c,e[13]=p,e[14]=l):l=e[14];let v;return e[15]!==o||e[16]!==m||e[17]!==d||e[18]!==l?(v=s.jsx(V,{title:"Fonts",onEdit:d,editing:o,onSave:m,onCancel:j,children:l}),e[15]=o,e[16]=m,e[17]=d,e[18]=l,e[19]=v):v=e[19],v}function Ee(n){return n?.trim()}function Se(n){return n?.trim()}const oe=[{key:"primary",label:"Primary"},{key:"secondary",label:"Secondary"},{key:"accent",label:"Accent"},{key:"background",label:"Background"},{key:"foreground",label:"Foreground"}];function Te(n){const e=$.c(20),{brand:t,onSave:i}=n,[o,g]=w.useState(!1);let a;e[0]!==t.colors?(a=t.colors??{},e[0]=t.colors,e[1]=a):a=e[1];const[c,x]=w.useState(a);let b;e[2]!==t.colors?(b=()=>{x(t.colors??{}),g(!0)},e[2]=t.colors,e[3]=b):b=e[3];const d=b;let h;e[4]!==c||e[5]!==i?(h=()=>{const r=Object.values(c).some(Be);i({colors:r?c:null}),g(!1)},e[4]=c,e[5]=i,e[6]=h):h=e[6];const m=h;let u;e[7]!==t.colors?(u=t.colors&&Object.values(t.colors).some(Ae),e[7]=t.colors,e[8]=u):u=e[8];const p=u;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>g(!1),e[9]=j):j=e[9];let l;e[10]!==t.colors||e[11]!==c||e[12]!==o||e[13]!==p?(l=o?s.jsx("div",{className:"space-y-2",children:oe.map(r=>{const{key:f,label:y}=r;return s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"color",value:c[f]??"#000000",onChange:k=>x({...c,[f]:k.target.value}),className:"h-9 w-9 shrink-0 cursor-pointer rounded-lg border border-border bg-transparent p-0.5"}),s.jsx(L,{value:c[f]??"",onChange:k=>x({...c,[f]:k.target.value}),placeholder:"#000000",className:"w-28"}),s.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:y})]},f)})}):p?s.jsx("div",{className:"flex flex-wrap gap-4",children:oe.filter(r=>{const{key:f}=r;return t.colors?.[f]}).map(r=>{const{key:f,label:y}=r;return s.jsxs("div",{className:"flex flex-col items-center gap-2",children:[s.jsx("div",{className:"h-14 w-14 rounded-full shadow-sm",style:{backgroundColor:t.colors[f],border:t.colors[f]==="#FFFFFF"?"1px solid #e5e7eb":void 0}}),s.jsx("p",{className:"font-mono text-[10px] text-muted-foreground",children:t.colors[f]}),s.jsx("p",{className:"text-[10px] text-muted-foreground",children:y})]},f)})}):s.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No colors defined. Click edit to add your brand palette."}),e[10]=t.colors,e[11]=c,e[12]=o,e[13]=p,e[14]=l):l=e[14];let v;return e[15]!==o||e[16]!==m||e[17]!==d||e[18]!==l?(v=s.jsx(V,{title:"Colors",onEdit:d,editing:o,onSave:m,onCancel:j,children:l}),e[15]=o,e[16]=m,e[17]=d,e[18]=l,e[19]=v):v=e[19],v}function Ae(n){return n?.trim()}function Be(n){return n?.trim()}function ae(n){const e=$.c(91),{brand:t,client:i,onChanged:o,archived:g}=n,[a,c]=w.useState(!1);let x;e[0]!==t.colors||e[1]!==t.domain||e[2]!==t.favicon||e[3]!==t.fonts||e[4]!==t.id||e[5]!==t.images||e[6]!==t.logo||e[7]!==t.name||e[8]!==t.ogImage||e[9]!==t.overview||e[10]!==i?(x=async N=>{const W={id:t.id,name:N.name??t.name??"",domain:N.domain??t.domain??"",overview:N.overview??t.overview??"",logo:"logo"in N?N.logo:t.logo,favicon:"favicon"in N?N.favicon:t.favicon,ogImage:"ogImage"in N?N.ogImage:t.ogImage,fonts:"fonts"in N?N.fonts:t.fonts,colors:"colors"in N?N.colors:t.colors,images:"images"in N?N.images:t.images};await i.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:W})},e[0]=t.colors,e[1]=t.domain,e[2]=t.favicon,e[3]=t.fonts,e[4]=t.id,e[5]=t.images,e[6]=t.logo,e[7]=t.name,e[8]=t.ogImage,e[9]=t.overview,e[10]=i,e[11]=x):x=e[11];let b;e[12]!==t.id||e[13]!==o?(b=(N,W)=>{U("brand_updated",{brand_id:t.id,fields:Object.keys(W)}),o(),R.success("Brand context saved")},e[12]=t.id,e[13]=o,e[14]=b):b=e[14];let d;e[15]!==x||e[16]!==b?(d={mutationFn:x,onSuccess:b,onError:$e},e[15]=x,e[16]=b,e[17]=d):d=e[17];const{mutate:h}=Q(d);let m;e[18]!==g||e[19]!==t.id||e[20]!==i?(m=async()=>{g?await i.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:{id:t.id,archivedAt:null}}):await i.callTool({name:"BRAND_CONTEXT_DELETE",arguments:{id:t.id}})},e[18]=g,e[19]=t.id,e[20]=i,e[21]=m):m=e[21];let u;e[22]!==g||e[23]!==t.id||e[24]!==o?(u=()=>{U(g?"brand_restored":"brand_archived",{brand_id:t.id}),o(),R.success(g?"Brand restored":"Brand archived")},e[22]=g,e[23]=t.id,e[24]=o,e[25]=u):u=e[25];let p;e[26]!==g?(p=()=>R.error(g?"Failed to restore brand":"Failed to archive brand"),e[26]=g,e[27]=p):p=e[27];let j;e[28]!==m||e[29]!==u||e[30]!==p?(j={mutationFn:m,onSuccess:u,onError:p},e[28]=m,e[29]=u,e[30]=p,e[31]=j):j=e[31];const{mutate:l,isPending:v}=Q(j);let r;e[32]!==t.id||e[33]!==i?(r=async()=>{await i.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:{id:t.id,isDefault:!0}})},e[32]=t.id,e[33]=i,e[34]=r):r=e[34];let f;e[35]!==t.id||e[36]!==o?(f=()=>{U("brand_set_as_default",{brand_id:t.id}),o(),R.success("Set as default brand")},e[35]=t.id,e[36]=o,e[37]=f):f=e[37];let y;e[38]!==r||e[39]!==f?(y={mutationFn:r,onSuccess:f,onError:Re},e[38]=r,e[39]=f,e[40]=y):y=e[40];const{mutate:k}=Q(y),F=t.isDefault?"border-primary/30":"border-border/60";let C;e[41]!==F?(C=H("rounded-2xl border bg-background",F),e[41]=F,e[42]=C):C=e[42];let S;e[43]!==a?(S=()=>c(!a),e[43]=a,e[44]=S):S=e[44];let O;e[45]!==a?(O=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:a?s.jsx(ue,{size:14}):s.jsx(re,{size:14})}),e[45]=a,e[46]=O):O=e[46];let P;e[47]!==t.logo||e[48]!==t.name?(P=t.logo?s.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"6px 6px",backgroundPosition:"0 0, 3px 3px",backgroundColor:"#fff"},children:s.jsx("img",{src:t.logo,alt:"",className:"h-full w-full object-contain p-1",onError:Pe})}):s.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t.name?.charAt(0)?.toUpperCase()||"?"})}),e[47]=t.logo,e[48]=t.name,e[49]=P):P=e[49];const z=t.name||"Untitled Brand";let E;e[50]!==z?(E=s.jsx("span",{className:"text-sm font-medium text-foreground",children:z}),e[50]=z,e[51]=E):E=e[51];let T;e[52]!==t.domain?(T=t.domain&&s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.domain}),e[52]=t.domain,e[53]=T):T=e[53];let A;e[54]!==E||e[55]!==T?(A=s.jsxs("div",{className:"flex flex-1 flex-col items-start gap-0.5 overflow-hidden text-left",children:[E,T]}),e[54]=E,e[55]=T,e[56]=A):A=e[56];let B;e[57]!==t.colors?(B=t.colors&&Object.values(t.colors).some(Oe)&&s.jsx("div",{className:"flex shrink-0 gap-1",children:Object.entries(t.colors).filter(Fe).map(De)}),e[57]=t.colors,e[58]=B):B=e[58];let I;e[59]!==t.fonts?(I=t.fonts&&Object.values(t.fonts).some(Ie)&&s.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Object.values(t.fonts).filter(Boolean).join(", ")}),e[59]=t.fonts,e[60]=I):I=e[60];let _;e[61]!==g||e[62]!==t.isDefault||e[63]!==k?(_=!g&&s.jsx("span",{role:"button",tabIndex:0,className:H("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-opacity",t.isDefault?"opacity-100":"opacity-0 hover:bg-muted group-hover:opacity-100"),onClick:N=>{N.stopPropagation(),t.isDefault||k()},onKeyDown:N=>{N.key==="Enter"&&(N.stopPropagation(),t.isDefault||k())},title:t.isDefault?"Default brand":"Set as default",children:s.jsx(ge,{size:13,className:H(t.isDefault?"text-primary fill-primary":"text-muted-foreground")})}),e[61]=g,e[62]=t.isDefault,e[63]=k,e[64]=_):_=e[64];let D,X;e[65]!==l?(D=N=>{N.stopPropagation(),l()},X=N=>{N.key==="Enter"&&(N.stopPropagation(),l())},e[65]=l,e[66]=D,e[67]=X):(D=e[66],X=e[67]);let K;e[68]!==v?(K=v?s.jsx("span",{className:"text-[10px] text-muted-foreground",children:"..."}):s.jsx(be,{size:13,className:"text-muted-foreground"}),e[68]=v,e[69]=K):K=e[69];let q;e[70]!==D||e[71]!==X||e[72]!==K?(q=s.jsx("span",{role:"button",tabIndex:0,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg opacity-0 transition-opacity hover:bg-muted group-hover:opacity-100",onClick:D,onKeyDown:X,children:K}),e[70]=D,e[71]=X,e[72]=K,e[73]=q):q=e[73];let M;e[74]!==S||e[75]!==O||e[76]!==P||e[77]!==A||e[78]!==B||e[79]!==I||e[80]!==_||e[81]!==q?(M=s.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 p-5",onClick:S,children:[O,P,A,B,I,_,q]}),e[74]=S,e[75]=O,e[76]=P,e[77]=A,e[78]=B,e[79]=I,e[80]=_,e[81]=q,e[82]=M):M=e[82];let G;e[83]!==t||e[84]!==a||e[85]!==h?(G=a&&s.jsxs("div",{className:"space-y-3 px-5 pb-5",children:[s.jsx(ke,{brand:t,onSave:h}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(we,{brand:t,onSave:h}),s.jsx(Ce,{brand:t,onSave:h})]}),s.jsx(Te,{brand:t,onSave:h})]}),e[83]=t,e[84]=a,e[85]=h,e[86]=G):G=e[86];let Y;return e[87]!==C||e[88]!==M||e[89]!==G?(Y=s.jsxs("div",{className:C,children:[M,G]}),e[87]=C,e[88]=M,e[89]=G,e[90]=Y):Y=e[90],Y}function Ie(n){return n}function De(n){const[e,t]=n;return s.jsx("div",{className:"h-5 w-5 rounded-full border border-border/40",style:{backgroundColor:t},title:`${e}: ${t}`},e)}function Fe(n){const[,e]=n;return e}function Oe(n){return n}function Pe(n){n.target.style.display="none"}function Re(){return R.error("Failed to set default brand")}function $e(){return R.error("Failed to save brand context")}function ze(){const n=$.c(40),{brandExtractEnabled:e}=le(),{org:t}=ie();let i;n[0]!==t.id?(i={connectionId:me,orgId:t.id},n[0]=t.id,n[1]=i):i=n[1];const o=fe(i),g=ce();let a;n[2]!==t.id?(a=ee.brandContext(t.id),n[2]=t.id,n[3]=a):a=n[3];let c;n[4]!==o?(c=async()=>{const _=await o.callTool({name:"BRAND_CONTEXT_LIST",arguments:{includeArchived:!0}}),D=se(_);return Array.isArray(D?.items)?D.items:[]},n[4]=o,n[5]=c):c=n[5];let x;n[6]!==a||n[7]!==c?(x={queryKey:a,queryFn:c},n[6]=a,n[7]=c,n[8]=x):x=n[8];const{data:b}=de(x),d=b===void 0?[]:b,h=d.filter(Ke),m=d.filter(Xe),[u,p]=w.useState(!1);let j;n[9]!==t.id||n[10]!==g?(j=()=>g.invalidateQueries({queryKey:ee.brandContext(t.id),refetchType:"all"}),n[9]=t.id,n[10]=g,n[11]=j):j=n[11];const l=j;let v;n[12]!==o?(v=async()=>{await o.callTool({name:"BRAND_CONTEXT_CREATE",arguments:{name:"New Brand",domain:"example.com",overview:""}})},n[12]=o,n[13]=v):v=n[13];let r;n[14]!==l?(r=()=>{U("brand_created"),l(),R.success("Brand created")},n[14]=l,n[15]=r):r=n[15];let f;n[16]!==v||n[17]!==r?(f={mutationFn:v,onSuccess:r,onError:Ue},n[16]=v,n[17]=r,n[18]=f):f=n[18];const{mutate:y,isPending:k}=Q(f);let F;n[19]!==o?(F=async _=>{U("brand_extract_started",{domain:_});const D=await o.callTool({name:"BRAND_CONTEXT_EXTRACT",arguments:{domain:_}});se(D)},n[19]=o,n[20]=F):F=n[20];let C;n[21]!==l?(C=()=>{U("brand_extract_succeeded"),l(),R.success("Brand extracted successfully")},n[21]=l,n[22]=C):C=n[22];let S;n[23]!==C||n[24]!==F?(S={mutationFn:F,onSuccess:C,onError:Le},n[23]=C,n[24]=F,n[25]=S):S=n[25];const{mutate:O,isPending:P}=Q(S);let z;n[26]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsxs("div",{children:[s.jsx(J.Title,{children:"Brand Context"}),s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Define your brand profiles. Each brand is available as an MCP prompt for AI clients."})]}),n[26]=z):z=n[26];let E;n[27]!==y?(E=()=>y(),n[27]=y,n[28]=E):E=n[28];let T;n[29]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(te,{size:14}),n[29]=T):T=n[29];let A;n[30]!==k||n[31]!==E?(A=s.jsxs("div",{className:"flex items-center justify-between",children:[z,s.jsxs(Z,{variant:"outline",onClick:E,disabled:k,children:[T,"Add Brand"]})]}),n[30]=k,n[31]=E,n[32]=A):A=n[32];let B;n[33]!==e||n[34]!==O||n[35]!==P?(B=e&&s.jsx(_e,{onExtract:_=>O(_),isExtracting:P}),n[33]=e,n[34]=O,n[35]=P,n[36]=B):B=n[36];let I;return n[37]!==o||n[38]!==l?(I=_=>s.jsx(ae,{brand:_,client:o,onChanged:l},_.id),n[37]=o,n[38]=l,n[39]=I):I=n[39],s.jsx(J,{children:s.jsx(J.Content,{children:s.jsx(J.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[A,B,h.length===0&&m.length===0&&s.jsxs("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-8 text-center",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"No brands configured yet."}),s.jsxs(Z,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>y(),disabled:k,children:[s.jsx(te,{size:14}),"Add your first brand"]})]}),s.jsx("div",{className:"group space-y-3",children:h.map(I)}),m.length>0&&s.jsxs("div",{className:"space-y-3",children:[s.jsxs("button",{type:"button",onClick:()=>p(!u),className:"flex items-center gap-1.5 text-xs text-muted-foreground/60 transition-colors hover:text-muted-foreground",children:[s.jsx(re,{size:12,className:H("transition-transform",u&&"rotate-90")}),m.length," archived"]}),u&&s.jsx("div",{className:"space-y-3 opacity-60",children:m.map(_=>s.jsx(ae,{brand:_,client:o,onChanged:l,archived:!0},_.id))})]})]})})})})}function Le(n){U("brand_extract_failed",{error:n instanceof Error?n.message:"unknown"}),R.error(n instanceof Error?n.message:"Failed to extract brand")}function Ue(){return R.error("Failed to create brand")}function Xe(n){return n.archivedAt}function Ke(n){return!n.archivedAt}function at(){const n=$.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ze,{}),n[0]=e):e=n[0],e}export{at as default};
1
+ import{e as $,a9 as le,s as ie,o as ce,K as ee,n as de,r as w,a as Q,j as s,B as Z,c as H,t as U,z as R}from"./index-D34n6J5J.js";import{S as me,u as fe}from"./constants-DDHDU3PV.js";import{t as ue,i as xe}from"./ChevronDown-DGnjAtqs.js";import{i as re}from"./ChevronRight-DV9No7GF.js";import{t as ge,s as he,i as pe}from"./Star01-_IJK5Yjt.js";import{n as ve}from"./LinkExternal01-BBbCPDtX.js";import{s as te}from"./Plus-oXFwCrYz.js";import{s as be}from"./Trash01-C6bAXG6g.js";import{i as je}from"./X-i9zBn6Hn.js";import{i as ye}from"./Zap-KmbRMccM.js";import{I as L}from"./input-urtyHxks.js";import{T as Ne}from"./textarea-Ie4QUdo5.js";import{P as J}from"./index-zDq2Zqio.js";import{u as se}from"./unwrap-tool-result-BYXdCQMg.js";import"./use-mobile-CxvYCzu9.js";function V(n){const e=$.c(17),{title:t,children:i,onEdit:o,editing:g,onSave:a,onCancel:c,className:x}=n,b=g&&"ring-2 ring-ring/30";let d;e[0]!==x||e[1]!==b?(d=H("group relative rounded-2xl border border-border/60 bg-background p-5",b,x),e[0]=x,e[1]=b,e[2]=d):d=e[2];let h;e[3]!==t?(h=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),e[3]=t,e[4]=h):h=e[4];let m;e[5]!==g||e[6]!==c||e[7]!==o||e[8]!==a?(m=g?s.jsxs("div",{className:"flex gap-1",children:[s.jsx("button",{type:"button",onClick:c,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted hover:bg-muted-foreground/15",children:s.jsx(je,{size:13,className:"text-muted-foreground"})}),s.jsx("button",{type:"button",onClick:a,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary/10 hover:bg-primary/20",children:s.jsx(xe,{size:13,className:"text-primary"})})]}):o&&s.jsx("button",{type:"button",onClick:o,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted opacity-0 transition-opacity duration-150 hover:bg-muted-foreground/15 group-hover:opacity-100",children:s.jsx(pe,{size:13,className:"text-muted-foreground"})}),e[5]=g,e[6]=c,e[7]=o,e[8]=a,e[9]=m):m=e[9];let u;e[10]!==h||e[11]!==m?(u=s.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[h,m]}),e[10]=h,e[11]=m,e[12]=u):u=e[12];let p;return e[13]!==i||e[14]!==d||e[15]!==u?(p=s.jsxs("div",{className:d,children:[u,i]}),e[13]=i,e[14]=d,e[15]=u,e[16]=p):p=e[16],p}function _e(n){const e=$.c(25),{onExtract:t,isExtracting:i}=n,[o,g]=w.useState("");let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10",children:s.jsx(ye,{size:18,className:"text-primary"})}),e[0]=a):a=e[0];let c,x;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Auto-extract brand context"}),x=s.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Enter your website URL and we'll automatically extract your brand colors, fonts, logos, and company overview."}),e[1]=c,e[2]=x):(c=e[1],x=e[2]);let b;e[3]===Symbol.for("react.memo_cache_sentinel")?(b=r=>g(r.target.value),e[3]=b):b=e[3];let d;e[4]!==o||e[5]!==i||e[6]!==t?(d=r=>{r.key==="Enter"&&o.trim()&&!i&&t(o.trim())},e[4]=o,e[5]=i,e[6]=t,e[7]=d):d=e[7];let h;e[8]!==o||e[9]!==d?(h=s.jsx(L,{placeholder:"acme.com",value:o,onChange:b,className:"max-w-xs",onKeyDown:d}),e[8]=o,e[9]=d,e[10]=h):h=e[10];let m;e[11]!==o||e[12]!==i?(m=!o.trim()||i,e[11]=o,e[12]=i,e[13]=m):m=e[13];let u;e[14]!==o||e[15]!==t?(u=()=>t(o.trim()),e[14]=o,e[15]=t,e[16]=u):u=e[16];let p;e[17]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(he,{size:14}),e[17]=p):p=e[17];const j=i?"Extracting...":"Extract";let l;e[18]!==j||e[19]!==m||e[20]!==u?(l=s.jsxs(Z,{variant:"outline",disabled:m,onClick:u,children:[p,j]}),e[18]=j,e[19]=m,e[20]=u,e[21]=l):l=e[21];let v;return e[22]!==l||e[23]!==h?(v=s.jsx("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-5",children:s.jsxs("div",{className:"flex items-start gap-4",children:[a,s.jsxs("div",{className:"flex-1",children:[c,x,s.jsxs("div",{className:"mt-3 flex gap-2",children:[h,l]})]})]})}),e[22]=l,e[23]=h,e[24]=v):v=e[24],v}function ke(n){const e=$.c(24),{brand:t,onSave:i}=n,[o,g]=w.useState(!1),[a,c]=w.useState(t.name??""),[x,b]=w.useState(t.domain??""),[d,h]=w.useState(t.overview??"");let m;e[0]!==t.domain||e[1]!==t.name||e[2]!==t.overview?(m=()=>{c(t.name??""),b(t.domain??""),h(t.overview??""),g(!0)},e[0]=t.domain,e[1]=t.name,e[2]=t.overview,e[3]=m):m=e[3];const u=m;let p;e[4]!==x||e[5]!==a||e[6]!==i||e[7]!==d?(p=()=>{i({name:a,domain:x,overview:d}),g(!1)},e[4]=x,e[5]=a,e[6]=i,e[7]=d,e[8]=p):p=e[8];const j=p,l=!t.name&&!t.domain&&!t.overview;let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=()=>g(!1),e[9]=v):v=e[9];let r;e[10]!==t.domain||e[11]!==t.name||e[12]!==t.overview||e[13]!==x||e[14]!==o||e[15]!==l||e[16]!==a||e[17]!==d?(r=o?s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Company name"}),s.jsx(L,{value:a,onChange:y=>c(y.target.value),placeholder:"Acme Corp"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Domain"}),s.jsx(L,{value:x,onChange:y=>b(y.target.value),placeholder:"acme.com"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Overview"}),s.jsx(Ne,{value:d,onChange:y=>h(y.target.value),placeholder:"Brief description of what the company does...",rows:3})]})]}):l?s.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No company info yet. Click edit to add your company name, domain, and overview."}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[s.jsx("h2",{className:"text-xl font-semibold leading-tight text-foreground",children:t.name}),t.domain&&s.jsxs("a",{href:`https://${t.domain}`,target:"_blank",rel:"noopener noreferrer",className:"mt-0.5 flex shrink-0 items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[s.jsx(ve,{size:11}),t.domain]})]}),t.overview&&s.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:t.overview})]}),e[10]=t.domain,e[11]=t.name,e[12]=t.overview,e[13]=x,e[14]=o,e[15]=l,e[16]=a,e[17]=d,e[18]=r):r=e[18];let f;return e[19]!==o||e[20]!==j||e[21]!==u||e[22]!==r?(f=s.jsx(V,{title:"Company Overview",onEdit:u,editing:o,onSave:j,onCancel:v,children:r}),e[19]=o,e[20]=j,e[21]=u,e[22]=r,e[23]=f):f=e[23],f}function we(n){const e=$.c(24),{brand:t,onSave:i}=n,[o,g]=w.useState(!1),[a,c]=w.useState(t.logo??""),[x,b]=w.useState(t.favicon??""),[d,h]=w.useState(t.ogImage??"");let m;e[0]!==t.favicon||e[1]!==t.logo||e[2]!==t.ogImage?(m=()=>{c(t.logo??""),b(t.favicon??""),h(t.ogImage??""),g(!0)},e[0]=t.favicon,e[1]=t.logo,e[2]=t.ogImage,e[3]=m):m=e[3];const u=m;let p;e[4]!==x||e[5]!==a||e[6]!==d||e[7]!==i?(p=()=>{i({logo:a||null,favicon:x||null,ogImage:d||null}),g(!1)},e[4]=x,e[5]=a,e[6]=d,e[7]=i,e[8]=p):p=e[8];const j=p,l=t.logo||t.favicon||t.ogImage;let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=()=>g(!1),e[9]=v):v=e[9];let r;e[10]!==t.favicon||e[11]!==t.logo||e[12]!==t.ogImage||e[13]!==o||e[14]!==x||e[15]!==l||e[16]!==a||e[17]!==d?(r=o?s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Logo URL"}),s.jsx(L,{value:a,onChange:y=>c(y.target.value),placeholder:"https://..."})]}),s.jsxs("div",{children:[s.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Favicon URL"}),s.jsx(L,{value:x,onChange:y=>b(y.target.value),placeholder:"https://..."})]}),s.jsxs("div",{children:[s.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"OG Image URL"}),s.jsx(L,{value:d,onChange:y=>h(y.target.value),placeholder:"https://..."})]})]}):l?s.jsxs("div",{className:"flex gap-2",children:[t.logo&&s.jsx("div",{className:"flex h-16 w-24 shrink-0 items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:s.jsx("img",{src:t.logo,alt:"Logo",className:"h-full w-full object-contain p-2"})}),t.favicon&&s.jsx("div",{className:"flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:s.jsx("img",{src:t.favicon,alt:"Favicon",className:"h-8 w-8 object-contain"})}),t.ogImage&&s.jsx("div",{className:"h-16 flex-1 overflow-hidden rounded-xl",children:s.jsx("img",{src:t.ogImage,alt:"OG",className:"h-full w-full object-cover",loading:"lazy"})})]}):s.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No logos added yet. Click edit to add logo, favicon, and OG image URLs."}),e[10]=t.favicon,e[11]=t.logo,e[12]=t.ogImage,e[13]=o,e[14]=x,e[15]=l,e[16]=a,e[17]=d,e[18]=r):r=e[18];let f;return e[19]!==o||e[20]!==j||e[21]!==u||e[22]!==r?(f=s.jsx(V,{title:"Logos & Images",onEdit:u,editing:o,onSave:j,onCancel:v,children:r}),e[19]=o,e[20]=j,e[21]=u,e[22]=r,e[23]=f):f=e[23],f}const ne=[{key:"heading",label:"Headings"},{key:"body",label:"Body"},{key:"code",label:"Code"}];function Ce(n){const e=$.c(20),{brand:t,onSave:i}=n,[o,g]=w.useState(!1);let a;e[0]!==t.fonts?(a=t.fonts??{},e[0]=t.fonts,e[1]=a):a=e[1];const[c,x]=w.useState(a);let b;e[2]!==t.fonts?(b=()=>{x(t.fonts??{}),g(!0)},e[2]=t.fonts,e[3]=b):b=e[3];const d=b;let h;e[4]!==c||e[5]!==i?(h=()=>{const r=Object.values(c).some(Se);i({fonts:r?c:null}),g(!1)},e[4]=c,e[5]=i,e[6]=h):h=e[6];const m=h;let u;e[7]!==t.fonts?(u=t.fonts&&Object.values(t.fonts).some(Ee),e[7]=t.fonts,e[8]=u):u=e[8];const p=u;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>g(!1),e[9]=j):j=e[9];let l;e[10]!==t.fonts||e[11]!==o||e[12]!==c||e[13]!==p?(l=o?s.jsx("div",{className:"space-y-2",children:ne.map(r=>{const{key:f,label:y}=r;return s.jsxs("div",{children:[s.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:y}),s.jsx(L,{value:c[f]??"",onChange:k=>x({...c,[f]:k.target.value}),placeholder:`Font family for ${y.toLowerCase()}`})]},f)})}):p?s.jsx("div",{className:"space-y-3",children:ne.filter(r=>{const{key:f}=r;return t.fonts?.[f]}).map(r=>{const{key:f,label:y}=r;return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"w-9 text-xl font-medium leading-none text-foreground",children:"Aa"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium leading-none text-foreground",children:t.fonts[f]}),s.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:y})]})]},f)})}):s.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No fonts defined. Click edit to add your brand fonts."}),e[10]=t.fonts,e[11]=o,e[12]=c,e[13]=p,e[14]=l):l=e[14];let v;return e[15]!==o||e[16]!==m||e[17]!==d||e[18]!==l?(v=s.jsx(V,{title:"Fonts",onEdit:d,editing:o,onSave:m,onCancel:j,children:l}),e[15]=o,e[16]=m,e[17]=d,e[18]=l,e[19]=v):v=e[19],v}function Ee(n){return n?.trim()}function Se(n){return n?.trim()}const oe=[{key:"primary",label:"Primary"},{key:"secondary",label:"Secondary"},{key:"accent",label:"Accent"},{key:"background",label:"Background"},{key:"foreground",label:"Foreground"}];function Te(n){const e=$.c(20),{brand:t,onSave:i}=n,[o,g]=w.useState(!1);let a;e[0]!==t.colors?(a=t.colors??{},e[0]=t.colors,e[1]=a):a=e[1];const[c,x]=w.useState(a);let b;e[2]!==t.colors?(b=()=>{x(t.colors??{}),g(!0)},e[2]=t.colors,e[3]=b):b=e[3];const d=b;let h;e[4]!==c||e[5]!==i?(h=()=>{const r=Object.values(c).some(Be);i({colors:r?c:null}),g(!1)},e[4]=c,e[5]=i,e[6]=h):h=e[6];const m=h;let u;e[7]!==t.colors?(u=t.colors&&Object.values(t.colors).some(Ae),e[7]=t.colors,e[8]=u):u=e[8];const p=u;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>g(!1),e[9]=j):j=e[9];let l;e[10]!==t.colors||e[11]!==c||e[12]!==o||e[13]!==p?(l=o?s.jsx("div",{className:"space-y-2",children:oe.map(r=>{const{key:f,label:y}=r;return s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"color",value:c[f]??"#000000",onChange:k=>x({...c,[f]:k.target.value}),className:"h-9 w-9 shrink-0 cursor-pointer rounded-lg border border-border bg-transparent p-0.5"}),s.jsx(L,{value:c[f]??"",onChange:k=>x({...c,[f]:k.target.value}),placeholder:"#000000",className:"w-28"}),s.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:y})]},f)})}):p?s.jsx("div",{className:"flex flex-wrap gap-4",children:oe.filter(r=>{const{key:f}=r;return t.colors?.[f]}).map(r=>{const{key:f,label:y}=r;return s.jsxs("div",{className:"flex flex-col items-center gap-2",children:[s.jsx("div",{className:"h-14 w-14 rounded-full shadow-sm",style:{backgroundColor:t.colors[f],border:t.colors[f]==="#FFFFFF"?"1px solid #e5e7eb":void 0}}),s.jsx("p",{className:"font-mono text-[10px] text-muted-foreground",children:t.colors[f]}),s.jsx("p",{className:"text-[10px] text-muted-foreground",children:y})]},f)})}):s.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No colors defined. Click edit to add your brand palette."}),e[10]=t.colors,e[11]=c,e[12]=o,e[13]=p,e[14]=l):l=e[14];let v;return e[15]!==o||e[16]!==m||e[17]!==d||e[18]!==l?(v=s.jsx(V,{title:"Colors",onEdit:d,editing:o,onSave:m,onCancel:j,children:l}),e[15]=o,e[16]=m,e[17]=d,e[18]=l,e[19]=v):v=e[19],v}function Ae(n){return n?.trim()}function Be(n){return n?.trim()}function ae(n){const e=$.c(91),{brand:t,client:i,onChanged:o,archived:g}=n,[a,c]=w.useState(!1);let x;e[0]!==t.colors||e[1]!==t.domain||e[2]!==t.favicon||e[3]!==t.fonts||e[4]!==t.id||e[5]!==t.images||e[6]!==t.logo||e[7]!==t.name||e[8]!==t.ogImage||e[9]!==t.overview||e[10]!==i?(x=async N=>{const W={id:t.id,name:N.name??t.name??"",domain:N.domain??t.domain??"",overview:N.overview??t.overview??"",logo:"logo"in N?N.logo:t.logo,favicon:"favicon"in N?N.favicon:t.favicon,ogImage:"ogImage"in N?N.ogImage:t.ogImage,fonts:"fonts"in N?N.fonts:t.fonts,colors:"colors"in N?N.colors:t.colors,images:"images"in N?N.images:t.images};await i.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:W})},e[0]=t.colors,e[1]=t.domain,e[2]=t.favicon,e[3]=t.fonts,e[4]=t.id,e[5]=t.images,e[6]=t.logo,e[7]=t.name,e[8]=t.ogImage,e[9]=t.overview,e[10]=i,e[11]=x):x=e[11];let b;e[12]!==t.id||e[13]!==o?(b=(N,W)=>{U("brand_updated",{brand_id:t.id,fields:Object.keys(W)}),o(),R.success("Brand context saved")},e[12]=t.id,e[13]=o,e[14]=b):b=e[14];let d;e[15]!==x||e[16]!==b?(d={mutationFn:x,onSuccess:b,onError:$e},e[15]=x,e[16]=b,e[17]=d):d=e[17];const{mutate:h}=Q(d);let m;e[18]!==g||e[19]!==t.id||e[20]!==i?(m=async()=>{g?await i.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:{id:t.id,archivedAt:null}}):await i.callTool({name:"BRAND_CONTEXT_DELETE",arguments:{id:t.id}})},e[18]=g,e[19]=t.id,e[20]=i,e[21]=m):m=e[21];let u;e[22]!==g||e[23]!==t.id||e[24]!==o?(u=()=>{U(g?"brand_restored":"brand_archived",{brand_id:t.id}),o(),R.success(g?"Brand restored":"Brand archived")},e[22]=g,e[23]=t.id,e[24]=o,e[25]=u):u=e[25];let p;e[26]!==g?(p=()=>R.error(g?"Failed to restore brand":"Failed to archive brand"),e[26]=g,e[27]=p):p=e[27];let j;e[28]!==m||e[29]!==u||e[30]!==p?(j={mutationFn:m,onSuccess:u,onError:p},e[28]=m,e[29]=u,e[30]=p,e[31]=j):j=e[31];const{mutate:l,isPending:v}=Q(j);let r;e[32]!==t.id||e[33]!==i?(r=async()=>{await i.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:{id:t.id,isDefault:!0}})},e[32]=t.id,e[33]=i,e[34]=r):r=e[34];let f;e[35]!==t.id||e[36]!==o?(f=()=>{U("brand_set_as_default",{brand_id:t.id}),o(),R.success("Set as default brand")},e[35]=t.id,e[36]=o,e[37]=f):f=e[37];let y;e[38]!==r||e[39]!==f?(y={mutationFn:r,onSuccess:f,onError:Re},e[38]=r,e[39]=f,e[40]=y):y=e[40];const{mutate:k}=Q(y),F=t.isDefault?"border-primary/30":"border-border/60";let C;e[41]!==F?(C=H("rounded-2xl border bg-background",F),e[41]=F,e[42]=C):C=e[42];let S;e[43]!==a?(S=()=>c(!a),e[43]=a,e[44]=S):S=e[44];let O;e[45]!==a?(O=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:a?s.jsx(ue,{size:14}):s.jsx(re,{size:14})}),e[45]=a,e[46]=O):O=e[46];let P;e[47]!==t.logo||e[48]!==t.name?(P=t.logo?s.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"6px 6px",backgroundPosition:"0 0, 3px 3px",backgroundColor:"#fff"},children:s.jsx("img",{src:t.logo,alt:"",className:"h-full w-full object-contain p-1",onError:Pe})}):s.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t.name?.charAt(0)?.toUpperCase()||"?"})}),e[47]=t.logo,e[48]=t.name,e[49]=P):P=e[49];const z=t.name||"Untitled Brand";let E;e[50]!==z?(E=s.jsx("span",{className:"text-sm font-medium text-foreground",children:z}),e[50]=z,e[51]=E):E=e[51];let T;e[52]!==t.domain?(T=t.domain&&s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.domain}),e[52]=t.domain,e[53]=T):T=e[53];let A;e[54]!==E||e[55]!==T?(A=s.jsxs("div",{className:"flex flex-1 flex-col items-start gap-0.5 overflow-hidden text-left",children:[E,T]}),e[54]=E,e[55]=T,e[56]=A):A=e[56];let B;e[57]!==t.colors?(B=t.colors&&Object.values(t.colors).some(Oe)&&s.jsx("div",{className:"flex shrink-0 gap-1",children:Object.entries(t.colors).filter(Fe).map(De)}),e[57]=t.colors,e[58]=B):B=e[58];let I;e[59]!==t.fonts?(I=t.fonts&&Object.values(t.fonts).some(Ie)&&s.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Object.values(t.fonts).filter(Boolean).join(", ")}),e[59]=t.fonts,e[60]=I):I=e[60];let _;e[61]!==g||e[62]!==t.isDefault||e[63]!==k?(_=!g&&s.jsx("span",{role:"button",tabIndex:0,className:H("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-opacity",t.isDefault?"opacity-100":"opacity-0 hover:bg-muted group-hover:opacity-100"),onClick:N=>{N.stopPropagation(),t.isDefault||k()},onKeyDown:N=>{N.key==="Enter"&&(N.stopPropagation(),t.isDefault||k())},title:t.isDefault?"Default brand":"Set as default",children:s.jsx(ge,{size:13,className:H(t.isDefault?"text-primary fill-primary":"text-muted-foreground")})}),e[61]=g,e[62]=t.isDefault,e[63]=k,e[64]=_):_=e[64];let D,X;e[65]!==l?(D=N=>{N.stopPropagation(),l()},X=N=>{N.key==="Enter"&&(N.stopPropagation(),l())},e[65]=l,e[66]=D,e[67]=X):(D=e[66],X=e[67]);let K;e[68]!==v?(K=v?s.jsx("span",{className:"text-[10px] text-muted-foreground",children:"..."}):s.jsx(be,{size:13,className:"text-muted-foreground"}),e[68]=v,e[69]=K):K=e[69];let q;e[70]!==D||e[71]!==X||e[72]!==K?(q=s.jsx("span",{role:"button",tabIndex:0,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg opacity-0 transition-opacity hover:bg-muted group-hover:opacity-100",onClick:D,onKeyDown:X,children:K}),e[70]=D,e[71]=X,e[72]=K,e[73]=q):q=e[73];let M;e[74]!==S||e[75]!==O||e[76]!==P||e[77]!==A||e[78]!==B||e[79]!==I||e[80]!==_||e[81]!==q?(M=s.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 p-5",onClick:S,children:[O,P,A,B,I,_,q]}),e[74]=S,e[75]=O,e[76]=P,e[77]=A,e[78]=B,e[79]=I,e[80]=_,e[81]=q,e[82]=M):M=e[82];let G;e[83]!==t||e[84]!==a||e[85]!==h?(G=a&&s.jsxs("div",{className:"space-y-3 px-5 pb-5",children:[s.jsx(ke,{brand:t,onSave:h}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(we,{brand:t,onSave:h}),s.jsx(Ce,{brand:t,onSave:h})]}),s.jsx(Te,{brand:t,onSave:h})]}),e[83]=t,e[84]=a,e[85]=h,e[86]=G):G=e[86];let Y;return e[87]!==C||e[88]!==M||e[89]!==G?(Y=s.jsxs("div",{className:C,children:[M,G]}),e[87]=C,e[88]=M,e[89]=G,e[90]=Y):Y=e[90],Y}function Ie(n){return n}function De(n){const[e,t]=n;return s.jsx("div",{className:"h-5 w-5 rounded-full border border-border/40",style:{backgroundColor:t},title:`${e}: ${t}`},e)}function Fe(n){const[,e]=n;return e}function Oe(n){return n}function Pe(n){n.target.style.display="none"}function Re(){return R.error("Failed to set default brand")}function $e(){return R.error("Failed to save brand context")}function ze(){const n=$.c(40),{brandExtractEnabled:e}=le(),{org:t}=ie();let i;n[0]!==t.id?(i={connectionId:me,orgId:t.id},n[0]=t.id,n[1]=i):i=n[1];const o=fe(i),g=ce();let a;n[2]!==t.id?(a=ee.brandContext(t.id),n[2]=t.id,n[3]=a):a=n[3];let c;n[4]!==o?(c=async()=>{const _=await o.callTool({name:"BRAND_CONTEXT_LIST",arguments:{includeArchived:!0}}),D=se(_);return Array.isArray(D?.items)?D.items:[]},n[4]=o,n[5]=c):c=n[5];let x;n[6]!==a||n[7]!==c?(x={queryKey:a,queryFn:c},n[6]=a,n[7]=c,n[8]=x):x=n[8];const{data:b}=de(x),d=b===void 0?[]:b,h=d.filter(Ke),m=d.filter(Xe),[u,p]=w.useState(!1);let j;n[9]!==t.id||n[10]!==g?(j=()=>g.invalidateQueries({queryKey:ee.brandContext(t.id),refetchType:"all"}),n[9]=t.id,n[10]=g,n[11]=j):j=n[11];const l=j;let v;n[12]!==o?(v=async()=>{await o.callTool({name:"BRAND_CONTEXT_CREATE",arguments:{name:"New Brand",domain:"example.com",overview:""}})},n[12]=o,n[13]=v):v=n[13];let r;n[14]!==l?(r=()=>{U("brand_created"),l(),R.success("Brand created")},n[14]=l,n[15]=r):r=n[15];let f;n[16]!==v||n[17]!==r?(f={mutationFn:v,onSuccess:r,onError:Ue},n[16]=v,n[17]=r,n[18]=f):f=n[18];const{mutate:y,isPending:k}=Q(f);let F;n[19]!==o?(F=async _=>{U("brand_extract_started",{domain:_});const D=await o.callTool({name:"BRAND_CONTEXT_EXTRACT",arguments:{domain:_}});se(D)},n[19]=o,n[20]=F):F=n[20];let C;n[21]!==l?(C=()=>{U("brand_extract_succeeded"),l(),R.success("Brand extracted successfully")},n[21]=l,n[22]=C):C=n[22];let S;n[23]!==C||n[24]!==F?(S={mutationFn:F,onSuccess:C,onError:Le},n[23]=C,n[24]=F,n[25]=S):S=n[25];const{mutate:O,isPending:P}=Q(S);let z;n[26]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsxs("div",{children:[s.jsx(J.Title,{children:"Brand Context"}),s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Define your brand profiles. Each brand is available as an MCP prompt for AI clients."})]}),n[26]=z):z=n[26];let E;n[27]!==y?(E=()=>y(),n[27]=y,n[28]=E):E=n[28];let T;n[29]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(te,{size:14}),n[29]=T):T=n[29];let A;n[30]!==k||n[31]!==E?(A=s.jsxs("div",{className:"flex items-center justify-between",children:[z,s.jsxs(Z,{variant:"outline",onClick:E,disabled:k,children:[T,"Add Brand"]})]}),n[30]=k,n[31]=E,n[32]=A):A=n[32];let B;n[33]!==e||n[34]!==O||n[35]!==P?(B=e&&s.jsx(_e,{onExtract:_=>O(_),isExtracting:P}),n[33]=e,n[34]=O,n[35]=P,n[36]=B):B=n[36];let I;return n[37]!==o||n[38]!==l?(I=_=>s.jsx(ae,{brand:_,client:o,onChanged:l},_.id),n[37]=o,n[38]=l,n[39]=I):I=n[39],s.jsx(J,{children:s.jsx(J.Content,{children:s.jsx(J.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[A,B,h.length===0&&m.length===0&&s.jsxs("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-8 text-center",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"No brands configured yet."}),s.jsxs(Z,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>y(),disabled:k,children:[s.jsx(te,{size:14}),"Add your first brand"]})]}),s.jsx("div",{className:"group space-y-3",children:h.map(I)}),m.length>0&&s.jsxs("div",{className:"space-y-3",children:[s.jsxs("button",{type:"button",onClick:()=>p(!u),className:"flex items-center gap-1.5 text-xs text-muted-foreground/60 transition-colors hover:text-muted-foreground",children:[s.jsx(re,{size:12,className:H("transition-transform",u&&"rotate-90")}),m.length," archived"]}),u&&s.jsx("div",{className:"space-y-3 opacity-60",children:m.map(_=>s.jsx(ae,{brand:_,client:o,onChanged:l,archived:!0},_.id))})]})]})})})})}function Le(n){U("brand_extract_failed",{error:n instanceof Error?n.message:"unknown"}),R.error(n instanceof Error?n.message:"Failed to extract brand")}function Ue(){return R.error("Failed to create brand")}function Xe(n){return n.archivedAt}function Ke(n){return!n.archivedAt}function at(){const n=$.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ze,{}),n[0]=e):e=n[0],e}export{at as default};
@@ -1 +1 @@
1
- import{e as o,c as i,j as c}from"./index-CNolBSVE.js";function n(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=i("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function f(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=i("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto]",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function p(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=i("leading-none font-medium",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function u(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=i("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function m(r){const e=o.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}function x(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=i("flex items-center px-6 [.border-t]:pt-6",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{n as C,m as a,f as b,p as c,x as d,u as e};
1
+ import{e as o,c as i,j as c}from"./index-D34n6J5J.js";function n(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=i("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function f(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=i("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto]",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function p(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=i("leading-none font-medium",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function u(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=i("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function m(r){const e=o.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}function x(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=i("flex items-center px-6 [.border-t]:pt-6",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{n as C,m as a,f as b,p as c,x as d,u as e};
@@ -1,4 +1,4 @@
1
- import{bM as Ka,bN as Xa,bk as V,y as f,bO as tt,bP as la,bQ as er,bR as tr,aC as ar,a_ as U,aI as Ne,aK as Le,v as N,a$ as b,aJ as re,bS as rr,bT as $,_ as sr,bb as nr,r as M,e as Ze,ab as ca,o as Ct,s as te,K as Ie,z as ce,a2 as Re,a3 as ue,f as or,d as ir,g as lr,V as cr,b as ua,t as ur,j as xe,C as dr,bU as pr}from"./index-CNolBSVE.js";import{E as fr,g as mr,S as At,u as Rt}from"./constants-D8VkIs2c.js";import{a as hr}from"./use-virtual-mcp-CDOk_IIy.js";import{u as gr,a as He}from"./use-ai-providers-oN1cKhaJ.js";import{u as da}from"./use-decopilot-events-BRc3SX00.js";import{u as vr}from"./use-tasks-7rX1bsHL.js";import{b as yr,c as br}from"./use-collections-BTXUmiDi.js";import{e as Er}from"./use-organization-settings-dQpmtQzl.js";var De;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function a(s){throw new Error}e.assertNever=a,e.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},e.getValidEnumValues=s=>{const n=e.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(n){return s[n]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},e.find=(s,n)=>{for(const i of s)if(n(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}e.joinValues=r,e.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(De||(De={}));var Vt;(function(e){e.mergeShapes=(t,a)=>({...t,...a})})(Vt||(Vt={}));De.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);De.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class at extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=t}format(t){const a=t||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,u=0;for(;u<i.path.length;){const l=i.path[u];u===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(a(i))):o[l]=o[l]||{_errors:[]},o=o[l],u++}}};return s(this),r}static assert(t){if(!(t instanceof at))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,De.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(t(s))}else r.push(t(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}at.create=e=>new at(e);var Bt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Bt||(Bt={}));var T;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(T||(T={}));const Ir={anthropic:["claude-sonnet-4-6","claude-sonnet","claude"],openrouter:["anthropic/claude-opus-4.7","anthropic/claude-sonnet-4-6","anthropic/claude-sonnet","anthropic/claude"],deco:["anthropic/claude-haiku-4-5","anthropic/claude-haiku","anthropic/claude"],google:["gemini-3-flash"],"claude-code":["claude-code:sonnet","claude-code:opus","claude-code:haiku"]},_r={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"]},Sr={anthropic:["claude-sonnet-4-6","claude-sonnet"],openrouter:["anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-opus-4.7","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"]},Tr={anthropic:["claude-opus-4-7","claude-sonnet-4-6","claude-sonnet"],openrouter:["anthropic/claude-opus-4.7","anthropic/claude-sonnet-4.6:extended","anthropic/claude-sonnet-4.6","google/gemini-3-pro"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet"],google:["gemini-3-pro"],"claude-code":["claude-code:opus","claude-code:sonnet"]},Mr={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],google:["gemini-2.0-flash-image"]},wr={openrouter:["perplexity/sonar","perplexity/sonar-pro","perplexity/deep-research"],deco:["perplexity/sonar","perplexity/sonar-pro","perplexity/deep-research"]};function Ce(e,t,a,r){for(const s of a){const n=e.find(i=>i.modelId===s);if(n)return{keyId:t,modelId:n.modelId,title:n.title}}for(const s of a){const n=e.find(i=>i.modelId.includes(s));if(n)return{keyId:t,modelId:n.modelId,title:n.title}}if(r){const s=e.find(r);if(s)return{keyId:t,modelId:s.modelId,title:s.title}}return null}function Jn(e,t){const a={chat:{fast:null,smart:null,thinking:null},image:null,webResearch:null};for(const r of e){const s=t[r.id]??[],n=r.providerId;a.chat.fast||(a.chat.fast=Ce(s,r.id,_r[n]??[])),a.chat.smart||(a.chat.smart=Ce(s,r.id,Sr[n]??[])),a.chat.thinking||(a.chat.thinking=Ce(s,r.id,Tr[n]??[])),a.image||(a.image=Ce(s,r.id,Mr[n]??[],i=>i.capabilities?.includes("image")===!0)),a.webResearch||(a.webResearch=Ce(s,r.id,wr[n]??[],i=>{const o=i.modelId.toLowerCase().replace(/[^a-z0-9]/g,"");return o.includes("sonar")||o.includes("deepresearch")}))}return a}function Cr(e,t,a){if(e.length===0)return null;const r=Ir[t]??[],s=n=>a!==void 0?{...n,keyId:a}:n;for(const n of r){const i=e.find(o=>o.modelId===n);if(i)return s(i)}for(const n of r){const i=e.find(o=>o.modelId.includes(n));if(i)return s(i)}return s(e[0])}var pa="vercel.ai.error",Ar=Symbol.for(pa),qt,zt,Q=class fa extends(zt=Error,qt=Ar,zt){constructor({name:t,message:a,cause:r}){super(a),this[qt]=!0,this.name=t,this.cause=r}static isInstance(t){return fa.hasMarker(t,pa)}static hasMarker(t,a){const r=Symbol.for(a);return t!=null&&typeof t=="object"&&r in t&&typeof t[r]=="boolean"&&t[r]===!0}};function ma(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var ha="AI_InvalidArgumentError",ga=`vercel.ai.error.${ha}`,Rr=Symbol.for(ga),Jt,Wt,xr=class extends(Wt=Q,Jt=Rr,Wt){constructor({message:e,cause:t,argument:a}){super({name:ha,message:e,cause:t}),this[Jt]=!0,this.argument=a}static isInstance(e){return Q.hasMarker(e,ga)}},va="AI_JSONParseError",ya=`vercel.ai.error.${va}`,kr=Symbol.for(ya),Gt,Yt,Ht=class extends(Yt=Q,Gt=kr,Yt){constructor({text:e,cause:t}){super({name:va,message:`JSON parsing failed: Text: ${e}.
1
+ import{bM as Ka,bN as Xa,bk as V,y as f,bO as tt,bP as la,bQ as er,bR as tr,aC as ar,a_ as U,aI as Ne,aK as Le,v as N,a$ as b,aJ as re,bS as rr,bT as $,_ as sr,bb as nr,r as M,e as Ze,ab as ca,o as Ct,s as te,K as Ie,z as ce,a2 as Re,a3 as ue,f as or,d as ir,g as lr,V as cr,b as ua,t as ur,j as xe,C as dr,bU as pr}from"./index-D34n6J5J.js";import{E as fr,g as mr,S as At,u as Rt}from"./constants-DDHDU3PV.js";import{a as hr}from"./use-virtual-mcp-0vHwLInn.js";import{u as gr,a as He}from"./use-ai-providers-DHuVj1kn.js";import{u as da}from"./use-decopilot-events-Dpt6CcIN.js";import{u as vr}from"./use-tasks-Dpp1DK1f.js";import{b as yr,c as br}from"./use-collections-DRlHpXQL.js";import{e as Er}from"./use-organization-settings-BD9CIHH5.js";var De;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function a(s){throw new Error}e.assertNever=a,e.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},e.getValidEnumValues=s=>{const n=e.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(n){return s[n]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},e.find=(s,n)=>{for(const i of s)if(n(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}e.joinValues=r,e.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(De||(De={}));var Vt;(function(e){e.mergeShapes=(t,a)=>({...t,...a})})(Vt||(Vt={}));De.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);De.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class at extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=t}format(t){const a=t||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,u=0;for(;u<i.path.length;){const l=i.path[u];u===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(a(i))):o[l]=o[l]||{_errors:[]},o=o[l],u++}}};return s(this),r}static assert(t){if(!(t instanceof at))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,De.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(t(s))}else r.push(t(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}at.create=e=>new at(e);var Bt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Bt||(Bt={}));var T;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(T||(T={}));const Ir={anthropic:["claude-sonnet-4-6","claude-sonnet","claude"],openrouter:["anthropic/claude-opus-4.7","anthropic/claude-sonnet-4-6","anthropic/claude-sonnet","anthropic/claude"],deco:["anthropic/claude-haiku-4-5","anthropic/claude-haiku","anthropic/claude"],google:["gemini-3-flash"],"claude-code":["claude-code:sonnet","claude-code:opus","claude-code:haiku"]},_r={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"]},Sr={anthropic:["claude-sonnet-4-6","claude-sonnet"],openrouter:["anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-opus-4.7","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"]},Tr={anthropic:["claude-opus-4-7","claude-sonnet-4-6","claude-sonnet"],openrouter:["anthropic/claude-opus-4.7","anthropic/claude-sonnet-4.6:extended","anthropic/claude-sonnet-4.6","google/gemini-3-pro"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet"],google:["gemini-3-pro"],"claude-code":["claude-code:opus","claude-code:sonnet"]},Mr={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],google:["gemini-2.0-flash-image"]},wr={openrouter:["perplexity/sonar","perplexity/sonar-pro","perplexity/deep-research"],deco:["perplexity/sonar","perplexity/sonar-pro","perplexity/deep-research"]};function Ce(e,t,a,r){for(const s of a){const n=e.find(i=>i.modelId===s);if(n)return{keyId:t,modelId:n.modelId,title:n.title}}for(const s of a){const n=e.find(i=>i.modelId.includes(s));if(n)return{keyId:t,modelId:n.modelId,title:n.title}}if(r){const s=e.find(r);if(s)return{keyId:t,modelId:s.modelId,title:s.title}}return null}function Jn(e,t){const a={chat:{fast:null,smart:null,thinking:null},image:null,webResearch:null};for(const r of e){const s=t[r.id]??[],n=r.providerId;a.chat.fast||(a.chat.fast=Ce(s,r.id,_r[n]??[])),a.chat.smart||(a.chat.smart=Ce(s,r.id,Sr[n]??[])),a.chat.thinking||(a.chat.thinking=Ce(s,r.id,Tr[n]??[])),a.image||(a.image=Ce(s,r.id,Mr[n]??[],i=>i.capabilities?.includes("image")===!0)),a.webResearch||(a.webResearch=Ce(s,r.id,wr[n]??[],i=>{const o=i.modelId.toLowerCase().replace(/[^a-z0-9]/g,"");return o.includes("sonar")||o.includes("deepresearch")}))}return a}function Cr(e,t,a){if(e.length===0)return null;const r=Ir[t]??[],s=n=>a!==void 0?{...n,keyId:a}:n;for(const n of r){const i=e.find(o=>o.modelId===n);if(i)return s(i)}for(const n of r){const i=e.find(o=>o.modelId.includes(n));if(i)return s(i)}return s(e[0])}var pa="vercel.ai.error",Ar=Symbol.for(pa),qt,zt,Q=class fa extends(zt=Error,qt=Ar,zt){constructor({name:t,message:a,cause:r}){super(a),this[qt]=!0,this.name=t,this.cause=r}static isInstance(t){return fa.hasMarker(t,pa)}static hasMarker(t,a){const r=Symbol.for(a);return t!=null&&typeof t=="object"&&r in t&&typeof t[r]=="boolean"&&t[r]===!0}};function ma(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var ha="AI_InvalidArgumentError",ga=`vercel.ai.error.${ha}`,Rr=Symbol.for(ga),Jt,Wt,xr=class extends(Wt=Q,Jt=Rr,Wt){constructor({message:e,cause:t,argument:a}){super({name:ha,message:e,cause:t}),this[Jt]=!0,this.argument=a}static isInstance(e){return Q.hasMarker(e,ga)}},va="AI_JSONParseError",ya=`vercel.ai.error.${va}`,kr=Symbol.for(ya),Gt,Yt,Ht=class extends(Yt=Q,Gt=kr,Yt){constructor({text:e,cause:t}){super({name:va,message:`JSON parsing failed: Text: ${e}.
2
2
  Error message: ${ma(t)}`,cause:t}),this[Gt]=!0,this.text=e}static isInstance(e){return Q.hasMarker(e,ya)}},ba="AI_TypeValidationError",Ea=`vercel.ai.error.${ba}`,Pr=Symbol.for(Ea),Qt,Kt,_e=class It extends(Kt=Q,Qt=Pr,Kt){constructor({value:t,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const n=[];r.entityName&&n.push(r.entityName),r.entityId&&n.push(`id: "${r.entityId}"`),s+=n.join(", "),s+=")"}super({name:ba,message:`${s}: Value: ${JSON.stringify(t)}.
3
3
  Error message: ${ma(a)}`,cause:a}),this[Qt]=!0,this.value=t,this.context=r}static isInstance(t){return Q.hasMarker(t,Ea)}static wrap({value:t,cause:a,context:r}){var s,n,i;return It.isInstance(a)&&a.value===t&&((s=a.context)==null?void 0:s.field)===r?.field&&((n=a.context)==null?void 0:n.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new It({value:t,cause:a,context:r})}},Fe=({prefix:e,size:t=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const n=a.length,i=new Array(t);for(let o=0;o<t;o++)i[o]=a[Math.random()*n|0];return i.join("")};if(e==null)return s;if(a.includes(r))throw new xr({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${e}${r}${s()}`},Or=Fe();function ge(e){if(e==null)return{};const t={};if(e instanceof Headers)e.forEach((a,r)=>{t[r.toLowerCase()]=a});else{Array.isArray(e)||(e=Object.entries(e));for(const[a,r]of e)r!=null&&(t[a.toLowerCase()]=r)}return t}var Nr=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Dr=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Xt(e){const t=JSON.parse(e);return t===null||typeof t!="object"||Nr.test(e)===!1&&Dr.test(e)===!1?t:$r(t)}function $r(e){let t=[e];for(;t.length;){const a=t;t=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const n=r[s];n&&typeof n=="object"&&t.push(n)}}}return e}function jr(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return Xt(e)}try{return Xt(e)}finally{Error.stackTraceLimit=t}}function xt(e){if(e.type==="object"||Array.isArray(e.type)&&e.type.includes("object")){e.additionalProperties=!1;const{properties:a}=e;if(a!=null)for(const r of Object.keys(a))a[r]=le(a[r])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(le):le(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(le)),e.allOf!=null&&(e.allOf=e.allOf.map(le)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(le));const{definitions:t}=e;if(t!=null)for(const a of Object.keys(t))t[a]=le(t[a]);return e}function le(e){return typeof e=="boolean"?e:xt(e)}var Lr=Symbol("Let zodToJsonSchema decide on which parser to use"),ea={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Zr=e=>typeof e=="string"?{...ea,name:e}:{...ea,...e};function q(){return{}}function Fr(e,t){var a,r,s;const n={type:"array"};return(a=e.type)!=null&&a._def&&((s=(r=e.type)==null?void 0:r._def)==null?void 0:s.typeName)!==T.ZodAny&&(n.items=O(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(n.minItems=e.minLength.value),e.maxLength&&(n.maxItems=e.maxLength.value),e.exactLength&&(n.minItems=e.exactLength.value,n.maxItems=e.exactLength.value),n}function Ur(e){const t={type:"integer",format:"int64"};if(!e.checks)return t;for(const a of e.checks)switch(a.kind){case"min":a.inclusive?t.minimum=a.value:t.exclusiveMinimum=a.value;break;case"max":a.inclusive?t.maximum=a.value:t.exclusiveMaximum=a.value;break;case"multipleOf":t.multipleOf=a.value;break}return t}function Vr(){return{type:"boolean"}}function Ia(e,t){return O(e.type._def,t)}var Br=(e,t)=>O(e.innerType._def,t);function _a(e,t,a){const r=a??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,n)=>_a(e,t,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return qr(e)}}var qr=e=>{const t={type:"integer",format:"unix-time"};for(const a of e.checks)switch(a.kind){case"min":t.minimum=a.value;break;case"max":t.maximum=a.value;break}return t};function zr(e,t){return{...O(e.innerType._def,t),default:e.defaultValue()}}function Jr(e,t){return t.effectStrategy==="input"?O(e.schema._def,t):q()}function Wr(e){return{type:"string",enum:Array.from(e.values)}}var Gr=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function Yr(e,t){const a=[O(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),O(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(Gr(s))r.push(...s.allOf);else{let n=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...o}=s;n=o}r.push(n)}}),r.length?{allOf:r}:void 0}function Hr(e){const t=typeof e.value;return t!=="bigint"&&t!=="number"&&t!=="boolean"&&t!=="string"?{type:Array.isArray(e.value)?"array":"object"}:{type:t==="bigint"?"integer":t,const:e.value}}var yt=void 0,W={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(yt===void 0&&(yt=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),yt),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function Sa(e,t){const a={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(t.emailStrategy){case"format:email":G(a,"email",r.message,t);break;case"format:idn-email":G(a,"idn-email",r.message,t);break;case"pattern:zod":F(a,W.email,r.message,t);break}break;case"url":G(a,"uri",r.message,t);break;case"uuid":G(a,"uuid",r.message,t);break;case"regex":F(a,r.regex,r.message,t);break;case"cuid":F(a,W.cuid,r.message,t);break;case"cuid2":F(a,W.cuid2,r.message,t);break;case"startsWith":F(a,RegExp(`^${bt(r.value,t)}`),r.message,t);break;case"endsWith":F(a,RegExp(`${bt(r.value,t)}$`),r.message,t);break;case"datetime":G(a,"date-time",r.message,t);break;case"date":G(a,"date",r.message,t);break;case"time":G(a,"time",r.message,t);break;case"duration":G(a,"duration",r.message,t);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{F(a,RegExp(bt(r.value,t)),r.message,t);break}case"ip":{r.version!=="v6"&&G(a,"ipv4",r.message,t),r.version!=="v4"&&G(a,"ipv6",r.message,t);break}case"base64url":F(a,W.base64url,r.message,t);break;case"jwt":F(a,W.jwt,r.message,t);break;case"cidr":{r.version!=="v6"&&F(a,W.ipv4Cidr,r.message,t),r.version!=="v4"&&F(a,W.ipv6Cidr,r.message,t);break}case"emoji":F(a,W.emoji(),r.message,t);break;case"ulid":{F(a,W.ulid,r.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{G(a,"binary",r.message,t);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{F(a,W.base64,r.message,t);break}}break}case"nanoid":F(a,W.nanoid,r.message,t)}return a}function bt(e,t){return t.patternStrategy==="escape"?Kr(e):e}var Qr=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function Kr(e){let t="";for(let a=0;a<e.length;a++)Qr.has(e[a])||(t+="\\"),t+=e[a];return t}function G(e,t,a,r){var s;e.format||(s=e.anyOf)!=null&&s.some(n=>n.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...a&&r.errorMessages&&{errorMessage:{format:a}}})):e.format=t}function F(e,t,a,r){var s;e.pattern||(s=e.allOf)!=null&&s.some(n=>n.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:ta(t,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):e.pattern=ta(t,r)}function ta(e,t){var a;if(!t.applyRegexFlags||!e.flags)return e.source;const r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},s=r.i?e.source.toLowerCase():e.source;let n="",i=!1,o=!1,u=!1;for(let l=0;l<s.length;l++){if(i){n+=s[l],i=!1;continue}if(r.i){if(o){if(s[l].match(/[a-z]/)){u?(n+=s[l],n+=`${s[l-2]}-${s[l]}`.toUpperCase(),u=!1):s[l+1]==="-"&&((a=s[l+2])!=null&&a.match(/[a-z]/))?(n+=s[l],u=!0):n+=`${s[l]}${s[l].toUpperCase()}`;continue}}else if(s[l].match(/[a-z]/)){n+=`[${s[l]}${s[l].toUpperCase()}]`;continue}}if(r.m){if(s[l]==="^"){n+=`(^|(?<=[\r
4
4
  ]))`;continue}else if(s[l]==="$"){n+=`($|(?=[\r
@@ -1 +1 @@
1
- import{e as n,c as d,j as c,b3 as l,b4 as b}from"./index-CNolBSVE.js";import{i as m}from"./ChevronDown-BqFspEzt.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(b,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
1
+ import{e as n,c as d,j as c,b3 as l,b4 as b}from"./index-D34n6J5J.js";import{i as m}from"./ChevronDown-DGnjAtqs.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(b,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
@@ -0,0 +1 @@
1
+ import{v as Ke,y as te,e as b,j as t,E as Te,r as C,s as le,x as Ge,c as U,aX as Qe,aY as Xe,l as ie,d as Ye,ay as G,B as q,z as Ze,g as ae,aZ as ke}from"./index-D34n6J5J.js";import{E as Pe}from"./empty-state-BdQTFnZA.js";import{u as et,a as Ee}from"./use-collections-DRlHpXQL.js";import{u as ce}from"./constants-DDHDU3PV.js";import{a as se,F as tt,b as de,d as me}from"./form-D7DN8UcB.js";import{I as ue}from"./input-urtyHxks.js";import{T as re}from"./textarea-Ie4QUdo5.js";import{a as st,b as nt,V as xe}from"./layout-B5SDe6IW.js";import{S as ot,W as rt,a as lt}from"./index-DBclwIf_.js";import{g as it,M as at,b as je}from"./types-D4PfKOFF.js";import{a as be,c as Ne,d as ve,S as Se,b as ne}from"./select-CePxsPeP.js";import{T as ct,c as ye,a as we,b as Ce}from"./use-mobile-CxvYCzu9.js";import{i as dt}from"./AlertCircle-DTmaHldD.js";import{L as mt,N as ut,U as xt,V as pt,W as ft,X as Ie}from"./agent-icon-CyE6nkC1.js";import{f as ht}from"./XCircle-C1sJYG9R.js";import{i as gt}from"./Play-DKFUTU3G.js";import{i as jt}from"./ChevronRight-DV9No7GF.js";import{O as bt,M as Nt}from"./index-e3AFJ_dX.js";import{g as vt}from"./connection-slug-eyAPH6o3.js";import{u as St,T as yt}from"./tools-list-UnPsMGhr.js";import{b as _e,u as Ae}from"./use-connection-Cif-LY0f.js";import{b as wt}from"./use-mcp-tools-BYVtg7WH.js";import{c as Ct}from"./content-blocks-o63cs2vh.js";import{I as $e}from"./integration-icon-Cdkk9YPE.js";import{a as It,g as $t}from"./chat-context-DP5UfIrn.js";import{u as Tt}from"./shell-layout-BE22YA40.js";import{M as kt}from"./monaco-editor-lveN-AoO.js";import{E as Pt}from"./empty-state-DdKZ_is7.js";import{n as Et}from"./Container-B1nHZdmn.js";import"./label-Bt4h_QUk.js";import"./index-zDq2Zqio.js";import"./X-i9zBn6Hn.js";import"./index-CHKi_s_a.js";import"./collections-DHmXATua.js";import"./index-D-RCnwJQ.js";import"./use-virtual-mcp-0vHwLInn.js";import"./accordion-BV3tm7bj.js";import"./scroll-area-BebfgLv6.js";import"./badge-s_TAXGUN.js";import"./view-mode-toggle-D5CGwPOj.js";import"./dialog-C4lREl-t.js";import"./dropdown-menu-v2GifVOh.js";import"./ChevronDown-DGnjAtqs.js";import"./DotsVertical-Bp2tW8JI.js";import"./Plus-oXFwCrYz.js";import"./Tool01-CKowkGsd.js";import"./XClose-BbIo6xHe.js";import"./index-C5AR7k1c.js";import"./create-sse-subscription-CxkOgzKf.js";import"./ChevronUp-BkSgkwhO.js";import"./RefreshCcw01-B10mKiE2.js";import"./ArrowNarrowLeft-DlPeFc4v.js";import"./ZapSquare-DT93lGV4.js";import"./Users03-DqYvPeZM.js";import"./CheckCircle-DJ3lme5R.js";import"./Star01-_IJK5Yjt.js";import"./Palette-CI8n49a8.js";import"./SearchMd-BRJBvWf4.js";import"./LinkExternal01-BBbCPDtX.js";import"./Lock01-DpPIS3K7.js";import"./Sun-QqE1VnS_.js";import"./Settings02-Dm9dFDqk.js";import"./Shield01-BZJVBd5S.js";import"./Trash01-C6bAXG6g.js";import"./User01-C2-anwoO.js";import"./Zap-KmbRMccM.js";import"./extract-connection-data-CfXvFcGA.js";import"./constants-v4RUVkEN.js";import"./use-registry-connections-DR_etJ2H.js";import"./use-organization-settings-BD9CIHH5.js";import"./index-FnxI6OGR.js";import"./popover-j_PzMtdY.js";import"./use-create-virtual-mcp-CBpw3zXA.js";import"./use-navigate-to-agent-CFIKBq0L.js";import"./use-ai-providers-DHuVj1kn.js";import"./use-decopilot-events-Dpt6CcIN.js";import"./use-tasks-Dpp1DK1f.js";import"./required-auth-layout-C2o7AZ4K.js";import"./use-org-sso-CACnH9GQ.js";Ke({title:te().min(1),description:te().nullable(),body:te()});function oe(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function _t(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function At(s){const e=b.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let r;e[1]!==o.control?(r=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(se,{control:o.control,name:"title",render:Dt}),t.jsx(se,{control:o.control,name:"description",render:Rt})]})]}),e[1]=o.control,e[2]=r):r=e[2];let l,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),i=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=l,e[4]=i):(l=e[3],i=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[l,i,t.jsx(se,{control:o.control,name:"body",render:Ot})]}),e[5]=o.control,e[6]=c):c=e[6];let a;e[7]!==r||e[8]!==c?(a=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[r,c]}),e[7]=r,e[8]=c,e[9]=a):a=e[9];let x;return e[10]!==o||e[11]!==a?(x=t.jsx(tt,{...o,children:a}),e[10]=o,e[11]=a,e[12]=x):x=e[12],x}function Ot(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function Rt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Mt(s){const e=b.c(35),{providerId:o,promptId:n}=s,{org:r}=le(),l=o||null;let i;e[0]!==r.id||e[1]!==l?(i={connectionId:l,orgId:r.id},e[0]=r.id,e[1]=l,e[2]=i):i=e[2];const c=ce(i),a=et(o,"PROMPT",n,c),x=Ee(o,"PROMPT",c),f=x.update.isPending;let u;e[3]!==a?(u=a?{title:a.title,description:a.description??null,body:oe(a)}:void 0,e[3]=a,e[4]=u):u=e[4];let h;e[5]!==u?(h={values:u},e[5]=u,e[6]=h):h=e[6];const N=Ge(h);let T;e[7]!==N||e[8]!==a?(T=()=>{a&&N.reset({title:a.title,description:a.description??null,body:oe(a)})},e[7]=N,e[8]=a,e[9]=T):T=e[9];const _=T;let A;e[10]!==x.update||e[11]!==N||e[12]!==n?(A=N.handleSubmit(async v=>{const P=await x.update.mutateAsync({id:n,data:{title:v.title,description:v.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:v.body}}]}});N.reset({title:P.title,description:P.description??null,body:oe(P)})}),e[10]=x.update,e[11]=N,e[12]=n,e[13]=A):A=e[13];const O=A;if(!a){let v;return e[14]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Pe,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[14]=v):v=e[14],v}let y;e[15]!==a.title?(y=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:a.title}),e[15]=a.title,e[16]=y):y=e[16];let k;e[17]!==a.description?(k=a.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:a.description})]}):null,e[17]=a.description,e[18]=k):k=e[18];let I;e[19]!==y||e[20]!==k?(I=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,k]})}),e[19]=y,e[20]=k,e[21]=I):I=e[21];let g;e[22]!==O?(g=()=>{O()},e[22]=O,e[23]=g):g=e[23];let S;e[24]!==N.formState.isDirty||e[25]!==f||e[26]!==_||e[27]!==g?(S=t.jsx(st,{children:t.jsx(ot,{onSave:g,onUndo:_,isDirty:N.formState.isDirty,isSaving:f})}),e[24]=N.formState.isDirty,e[25]=f,e[26]=_,e[27]=g,e[28]=S):S=e[28];let w;e[29]!==N?(w=t.jsx("div",{className:"h-full",children:t.jsx(At,{form:N})}),e[29]=N,e[30]=w):w=e[30];let $;return e[31]!==S||e[32]!==w||e[33]!==I?($=t.jsxs(xe,{children:[I,S,w]}),e[31]=S,e[32]=w,e[33]=I,e[34]=$):$=e[34],$}function zt(s){const e=b.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=_t(),e[0]=n):n=e[0];const r=n;if(!r){let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Pe,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=i):i=e[1],i}let l;return e[2]!==o?(l=t.jsx(Te,{children:t.jsx(C.Suspense,{fallback:null,children:t.jsx(Mt,{providerId:r,promptId:o})})}),e[2]=o,e[3]=l):l=e[3],l}const Ut=Qe("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function Lt(s){const e=b.c(10);let o,n,r;e[0]!==s?({className:o,variant:r,...n}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);let l;e[4]!==o||e[5]!==r?(l=U(Ut({variant:r}),o),e[4]=o,e[5]=r,e[6]=l):l=e[6];let i;return e[7]!==n||e[8]!==l?(i=t.jsx("div",{"data-slot":"alert",role:"alert",className:l,...n}),e[7]=n,e[8]=l,e[9]=i):i=e[9],i}function Vt(s){const e=b.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("line-clamp-1 min-h-4 font-medium tracking-tight",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("div",{"data-slot":"alert-title",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Bt(s){const e=b.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("text-muted-foreground leading-relaxed",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("div",{"data-slot":"alert-description",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Oe(s){const e=b.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("min-w-0 overflow-hidden",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Re(s){const e=b.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("ol",{"data-slot":"breadcrumb-list",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function J(s){const e=b.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("li",{"data-slot":"breadcrumb-item",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Q(s){const e=b.c(10);let o,n,r;e[0]!==s?({asChild:o,className:n,...r}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);const l=o?Xe:"a";let i;e[4]!==n?(i=U("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=i):i=e[5];let c;return e[6]!==l||e[7]!==r||e[8]!==i?(c=t.jsx(l,{"data-slot":"breadcrumb-link",className:i,...r}),e[6]=l,e[7]=r,e[8]=i,e[9]=c):c=e[9],c}function De(s){const e=b.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("text-foreground font-medium truncate",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function X(s){const e=b.c(12);let o,n,r;e[0]!==s?({children:o,className:n,...r}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);let l;e[4]!==n?(l=U("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=l):l=e[5];let i;e[6]!==o?(i=o??t.jsx(jt,{}),e[6]=o,e[7]=i):i=e[7];let c;return e[8]!==r||e[9]!==l||e[10]!==i?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...r,children:i}),e[8]=r,e[9]=l,e[10]=i,e[11]=c):c=e[11],c}const Ft=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Jt(s){const e=b.c(11),{toolName:o,connectionId:n,siblings:r,onSelectInstance:l,onBack:i}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const a=St(c);if(!a.isAuthenticated){let u;return e[2]!==a.supportsOAuth||e[3]!==i?(u=t.jsx("div",{className:"flex h-full items-center justify-center",children:a.supportsOAuth?t.jsx(bt,{onAuthenticate:()=>i(),buttonText:"Go back to authenticate"}):t.jsx(Nt,{hasReadme:!1})}),e[2]=a.supportsOAuth,e[3]=i,e[4]=u):u=e[4],u}const x=`${n}:${o}`;let f;return e[5]!==n||e[6]!==l||e[7]!==r||e[8]!==x||e[9]!==o?(f=t.jsx(Wt,{toolName:o,connectionId:n,siblings:r,onSelectInstance:l},x),e[5]=n,e[6]=l,e[7]=r,e[8]=x,e[9]=o,e[10]=f):f=e[10],f}function Wt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:r}=Ye({strict:!1}),l=(()=>{if(!r)return null;const d=`replay-${r}`,m=sessionStorage.getItem(d);if(!m)return null;sessionStorage.removeItem(d);try{return JSON.parse(m)}catch{return null}})(),i=(()=>{if(!l)return null;const d={};for(const[m,j]of Object.entries(l))j!==null&&typeof j=="object"?d[m]=JSON.stringify(j,null,2):d[m]=j;return d})(),[c,a]=C.useState(i??{}),[x,f]=C.useState(l?JSON.stringify(l,null,2):"{}"),[u,h]=C.useState(null),[N,T]=C.useState(null),[_,A]=C.useState(null),[O,y]=C.useState(null),[k,I]=C.useState(!1),[g,S]=C.useState(null),{org:w}=le(),$=_e(e),{sendMessage:v}=It(),P=$t(),{setChatOpen:L}=Tt(),M=`${e}:${s}`,R=ce({connectionId:e,orgId:w.id}),z=wt({client:R}),p=z.data?.tools?.find(d=>d.name===s),E=it(p?._meta),V=d=>{const m=Ct(d.content);m.content.length>0&&(L(!0),v({tiptapDoc:m}))},[D,Y]=C.useState("json"),[Me,ze]=C.useState(!1);E&&!Me&&(Y("ui"),ze(!0));const pe=p?.inputSchema?.properties,fe=pe?Object.keys(pe):[],W=fe.length>0,H={};if(W&&p?.inputSchema?.properties)for(const d of fe)H[d]=p.inputSchema.required?.includes(d)?"":void 0;const Z=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{I(!0),y(null),h(null),T(null),A(null),S(null);const d=performance.now();try{if(!R)throw new Error("MCP client is not available");const m=W?{...H,...c}:(()=>{const B=x.trim();if(!B)return{};const F=JSON.parse(B);if(F&&typeof F=="object")return F;throw new Error("Raw JSON input must be an object.")})();W&&p?.inputSchema?.properties&&Object.entries(p.inputSchema.properties).forEach(([B,F])=>{if((F.type==="object"||F.type==="array")&&typeof m[B]=="string")try{m[B]=JSON.parse(m[B])}catch{}});const j=await R.callTool({name:s,arguments:m}),K=j.structuredContent??j,We=performance.now(),qe=Math.round(We-d);h(K),T(j),A(m);const He=JSON.stringify(K),ge=new TextEncoder().encode(He).length;S({duration:`${qe}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(m){const j=m instanceof Error?m.message:String(m);y(j||"Unknown error occurred");const K=performance.now();S({duration:`${Math.round(K-d)}ms`})}finally{I(!1)}},ee=(d,m)=>{a(j=>({...j,[d]:m}))},Le=()=>{h(null),T(null),A(null),y(null),S(null)},Ve=p?.name??Ft(s),Be=t.jsx(Oe,{children:t.jsxs(Re,{children:[t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:w.slug},children:"Connections"})})}),t.jsx(X,{}),$&&t.jsxs(t.Fragment,{children:[t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:w.slug,appSlug:vt($)},search:{tab:"tools"},children:$.title})})}),t.jsx(X,{})]}),t.jsx(J,{children:t.jsx(De,{children:Ve})})]})}),he=o.length>1&&t.jsxs(be,{value:e,onValueChange:n,children:[t.jsx(Ne,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ve,{})}),t.jsx(Se,{children:o.map(d=>t.jsx(ne,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx($e,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Fe=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),p?.inputSchema?.required&&p.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:W&&p?.inputSchema?.properties?Object.entries(p.inputSchema.properties).map(([d,m])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,p.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:m.type})]}),m.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:m.description}),m.type==="object"||m.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:Z(d)?c[d]??"":H[d]??"",onChange:j=>ee(d,j.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):m.type==="boolean"?t.jsxs(be,{value:Z(d)?String(c[d]??""):"",onValueChange:j=>ee(d,j==="true"),children:[t.jsx(Ne,{children:t.jsx(ve,{placeholder:"Select true or false..."})}),t.jsxs(Se,{children:[t.jsx(ne,{value:"true",children:"true"}),t.jsx(ne,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:Z(d)?c[d]??"":H[d]??"",onChange:j=>ee(d,j.target.value),placeholder:`Enter ${d}...`})]},d)):p?.inputSchema&&!W?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:d=>f(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:k?t.jsxs(q,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Le,children:[t.jsx(mt,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(q,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(gt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),Je=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[g&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.duration})]}),g.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(xt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.tokens})]}),g.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(pt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.bytes})]}),g.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:g.cost})})]}),E&&t.jsx(ct,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(ye,{children:[t.jsx(we,{asChild:!0,children:t.jsx(q,{size:"icon",variant:D==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Y("ui"),children:t.jsx(ft,{size:14})})}),t.jsx(Ce,{children:"Interactive view"})]}),t.jsxs(ye,{children:[t.jsx(we,{asChild:!0,children:t.jsx(q,{size:"icon",variant:D==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Y("json"),children:t.jsx(Ie,{size:14})})}),t.jsx(Ce,{children:"JSON view"})]})]})})]})]}),O&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(Lt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(dt,{className:"h-4 w-4"}),t.jsx(Vt,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(Bt,{className:"text-xs text-destructive",children:O})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:E&&D==="ui"&&R?t.jsx(C.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(at,{resourceURI:E,toolInfo:p?{tool:p}:void 0,toolInput:_??void 0,toolResult:N??void 0,displayMode:"fullscreen",minHeight:je.view.minHeight,maxHeight:je.view.maxHeight,client:R,onMessage:V,onUpdateModelContext:d=>P?.setAppContext(M,d),onTeardown:()=>P?.clearAppContext(M),className:"h-full"})}):u?t.jsxs(t.Fragment,{children:[t.jsx(kt,{code:JSON.stringify(u,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(q,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(u,null,2)),Ze.success("Copied to clipboard")},children:t.jsx(ht,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(Ie,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(xe,{breadcrumb:Be,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx($e,{icon:$?.icon||null,name:$?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[z.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):z.isLoading?t.jsx(ie,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:z.isSuccess?"ready":z.isLoading?"connecting":"error"})]}),t.jsx(yt,{annotations:p?.annotations,_meta:p?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:p?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Fe}),Je]})})]})})}function qt(s){const e=b.c(10),{itemId:o,siblings:n,onBack:r}=s,[l,i]=C.useState(n[0]?.id??"");let c;e[0]!==l||e[1]!==n?(c=n.find(h=>h.id===l)?.id??n[0]?.id??"",e[0]=l,e[1]=n,e[2]=c):c=e[2];const a=c;if(!_e(a||void 0)||!a){let h;return e[3]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=h):h=e[3],h}let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ie,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=f):f=e[4];let u;return e[5]!==a||e[6]!==r||e[7]!==n||e[8]!==o?(u=t.jsx(C.Suspense,{fallback:f,children:t.jsx(Jt,{toolName:o,connectionId:a,siblings:n,onSelectInstance:i,onBack:r})}),e[5]=a,e[6]=r,e[7]=n,e[8]=o,e[9]=u):u=e[9],u}const Ht={workflow:lt,workflow_execution:rt,prompt:zt};function Kt(){const s=b.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),r=decodeURIComponent(n.itemId);let l;s[1]!==n.appSlug?(l={slug:n.appSlug},s[1]=n.appSlug,s[2]=l):l=s[2];const i=Ae(l);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const a=c,x=Gt;let f;return s[5]!==a||s[6]!==r||s[7]!==i?(f=t.jsx(qt,{itemId:r,siblings:i,onBack:a,onUpdate:x}),s[5]=a,s[6]=r,s[7]=i,s[8]=f):f=s[8],f}async function Gt(s){return Promise.resolve()}function Qt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Xt(){const s=b.c(40),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),r=decodeURIComponent(n.collectionName),l=decodeURIComponent(n.itemId);let i;s[1]!==e.history?(i=()=>{e.history.back()},s[1]=e.history,s[2]=i):i=s[2];const c=i,{org:a}=le();let x;s[3]!==n.appSlug?(x={slug:n.appSlug},s[3]=n.appSlug,s[4]=x):x=s[4];const u=Ae(x)[0]??null,h=u?.id??"",N=h||"no-connection",T=h??null;let _;s[5]!==a.id||s[6]!==T?(_={connectionId:T,orgId:a.id},s[5]=a.id,s[6]=T,s[7]=_):_=s[7];const A=ce(_),O=Ee(N,r,A);let y;s[8]!==O||s[9]!==l?(y=async D=>{l&&await O.update.mutateAsync({id:l,data:D})},s[8]=O,s[9]=l,s[10]=y):y=s[10];const k=y;let I;s[11]!==r?(I=r?.toLowerCase(),s[11]=r,s[12]=I):I=s[12];const g=I,S=g&&Ht[g];let w;s[13]!==r?(w=Qt(r),s[13]=r,s[14]=w):w=s[14];const $=w;let v;s[15]!==a.slug?(v=t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:a.slug},children:"Connections"})})}),s[15]=a.slug,s[16]=v):v=s[16];let P;s[17]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(X,{}),s[17]=P):P=s[17];let L;s[18]!==r||s[19]!==u||s[20]!==a.slug||s[21]!==n.appSlug?(L=u&&t.jsxs(t.Fragment,{children:[t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:n.appSlug},search:{tab:r},children:u.title})})}),t.jsx(X,{})]}),s[18]=r,s[19]=u,s[20]=a.slug,s[21]=n.appSlug,s[22]=L):L=s[22];let M;s[23]!==$?(M=t.jsx(J,{children:t.jsx(De,{children:$})}),s[23]=$,s[24]=M):M=s[24];let R;s[25]!==L||s[26]!==M||s[27]!==v?(R=t.jsx(Oe,{children:t.jsxs(Re,{children:[v,P,L,M]})}),s[25]=L,s[26]=M,s[27]=v,s[28]=R):R=s[28];const z=R;if(S){let D;return s[29]!==S||s[30]!==c||s[31]!==k||s[32]!==l?(D=t.jsx(S,{itemId:l,onBack:c,onUpdate:k}),s[29]=S,s[30]=c,s[31]=k,s[32]=l,s[33]=D):D=s[33],D}let p;s[34]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(Et,{size:36,className:"text-muted-foreground"}),s[34]=p):p=s[34];let E;s[35]!==c?(E=t.jsx(Pt,{icon:p,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[35]=c,s[36]=E):E=s[36];let V;return s[37]!==z||s[38]!==E?(V=t.jsx(xe,{breadcrumb:z,children:E}),s[37]=z,s[38]=E,s[39]=V):V=s[39],V}function Yt(){const s=b.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let i;return s[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Kt,{}),s[1]=i):i=s[1],i}let l;return s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Xt,{}),s[2]=l):l=s[2],l}function Cn(){const s=b.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Te,{children:t.jsx(C.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ie,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{Cn as default};
@@ -0,0 +1 @@
1
+ import{e as B,j as s,c as M,B as V}from"./index-D34n6J5J.js";import{D as z,d as _,e as $,c as E}from"./dropdown-menu-v2GifVOh.js";import{i as L,n as O,b as R,d as A,c as F}from"./XClose-BbIo6xHe.js";import{i as S}from"./ChevronDown-DGnjAtqs.js";import{a as I,b as K,T as P,c as W}from"./use-mobile-CxvYCzu9.js";import{V as q}from"./view-mode-toggle-D5CGwPOj.js";import{B as G}from"./badge-s_TAXGUN.js";function te(t){const e=B.c(31),{viewMode:r,onViewModeChange:m,sortKey:T,sortDirection:p,onSort:f,sortOptions:u,filters:h}=t;let g;e[0]!==u?(g=u===void 0?[]:u,e[0]=u,e[1]=g):g=e[1];const j=g;let b;e[2]!==h?(b=h===void 0?[]:h,e[2]=h,e[3]=b):b=e[3];const l=b;let v;e[4]!==l?(v=l.filter(J),e[4]=l,e[5]=v):v=e[5];const N=v.length;let w;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(R,{size:16}),e[6]=w):w=e[6];let i;e[7]!==N?(i=N>0&&s.jsx(G,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[7]=N,e[8]=i):i=e[8];let o;e[9]!==i?(o=s.jsx(I,{asChild:!0,children:s.jsx(_,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"icon",className:"relative",children:[w,i]})})}),e[9]=i,e[10]=o):o=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(K,{children:"Display & filters"}),e[11]=C):C=e[11];let n;e[12]!==o?(n=s.jsx(P,{children:s.jsxs(W,{children:[o,C]})}),e[12]=o,e[13]=n):n=e[13];let a;e[14]!==m||e[15]!==r?(a=m&&r&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:r,onValueChange:m,fullWidth:!0,options:[{value:"table",icon:s.jsx(A,{})},{value:"cards",icon:s.jsx(F,{})}]})}),e[14]=m,e[15]=r,e[16]=a):a=e[16];let c;e[17]!==f||e[18]!==p||e[19]!==T||e[20]!==j?(c=j.length>0&&f&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),j.map(y=>{const D=T===y.id;return s.jsx(z,{onClick:()=>f(y.id),className:M("h-8 px-2 py-0 cursor-pointer",D&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[D&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!D&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:y.label}),D&&p&&(p==="asc"?s.jsx(L,{size:16,className:"text-foreground shrink-0"}):s.jsx(O,{size:16,className:"text-foreground shrink-0"}))]})},y.id)})]}),e[17]=f,e[18]=p,e[19]=T,e[20]=j,e[21]=c):c=e[21];let d;e[22]!==l?(d=l.map(H),e[22]=l,e[23]=d):d=e[23];let x;e[24]!==a||e[25]!==c||e[26]!==d?(x=s.jsxs($,{align:"end",className:"w-[200px] p-0 gap-0",children:[a,c,d]}),e[24]=a,e[25]=c,e[26]=d,e[27]=x):x=e[27];let k;return e[28]!==n||e[29]!==x?(k=s.jsxs(E,{children:[n,x]}),e[28]=n,e[29]=x,e[30]=k):k=e[30],k}function H(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const r=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:M("h-8 px-2 py-0 cursor-pointer",r&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!r&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function J(t){return t.value!=="ALL"}export{te as C};
@@ -1 +1 @@
1
- import{e as v,c as b,j as n,l as w}from"./index-CNolBSVE.js";import{a as C}from"./SearchMd-VdXbz8fL.js";function S(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?n.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):n.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==d?(o=n.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=d,e[13]=o):o=e[13];let a;e[14]!==s||e[15]!==l||e[16]!==o?(a=n.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=n.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{S as C};
1
+ import{e as v,c as b,j as n,l as w}from"./index-D34n6J5J.js";import{i as C}from"./SearchMd-BRJBvWf4.js";function S(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?n.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):n.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==d?(o=n.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=d,e[13]=o):o=e[13];let a;e[14]!==s||e[15]!==l||e[16]!==o?(a=n.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=n.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{S as C};
@@ -1,4 +1,4 @@
1
- import{r as c,bc as P,J as Oe,e as En,c as Ot,j as Ne,l as Mn}from"./index-CNolBSVE.js";import{a as In}from"./SearchMd-VdXbz8fL.js";function An(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const tt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function we(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function bt(e){return"nodeType"in e}function B(e){var t,n;return e?we(e)?e:bt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function mt(e){const{Document:t}=B(e);return e instanceof t}function Fe(e){return we(e)?!1:e instanceof B(e).HTMLElement}function Kt(e){return e instanceof B(e).SVGElement}function ye(e){return e?we(e)?e.document:bt(e)?mt(e)?e:Fe(e)||Kt(e)?e.ownerDocument:document:document:document}const Q=tt?c.useLayoutEffect:c.useEffect;function wt(e){const t=c.useRef(e);return Q(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Nn(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ze(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function $e(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Je(e){const t=wt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function ft(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let ct={};function je(e,t){return c.useMemo(()=>{if(t)return t;const n=ct[e]==null?0:ct[e]+1;return ct[e]=n,e+"-"+n},[e,t])}function Ht(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,s)=>{const a=Object.entries(s);for(const[l,u]of a){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const me=Ht(1),Pe=Ht(-1);function On(e){return"clientX"in e&&"clientY"in e}function yt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function Tn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function ht(e){if(Tn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return On(e)?{x:e.clientX,y:e.clientY}:null}const _e=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[_e.Translate.toString(e),_e.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Tt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ln(e){return e.matches(Tt)?e:e.querySelector(Tt)}const kn={display:"none"};function zn(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:kn},n)}function Pn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Bn(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Vt=c.createContext(null);function Fn(e){const t=c.useContext(Vt);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function $n(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const jn={draggable:`
1
+ import{r as c,bc as P,J as Oe,e as En,c as Ot,j as Ne,l as Mn}from"./index-D34n6J5J.js";import{i as In}from"./SearchMd-BRJBvWf4.js";function An(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const tt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function we(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function bt(e){return"nodeType"in e}function B(e){var t,n;return e?we(e)?e:bt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function mt(e){const{Document:t}=B(e);return e instanceof t}function Fe(e){return we(e)?!1:e instanceof B(e).HTMLElement}function Kt(e){return e instanceof B(e).SVGElement}function ye(e){return e?we(e)?e.document:bt(e)?mt(e)?e:Fe(e)||Kt(e)?e.ownerDocument:document:document:document}const Q=tt?c.useLayoutEffect:c.useEffect;function wt(e){const t=c.useRef(e);return Q(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Nn(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ze(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function $e(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Je(e){const t=wt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function ft(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let ct={};function je(e,t){return c.useMemo(()=>{if(t)return t;const n=ct[e]==null?0:ct[e]+1;return ct[e]=n,e+"-"+n},[e,t])}function Ht(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,s)=>{const a=Object.entries(s);for(const[l,u]of a){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const me=Ht(1),Pe=Ht(-1);function On(e){return"clientX"in e&&"clientY"in e}function yt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function Tn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function ht(e){if(Tn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return On(e)?{x:e.clientX,y:e.clientY}:null}const _e=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[_e.Translate.toString(e),_e.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Tt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ln(e){return e.matches(Tt)?e:e.querySelector(Tt)}const kn={display:"none"};function zn(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:kn},n)}function Pn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Bn(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Vt=c.createContext(null);function Fn(e){const t=c.useContext(Vt);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function $n(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const jn={draggable:`
2
2
  To pick up a draggable item, press the space bar.
3
3
  While dragging, use the arrow keys to move the item.
4
4
  Press space again to drop the item in its new position, or press escape to cancel.
@@ -0,0 +1 @@
1
+ import{e as k,j as s,c as C}from"./index-D34n6J5J.js";import{e as S,d as R,a as T,T as H,b as L,c as z}from"./table-CQMW-Toa.js";import{i as D,n as E}from"./XClose-BbIo6xHe.js";function I(y){const e=k.c(29),{columns:r,data:f,sortKey:x,sortDirection:u,onSort:i,onRowClick:n,rowClassName:c}=y;let p;e[0]!==u?(p=function(t,h){return s.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&u&&(u==="asc"?s.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):s.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=u,e[1]=p):p=e[1];const b=p;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=function(t,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return t===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=d):d=e[2];const a=d;let l;if(e[3]!==r||e[4]!==i||e[5]!==b||e[6]!==x){let o;e[8]!==r.length||e[9]!==i||e[10]!==b||e[11]!==x?(o=(t,h)=>{const N=x===t.id;return s.jsx(S,{className:C(a(h,r.length),"group transition-colors select-none",t.sortable&&"hover:bg-accent cursor-pointer",t.rowClassName,t.cellClassName),onClick:t.sortable&&i?()=>i(t.id):void 0,children:s.jsxs("span",{className:"flex items-center gap-1",children:[t.header,t.sortable&&b(t.id,N)]})},t.id)},e[8]=r.length,e[9]=i,e[10]=b,e[11]=x,e[12]=o):o=e[12],l=r.map(o),e[3]=r,e[4]=i,e[5]=b,e[6]=x,e[7]=l}else l=e[7];let g;e[13]!==l?(g=s.jsx(R,{className:"border-b-0",children:s.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:l})}),e[13]=l,e[14]=g):g=e[14];let j;if(e[15]!==r||e[16]!==f||e[17]!==n||e[18]!==c){let o;e[20]!==r||e[21]!==n||e[22]!==c?(o=(t,h)=>{const N=c?.(t);return s.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",n?"cursor-pointer":"",N),onClick:n?()=>n(t):void 0,children:r.map(m=>s.jsx(H,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:s.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(t):m.accessor?m.accessor(t):null})},m.id))},h)},e[20]=r,e[21]=n,e[22]=c,e[23]=o):o=e[23],j=f.map(o),e[15]=r,e[16]=f,e[17]=n,e[18]=c,e[19]=j}else j=e[19];let w;e[24]!==j?(w=s.jsx(L,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==g||e[27]!==w?(v=s.jsxs(z,{className:"w-full border-collapse",children:[g,w]}),e[26]=g,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(12),{columns:r,data:f,isLoading:x,sortKey:u,sortDirection:i,onSort:n,onRowClick:c,emptyState:p}=y;if(x===void 0?!1:x){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=a):a=e[0],a}if(f.length===0){let a;e[1]!==p?(a=p||s.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=p,e[2]=a):a=e[2];let l;return e[3]!==a?(l=s.jsx("div",{className:"flex items-center justify-center h-full",children:a}),e[3]=a,e[4]=l):l=e[4],l}let d;return e[5]!==r||e[6]!==f||e[7]!==c||e[8]!==n||e[9]!==i||e[10]!==u?(d=s.jsx("div",{className:"flex-1",children:s.jsx(I,{columns:r,data:f,sortKey:u,sortDirection:i,onSort:n,onRowClick:c})}),e[5]=r,e[6]=f,e[7]=c,e[8]=n,e[9]=i,e[10]=u,e[11]=d):d=e[11],d}export{B as C};