decocms 2.178.0 → 2.178.1

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 (305) hide show
  1. package/dist/client/assets/{AlertCircle-DOAxiEBN.js → AlertCircle-CI8iQIN4.js} +1 -1
  2. package/dist/client/assets/{AlignLeft-CRMPlioa.js → AlignLeft-D1a9nQq5.js} +1 -1
  3. package/dist/client/assets/{ArrowDown-xJyK-tRR.js → ArrowDown-bcBjuFxH.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-B-tpcvF0.js → ArrowLeft-BaV7db3X.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BO7WH9Uq.js → ArrowUp-BtIkmj4Y.js} +1 -1
  6. package/dist/client/assets/{Building02-D30T2TCD.js → Building02-R_mkgdQ4.js} +1 -1
  7. package/dist/client/assets/{Check-BTP9VTUM.js → Check-GOz4_bBS.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-DoZ7ERyW.js → CheckCircle-DosFvCW2.js} +1 -1
  9. package/dist/client/assets/{CheckSquare-Dbh9CJyx.js → CheckSquare-Be1kXxvn.js} +1 -1
  10. package/dist/client/assets/{CheckVerified02-CyloHbYs.js → CheckVerified02-CZakFFpv.js} +1 -1
  11. package/dist/client/assets/{ChevronDown-CLapIRmf.js → ChevronDown-DElgod-p.js} +1 -1
  12. package/dist/client/assets/{ChevronLeft-CMUbV0KP.js → ChevronLeft-Bk7mc5_w.js} +1 -1
  13. package/dist/client/assets/{ChevronRight-DWZgTrde.js → ChevronRight-Ys0vr-YD.js} +1 -1
  14. package/dist/client/assets/{ChevronUp-DGOtRvEF.js → ChevronUp-CKkWbsZ5.js} +1 -1
  15. package/dist/client/assets/{Clock-BYjyd9hX.js → Clock-DRICOB0c.js} +1 -1
  16. package/dist/client/assets/{Code01-BkNgeom6.js → Code01-CDxb4LVl.js} +1 -1
  17. package/dist/client/assets/{Container-D7IaxBn4.js → Container-C8ScaknS.js} +1 -1
  18. package/dist/client/assets/{Copy01-BJ5f3Ft8.js → Copy01-DhAVspEC.js} +1 -1
  19. package/dist/client/assets/{Dataflow03-DE7FXw07.js → Dataflow03-ONoSH2VT.js} +1 -1
  20. package/dist/client/assets/{DotsHorizontal-BFhhKBhk.js → DotsHorizontal-BaiN7u8r.js} +1 -1
  21. package/dist/client/assets/{DotsVertical-CmyZ1eER.js → DotsVertical-rvqtR29a.js} +1 -1
  22. package/dist/client/assets/{Download01-C0zy7iAO.js → Download01-CVEqgoRT.js} +1 -1
  23. package/dist/client/assets/{Edit01-BsJ32les.js → Edit01-BaPedGGl.js} +1 -1
  24. package/dist/client/assets/{Edit05-BD2d2k-5.js → Edit05-DSl3Jqkp.js} +1 -1
  25. package/dist/client/assets/{Eye-B3PAdhmZ.js → Eye-BgAytXDm.js} +1 -1
  26. package/dist/client/assets/{EyeOff-_G9JY6d-.js → EyeOff-CucokIoZ.js} +1 -1
  27. package/dist/client/assets/{File02-CAND2NHE.js → File02-gbFS8GtC.js} +1 -1
  28. package/dist/client/assets/{File06-Bvs2lp94.js → File06-Dpi3gJhU.js} +1 -1
  29. package/dist/client/assets/{FilterLines-D-lo1vJH.js → FilterLines-BeHTcRH-.js} +1 -1
  30. package/dist/client/assets/{Globe01-jlGiKRJ-.js → Globe01-Ceb6Pyzg.js} +1 -1
  31. package/dist/client/assets/{Globe02-DpkPR1qQ.js → Globe02-4oAOo4_d.js} +1 -1
  32. package/dist/client/assets/{Grid01-Bootsry8.js → Grid01-NwJJaoW7.js} +1 -1
  33. package/dist/client/assets/{Home02-Cn5GN0Zh.js → Home02-DQJpzzIE.js} +1 -1
  34. package/dist/client/assets/{Image01-BGiNuXLR.js → Image01-BwGUDEUi.js} +1 -1
  35. package/dist/client/assets/{Inbox01-QN0h6e9y.js → Inbox01-CDOpLWwZ.js} +1 -1
  36. package/dist/client/assets/{InfoCircle-BlKvj0NG.js → InfoCircle-CfTVXLYm.js} +1 -1
  37. package/dist/client/assets/{Key01-p6odXPoE.js → Key01-BZkaWvm5.js} +1 -1
  38. package/dist/client/assets/{LayersTwo01-Dj6OMOTN.js → LayersTwo01-D9dHuPjU.js} +1 -1
  39. package/dist/client/assets/{LayoutLeft-Bl9wlb-l.js → LayoutLeft-BHhw95T0.js} +1 -1
  40. package/dist/client/assets/{Link01-GDNtvq6w.js → Link01-CU6UcWFS.js} +1 -1
  41. package/dist/client/assets/{LinkExternal01-Cmp1Jq7T.js → LinkExternal01-DOdBEG1U.js} +1 -1
  42. package/dist/client/assets/{List-BFzJ8d3-.js → List-DD3BKPLz.js} +1 -1
  43. package/dist/client/assets/{Loading01-Bgt2pWQu.js → Loading01-B85tVuIU.js} +1 -1
  44. package/dist/client/assets/{Lock01-CrtAKCVY.js → Lock01-WwvDQaaT.js} +1 -1
  45. package/dist/client/assets/{Play-C6mSLsW0.js → Play-DTPauCd1.js} +1 -1
  46. package/dist/client/assets/{Plus-Bah3bfIq.js → Plus-C9dY5EOr.js} +1 -1
  47. package/dist/client/assets/{RefreshCcw01-D6TQ-sWU.js → RefreshCcw01-DJsZi8Hz.js} +1 -1
  48. package/dist/client/assets/{Save01-DMdPXvfp.js → Save01-COu7GfwR.js} +1 -1
  49. package/dist/client/assets/{SearchMd-CbNARIB_.js → SearchMd-CKp0BoPW.js} +1 -1
  50. package/dist/client/assets/{Settings01-ncSo0UF1.js → Settings01-DunsMQ-m.js} +1 -1
  51. package/dist/client/assets/{Shield01-jjVa8gNb.js → Shield01-CCMtDdxH.js} +1 -1
  52. package/dist/client/assets/{Terminal-BkHJq74m.js → Terminal-COsHV7Wy.js} +1 -1
  53. package/dist/client/assets/{Tool01-CCSFIqz9.js → Tool01-Delk_MGO.js} +1 -1
  54. package/dist/client/assets/{Trash01-DJLT0hlL.js → Trash01-BtiNjuw3.js} +1 -1
  55. package/dist/client/assets/{Upload01-CrylBwgE.js → Upload01-DqqcM3M6.js} +1 -1
  56. package/dist/client/assets/{Users03-ClHTtWuU.js → Users03-CQa5jfkV.js} +1 -1
  57. package/dist/client/assets/{X-Dr3IGE6q.js → X-CaaFSPD_.js} +1 -1
  58. package/dist/client/assets/{XClose-CM_PUH0D.js → XClose-Dey3r3af.js} +1 -1
  59. package/dist/client/assets/{Zap-DNAzZ691.js → Zap-DX02pf-a.js} +1 -1
  60. package/dist/client/assets/{agent-connections-preview-D9yVR2mI.js → agent-connections-preview-BCTZ6BnP.js} +1 -1
  61. package/dist/client/assets/{agent-detail-D9yhjqjE.js → agent-detail-BBSZrHWb.js} +1 -1
  62. package/dist/client/assets/{agents-UYgbyoc-.js → agents-DVOxH2hb.js} +1 -1
  63. package/dist/client/assets/{ai-providers-logos-CKXeyPmY.js → ai-providers-logos-BWU0RfRJ.js} +1 -1
  64. package/dist/client/assets/{alert-dialog-CGRFjIvo.js → alert-dialog-BGZzdkI2.js} +1 -1
  65. package/dist/client/assets/{auth-catchall-DJtyBhDQ.js → auth-catchall-1PjzZ5eD.js} +1 -1
  66. package/dist/client/assets/{automation-detail-Da-KIL0v.js → automation-detail-dSH73muX.js} +1 -1
  67. package/dist/client/assets/{automations-BBeFyOp2.js → automations-CEr8CMbK.js} +1 -1
  68. package/dist/client/assets/{avatar-B6y4oqG6.js → avatar-DWAYNsNK.js} +1 -1
  69. package/dist/client/assets/{badge-BWsagPlP.js → badge-B_BTuJZe.js} +1 -1
  70. package/dist/client/assets/{binder-BfA1Jrrc.js → binder-l1kCmNCE.js} +1 -1
  71. package/dist/client/assets/{breadcrumb-D8mb9kpq.js → breadcrumb-ijphtzQp.js} +1 -1
  72. package/dist/client/assets/{card-C0MItTW_.js → card-CwEWrOs9.js} +1 -1
  73. package/dist/client/assets/{checkbox-DUU3Nuea.js → checkbox-B_91sMwd.js} +1 -1
  74. package/dist/client/assets/{collapsible-CtLdTa6t.js → collapsible-DILfwVxb.js} +1 -1
  75. package/dist/client/assets/{collection-detail-DPIki4up.js → collection-detail-lkCxiUzr.js} +1 -1
  76. package/dist/client/assets/{collection-display-button-DdFInvSR.js → collection-display-button-kCOiEzLn.js} +1 -1
  77. package/dist/client/assets/{collection-search-CGfzh4mC.js → collection-search-Bdxpglbf.js} +1 -1
  78. package/dist/client/assets/{collection-table-wrapper-DLe2aR6i.js → collection-table-wrapper-D-vPJPam.js} +1 -1
  79. package/dist/client/assets/{collection-tabs-DAHXpc2n.js → collection-tabs-IdlFD1jR.js} +1 -1
  80. package/dist/client/assets/{command-C4HnUxgr.js → command-BgTh2_vK.js} +1 -1
  81. package/dist/client/assets/{connection-card-DRd8H1I5.js → connection-card-BWZAp_hO.js} +1 -1
  82. package/dist/client/assets/{connection-detail-MKWBWpRr.js → connection-detail-DPSHmWyz.js} +1 -1
  83. package/dist/client/assets/{connections-CIQDC3QM.js → connections-BvYzdmU4.js} +1 -1
  84. package/dist/client/assets/{constants-C6R-Odkq.js → constants-BCt7c81T.js} +1 -1
  85. package/dist/client/assets/{context-BFTRA5vP.js → context-BTMVzdan.js} +1 -1
  86. package/dist/client/assets/{create-organization-dialog-Bez2nZe0.js → create-organization-dialog-Du7uAMNm.js} +1 -1
  87. package/dist/client/assets/{create-project-dialog-MCGuKGij.js → create-project-dialog-Bb7dubB7.js} +1 -1
  88. package/dist/client/assets/{danger-D1zng7LS.js → danger-CfnLHwII.js} +1 -1
  89. package/dist/client/assets/{danger-zone-DbcRzYYG.js → danger-zone-DjN4GhuT.js} +1 -1
  90. package/dist/client/assets/{dependencies-B8EkZe-H.js → dependencies-CwSG23CA.js} +1 -1
  91. package/dist/client/assets/{dialog-Bw5T2ogY.js → dialog-BDa2Gsq9.js} +1 -1
  92. package/dist/client/assets/{dropdown-menu-Dan8nMb8.js → dropdown-menu-DEQ5DCnG.js} +1 -1
  93. package/dist/client/assets/{dynamic-plugin-layout-BDxV3RAS.js → dynamic-plugin-layout-DP6UGwOE.js} +1 -1
  94. package/dist/client/assets/{editable-task-title-wfBXYVIh.js → editable-task-title-CaE6DIBf.js} +1 -1
  95. package/dist/client/assets/{empty-state-C1iyyf7G.js → empty-state-C4c2sKjV.js} +1 -1
  96. package/dist/client/assets/{empty-state-CoA3_x_6.js → empty-state-DmgqwjeV.js} +1 -1
  97. package/dist/client/assets/{env-vars-editor-CxyeKMFS.js → env-vars-editor-Ah5xyGmz.js} +1 -1
  98. package/dist/client/assets/{extract-connection-data-C8ZedtM3.js → extract-connection-data-BxJWN5u-.js} +1 -1
  99. package/dist/client/assets/{file-browser-CShFs9BG.js → file-browser-BRFmGA__.js} +2 -2
  100. package/dist/client/assets/{form-B1LLlQBa.js → form-BWoxqZfk.js} +1 -1
  101. package/dist/client/assets/{general-Dnfj_B7U.js → general-BKqD1lIr.js} +1 -1
  102. package/dist/client/assets/{generate-id-WpAuYSZF.js → generate-id-BaIFvm62.js} +1 -1
  103. package/dist/client/assets/{grid-view-PzYdekcz.js → grid-view-DGZvuOwZ.js} +1 -1
  104. package/dist/client/assets/{home-CKa-gWjN.js → home-B7jB9Gxp.js} +1 -1
  105. package/dist/client/assets/{index-D-AXXJqO.js → index--PLXALUm.js} +1 -1
  106. package/dist/client/assets/{index-DtZLm-Fz.js → index-10S4l3se.js} +1 -1
  107. package/dist/client/assets/{index-J5pIXVfD.js → index-B5vgf28x.js} +1 -1
  108. package/dist/client/assets/{index-CVayrapI.js → index-Bc448aeG.js} +1 -1
  109. package/dist/client/assets/{index-lUO5B2Do.js → index-BgoahoDu.js} +1 -1
  110. package/dist/client/assets/{index-OdE2HBl6.js → index-CM7_8eMu.js} +1 -1
  111. package/dist/client/assets/{index-BFJo8BQ3.js → index-CTjqFNkw.js} +1 -1
  112. package/dist/client/assets/{index-BkxamE0W.js → index-DGLQ2uQ5.js} +1 -1
  113. package/dist/client/assets/{index-BaVHKLOw.js → index-DZ6p-ZXx.js} +1 -1
  114. package/dist/client/assets/{index-De7oAufQ.js → index-DcxE8oe_.js} +3 -3
  115. package/dist/client/assets/{index-CgSAwZ8g.js → index-WTO-ZRzC.js} +1 -1
  116. package/dist/client/assets/{infiniteQueryObserver-C7xXp1jr.js → infiniteQueryObserver-CzIVu_kK.js} +1 -1
  117. package/dist/client/assets/{input-_VKm0O_1.js → input-DPpAbHbD.js} +1 -1
  118. package/dist/client/assets/{integration-icon-BkY1vh6I.js → integration-icon-6jcHFHZV.js} +1 -1
  119. package/dist/client/assets/{label-BhDDQ3-n.js → label-BtaiiWJ8.js} +1 -1
  120. package/dist/client/assets/{layout-BIFV7MZL.js → layout-Cjef80qc.js} +1 -1
  121. package/dist/client/assets/{layout-CZKgiZuG.js → layout-DG9LlvE6.js} +1 -1
  122. package/dist/client/assets/{login-uo65TNIo.js → login-D1Xb70mS.js} +1 -1
  123. package/dist/client/assets/{logo-upload-CXS8-AgL.js → logo-upload-79T6Ecg3.js} +1 -1
  124. package/dist/client/assets/{mcp-app-renderer-BcsrfZJp.js → mcp-app-renderer-DgOOTmoQ.js} +1 -1
  125. package/dist/client/assets/{mcp-server-card-Bp6C5W6n.js → mcp-server-card-CqBs71hZ.js} +1 -1
  126. package/dist/client/assets/{mcp-server-detail-Ctbkl5jL.js → mcp-server-detail-D_BCRi3w.js} +2 -2
  127. package/dist/client/assets/{members-DCfL7gNX.js → members-BkdG_-Nh.js} +1 -1
  128. package/dist/client/assets/{monaco-editor-DPC7_J-G.js → monaco-editor-D5smiy7k.js} +1 -1
  129. package/dist/client/assets/{monitoring-dashboard-edit-YR1gT6FF.js → monitoring-dashboard-edit-S2Ut1cvD.js} +1 -1
  130. package/dist/client/assets/{monitoring-dashboard-view-BbtnIBfa.js → monitoring-dashboard-view-gNG_IQ8M.js} +1 -1
  131. package/dist/client/assets/{monitoring-ByXLzXVV.js → monitoring-kw0ipyvO.js} +1 -1
  132. package/dist/client/assets/{monitoring-stats-row-Df9ANyzv.js → monitoring-stats-row-D3PlzPcP.js} +1 -1
  133. package/dist/client/assets/{oauth-callback-DAQSPrcu.js → oauth-callback-9ngEzskH.js} +1 -1
  134. package/dist/client/assets/{oauth-callback-ai-provider-BM5LYNPq.js → oauth-callback-ai-provider-CpdQKMVl.js} +1 -1
  135. package/dist/client/assets/{org-ai-providers-6KYO-veN.js → org-ai-providers-CrQ3OeB5.js} +1 -1
  136. package/dist/client/assets/{page-JhhtSWZh.js → page-C2HdbsvN.js} +1 -1
  137. package/dist/client/assets/{page-30eMAMiN.js → page-DmVGFJaY.js} +1 -1
  138. package/dist/client/assets/{plugin-empty-state-R2BzERoW.js → plugin-empty-state-CWxRJkeE.js} +1 -1
  139. package/dist/client/assets/{plugin-empty-state-Cl2I2geD.js → plugin-empty-state-DXhpvNlI.js} +1 -1
  140. package/dist/client/assets/{plugin-header-Bakz3z0e.js → plugin-header-C3JJ8Nq_.js} +1 -1
  141. package/dist/client/assets/{plugin-header-aEsNVQjp.js → plugin-header-TcX-3hN2.js} +1 -1
  142. package/dist/client/assets/plugins-BfcAD8Xs.js +1 -0
  143. package/dist/client/assets/{popover-D_qGIJiq.js → popover-CNIkv0WT.js} +1 -1
  144. package/dist/client/assets/{project-app-view-BFgEphLV.js → project-app-view-BVSK5NCb.js} +1 -1
  145. package/dist/client/assets/{project-layout-C8oyOOGc.js → project-layout-Bd1vlG83.js} +1 -1
  146. package/dist/client/assets/{project-plugins-BVt_WzcU.js → project-plugins-az_ZXSwN.js} +1 -1
  147. package/dist/client/assets/{projects-list-C02pKlJj.js → projects-list-D8eiYeUr.js} +1 -1
  148. package/dist/client/assets/{registry-layout-C-yQnDXG.js → registry-layout-BXceDqEw.js} +1 -1
  149. package/dist/client/assets/{registry-utils-Dqc_kCiP.js → registry-utils-CkCRcmq4.js} +1 -1
  150. package/dist/client/assets/{reset-password-Cqvt_aDI.js → reset-password-xlfm2d95.js} +1 -1
  151. package/dist/client/assets/{resizable-CO0Uh73H.js → resizable-B7fIdnoq.js} +1 -1
  152. package/dist/client/assets/{save-actions-ju1vjafj.js → save-actions-DIKaTzi7.js} +1 -1
  153. package/dist/client/assets/{scroll-area-DL2xzsPP.js → scroll-area-B-pB6oMr.js} +1 -1
  154. package/dist/client/assets/{select-B4liIMVc.js → select-DeNgR918.js} +1 -1
  155. package/dist/client/assets/{select-virtual-mcp-CuflMlTt.js → select-virtual-mcp-CFDIRCp8.js} +1 -1
  156. package/dist/client/assets/{sheet-Cjr3EcYH.js → sheet-BBLyN2xl.js} +1 -1
  157. package/dist/client/assets/{shell-layout-DfTROeX_.js → shell-layout-CiKn6BP6.js} +2 -2
  158. package/dist/client/assets/{sidebar-settings-BljNzJVO.js → sidebar-settings-DOwlHFdj.js} +1 -1
  159. package/dist/client/assets/{skeleton-Bt7MRTvB.js → skeleton-CNgs5GJt.js} +1 -1
  160. package/dist/client/assets/{spinner-Cse1gKnw.js → spinner-BZdAS5i2.js} +1 -1
  161. package/dist/client/assets/{store-invite-D8XeTZbu.js → store-invite-BXcKXIzr.js} +1 -1
  162. package/dist/client/assets/{switch-DHS6rwq-.js → switch-CmREXk8C.js} +1 -1
  163. package/dist/client/assets/{table-BPkNFl3F.js → table-C4WVepD4.js} +1 -1
  164. package/dist/client/assets/{tabs-D9xzXdQn.js → tabs-BeYHPY-1.js} +1 -1
  165. package/dist/client/assets/{task-status-DPcRgg7n.js → task-status-DauQRqAW.js} +24 -24
  166. package/dist/client/assets/tasks-fQ7kFf17.js +1 -0
  167. package/dist/client/assets/{tasks-panel-i3VUreUx.js → tasks-panel-DqbQRMGq.js} +1 -1
  168. package/dist/client/assets/{textarea-C_pKpP9s.js → textarea-C7YqhWTc.js} +1 -1
  169. package/dist/client/assets/{time-range-picker-BuykPBni.js → time-range-picker-CM-9xODE.js} +1 -1
  170. package/dist/client/assets/{toggle-group-VpRSF_Gl.js → toggle-group-B7g3fYap.js} +1 -1
  171. package/dist/client/assets/{tools-list-DDFWIxxm.js → tools-list-4D_tBiUe.js} +1 -1
  172. package/dist/client/assets/{tooltip-C4rlkzSj.js → tooltip-CXZH0tSC.js} +1 -1
  173. package/dist/client/assets/{topbar-portal-CF1YRovU.js → topbar-portal-CjA9qO3_.js} +1 -1
  174. package/dist/client/assets/{types-DQbIwrMI.js → types-CPj3Y6i2.js} +1 -1
  175. package/dist/client/assets/{use-automations-C1HgdvUZ.js → use-automations-B0CZymwk.js} +1 -1
  176. package/dist/client/assets/{use-collections-CN-KZdhF.js → use-collections-CObsJD7p.js} +1 -1
  177. package/dist/client/assets/{use-connection-C4RNTGYe.js → use-connection-Cv_-e2MS.js} +1 -1
  178. package/dist/client/assets/{use-copy-Cyun7kVE.js → use-copy-sxHnzQ3E.js} +1 -1
  179. package/dist/client/assets/{use-create-virtual-mcp-4JnIm_fY.js → use-create-virtual-mcp-dSjfTRl8.js} +1 -1
  180. package/dist/client/assets/{use-infinite-scroll-B1b4xMpn.js → use-infinite-scroll-CqxPDCSp.js} +1 -1
  181. package/dist/client/assets/{use-install-from-registry-CytyaLQX.js → use-install-from-registry-wW1d1HtB.js} +1 -1
  182. package/dist/client/assets/{use-list-state-CCkxYz8q.js → use-list-state-CWVUvMhj.js} +1 -1
  183. package/dist/client/assets/{use-mcp-prompts-BGZnglwN.js → use-mcp-prompts-C4X4lEEg.js} +1 -1
  184. package/dist/client/assets/{use-mcp-resources-DSKOWSEO.js → use-mcp-resources-DoUnZI9j.js} +1 -1
  185. package/dist/client/assets/{use-mcp-tools-C2aTDAuJ.js → use-mcp-tools-Cnh4vEBm.js} +1 -1
  186. package/dist/client/assets/{use-members-DjL_-1xN.js → use-members-BHa-Fb-h.js} +1 -1
  187. package/dist/client/assets/{use-mobile-CMHMyYVi.js → use-mobile-v2XXLV0O.js} +1 -1
  188. package/dist/client/assets/{use-project-DxPDjIre.js → use-project-B-9YXhNP.js} +1 -1
  189. package/dist/client/assets/{use-store-discovery-BBXrVOcG.js → use-store-discovery-z8nwAYJJ.js} +1 -1
  190. package/dist/client/assets/{use-view-mode-CXln2RGt.js → use-view-mode-XMRPR1ke.js} +1 -1
  191. package/dist/client/assets/{use-virtual-mcp-AdVimCkX.js → use-virtual-mcp-DfPJ-WDb.js} +1 -1
  192. package/dist/client/assets/useInfiniteQuery-BIejUr4H.js +1 -0
  193. package/dist/client/assets/{useMutation-BDzOMrvq.js → useMutation-CV3IN68C.js} +1 -1
  194. package/dist/client/assets/useQuery-CEE9SUlS.js +1 -0
  195. package/dist/client/assets/useSuspenseInfiniteQuery-B7NkSjI9.js +1 -0
  196. package/dist/client/assets/{user-DSh4pFej.js → user-_Hc5WOWn.js} +1 -1
  197. package/dist/client/assets/{workflow-mIahQD3R.js → workflow-DKAllKJO.js} +1 -1
  198. package/dist/client/index.html +1 -1
  199. package/dist/server/node_modules/pg-cloudflare/LICENSE +21 -0
  200. package/dist/server/node_modules/pg-cloudflare/README.md +112 -0
  201. package/dist/server/node_modules/pg-cloudflare/dist/empty.d.ts +2 -0
  202. package/dist/server/node_modules/pg-cloudflare/dist/empty.js +6 -0
  203. package/dist/server/node_modules/pg-cloudflare/dist/empty.js.map +1 -0
  204. package/dist/server/node_modules/pg-cloudflare/dist/index.d.ts +31 -0
  205. package/dist/server/node_modules/pg-cloudflare/dist/index.js +152 -0
  206. package/dist/server/node_modules/pg-cloudflare/dist/index.js.map +1 -0
  207. package/dist/server/node_modules/pg-cloudflare/esm/index.mjs +3 -0
  208. package/dist/server/node_modules/pg-cloudflare/package.json +39 -0
  209. package/dist/server/node_modules/pg-cloudflare/src/empty.ts +3 -0
  210. package/dist/server/node_modules/pg-cloudflare/src/index.ts +166 -0
  211. package/dist/server/node_modules/pg-cloudflare/src/types.d.ts +25 -0
  212. package/dist/server/node_modules/pg-int8/LICENSE +13 -0
  213. package/dist/server/node_modules/pg-int8/README.md +16 -0
  214. package/dist/server/node_modules/pg-int8/index.js +100 -0
  215. package/dist/server/node_modules/pg-int8/package.json +24 -0
  216. package/dist/server/node_modules/pg-protocol/LICENSE +21 -0
  217. package/dist/server/node_modules/pg-protocol/README.md +3 -0
  218. package/dist/server/node_modules/pg-protocol/dist/b.d.ts +1 -0
  219. package/dist/server/node_modules/pg-protocol/dist/b.js +23 -0
  220. package/dist/server/node_modules/pg-protocol/dist/b.js.map +1 -0
  221. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.d.ts +15 -0
  222. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js +55 -0
  223. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js.map +1 -0
  224. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.d.ts +16 -0
  225. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js +81 -0
  226. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js.map +1 -0
  227. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.d.ts +1 -0
  228. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js +530 -0
  229. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js.map +1 -0
  230. package/dist/server/node_modules/pg-protocol/dist/index.d.ts +6 -0
  231. package/dist/server/node_modules/pg-protocol/dist/index.js +15 -0
  232. package/dist/server/node_modules/pg-protocol/dist/index.js.map +1 -0
  233. package/dist/server/node_modules/pg-protocol/dist/messages.d.ts +162 -0
  234. package/dist/server/node_modules/pg-protocol/dist/messages.js +160 -0
  235. package/dist/server/node_modules/pg-protocol/dist/messages.js.map +1 -0
  236. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts +1 -0
  237. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js +252 -0
  238. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js.map +1 -0
  239. package/dist/server/node_modules/pg-protocol/dist/parser.d.ts +24 -0
  240. package/dist/server/node_modules/pg-protocol/dist/parser.js +324 -0
  241. package/dist/server/node_modules/pg-protocol/dist/parser.js.map +1 -0
  242. package/dist/server/node_modules/pg-protocol/dist/serializer.d.ts +42 -0
  243. package/dist/server/node_modules/pg-protocol/dist/serializer.js +189 -0
  244. package/dist/server/node_modules/pg-protocol/dist/serializer.js.map +1 -0
  245. package/dist/server/node_modules/pg-protocol/esm/index.js +11 -0
  246. package/dist/server/node_modules/pg-protocol/package.json +45 -0
  247. package/dist/server/node_modules/pg-protocol/src/b.ts +25 -0
  248. package/dist/server/node_modules/pg-protocol/src/buffer-reader.ts +58 -0
  249. package/dist/server/node_modules/pg-protocol/src/buffer-writer.ts +85 -0
  250. package/dist/server/node_modules/pg-protocol/src/inbound-parser.test.ts +575 -0
  251. package/dist/server/node_modules/pg-protocol/src/index.ts +11 -0
  252. package/dist/server/node_modules/pg-protocol/src/messages.ts +262 -0
  253. package/dist/server/node_modules/pg-protocol/src/outbound-serializer.test.ts +276 -0
  254. package/dist/server/node_modules/pg-protocol/src/parser.ts +413 -0
  255. package/dist/server/node_modules/pg-protocol/src/serializer.ts +274 -0
  256. package/dist/server/node_modules/pg-protocol/src/testing/buffer-list.ts +67 -0
  257. package/dist/server/node_modules/pg-protocol/src/testing/test-buffers.ts +166 -0
  258. package/dist/server/node_modules/pg-protocol/src/types/chunky.d.ts +1 -0
  259. package/dist/server/node_modules/pg-types/.travis.yml +7 -0
  260. package/dist/server/node_modules/pg-types/Makefile +14 -0
  261. package/dist/server/node_modules/pg-types/README.md +75 -0
  262. package/dist/server/node_modules/pg-types/index.d.ts +137 -0
  263. package/dist/server/node_modules/pg-types/index.js +47 -0
  264. package/dist/server/node_modules/pg-types/index.test-d.ts +21 -0
  265. package/dist/server/node_modules/pg-types/lib/arrayParser.js +11 -0
  266. package/dist/server/node_modules/pg-types/lib/binaryParsers.js +257 -0
  267. package/dist/server/node_modules/pg-types/lib/builtins.js +73 -0
  268. package/dist/server/node_modules/pg-types/lib/textParsers.js +215 -0
  269. package/dist/server/node_modules/pg-types/package.json +42 -0
  270. package/dist/server/node_modules/pg-types/test/index.js +24 -0
  271. package/dist/server/node_modules/pg-types/test/types.js +597 -0
  272. package/dist/server/node_modules/pgpass/README.md +74 -0
  273. package/dist/server/node_modules/pgpass/lib/helper.js +233 -0
  274. package/dist/server/node_modules/pgpass/lib/index.js +23 -0
  275. package/dist/server/node_modules/pgpass/package.json +41 -0
  276. package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
  277. package/dist/server/node_modules/postgres-array/index.js +97 -0
  278. package/dist/server/node_modules/postgres-array/license +21 -0
  279. package/dist/server/node_modules/postgres-array/package.json +35 -0
  280. package/dist/server/node_modules/postgres-array/readme.md +43 -0
  281. package/dist/server/node_modules/postgres-bytea/index.js +33 -0
  282. package/dist/server/node_modules/postgres-bytea/license +21 -0
  283. package/dist/server/node_modules/postgres-bytea/package.json +34 -0
  284. package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
  285. package/dist/server/node_modules/postgres-date/index.js +116 -0
  286. package/dist/server/node_modules/postgres-date/license +21 -0
  287. package/dist/server/node_modules/postgres-date/package.json +33 -0
  288. package/dist/server/node_modules/postgres-date/readme.md +49 -0
  289. package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
  290. package/dist/server/node_modules/postgres-interval/index.js +125 -0
  291. package/dist/server/node_modules/postgres-interval/license +21 -0
  292. package/dist/server/node_modules/postgres-interval/package.json +36 -0
  293. package/dist/server/node_modules/postgres-interval/readme.md +48 -0
  294. package/dist/server/node_modules/split2/LICENSE +13 -0
  295. package/dist/server/node_modules/split2/README.md +85 -0
  296. package/dist/server/node_modules/split2/bench.js +27 -0
  297. package/dist/server/node_modules/split2/index.js +141 -0
  298. package/dist/server/node_modules/split2/package.json +39 -0
  299. package/dist/server/node_modules/split2/test.js +409 -0
  300. package/package.json +1 -1
  301. package/dist/client/assets/plugins-CJOgdAgY.js +0 -1
  302. package/dist/client/assets/tasks-CAcIEtSF.js +0 -1
  303. package/dist/client/assets/useInfiniteQuery-Dw4aF3nd.js +0 -1
  304. package/dist/client/assets/useQuery-CTePvczf.js +0 -1
  305. package/dist/client/assets/useSuspenseInfiniteQuery-All2JJwt.js +0 -1
@@ -1,4 +1,4 @@
1
- import{c5 as It,c6 as _t,bP as Et,bi as D,n as d,c7 as oe,c8 as qe,bZ as Tt,b_ as St,bm as Mt,bl as P,av as K,ax as se,o as S,bj as h,aw as U,c9 as At,ca as w,ay as wt,z as L,v as me,c as ze,r as z}from"./index-De7oAufQ.js";import{d as xt}from"./constants-C6R-Odkq.js";import{A as Te,D as de}from"./decopilot-events-Brt4gAR6.js";import"./index-CVayrapI.js";var ee;(function(t){t.assertEqual=r=>{};function e(r){}t.assertIs=e;function a(r){throw new Error}t.assertNever=a,t.arrayToEnum=r=>{const n={};for(const o of r)n[o]=o;return n},t.getValidEnumValues=r=>{const n=t.objectKeys(r).filter(i=>typeof r[r[i]]!="number"),o={};for(const i of n)o[i]=r[i];return t.objectValues(o)},t.objectValues=r=>t.objectKeys(r).map(function(n){return r[n]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const n=[];for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&n.push(o);return n},t.find=(r,n)=>{for(const o of r)if(n(o))return o},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function s(r,n=" | "){return r.map(o=>typeof o=="string"?`'${o}'`:o).join(n)}t.joinValues=s,t.jsonStringifyReplacer=(r,n)=>typeof n=="bigint"?n.toString():n})(ee||(ee={}));var Se;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Se||(Se={}));ee.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);ee.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 le extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(n){return n.message},s={_errors:[]},r=n=>{for(const o of n.issues)if(o.code==="invalid_union")o.unionErrors.map(r);else if(o.code==="invalid_return_type")r(o.returnTypeError);else if(o.code==="invalid_arguments")r(o.argumentsError);else if(o.path.length===0)s._errors.push(a(o));else{let i=s,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(i[l]=i[l]||{_errors:[]},i[l]._errors.push(a(o))):i[l]=i[l]||{_errors:[]},i=i[l],u++}}};return r(this),s}static assert(e){if(!(e instanceof le))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ee.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),s=[];for(const r of this.issues)if(r.path.length>0){const n=r.path[0];a[n]=a[n]||[],a[n].push(e(r))}else s.push(e(r));return{formErrors:s,fieldErrors:a}}get formErrors(){return this.flatten()}}le.create=t=>new le(t);var Me;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Me||(Me={}));var g;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(g||(g={}));var We="vercel.ai.error",Rt=Symbol.for(We),Ae,we,F=class Ye extends(we=Error,Ae=Rt,we){constructor({name:e,message:a,cause:s}){super(a),this[Ae]=!0,this.name=e,this.cause=s}static isInstance(e){return Ye.hasMarker(e,We)}static hasMarker(e,a){const s=Symbol.for(a);return e!=null&&typeof e=="object"&&s in e&&typeof e[s]=="boolean"&&e[s]===!0}};function He(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Ge="AI_InvalidArgumentError",Xe=`vercel.ai.error.${Ge}`,Nt=Symbol.for(Xe),xe,Re,Ot=class extends(Re=F,xe=Nt,Re){constructor({message:t,cause:e,argument:a}){super({name:Ge,message:t,cause:e}),this[xe]=!0,this.argument=a}static isInstance(t){return F.hasMarker(t,Xe)}},Qe="AI_JSONParseError",Ke=`vercel.ai.error.${Qe}`,Ct=Symbol.for(Ke),Ne,Oe,Ce=class extends(Oe=F,Ne=Ct,Oe){constructor({text:t,cause:e}){super({name:Qe,message:`JSON parsing failed: Text: ${t}.
1
+ import{c5 as It,c6 as _t,bP as Et,bi as D,n as d,c7 as oe,c8 as qe,bZ as Tt,b_ as St,bm as Mt,bl as P,av as K,ax as se,o as S,bj as h,aw as U,c9 as At,ca as w,ay as wt,z as L,v as me,c as ze,r as z}from"./index-DcxE8oe_.js";import{d as xt}from"./constants-BCt7c81T.js";import{A as Te,D as de}from"./decopilot-events-Brt4gAR6.js";import"./index-Bc448aeG.js";var ee;(function(t){t.assertEqual=r=>{};function e(r){}t.assertIs=e;function a(r){throw new Error}t.assertNever=a,t.arrayToEnum=r=>{const n={};for(const o of r)n[o]=o;return n},t.getValidEnumValues=r=>{const n=t.objectKeys(r).filter(i=>typeof r[r[i]]!="number"),o={};for(const i of n)o[i]=r[i];return t.objectValues(o)},t.objectValues=r=>t.objectKeys(r).map(function(n){return r[n]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const n=[];for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&n.push(o);return n},t.find=(r,n)=>{for(const o of r)if(n(o))return o},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function s(r,n=" | "){return r.map(o=>typeof o=="string"?`'${o}'`:o).join(n)}t.joinValues=s,t.jsonStringifyReplacer=(r,n)=>typeof n=="bigint"?n.toString():n})(ee||(ee={}));var Se;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Se||(Se={}));ee.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);ee.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 le extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(n){return n.message},s={_errors:[]},r=n=>{for(const o of n.issues)if(o.code==="invalid_union")o.unionErrors.map(r);else if(o.code==="invalid_return_type")r(o.returnTypeError);else if(o.code==="invalid_arguments")r(o.argumentsError);else if(o.path.length===0)s._errors.push(a(o));else{let i=s,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(i[l]=i[l]||{_errors:[]},i[l]._errors.push(a(o))):i[l]=i[l]||{_errors:[]},i=i[l],u++}}};return r(this),s}static assert(e){if(!(e instanceof le))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ee.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),s=[];for(const r of this.issues)if(r.path.length>0){const n=r.path[0];a[n]=a[n]||[],a[n].push(e(r))}else s.push(e(r));return{formErrors:s,fieldErrors:a}}get formErrors(){return this.flatten()}}le.create=t=>new le(t);var Me;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Me||(Me={}));var g;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(g||(g={}));var We="vercel.ai.error",Rt=Symbol.for(We),Ae,we,F=class Ye extends(we=Error,Ae=Rt,we){constructor({name:e,message:a,cause:s}){super(a),this[Ae]=!0,this.name=e,this.cause=s}static isInstance(e){return Ye.hasMarker(e,We)}static hasMarker(e,a){const s=Symbol.for(a);return e!=null&&typeof e=="object"&&s in e&&typeof e[s]=="boolean"&&e[s]===!0}};function He(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Ge="AI_InvalidArgumentError",Xe=`vercel.ai.error.${Ge}`,Nt=Symbol.for(Xe),xe,Re,Ot=class extends(Re=F,xe=Nt,Re){constructor({message:t,cause:e,argument:a}){super({name:Ge,message:t,cause:e}),this[xe]=!0,this.argument=a}static isInstance(t){return F.hasMarker(t,Xe)}},Qe="AI_JSONParseError",Ke=`vercel.ai.error.${Qe}`,Ct=Symbol.for(Ke),Ne,Oe,Ce=class extends(Oe=F,Ne=Ct,Oe){constructor({text:t,cause:e}){super({name:Qe,message:`JSON parsing failed: Text: ${t}.
2
2
  Error message: ${He(e)}`,cause:e}),this[Ne]=!0,this.text=t}static isInstance(t){return F.hasMarker(t,Ke)}},et="AI_TypeValidationError",tt=`vercel.ai.error.${et}`,Pt=Symbol.for(tt),Pe,De,H=class ge extends(De=F,Pe=Pt,De){constructor({value:e,cause:a,context:s}){let r="Type validation failed";if(s?.field&&(r+=` for ${s.field}`),s?.entityName||s?.entityId){r+=" (";const n=[];s.entityName&&n.push(s.entityName),s.entityId&&n.push(`id: "${s.entityId}"`),r+=n.join(", "),r+=")"}super({name:et,message:`${r}: Value: ${JSON.stringify(e)}.
3
3
  Error message: ${He(a)}`,cause:a}),this[Pe]=!0,this.value=e,this.context=s}static isInstance(e){return F.hasMarker(e,tt)}static wrap({value:e,cause:a,context:s}){var r,n,o;return ge.isInstance(a)&&a.value===e&&((r=a.context)==null?void 0:r.field)===s?.field&&((n=a.context)==null?void 0:n.entityName)===s?.entityName&&((o=a.context)==null?void 0:o.entityId)===s?.entityId?a:new ge({value:e,cause:a,context:s})}},re=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:s="-"}={})=>{const r=()=>{const n=a.length,o=new Array(e);for(let i=0;i<e;i++)o[i]=a[Math.random()*n|0];return o.join("")};if(t==null)return r;if(a.includes(s))throw new Ot({argument:"separator",message:`The separator "${s}" must not be part of the alphabet "${a}".`});return()=>`${t}${s}${r()}`},Dt=re();function ke(t=globalThis){var e,a,s;return t.window?"runtime/browser":(e=t.navigator)!=null&&e.userAgent?`runtime/${t.navigator.userAgent.toLowerCase()}`:(s=(a=t.process)==null?void 0:a.versions)!=null&&s.node?`runtime/node.js/${t.process.version.substring(0)}`:t.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function q(t){if(t==null)return{};const e={};if(t instanceof Headers)t.forEach((a,s)=>{e[s.toLowerCase()]=a});else{Array.isArray(t)||(t=Object.entries(t));for(const[a,s]of t)s!=null&&(e[a.toLowerCase()]=s)}return e}function je(t,...e){const a=new Headers(q(t)),s=a.get("user-agent")||"";return a.set("user-agent",[s,...e].filter(Boolean).join(" ")),Object.fromEntries(a.entries())}var kt=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,jt=/"(?: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 $e(t){const e=JSON.parse(t);return e===null||typeof e!="object"||kt.test(t)===!1&&jt.test(t)===!1?e:$t(e)}function $t(t){let e=[t];for(;e.length;){const a=e;e=[];for(const s of a){if(Object.prototype.hasOwnProperty.call(s,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(s,"constructor")&&s.constructor!==null&&typeof s.constructor=="object"&&Object.prototype.hasOwnProperty.call(s.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const r in s){const n=s[r];n&&typeof n=="object"&&e.push(n)}}}return t}function Zt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return $e(t)}try{return $e(t)}finally{Error.stackTraceLimit=e}}function Ie(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const s of Object.keys(a))a[s]=J(a[s])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(J):J(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(J)),t.allOf!=null&&(t.allOf=t.allOf.map(J)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(J));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=J(e[a]);return t}function J(t){return typeof t=="boolean"?t:Ie(t)}var Ft=Symbol("Let zodToJsonSchema decide on which parser to use"),Ze={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"},Lt=t=>typeof t=="string"?{...Ze,name:t}:{...Ze,...t};function k(){return{}}function Ut(t,e){var a,s,r;const n={type:"array"};return(a=t.type)!=null&&a._def&&((r=(s=t.type)==null?void 0:s._def)==null?void 0:r.typeName)!==g.ZodAny&&(n.items=_(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(n.minItems=t.minLength.value),t.maxLength&&(n.maxItems=t.maxLength.value),t.exactLength&&(n.minItems=t.exactLength.value,n.maxItems=t.exactLength.value),n}function Bt(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function Vt(){return{type:"boolean"}}function at(t,e){return _(t.type._def,e)}var Jt=(t,e)=>_(t.innerType._def,e);function st(t,e,a){const s=a??e.dateStrategy;if(Array.isArray(s))return{anyOf:s.map((r,n)=>st(t,e,r))};switch(s){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return qt(t)}}var qt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function zt(t,e){return{..._(t.innerType._def,e),default:t.defaultValue()}}function Wt(t,e){return e.effectStrategy==="input"?_(t.schema._def,e):k()}function Yt(t){return{type:"string",enum:Array.from(t.values)}}var Ht=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function Gt(t,e){const a=[_(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),_(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(r=>!!r),s=[];return a.forEach(r=>{if(Ht(r))s.push(...r.allOf);else{let n=r;if("additionalProperties"in r&&r.additionalProperties===!1){const{additionalProperties:o,...i}=r;n=i}s.push(n)}}),s.length?{allOf:s}:void 0}function Xt(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var pe=void 0,$={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:()=>(pe===void 0&&(pe=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),pe),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 rt(t,e){const a={type:"string"};if(t.checks)for(const s of t.checks)switch(s.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,s.value):s.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,s.value):s.value;break;case"email":switch(e.emailStrategy){case"format:email":Z(a,"email",s.message,e);break;case"format:idn-email":Z(a,"idn-email",s.message,e);break;case"pattern:zod":C(a,$.email,s.message,e);break}break;case"url":Z(a,"uri",s.message,e);break;case"uuid":Z(a,"uuid",s.message,e);break;case"regex":C(a,s.regex,s.message,e);break;case"cuid":C(a,$.cuid,s.message,e);break;case"cuid2":C(a,$.cuid2,s.message,e);break;case"startsWith":C(a,RegExp(`^${fe(s.value,e)}`),s.message,e);break;case"endsWith":C(a,RegExp(`${fe(s.value,e)}$`),s.message,e);break;case"datetime":Z(a,"date-time",s.message,e);break;case"date":Z(a,"date",s.message,e);break;case"time":Z(a,"time",s.message,e);break;case"duration":Z(a,"duration",s.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,s.value):s.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,s.value):s.value;break;case"includes":{C(a,RegExp(fe(s.value,e)),s.message,e);break}case"ip":{s.version!=="v6"&&Z(a,"ipv4",s.message,e),s.version!=="v4"&&Z(a,"ipv6",s.message,e);break}case"base64url":C(a,$.base64url,s.message,e);break;case"jwt":C(a,$.jwt,s.message,e);break;case"cidr":{s.version!=="v6"&&C(a,$.ipv4Cidr,s.message,e),s.version!=="v4"&&C(a,$.ipv6Cidr,s.message,e);break}case"emoji":C(a,$.emoji(),s.message,e);break;case"ulid":{C(a,$.ulid,s.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{Z(a,"binary",s.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{C(a,$.base64,s.message,e);break}}break}case"nanoid":C(a,$.nanoid,s.message,e)}return a}function fe(t,e){return e.patternStrategy==="escape"?Kt(t):t}var Qt=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function Kt(t){let e="";for(let a=0;a<t.length;a++)Qt.has(t[a])||(e+="\\"),e+=t[a];return e}function Z(t,e,a,s){var r;t.format||(r=t.anyOf)!=null&&r.some(n=>n.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&s.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function C(t,e,a,s){var r;t.pattern||(r=t.allOf)!=null&&r.some(n=>n.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Fe(e,s),...a&&s.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Fe(e,s)}function Fe(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const s={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},r=s.i?t.source.toLowerCase():t.source;let n="",o=!1,i=!1,u=!1;for(let l=0;l<r.length;l++){if(o){n+=r[l],o=!1;continue}if(s.i){if(i){if(r[l].match(/[a-z]/)){u?(n+=r[l],n+=`${r[l-2]}-${r[l]}`.toUpperCase(),u=!1):r[l+1]==="-"&&((a=r[l+2])!=null&&a.match(/[a-z]/))?(n+=r[l],u=!0):n+=`${r[l]}${r[l].toUpperCase()}`;continue}}else if(r[l].match(/[a-z]/)){n+=`[${r[l]}${r[l].toUpperCase()}]`;continue}}if(s.m){if(r[l]==="^"){n+=`(^|(?<=[\r
4
4
  ]))`;continue}else if(r[l]==="$"){n+=`($|(?=[\r
@@ -1 +1 @@
1
- import{o as A,n as D,c as O,q as v,t as E,j as r,B as N,f as I}from"./index-De7oAufQ.js";import{A as M,a as L,b as R,c as T,d as $,e as q,f as B}from"./alert-dialog-CGRFjIvo.js";import{F as V,a as k,b as H,c as U,d as G,e as J,f as K}from"./form-B1LLlQBa.js";import{I as P}from"./input-_VKm0O_1.js";import{S as Q}from"./spinner-Cse1gKnw.js";import{u as W}from"./useMutation-BDzOMrvq.js";function _(o){return o.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const X=A({name:D().min(2,"Organization name is required")});function se(o){const e=O.c(41),{open:a,onOpenChange:s}=o;let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={resolver:v(X),defaultValues:{name:""}},e[0]=j):j=e[0];const t=E(j);let w;e[1]===Symbol.for("react.memo_cache_sentinel")?(w={mutationFn:Z,onSuccess:Y},e[1]=w):w=e[1];const i=W(w),z=i.error instanceof Error?i.error.message:i.error?"Failed to create organization.":null;let F;e[2]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsxs(R,{children:[r.jsx(T,{children:"Create a new organization"}),r.jsx($,{children:"Set up a new organization to collaborate with others."})]}),e[2]=F):F=e[2];let n;if(e[3]!==i||e[4]!==t){let p;e[6]!==i?(p=b=>i.mutateAsync(b),e[6]=i,e[7]=p):p=e[7],n=t.handleSubmit(p),e[3]=i,e[4]=t,e[5]=n}else n=e[5];let l;e[8]!==t.formState.isSubmitting?(l=p=>{const{field:b}=p;return r.jsxs(H,{children:[r.jsx(U,{children:"Organization Name"}),r.jsx(G,{children:r.jsx(P,{...b,placeholder:"Acme Inc.",disabled:t.formState.isSubmitting})}),r.jsx(J,{children:"The name of your company or organization"}),b.value&&r.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",r.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",_(b.value)]})]}),r.jsx(K,{})]})},e[8]=t.formState.isSubmitting,e[9]=l):l=e[9];let m;e[10]!==t.control||e[11]!==l?(m=r.jsx(V,{control:t.control,name:"name",render:l}),e[10]=t.control,e[11]=l,e[12]=m):m=e[12];let c;e[13]!==z?(c=z&&r.jsx("div",{className:"text-destructive text-sm mt-2",children:z}),e[13]=z,e[14]=c):c=e[14];let f;e[15]!==i||e[16]!==t?(f=()=>{i.reset(),t.reset()},e[15]=i,e[16]=t,e[17]=f):f=e[17];let g;e[18]!==t.formState.isSubmitting||e[19]!==f?(g=r.jsx(M,{disabled:t.formState.isSubmitting,onClick:f,children:"Cancel"}),e[18]=t.formState.isSubmitting,e[19]=f,e[20]=g):g=e[20];const y=!t.formState.isValid||t.formState.isSubmitting;let u;e[21]!==t.formState.isSubmitting?(u=t.formState.isSubmitting?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx(Q,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=t.formState.isSubmitting,e[22]=u):u=e[22];let d;e[23]!==y||e[24]!==u?(d=r.jsx(N,{type:"submit",variant:"default",disabled:y,children:u}),e[23]=y,e[24]=u,e[25]=d):d=e[25];let S;e[26]!==d||e[27]!==g?(S=r.jsxs(q,{children:[g,d]}),e[26]=d,e[27]=g,e[28]=S):S=e[28];let h;e[29]!==S||e[30]!==n||e[31]!==m||e[32]!==c?(h=r.jsxs("form",{className:"space-y-6",onSubmit:n,autoComplete:"off",children:[m,c,S]}),e[29]=S,e[30]=n,e[31]=m,e[32]=c,e[33]=h):h=e[33];let x;e[34]!==t||e[35]!==h?(x=r.jsxs(L,{children:[F,r.jsx(k,{...t,children:h})]}),e[34]=t,e[35]=h,e[36]=x):x=e[36];let C;return e[37]!==s||e[38]!==a||e[39]!==x?(C=r.jsx(B,{open:a,onOpenChange:s,children:x}),e[37]=s,e[38]=a,e[39]=x,e[40]=C):C=e[40],C}function Y(o){const{orgSlug:e}=o;window.location.href=`/${e}`}async function Z(o){const e=_(o.name);if(!e)throw new Error("Organization slug is invalid");const a=await I.organization.create({name:o.name,slug:e});if(a?.error)throw new Error(a.error.message||"Failed to create organization");const s=a?.data?.slug??e;if(!s)throw new Error("Failed to create organization");return{orgSlug:s}}export{se as C};
1
+ import{o as A,n as D,c as O,q as v,t as E,j as r,B as N,f as I}from"./index-DcxE8oe_.js";import{A as M,a as L,b as R,c as T,d as $,e as q,f as B}from"./alert-dialog-BGZzdkI2.js";import{F as V,a as k,b as H,c as U,d as G,e as J,f as K}from"./form-BWoxqZfk.js";import{I as P}from"./input-DPpAbHbD.js";import{S as Q}from"./spinner-BZdAS5i2.js";import{u as W}from"./useMutation-CV3IN68C.js";function _(o){return o.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const X=A({name:D().min(2,"Organization name is required")});function se(o){const e=O.c(41),{open:a,onOpenChange:s}=o;let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={resolver:v(X),defaultValues:{name:""}},e[0]=j):j=e[0];const t=E(j);let w;e[1]===Symbol.for("react.memo_cache_sentinel")?(w={mutationFn:Z,onSuccess:Y},e[1]=w):w=e[1];const i=W(w),z=i.error instanceof Error?i.error.message:i.error?"Failed to create organization.":null;let F;e[2]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsxs(R,{children:[r.jsx(T,{children:"Create a new organization"}),r.jsx($,{children:"Set up a new organization to collaborate with others."})]}),e[2]=F):F=e[2];let n;if(e[3]!==i||e[4]!==t){let p;e[6]!==i?(p=b=>i.mutateAsync(b),e[6]=i,e[7]=p):p=e[7],n=t.handleSubmit(p),e[3]=i,e[4]=t,e[5]=n}else n=e[5];let l;e[8]!==t.formState.isSubmitting?(l=p=>{const{field:b}=p;return r.jsxs(H,{children:[r.jsx(U,{children:"Organization Name"}),r.jsx(G,{children:r.jsx(P,{...b,placeholder:"Acme Inc.",disabled:t.formState.isSubmitting})}),r.jsx(J,{children:"The name of your company or organization"}),b.value&&r.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",r.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",_(b.value)]})]}),r.jsx(K,{})]})},e[8]=t.formState.isSubmitting,e[9]=l):l=e[9];let m;e[10]!==t.control||e[11]!==l?(m=r.jsx(V,{control:t.control,name:"name",render:l}),e[10]=t.control,e[11]=l,e[12]=m):m=e[12];let c;e[13]!==z?(c=z&&r.jsx("div",{className:"text-destructive text-sm mt-2",children:z}),e[13]=z,e[14]=c):c=e[14];let f;e[15]!==i||e[16]!==t?(f=()=>{i.reset(),t.reset()},e[15]=i,e[16]=t,e[17]=f):f=e[17];let g;e[18]!==t.formState.isSubmitting||e[19]!==f?(g=r.jsx(M,{disabled:t.formState.isSubmitting,onClick:f,children:"Cancel"}),e[18]=t.formState.isSubmitting,e[19]=f,e[20]=g):g=e[20];const y=!t.formState.isValid||t.formState.isSubmitting;let u;e[21]!==t.formState.isSubmitting?(u=t.formState.isSubmitting?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx(Q,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=t.formState.isSubmitting,e[22]=u):u=e[22];let d;e[23]!==y||e[24]!==u?(d=r.jsx(N,{type:"submit",variant:"default",disabled:y,children:u}),e[23]=y,e[24]=u,e[25]=d):d=e[25];let S;e[26]!==d||e[27]!==g?(S=r.jsxs(q,{children:[g,d]}),e[26]=d,e[27]=g,e[28]=S):S=e[28];let h;e[29]!==S||e[30]!==n||e[31]!==m||e[32]!==c?(h=r.jsxs("form",{className:"space-y-6",onSubmit:n,autoComplete:"off",children:[m,c,S]}),e[29]=S,e[30]=n,e[31]=m,e[32]=c,e[33]=h):h=e[33];let x;e[34]!==t||e[35]!==h?(x=r.jsxs(L,{children:[F,r.jsx(k,{...t,children:h})]}),e[34]=t,e[35]=h,e[36]=x):x=e[36];let C;return e[37]!==s||e[38]!==a||e[39]!==x?(C=r.jsx(B,{open:a,onOpenChange:s,children:x}),e[37]=s,e[38]=a,e[39]=x,e[40]=C):C=e[40],C}function Y(o){const{orgSlug:e}=o;window.location.href=`/${e}`}async function Z(o){const e=_(o.name);if(!e)throw new Error("Organization slug is invalid");const a=await I.organization.create({name:o.name,slug:e});if(a?.error)throw new Error(a.error.message||"Failed to create organization");const s=a?.data?.slug??e;if(!s)throw new Error("Failed to create organization");return{orgSlug:s}}export{se as C};
@@ -1 +1 @@
1
- import{c as A,j as e,D as L,u as R,e as k,w as z,r as M,t as T,v as B,K as V,O as j,B as D,o as $,n as f}from"./index-De7oAufQ.js";import{u as q}from"./useMutation-BDzOMrvq.js";import{u as O,a as K}from"./constants-C6R-Odkq.js";import{D as U,a as G,b as J,c as Q,d as Y,e as H}from"./dialog-Bw5T2ogY.js";import{a as W,F as v,b as F,c as N,d as S,f as w}from"./form-B1LLlQBa.js";import{I}from"./input-_VKm0O_1.js";import{T as X}from"./textarea-C_pKpP9s.js";import{L as Z}from"./label-BhDDQ3-n.js";import{i as ee}from"./Check-BTP9VTUM.js";function se(l){return l.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function _(l){return/^[a-z0-9-]+$/.test(l)&&l.length>0&&l.length<=100}const te=["#3B82F6","#8B5CF6","#EC4899","#EF4444","#F97316","#EAB308","#22C55E","#14B8A6","#06B6D4","#6366F1","#64748B","#000000"];function ne(l){const s=A.c(16),{value:r,onChange:i}=l;let c;s[0]!==i||s[1]!==r?(c=te.map(o=>e.jsx("button",{type:"button",onClick:()=>i(o),className:L("size-8 rounded-lg transition-all",r===o&&"ring-2 ring-offset-2 ring-primary"),style:{backgroundColor:o},children:r===o&&e.jsx(ee,{className:"size-4 text-white mx-auto"})},o)),s[0]=i,s[1]=r,s[2]=c):c=s[2];let u;s[3]!==c?(u=e.jsx("div",{className:"grid grid-cols-6 gap-2",children:c}),s[3]=c,s[4]=u):u=s[4];const g=r??"#3B82F6";let d;s[5]!==i?(d=o=>i(o.target.value),s[5]=i,s[6]=d):d=s[6];let t;s[7]!==g||s[8]!==d?(t=e.jsx("input",{type:"color",value:g,onChange:d,className:"size-8 rounded cursor-pointer"}),s[7]=g,s[8]=d,s[9]=t):t=s[9];let a;s[10]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx("span",{className:"text-sm text-muted-foreground",children:"Custom color"}),s[10]=a):a=s[10];let m;s[11]!==t?(m=e.jsxs("div",{className:"flex items-center gap-2",children:[t,a]}),s[11]=t,s[12]=m):m=s[12];let x;return s[13]!==u||s[14]!==m?(x=e.jsxs("div",{className:"space-y-3",children:[u,m]}),s[13]=u,s[14]=m,s[15]=x):x=s[15],x}$({name:f().min(1,"Name is required").max(200),slug:f().min(1,"Slug is required").max(100),description:f().max(1e3).optional(),bannerColor:f().nullable().optional()});function ge({open:l,onOpenChange:s}){const{org:r}=R(),i=k(),c=z(),[u,g]=M.useState(!1),d=O({connectionId:K,orgId:r.id}),t=T({mode:"onChange",defaultValues:{name:"",slug:"",description:"",bannerColor:"#3B82F6"}}),a=q({mutationFn:async n=>{const p=await d.callTool({name:"PROJECT_CREATE",arguments:{organizationId:r.id,slug:n.slug,name:n.name,description:n.description||null,enabledPlugins:[],ui:{banner:null,bannerColor:n.bannerColor??null,icon:null,themeColor:n.bannerColor??null}}});return p.structuredContent??p},onSuccess:n=>{c.invalidateQueries({queryKey:V.projects(r.id)}),B.success("Project created successfully"),s(!1),t.reset({name:"",slug:"",description:"",bannerColor:"#3B82F6"}),g(!1),i({to:"/$org/$project",params:{org:r.slug,project:n.project.slug}})},onError:n=>{B.error("Failed to create project: "+(n instanceof Error?n.message:"Unknown error"))}}),m=async n=>{if(!_(n.slug)){t.setError("slug",{message:"Slug must be lowercase alphanumeric with hyphens only"});return}if(n.slug===j){t.setError("slug",{message:`"${j}" is a reserved slug`});return}await a.mutateAsync(n)},x=n=>{const p=n.target.value;if(t.setValue("name",p),!u){const P=se(p);t.setValue("slug",P)}},o=n=>{g(!0),t.setValue("slug",n.target.value.toLowerCase().replace(/[^a-z0-9-]/g,""))},C=t.watch("bannerColor"),h=t.watch("slug"),b=t.watch("name"),y=h===j,E=h.length>0&&!_(h);return e.jsx(U,{open:l,onOpenChange:s,children:e.jsxs(G,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[e.jsxs(J,{children:[e.jsx(Q,{children:"Create New Project"}),e.jsxs(Y,{children:["Set up a new project in ",r.name,". You can configure plugins and settings after creation."]})]}),e.jsx(W,{...t,children:e.jsxs("form",{onSubmit:t.handleSubmit(m),className:"space-y-6",children:[e.jsx("div",{className:"h-20 rounded-lg relative",style:{backgroundColor:C??"#3B82F6"},children:e.jsx("div",{className:"absolute -bottom-4 left-4",children:e.jsx("div",{className:"size-12 rounded-lg border-2 border-background flex items-center justify-center text-lg font-semibold text-white",style:{backgroundColor:C??"#3B82F6"},children:b?.charAt(0)?.toUpperCase()||"P"})})}),e.jsxs("div",{className:"space-y-2 pt-4",children:[e.jsx(Z,{children:"Banner Color"}),e.jsx(ne,{value:C??null,onChange:n=>t.setValue("bannerColor",n)})]}),e.jsx(v,{control:t.control,name:"name",render:()=>e.jsxs(F,{children:[e.jsx(N,{children:"Project Name *"}),e.jsx(S,{children:e.jsx(I,{value:b,onChange:x,placeholder:"My Awesome Project",autoFocus:!0,disabled:a.isPending})}),e.jsx(w,{})]})}),e.jsx(v,{control:t.control,name:"slug",render:()=>e.jsxs(F,{children:[e.jsx(N,{children:"Slug *"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:["/",r.slug,"/"]}),e.jsx(S,{children:e.jsx(I,{value:h,onChange:o,placeholder:"my-awesome-project",className:"flex-1",disabled:a.isPending})})]}),y&&e.jsxs("p",{className:"text-xs text-destructive",children:['"',j,'" is a reserved slug']}),E&&!y&&e.jsx("p",{className:"text-xs text-destructive",children:"Slug must be lowercase alphanumeric with hyphens only"}),e.jsx(w,{})]})}),e.jsx(v,{control:t.control,name:"description",render:({field:n})=>e.jsxs(F,{children:[e.jsx(N,{children:"Description"}),e.jsx(S,{children:e.jsx(X,{...n,placeholder:"What is this project for?",rows:2,disabled:a.isPending})}),e.jsx(w,{})]})}),e.jsxs(H,{children:[e.jsx(D,{type:"button",variant:"outline",onClick:()=>s(!1),disabled:a.isPending,children:"Cancel"}),e.jsx(D,{type:"submit",disabled:a.isPending||y||E||!b||!h,children:a.isPending?"Creating...":"Create Project"})]})]})})]})})}export{ge as C};
1
+ import{c as A,j as e,D as L,u as R,e as k,w as z,r as M,t as T,v as B,K as V,O as j,B as D,o as $,n as f}from"./index-DcxE8oe_.js";import{u as q}from"./useMutation-CV3IN68C.js";import{u as O,a as K}from"./constants-BCt7c81T.js";import{D as U,a as G,b as J,c as Q,d as Y,e as H}from"./dialog-BDa2Gsq9.js";import{a as W,F as v,b as F,c as N,d as S,f as w}from"./form-BWoxqZfk.js";import{I}from"./input-DPpAbHbD.js";import{T as X}from"./textarea-C7YqhWTc.js";import{L as Z}from"./label-BtaiiWJ8.js";import{i as ee}from"./Check-GOz4_bBS.js";function se(l){return l.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function _(l){return/^[a-z0-9-]+$/.test(l)&&l.length>0&&l.length<=100}const te=["#3B82F6","#8B5CF6","#EC4899","#EF4444","#F97316","#EAB308","#22C55E","#14B8A6","#06B6D4","#6366F1","#64748B","#000000"];function ne(l){const s=A.c(16),{value:r,onChange:i}=l;let c;s[0]!==i||s[1]!==r?(c=te.map(o=>e.jsx("button",{type:"button",onClick:()=>i(o),className:L("size-8 rounded-lg transition-all",r===o&&"ring-2 ring-offset-2 ring-primary"),style:{backgroundColor:o},children:r===o&&e.jsx(ee,{className:"size-4 text-white mx-auto"})},o)),s[0]=i,s[1]=r,s[2]=c):c=s[2];let u;s[3]!==c?(u=e.jsx("div",{className:"grid grid-cols-6 gap-2",children:c}),s[3]=c,s[4]=u):u=s[4];const g=r??"#3B82F6";let d;s[5]!==i?(d=o=>i(o.target.value),s[5]=i,s[6]=d):d=s[6];let t;s[7]!==g||s[8]!==d?(t=e.jsx("input",{type:"color",value:g,onChange:d,className:"size-8 rounded cursor-pointer"}),s[7]=g,s[8]=d,s[9]=t):t=s[9];let a;s[10]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx("span",{className:"text-sm text-muted-foreground",children:"Custom color"}),s[10]=a):a=s[10];let m;s[11]!==t?(m=e.jsxs("div",{className:"flex items-center gap-2",children:[t,a]}),s[11]=t,s[12]=m):m=s[12];let x;return s[13]!==u||s[14]!==m?(x=e.jsxs("div",{className:"space-y-3",children:[u,m]}),s[13]=u,s[14]=m,s[15]=x):x=s[15],x}$({name:f().min(1,"Name is required").max(200),slug:f().min(1,"Slug is required").max(100),description:f().max(1e3).optional(),bannerColor:f().nullable().optional()});function ge({open:l,onOpenChange:s}){const{org:r}=R(),i=k(),c=z(),[u,g]=M.useState(!1),d=O({connectionId:K,orgId:r.id}),t=T({mode:"onChange",defaultValues:{name:"",slug:"",description:"",bannerColor:"#3B82F6"}}),a=q({mutationFn:async n=>{const p=await d.callTool({name:"PROJECT_CREATE",arguments:{organizationId:r.id,slug:n.slug,name:n.name,description:n.description||null,enabledPlugins:[],ui:{banner:null,bannerColor:n.bannerColor??null,icon:null,themeColor:n.bannerColor??null}}});return p.structuredContent??p},onSuccess:n=>{c.invalidateQueries({queryKey:V.projects(r.id)}),B.success("Project created successfully"),s(!1),t.reset({name:"",slug:"",description:"",bannerColor:"#3B82F6"}),g(!1),i({to:"/$org/$project",params:{org:r.slug,project:n.project.slug}})},onError:n=>{B.error("Failed to create project: "+(n instanceof Error?n.message:"Unknown error"))}}),m=async n=>{if(!_(n.slug)){t.setError("slug",{message:"Slug must be lowercase alphanumeric with hyphens only"});return}if(n.slug===j){t.setError("slug",{message:`"${j}" is a reserved slug`});return}await a.mutateAsync(n)},x=n=>{const p=n.target.value;if(t.setValue("name",p),!u){const P=se(p);t.setValue("slug",P)}},o=n=>{g(!0),t.setValue("slug",n.target.value.toLowerCase().replace(/[^a-z0-9-]/g,""))},C=t.watch("bannerColor"),h=t.watch("slug"),b=t.watch("name"),y=h===j,E=h.length>0&&!_(h);return e.jsx(U,{open:l,onOpenChange:s,children:e.jsxs(G,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[e.jsxs(J,{children:[e.jsx(Q,{children:"Create New Project"}),e.jsxs(Y,{children:["Set up a new project in ",r.name,". You can configure plugins and settings after creation."]})]}),e.jsx(W,{...t,children:e.jsxs("form",{onSubmit:t.handleSubmit(m),className:"space-y-6",children:[e.jsx("div",{className:"h-20 rounded-lg relative",style:{backgroundColor:C??"#3B82F6"},children:e.jsx("div",{className:"absolute -bottom-4 left-4",children:e.jsx("div",{className:"size-12 rounded-lg border-2 border-background flex items-center justify-center text-lg font-semibold text-white",style:{backgroundColor:C??"#3B82F6"},children:b?.charAt(0)?.toUpperCase()||"P"})})}),e.jsxs("div",{className:"space-y-2 pt-4",children:[e.jsx(Z,{children:"Banner Color"}),e.jsx(ne,{value:C??null,onChange:n=>t.setValue("bannerColor",n)})]}),e.jsx(v,{control:t.control,name:"name",render:()=>e.jsxs(F,{children:[e.jsx(N,{children:"Project Name *"}),e.jsx(S,{children:e.jsx(I,{value:b,onChange:x,placeholder:"My Awesome Project",autoFocus:!0,disabled:a.isPending})}),e.jsx(w,{})]})}),e.jsx(v,{control:t.control,name:"slug",render:()=>e.jsxs(F,{children:[e.jsx(N,{children:"Slug *"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:["/",r.slug,"/"]}),e.jsx(S,{children:e.jsx(I,{value:h,onChange:o,placeholder:"my-awesome-project",className:"flex-1",disabled:a.isPending})})]}),y&&e.jsxs("p",{className:"text-xs text-destructive",children:['"',j,'" is a reserved slug']}),E&&!y&&e.jsx("p",{className:"text-xs text-destructive",children:"Slug must be lowercase alphanumeric with hyphens only"}),e.jsx(w,{})]})}),e.jsx(v,{control:t.control,name:"description",render:({field:n})=>e.jsxs(F,{children:[e.jsx(N,{children:"Description"}),e.jsx(S,{children:e.jsx(X,{...n,placeholder:"What is this project for?",rows:2,disabled:a.isPending})}),e.jsx(w,{})]})}),e.jsxs(H,{children:[e.jsx(D,{type:"button",variant:"outline",onClick:()=>s(!1),disabled:a.isPending,children:"Cancel"}),e.jsx(D,{type:"submit",disabled:a.isPending||y||E||!b||!h,children:a.isPending?"Creating...":"Create Project"})]})]})})]})})}export{ge as C};
@@ -1 +1 @@
1
- import{c as o,j as r}from"./index-De7oAufQ.js";import{D as s}from"./danger-zone-DbcRzYYG.js";import"./useMutation-BDzOMrvq.js";import"./constants-C6R-Odkq.js";import"./input-_VKm0O_1.js";import"./alert-dialog-CGRFjIvo.js";function n(){const t=o.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsxs("div",{className:"flex flex-col gap-6",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Danger Zone"}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Irreversible and destructive actions."})]}),r.jsx(s,{})]}),t[0]=e):e=t[0],e}function f(){const t=o.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(n,{}),t[0]=e):e=t[0],e}export{f as default};
1
+ import{c as o,j as r}from"./index-DcxE8oe_.js";import{D as s}from"./danger-zone-DjN4GhuT.js";import"./useMutation-CV3IN68C.js";import"./constants-BCt7c81T.js";import"./input-DPpAbHbD.js";import"./alert-dialog-BGZzdkI2.js";function n(){const t=o.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsxs("div",{className:"flex flex-col gap-6",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Danger Zone"}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Irreversible and destructive actions."})]}),r.jsx(s,{})]}),t[0]=e):e=t[0],e}function f(){const t=o.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(n,{}),t[0]=e):e=t[0],e}export{f as default};
@@ -1 +1 @@
1
- import{c as B,u as G,e as J,w as Q,r as L,O as M,j as t,K as U,v as F,B as Z}from"./index-De7oAufQ.js";import{u as H}from"./useMutation-BDzOMrvq.js";import{a as Y,u as z}from"./constants-C6R-Odkq.js";import{I as V}from"./input-_VKm0O_1.js";import{c as W,g as X,d as ee,b as te,A as se,e as le,h as ne,a as re,f as oe}from"./alert-dialog-CGRFjIvo.js";function fe(){const e=B.c(45),{org:n,project:s}=G(),S=J(),E=Q(),[x,R]=L.useState(""),[P,k]=L.useState(!1),K=s.slug===M;let h;e[0]!==n.id?(h={connectionId:Y,orgId:n.id},e[0]=n.id,e[1]=h):h=e[1];const I=z(h);let r;e[2]!==I||e[3]!==s.id?(r=async()=>{const l=await I.callTool({name:"PROJECT_DELETE",arguments:{projectId:s.id}});return l.structuredContent??l},e[2]=I,e[3]=s.id,e[4]=r):r=e[4];let o;e[5]!==S||e[6]!==n.id||e[7]!==n.slug||e[8]!==E?(o=l=>{l.success?(E.invalidateQueries({queryKey:U.projects(n.id)}),F.success("Project deleted"),S({to:"/$org/$project/projects",params:{org:n.slug,project:M}})):F.error(l.message??"Failed to delete project")},e[5]=S,e[6]=n.id,e[7]=n.slug,e[8]=E,e[9]=o):o=e[9];let p;e[10]!==r||e[11]!==o?(p={mutationFn:r,onSuccess:o,onError:ae},e[10]=r,e[11]=o,e[12]=p):p=e[12];const g=H(p);if(K)return null;const $=x===s.name;let j;e[13]!==g?(j=()=>{g.mutate()},e[13]=g,e[14]=j):j=e[14];const O=j;let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=l=>{k(l),l||R("")},e[15]=b):b=e[15];const q=b;let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"Danger Zone"}),e[16]=v):v=e[16];let D;e[17]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Delete Project"}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Permanently delete this project and all its data. This action cannot be undone."})]}),e[17]=D):D=e[17];let _;e[18]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(X,{asChild:!0,children:t.jsx(Z,{variant:"outline",className:"shrink-0 bg-destructive/10 text-destructive border-0 hover:bg-destructive/15 hover:text-destructive",children:"Delete Project"})}),e[18]=_):_=e[18];let a;e[19]!==s.name?(a=t.jsxs(W,{children:['Delete "',s.name,'"?']}),e[19]=s.name,e[20]=a):a=e[20];let y;e[21]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(ee,{children:"This action cannot be undone. All project data will be permanently deleted."}),e[21]=y):y=e[21];let i;e[22]!==a?(i=t.jsxs(te,{children:[a,y]}),e[22]=a,e[23]=i):i=e[23];let c;e[24]!==s.name?(c=t.jsxs("p",{className:"text-sm mb-2",children:["Type ",t.jsx("strong",{children:s.name})," to confirm:"]}),e[24]=s.name,e[25]=c):c=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=l=>R(l.target.value),e[26]=C):C=e[26];let d;e[27]!==x||e[28]!==s.name?(d=t.jsx(V,{value:x,onChange:C,placeholder:s.name}),e[27]=x,e[28]=s.name,e[29]=d):d=e[29];let m;e[30]!==c||e[31]!==d?(m=t.jsxs("div",{className:"py-4",children:[c,d]}),e[30]=c,e[31]=d,e[32]=m):m=e[32];let A;e[33]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(se,{children:"Cancel"}),e[33]=A):A=e[33];const T=!$||g.isPending,w=g.isPending?"Deleting...":"Delete Project";let u;e[34]!==O||e[35]!==T||e[36]!==w?(u=t.jsxs(le,{children:[A,t.jsx(ne,{onClick:O,disabled:T,className:"bg-destructive/10 text-destructive hover:bg-destructive/15 hover:text-destructive border-0",children:w})]}),e[34]=O,e[35]=T,e[36]=w,e[37]=u):u=e[37];let f;e[38]!==i||e[39]!==m||e[40]!==u?(f=t.jsxs(re,{children:[i,m,u]}),e[38]=i,e[39]=m,e[40]=u,e[41]=f):f=e[41];let N;return e[42]!==P||e[43]!==f?(N=t.jsxs("div",{className:"flex flex-col",children:[v,t.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[D,t.jsxs(oe,{open:P,onOpenChange:q,children:[_,f]})]})]}),e[42]=P,e[43]=f,e[44]=N):N=e[44],N}function ae(e){F.error("Failed to delete project: "+(e instanceof Error?e.message:"Unknown error"))}export{fe as D};
1
+ import{c as B,u as G,e as J,w as Q,r as L,O as M,j as t,K as U,v as F,B as Z}from"./index-DcxE8oe_.js";import{u as H}from"./useMutation-CV3IN68C.js";import{a as Y,u as z}from"./constants-BCt7c81T.js";import{I as V}from"./input-DPpAbHbD.js";import{c as W,g as X,d as ee,b as te,A as se,e as le,h as ne,a as re,f as oe}from"./alert-dialog-BGZzdkI2.js";function fe(){const e=B.c(45),{org:n,project:s}=G(),S=J(),E=Q(),[x,R]=L.useState(""),[P,k]=L.useState(!1),K=s.slug===M;let h;e[0]!==n.id?(h={connectionId:Y,orgId:n.id},e[0]=n.id,e[1]=h):h=e[1];const I=z(h);let r;e[2]!==I||e[3]!==s.id?(r=async()=>{const l=await I.callTool({name:"PROJECT_DELETE",arguments:{projectId:s.id}});return l.structuredContent??l},e[2]=I,e[3]=s.id,e[4]=r):r=e[4];let o;e[5]!==S||e[6]!==n.id||e[7]!==n.slug||e[8]!==E?(o=l=>{l.success?(E.invalidateQueries({queryKey:U.projects(n.id)}),F.success("Project deleted"),S({to:"/$org/$project/projects",params:{org:n.slug,project:M}})):F.error(l.message??"Failed to delete project")},e[5]=S,e[6]=n.id,e[7]=n.slug,e[8]=E,e[9]=o):o=e[9];let p;e[10]!==r||e[11]!==o?(p={mutationFn:r,onSuccess:o,onError:ae},e[10]=r,e[11]=o,e[12]=p):p=e[12];const g=H(p);if(K)return null;const $=x===s.name;let j;e[13]!==g?(j=()=>{g.mutate()},e[13]=g,e[14]=j):j=e[14];const O=j;let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=l=>{k(l),l||R("")},e[15]=b):b=e[15];const q=b;let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"Danger Zone"}),e[16]=v):v=e[16];let D;e[17]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Delete Project"}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Permanently delete this project and all its data. This action cannot be undone."})]}),e[17]=D):D=e[17];let _;e[18]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(X,{asChild:!0,children:t.jsx(Z,{variant:"outline",className:"shrink-0 bg-destructive/10 text-destructive border-0 hover:bg-destructive/15 hover:text-destructive",children:"Delete Project"})}),e[18]=_):_=e[18];let a;e[19]!==s.name?(a=t.jsxs(W,{children:['Delete "',s.name,'"?']}),e[19]=s.name,e[20]=a):a=e[20];let y;e[21]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(ee,{children:"This action cannot be undone. All project data will be permanently deleted."}),e[21]=y):y=e[21];let i;e[22]!==a?(i=t.jsxs(te,{children:[a,y]}),e[22]=a,e[23]=i):i=e[23];let c;e[24]!==s.name?(c=t.jsxs("p",{className:"text-sm mb-2",children:["Type ",t.jsx("strong",{children:s.name})," to confirm:"]}),e[24]=s.name,e[25]=c):c=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=l=>R(l.target.value),e[26]=C):C=e[26];let d;e[27]!==x||e[28]!==s.name?(d=t.jsx(V,{value:x,onChange:C,placeholder:s.name}),e[27]=x,e[28]=s.name,e[29]=d):d=e[29];let m;e[30]!==c||e[31]!==d?(m=t.jsxs("div",{className:"py-4",children:[c,d]}),e[30]=c,e[31]=d,e[32]=m):m=e[32];let A;e[33]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(se,{children:"Cancel"}),e[33]=A):A=e[33];const T=!$||g.isPending,w=g.isPending?"Deleting...":"Delete Project";let u;e[34]!==O||e[35]!==T||e[36]!==w?(u=t.jsxs(le,{children:[A,t.jsx(ne,{onClick:O,disabled:T,className:"bg-destructive/10 text-destructive hover:bg-destructive/15 hover:text-destructive border-0",children:w})]}),e[34]=O,e[35]=T,e[36]=w,e[37]=u):u=e[37];let f;e[38]!==i||e[39]!==m||e[40]!==u?(f=t.jsxs(re,{children:[i,m,u]}),e[38]=i,e[39]=m,e[40]=u,e[41]=f):f=e[41];let N;return e[42]!==P||e[43]!==f?(N=t.jsxs("div",{className:"flex flex-col",children:[v,t.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[D,t.jsxs(oe,{open:P,onOpenChange:q,children:[_,f]})]})]}),e[42]=P,e[43]=f,e[44]=N):N=e[44],N}function ae(e){F.error("Failed to delete project: "+(e instanceof Error?e.message:"Unknown error"))}export{fe as D};
@@ -1 +1 @@
1
- import{c as K,j as t,u as ue,w as fe,r as pe,D as ne,K as ee,B as xe,v as re}from"./index-De7oAufQ.js";import{u as he}from"./useQuery-CTePvczf.js";import{u as oe}from"./useMutation-BDzOMrvq.js";import{a as je,b as ge,P as Ce}from"./popover-D_qGIJiq.js";import{C as be,a as ve,b as Ne,c as ye,d as Ee,e as Te}from"./command-C4HnUxgr.js";import{s as _e}from"./Plus-Bah3bfIq.js";import{i as Ie}from"./X-Dr3IGE6q.js";import{b as Pe}from"./use-connection-C4RNTGYe.js";import{a as Se,u as we}from"./constants-C6R-Odkq.js";import{u as te}from"./unwrap-tool-result-BYXdCQMg.js";import"./index-OdE2HBl6.js";import"./SearchMd-CbNARIB_.js";import"./use-collections-CN-KZdhF.js";function ie(e){const n=K.c(6),{icon:o,title:c}=e;if(o){let a;return n[0]!==o?(a=t.jsx("img",{src:o,alt:"",className:"size-5 shrink-0 rounded"}),n[0]=o,n[1]=a):a=n[1],a}let i;n[2]!==c?(i=c.charAt(0).toUpperCase(),n[2]=c,n[3]=i):i=n[3];let r;return n[4]!==i?(r=t.jsx("div",{className:"size-5 shrink-0 rounded bg-muted flex items-center justify-center",children:t.jsx("span",{className:"text-[10px] font-medium text-muted-foreground",children:i})}),n[4]=i,n[5]=r):r=n[5],r}function Oe(){const e=K.c(72),{org:n,project:o}=ue();let c;e[0]!==n.id?(c={connectionId:Se,orgId:n.id},e[0]=n.id,e[1]=c):c=e[1];const i=we(c),r=fe(),a=Pe(),l=o.id??"",[Q,se]=pe.useState(!1);let d;e[2]!==l?(d=ee.projectConnections(l),e[2]=l,e[3]=d):d=e[3];const L=!!o.id;let m;e[4]!==i||e[5]!==l?(m=async()=>{const s=await i.callTool({name:"PROJECT_CONNECTION_LIST",arguments:{projectId:l}});return te(s)},e[4]=i,e[5]=l,e[6]=m):m=e[6];let P;e[7]!==d||e[8]!==L||e[9]!==m?(P={queryKey:d,enabled:L,queryFn:m},e[7]=d,e[8]=L,e[9]=m,e[10]=P):P=e[10];const{data:$}=he(P);let S;e[11]!==$?.connections?(S=new Set(($?.connections??[]).map(Re)),e[11]=$?.connections,e[12]=S):S=e[12];const u=S;let w;e[13]!==u?(w=s=>u.has(s.id),e[13]=u,e[14]=w):w=e[14];const I=(a??[]).filter(w);let O;e[15]!==u?(O=s=>!u.has(s.id),e[15]=u,e[16]=O):O=e[16];const le=(a??[]).filter(O);let k;e[17]!==n.id||e[18]!==o.slug||e[19]!==l||e[20]!==r?(k=()=>{r.invalidateQueries({queryKey:ee.projectConnections(l)}),r.invalidateQueries({queryKey:ee.project(n.id,o.slug)})},e[17]=n.id,e[18]=o.slug,e[19]=l,e[20]=r,e[21]=k):k=e[21];const f=k;let p;e[22]!==i||e[23]!==o.id?(p=async s=>{const Z=await i.callTool({name:"PROJECT_CONNECTION_ADD",arguments:{projectId:o.id,connectionId:s}});te(Z)},e[22]=i,e[23]=o.id,e[24]=p):p=e[24];let x;e[25]!==f?(x=()=>f(),e[25]=f,e[26]=x):x=e[26];let z;e[27]!==x||e[28]!==p?(z={mutationFn:p,onSuccess:x,onError:ze},e[27]=x,e[28]=p,e[29]=z):z=e[29];const J=oe(z);let h;e[30]!==i||e[31]!==o.id?(h=async s=>{const Z=await i.callTool({name:"PROJECT_CONNECTION_REMOVE",arguments:{projectId:o.id,connectionId:s}});te(Z)},e[30]=i,e[31]=o.id,e[32]=h):h=e[32];let j;e[33]!==f?(j=()=>f(),e[33]=f,e[34]=j):j=e[34];let R;e[35]!==h||e[36]!==j?(R={mutationFn:h,onSuccess:j,onError:ke},e[35]=h,e[36]=j,e[37]=R):R=e[37];const A=oe(R);let D;e[38]!==J?(D=s=>{se(!1),J.mutate(s)},e[38]=J,e[39]=D):D=e[39];const U=D;let F;e[40]!==A?(F=s=>{A.mutate(s)},e[40]=A,e[41]=F):F=e[41];const ce=F,ae="space-y-4",B=ge;let g;e[42]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Ce,{asChild:!0,children:t.jsxs(xe,{variant:"outline",size:"sm",className:"gap-1.5",children:[t.jsx(_e,{size:14}),"Add connection"]})}),e[42]=g):g=e[42];const G=je,de="w-72 p-0",me="start",V=Ne;let C;e[43]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(ye,{placeholder:"Search connections..."}),e[43]=C):C=e[43];const Y=ve;let b;e[44]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(Ee,{children:"No connections found."}),e[44]=b):b=e[44];const H=be;let M;e[45]!==U?(M=s=>t.jsxs(Te,{value:s.title,onSelect:()=>U(s.id),children:[t.jsx(ie,{icon:s.icon,title:s.title}),t.jsx("span",{className:"truncate",children:s.title}),t.jsx("span",{className:ne("ml-auto inline-block size-1.5 shrink-0 rounded-full",s.status==="active"?"bg-success":s.status==="error"?"bg-destructive":"bg-muted-foreground")})]},s.id),e[45]=U,e[46]=M):M=e[46];const W=le.map(M);let v;e[47]!==H||e[48]!==W?(v=t.jsx(H,{children:W}),e[47]=H,e[48]=W,e[49]=v):v=e[49];let N;e[50]!==Y||e[51]!==b||e[52]!==v?(N=t.jsxs(Y,{children:[b,v]}),e[50]=Y,e[51]=b,e[52]=v,e[53]=N):N=e[53];let y;e[54]!==V||e[55]!==C||e[56]!==N?(y=t.jsxs(V,{children:[C,N]}),e[54]=V,e[55]=C,e[56]=N,e[57]=y):y=e[57];let E;e[58]!==G||e[59]!==y?(E=t.jsx(G,{className:de,align:me,children:y}),e[58]=G,e[59]=y,e[60]=E):E=e[60];let T;e[61]!==B||e[62]!==Q||e[63]!==g||e[64]!==E?(T=t.jsxs(B,{open:Q,onOpenChange:se,children:[g,E]}),e[61]=B,e[62]=Q,e[63]=g,e[64]=E,e[65]=T):T=e[65];const X=I.length>0&&t.jsx("div",{className:"flex flex-col",children:I.map(s=>t.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border last:border-0",children:[t.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[t.jsx(ie,{icon:s.icon,title:s.title}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),t.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:s.connection_type}),t.jsx("span",{className:ne("inline-block size-1.5 rounded-full",s.status==="active"?"bg-success":s.status==="error"?"bg-destructive":"bg-muted-foreground")})]})]})]}),t.jsx("button",{type:"button",onClick:()=>ce(s.id),disabled:A.isPending,className:"shrink-0 rounded-md p-1 text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors",children:t.jsx(Ie,{size:14})})]},s.id))});let _;e[66]!==I.length?(_=I.length===0&&t.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No connections added yet. Add connections from the organization to make them available in this project."}),e[66]=I.length,e[67]=_):_=e[67];let q;return e[68]!==T||e[69]!==X||e[70]!==_?(q=t.jsxs("div",{className:ae,children:[T,X,_]}),e[68]=T,e[69]=X,e[70]=_,e[71]=q):q=e[71],q}function ke(e){re.error("Failed to remove connection: "+(e instanceof Error?e.message:"Unknown error"))}function ze(e){re.error("Failed to add connection: "+(e instanceof Error?e.message:"Unknown error"))}function Re(e){return e.id}function Ae(){const e=K.c(1);let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Connections"}),t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose which organization connections are available to this project."})]}),t.jsx(Oe,{})]}),e[0]=n):n=e[0],n}function Ye(){const e=K.c(1);let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Ae,{}),e[0]=n):n=e[0],n}export{Ye as default};
1
+ import{c as K,j as t,u as ue,w as fe,r as pe,D as ne,K as ee,B as xe,v as re}from"./index-DcxE8oe_.js";import{u as he}from"./useQuery-CEE9SUlS.js";import{u as oe}from"./useMutation-CV3IN68C.js";import{a as je,b as ge,P as Ce}from"./popover-CNIkv0WT.js";import{C as be,a as ve,b as Ne,c as ye,d as Ee,e as Te}from"./command-BgTh2_vK.js";import{s as _e}from"./Plus-C9dY5EOr.js";import{i as Ie}from"./X-CaaFSPD_.js";import{b as Pe}from"./use-connection-Cv_-e2MS.js";import{a as Se,u as we}from"./constants-BCt7c81T.js";import{u as te}from"./unwrap-tool-result-BYXdCQMg.js";import"./index-CM7_8eMu.js";import"./SearchMd-CKp0BoPW.js";import"./use-collections-CObsJD7p.js";function ie(e){const n=K.c(6),{icon:o,title:c}=e;if(o){let a;return n[0]!==o?(a=t.jsx("img",{src:o,alt:"",className:"size-5 shrink-0 rounded"}),n[0]=o,n[1]=a):a=n[1],a}let i;n[2]!==c?(i=c.charAt(0).toUpperCase(),n[2]=c,n[3]=i):i=n[3];let r;return n[4]!==i?(r=t.jsx("div",{className:"size-5 shrink-0 rounded bg-muted flex items-center justify-center",children:t.jsx("span",{className:"text-[10px] font-medium text-muted-foreground",children:i})}),n[4]=i,n[5]=r):r=n[5],r}function Oe(){const e=K.c(72),{org:n,project:o}=ue();let c;e[0]!==n.id?(c={connectionId:Se,orgId:n.id},e[0]=n.id,e[1]=c):c=e[1];const i=we(c),r=fe(),a=Pe(),l=o.id??"",[Q,se]=pe.useState(!1);let d;e[2]!==l?(d=ee.projectConnections(l),e[2]=l,e[3]=d):d=e[3];const L=!!o.id;let m;e[4]!==i||e[5]!==l?(m=async()=>{const s=await i.callTool({name:"PROJECT_CONNECTION_LIST",arguments:{projectId:l}});return te(s)},e[4]=i,e[5]=l,e[6]=m):m=e[6];let P;e[7]!==d||e[8]!==L||e[9]!==m?(P={queryKey:d,enabled:L,queryFn:m},e[7]=d,e[8]=L,e[9]=m,e[10]=P):P=e[10];const{data:$}=he(P);let S;e[11]!==$?.connections?(S=new Set(($?.connections??[]).map(Re)),e[11]=$?.connections,e[12]=S):S=e[12];const u=S;let w;e[13]!==u?(w=s=>u.has(s.id),e[13]=u,e[14]=w):w=e[14];const I=(a??[]).filter(w);let O;e[15]!==u?(O=s=>!u.has(s.id),e[15]=u,e[16]=O):O=e[16];const le=(a??[]).filter(O);let k;e[17]!==n.id||e[18]!==o.slug||e[19]!==l||e[20]!==r?(k=()=>{r.invalidateQueries({queryKey:ee.projectConnections(l)}),r.invalidateQueries({queryKey:ee.project(n.id,o.slug)})},e[17]=n.id,e[18]=o.slug,e[19]=l,e[20]=r,e[21]=k):k=e[21];const f=k;let p;e[22]!==i||e[23]!==o.id?(p=async s=>{const Z=await i.callTool({name:"PROJECT_CONNECTION_ADD",arguments:{projectId:o.id,connectionId:s}});te(Z)},e[22]=i,e[23]=o.id,e[24]=p):p=e[24];let x;e[25]!==f?(x=()=>f(),e[25]=f,e[26]=x):x=e[26];let z;e[27]!==x||e[28]!==p?(z={mutationFn:p,onSuccess:x,onError:ze},e[27]=x,e[28]=p,e[29]=z):z=e[29];const J=oe(z);let h;e[30]!==i||e[31]!==o.id?(h=async s=>{const Z=await i.callTool({name:"PROJECT_CONNECTION_REMOVE",arguments:{projectId:o.id,connectionId:s}});te(Z)},e[30]=i,e[31]=o.id,e[32]=h):h=e[32];let j;e[33]!==f?(j=()=>f(),e[33]=f,e[34]=j):j=e[34];let R;e[35]!==h||e[36]!==j?(R={mutationFn:h,onSuccess:j,onError:ke},e[35]=h,e[36]=j,e[37]=R):R=e[37];const A=oe(R);let D;e[38]!==J?(D=s=>{se(!1),J.mutate(s)},e[38]=J,e[39]=D):D=e[39];const U=D;let F;e[40]!==A?(F=s=>{A.mutate(s)},e[40]=A,e[41]=F):F=e[41];const ce=F,ae="space-y-4",B=ge;let g;e[42]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Ce,{asChild:!0,children:t.jsxs(xe,{variant:"outline",size:"sm",className:"gap-1.5",children:[t.jsx(_e,{size:14}),"Add connection"]})}),e[42]=g):g=e[42];const G=je,de="w-72 p-0",me="start",V=Ne;let C;e[43]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(ye,{placeholder:"Search connections..."}),e[43]=C):C=e[43];const Y=ve;let b;e[44]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(Ee,{children:"No connections found."}),e[44]=b):b=e[44];const H=be;let M;e[45]!==U?(M=s=>t.jsxs(Te,{value:s.title,onSelect:()=>U(s.id),children:[t.jsx(ie,{icon:s.icon,title:s.title}),t.jsx("span",{className:"truncate",children:s.title}),t.jsx("span",{className:ne("ml-auto inline-block size-1.5 shrink-0 rounded-full",s.status==="active"?"bg-success":s.status==="error"?"bg-destructive":"bg-muted-foreground")})]},s.id),e[45]=U,e[46]=M):M=e[46];const W=le.map(M);let v;e[47]!==H||e[48]!==W?(v=t.jsx(H,{children:W}),e[47]=H,e[48]=W,e[49]=v):v=e[49];let N;e[50]!==Y||e[51]!==b||e[52]!==v?(N=t.jsxs(Y,{children:[b,v]}),e[50]=Y,e[51]=b,e[52]=v,e[53]=N):N=e[53];let y;e[54]!==V||e[55]!==C||e[56]!==N?(y=t.jsxs(V,{children:[C,N]}),e[54]=V,e[55]=C,e[56]=N,e[57]=y):y=e[57];let E;e[58]!==G||e[59]!==y?(E=t.jsx(G,{className:de,align:me,children:y}),e[58]=G,e[59]=y,e[60]=E):E=e[60];let T;e[61]!==B||e[62]!==Q||e[63]!==g||e[64]!==E?(T=t.jsxs(B,{open:Q,onOpenChange:se,children:[g,E]}),e[61]=B,e[62]=Q,e[63]=g,e[64]=E,e[65]=T):T=e[65];const X=I.length>0&&t.jsx("div",{className:"flex flex-col",children:I.map(s=>t.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border last:border-0",children:[t.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[t.jsx(ie,{icon:s.icon,title:s.title}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),t.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:s.connection_type}),t.jsx("span",{className:ne("inline-block size-1.5 rounded-full",s.status==="active"?"bg-success":s.status==="error"?"bg-destructive":"bg-muted-foreground")})]})]})]}),t.jsx("button",{type:"button",onClick:()=>ce(s.id),disabled:A.isPending,className:"shrink-0 rounded-md p-1 text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors",children:t.jsx(Ie,{size:14})})]},s.id))});let _;e[66]!==I.length?(_=I.length===0&&t.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No connections added yet. Add connections from the organization to make them available in this project."}),e[66]=I.length,e[67]=_):_=e[67];let q;return e[68]!==T||e[69]!==X||e[70]!==_?(q=t.jsxs("div",{className:ae,children:[T,X,_]}),e[68]=T,e[69]=X,e[70]=_,e[71]=q):q=e[71],q}function ke(e){re.error("Failed to remove connection: "+(e instanceof Error?e.message:"Unknown error"))}function ze(e){re.error("Failed to add connection: "+(e instanceof Error?e.message:"Unknown error"))}function Re(e){return e.id}function Ae(){const e=K.c(1);let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Connections"}),t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose which organization connections are available to this project."})]}),t.jsx(Oe,{})]}),e[0]=n):n=e[0],n}function Ye(){const e=K.c(1);let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Ae,{}),e[0]=n):n=e[0],n}export{Ye as default};
@@ -1 +1 @@
1
- import{c as n,j as i,R as g,D as c,F as u,T as m,G as x,H as j,J as N,I as b,ah as D}from"./index-De7oAufQ.js";import{i as h}from"./X-Dr3IGE6q.js";function C(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(g,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(D,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("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/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(N,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(h,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(b,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function w(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("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-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let p;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(p=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(u,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function T(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(m,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function E(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{C as D,w as a,T as b,B as c,E as d,R as e,k as f};
1
+ import{c as n,j as i,R as g,D as c,F as u,T as m,G as x,H as j,J as N,I as b,ah as D}from"./index-DcxE8oe_.js";import{i as h}from"./X-CaaFSPD_.js";function C(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(g,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(D,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("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/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(N,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(h,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(b,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function w(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("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-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let p;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(p=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(u,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function T(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(m,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function E(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{C as D,w as a,T as b,B as c,E as d,R as e,k as f};
@@ -1 +1 @@
1
- import{r as p,c,j as l,aJ as g,aK as x,D as u,aL as v,aM as b,aN as h,aO as w,aP as j,aQ as N,aR as f,aS as z,aT as y,aU as _,aV as D,aW as M}from"./index-De7oAufQ.js";import{i as $}from"./Check-BTP9VTUM.js";import{i as k}from"./ChevronRight-DWZgTrde.js";const m=({size:o=24,color:e="currentColor",...t})=>p.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},p.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}));m.displayName="Circle";function R(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(g,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function E(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(x,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function L(o){const e=c.c(10);let t,s,a;e[0]!==o?({className:t,sideOffset:a,...s}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const n=a===void 0?4:a;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==n||e[8]!==r?(i=l.jsx(v,{children:l.jsx(b,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=i):i=e[9],i}function T(o){const e=c.c(12);let t,s,a,n;e[0]!==o?({className:t,inset:s,variant:n,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=n):(t=e[1],s=e[2],a=e[3],n=e[4]);const r=n===void 0?"default":n;let i;e[5]!==t?(i=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=i):i=e[6];let d;return e[7]!==s||e[8]!==a||e[9]!==i||e[10]!==r?(d=l.jsx(j,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:i,...a}),e[7]=s,e[8]=a,e[9]=i,e[10]=r,e[11]=d):d=e[11],d}function O(o){const e=c.c(13);let t,s,a,n;e[0]!==o?({className:a,children:s,checked:t,...n}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=n):(t=e[1],s=e[2],a=e[3],n=e[4]);let r;e[5]!==a?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[5]=a,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(f,{children:l.jsx($,{className:"size-4"})})}),e[7]=i):i=e[7];let d;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(d=l.jsxs(w,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[i,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=d):d=e[12],d}function G(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(M,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(o){const e=c.c(11);let t,s,a;e[0]!==o?({className:s,children:t,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=l.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(f,{children:l.jsx(m,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let i;return e[7]!==t||e[8]!==a||e[9]!==n?(i=l.jsxs(D,{"data-slot":"dropdown-menu-radio-item",className:n,...a,children:[r,t]}),e[7]=t,e[8]=a,e[9]=n,e[10]=i):i=e[10],i}function W(o){const e=c.c(10);let t,s,a;e[0]!==o?({className:t,inset:s,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==a||e[8]!==n?(r=l.jsx(h,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...a}),e[6]=s,e[7]=a,e[8]=n,e[9]=r):r=e[9],r}function B(o){const e=c.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=a):a=e[4];let n;return e[5]!==s||e[6]!==a?(n=l.jsx(N,{"data-slot":"dropdown-menu-separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=n):n=e[7],n}function J(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(z,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function K(o){const e=c.c(13);let t,s,a,n;e[0]!==o?({className:s,inset:a,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=n):(t=e[1],s=e[2],a=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(k,{className:"ml-auto size-4"}),e[7]=i):i=e[7];let d;return e[8]!==t||e[9]!==a||e[10]!==n||e[11]!==r?(d=l.jsxs(y,{"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:r,...n,children:[t,i]}),e[8]=t,e[9]=a,e[10]=n,e[11]=r,e[12]=d):d=e[12],d}function Q(o){const e=c.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=a):a=e[4];let n;return e[5]!==s||e[6]!==a?(n=l.jsx(_,{"data-slot":"dropdown-menu-sub-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=n):n=e[7],n}export{R as D,E as a,L as b,T as c,K as d,J as e,Q as f,W as g,B as h,P as i,G as j,m as k,O as l};
1
+ import{r as p,c,j as l,aJ as g,aK as x,D as u,aL as v,aM as b,aN as h,aO as w,aP as j,aQ as N,aR as f,aS as z,aT as y,aU as _,aV as D,aW as M}from"./index-DcxE8oe_.js";import{i as $}from"./Check-GOz4_bBS.js";import{i as k}from"./ChevronRight-Ys0vr-YD.js";const m=({size:o=24,color:e="currentColor",...t})=>p.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},p.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}));m.displayName="Circle";function R(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(g,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function E(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(x,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function L(o){const e=c.c(10);let t,s,a;e[0]!==o?({className:t,sideOffset:a,...s}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const n=a===void 0?4:a;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==n||e[8]!==r?(i=l.jsx(v,{children:l.jsx(b,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=i):i=e[9],i}function T(o){const e=c.c(12);let t,s,a,n;e[0]!==o?({className:t,inset:s,variant:n,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=n):(t=e[1],s=e[2],a=e[3],n=e[4]);const r=n===void 0?"default":n;let i;e[5]!==t?(i=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=i):i=e[6];let d;return e[7]!==s||e[8]!==a||e[9]!==i||e[10]!==r?(d=l.jsx(j,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:i,...a}),e[7]=s,e[8]=a,e[9]=i,e[10]=r,e[11]=d):d=e[11],d}function O(o){const e=c.c(13);let t,s,a,n;e[0]!==o?({className:a,children:s,checked:t,...n}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=n):(t=e[1],s=e[2],a=e[3],n=e[4]);let r;e[5]!==a?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[5]=a,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(f,{children:l.jsx($,{className:"size-4"})})}),e[7]=i):i=e[7];let d;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(d=l.jsxs(w,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[i,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=d):d=e[12],d}function G(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(M,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(o){const e=c.c(11);let t,s,a;e[0]!==o?({className:s,children:t,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=l.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(f,{children:l.jsx(m,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let i;return e[7]!==t||e[8]!==a||e[9]!==n?(i=l.jsxs(D,{"data-slot":"dropdown-menu-radio-item",className:n,...a,children:[r,t]}),e[7]=t,e[8]=a,e[9]=n,e[10]=i):i=e[10],i}function W(o){const e=c.c(10);let t,s,a;e[0]!==o?({className:t,inset:s,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==a||e[8]!==n?(r=l.jsx(h,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...a}),e[6]=s,e[7]=a,e[8]=n,e[9]=r):r=e[9],r}function B(o){const e=c.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=a):a=e[4];let n;return e[5]!==s||e[6]!==a?(n=l.jsx(N,{"data-slot":"dropdown-menu-separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=n):n=e[7],n}function J(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(z,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function K(o){const e=c.c(13);let t,s,a,n;e[0]!==o?({className:s,inset:a,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=n):(t=e[1],s=e[2],a=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(k,{className:"ml-auto size-4"}),e[7]=i):i=e[7];let d;return e[8]!==t||e[9]!==a||e[10]!==n||e[11]!==r?(d=l.jsxs(y,{"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:r,...n,children:[t,i]}),e[8]=t,e[9]=a,e[10]=n,e[11]=r,e[12]=d):d=e[12],d}function Q(o){const e=c.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=a):a=e[4];let n;return e[5]!==s||e[6]!==a?(n=l.jsx(_,{"data-slot":"dropdown-menu-sub-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=n):n=e[7],n}export{R as D,E as a,L as b,T as c,K as d,J as e,Q as f,W as g,B as h,P as i,G as j,m as k,O as l};
@@ -1 +1 @@
1
- import{c as A,u as W,g as D,f as X,K as Z,j as n,r as q,au as Q,B as ee,Q as te,bf as ne}from"./index-De7oAufQ.js";import{i as v}from"./Loading01-Bgt2pWQu.js";import{c as ie}from"./binder-BfA1Jrrc.js";import{P as $}from"./topbar-portal-CF1YRovU.js";import{u as se}from"./useQuery-CTePvczf.js";import{b as oe}from"./use-connection-C4RNTGYe.js";import{a as le,u as re,f as ce}from"./constants-C6R-Odkq.js";import{t as ae}from"./Settings01-ncSo0UF1.js";import{P as E}from"./index-BaVHKLOw.js";import"./use-collections-CN-KZdhF.js";import"./useMutation-BDzOMrvq.js";import"./tooltip-C4rlkzSj.js";import"./index-DtZLm-Fz.js";function de(t,e){return t?t.filter(m=>ie(m,e)):[]}function R(t){return{id:t.id,title:t.title,icon:t.icon,description:t.description,app_name:t.app_name,app_id:t.app_id,tools:t.tools,metadata:t.metadata}}function me(t){const e=A.c(35),{binding:m,renderHeader:f,renderEmptyState:i}=t,{org:o,project:l}=W();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const{org:r,project:g,pluginId:u}=D(a),J=oe(),{data:y}=X.useSession();let b;e[1]!==o.id?(b={connectionId:le,orgId:o.id},e[1]=o.id,e[2]=b):b=e[2];const H=re(b);let x;e[3]!==u||e[4]!==l.id?(x=Z.projectPluginConfig(l.id??"",u),e[3]=u,e[4]=l.id,e[5]=x):x=e[5];let p;e[6]!==u||e[7]!==l.id||e[8]!==H?(p=async()=>{const s=await H.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:l.id,pluginId:u}});return s.structuredContent??s},e[6]=u,e[7]=l.id,e[8]=H,e[9]=p):p=e[9];const T=!!l.id&&!!u;let _;e[10]!==x||e[11]!==p||e[12]!==T?(_={queryKey:x,queryFn:p,enabled:T},e[10]=x,e[11]=p,e[12]=T,e[13]=_):_=e[13];const{data:U,isLoading:Y}=se(_),F=de(J,m),K=U?.config?.connectionId,j=K?F.find(s=>s.id===K):null,P=ce({connectionId:j?.id,orgId:o.id}),w=y?.user?{user:{id:y.user.id,name:y.user.name,email:y.user.email,image:y.user.image}}:null,z={id:o.id,slug:o.slug,name:o.name};if(Y){let s;return e[14]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),e[14]=s):s=e[14],s}if(F.length===0){const s={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let c;e[15]!==i?(c=i(),e[15]=i,e[16]=c):c=e[16];let d;return e[17]!==c?(d=n.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:c}),e[17]=c,e[18]=d):d=e[18],n.jsx($,{value:s,children:d})}if(!j){const s={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let c;e[19]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[n.jsx(ae,{size:48,className:"text-muted-foreground mb-2"}),n.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]}),e[19]=c):c=e[19];const d=r??o.slug,O=g??l.slug??"";let L;return e[20]!==d||e[21]!==O?(L=n.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:[c,n.jsx(ee,{asChild:!0,children:n.jsx(te,{to:"/$org/$project/settings",params:{org:d,project:O},children:"Go to Project Settings"})})]}),e[20]=d,e[21]=O,e[22]=L):L=e[22],n.jsx($,{value:s,children:L})}let S;e[23]!==P?(S=(s,c)=>P?P.callTool({name:s,arguments:c}).then(fe):Promise.reject(new Error("MCP client is not available")),e[23]=P,e[24]=S):S=e[24];const V={connectionId:j.id,connection:R(j),toolCaller:S,org:z,session:w},B=E,G=E,k=E,M=f({connections:[R(j)],selectedConnectionId:j.id,onConnectionChange:ue});let h;e[25]!==M||e[26]!==k.Header.Left?(h=n.jsx(k.Header.Left,{children:M}),e[25]=M,e[26]=k.Header.Left,e[27]=h):h=e[27];let C;e[28]!==h||e[29]!==G.Header?(C=n.jsx(G.Header,{children:h}),e[28]=h,e[29]=G.Header,e[30]=C):C=e[30];let N;e[31]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(E.Content,{children:n.jsx(q.Suspense,{fallback:n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),children:n.jsx(Q,{})})}),e[31]=N):N=e[31];let I;return e[32]!==B||e[33]!==C?(I=n.jsxs(B,{children:[C,N]}),e[32]=B,e[33]=C,e[34]=I):I=e[34],n.jsx($,{value:V,children:I})}function ue(){}function fe(t){return t.structuredContent??t}function Le(){const t=A.c(12);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{pluginId:m}=D(e);let f;t[1]!==m?(f=ne.find(r=>r.id===m),t[1]=m,t[2]=f):f=t[2];const i=f;if(i?.renderHeader&&i?.renderEmptyState&&i?.binding){let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[3]=r):r=t[3];let g;return t[4]!==i.binding||t[5]!==i.renderEmptyState||t[6]!==i.renderHeader?(g=n.jsx(q.Suspense,{fallback:r,children:n.jsx(me,{binding:i.binding,renderHeader:i.renderHeader,renderEmptyState:i.renderEmptyState})}),t[4]=i.binding,t[5]=i.renderEmptyState,t[6]=i.renderHeader,t[7]=g):g=t[7],g}const o=i?.LayoutComponent;if(!o){let r;return t[8]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Q,{}),t[8]=r):r=t[8],r}let l;t[9]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[9]=l):l=t[9];let a;return t[10]!==o?(a=n.jsx(q.Suspense,{fallback:l,children:n.jsx(o,{})}),t[10]=o,t[11]=a):a=t[11],a}export{Le as default};
1
+ import{c as A,u as W,g as D,f as X,K as Z,j as n,r as q,au as Q,B as ee,Q as te,bf as ne}from"./index-DcxE8oe_.js";import{i as v}from"./Loading01-B85tVuIU.js";import{c as ie}from"./binder-l1kCmNCE.js";import{P as $}from"./topbar-portal-CjA9qO3_.js";import{u as se}from"./useQuery-CEE9SUlS.js";import{b as oe}from"./use-connection-Cv_-e2MS.js";import{a as le,u as re,f as ce}from"./constants-BCt7c81T.js";import{t as ae}from"./Settings01-DunsMQ-m.js";import{P as E}from"./index-DZ6p-ZXx.js";import"./use-collections-CObsJD7p.js";import"./useMutation-CV3IN68C.js";import"./tooltip-CXZH0tSC.js";import"./index-10S4l3se.js";function de(t,e){return t?t.filter(m=>ie(m,e)):[]}function R(t){return{id:t.id,title:t.title,icon:t.icon,description:t.description,app_name:t.app_name,app_id:t.app_id,tools:t.tools,metadata:t.metadata}}function me(t){const e=A.c(35),{binding:m,renderHeader:f,renderEmptyState:i}=t,{org:o,project:l}=W();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const{org:r,project:g,pluginId:u}=D(a),J=oe(),{data:y}=X.useSession();let b;e[1]!==o.id?(b={connectionId:le,orgId:o.id},e[1]=o.id,e[2]=b):b=e[2];const H=re(b);let x;e[3]!==u||e[4]!==l.id?(x=Z.projectPluginConfig(l.id??"",u),e[3]=u,e[4]=l.id,e[5]=x):x=e[5];let p;e[6]!==u||e[7]!==l.id||e[8]!==H?(p=async()=>{const s=await H.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:l.id,pluginId:u}});return s.structuredContent??s},e[6]=u,e[7]=l.id,e[8]=H,e[9]=p):p=e[9];const T=!!l.id&&!!u;let _;e[10]!==x||e[11]!==p||e[12]!==T?(_={queryKey:x,queryFn:p,enabled:T},e[10]=x,e[11]=p,e[12]=T,e[13]=_):_=e[13];const{data:U,isLoading:Y}=se(_),F=de(J,m),K=U?.config?.connectionId,j=K?F.find(s=>s.id===K):null,P=ce({connectionId:j?.id,orgId:o.id}),w=y?.user?{user:{id:y.user.id,name:y.user.name,email:y.user.email,image:y.user.image}}:null,z={id:o.id,slug:o.slug,name:o.name};if(Y){let s;return e[14]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),e[14]=s):s=e[14],s}if(F.length===0){const s={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let c;e[15]!==i?(c=i(),e[15]=i,e[16]=c):c=e[16];let d;return e[17]!==c?(d=n.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:c}),e[17]=c,e[18]=d):d=e[18],n.jsx($,{value:s,children:d})}if(!j){const s={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let c;e[19]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[n.jsx(ae,{size:48,className:"text-muted-foreground mb-2"}),n.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]}),e[19]=c):c=e[19];const d=r??o.slug,O=g??l.slug??"";let L;return e[20]!==d||e[21]!==O?(L=n.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:[c,n.jsx(ee,{asChild:!0,children:n.jsx(te,{to:"/$org/$project/settings",params:{org:d,project:O},children:"Go to Project Settings"})})]}),e[20]=d,e[21]=O,e[22]=L):L=e[22],n.jsx($,{value:s,children:L})}let S;e[23]!==P?(S=(s,c)=>P?P.callTool({name:s,arguments:c}).then(fe):Promise.reject(new Error("MCP client is not available")),e[23]=P,e[24]=S):S=e[24];const V={connectionId:j.id,connection:R(j),toolCaller:S,org:z,session:w},B=E,G=E,k=E,M=f({connections:[R(j)],selectedConnectionId:j.id,onConnectionChange:ue});let h;e[25]!==M||e[26]!==k.Header.Left?(h=n.jsx(k.Header.Left,{children:M}),e[25]=M,e[26]=k.Header.Left,e[27]=h):h=e[27];let C;e[28]!==h||e[29]!==G.Header?(C=n.jsx(G.Header,{children:h}),e[28]=h,e[29]=G.Header,e[30]=C):C=e[30];let N;e[31]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(E.Content,{children:n.jsx(q.Suspense,{fallback:n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),children:n.jsx(Q,{})})}),e[31]=N):N=e[31];let I;return e[32]!==B||e[33]!==C?(I=n.jsxs(B,{children:[C,N]}),e[32]=B,e[33]=C,e[34]=I):I=e[34],n.jsx($,{value:V,children:I})}function ue(){}function fe(t){return t.structuredContent??t}function Le(){const t=A.c(12);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{pluginId:m}=D(e);let f;t[1]!==m?(f=ne.find(r=>r.id===m),t[1]=m,t[2]=f):f=t[2];const i=f;if(i?.renderHeader&&i?.renderEmptyState&&i?.binding){let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[3]=r):r=t[3];let g;return t[4]!==i.binding||t[5]!==i.renderEmptyState||t[6]!==i.renderHeader?(g=n.jsx(q.Suspense,{fallback:r,children:n.jsx(me,{binding:i.binding,renderHeader:i.renderHeader,renderEmptyState:i.renderEmptyState})}),t[4]=i.binding,t[5]=i.renderEmptyState,t[6]=i.renderHeader,t[7]=g):g=t[7],g}const o=i?.LayoutComponent;if(!o){let r;return t[8]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Q,{}),t[8]=r):r=t[8],r}let l;t[9]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[9]=l):l=t[9];let a;return t[10]!==o?(a=n.jsx(q.Suspense,{fallback:l,children:n.jsx(o,{})}),t[10]=o,t[11]=a):a=t[11],a}export{Le as default};
@@ -1,4 +1,4 @@
1
- import{c as R,r as A,D as E,j as t}from"./index-De7oAufQ.js";import{i as de}from"./AlertCircle-DOAxiEBN.js";import{i as ue}from"./CheckCircle-DoZ7ERyW.js";import{n as Y}from"./ChevronLeft-CMUbV0KP.js";import{i as me}from"./Loading01-Bgt2pWQu.js";import{i as fe}from"./use-copy-Cyun7kVE.js";import{s as Z}from"./XClose-CM_PUH0D.js";import{c as xe}from"./usage-BW6ztpN6.js";import{I as pe}from"./integration-icon-BkY1vh6I.js";import{a as he,u as ge}from"./context-BFTRA5vP.js";function F(s){return s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}k`:String(s)}function ee(s){if(!s)return"—";const e=typeof s=="string"?new Date(s):s;return isNaN(e.getTime())?"—":e.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function be(s){return s?s.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function je(s){const e=R.c(4),{items:n}=s;let a;e[0]!==n?(a=n.map(ve),e[0]=n,e[1]=a):a=e[1];let r;return e[2]!==a?(r=t.jsx("div",{className:"grid grid-cols-2 gap-x-8 gap-y-6",children:a}),e[2]=a,e[3]=r):r=e[3],r}function ve(s){return t.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[t.jsx("span",{className:"text-xs text-muted-foreground truncate",children:s.label}),t.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:s.value})]},s.label)}function Ne(s){const e=R.c(30),{userTokens:n,assistantTokens:a,otherTokens:r}=s,k=n+a+r,w=k>0?n/k*100:0,o=k>0?a/k*100:0,N=k>0?r/k*100:0;let u;e[0]!==w?(u=w>0&&t.jsx("div",{className:"h-full bg-chart-1",style:{width:`${w}%`}}),e[0]=w,e[1]=u):u=e[1];let g;e[2]!==o?(g=o>0&&t.jsx("div",{className:"h-full bg-chart-2",style:{width:`${o}%`}}),e[2]=o,e[3]=g):g=e[3];let v;e[4]!==N?(v=N>0&&t.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${N}%`}}),e[4]=N,e[5]=v):v=e[5];let h;e[6]!==u||e[7]!==g||e[8]!==v?(h=t.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[u,g,v]}),e[6]=u,e[7]=g,e[8]=v,e[9]=h):h=e[9];let x;e[10]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=x):x=e[10];let c;e[11]!==w?(c=w.toFixed(1),e[11]=w,e[12]=c):c=e[12];let b;e[13]!==c?(b=t.jsxs("div",{className:"flex items-center gap-1.5",children:[x,t.jsxs("span",{className:"text-xs text-muted-foreground",children:["User ",c,"%"]})]}),e[13]=c,e[14]=b):b=e[14];let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[15]=d):d=e[15];let m;e[16]!==o?(m=o.toFixed(1),e[16]=o,e[17]=m):m=e[17];let f;e[18]!==m?(f=t.jsxs("div",{className:"flex items-center gap-1.5",children:[d,t.jsxs("span",{className:"text-xs text-muted-foreground",children:["Assistant ",m,"%"]})]}),e[18]=m,e[19]=f):f=e[19];let l;e[20]!==N||e[21]!==r?(l=r>0&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),t.jsxs("span",{className:"text-xs text-muted-foreground",children:["Other ",N.toFixed(1),"%"]})]}),e[20]=N,e[21]=r,e[22]=l):l=e[22];let i;e[23]!==f||e[24]!==l||e[25]!==b?(i=t.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[b,f,l]}),e[23]=f,e[24]=l,e[25]=b,e[26]=i):i=e[26];let p;return e[27]!==i||e[28]!==h?(p=t.jsxs("div",{className:"flex flex-col gap-2",children:[h,i]}),e[27]=i,e[28]=h,e[29]=p):p=e[29],p}function Be(s){const e=R.c(61),{onClose:n,back:a,className:r}=s,[k,w]=A.useState(null),{messages:o,tasks:N,activeTaskId:u,model:g,selectedVirtualMcp:v,virtualMcps:h}=he();let x,c,b,d,m,f,l,i;if(e[0]!==u||e[1]!==a||e[2]!==r||e[3]!==o||e[4]!==g||e[5]!==n||e[6]!==k?.id||e[7]!==v?.title||e[8]!==N||e[9]!==h){i=Symbol.for("react.early_return_sentinel");e:{let $;e[18]!==u?($=j=>j.id===u,e[18]=u,e[19]=$):$=e[19];const L=N.find($),S=xe(o),D=g?.limits?.contextWindow??null,Q=D&&D>0?(S.totalTokens/D*100).toFixed(1):null,J=o;let P;e[20]!==J?(P=J.filter(Ce).reduce(_e,0),e[20]=J,e[21]=P):P=e[21];const U=P,V=o;let B;e[22]!==V?(B=V.filter(Se).reduce(Te,0),e[22]=V,e[23]=B):B=e[23];const O=B,H=Math.max(0,S.totalTokens-U-O),te=o[0],se=o.at(-1),ne=te?.metadata?.created_at??L?.created_at,le=se?.metadata?.created_at??L?.updated_at,W=o.filter(we);let K;e[24]!==h?(K=j=>(j.parts??[]).filter(ye).map(y=>{const _=y.input?.agent_id,C=_?h.find(ce=>ce.id===_):null,M=y.state==="input-streaming"||y.state==="input-available"||y.state==="output-available"&&y.preliminary===!0,z=y.state==="output-error",oe=y.state==="approval-requested";return{part:y,agentTitle:C?.title??"Subtask",agentIcon:C?.icon??null,isRunning:M,isError:z,isApproval:oe}}),e[24]=h,e[25]=K):K=e[25];const X=o.flatMap(K),ae=g?.modelId?be(g.modelId):"—",re=v?.title??"Decopilot",ie=[{label:"Session",value:L?.title??"New chat"},{label:"Messages",value:W.length},{label:"Agent",value:re},{label:"Model",value:ae},{label:"Context Limit",value:D?F(D):"—"},{label:"Total Tokens",value:S.totalTokens>0?F(S.totalTokens):"0"},{label:"Usage",value:Q!==null?`${Q}%`:"—"},{label:"Input Tokens",value:S.inputTokens>0?F(S.inputTokens):"0"},{label:"Output Tokens",value:S.outputTokens>0?F(S.outputTokens):"0"},{label:"Reasoning Tokens",value:S.reasoningTokens>0?F(S.reasoningTokens):"0"},{label:"Cost",value:S.cost>0?`$${S.cost<.001?S.cost.toFixed(6):S.cost.toFixed(4)}`:"$0.00"},{label:"Session Created",value:ee(ne)},{label:"Last Activity",value:ee(le)}];if(!L&&W.length===0){let j;e[26]!==r?(j=E("flex flex-col h-full w-full border-l border-border bg-background",r),e[26]=r,e[27]=j):j=e[27];let y;e[28]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Context"}),e[28]=y):y=e[28];let _;e[29]!==a?(_=a?t.jsx(Y,{size:14,className:"text-muted-foreground"}):t.jsx(Z,{size:14,className:"text-muted-foreground"}),e[29]=a,e[30]=_):_=e[30];let C;e[31]!==n||e[32]!==_?(C=t.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[y,t.jsx("button",{type:"button",onClick:n,className:"flex size-6 items-center justify-center rounded hover:bg-accent transition-colors",children:_})]}),e[31]=n,e[32]=_,e[33]=C):C=e[33];let M;e[34]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:t.jsx("p",{className:"text-xs text-muted-foreground",children:"Start a conversation to see context"})}),e[34]=M):M=e[34];let z;e[35]!==j||e[36]!==C?(z=t.jsxs("div",{className:j,children:[C,M]}),e[35]=j,e[36]=C,e[37]=z):z=e[37],i=z;break e}e[38]!==r?(f=E("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",r),e[38]=r,e[39]=f):f=e[39];let q;e[40]===Symbol.for("react.memo_cache_sentinel")?(q=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Context"}),e[40]=q):q=e[40];let I;e[41]!==a?(I=a?t.jsx(Y,{size:14}):t.jsx(Z,{size:14}),e[41]=a,e[42]=I):I=e[42],e[43]!==n||e[44]!==I?(l=t.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[q,t.jsx("button",{type:"button",onClick:n,className:"flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:I})]}),e[43]=n,e[44]=I,e[45]=l):l=e[45],x="flex flex-col gap-8 p-6",c=X.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:"Subtasks"}),t.jsx("div",{className:"flex flex-col gap-1",children:X.map(ke)})]}),b=t.jsx(je,{items:ie});let G;e[46]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx("span",{className:"text-xs text-muted-foreground",children:"Context Breakdown"}),e[46]=G):G=e[46],e[47]!==O||e[48]!==H||e[49]!==U?(d=t.jsxs("div",{className:"flex flex-col gap-3",children:[G,t.jsx(Ne,{userTokens:U,assistantTokens:O,otherTokens:H})]}),e[47]=O,e[48]=H,e[49]=U,e[50]=d):d=e[50],m=W.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:"Raw messages"}),t.jsx("div",{className:"flex flex-col gap-1",children:W.map(j=>{const y=j.metadata?.created_at,_=k?.id===j.id;return t.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[t.jsxs("button",{type:"button",onClick:()=>w(_?null:j),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent/50 w-full text-left cursor-pointer",children:[t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx("span",{className:E("shrink-0 font-medium",j.role==="user"?"text-chart-1":"text-chart-2"),children:j.role}),t.jsx("span",{className:"text-muted-foreground",children:"•"}),t.jsx("span",{className:"truncate text-muted-foreground font-mono",children:j.id})]}),y&&t.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:new Date(y).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})})]}),_&&t.jsx("pre",{className:"text-xs font-mono bg-muted px-3 py-2 overflow-auto whitespace-pre-wrap break-all border-t border-border/50 max-h-64",children:JSON.stringify(j,null,2)})]},j.id)})})]})}e[0]=u,e[1]=a,e[2]=r,e[3]=o,e[4]=g,e[5]=n,e[6]=k?.id,e[7]=v?.title,e[8]=N,e[9]=h,e[10]=x,e[11]=c,e[12]=b,e[13]=d,e[14]=m,e[15]=f,e[16]=l,e[17]=i}else x=e[10],c=e[11],b=e[12],d=e[13],m=e[14],f=e[15],l=e[16],i=e[17];if(i!==Symbol.for("react.early_return_sentinel"))return i;let p;e[51]!==x||e[52]!==c||e[53]!==b||e[54]!==d||e[55]!==m?(p=t.jsxs("div",{className:x,children:[c,b,d,m]}),e[51]=x,e[52]=c,e[53]=b,e[54]=d,e[55]=m,e[56]=p):p=e[56];let T;return e[57]!==f||e[58]!==l||e[59]!==p?(T=t.jsxs("div",{className:f,children:[l,p]}),e[57]=f,e[58]=l,e[59]=p,e[60]=T):T=e[60],T}function ke(s,e){return t.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[t.jsx(pe,{icon:s.agentIcon,name:s.agentTitle,size:"xs",className:"size-6 rounded-md shrink-0"}),t.jsx("span",{className:E("shrink-0 font-medium",s.isError?"text-destructive":"text-foreground"),children:s.agentTitle}),s.part.input?.prompt&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted-foreground/50",children:"·"}),t.jsx("span",{className:"truncate text-muted-foreground",children:s.part.input.prompt})]}),t.jsx("span",{className:"ml-auto shrink-0",children:s.isRunning?t.jsx(me,{size:12,className:"animate-spin text-muted-foreground"}):s.isError?t.jsx(fe,{size:12,className:"text-destructive"}):s.isApproval?t.jsx(de,{size:12,className:"text-warning"}):t.jsx(ue,{size:12,className:"text-emerald-500"})})]},e)}function ye(s){return s.type==="tool-subtask"}function we(s){return s.role!=="system"}function Te(s,e){const n=e.metadata?.usage;return s+(n?.outputTokens??0)}function Se(s){return s.role==="assistant"}function _e(s,e){const n=e.metadata?.usage;return s+(n?.inputTokens??0)}function Ce(s){return s.role==="user"}function $e(s){const e=R.c(22),{text:n,className:a,speed:r}=s,k=a===void 0?"":a,w=r===void 0?30:r,[o,N]=A.useState(!1),u=n.length/w*1e3,g=n.length,v=`${n.length}ch`;let h;e[0]!==u?(h=()=>{N(!1);const $=setTimeout(()=>{N(!0)},u);return()=>clearTimeout($)},e[0]=u,e[1]=h):h=e[1];let x;e[2]!==u||e[3]!==n?(x=[n,u],e[2]=u,e[3]=n,e[4]=x):x=e[4],A.useEffect(h,x);let c;e[5]!==k?(c=E(k,"block overflow-hidden inline-flex"),e[5]=k,e[6]=c):c=e[6];const b=`${u}ms`;let d;e[7]!==v||e[8]!==g||e[9]!==b?(d={"--typewriter-duration":b,"--typewriter-steps":g,"--typewriter-max-width":v},e[7]=v,e[8]=g,e[9]=b,e[10]=d):d=e[10];const m=d,f=o&&"truncate";let l;e[11]!==f?(l=E("typewriter-text",f),e[11]=f,e[12]=l):l=e[12];let i;e[13]!==l||e[14]!==n?(i=t.jsx("span",{className:l,children:n}),e[13]=l,e[14]=n,e[15]=i):i=e[15];let p;e[16]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("style",{children:`
1
+ import{c as R,r as A,D as E,j as t}from"./index-DcxE8oe_.js";import{i as de}from"./AlertCircle-CI8iQIN4.js";import{i as ue}from"./CheckCircle-DosFvCW2.js";import{n as Y}from"./ChevronLeft-Bk7mc5_w.js";import{i as me}from"./Loading01-B85tVuIU.js";import{i as fe}from"./use-copy-sxHnzQ3E.js";import{s as Z}from"./XClose-Dey3r3af.js";import{c as xe}from"./usage-BW6ztpN6.js";import{I as pe}from"./integration-icon-6jcHFHZV.js";import{a as he,u as ge}from"./context-BTMVzdan.js";function F(s){return s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}k`:String(s)}function ee(s){if(!s)return"—";const e=typeof s=="string"?new Date(s):s;return isNaN(e.getTime())?"—":e.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function be(s){return s?s.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function je(s){const e=R.c(4),{items:n}=s;let a;e[0]!==n?(a=n.map(ve),e[0]=n,e[1]=a):a=e[1];let r;return e[2]!==a?(r=t.jsx("div",{className:"grid grid-cols-2 gap-x-8 gap-y-6",children:a}),e[2]=a,e[3]=r):r=e[3],r}function ve(s){return t.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[t.jsx("span",{className:"text-xs text-muted-foreground truncate",children:s.label}),t.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:s.value})]},s.label)}function Ne(s){const e=R.c(30),{userTokens:n,assistantTokens:a,otherTokens:r}=s,k=n+a+r,w=k>0?n/k*100:0,o=k>0?a/k*100:0,N=k>0?r/k*100:0;let u;e[0]!==w?(u=w>0&&t.jsx("div",{className:"h-full bg-chart-1",style:{width:`${w}%`}}),e[0]=w,e[1]=u):u=e[1];let g;e[2]!==o?(g=o>0&&t.jsx("div",{className:"h-full bg-chart-2",style:{width:`${o}%`}}),e[2]=o,e[3]=g):g=e[3];let v;e[4]!==N?(v=N>0&&t.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${N}%`}}),e[4]=N,e[5]=v):v=e[5];let h;e[6]!==u||e[7]!==g||e[8]!==v?(h=t.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[u,g,v]}),e[6]=u,e[7]=g,e[8]=v,e[9]=h):h=e[9];let x;e[10]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=x):x=e[10];let c;e[11]!==w?(c=w.toFixed(1),e[11]=w,e[12]=c):c=e[12];let b;e[13]!==c?(b=t.jsxs("div",{className:"flex items-center gap-1.5",children:[x,t.jsxs("span",{className:"text-xs text-muted-foreground",children:["User ",c,"%"]})]}),e[13]=c,e[14]=b):b=e[14];let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[15]=d):d=e[15];let m;e[16]!==o?(m=o.toFixed(1),e[16]=o,e[17]=m):m=e[17];let f;e[18]!==m?(f=t.jsxs("div",{className:"flex items-center gap-1.5",children:[d,t.jsxs("span",{className:"text-xs text-muted-foreground",children:["Assistant ",m,"%"]})]}),e[18]=m,e[19]=f):f=e[19];let l;e[20]!==N||e[21]!==r?(l=r>0&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),t.jsxs("span",{className:"text-xs text-muted-foreground",children:["Other ",N.toFixed(1),"%"]})]}),e[20]=N,e[21]=r,e[22]=l):l=e[22];let i;e[23]!==f||e[24]!==l||e[25]!==b?(i=t.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[b,f,l]}),e[23]=f,e[24]=l,e[25]=b,e[26]=i):i=e[26];let p;return e[27]!==i||e[28]!==h?(p=t.jsxs("div",{className:"flex flex-col gap-2",children:[h,i]}),e[27]=i,e[28]=h,e[29]=p):p=e[29],p}function Be(s){const e=R.c(61),{onClose:n,back:a,className:r}=s,[k,w]=A.useState(null),{messages:o,tasks:N,activeTaskId:u,model:g,selectedVirtualMcp:v,virtualMcps:h}=he();let x,c,b,d,m,f,l,i;if(e[0]!==u||e[1]!==a||e[2]!==r||e[3]!==o||e[4]!==g||e[5]!==n||e[6]!==k?.id||e[7]!==v?.title||e[8]!==N||e[9]!==h){i=Symbol.for("react.early_return_sentinel");e:{let $;e[18]!==u?($=j=>j.id===u,e[18]=u,e[19]=$):$=e[19];const L=N.find($),S=xe(o),D=g?.limits?.contextWindow??null,Q=D&&D>0?(S.totalTokens/D*100).toFixed(1):null,J=o;let P;e[20]!==J?(P=J.filter(Ce).reduce(_e,0),e[20]=J,e[21]=P):P=e[21];const U=P,V=o;let B;e[22]!==V?(B=V.filter(Se).reduce(Te,0),e[22]=V,e[23]=B):B=e[23];const O=B,H=Math.max(0,S.totalTokens-U-O),te=o[0],se=o.at(-1),ne=te?.metadata?.created_at??L?.created_at,le=se?.metadata?.created_at??L?.updated_at,W=o.filter(we);let K;e[24]!==h?(K=j=>(j.parts??[]).filter(ye).map(y=>{const _=y.input?.agent_id,C=_?h.find(ce=>ce.id===_):null,M=y.state==="input-streaming"||y.state==="input-available"||y.state==="output-available"&&y.preliminary===!0,z=y.state==="output-error",oe=y.state==="approval-requested";return{part:y,agentTitle:C?.title??"Subtask",agentIcon:C?.icon??null,isRunning:M,isError:z,isApproval:oe}}),e[24]=h,e[25]=K):K=e[25];const X=o.flatMap(K),ae=g?.modelId?be(g.modelId):"—",re=v?.title??"Decopilot",ie=[{label:"Session",value:L?.title??"New chat"},{label:"Messages",value:W.length},{label:"Agent",value:re},{label:"Model",value:ae},{label:"Context Limit",value:D?F(D):"—"},{label:"Total Tokens",value:S.totalTokens>0?F(S.totalTokens):"0"},{label:"Usage",value:Q!==null?`${Q}%`:"—"},{label:"Input Tokens",value:S.inputTokens>0?F(S.inputTokens):"0"},{label:"Output Tokens",value:S.outputTokens>0?F(S.outputTokens):"0"},{label:"Reasoning Tokens",value:S.reasoningTokens>0?F(S.reasoningTokens):"0"},{label:"Cost",value:S.cost>0?`$${S.cost<.001?S.cost.toFixed(6):S.cost.toFixed(4)}`:"$0.00"},{label:"Session Created",value:ee(ne)},{label:"Last Activity",value:ee(le)}];if(!L&&W.length===0){let j;e[26]!==r?(j=E("flex flex-col h-full w-full border-l border-border bg-background",r),e[26]=r,e[27]=j):j=e[27];let y;e[28]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Context"}),e[28]=y):y=e[28];let _;e[29]!==a?(_=a?t.jsx(Y,{size:14,className:"text-muted-foreground"}):t.jsx(Z,{size:14,className:"text-muted-foreground"}),e[29]=a,e[30]=_):_=e[30];let C;e[31]!==n||e[32]!==_?(C=t.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[y,t.jsx("button",{type:"button",onClick:n,className:"flex size-6 items-center justify-center rounded hover:bg-accent transition-colors",children:_})]}),e[31]=n,e[32]=_,e[33]=C):C=e[33];let M;e[34]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:t.jsx("p",{className:"text-xs text-muted-foreground",children:"Start a conversation to see context"})}),e[34]=M):M=e[34];let z;e[35]!==j||e[36]!==C?(z=t.jsxs("div",{className:j,children:[C,M]}),e[35]=j,e[36]=C,e[37]=z):z=e[37],i=z;break e}e[38]!==r?(f=E("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",r),e[38]=r,e[39]=f):f=e[39];let q;e[40]===Symbol.for("react.memo_cache_sentinel")?(q=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Context"}),e[40]=q):q=e[40];let I;e[41]!==a?(I=a?t.jsx(Y,{size:14}):t.jsx(Z,{size:14}),e[41]=a,e[42]=I):I=e[42],e[43]!==n||e[44]!==I?(l=t.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[q,t.jsx("button",{type:"button",onClick:n,className:"flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:I})]}),e[43]=n,e[44]=I,e[45]=l):l=e[45],x="flex flex-col gap-8 p-6",c=X.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:"Subtasks"}),t.jsx("div",{className:"flex flex-col gap-1",children:X.map(ke)})]}),b=t.jsx(je,{items:ie});let G;e[46]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx("span",{className:"text-xs text-muted-foreground",children:"Context Breakdown"}),e[46]=G):G=e[46],e[47]!==O||e[48]!==H||e[49]!==U?(d=t.jsxs("div",{className:"flex flex-col gap-3",children:[G,t.jsx(Ne,{userTokens:U,assistantTokens:O,otherTokens:H})]}),e[47]=O,e[48]=H,e[49]=U,e[50]=d):d=e[50],m=W.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:"Raw messages"}),t.jsx("div",{className:"flex flex-col gap-1",children:W.map(j=>{const y=j.metadata?.created_at,_=k?.id===j.id;return t.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[t.jsxs("button",{type:"button",onClick:()=>w(_?null:j),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent/50 w-full text-left cursor-pointer",children:[t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx("span",{className:E("shrink-0 font-medium",j.role==="user"?"text-chart-1":"text-chart-2"),children:j.role}),t.jsx("span",{className:"text-muted-foreground",children:"•"}),t.jsx("span",{className:"truncate text-muted-foreground font-mono",children:j.id})]}),y&&t.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:new Date(y).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})})]}),_&&t.jsx("pre",{className:"text-xs font-mono bg-muted px-3 py-2 overflow-auto whitespace-pre-wrap break-all border-t border-border/50 max-h-64",children:JSON.stringify(j,null,2)})]},j.id)})})]})}e[0]=u,e[1]=a,e[2]=r,e[3]=o,e[4]=g,e[5]=n,e[6]=k?.id,e[7]=v?.title,e[8]=N,e[9]=h,e[10]=x,e[11]=c,e[12]=b,e[13]=d,e[14]=m,e[15]=f,e[16]=l,e[17]=i}else x=e[10],c=e[11],b=e[12],d=e[13],m=e[14],f=e[15],l=e[16],i=e[17];if(i!==Symbol.for("react.early_return_sentinel"))return i;let p;e[51]!==x||e[52]!==c||e[53]!==b||e[54]!==d||e[55]!==m?(p=t.jsxs("div",{className:x,children:[c,b,d,m]}),e[51]=x,e[52]=c,e[53]=b,e[54]=d,e[55]=m,e[56]=p):p=e[56];let T;return e[57]!==f||e[58]!==l||e[59]!==p?(T=t.jsxs("div",{className:f,children:[l,p]}),e[57]=f,e[58]=l,e[59]=p,e[60]=T):T=e[60],T}function ke(s,e){return t.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[t.jsx(pe,{icon:s.agentIcon,name:s.agentTitle,size:"xs",className:"size-6 rounded-md shrink-0"}),t.jsx("span",{className:E("shrink-0 font-medium",s.isError?"text-destructive":"text-foreground"),children:s.agentTitle}),s.part.input?.prompt&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted-foreground/50",children:"·"}),t.jsx("span",{className:"truncate text-muted-foreground",children:s.part.input.prompt})]}),t.jsx("span",{className:"ml-auto shrink-0",children:s.isRunning?t.jsx(me,{size:12,className:"animate-spin text-muted-foreground"}):s.isError?t.jsx(fe,{size:12,className:"text-destructive"}):s.isApproval?t.jsx(de,{size:12,className:"text-warning"}):t.jsx(ue,{size:12,className:"text-emerald-500"})})]},e)}function ye(s){return s.type==="tool-subtask"}function we(s){return s.role!=="system"}function Te(s,e){const n=e.metadata?.usage;return s+(n?.outputTokens??0)}function Se(s){return s.role==="assistant"}function _e(s,e){const n=e.metadata?.usage;return s+(n?.inputTokens??0)}function Ce(s){return s.role==="user"}function $e(s){const e=R.c(22),{text:n,className:a,speed:r}=s,k=a===void 0?"":a,w=r===void 0?30:r,[o,N]=A.useState(!1),u=n.length/w*1e3,g=n.length,v=`${n.length}ch`;let h;e[0]!==u?(h=()=>{N(!1);const $=setTimeout(()=>{N(!0)},u);return()=>clearTimeout($)},e[0]=u,e[1]=h):h=e[1];let x;e[2]!==u||e[3]!==n?(x=[n,u],e[2]=u,e[3]=n,e[4]=x):x=e[4],A.useEffect(h,x);let c;e[5]!==k?(c=E(k,"block overflow-hidden inline-flex"),e[5]=k,e[6]=c):c=e[6];const b=`${u}ms`;let d;e[7]!==v||e[8]!==g||e[9]!==b?(d={"--typewriter-duration":b,"--typewriter-steps":g,"--typewriter-max-width":v},e[7]=v,e[8]=g,e[9]=b,e[10]=d):d=e[10];const m=d,f=o&&"truncate";let l;e[11]!==f?(l=E("typewriter-text",f),e[11]=f,e[12]=l):l=e[12];let i;e[13]!==l||e[14]!==n?(i=t.jsx("span",{className:l,children:n}),e[13]=l,e[14]=n,e[15]=i):i=e[15];let p;e[16]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("style",{children:`
2
2
  .typewriter-text {
3
3
  display: inline-block;
4
4
  width: 0;
@@ -1 +1 @@
1
- import{c as v,D as N,j as t}from"./index-De7oAufQ.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
1
+ import{c as v,D as N,j as t}from"./index-DcxE8oe_.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
@@ -1 +1 @@
1
- import{c as b,D as h,j as t,B as g}from"./index-De7oAufQ.js";function y(N){const e=b.c(21),{icon:o,illustration:a,title:u,description:d,buttonProps:s,buttonComponent:x,className:j,children:p}=N;let l;e[0]!==j?(l=h("flex flex-col items-center justify-center py-16 text-center",j),e[0]=j,e[1]=l):l=e[1];let i;e[2]!==o||e[3]!==a?(i=a?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:a}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=a,e[4]=i):i=e[4];let n;e[5]!==u?(n=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[5]=u,e[6]=n):n=e[6];let c;e[7]!==d?(c=d&&t.jsx("div",{className:"text-sm text-muted-foreground",children:d}),e[7]=d,e[8]=c):c=e[8];let r;e[9]!==n||e[10]!==c?(r=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[n,c]}),e[9]=n,e[10]=c,e[11]=r):r=e[11];let m;e[12]!==x||e[13]!==s?(m=(x??s)&&t.jsx("div",{className:"mt-4",children:x??(s&&t.jsx(g,{size:"sm",className:h(s?.className),...s}))}),e[12]=x,e[13]=s,e[14]=m):m=e[14];let f;return e[15]!==p||e[16]!==l||e[17]!==i||e[18]!==r||e[19]!==m?(f=t.jsxs("div",{className:l,children:[i,r,m,p]}),e[15]=p,e[16]=l,e[17]=i,e[18]=r,e[19]=m,e[20]=f):f=e[20],f}export{y as E};
1
+ import{c as b,D as h,j as t,B as g}from"./index-DcxE8oe_.js";function y(N){const e=b.c(21),{icon:o,illustration:a,title:u,description:d,buttonProps:s,buttonComponent:x,className:j,children:p}=N;let l;e[0]!==j?(l=h("flex flex-col items-center justify-center py-16 text-center",j),e[0]=j,e[1]=l):l=e[1];let i;e[2]!==o||e[3]!==a?(i=a?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:a}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=a,e[4]=i):i=e[4];let n;e[5]!==u?(n=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[5]=u,e[6]=n):n=e[6];let c;e[7]!==d?(c=d&&t.jsx("div",{className:"text-sm text-muted-foreground",children:d}),e[7]=d,e[8]=c):c=e[8];let r;e[9]!==n||e[10]!==c?(r=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[n,c]}),e[9]=n,e[10]=c,e[11]=r):r=e[11];let m;e[12]!==x||e[13]!==s?(m=(x??s)&&t.jsx("div",{className:"mt-4",children:x??(s&&t.jsx(g,{size:"sm",className:h(s?.className),...s}))}),e[12]=x,e[13]=s,e[14]=m):m=e[14];let f;return e[15]!==p||e[16]!==l||e[17]!==i||e[18]!==r||e[19]!==m?(f=t.jsxs("div",{className:l,children:[i,r,m,p]}),e[15]=p,e[16]=l,e[17]=i,e[18]=r,e[19]=m,e[20]=f):f=e[20],f}export{y as E};
@@ -1 +1 @@
1
- import{o as V,av as q,aw as R,n as o,ax as S,ay as A,c as I,j as l,B as C}from"./index-De7oAufQ.js";import{I as T}from"./input-_VKm0O_1.js";import{s as z}from"./Plus-Bah3bfIq.js";import{s as K}from"./Trash01-DJLT0hlL.js";const W=V({key:o().min(1,"Key is required"),value:o()}),M=V({title:o().min(1,"Name is required"),description:o().nullable().optional(),icon:o().nullable().optional(),ui_type:A(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:o().optional(),connection_token:o().nullable().optional(),npx_package:o().optional(),stdio_command:o().optional(),stdio_args:o().optional(),stdio_cwd:o().optional(),env_vars:S(W).optional(),configuration_scopes:S(o()).nullable().optional(),configuration_state:q(o(),R()).nullable().optional()}).refine(s=>s.ui_type==="NPX"?!!s.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(s=>s.ui_type==="STDIO"?!!s.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(s=>s.ui_type==="HTTP"||s.ui_type==="SSE"||s.ui_type==="Websocket"?!!s.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]});function B(s){const e=s.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(c=>e.includes(c))||["sk_","rk_","whsec_","pk_live","sk_live"].some(c=>e.startsWith(c))||["_key","_secret","_token","_password","_auth","_pat"].some(c=>e.endsWith(c)))}function X(s){const e=I.c(34),{value:t,onChange:n,keyPlaceholder:E,valuePlaceholder:c,className:N}=s,d=E===void 0?"VARIABLE_NAME":E,f=c===void 0?"value...":c;let y;e[0]!==n||e[1]!==t?(y=()=>{n([...t,{key:"",value:""}])},e[0]=n,e[1]=t,e[2]=y):y=e[2];const P=y;let g;e[3]!==n||e[4]!==t?(g=i=>{n(t.filter((u,r)=>r!==i))},e[3]=n,e[4]=t,e[5]=g):g=e[5];const h=g;let x;e[6]!==n||e[7]!==t?(x=(i,u)=>{const r=[...t],a=r[i];a&&(r[i]={key:u,value:a.value},n(r))},e[6]=n,e[7]=t,e[8]=x):x=e[8];const k=x;let b;e[9]!==n||e[10]!==t?(b=(i,u)=>{const r=[...t],a=r[i];a&&(r[i]={key:a.key,value:u},n(r))},e[9]=n,e[10]=t,e[11]=b):b=e[11];const v=b;let p;if(e[12]!==k||e[13]!==h||e[14]!==v||e[15]!==d||e[16]!==t||e[17]!==f){let i;e[19]!==k||e[20]!==h||e[21]!==v||e[22]!==d||e[23]!==f?(i=(u,r)=>l.jsxs("div",{className:"flex gap-2 items-center",children:[l.jsx(T,{placeholder:d,value:u.key,onChange:a=>k(r,a.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),l.jsx(T,{type:B(u.key)?"password":"text",placeholder:f,value:u.value,onChange:a=>v(r,a.target.value),className:"h-10 rounded-lg flex-1"}),l.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>h(r),children:l.jsx(K,{size:16})})]},r),e[19]=k,e[20]=h,e[21]=v,e[22]=d,e[23]=f,e[24]=i):i=e[24],p=t.map(i),e[12]=k,e[13]=h,e[14]=v,e[15]=d,e[16]=t,e[17]=f,e[18]=p}else p=e[18];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=l.jsx(z,{size:16,className:"mr-1"}),e[25]=w):w=e[25];let m;e[26]!==P?(m=l.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:P,children:[w,"Add Environment Variable"]}),e[26]=P,e[27]=m):m=e[27];let _;e[28]!==p||e[29]!==m?(_=l.jsxs("div",{className:"flex flex-col gap-2",children:[p,m]}),e[28]=p,e[29]=m,e[30]=_):_=e[30];let j;return e[31]!==N||e[32]!==_?(j=l.jsx("div",{className:N,children:_}),e[31]=N,e[32]=_,e[33]=j):j=e[33],j}function $(s){const e={};for(const{key:t,value:n}of s)t.trim()&&(e[t.trim()]=n);return e}function F(s){return s?Object.entries(s).map(([e,t])=>({key:e,value:t})):[]}export{X as E,M as c,$ as e,F as r};
1
+ import{o as V,av as q,aw as R,n as o,ax as S,ay as A,c as I,j as l,B as C}from"./index-DcxE8oe_.js";import{I as T}from"./input-DPpAbHbD.js";import{s as z}from"./Plus-C9dY5EOr.js";import{s as K}from"./Trash01-BtiNjuw3.js";const W=V({key:o().min(1,"Key is required"),value:o()}),M=V({title:o().min(1,"Name is required"),description:o().nullable().optional(),icon:o().nullable().optional(),ui_type:A(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:o().optional(),connection_token:o().nullable().optional(),npx_package:o().optional(),stdio_command:o().optional(),stdio_args:o().optional(),stdio_cwd:o().optional(),env_vars:S(W).optional(),configuration_scopes:S(o()).nullable().optional(),configuration_state:q(o(),R()).nullable().optional()}).refine(s=>s.ui_type==="NPX"?!!s.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(s=>s.ui_type==="STDIO"?!!s.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(s=>s.ui_type==="HTTP"||s.ui_type==="SSE"||s.ui_type==="Websocket"?!!s.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]});function B(s){const e=s.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(c=>e.includes(c))||["sk_","rk_","whsec_","pk_live","sk_live"].some(c=>e.startsWith(c))||["_key","_secret","_token","_password","_auth","_pat"].some(c=>e.endsWith(c)))}function X(s){const e=I.c(34),{value:t,onChange:n,keyPlaceholder:E,valuePlaceholder:c,className:N}=s,d=E===void 0?"VARIABLE_NAME":E,f=c===void 0?"value...":c;let y;e[0]!==n||e[1]!==t?(y=()=>{n([...t,{key:"",value:""}])},e[0]=n,e[1]=t,e[2]=y):y=e[2];const P=y;let g;e[3]!==n||e[4]!==t?(g=i=>{n(t.filter((u,r)=>r!==i))},e[3]=n,e[4]=t,e[5]=g):g=e[5];const h=g;let x;e[6]!==n||e[7]!==t?(x=(i,u)=>{const r=[...t],a=r[i];a&&(r[i]={key:u,value:a.value},n(r))},e[6]=n,e[7]=t,e[8]=x):x=e[8];const k=x;let b;e[9]!==n||e[10]!==t?(b=(i,u)=>{const r=[...t],a=r[i];a&&(r[i]={key:a.key,value:u},n(r))},e[9]=n,e[10]=t,e[11]=b):b=e[11];const v=b;let p;if(e[12]!==k||e[13]!==h||e[14]!==v||e[15]!==d||e[16]!==t||e[17]!==f){let i;e[19]!==k||e[20]!==h||e[21]!==v||e[22]!==d||e[23]!==f?(i=(u,r)=>l.jsxs("div",{className:"flex gap-2 items-center",children:[l.jsx(T,{placeholder:d,value:u.key,onChange:a=>k(r,a.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),l.jsx(T,{type:B(u.key)?"password":"text",placeholder:f,value:u.value,onChange:a=>v(r,a.target.value),className:"h-10 rounded-lg flex-1"}),l.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>h(r),children:l.jsx(K,{size:16})})]},r),e[19]=k,e[20]=h,e[21]=v,e[22]=d,e[23]=f,e[24]=i):i=e[24],p=t.map(i),e[12]=k,e[13]=h,e[14]=v,e[15]=d,e[16]=t,e[17]=f,e[18]=p}else p=e[18];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=l.jsx(z,{size:16,className:"mr-1"}),e[25]=w):w=e[25];let m;e[26]!==P?(m=l.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:P,children:[w,"Add Environment Variable"]}),e[26]=P,e[27]=m):m=e[27];let _;e[28]!==p||e[29]!==m?(_=l.jsxs("div",{className:"flex flex-col gap-2",children:[p,m]}),e[28]=p,e[29]=m,e[30]=_):_=e[30];let j;return e[31]!==N||e[32]!==_?(j=l.jsx("div",{className:N,children:_}),e[31]=N,e[32]=_,e[33]=j):j=e[33],j}function $(s){const e={};for(const{key:t,value:n}of s)t.trim()&&(e[t.trim()]=n);return e}function F(s){return s?Object.entries(s).map(([e,t])=>({key:e,value:t})):[]}export{X as E,M as c,$ as e,F as r};
@@ -1 +1 @@
1
- import{g as A}from"./generate-id-WpAuYSZF.js";import{g as D,b as H}from"./registry-utils-Dqc_kCiP.js";const E="mcp.mesh";function O(e){if(!e?.url)return"Unknown";try{return new URL(e.url).hostname}catch{return e.url}}function R(e){const r=e?.identifier||e?.name;return r?r.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,s=>s.toUpperCase()):"Unknown"}function L(e,r,g,s){const n=e.server,t=e._meta?.[E],f=new Date().toISOString(),b=t?.friendlyName||t?.friendly_name||e.title||n?.title||n?.name||"Unnamed MCP Server",v=n?.description||null,x=n?.icons?.[0]?.src||D(n?.repository)||null,o=t?.oauth_config,I=o&&typeof o.authorizationEndpoint=="string"&&typeof o.tokenEndpoint=="string"&&typeof o.clientId=="string"&&Array.isArray(o.scopes)&&(o.grantType==="authorization_code"||o.grantType==="client_credentials")?o:null,N=t?.configuration_state,P=t?.configuration_scopes,T=n?.repository?{url:n.repository.url,source:n.repository.source,subfolder:n.repository.subfolder}:null,u=n?.packages??[],m=n?.remotes??[],C=s?.packageIndex??0,S=s?.remoteIndex??0,y=u.length>0&&s?.packageIndex!==void 0,a=y?u[C]:null,i=y?null:m[S];let c,l,_=null;if(a){const h=a.identifier||a.name;c="STDIO",l="";const d={};if(a.environmentVariables)for(const k of a.environmentVariables)k.name&&(d[k.name]="");_={command:"npx",args:h?["-y",h]:[],...Object.keys(d).length>0&&{envVars:d}}}else i?(c=H(i.type)||"HTTP",l=i.url||""):(c="HTTP",l="");const w=m.length>1,M=u.length>1;let p="";a&&M?p=` (${R(a)})`:i&&w&&(p=` (${O(i)})`);const U=b+p;return{id:A("conn"),title:U,description:v,icon:x,app_name:t?.appName||n?.name||null,app_id:t?.id||e.id||null,connection_type:c,connection_url:l,connection_token:null,connection_headers:_,oauth_config:I,configuration_state:N??null,configuration_scopes:P??null,metadata:{source:"store",registry_item_id:e.id,verified:t?.verified??!1,scopeName:t?.scopeName??null,toolsCount:t?.tools?.length??0,publishedAt:t?.publishedAt??null,repository:T},created_at:f,updated_at:f,created_by:g,organization_id:r,tools:null,bindings:null,status:"inactive"}}export{E as M,L as e};
1
+ import{g as A}from"./generate-id-BaIFvm62.js";import{g as D,b as H}from"./registry-utils-CkCRcmq4.js";const E="mcp.mesh";function O(e){if(!e?.url)return"Unknown";try{return new URL(e.url).hostname}catch{return e.url}}function R(e){const r=e?.identifier||e?.name;return r?r.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,s=>s.toUpperCase()):"Unknown"}function L(e,r,g,s){const n=e.server,t=e._meta?.[E],f=new Date().toISOString(),b=t?.friendlyName||t?.friendly_name||e.title||n?.title||n?.name||"Unnamed MCP Server",v=n?.description||null,x=n?.icons?.[0]?.src||D(n?.repository)||null,o=t?.oauth_config,I=o&&typeof o.authorizationEndpoint=="string"&&typeof o.tokenEndpoint=="string"&&typeof o.clientId=="string"&&Array.isArray(o.scopes)&&(o.grantType==="authorization_code"||o.grantType==="client_credentials")?o:null,N=t?.configuration_state,P=t?.configuration_scopes,T=n?.repository?{url:n.repository.url,source:n.repository.source,subfolder:n.repository.subfolder}:null,u=n?.packages??[],m=n?.remotes??[],C=s?.packageIndex??0,S=s?.remoteIndex??0,y=u.length>0&&s?.packageIndex!==void 0,a=y?u[C]:null,i=y?null:m[S];let c,l,_=null;if(a){const h=a.identifier||a.name;c="STDIO",l="";const d={};if(a.environmentVariables)for(const k of a.environmentVariables)k.name&&(d[k.name]="");_={command:"npx",args:h?["-y",h]:[],...Object.keys(d).length>0&&{envVars:d}}}else i?(c=H(i.type)||"HTTP",l=i.url||""):(c="HTTP",l="");const w=m.length>1,M=u.length>1;let p="";a&&M?p=` (${R(a)})`:i&&w&&(p=` (${O(i)})`);const U=b+p;return{id:A("conn"),title:U,description:v,icon:x,app_name:t?.appName||n?.name||null,app_id:t?.id||e.id||null,connection_type:c,connection_url:l,connection_token:null,connection_headers:_,oauth_config:I,configuration_state:N??null,configuration_scopes:P??null,metadata:{source:"store",registry_item_id:e.id,verified:t?.verified??!1,scopeName:t?.scopeName??null,toolsCount:t?.tools?.length??0,publishedAt:t?.publishedAt??null,repository:T},created_at:f,updated_at:f,created_by:g,organization_id:r,tools:null,bindings:null,status:"inactive"}}export{E as M,L as e};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/grid-view-PzYdekcz.js","assets/index-De7oAufQ.js","assets/index-Dqux8LBJ.css","assets/topbar-portal-CF1YRovU.js","assets/AlertCircle-DOAxiEBN.js","assets/Download01-C0zy7iAO.js","assets/File02-CAND2NHE.js","assets/File06-Bvs2lp94.js","assets/Image01-BGiNuXLR.js","assets/Loading01-Bgt2pWQu.js","assets/Trash01-DJLT0hlL.js","assets/Upload01-CrylBwgE.js","assets/useMutation-BDzOMrvq.js","assets/useQuery-CTePvczf.js","assets/useInfiniteQuery-Dw4aF3nd.js","assets/infiniteQueryObserver-C7xXp1jr.js","assets/checkbox-DUU3Nuea.js","assets/Check-BTP9VTUM.js","assets/ChevronRight-DWZgTrde.js","assets/Grid01-Bootsry8.js","assets/Home02-Cn5GN0Zh.js","assets/List-BFzJ8d3-.js"])))=>i.map(i=>d[i]);
2
- import{r as M,c as K,bS as A,w as Y,v as B,j as t,B as _,D as Q,bT as X,as as ee}from"./index-De7oAufQ.js";import{u as J}from"./topbar-portal-CF1YRovU.js";import{u as te}from"./useInfiniteQuery-Dw4aF3nd.js";import{C as U}from"./checkbox-DUU3Nuea.js";import{i as se}from"./AlertCircle-DOAxiEBN.js";import{i as ae}from"./ChevronRight-DWZgTrde.js";import{n as ie}from"./Download01-C0zy7iAO.js";import{i as re}from"./File02-CAND2NHE.js";import{c as G}from"./Grid01-Bootsry8.js";import{a as oe}from"./Home02-Cn5GN0Zh.js";import{i as V}from"./List-BFzJ8d3-.js";import{i as L}from"./Loading01-Bgt2pWQu.js";import{s as W}from"./Trash01-DJLT0hlL.js";import{i as $}from"./Upload01-CrylBwgE.js";import{u as q}from"./useMutation-BDzOMrvq.js";const Z=({size:s=24,color:e="currentColor",...i})=>M.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},M.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm10 10v-6m-3 3h6"}));Z.displayName="FolderPlus";const R={objects:(s,e,i=!1,o=100)=>["object-storage","objects",s,e,{flat:i,pageSize:o}],metadata:(s,e)=>["object-storage","metadata",s,e],imagePreview:(s,e)=>["object-storage","image-preview",s,e]},ne=100;function le(s){const e=K.c(30);let i;e[0]!==s?(i=s===void 0?{}:s,e[0]=s,e[1]=i):i=e[1];const o=i,{prefix:n,flat:x,pageSize:d}=o,m=n===void 0?"":n,l=x===void 0?!1:x,c=d===void 0?ne:d,{connectionId:b,toolCaller:S}=J();let f;e[2]!==b||e[3]!==l||e[4]!==c||e[5]!==m?(f=R.objects(b,m,l,c),e[2]=b,e[3]=l,e[4]=c,e[5]=m,e[6]=f):f=e[6];let u;e[7]!==l||e[8]!==c||e[9]!==m||e[10]!==S?(u=async a=>{const{pageParam:r}=a;return await S("LIST_OBJECTS",{prefix:m||void 0,maxKeys:c,continuationToken:r,delimiter:l?void 0:"/"})},e[7]=l,e[8]=c,e[9]=m,e[10]=S,e[11]=u):u=e[11];let E;e[12]!==f||e[13]!==u?(E={queryKey:f,queryFn:u,initialPageParam:void 0,getNextPageParam:ge,staleTime:3e4},e[12]=f,e[13]=u,e[14]=E):E=e[14];const{data:p,isLoading:w,isFetchingNextPage:g,hasNextPage:y,fetchNextPage:h,error:z}=te(E);let v;if(l){let a;e[15]!==p?.pages?(a=p?.pages.flatMap(he).filter(pe).map(xe)??[],e[15]=p?.pages,e[16]=a):a=e[16],v=a}else{let a;if(e[17]!==p?.pages){const r=p?.pages[0]?.commonPrefixes?.map(ue)??[],j=p?.pages.flatMap(de)??[];a=[...r.sort(ce),...j],e[17]=p?.pages,e[18]=a}else a=e[18];v=a}let N;e[19]!==h||e[20]!==y||e[21]!==g?(N=()=>{y&&!g&&h()},e[19]=h,e[20]=y,e[21]=g,e[22]=N):N=e[22];const C=N,F=y??!1,P=z;let k;return e[23]!==g||e[24]!==w||e[25]!==C||e[26]!==v||e[27]!==P||e[28]!==F?(k={objects:v,isLoading:w,isFetchingMore:g,hasMore:F,loadMore:C,error:P},e[23]=g,e[24]=w,e[25]=C,e[26]=v,e[27]=P,e[28]=F,e[29]=k):k=e[29],k}function ce(s,e){return s.key.localeCompare(e.key)}function de(s){return(s.objects??[]).filter(fe).map(me)}function me(s){return{key:s.key,size:s.size,lastModified:s.lastModified,etag:s.etag,isFolder:!1}}function fe(s){return!s.key.endsWith("/")}function ue(s){return{key:s,size:0,lastModified:"",etag:"",isFolder:!0}}function xe(s){return{key:s.key,size:s.size,lastModified:s.lastModified,etag:s.etag,isFolder:!1}}function pe(s){return!s.key.endsWith("/")}function he(s){return s.objects??[]}function ge(s){return s.nextContinuationToken}function I(s){const e=s.split("/").filter(Boolean);return e[e.length-1]||s}function je(s){if(s===0)return"0 B";const e=["B","KB","MB","GB","TB"],i=1024,o=Math.floor(Math.log(s)/Math.log(i));return`${parseFloat((s/Math.pow(i,o)).toFixed(1))} ${e[o]}`}function ye(s){return new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function ve(s){const e=[],i=s.split("/").filter(Boolean);let o="";for(const n of i)o+=n+"/",e.push({name:n,path:o});return e}function Re(s,e){switch(s.split(".").pop()?.toLowerCase()){case"jpg":case"jpeg":case"png":case"gif":case"webp":case"svg":return"Image01";case"mp4":case"mov":case"avi":case"webm":return"VideoRecorder";case"mp3":case"wav":case"ogg":return"Music01";case"pdf":return"File06";case"zip":case"tar":case"gz":case"rar":return"File07";case"js":case"ts":case"tsx":case"jsx":case"json":case"html":case"css":return"FileCode01";case"md":case"txt":return"File04";default:return"File02"}}const Ne=M.lazy(()=>X(()=>import("./grid-view-PzYdekcz.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])));function be(s){const e=K.c(50),{item:i,selected:o,showFullPath:n,onSelect:x,onNavigate:d,onDownload:m,onDelete:l}=s,c=n===void 0?!1:n;let b;e[0]!==i.key||e[1]!==c?(b=c?i.key:I(i.key),e[0]=i.key,e[1]=c,e[2]=b):b=e[2];const S=b;let f;e[3]!==x||e[4]!==o?(f=t.jsx(U,{checked:o,onCheckedChange:x,className:"opacity-0 group-hover:opacity-100 focus:opacity-100 data-[state=checked]:opacity-100"}),e[3]=x,e[4]=o,e[5]=f):f=e[5];let u;e[6]!==i.isFolder||e[7]!==i.key||e[8]!==d?(u=()=>i.isFolder?d(i.key):void 0,e[6]=i.isFolder,e[7]=i.key,e[8]=d,e[9]=u):u=e[9];const E=i.isFolder&&"cursor-pointer hover:text-primary";let p;e[10]!==E?(p=Q("flex items-center gap-2 flex-1 min-w-0 text-left",E),e[10]=E,e[11]=p):p=e[11];let w;e[12]!==i.isFolder?(w=i.isFolder?t.jsx(ee,{size:18,className:"text-amber-500 shrink-0"}):t.jsx(re,{size:18,className:"text-muted-foreground shrink-0"}),e[12]=i.isFolder,e[13]=w):w=e[13];let g;e[14]!==S?(g=t.jsx("span",{className:"truncate",children:S}),e[14]=S,e[15]=g):g=e[15];let y;e[16]!==u||e[17]!==p||e[18]!==w||e[19]!==g?(y=t.jsxs("button",{type:"button",onClick:u,className:p,children:[w,g]}),e[16]=u,e[17]=p,e[18]=w,e[19]=g,e[20]=y):y=e[20];let h;e[21]!==i.isFolder||e[22]!==i.size?(h=i.isFolder?"-":je(i.size),e[21]=i.isFolder,e[22]=i.size,e[23]=h):h=e[23];let z;e[24]!==h?(z=t.jsx("span",{className:"text-sm text-muted-foreground w-20 text-right shrink-0",children:h}),e[24]=h,e[25]=z):z=e[25];let v;e[26]!==i.isFolder||e[27]!==i.lastModified?(v=i.isFolder?"-":ye(i.lastModified),e[26]=i.isFolder,e[27]=i.lastModified,e[28]=v):v=e[28];let N;e[29]!==v?(N=t.jsx("span",{className:"text-sm text-muted-foreground w-28 text-right shrink-0",children:v}),e[29]=v,e[30]=N):N=e[30];let C;e[31]!==i.isFolder||e[32]!==i.key||e[33]!==m?(C=!i.isFolder&&t.jsx(_,{variant:"ghost",size:"sm",className:"size-7 p-0",onClick:()=>m(i.key),children:t.jsx(ie,{size:14})}),e[31]=i.isFolder,e[32]=i.key,e[33]=m,e[34]=C):C=e[34];let F;e[35]!==i.key||e[36]!==l?(F=()=>l(i.key),e[35]=i.key,e[36]=l,e[37]=F):F=e[37];let P;e[38]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(W,{size:14}),e[38]=P):P=e[38];let k;e[39]!==F?(k=t.jsx(_,{variant:"ghost",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:F,children:P}),e[39]=F,e[40]=k):k=e[40];let a;e[41]!==C||e[42]!==k?(a=t.jsxs("div",{className:"flex items-center gap-1 w-16 justify-end shrink-0 opacity-0 group-hover:opacity-100",children:[C,k]}),e[41]=C,e[42]=k,e[43]=a):a=e[43];let r;return e[44]!==z||e[45]!==N||e[46]!==a||e[47]!==f||e[48]!==y?(r=t.jsxs("div",{className:"group flex items-center gap-3 px-4 py-2 hover:bg-muted/50 border-b border-border last:border-b-0",children:[f,y,z,N,a]}),e[44]=z,e[45]=N,e[46]=a,e[47]=f,e[48]=y,e[49]=r):r=e[49],r}function H(s){const e=K.c(8),{prefix:i,onNavigate:o}=s;let n;if(e[0]!==o||e[1]!==i){const x=ve(i);let d;e[3]!==o?(d=()=>o(""),e[3]=o,e[4]=d):d=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(oe,{size:16}),e[5]=m):m=e[5];let l;e[6]!==d?(l=t.jsx("button",{type:"button",onClick:d,className:"flex items-center gap-1 text-muted-foreground hover:text-foreground",children:m}),e[6]=d,e[7]=l):l=e[7],n=t.jsxs("div",{className:"flex items-center gap-1 text-sm",children:[l,x.map((c,b)=>t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(ae,{size:14,className:"text-muted-foreground"}),t.jsx("button",{type:"button",onClick:()=>o(c.path),className:Q("hover:text-primary",b===x.length-1?"font-medium text-foreground":"text-muted-foreground"),children:c.name})]},c.path))]}),e[0]=o,e[1]=i,e[2]=n}else n=e[2];return n}function ke(){const{path:s="",flat:e=!1,view:i="table"}=A.useSearch({from:"/"}),o=A.useNavigate(),[n,x]=M.useState(new Set),d=a=>{x(new Set),o({to:"/",search:{path:a||void 0,flat:e,view:i}})},m=a=>{x(new Set),o({to:"/",search:{path:a?void 0:s||void 0,flat:a,view:i}})},l=a=>{x(new Set),o({to:"/",search:{path:s||void 0,flat:e,view:a}})},c=M.useRef(null),b=Y(),{connectionId:S,toolCaller:f}=J(),{objects:u,isLoading:E,isFetchingMore:p,hasMore:w,loadMore:g,error:y}=le({prefix:s,flat:e}),h=q({mutationFn:async a=>{const r=s+a.name,{url:j}=await f("PUT_PRESIGNED_URL",{key:r,contentType:a.type||"application/octet-stream"}),T=await fetch(j,{method:"PUT",body:a,headers:{"Content-Type":a.type||"application/octet-stream"}});if(!T.ok)throw new Error(`Upload failed: ${T.statusText}`);return r},onSuccess:a=>{B.success(`Uploaded ${I(a)}`),b.invalidateQueries({queryKey:R.objects(S,s)})},onError:a=>{B.error(`Upload failed: ${a.message}`)}}),z=q({mutationFn:async a=>a.length===1&&a[0]?f("DELETE_OBJECT",{key:a[0]}):f("DELETE_OBJECTS",{keys:a}),onSuccess:()=>{B.success("Deleted successfully"),x(new Set),b.invalidateQueries({queryKey:R.objects(S,s)})},onError:a=>{B.error(`Delete failed: ${a.message}`)}}),v=async a=>{try{const{url:r}=await f("GET_PRESIGNED_URL",{key:a}),j=await fetch(r);if(!j.ok)throw new Error(`Failed to fetch file: ${j.statusText}`);const T=await j.blob(),O=URL.createObjectURL(T),D=document.createElement("a");D.href=O,D.download=I(a),document.body.appendChild(D),D.click(),document.body.removeChild(D),URL.revokeObjectURL(O)}catch(r){B.error(`Download failed: ${r instanceof Error?r.message:"Unknown error"}`)}},N=a=>{const r=a.target.files;if(r){for(const j of Array.from(r))h.mutate(j);a.target.value=""}},C=(a,r)=>{const j=new Set(n);r?j.add(a):j.delete(a),x(j)},F=a=>{x(a?new Set(u.map(r=>r.key)):new Set)},P=()=>{n.size!==0&&z.mutate(Array.from(n))},k=a=>{if(!w||p)return;const r=a.currentTarget;r.scrollHeight-r.scrollTop-r.clientHeight<200&&g()};return y?t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(se,{size:48,className:"text-destructive mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading files"}),t.jsx("p",{className:"text-muted-foreground text-center",children:y.message})]}):i==="grid"?t.jsxs("div",{className:"flex flex-col h-full",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-background",children:[e?t.jsx("span",{className:"text-sm text-muted-foreground",children:"All files (flat)"}):t.jsx(H,{prefix:s,onNavigate:d}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[t.jsx(U,{checked:!e,onCheckedChange:a=>m(!a)}),t.jsx("span",{className:"text-muted-foreground",children:"Show as directories"})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(_,{variant:i==="grid"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("grid"),children:t.jsx(G,{size:16})}),t.jsx(_,{variant:i==="table"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("table"),children:t.jsx(V,{size:16})})]}),t.jsx("input",{ref:c,type:"file",multiple:!0,className:"hidden",onChange:N}),t.jsxs(_,{variant:"outline",size:"sm",onClick:()=>c.current?.click(),disabled:h.isPending,children:[h.isPending?t.jsx(L,{size:14,className:"mr-1 animate-spin"}):t.jsx($,{size:14,className:"mr-1"}),"Upload"]})]})]}),t.jsx(M.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(L,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Ne,{prefix:s,flat:e,onNavigate:d})})]}):t.jsxs("div",{className:"flex flex-col h-full",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-background",children:[e?t.jsx("span",{className:"text-sm text-muted-foreground",children:"All files (flat)"}):t.jsx(H,{prefix:s,onNavigate:d}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[t.jsx(U,{checked:!e,onCheckedChange:a=>m(!a)}),t.jsx("span",{className:"text-muted-foreground",children:"Show as directories"})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(_,{variant:i==="grid"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("grid"),children:t.jsx(G,{size:16})}),t.jsx(_,{variant:i==="table"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("table"),children:t.jsx(V,{size:16})})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[n.size>0&&t.jsxs(_,{variant:"outline",size:"sm",className:"text-destructive",onClick:P,disabled:z.isPending,children:[t.jsx(W,{size:14,className:"mr-1"}),"Delete (",n.size,")"]}),t.jsx("input",{ref:c,type:"file",multiple:!0,className:"hidden",onChange:N}),t.jsxs(_,{variant:"outline",size:"sm",onClick:()=>c.current?.click(),disabled:h.isPending,children:[h.isPending?t.jsx(L,{size:14,className:"mr-1 animate-spin"}):t.jsx($,{size:14,className:"mr-1"}),"Upload"]})]})]})]}),t.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-border bg-muted/30 text-sm font-medium text-muted-foreground",children:[t.jsx(U,{checked:n.size>0&&n.size===u.length,onCheckedChange:F}),t.jsx("span",{className:"flex-1",children:"Name"}),t.jsx("span",{className:"w-20 text-right",children:"Size"}),t.jsx("span",{className:"w-28 text-right",children:"Modified"}),t.jsx("span",{className:"w-16"})]}),t.jsx("div",{className:"flex-1 overflow-y-auto",onScroll:k,children:E?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[t.jsx(L,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading files..."})]}):u.length===0?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(Z,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"This folder is empty"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:"Upload files to get started"}),t.jsxs(_,{variant:"outline",onClick:()=>c.current?.click(),children:[t.jsx($,{size:14,className:"mr-1"}),"Upload files"]})]}):t.jsxs(t.Fragment,{children:[u.map(a=>t.jsx(be,{item:a,selected:n.has(a.key),showFullPath:e,onSelect:r=>C(a.key,r),onNavigate:d,onDownload:v,onDelete:r=>z.mutate([r])},a.key)),p&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx(L,{size:20,className:"animate-spin text-muted-foreground"})})]})})]})}const Ie=Object.freeze(Object.defineProperty({__proto__:null,default:ke},Symbol.toStringTag,{value:"Module"}));export{R as K,Re as a,Ie as b,je as f,I as g,Z as s,le as u};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/grid-view-DGZvuOwZ.js","assets/index-DcxE8oe_.js","assets/index-Dqux8LBJ.css","assets/topbar-portal-CjA9qO3_.js","assets/AlertCircle-CI8iQIN4.js","assets/Download01-CVEqgoRT.js","assets/File02-gbFS8GtC.js","assets/File06-Dpi3gJhU.js","assets/Image01-BwGUDEUi.js","assets/Loading01-B85tVuIU.js","assets/Trash01-BtiNjuw3.js","assets/Upload01-DqqcM3M6.js","assets/useMutation-CV3IN68C.js","assets/useQuery-CEE9SUlS.js","assets/useInfiniteQuery-BIejUr4H.js","assets/infiniteQueryObserver-CzIVu_kK.js","assets/checkbox-B_91sMwd.js","assets/Check-GOz4_bBS.js","assets/ChevronRight-Ys0vr-YD.js","assets/Grid01-NwJJaoW7.js","assets/Home02-DQJpzzIE.js","assets/List-DD3BKPLz.js"])))=>i.map(i=>d[i]);
2
+ import{r as M,c as K,bS as A,w as Y,v as B,j as t,B as _,D as Q,bT as X,as as ee}from"./index-DcxE8oe_.js";import{u as J}from"./topbar-portal-CjA9qO3_.js";import{u as te}from"./useInfiniteQuery-BIejUr4H.js";import{C as U}from"./checkbox-B_91sMwd.js";import{i as se}from"./AlertCircle-CI8iQIN4.js";import{i as ae}from"./ChevronRight-Ys0vr-YD.js";import{n as ie}from"./Download01-CVEqgoRT.js";import{i as re}from"./File02-gbFS8GtC.js";import{c as G}from"./Grid01-NwJJaoW7.js";import{a as oe}from"./Home02-DQJpzzIE.js";import{i as V}from"./List-DD3BKPLz.js";import{i as L}from"./Loading01-B85tVuIU.js";import{s as W}from"./Trash01-BtiNjuw3.js";import{i as $}from"./Upload01-DqqcM3M6.js";import{u as q}from"./useMutation-CV3IN68C.js";const Z=({size:s=24,color:e="currentColor",...i})=>M.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},M.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm10 10v-6m-3 3h6"}));Z.displayName="FolderPlus";const R={objects:(s,e,i=!1,o=100)=>["object-storage","objects",s,e,{flat:i,pageSize:o}],metadata:(s,e)=>["object-storage","metadata",s,e],imagePreview:(s,e)=>["object-storage","image-preview",s,e]},ne=100;function le(s){const e=K.c(30);let i;e[0]!==s?(i=s===void 0?{}:s,e[0]=s,e[1]=i):i=e[1];const o=i,{prefix:n,flat:x,pageSize:d}=o,m=n===void 0?"":n,l=x===void 0?!1:x,c=d===void 0?ne:d,{connectionId:b,toolCaller:S}=J();let f;e[2]!==b||e[3]!==l||e[4]!==c||e[5]!==m?(f=R.objects(b,m,l,c),e[2]=b,e[3]=l,e[4]=c,e[5]=m,e[6]=f):f=e[6];let u;e[7]!==l||e[8]!==c||e[9]!==m||e[10]!==S?(u=async a=>{const{pageParam:r}=a;return await S("LIST_OBJECTS",{prefix:m||void 0,maxKeys:c,continuationToken:r,delimiter:l?void 0:"/"})},e[7]=l,e[8]=c,e[9]=m,e[10]=S,e[11]=u):u=e[11];let E;e[12]!==f||e[13]!==u?(E={queryKey:f,queryFn:u,initialPageParam:void 0,getNextPageParam:ge,staleTime:3e4},e[12]=f,e[13]=u,e[14]=E):E=e[14];const{data:p,isLoading:w,isFetchingNextPage:g,hasNextPage:y,fetchNextPage:h,error:z}=te(E);let v;if(l){let a;e[15]!==p?.pages?(a=p?.pages.flatMap(he).filter(pe).map(xe)??[],e[15]=p?.pages,e[16]=a):a=e[16],v=a}else{let a;if(e[17]!==p?.pages){const r=p?.pages[0]?.commonPrefixes?.map(ue)??[],j=p?.pages.flatMap(de)??[];a=[...r.sort(ce),...j],e[17]=p?.pages,e[18]=a}else a=e[18];v=a}let N;e[19]!==h||e[20]!==y||e[21]!==g?(N=()=>{y&&!g&&h()},e[19]=h,e[20]=y,e[21]=g,e[22]=N):N=e[22];const C=N,F=y??!1,P=z;let k;return e[23]!==g||e[24]!==w||e[25]!==C||e[26]!==v||e[27]!==P||e[28]!==F?(k={objects:v,isLoading:w,isFetchingMore:g,hasMore:F,loadMore:C,error:P},e[23]=g,e[24]=w,e[25]=C,e[26]=v,e[27]=P,e[28]=F,e[29]=k):k=e[29],k}function ce(s,e){return s.key.localeCompare(e.key)}function de(s){return(s.objects??[]).filter(fe).map(me)}function me(s){return{key:s.key,size:s.size,lastModified:s.lastModified,etag:s.etag,isFolder:!1}}function fe(s){return!s.key.endsWith("/")}function ue(s){return{key:s,size:0,lastModified:"",etag:"",isFolder:!0}}function xe(s){return{key:s.key,size:s.size,lastModified:s.lastModified,etag:s.etag,isFolder:!1}}function pe(s){return!s.key.endsWith("/")}function he(s){return s.objects??[]}function ge(s){return s.nextContinuationToken}function I(s){const e=s.split("/").filter(Boolean);return e[e.length-1]||s}function je(s){if(s===0)return"0 B";const e=["B","KB","MB","GB","TB"],i=1024,o=Math.floor(Math.log(s)/Math.log(i));return`${parseFloat((s/Math.pow(i,o)).toFixed(1))} ${e[o]}`}function ye(s){return new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function ve(s){const e=[],i=s.split("/").filter(Boolean);let o="";for(const n of i)o+=n+"/",e.push({name:n,path:o});return e}function Re(s,e){switch(s.split(".").pop()?.toLowerCase()){case"jpg":case"jpeg":case"png":case"gif":case"webp":case"svg":return"Image01";case"mp4":case"mov":case"avi":case"webm":return"VideoRecorder";case"mp3":case"wav":case"ogg":return"Music01";case"pdf":return"File06";case"zip":case"tar":case"gz":case"rar":return"File07";case"js":case"ts":case"tsx":case"jsx":case"json":case"html":case"css":return"FileCode01";case"md":case"txt":return"File04";default:return"File02"}}const Ne=M.lazy(()=>X(()=>import("./grid-view-DGZvuOwZ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])));function be(s){const e=K.c(50),{item:i,selected:o,showFullPath:n,onSelect:x,onNavigate:d,onDownload:m,onDelete:l}=s,c=n===void 0?!1:n;let b;e[0]!==i.key||e[1]!==c?(b=c?i.key:I(i.key),e[0]=i.key,e[1]=c,e[2]=b):b=e[2];const S=b;let f;e[3]!==x||e[4]!==o?(f=t.jsx(U,{checked:o,onCheckedChange:x,className:"opacity-0 group-hover:opacity-100 focus:opacity-100 data-[state=checked]:opacity-100"}),e[3]=x,e[4]=o,e[5]=f):f=e[5];let u;e[6]!==i.isFolder||e[7]!==i.key||e[8]!==d?(u=()=>i.isFolder?d(i.key):void 0,e[6]=i.isFolder,e[7]=i.key,e[8]=d,e[9]=u):u=e[9];const E=i.isFolder&&"cursor-pointer hover:text-primary";let p;e[10]!==E?(p=Q("flex items-center gap-2 flex-1 min-w-0 text-left",E),e[10]=E,e[11]=p):p=e[11];let w;e[12]!==i.isFolder?(w=i.isFolder?t.jsx(ee,{size:18,className:"text-amber-500 shrink-0"}):t.jsx(re,{size:18,className:"text-muted-foreground shrink-0"}),e[12]=i.isFolder,e[13]=w):w=e[13];let g;e[14]!==S?(g=t.jsx("span",{className:"truncate",children:S}),e[14]=S,e[15]=g):g=e[15];let y;e[16]!==u||e[17]!==p||e[18]!==w||e[19]!==g?(y=t.jsxs("button",{type:"button",onClick:u,className:p,children:[w,g]}),e[16]=u,e[17]=p,e[18]=w,e[19]=g,e[20]=y):y=e[20];let h;e[21]!==i.isFolder||e[22]!==i.size?(h=i.isFolder?"-":je(i.size),e[21]=i.isFolder,e[22]=i.size,e[23]=h):h=e[23];let z;e[24]!==h?(z=t.jsx("span",{className:"text-sm text-muted-foreground w-20 text-right shrink-0",children:h}),e[24]=h,e[25]=z):z=e[25];let v;e[26]!==i.isFolder||e[27]!==i.lastModified?(v=i.isFolder?"-":ye(i.lastModified),e[26]=i.isFolder,e[27]=i.lastModified,e[28]=v):v=e[28];let N;e[29]!==v?(N=t.jsx("span",{className:"text-sm text-muted-foreground w-28 text-right shrink-0",children:v}),e[29]=v,e[30]=N):N=e[30];let C;e[31]!==i.isFolder||e[32]!==i.key||e[33]!==m?(C=!i.isFolder&&t.jsx(_,{variant:"ghost",size:"sm",className:"size-7 p-0",onClick:()=>m(i.key),children:t.jsx(ie,{size:14})}),e[31]=i.isFolder,e[32]=i.key,e[33]=m,e[34]=C):C=e[34];let F;e[35]!==i.key||e[36]!==l?(F=()=>l(i.key),e[35]=i.key,e[36]=l,e[37]=F):F=e[37];let P;e[38]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(W,{size:14}),e[38]=P):P=e[38];let k;e[39]!==F?(k=t.jsx(_,{variant:"ghost",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:F,children:P}),e[39]=F,e[40]=k):k=e[40];let a;e[41]!==C||e[42]!==k?(a=t.jsxs("div",{className:"flex items-center gap-1 w-16 justify-end shrink-0 opacity-0 group-hover:opacity-100",children:[C,k]}),e[41]=C,e[42]=k,e[43]=a):a=e[43];let r;return e[44]!==z||e[45]!==N||e[46]!==a||e[47]!==f||e[48]!==y?(r=t.jsxs("div",{className:"group flex items-center gap-3 px-4 py-2 hover:bg-muted/50 border-b border-border last:border-b-0",children:[f,y,z,N,a]}),e[44]=z,e[45]=N,e[46]=a,e[47]=f,e[48]=y,e[49]=r):r=e[49],r}function H(s){const e=K.c(8),{prefix:i,onNavigate:o}=s;let n;if(e[0]!==o||e[1]!==i){const x=ve(i);let d;e[3]!==o?(d=()=>o(""),e[3]=o,e[4]=d):d=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(oe,{size:16}),e[5]=m):m=e[5];let l;e[6]!==d?(l=t.jsx("button",{type:"button",onClick:d,className:"flex items-center gap-1 text-muted-foreground hover:text-foreground",children:m}),e[6]=d,e[7]=l):l=e[7],n=t.jsxs("div",{className:"flex items-center gap-1 text-sm",children:[l,x.map((c,b)=>t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(ae,{size:14,className:"text-muted-foreground"}),t.jsx("button",{type:"button",onClick:()=>o(c.path),className:Q("hover:text-primary",b===x.length-1?"font-medium text-foreground":"text-muted-foreground"),children:c.name})]},c.path))]}),e[0]=o,e[1]=i,e[2]=n}else n=e[2];return n}function ke(){const{path:s="",flat:e=!1,view:i="table"}=A.useSearch({from:"/"}),o=A.useNavigate(),[n,x]=M.useState(new Set),d=a=>{x(new Set),o({to:"/",search:{path:a||void 0,flat:e,view:i}})},m=a=>{x(new Set),o({to:"/",search:{path:a?void 0:s||void 0,flat:a,view:i}})},l=a=>{x(new Set),o({to:"/",search:{path:s||void 0,flat:e,view:a}})},c=M.useRef(null),b=Y(),{connectionId:S,toolCaller:f}=J(),{objects:u,isLoading:E,isFetchingMore:p,hasMore:w,loadMore:g,error:y}=le({prefix:s,flat:e}),h=q({mutationFn:async a=>{const r=s+a.name,{url:j}=await f("PUT_PRESIGNED_URL",{key:r,contentType:a.type||"application/octet-stream"}),T=await fetch(j,{method:"PUT",body:a,headers:{"Content-Type":a.type||"application/octet-stream"}});if(!T.ok)throw new Error(`Upload failed: ${T.statusText}`);return r},onSuccess:a=>{B.success(`Uploaded ${I(a)}`),b.invalidateQueries({queryKey:R.objects(S,s)})},onError:a=>{B.error(`Upload failed: ${a.message}`)}}),z=q({mutationFn:async a=>a.length===1&&a[0]?f("DELETE_OBJECT",{key:a[0]}):f("DELETE_OBJECTS",{keys:a}),onSuccess:()=>{B.success("Deleted successfully"),x(new Set),b.invalidateQueries({queryKey:R.objects(S,s)})},onError:a=>{B.error(`Delete failed: ${a.message}`)}}),v=async a=>{try{const{url:r}=await f("GET_PRESIGNED_URL",{key:a}),j=await fetch(r);if(!j.ok)throw new Error(`Failed to fetch file: ${j.statusText}`);const T=await j.blob(),O=URL.createObjectURL(T),D=document.createElement("a");D.href=O,D.download=I(a),document.body.appendChild(D),D.click(),document.body.removeChild(D),URL.revokeObjectURL(O)}catch(r){B.error(`Download failed: ${r instanceof Error?r.message:"Unknown error"}`)}},N=a=>{const r=a.target.files;if(r){for(const j of Array.from(r))h.mutate(j);a.target.value=""}},C=(a,r)=>{const j=new Set(n);r?j.add(a):j.delete(a),x(j)},F=a=>{x(a?new Set(u.map(r=>r.key)):new Set)},P=()=>{n.size!==0&&z.mutate(Array.from(n))},k=a=>{if(!w||p)return;const r=a.currentTarget;r.scrollHeight-r.scrollTop-r.clientHeight<200&&g()};return y?t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(se,{size:48,className:"text-destructive mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading files"}),t.jsx("p",{className:"text-muted-foreground text-center",children:y.message})]}):i==="grid"?t.jsxs("div",{className:"flex flex-col h-full",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-background",children:[e?t.jsx("span",{className:"text-sm text-muted-foreground",children:"All files (flat)"}):t.jsx(H,{prefix:s,onNavigate:d}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[t.jsx(U,{checked:!e,onCheckedChange:a=>m(!a)}),t.jsx("span",{className:"text-muted-foreground",children:"Show as directories"})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(_,{variant:i==="grid"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("grid"),children:t.jsx(G,{size:16})}),t.jsx(_,{variant:i==="table"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("table"),children:t.jsx(V,{size:16})})]}),t.jsx("input",{ref:c,type:"file",multiple:!0,className:"hidden",onChange:N}),t.jsxs(_,{variant:"outline",size:"sm",onClick:()=>c.current?.click(),disabled:h.isPending,children:[h.isPending?t.jsx(L,{size:14,className:"mr-1 animate-spin"}):t.jsx($,{size:14,className:"mr-1"}),"Upload"]})]})]}),t.jsx(M.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(L,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Ne,{prefix:s,flat:e,onNavigate:d})})]}):t.jsxs("div",{className:"flex flex-col h-full",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-background",children:[e?t.jsx("span",{className:"text-sm text-muted-foreground",children:"All files (flat)"}):t.jsx(H,{prefix:s,onNavigate:d}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[t.jsx(U,{checked:!e,onCheckedChange:a=>m(!a)}),t.jsx("span",{className:"text-muted-foreground",children:"Show as directories"})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(_,{variant:i==="grid"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("grid"),children:t.jsx(G,{size:16})}),t.jsx(_,{variant:i==="table"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("table"),children:t.jsx(V,{size:16})})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[n.size>0&&t.jsxs(_,{variant:"outline",size:"sm",className:"text-destructive",onClick:P,disabled:z.isPending,children:[t.jsx(W,{size:14,className:"mr-1"}),"Delete (",n.size,")"]}),t.jsx("input",{ref:c,type:"file",multiple:!0,className:"hidden",onChange:N}),t.jsxs(_,{variant:"outline",size:"sm",onClick:()=>c.current?.click(),disabled:h.isPending,children:[h.isPending?t.jsx(L,{size:14,className:"mr-1 animate-spin"}):t.jsx($,{size:14,className:"mr-1"}),"Upload"]})]})]})]}),t.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-border bg-muted/30 text-sm font-medium text-muted-foreground",children:[t.jsx(U,{checked:n.size>0&&n.size===u.length,onCheckedChange:F}),t.jsx("span",{className:"flex-1",children:"Name"}),t.jsx("span",{className:"w-20 text-right",children:"Size"}),t.jsx("span",{className:"w-28 text-right",children:"Modified"}),t.jsx("span",{className:"w-16"})]}),t.jsx("div",{className:"flex-1 overflow-y-auto",onScroll:k,children:E?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[t.jsx(L,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading files..."})]}):u.length===0?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(Z,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"This folder is empty"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:"Upload files to get started"}),t.jsxs(_,{variant:"outline",onClick:()=>c.current?.click(),children:[t.jsx($,{size:14,className:"mr-1"}),"Upload files"]})]}):t.jsxs(t.Fragment,{children:[u.map(a=>t.jsx(be,{item:a,selected:n.has(a.key),showFullPath:e,onSelect:r=>C(a.key,r),onNavigate:d,onDownload:v,onDelete:r=>z.mutate([r])},a.key)),p&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx(L,{size:20,className:"animate-spin text-muted-foreground"})})]})})]})}const Ie=Object.freeze(Object.defineProperty({__proto__:null,default:ke},Symbol.toStringTag,{value:"Module"}));export{R as K,Re as a,Ie as b,je as f,I as g,Z as s,le as u};
@@ -1 +1 @@
1
- import{W as C,c as f,j as c,U as j,r as d,D as p,X as v,Y as b,Z as h}from"./index-De7oAufQ.js";import{L as N}from"./label-BhDDQ3-n.js";const E=C,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=b();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(v,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,w as b,L as c,P as d,y as e,R as f};
1
+ import{W as C,c as f,j as c,U as j,r as d,D as p,X as v,Y as b,Z as h}from"./index-DcxE8oe_.js";import{L as N}from"./label-BtaiiWJ8.js";const E=C,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=b();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(v,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,w as b,L as c,P as d,y as e,R as f};
@@ -1 +1 @@
1
- import{o as y,n as d,u as P,w as S,O as F,t as N,q as E,v as I,K as g,j as e,c as v}from"./index-De7oAufQ.js";import{u as w}from"./useMutation-BDzOMrvq.js";import{u as D,a as T}from"./constants-C6R-Odkq.js";import{I as f}from"./input-_VKm0O_1.js";import{T as B}from"./textarea-C_pKpP9s.js";import{a as L,F as u,b as i,c,d as m,e as b,f as x}from"./form-B1LLlQBa.js";import{L as O}from"./logo-upload-CXS8-AgL.js";import{D as A}from"./danger-zone-DbcRzYYG.js";import"./label-BhDDQ3-n.js";import"./Upload01-CrylBwgE.js";import"./X-Dr3IGE6q.js";import"./alert-dialog-CGRFjIvo.js";const G=y({name:d().min(1,"Name is required").max(200,"Name is too long"),description:d().max(1e3,"Description is too long").nullable(),themeColor:d().nullable(),logo:d().nullable().optional()});function M(){const{org:r,project:n}=P(),t=S(),h=n.slug===F,C=D({connectionId:T,orgId:r.id}),s=N({resolver:E(G),values:{name:n.name??"",description:n.description??"",themeColor:n.ui?.themeColor??"#60a5fa",logo:n.ui?.icon??""}}),l=w({mutationFn:async o=>{const a=await C.callTool({name:"PROJECT_UPDATE",arguments:{projectId:n.id,name:o.name,description:o.description||null,ui:{themeColor:o.themeColor||null,banner:n.ui?.banner??null,bannerColor:n.ui?.bannerColor??null,icon:o.logo||null}}});return a.structuredContent??a},onSuccess:()=>{t.invalidateQueries({queryKey:g.project(r.id,n.slug)}),t.invalidateQueries({queryKey:g.projects(r.id)}),s.reset(s.getValues())},onError:o=>{I.error("Failed to update project: "+(o instanceof Error?o.message:"Unknown error"))}}),j=async o=>{await l.mutateAsync(o)},p=o=>{o(),s.handleSubmit(j)()};return e.jsx("div",{className:"flex flex-col",children:e.jsx(L,{...s,children:e.jsxs("form",{onSubmit:s.handleSubmit(j),className:"space-y-6",children:[e.jsx(u,{control:s.control,name:"name",render:({field:o})=>e.jsxs(i,{children:[e.jsx(c,{children:"Project Name"}),e.jsx(m,{children:e.jsx(f,{placeholder:"My Project",...o,onBlur:()=>p(o.onBlur),disabled:h||l.isPending})}),h&&e.jsx(b,{children:"The organization admin project name cannot be changed."}),e.jsx(x,{})]})}),e.jsxs(i,{children:[e.jsx(c,{children:"Slug"}),e.jsx(m,{children:e.jsx(f,{value:n.slug,disabled:!0,className:"bg-muted"})}),e.jsx(b,{children:"The project slug cannot be changed after creation."})]}),e.jsx(u,{control:s.control,name:"description",render:({field:o})=>e.jsxs(i,{children:[e.jsx(c,{children:"Description"}),e.jsx(m,{children:e.jsx(B,{placeholder:"Optional project description...",rows:3,...o,value:o.value??"",onBlur:()=>p(o.onBlur),disabled:l.isPending})}),e.jsx(x,{})]})}),e.jsx(u,{control:s.control,name:"logo",render:({field:o})=>e.jsxs(i,{children:[e.jsx(c,{children:"Logo"}),e.jsx(m,{children:e.jsx(O,{value:o.value,onChange:a=>{o.onChange(a),s.handleSubmit(j)()},name:s.watch("name"),disabled:l.isPending})}),e.jsx(x,{})]})}),e.jsx(u,{control:s.control,name:"themeColor",render:({field:o})=>e.jsxs(i,{children:[e.jsx(c,{children:"Color"}),e.jsx(m,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"size-9 rounded-md border border-input overflow-hidden cursor-pointer shrink-0",style:{backgroundColor:o.value??"#60a5fa"},children:e.jsx("input",{type:"color",value:o.value??"#60a5fa",onChange:a=>o.onChange(a.target.value),onBlur:()=>p(o.onBlur),disabled:l.isPending,className:"opacity-0 w-full h-full cursor-pointer"})}),e.jsx("span",{className:"font-mono text-sm text-muted-foreground",children:o.value??"#60a5fa"})]})}),e.jsx(x,{})]})})]})})})}function _(){const r=v.c(2);let n;r[0]===Symbol.for("react.memo_cache_sentinel")?(n=e.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"General"}),r[0]=n):n=r[0];let t;return r[1]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsxs("div",{className:"flex flex-col",children:[n,e.jsxs("div",{className:"pt-6 flex flex-col gap-6",children:[e.jsx(M,{}),e.jsx(A,{})]})]}),r[1]=t):t=r[1],t}function H(){const r=v.c(1);let n;return r[0]===Symbol.for("react.memo_cache_sentinel")?(n=e.jsx(_,{}),r[0]=n):n=r[0],n}export{H as default};
1
+ import{o as y,n as d,u as P,w as S,O as F,t as N,q as E,v as I,K as g,j as e,c as v}from"./index-DcxE8oe_.js";import{u as w}from"./useMutation-CV3IN68C.js";import{u as D,a as T}from"./constants-BCt7c81T.js";import{I as f}from"./input-DPpAbHbD.js";import{T as B}from"./textarea-C7YqhWTc.js";import{a as L,F as u,b as i,c,d as m,e as b,f as x}from"./form-BWoxqZfk.js";import{L as O}from"./logo-upload-79T6Ecg3.js";import{D as A}from"./danger-zone-DjN4GhuT.js";import"./label-BtaiiWJ8.js";import"./Upload01-DqqcM3M6.js";import"./X-CaaFSPD_.js";import"./alert-dialog-BGZzdkI2.js";const G=y({name:d().min(1,"Name is required").max(200,"Name is too long"),description:d().max(1e3,"Description is too long").nullable(),themeColor:d().nullable(),logo:d().nullable().optional()});function M(){const{org:r,project:n}=P(),t=S(),h=n.slug===F,C=D({connectionId:T,orgId:r.id}),s=N({resolver:E(G),values:{name:n.name??"",description:n.description??"",themeColor:n.ui?.themeColor??"#60a5fa",logo:n.ui?.icon??""}}),l=w({mutationFn:async o=>{const a=await C.callTool({name:"PROJECT_UPDATE",arguments:{projectId:n.id,name:o.name,description:o.description||null,ui:{themeColor:o.themeColor||null,banner:n.ui?.banner??null,bannerColor:n.ui?.bannerColor??null,icon:o.logo||null}}});return a.structuredContent??a},onSuccess:()=>{t.invalidateQueries({queryKey:g.project(r.id,n.slug)}),t.invalidateQueries({queryKey:g.projects(r.id)}),s.reset(s.getValues())},onError:o=>{I.error("Failed to update project: "+(o instanceof Error?o.message:"Unknown error"))}}),j=async o=>{await l.mutateAsync(o)},p=o=>{o(),s.handleSubmit(j)()};return e.jsx("div",{className:"flex flex-col",children:e.jsx(L,{...s,children:e.jsxs("form",{onSubmit:s.handleSubmit(j),className:"space-y-6",children:[e.jsx(u,{control:s.control,name:"name",render:({field:o})=>e.jsxs(i,{children:[e.jsx(c,{children:"Project Name"}),e.jsx(m,{children:e.jsx(f,{placeholder:"My Project",...o,onBlur:()=>p(o.onBlur),disabled:h||l.isPending})}),h&&e.jsx(b,{children:"The organization admin project name cannot be changed."}),e.jsx(x,{})]})}),e.jsxs(i,{children:[e.jsx(c,{children:"Slug"}),e.jsx(m,{children:e.jsx(f,{value:n.slug,disabled:!0,className:"bg-muted"})}),e.jsx(b,{children:"The project slug cannot be changed after creation."})]}),e.jsx(u,{control:s.control,name:"description",render:({field:o})=>e.jsxs(i,{children:[e.jsx(c,{children:"Description"}),e.jsx(m,{children:e.jsx(B,{placeholder:"Optional project description...",rows:3,...o,value:o.value??"",onBlur:()=>p(o.onBlur),disabled:l.isPending})}),e.jsx(x,{})]})}),e.jsx(u,{control:s.control,name:"logo",render:({field:o})=>e.jsxs(i,{children:[e.jsx(c,{children:"Logo"}),e.jsx(m,{children:e.jsx(O,{value:o.value,onChange:a=>{o.onChange(a),s.handleSubmit(j)()},name:s.watch("name"),disabled:l.isPending})}),e.jsx(x,{})]})}),e.jsx(u,{control:s.control,name:"themeColor",render:({field:o})=>e.jsxs(i,{children:[e.jsx(c,{children:"Color"}),e.jsx(m,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"size-9 rounded-md border border-input overflow-hidden cursor-pointer shrink-0",style:{backgroundColor:o.value??"#60a5fa"},children:e.jsx("input",{type:"color",value:o.value??"#60a5fa",onChange:a=>o.onChange(a.target.value),onBlur:()=>p(o.onBlur),disabled:l.isPending,className:"opacity-0 w-full h-full cursor-pointer"})}),e.jsx("span",{className:"font-mono text-sm text-muted-foreground",children:o.value??"#60a5fa"})]})}),e.jsx(x,{})]})})]})})})}function _(){const r=v.c(2);let n;r[0]===Symbol.for("react.memo_cache_sentinel")?(n=e.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"General"}),r[0]=n):n=r[0];let t;return r[1]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsxs("div",{className:"flex flex-col",children:[n,e.jsxs("div",{className:"pt-6 flex flex-col gap-6",children:[e.jsx(M,{}),e.jsx(A,{})]})]}),r[1]=t):t=r[1],t}function H(){const r=v.c(1);let n;return r[0]===Symbol.for("react.memo_cache_sentinel")?(n=e.jsx(_,{}),r[0]=n):n=r[0],n}export{H as default};
@@ -1 +1 @@
1
- import{bP as n,bQ as o}from"./index-De7oAufQ.js";const s=n(o,{target:"draft-7"}),r="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let l=(t=21)=>{let e="",a=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=r[a[t]&63];return e};function i(t){return`${t}_${l()}`}export{s as B,i as g};
1
+ import{bP as n,bQ as o}from"./index-DcxE8oe_.js";const s=n(o,{target:"draft-7"}),r="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let l=(t=21)=>{let e="",a=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=r[a[t]&63];return e};function i(t){return`${t}_${l()}`}export{s as B,i as g};