@decocms/mesh 2.132.0 → 2.133.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/dist/client/assets/{AlertCircle-Dvy3oHwl.js → AlertCircle-DtdVhcv9.js} +1 -1
  2. package/dist/client/assets/{AlignLeft-C1Pd8crU.js → AlignLeft-CRHzRLnb.js} +1 -1
  3. package/dist/client/assets/{ArrowDown-B0XF9QfR.js → ArrowDown-CD9f6dVF.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-Ddv8Es1G.js → ArrowLeft-Dse_UWo5.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-CjPyEOxC.js → ArrowUp-C5pU0t20.js} +1 -1
  6. package/dist/client/assets/{Check-BGWNBpXb.js → Check-llxZXJNk.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-CDdaecse.js → CheckCircle-naMxBwcc.js} +1 -1
  8. package/dist/client/assets/{CheckDone01-DgNkGXSd.js → CheckDone01-DArNoCeR.js} +1 -1
  9. package/dist/client/assets/{CheckVerified02-yC2IepeU.js → CheckVerified02-B5N8FkZi.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-CxLgy5uI.js → ChevronDown-BPvdqfh0.js} +1 -1
  11. package/dist/client/assets/ChevronLeft-BmfUl3Br.js +1 -0
  12. package/dist/client/assets/{ChevronRight-B-dZm0Fo.js → ChevronRight-bI92hTEK.js} +1 -1
  13. package/dist/client/assets/{Clock-DjTfMWYb.js → Clock-DCqyBdVg.js} +1 -1
  14. package/dist/client/assets/{Code01-C4dpeKsY.js → Code01-Cw3aSJX_.js} +1 -1
  15. package/dist/client/assets/{Container-CH2V2ATa.js → Container-BcN3rU1W.js} +1 -1
  16. package/dist/client/assets/{Copy01-Ba42JLNP.js → Copy01-DOsfcAr7.js} +1 -1
  17. package/dist/client/assets/{Dataflow03-Dbafm5jn.js → Dataflow03-BzHLq4N3.js} +1 -1
  18. package/dist/client/assets/{DotsHorizontal-DF0XToJT.js → DotsHorizontal-jg8p8szZ.js} +1 -1
  19. package/dist/client/assets/{DotsVertical-D-x0DTAA.js → DotsVertical-D7GBR06C.js} +1 -1
  20. package/dist/client/assets/{Download01-x2RmdAQh.js → Download01-Dqv2OtJR.js} +1 -1
  21. package/dist/client/assets/{Edit01-NXKv8M2Y.js → Edit01-PGiGF51x.js} +1 -1
  22. package/dist/client/assets/{Eye-Da9OHWjs.js → Eye-BHQjRrk8.js} +1 -1
  23. package/dist/client/assets/{File02-BBbAYdh-.js → File02-8H6UbpEV.js} +1 -1
  24. package/dist/client/assets/{File06-CZSeKcKm.js → File06-C1Sd5E1A.js} +1 -1
  25. package/dist/client/assets/{FilterLines-CR4t6v_B.js → FilterLines-C4D0sIiB.js} +1 -1
  26. package/dist/client/assets/{Globe01-sstJp1qH.js → Globe01-DvHitX1A.js} +1 -1
  27. package/dist/client/assets/{Globe02-DED7nhMo.js → Globe02-8eZbLs7z.js} +1 -1
  28. package/dist/client/assets/{Grid01-C85povgK.js → Grid01-CfCG1RrY.js} +1 -1
  29. package/dist/client/assets/{Hash02-B-r__uQj.js → Hash02-B4zt7eqf.js} +1 -1
  30. package/dist/client/assets/{Home02-P9zxIWnB.js → Home02-BgWCBPhH.js} +1 -1
  31. package/dist/client/assets/{Image01-CyQ-9pmM.js → Image01-B8svV61f.js} +1 -1
  32. package/dist/client/assets/{Inbox01-DUxLR6jm.js → Inbox01-DktY8c3P.js} +1 -1
  33. package/dist/client/assets/{InfoCircle-ORvzz6Jj.js → InfoCircle-DDBpFLdR.js} +1 -1
  34. package/dist/client/assets/{Key01-B3LfJVTz.js → Key01-eAlJ77G3.js} +1 -1
  35. package/dist/client/assets/{LayersTwo01-D0hB1mlt.js → LayersTwo01-Cre7WmYe.js} +1 -1
  36. package/dist/client/assets/{LayoutLeft-CIizJ9p-.js → LayoutLeft-BdPuu6bH.js} +1 -1
  37. package/dist/client/assets/{LinkExternal01-zIQsCZyp.js → LinkExternal01-1-7TA6Ra.js} +1 -1
  38. package/dist/client/assets/{List-Dy03iFlP.js → List-uQZNVPQ-.js} +1 -1
  39. package/dist/client/assets/{Loading01-DvHkBn5K.js → Loading01-DUUFtL7S.js} +1 -1
  40. package/dist/client/assets/{Lock01-b36hjLYg.js → Lock01-BqRcOfbm.js} +1 -1
  41. package/dist/client/assets/{Play-B4gSKcOc.js → Play-DTlFqxwD.js} +1 -1
  42. package/dist/client/assets/{Plus-C48LE9QF.js → Plus-2wrCLrAD.js} +1 -1
  43. package/dist/client/assets/{RefreshCcw01-B_P3Otqi.js → RefreshCcw01-CmQ_Zyfb.js} +1 -1
  44. package/dist/client/assets/{Rows03-RYFV31vk.js → Rows03-CeP6X8F6.js} +1 -1
  45. package/dist/client/assets/{Save01-C9eXS7Z1.js → Save01-Cq59fc-a.js} +1 -1
  46. package/dist/client/assets/{SearchMd-Bec1mZCp.js → SearchMd-DOdaT51-.js} +1 -1
  47. package/dist/client/assets/{Settings01-CGjDKLLq.js → Settings01-jEDDrq49.js} +1 -1
  48. package/dist/client/assets/{Shield01-QPvxKI9B.js → Shield01-_lpY_BlD.js} +1 -1
  49. package/dist/client/assets/{Terminal-Dg9FTns0.js → Terminal-CZIzfu4H.js} +1 -1
  50. package/dist/client/assets/{Trash01-DfwWsbuW.js → Trash01-DJpn1VG4.js} +1 -1
  51. package/dist/client/assets/{Upload01-CBnp-ZgO.js → Upload01-c6QpJwvP.js} +1 -1
  52. package/dist/client/assets/{Users03-zNQ-U5kI.js → Users03--eiqKjb_.js} +1 -1
  53. package/dist/client/assets/{X-BaOBrQh9.js → X-BGHsyt4s.js} +1 -1
  54. package/dist/client/assets/{XCircle-CGBoiIiF.js → XCircle-BJSW1V34.js} +1 -1
  55. package/dist/client/assets/{XClose-D5oa0b17.js → XClose-CYrOe1GU.js} +1 -1
  56. package/dist/client/assets/{Zap-B8kjj6jV.js → Zap-Div5wKlF.js} +1 -1
  57. package/dist/client/assets/{agent-connections-preview-CpRlCZek.js → agent-connections-preview-B33aUr8j.js} +1 -1
  58. package/dist/client/assets/agent-detail-B1r6DbgP.js +2 -0
  59. package/dist/client/assets/agents--1wlh1On.js +1 -0
  60. package/dist/client/assets/{alert-dialog-CHhoNaC0.js → alert-dialog-WtbKGn3h.js} +1 -1
  61. package/dist/client/assets/{auth-catchall-Bks-N8b9.js → auth-catchall-C-FIrDOU.js} +1 -1
  62. package/dist/client/assets/{avatar-DX9xarA9.js → avatar-C0Za2Leb.js} +1 -1
  63. package/dist/client/assets/{badge-CMOYVtO8.js → badge-zns1OAW0.js} +1 -1
  64. package/dist/client/assets/{binder-CN-yhtfQ.js → binder-C2Kwp5aI.js} +1 -1
  65. package/dist/client/assets/{breadcrumb-CtNnsyqL.js → breadcrumb-BF7wgZMj.js} +1 -1
  66. package/dist/client/assets/{card-BECXECFc.js → card-yVoc5Dl_.js} +1 -1
  67. package/dist/client/assets/{chart-CA07zGfe.js → chart-C09J-0j8.js} +1 -1
  68. package/dist/client/assets/{checkbox-Bs5NWE_x.js → checkbox-C_yzLnRo.js} +1 -1
  69. package/dist/client/assets/{circle-alert-CEhC-Q81.js → circle-alert-DEWKfuYJ.js} +1 -1
  70. package/dist/client/assets/collapsible-e1478K7w.js +23 -0
  71. package/dist/client/assets/{collection-detail-CNXxywSm.js → collection-detail-12bPsl9i.js} +3 -3
  72. package/dist/client/assets/{collection-search-aEfiIRVT.js → collection-search-g7bCyEl4.js} +1 -1
  73. package/dist/client/assets/collection-tab-hxaftEha.js +1 -0
  74. package/dist/client/assets/{collection-table-wrapper-hM0ppyEG.js → collection-table-wrapper-Bx_0GgHe.js} +1 -1
  75. package/dist/client/assets/{collection-tabs-Dc6gZtTz.js → collection-tabs-CGvjmn7e.js} +1 -1
  76. package/dist/client/assets/{command-DI3JwfrE.js → command-DvXRXkaf.js} +1 -1
  77. package/dist/client/assets/{connect-C0SuJwzK.js → connect-BHcfLUsx.js} +1 -1
  78. package/dist/client/assets/{connection-card-CzCUOjTN.js → connection-card-Of-LfoL9.js} +1 -1
  79. package/dist/client/assets/connection-detail-Bfp_CthH.js +1 -0
  80. package/dist/client/assets/connections-CMRFgF2z.js +1 -0
  81. package/dist/client/assets/constants-BMZNxJu4.js +1 -0
  82. package/dist/client/assets/{constants-0JLhMmM7.js → constants-DLWxw8L_.js} +1 -1
  83. package/dist/client/assets/{create-organization-dialog-BRKsH8XB.js → create-organization-dialog-DHmNDQVx.js} +1 -1
  84. package/dist/client/assets/{create-project-dialog-BUAUU3kY.js → create-project-dialog-BURFxz7l.js} +1 -1
  85. package/dist/client/assets/{danger--r_qw5of.js → danger-D0vNOgTj.js} +1 -1
  86. package/dist/client/assets/{danger-zone-fH4LWpAE.js → danger-zone-Dhz8OLxh.js} +1 -1
  87. package/dist/client/assets/decopilot-events-C1i2IOcF.js +1 -0
  88. package/dist/client/assets/{dependencies-CfLZZ12D.js → dependencies-DQgcVkpb.js} +1 -1
  89. package/dist/client/assets/{dialog-CzmRWg_H.js → dialog-B8ODwZHJ.js} +1 -1
  90. package/dist/client/assets/{dropdown-menu-bZQdGgsX.js → dropdown-menu-Bv0kDZGf.js} +1 -1
  91. package/dist/client/assets/{dynamic-plugin-layout-B44KCK2N.js → dynamic-plugin-layout-CfJ2iWdk.js} +1 -1
  92. package/dist/client/assets/editable-task-title-BECK0S9m.js +16 -0
  93. package/dist/client/assets/{empty-state-BuKC-FeY.js → empty-state-CS91-o6R.js} +1 -1
  94. package/dist/client/assets/{env-vars-editor-BUYd05S1.js → env-vars-editor-BoUKrNdn.js} +1 -1
  95. package/dist/client/assets/{extract-connection-data-CDK2P3aY.js → extract-connection-data-DPrPXrw7.js} +1 -1
  96. package/dist/client/assets/{file-browser-B8HL2Mki.js → file-browser-Dyg6fn_p.js} +2 -2
  97. package/dist/client/assets/{form-EW4LFI0z.js → form-Bqy3P0kv.js} +1 -1
  98. package/dist/client/assets/{general-B-SJAejg.js → general-CcOfiluy.js} +1 -1
  99. package/dist/client/assets/{grid-view-B2G72x7D.js → grid-view-uc2-Xd10.js} +1 -1
  100. package/dist/client/assets/{home-C_Jstend.js → home-DYjBdnSm.js} +1 -1
  101. package/dist/client/assets/{index-RIE02s6T.js → index-1pfseT2B.js} +1 -1
  102. package/dist/client/assets/{index-BeKO7nFo.js → index-5XdaBbnC.js} +1 -1
  103. package/dist/client/assets/{index-hfshaOuF.js → index-B1uFfuid.js} +1 -1
  104. package/dist/client/assets/{index-gksA6r5d.js → index-BLvVZqmB.js} +1 -1
  105. package/dist/client/assets/{index-kE57LLiG.js → index-Br7gqIns.js} +22 -22
  106. package/dist/client/assets/{index-Cp50RRud.js → index-CLZkaGlC.js} +1 -1
  107. package/dist/client/assets/index-CUEtQJPr.css +1 -0
  108. package/dist/client/assets/index-CjU9lWJN.js +1 -0
  109. package/dist/client/assets/{index-CzFqQvXW.js → index-DVHuYwO5.js} +4 -4
  110. package/dist/client/assets/{index-V5ecgDUm.js → index-tDb6lai2.js} +1 -1
  111. package/dist/client/assets/{infiniteQueryObserver-B0QSZ6Wg.js → infiniteQueryObserver-BU31NXJd.js} +1 -1
  112. package/dist/client/assets/{input-Rcf9et7W.js → input-CImrwNsE.js} +1 -1
  113. package/dist/client/assets/{integration-icon-Cr629JYK.js → integration-icon-CqdgwTQM.js} +1 -1
  114. package/dist/client/assets/{label-DdGHGWov.js → label-BEcdY3zl.js} +1 -1
  115. package/dist/client/assets/{layout-CUeJn5m4.js → layout-Cegg55DQ.js} +1 -1
  116. package/dist/client/assets/{layout-DvurrRZC.js → layout-D1FJR7dQ.js} +1 -1
  117. package/dist/client/assets/localstorage-keys-B3yhvN27.js +1 -0
  118. package/dist/client/assets/{login-C70j40x2.js → login-gpMZSjc_.js} +1 -1
  119. package/dist/client/assets/{markdown-BsZjpnFH.js → markdown-DigmZCi5.js} +1 -1
  120. package/dist/client/assets/{mcp-app-renderer-aRjr0jcc.js → mcp-app-renderer-elbh_bK3.js} +1 -1
  121. package/dist/client/assets/{mcp-oauth-Dk3osgIf.js → mcp-oauth-BJK3oSr3.js} +1 -1
  122. package/dist/client/assets/{mcp-server-card-znSfWcaP.js → mcp-server-card-B_3KckAV.js} +1 -1
  123. package/dist/client/assets/{mcp-server-detail-Csm9j29j.js → mcp-server-detail-BGmK7vBO.js} +2 -2
  124. package/dist/client/assets/{members-WbcVb7yX.js → members-DkvmaHrL.js} +1 -1
  125. package/dist/client/assets/{monitoring-dashboard-edit-ChxkdsCv.js → monitoring-dashboard-edit-Dq449CGn.js} +1 -1
  126. package/dist/client/assets/{monitoring-dashboard-view-CL8P3Zx7.js → monitoring-dashboard-view-KyEbCseW.js} +2 -2
  127. package/dist/client/assets/{monitoring-Dth-Uzfq.js → monitoring-mMb4oyh8.js} +2 -2
  128. package/dist/client/assets/{oauth-callback-CXzK_RYv.js → oauth-callback-BWIw_10O.js} +1 -1
  129. package/dist/client/assets/page-LuWQuTOB.js +1 -0
  130. package/dist/client/assets/{page-CCrDZNhS.js → page-MLghIZgZ.js} +1 -1
  131. package/dist/client/assets/{plugin-empty-state-D7gmiZlA.js → plugin-empty-state-BYi0xCDZ.js} +1 -1
  132. package/dist/client/assets/{plugin-empty-state-BIuYztei.js → plugin-empty-state-CfkX75Qn.js} +1 -1
  133. package/dist/client/assets/{plugin-header-BLBENlfU.js → plugin-header-Bpxodj_N.js} +1 -1
  134. package/dist/client/assets/{plugin-header-CmlDS_hv.js → plugin-header-C8NyMNoe.js} +1 -1
  135. package/dist/client/assets/plugins-VAc5tGcP.js +1 -0
  136. package/dist/client/assets/{popover-C5F2AcFP.js → popover-R_PT2IPW.js} +1 -1
  137. package/dist/client/assets/{project-app-view-NryMJvXO.js → project-app-view-Bai-Qf0R.js} +1 -1
  138. package/dist/client/assets/project-layout-daZ99y7q.js +1 -0
  139. package/dist/client/assets/{project-plugins-QbLHCPXi.js → project-plugins-D9btRO1g.js} +1 -1
  140. package/dist/client/assets/{projects-list-B_wyuNYf.js → projects-list-DLyGtlCx.js} +1 -1
  141. package/dist/client/assets/{ranking-layout-CVBOyQIw.js → ranking-layout-Difw19Tu.js} +1 -1
  142. package/dist/client/assets/{readme-viewer-BmxWIpiS.js → readme-viewer-DMIs62Jq.js} +1 -1
  143. package/dist/client/assets/{registry-layout-DHUM9TZu.js → registry-layout-DUQv-gnE.js} +1 -1
  144. package/dist/client/assets/{registry-utils-DRX9Fl5Z.js → registry-utils-BL3Z-ZuV.js} +1 -1
  145. package/dist/client/assets/{reports-layout-GUNpInzx.js → reports-layout-DOweGRAi.js} +1 -1
  146. package/dist/client/assets/{reset-password-C_jAWNzd.js → reset-password-gTGJs4eA.js} +1 -1
  147. package/dist/client/assets/{resizable-CmbMtBt6.js → resizable-C-gCkuLt.js} +1 -1
  148. package/dist/client/assets/{save-actions-CH-zbfme.js → save-actions-CdZGxDIR.js} +1 -1
  149. package/dist/client/assets/{scroll-area-B5BKtcc-.js → scroll-area-DsCd8vj6.js} +1 -1
  150. package/dist/client/assets/{select-CSl7KVC3.js → select-CZ5oa2ZG.js} +1 -1
  151. package/dist/client/assets/shell-layout-D95AudRc.js +3 -0
  152. package/dist/client/assets/{sidebar-settings-98pHpdNk.js → sidebar-settings-DoYo5_2f.js} +1 -1
  153. package/dist/client/assets/{skeleton-BGGjmBE-.js → skeleton-DIOpAjh1.js} +1 -1
  154. package/dist/client/assets/{spinner-BubUCjpb.js → spinner-B-yGP95y.js} +1 -1
  155. package/dist/client/assets/{store-invite-BidZUMAQ.js → store-invite-COyr13nI.js} +1 -1
  156. package/dist/client/assets/{switch-D_s2nP_j.js → switch-C_rwAMG7.js} +1 -1
  157. package/dist/client/assets/{table-C7IfzCau.js → table-BwN-DdG1.js} +1 -1
  158. package/dist/client/assets/tabs-CTOkjsDF.js +1 -0
  159. package/dist/client/assets/tasks-CxbK_rAM.js +1 -0
  160. package/dist/client/assets/tasks-panel-CI07RnJW.js +1 -0
  161. package/dist/client/assets/{textarea-CumbsokS.js → textarea-BOlS_fKd.js} +1 -1
  162. package/dist/client/assets/{time-range-picker-Brh1Ym1N.js → time-range-picker-DWAp9G7R.js} +4 -4
  163. package/dist/client/assets/{toggle-group-DaSKpJH5.js → toggle-group-CRwxfPk7.js} +1 -1
  164. package/dist/client/assets/{tools-list-BvNNjQQL.js → tools-list-CQrrEoBF.js} +1 -1
  165. package/dist/client/assets/{tooltip-BGn6dJhi.js → tooltip-BsUirxUt.js} +1 -1
  166. package/dist/client/assets/{topbar-portal-mNbAP1zZ.js → topbar-portal-Cy4hr4gX.js} +1 -1
  167. package/dist/client/assets/{types-CnosXlf3.js → types-gEqZqH3b.js} +1 -1
  168. package/dist/client/assets/{use-binding-Ctbwf5zu.js → use-binding-Dx_NAnJa.js} +1 -1
  169. package/dist/client/assets/{use-connection-CmCfM9T5.js → use-connection-CwB1S0Lk.js} +1 -1
  170. package/dist/client/assets/{use-copy-Dn5NzC6Z.js → use-copy-uCRP4yn6.js} +1 -1
  171. package/dist/client/assets/{use-create-virtual-mcp-b6Af6scy.js → use-create-virtual-mcp-Bm7L9HAR.js} +1 -1
  172. package/dist/client/assets/{use-install-from-registry-D4coW5d-.js → use-install-from-registry-CMYlie1K.js} +1 -1
  173. package/dist/client/assets/use-list-state-EN77XpOY.js +1 -0
  174. package/dist/client/assets/{use-llm-CPv795TN.js → use-llm-C5Q0H0cZ.js} +1 -1
  175. package/dist/client/assets/{use-mcp-resources--6yZ25c2.js → use-mcp-resources-kkSzYGiM.js} +1 -1
  176. package/dist/client/assets/{use-mcp-tools-BTHDM3P3.js → use-mcp-tools-CT-LTM8z.js} +1 -1
  177. package/dist/client/assets/{use-members-Dzw-FOpA.js → use-members-CYCHCBAZ.js} +1 -1
  178. package/dist/client/assets/{use-mobile-DIBT-lEk.js → use-mobile-Bot_hVI8.js} +1 -1
  179. package/dist/client/assets/{use-project-Bd8syAM2.js → use-project-C5wS8512.js} +1 -1
  180. package/dist/client/assets/{use-settings-modal-D-rqbyuf.js → use-settings-modal-TyiexX8v.js} +1 -1
  181. package/dist/client/assets/{use-view-mode-k6uWDVq8.js → use-view-mode-CS5zZIj8.js} +1 -1
  182. package/dist/client/assets/{use-virtual-mcp-CaM9kbfY.js → use-virtual-mcp-CGnbrFrJ.js} +1 -1
  183. package/dist/client/assets/useInfiniteQuery-CutnJ4kj.js +1 -0
  184. package/dist/client/assets/{useMutation-DsQcwaJP.js → useMutation-BskhtN65.js} +1 -1
  185. package/dist/client/assets/useQuery-CxvwMb--.js +1 -0
  186. package/dist/client/assets/useSuspenseInfiniteQuery-DrLfXfJc.js +1 -0
  187. package/dist/client/assets/user-BRVh4xuS.js +1 -0
  188. package/dist/client/assets/workflow-D7s-e1ZH.js +1 -0
  189. package/dist/client/index.html +2 -2
  190. package/dist/server/cli.js +2 -1
  191. package/dist/server/server.js +2 -1
  192. package/package.json +1 -1
  193. package/dist/client/assets/AlertOctagon-Y8Xx5Uc4.js +0 -1
  194. package/dist/client/assets/agent-detail-ge8lRsMy.js +0 -2
  195. package/dist/client/assets/agents-CYp6eaDL.js +0 -1
  196. package/dist/client/assets/collapsible-KhZqz8s6.js +0 -1
  197. package/dist/client/assets/collection-tab-ByOYG4eu.js +0 -1
  198. package/dist/client/assets/connection-detail-FUvYBL_f.js +0 -1
  199. package/dist/client/assets/connections-CZWiV45b.js +0 -1
  200. package/dist/client/assets/constants-BnCnMsvC.js +0 -1
  201. package/dist/client/assets/context-CnW_lI9R.js +0 -23
  202. package/dist/client/assets/decopilot-events-Brt4gAR6.js +0 -1
  203. package/dist/client/assets/editable-thread-title-BT5MJN2M.js +0 -16
  204. package/dist/client/assets/index-Bl1kPuE1.css +0 -1
  205. package/dist/client/assets/index-CLgM5v39.js +0 -1
  206. package/dist/client/assets/localstorage-keys-DtK7peUq.js +0 -1
  207. package/dist/client/assets/page-JQWUx5cS.js +0 -1
  208. package/dist/client/assets/plugins-kPtsND7u.js +0 -1
  209. package/dist/client/assets/project-layout-CDz2d0hE.js +0 -1
  210. package/dist/client/assets/shell-layout-DH6hyOML.js +0 -3
  211. package/dist/client/assets/tabs-BzChyqs4.js +0 -1
  212. package/dist/client/assets/tasks-fA5J94Ed.js +0 -1
  213. package/dist/client/assets/use-list-state-pp-Ywt5d.js +0 -1
  214. package/dist/client/assets/use-mcp-prompts-Bvv0Gku4.js +0 -1
  215. package/dist/client/assets/use-preferences-fTjyFgCz.js +0 -1
  216. package/dist/client/assets/useInfiniteQuery-BRjF-D1B.js +0 -1
  217. package/dist/client/assets/useQuery-BE7O7fKt.js +0 -1
  218. package/dist/client/assets/useSuspenseInfiniteQuery-BSW1dpRq.js +0 -1
  219. package/dist/client/assets/workflow-BfURwr1_.js +0 -1
@@ -1 +1 @@
1
- import{c as K,j as t,u as ue,m as fe,r as pe,v as ne,K as ee,B as xe,t as re}from"./index-CzFqQvXW.js";import{u as he}from"./useQuery-BE7O7fKt.js";import{u as oe}from"./useMutation-DsQcwaJP.js";import{P as je,a as ge,b as Ce}from"./popover-C5F2AcFP.js";import{C as be,a as ve,b as Ne,c as ye,d as Ee,e as Te}from"./command-DI3JwfrE.js";import{s as _e}from"./Plus-C48LE9QF.js";import{i as Ie}from"./X-BaOBrQh9.js";import{h as Pe}from"./use-connection-CmCfM9T5.js";import{a as Se,u as Oe}from"./constants-0JLhMmM7.js";import{u as te}from"./unwrap-tool-result-BYXdCQMg.js";import"./index-Cp50RRud.js";import"./SearchMd-Bec1mZCp.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 we(){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=Oe(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 O;e[13]!==u?(O=s=>u.has(s.id),e[13]=u,e[14]=O):O=e[14];const I=(a??[]).filter(O);let w;e[15]!==u?(w=s=>!u.has(s.id),e[15]=u,e[16]=w):w=e[16];const le=(a??[]).filter(w);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 F;e[38]!==J?(F=s=>{se(!1),J.mutate(s)},e[38]=J,e[39]=F):F=e[39];const U=F;let D;e[40]!==A?(D=s=>{A.mutate(s)},e[40]=A,e[41]=D):D=e[41];const ce=D,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(we,{})]}),e[0]=n):n=e[0],n}function Ve(){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{Ve as default};
1
+ import{c as K,j as t,u as ue,n as fe,r as pe,v as ne,K as ee,B as xe,t as re}from"./index-DVHuYwO5.js";import{u as he}from"./useQuery-CxvwMb--.js";import{u as oe}from"./useMutation-BskhtN65.js";import{P as je,a as ge,b as Ce}from"./popover-R_PT2IPW.js";import{C as be,a as ve,b as Ne,c as ye,d as Ee,e as Te}from"./command-DvXRXkaf.js";import{s as _e}from"./Plus-2wrCLrAD.js";import{i as Ie}from"./X-BGHsyt4s.js";import{h as Pe}from"./use-connection-CwB1S0Lk.js";import{a as Se,u as Oe}from"./constants-DLWxw8L_.js";import{u as te}from"./unwrap-tool-result-BYXdCQMg.js";import"./index-CLZkaGlC.js";import"./SearchMd-DOdaT51-.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 we(){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=Oe(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 O;e[13]!==u?(O=s=>u.has(s.id),e[13]=u,e[14]=O):O=e[14];const I=(a??[]).filter(O);let w;e[15]!==u?(w=s=>!u.has(s.id),e[15]=u,e[16]=w):w=e[16];const le=(a??[]).filter(w);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 F;e[38]!==J?(F=s=>{se(!1),J.mutate(s)},e[38]=J,e[39]=F):F=e[39];const U=F;let D;e[40]!==A?(D=s=>{A.mutate(s)},e[40]=A,e[41]=D):D=e[41];const ce=D,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(we,{})]}),e[0]=n):n=e[0],n}function Ve(){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{Ve as default};
@@ -1 +1 @@
1
- import{c as n,j as i,a8 as g,v as c,a9 as u,aa as m,ab as x,ac as j,ad as N,ae as b,af as D}from"./index-CzFqQvXW.js";import{i as h}from"./X-BaOBrQh9.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,a8 as g,v as c,a9 as u,aa as m,ab as x,ac as j,ad as N,ae as b,af as D}from"./index-DVHuYwO5.js";import{i as h}from"./X-BGHsyt4s.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{c,j as d,ah as p,ai as f,v as u,aj as m,ak as g,al as x,am as v,an as b,ao as h,ap as w,aq as j,ar as N,as as z}from"./index-CzFqQvXW.js";import{i as y}from"./Check-BGWNBpXb.js";import{i as D}from"./ChevronRight-B-dZm0Fo.js";function S(n){const e=c.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=d.jsx(p,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(n){const e=c.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=d.jsx(f,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function C(n){const e=c.c(10);let t,s,a;e[0]!==n?({className:t,sideOffset:a,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const o=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]!==o||e[8]!==r?(i=d.jsx(m,{children:d.jsx(g,{"data-slot":"dropdown-menu-content",sideOffset:o,className:r,...s})}),e[6]=s,e[7]=o,e[8]=r,e[9]=i):i=e[9],i}function I(n){const e=c.c(12);let t,s,a,o;e[0]!==n?({className:t,inset:s,variant:o,...a}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);const r=o===void 0?"default":o;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 l;return e[7]!==s||e[8]!==a||e[9]!==i||e[10]!==r?(l=d.jsx(x,{"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]=l):l=e[11],l}function T(n){const e=c.c(13);let t,s,a,o;e[0]!==n?({className:a,children:s,checked:t,...o}=n,e[0]=n,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]!==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=d.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:d.jsx(w,{children:d.jsx(y,{className:"size-4"})})}),e[7]=i):i=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==o||e[11]!==r?(l=d.jsxs(v,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...o,children:[i,s]}),e[8]=t,e[9]=s,e[10]=o,e[11]=r,e[12]=l):l=e[12],l}function R(n){const e=c.c(10);let t,s,a;e[0]!==n?({className:t,inset:s,...a}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);let o;e[4]!==t?(o=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=o):o=e[5];let r;return e[6]!==s||e[7]!==a||e[8]!==o?(r=d.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:o,...a}),e[6]=s,e[7]=a,e[8]=o,e[9]=r):r=e[9],r}function E(n){const e=c.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,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 o;return e[5]!==s||e[6]!==a?(o=d.jsx(h,{"data-slot":"dropdown-menu-separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function L(n){const e=c.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=d.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function O(n){const e=c.c(13);let t,s,a,o;e[0]!==n?({className:s,inset:a,children:t,...o}=n,e[0]=n,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]!==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=d.jsx(D,{className:"ml-auto size-4"}),e[7]=i):i=e[7];let l;return e[8]!==t||e[9]!==a||e[10]!==o||e[11]!==r?(l=d.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:r,...o,children:[t,i]}),e[8]=t,e[9]=a,e[10]=o,e[11]=r,e[12]=l):l=e[12],l}function q(n){const e=c.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,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 o;return e[5]!==s||e[6]!==a?(o=d.jsx(z,{"data-slot":"dropdown-menu-sub-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{S as D,k as a,C as b,I as c,L as d,O as e,q as f,E as g,T as h,R as i};
1
+ import{c,j as d,ah as p,ai as f,v as u,aj as m,ak as g,al as x,am as v,an as b,ao as h,ap as w,aq as j,ar as N,as as z}from"./index-DVHuYwO5.js";import{i as y}from"./Check-llxZXJNk.js";import{i as D}from"./ChevronRight-bI92hTEK.js";function S(n){const e=c.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=d.jsx(p,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(n){const e=c.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=d.jsx(f,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function C(n){const e=c.c(10);let t,s,a;e[0]!==n?({className:t,sideOffset:a,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const o=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]!==o||e[8]!==r?(i=d.jsx(m,{children:d.jsx(g,{"data-slot":"dropdown-menu-content",sideOffset:o,className:r,...s})}),e[6]=s,e[7]=o,e[8]=r,e[9]=i):i=e[9],i}function I(n){const e=c.c(12);let t,s,a,o;e[0]!==n?({className:t,inset:s,variant:o,...a}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);const r=o===void 0?"default":o;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 l;return e[7]!==s||e[8]!==a||e[9]!==i||e[10]!==r?(l=d.jsx(x,{"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]=l):l=e[11],l}function T(n){const e=c.c(13);let t,s,a,o;e[0]!==n?({className:a,children:s,checked:t,...o}=n,e[0]=n,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]!==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=d.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:d.jsx(w,{children:d.jsx(y,{className:"size-4"})})}),e[7]=i):i=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==o||e[11]!==r?(l=d.jsxs(v,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...o,children:[i,s]}),e[8]=t,e[9]=s,e[10]=o,e[11]=r,e[12]=l):l=e[12],l}function R(n){const e=c.c(10);let t,s,a;e[0]!==n?({className:t,inset:s,...a}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);let o;e[4]!==t?(o=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=o):o=e[5];let r;return e[6]!==s||e[7]!==a||e[8]!==o?(r=d.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:o,...a}),e[6]=s,e[7]=a,e[8]=o,e[9]=r):r=e[9],r}function E(n){const e=c.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,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 o;return e[5]!==s||e[6]!==a?(o=d.jsx(h,{"data-slot":"dropdown-menu-separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function L(n){const e=c.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=d.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function O(n){const e=c.c(13);let t,s,a,o;e[0]!==n?({className:s,inset:a,children:t,...o}=n,e[0]=n,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]!==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=d.jsx(D,{className:"ml-auto size-4"}),e[7]=i):i=e[7];let l;return e[8]!==t||e[9]!==a||e[10]!==o||e[11]!==r?(l=d.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:r,...o,children:[t,i]}),e[8]=t,e[9]=a,e[10]=o,e[11]=r,e[12]=l):l=e[12],l}function q(n){const e=c.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,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 o;return e[5]!==s||e[6]!==a?(o=d.jsx(z,{"data-slot":"dropdown-menu-sub-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{S as D,k as a,C as b,I as c,L as d,O as e,q as f,E as g,T as h,R as i};
@@ -1 +1 @@
1
- import{c as R,u as W,e as A,d as X,K as Z,j as n,r as q,aE as J,B as ee,aD as te,b8 as ne}from"./index-CzFqQvXW.js";import{i as v}from"./Loading01-DvHkBn5K.js";import{c as ie}from"./binder-CN-yhtfQ.js";import{P as $}from"./topbar-portal-mNbAP1zZ.js";import{u as se}from"./useQuery-BE7O7fKt.js";import{h as oe}from"./use-connection-CmCfM9T5.js";import{a as le,u as re,j as ce}from"./constants-0JLhMmM7.js";import{t as ae}from"./Settings01-CGjDKLLq.js";import{P as E}from"./index-BeKO7nFo.js";import"./useMutation-DsQcwaJP.js";import"./localstorage-keys-DtK7peUq.js";import"./tooltip-BGn6dJhi.js";import"./index-gksA6r5d.js";function de(t,e){return t?t.filter(m=>ie(m,e)):[]}function K(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=R.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}=A(a),Q=oe(),{data:y}=X.useSession();let _;e[1]!==o.id?(_={connectionId:le,orgId:o.id},e[1]=o.id,e[2]=_):_=e[2];const H=re(_);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 b;e[10]!==x||e[11]!==p||e[12]!==T?(b={queryKey:x,queryFn:p,enabled:T},e[10]=x,e[11]=p,e[12]=T,e[13]=b):b=e[13];const{data:U,isLoading:Y}=se(b),D=de(Q,m),F=U?.config?.connectionId,j=F?D.find(s=>s.id===F):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(D.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:K(j),toolCaller:S,org:z,session:w},B=E,G=E,k=E,M=f({connections:[K(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(J,{})})}),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=R.c(12);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{pluginId:m}=A(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(J,{}),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 R,u as W,e as A,d as X,K as Z,j as n,r as q,aE as J,B as ee,aD as te,b8 as ne}from"./index-DVHuYwO5.js";import{i as v}from"./Loading01-DUUFtL7S.js";import{c as ie}from"./binder-C2Kwp5aI.js";import{P as $}from"./topbar-portal-Cy4hr4gX.js";import{u as se}from"./useQuery-CxvwMb--.js";import{h as oe}from"./use-connection-CwB1S0Lk.js";import{a as le,u as re,j as ce}from"./constants-DLWxw8L_.js";import{t as ae}from"./Settings01-jEDDrq49.js";import{P as E}from"./index-5XdaBbnC.js";import"./useMutation-BskhtN65.js";import"./localstorage-keys-B3yhvN27.js";import"./tooltip-BsUirxUt.js";import"./index-BLvVZqmB.js";function de(t,e){return t?t.filter(m=>ie(m,e)):[]}function K(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=R.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}=A(a),Q=oe(),{data:y}=X.useSession();let _;e[1]!==o.id?(_={connectionId:le,orgId:o.id},e[1]=o.id,e[2]=_):_=e[2];const H=re(_);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 b;e[10]!==x||e[11]!==p||e[12]!==T?(b={queryKey:x,queryFn:p,enabled:T},e[10]=x,e[11]=p,e[12]=T,e[13]=b):b=e[13];const{data:U,isLoading:Y}=se(b),D=de(Q,m),F=U?.config?.connectionId,j=F?D.find(s=>s.id===F):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(D.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:K(j),toolCaller:S,org:z,session:w},B=E,G=E,k=E,M=f({connections:[K(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(J,{})})}),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=R.c(12);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{pluginId:m}=A(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(J,{}),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};
@@ -0,0 +1,16 @@
1
+ import{c as R,r as D,v as E,j as t}from"./index-DVHuYwO5.js";import{i as de}from"./AlertCircle-DtdVhcv9.js";import{i as ue}from"./CheckCircle-naMxBwcc.js";import{n as Y}from"./ChevronLeft-BmfUl3Br.js";import{i as me}from"./Loading01-DUUFtL7S.js";import{i as fe}from"./XCircle-BJSW1V34.js";import{s as Z}from"./XClose-CYrOe1GU.js";import{c as xe}from"./usage-B8eRkRZY.js";import{I as pe}from"./integration-icon-CqdgwTQM.js";import{a as he,u as ge}from"./collapsible-e1478K7w.js";function A(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]=D.useState(null),{messages:o,tasks:N,activeTaskId:u,selectedModel: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]!==n||e[5]!==k?.id||e[6]!==g||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),F=g?.thinking?.limits?.contextWindow??null,Q=F&&F>0?(S.totalTokens/F*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,z=y.state==="input-streaming"||y.state==="input-available"||y.state==="output-available"&&y.preliminary===!0,I=y.state==="output-error",oe=y.state==="approval-requested";return{part:y,agentTitle:C?.title??"Subtask",agentIcon:C?.icon??null,isRunning:z,isError:I,isApproval:oe}}),e[24]=h,e[25]=K):K=e[25];const X=o.flatMap(K),ae=g?.thinking?.id?be(g.thinking.id):"—",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:F?A(F):"—"},{label:"Total Tokens",value:S.totalTokens>0?A(S.totalTokens):"0"},{label:"Usage",value:Q!==null?`${Q}%`:"—"},{label:"Input Tokens",value:S.inputTokens>0?A(S.inputTokens):"0"},{label:"Output Tokens",value:S.outputTokens>0?A(S.outputTokens):"0"},{label:"Reasoning Tokens",value:S.reasoningTokens>0?A(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 z;e[34]===Symbol.for("react.memo_cache_sentinel")?(z=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]=z):z=e[34];let I;e[35]!==j||e[36]!==C?(I=t.jsxs("div",{className:j,children:[C,z]}),e[35]=j,e[36]=C,e[37]=I):I=e[37],i=I;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 M;e[41]!==a?(M=a?t.jsx(Y,{size:14}):t.jsx(Z,{size:14}),e[41]=a,e[42]=M):M=e[42],e[43]!==n||e[44]!==M?(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:M})]}),e[43]=n,e[44]=M,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]=n,e[5]=k?.id,e[6]=g,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]=D.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],D.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
+ .typewriter-text {
3
+ display: inline-block;
4
+ width: 0;
5
+ max-width: 100%;
6
+ overflow: hidden;
7
+ white-space: nowrap;
8
+ animation: typewriter var(--typewriter-duration) steps(var(--typewriter-steps)) forwards;
9
+ }
10
+
11
+ @keyframes typewriter {
12
+ to {
13
+ width: min(var(--typewriter-max-width), 100%);
14
+ }
15
+ }
16
+ `}),e[16]=p):p=e[16];let T;return e[17]!==i||e[18]!==c||e[19]!==m||e[20]!==n?(T=t.jsxs("span",{className:c,style:m,children:[i,p]},n),e[17]=i,e[18]=c,e[19]=m,e[20]=n,e[21]=T):T=e[21],T}function Oe(s){const e=R.c(27),{taskId:n,text:a,className:r}=s,[k,w]=D.useState(!1),[o,N]=D.useState(""),{renameTask:u}=ge();let g;e[0]!==a?(g=()=>{N(a),w(!0)},e[0]=a,e[1]=g):g=e[1];const v=g;let h;e[2]!==o||e[3]!==u||e[4]!==n||e[5]!==a?(h=async()=>{const l=o.trim();l&&l!==a&&await u(n,l),w(!1)},e[2]=o,e[3]=u,e[4]=n,e[5]=a,e[6]=h):h=e[6];const x=h;let c;e[7]!==x?(c=l=>{l.key==="Enter"?(l.preventDefault(),x()):l.key==="Escape"&&w(!1)},e[7]=x,e[8]=c):c=e[8];const b=c;if(k){let l;e[9]===Symbol.for("react.memo_cache_sentinel")?(l=$=>N($.target.value),e[9]=l):l=e[9];let i;e[10]!==x?(i=()=>x(),e[10]=x,e[11]=i):i=e[11];let p;e[12]!==r?(p=E(r,"bg-transparent border-b border-foreground/30 focus:border-foreground outline-none pb-0.5 min-w-0"),e[12]=r,e[13]=p):p=e[13];let T;return e[14]!==o||e[15]!==b||e[16]!==i||e[17]!==p?(T=t.jsx("input",{ref:Ee,value:o,onChange:l,onBlur:i,onKeyDown:b,className:p}),e[14]=o,e[15]=b,e[16]=i,e[17]=p,e[18]=T):T=e[18],T}let d;e[19]!==r?(d=E(r,"cursor-pointer truncate text-left"),e[19]=r,e[20]=d):d=e[20];let m;e[21]!==a?(m=t.jsx($e,{text:a}),e[21]=a,e[22]=m):m=e[22];let f;return e[23]!==v||e[24]!==d||e[25]!==m?(f=t.jsx("button",{type:"button",onClick:v,className:d,title:"Click to rename",children:m}),e[23]=v,e[24]=d,e[25]=m,e[26]=f):f=e[26],f}function Ee(s){s&&(s.focus(),s.select())}export{Be as C,Oe as E};
@@ -1 +1 @@
1
- import{c as v,v as h,j as t,B as b}from"./index-CzFqQvXW.js";function y(N){const e=v.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(b,{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 v,v as h,j as t,B as b}from"./index-DVHuYwO5.js";function y(N){const e=v.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(b,{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{c as V,j as o,B as C}from"./index-CzFqQvXW.js";import{I as P}from"./input-Rcf9et7W.js";import{s as A}from"./Plus-C48LE9QF.js";import{s as R}from"./Trash01-DfwWsbuW.js";function z(i){const e=i.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(l=>e.includes(l))||["sk_","rk_","whsec_","pk_live","sk_live"].some(l=>e.startsWith(l))||["_key","_secret","_token","_password","_auth","_pat"].some(l=>e.endsWith(l)))}function L(i){const e=V.c(34),{value:t,onChange:s,keyPlaceholder:j,valuePlaceholder:l,className:E}=i,h=j===void 0?"VARIABLE_NAME":j,p=l===void 0?"value...":l;let k;e[0]!==s||e[1]!==t?(k=()=>{s([...t,{key:"",value:""}])},e[0]=s,e[1]=t,e[2]=k):k=e[2];const N=k;let y;e[3]!==s||e[4]!==t?(y=n=>{s(t.filter((c,r)=>r!==n))},e[3]=s,e[4]=t,e[5]=y):y=e[5];const m=y;let g;e[6]!==s||e[7]!==t?(g=(n,c)=>{const r=[...t],a=r[n];a&&(r[n]={key:c,value:a.value},s(r))},e[6]=s,e[7]=t,e[8]=g):g=e[8];const _=g;let x;e[9]!==s||e[10]!==t?(x=(n,c)=>{const r=[...t],a=r[n];a&&(r[n]={key:a.key,value:c},s(r))},e[9]=s,e[10]=t,e[11]=x):x=e[11];const v=x;let u;if(e[12]!==_||e[13]!==m||e[14]!==v||e[15]!==h||e[16]!==t||e[17]!==p){let n;e[19]!==_||e[20]!==m||e[21]!==v||e[22]!==h||e[23]!==p?(n=(c,r)=>o.jsxs("div",{className:"flex gap-2 items-center",children:[o.jsx(P,{placeholder:h,value:c.key,onChange:a=>_(r,a.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),o.jsx(P,{type:z(c.key)?"password":"text",placeholder:p,value:c.value,onChange:a=>v(r,a.target.value),className:"h-10 rounded-lg flex-1"}),o.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>m(r),children:o.jsx(R,{size:16})})]},r),e[19]=_,e[20]=m,e[21]=v,e[22]=h,e[23]=p,e[24]=n):n=e[24],u=t.map(n),e[12]=_,e[13]=m,e[14]=v,e[15]=h,e[16]=t,e[17]=p,e[18]=u}else u=e[18];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(A,{size:16,className:"mr-1"}),e[25]=w):w=e[25];let f;e[26]!==N?(f=o.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:N,children:[w,"Add Environment Variable"]}),e[26]=N,e[27]=f):f=e[27];let d;e[28]!==u||e[29]!==f?(d=o.jsxs("div",{className:"flex flex-col gap-2",children:[u,f]}),e[28]=u,e[29]=f,e[30]=d):d=e[30];let b;return e[31]!==E||e[32]!==d?(b=o.jsx("div",{className:E,children:d}),e[31]=E,e[32]=d,e[33]=b):b=e[33],b}function T(i){const e={};for(const{key:t,value:s}of i)t.trim()&&(e[t.trim()]=s);return e}function W(i){return i?Object.entries(i).map(([e,t])=>({key:e,value:t})):[]}export{L as E,T as e,W as r};
1
+ import{c as V,j as o,B as C}from"./index-DVHuYwO5.js";import{I as P}from"./input-CImrwNsE.js";import{s as A}from"./Plus-2wrCLrAD.js";import{s as R}from"./Trash01-DJpn1VG4.js";function z(i){const e=i.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(l=>e.includes(l))||["sk_","rk_","whsec_","pk_live","sk_live"].some(l=>e.startsWith(l))||["_key","_secret","_token","_password","_auth","_pat"].some(l=>e.endsWith(l)))}function L(i){const e=V.c(34),{value:t,onChange:s,keyPlaceholder:j,valuePlaceholder:l,className:E}=i,h=j===void 0?"VARIABLE_NAME":j,p=l===void 0?"value...":l;let k;e[0]!==s||e[1]!==t?(k=()=>{s([...t,{key:"",value:""}])},e[0]=s,e[1]=t,e[2]=k):k=e[2];const N=k;let y;e[3]!==s||e[4]!==t?(y=n=>{s(t.filter((c,r)=>r!==n))},e[3]=s,e[4]=t,e[5]=y):y=e[5];const m=y;let g;e[6]!==s||e[7]!==t?(g=(n,c)=>{const r=[...t],a=r[n];a&&(r[n]={key:c,value:a.value},s(r))},e[6]=s,e[7]=t,e[8]=g):g=e[8];const _=g;let x;e[9]!==s||e[10]!==t?(x=(n,c)=>{const r=[...t],a=r[n];a&&(r[n]={key:a.key,value:c},s(r))},e[9]=s,e[10]=t,e[11]=x):x=e[11];const v=x;let u;if(e[12]!==_||e[13]!==m||e[14]!==v||e[15]!==h||e[16]!==t||e[17]!==p){let n;e[19]!==_||e[20]!==m||e[21]!==v||e[22]!==h||e[23]!==p?(n=(c,r)=>o.jsxs("div",{className:"flex gap-2 items-center",children:[o.jsx(P,{placeholder:h,value:c.key,onChange:a=>_(r,a.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),o.jsx(P,{type:z(c.key)?"password":"text",placeholder:p,value:c.value,onChange:a=>v(r,a.target.value),className:"h-10 rounded-lg flex-1"}),o.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>m(r),children:o.jsx(R,{size:16})})]},r),e[19]=_,e[20]=m,e[21]=v,e[22]=h,e[23]=p,e[24]=n):n=e[24],u=t.map(n),e[12]=_,e[13]=m,e[14]=v,e[15]=h,e[16]=t,e[17]=p,e[18]=u}else u=e[18];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(A,{size:16,className:"mr-1"}),e[25]=w):w=e[25];let f;e[26]!==N?(f=o.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:N,children:[w,"Add Environment Variable"]}),e[26]=N,e[27]=f):f=e[27];let d;e[28]!==u||e[29]!==f?(d=o.jsxs("div",{className:"flex flex-col gap-2",children:[u,f]}),e[28]=u,e[29]=f,e[30]=d):d=e[30];let b;return e[31]!==E||e[32]!==d?(b=o.jsx("div",{className:E,children:d}),e[31]=E,e[32]=d,e[33]=b):b=e[33],b}function T(i){const e={};for(const{key:t,value:s}of i)t.trim()&&(e[t.trim()]=s);return e}function W(i){return i?Object.entries(i).map(([e,t])=>({key:e,value:t})):[]}export{L as E,T as e,W as r};
@@ -1 +1 @@
1
- import"./constants-BnCnMsvC.js";import{g as A}from"./github-icon-Dp3wHhYE.js";import{g as D}from"./registry-utils-DRX9Fl5Z.js";import{g as H}from"./generate-id-Dyweu44Y.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,i=>i.toUpperCase()):"Unknown"}function j(e,r,d,i){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||A(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=i?.packageIndex??0,S=i?.remoteIndex??0,y=u.length>0&&i?.packageIndex!==void 0,a=y?u[C]:null,s=y?null:m[S];let c,l,_=null;if(a){const h=a.identifier||a.name;c="STDIO",l="";const g={};if(a.environmentVariables)for(const k of a.environmentVariables)k.name&&(g[k.name]="");_={command:"npx",args:h?["-y",h]:[],...Object.keys(g).length>0&&{envVars:g}}}else s?(c=D(s.type)||"HTTP",l=s.url||""):(c="HTTP",l="");const w=m.length>1,M=u.length>1;let p="";a&&M?p=` (${R(a)})`:s&&w&&(p=` (${O(s)})`);const U=b+p;return{id:H("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:d,organization_id:r,tools:null,bindings:null,status:"inactive"}}export{E as M,j as e};
1
+ import"./constants-BMZNxJu4.js";import{g as A}from"./github-icon-Dp3wHhYE.js";import{g as D}from"./registry-utils-BL3Z-ZuV.js";import{g as H}from"./generate-id-Dyweu44Y.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,i=>i.toUpperCase()):"Unknown"}function j(e,r,d,i){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||A(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=i?.packageIndex??0,S=i?.remoteIndex??0,y=u.length>0&&i?.packageIndex!==void 0,a=y?u[C]:null,s=y?null:m[S];let c,l,_=null;if(a){const h=a.identifier||a.name;c="STDIO",l="";const g={};if(a.environmentVariables)for(const k of a.environmentVariables)k.name&&(g[k.name]="");_={command:"npx",args:h?["-y",h]:[],...Object.keys(g).length>0&&{envVars:g}}}else s?(c=D(s.type)||"HTTP",l=s.url||""):(c="HTTP",l="");const w=m.length>1,M=u.length>1;let p="";a&&M?p=` (${R(a)})`:s&&w&&(p=` (${O(s)})`);const U=b+p;return{id:H("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:d,organization_id:r,tools:null,bindings:null,status:"inactive"}}export{E as M,j as e};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/grid-view-B2G72x7D.js","assets/index-CzFqQvXW.js","assets/index-Bl1kPuE1.css","assets/topbar-portal-mNbAP1zZ.js","assets/AlertCircle-Dvy3oHwl.js","assets/Download01-x2RmdAQh.js","assets/File02-BBbAYdh-.js","assets/File06-CZSeKcKm.js","assets/Image01-CyQ-9pmM.js","assets/Loading01-DvHkBn5K.js","assets/Trash01-DfwWsbuW.js","assets/Upload01-CBnp-ZgO.js","assets/useMutation-DsQcwaJP.js","assets/useQuery-BE7O7fKt.js","assets/useInfiniteQuery-BRjF-D1B.js","assets/infiniteQueryObserver-B0QSZ6Wg.js","assets/checkbox-Bs5NWE_x.js","assets/Check-BGWNBpXb.js","assets/ChevronRight-B-dZm0Fo.js","assets/Grid01-C85povgK.js","assets/Home02-P9zxIWnB.js","assets/List-Dy03iFlP.js"])))=>i.map(i=>d[i]);
2
- import{r as M,c as A,bX as O,m as Z,t as D,j as t,B as _,v as Q,bY as X,aA as ee}from"./index-CzFqQvXW.js";import{u as J}from"./topbar-portal-mNbAP1zZ.js";import{u as te}from"./useInfiniteQuery-BRjF-D1B.js";import{C as U}from"./checkbox-Bs5NWE_x.js";import{i as se}from"./AlertCircle-Dvy3oHwl.js";import{i as ae}from"./ChevronRight-B-dZm0Fo.js";import{n as ie}from"./Download01-x2RmdAQh.js";import{i as re}from"./File02-BBbAYdh-.js";import{c as G}from"./Grid01-C85povgK.js";import{a as oe}from"./Home02-P9zxIWnB.js";import{i as V}from"./List-Dy03iFlP.js";import{i as L}from"./Loading01-DvHkBn5K.js";import{s as W}from"./Trash01-DfwWsbuW.js";import{i as $}from"./Upload01-CBnp-ZgO.js";import{u as q}from"./useMutation-DsQcwaJP.js";const Y=({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"}));Y.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=A.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:z,isFetchingNextPage:g,hasNextPage:y,fetchNextPage:h,error:w}=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=w;let k;return e[23]!==g||e[24]!==z||e[25]!==C||e[26]!==v||e[27]!==P||e[28]!==F?(k={objects:v,isLoading:z,isFetchingMore:g,hasMore:F,loadMore:C,error:P},e[23]=g,e[24]=z,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-B2G72x7D.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=A.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 z;e[12]!==i.isFolder?(z=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]=z):z=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]!==z||e[19]!==g?(y=t.jsxs("button",{type:"button",onClick:u,className:p,children:[z,g]}),e[16]=u,e[17]=p,e[18]=z,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 w;e[24]!==h?(w=t.jsx("span",{className:"text-sm text-muted-foreground w-20 text-right shrink-0",children:h}),e[24]=h,e[25]=w):w=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]!==w||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,w,N,a]}),e[44]=w,e[45]=N,e[46]=a,e[47]=f,e[48]=y,e[49]=r):r=e[49],r}function H(s){const e=A.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"}=O.useSearch({from:"/"}),o=O.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=Z(),{connectionId:S,toolCaller:f}=J(),{objects:u,isLoading:E,isFetchingMore:p,hasMore:z,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=>{D.success(`Uploaded ${I(a)}`),b.invalidateQueries({queryKey:R.objects(S,s)})},onError:a=>{D.error(`Upload failed: ${a.message}`)}}),w=q({mutationFn:async a=>a.length===1&&a[0]?f("DELETE_OBJECT",{key:a[0]}):f("DELETE_OBJECTS",{keys:a}),onSuccess:()=>{D.success("Deleted successfully"),x(new Set),b.invalidateQueries({queryKey:R.objects(S,s)})},onError:a=>{D.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(),K=URL.createObjectURL(T),B=document.createElement("a");B.href=K,B.download=I(a),document.body.appendChild(B),B.click(),document.body.removeChild(B),URL.revokeObjectURL(K)}catch(r){D.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&&w.mutate(Array.from(n))},k=a=>{if(!z||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:w.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(Y,{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=>w.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,Y as s,le as u};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/grid-view-uc2-Xd10.js","assets/index-DVHuYwO5.js","assets/index-CUEtQJPr.css","assets/topbar-portal-Cy4hr4gX.js","assets/AlertCircle-DtdVhcv9.js","assets/Download01-Dqv2OtJR.js","assets/File02-8H6UbpEV.js","assets/File06-C1Sd5E1A.js","assets/Image01-B8svV61f.js","assets/Loading01-DUUFtL7S.js","assets/Trash01-DJpn1VG4.js","assets/Upload01-c6QpJwvP.js","assets/useMutation-BskhtN65.js","assets/useQuery-CxvwMb--.js","assets/useInfiniteQuery-CutnJ4kj.js","assets/infiniteQueryObserver-BU31NXJd.js","assets/checkbox-C_yzLnRo.js","assets/Check-llxZXJNk.js","assets/ChevronRight-bI92hTEK.js","assets/Grid01-CfCG1RrY.js","assets/Home02-BgWCBPhH.js","assets/List-uQZNVPQ-.js"])))=>i.map(i=>d[i]);
2
+ import{r as M,c as A,bX as O,n as Z,t as D,j as t,B as _,v as Q,bY as X,aA as ee}from"./index-DVHuYwO5.js";import{u as J}from"./topbar-portal-Cy4hr4gX.js";import{u as te}from"./useInfiniteQuery-CutnJ4kj.js";import{C as U}from"./checkbox-C_yzLnRo.js";import{i as se}from"./AlertCircle-DtdVhcv9.js";import{i as ae}from"./ChevronRight-bI92hTEK.js";import{n as ie}from"./Download01-Dqv2OtJR.js";import{i as re}from"./File02-8H6UbpEV.js";import{c as G}from"./Grid01-CfCG1RrY.js";import{a as oe}from"./Home02-BgWCBPhH.js";import{i as V}from"./List-uQZNVPQ-.js";import{i as L}from"./Loading01-DUUFtL7S.js";import{s as W}from"./Trash01-DJpn1VG4.js";import{i as $}from"./Upload01-c6QpJwvP.js";import{u as q}from"./useMutation-BskhtN65.js";const Y=({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"}));Y.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=A.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:z,isFetchingNextPage:g,hasNextPage:y,fetchNextPage:h,error:w}=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=w;let k;return e[23]!==g||e[24]!==z||e[25]!==C||e[26]!==v||e[27]!==P||e[28]!==F?(k={objects:v,isLoading:z,isFetchingMore:g,hasMore:F,loadMore:C,error:P},e[23]=g,e[24]=z,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-uc2-Xd10.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=A.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 z;e[12]!==i.isFolder?(z=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]=z):z=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]!==z||e[19]!==g?(y=t.jsxs("button",{type:"button",onClick:u,className:p,children:[z,g]}),e[16]=u,e[17]=p,e[18]=z,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 w;e[24]!==h?(w=t.jsx("span",{className:"text-sm text-muted-foreground w-20 text-right shrink-0",children:h}),e[24]=h,e[25]=w):w=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]!==w||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,w,N,a]}),e[44]=w,e[45]=N,e[46]=a,e[47]=f,e[48]=y,e[49]=r):r=e[49],r}function H(s){const e=A.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"}=O.useSearch({from:"/"}),o=O.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=Z(),{connectionId:S,toolCaller:f}=J(),{objects:u,isLoading:E,isFetchingMore:p,hasMore:z,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=>{D.success(`Uploaded ${I(a)}`),b.invalidateQueries({queryKey:R.objects(S,s)})},onError:a=>{D.error(`Upload failed: ${a.message}`)}}),w=q({mutationFn:async a=>a.length===1&&a[0]?f("DELETE_OBJECT",{key:a[0]}):f("DELETE_OBJECTS",{keys:a}),onSuccess:()=>{D.success("Deleted successfully"),x(new Set),b.invalidateQueries({queryKey:R.objects(S,s)})},onError:a=>{D.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(),K=URL.createObjectURL(T),B=document.createElement("a");B.href=K,B.download=I(a),document.body.appendChild(B),B.click(),document.body.removeChild(B),URL.revokeObjectURL(K)}catch(r){D.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&&w.mutate(Array.from(n))},k=a=>{if(!z||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:w.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(Y,{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=>w.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,Y as s,le as u};
@@ -1 +1 @@
1
- import{F as C,c as f,j as c,q as j,r as d,v as x,w as v,x as b,y as h}from"./index-CzFqQvXW.js";import{L as N}from"./label-DdGHGWov.js";const D=C,g=d.createContext({}),E=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},p=()=>{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 M(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=x("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 y(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}=p(),a=!!n;let l;e[3]!==s?(l=x("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 L(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}=p(),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 P(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}=p();let r;e[3]!==s?(r=x("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}=p(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=x("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{E as F,D as a,M as b,y as c,L as d,P as e,R as f};
1
+ import{F as C,c as f,j as c,q as j,r as d,v as x,w as v,x as b,y as h}from"./index-DVHuYwO5.js";import{L as N}from"./label-BEcdY3zl.js";const D=C,g=d.createContext({}),E=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},p=()=>{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 M(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=x("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 y(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}=p(),a=!!n;let l;e[3]!==s?(l=x("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 L(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}=p(),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 P(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}=p();let r;e[3]!==s?(r=x("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}=p(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=x("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{E as F,D as a,M as b,y as c,L as d,P as e,R as f};
@@ -1 +1 @@
1
- import{o as V,s as q,c as Q,u as Y,m as Z,O as H,k as W,l as X,j as n,K as U,t as ee}from"./index-CzFqQvXW.js";import{u as ne}from"./useMutation-DsQcwaJP.js";import{a as oe,u as te}from"./constants-0JLhMmM7.js";import{I as $}from"./input-Rcf9et7W.js";import{T as re}from"./textarea-CumbsokS.js";import{F as K,d as O,a as se,b as w,c as A,e as z,f as L}from"./form-EW4LFI0z.js";import{D as le}from"./danger-zone-fH4LWpAE.js";import"./label-DdGHGWov.js";import"./alert-dialog-CHhoNaC0.js";const ie=V({name:q().min(1,"Name is required").max(200,"Name is too long"),description:q().max(1e3,"Description is too long").nullable(),themeColor:q().nullable()});function ae(){const e=Q.c(63),{org:r,project:o}=Y(),y=Z(),P=o.slug===H;let v;e[0]!==r.id?(v={connectionId:oe,orgId:r.id},e[0]=r.id,e[1]=v):v=e[1];const G=te(v);let S;e[2]===Symbol.for("react.memo_cache_sentinel")?(S=W(ie),e[2]=S):S=e[2];const M=o.name??"",R=o.description??"",k=o.ui?.themeColor??"#60a5fa";let F;e[3]!==M||e[4]!==R||e[5]!==k?(F={resolver:S,values:{name:M,description:R,themeColor:k}},e[3]=M,e[4]=R,e[5]=k,e[6]=F):F=e[6];const t=X(F);let c;e[7]!==G||e[8]!==o.id||e[9]!==o.ui?.banner||e[10]!==o.ui?.bannerColor||e[11]!==o.ui?.icon?(c=async l=>{const s=await G.callTool({name:"PROJECT_UPDATE",arguments:{projectId:o.id,name:l.name,description:l.description||null,ui:{themeColor:l.themeColor||null,banner:o.ui?.banner??null,bannerColor:o.ui?.bannerColor??null,icon:o.ui?.icon??null}}});return s.structuredContent??s},e[7]=G,e[8]=o.id,e[9]=o.ui?.banner,e[10]=o.ui?.bannerColor,e[11]=o.ui?.icon,e[12]=c):c=e[12];let d;e[13]!==t||e[14]!==r.id||e[15]!==o.slug||e[16]!==y?(d=()=>{y.invalidateQueries({queryKey:U.project(r.id,o.slug)}),y.invalidateQueries({queryKey:U.projects(r.id)}),t.reset(t.getValues())},e[13]=t,e[14]=r.id,e[15]=o.slug,e[16]=y,e[17]=d):d=e[17];let N;e[18]!==c||e[19]!==d?(N={mutationFn:c,onSuccess:d,onError:ce},e[18]=c,e[19]=d,e[20]=N):N=e[20];const i=ne(N);let E;e[21]!==i?(E=async l=>{await i.mutateAsync(l)},e[21]=i,e[22]=E):E=e[22];const m=E;let I;e[23]!==t||e[24]!==m?(I=l=>{l(),t.handleSubmit(m)()},e[23]=t,e[24]=m,e[25]=I):I=e[25];const a=I;let u;e[26]!==t||e[27]!==m?(u=t.handleSubmit(m),e[26]=t,e[27]=m,e[28]=u):u=e[28];let f;e[29]!==P||e[30]!==i.isPending||e[31]!==a?(f=l=>{const{field:s}=l;return n.jsxs(w,{children:[n.jsx(A,{children:"Project Name"}),n.jsx(O,{children:n.jsx($,{placeholder:"My Project",...s,onBlur:()=>a(s.onBlur),disabled:P||i.isPending})}),P&&n.jsx(z,{children:"The organization admin project name cannot be changed."}),n.jsx(L,{})]})},e[29]=P,e[30]=i.isPending,e[31]=a,e[32]=f):f=e[32];let x;e[33]!==t.control||e[34]!==f?(x=n.jsx(K,{control:t.control,name:"name",render:f}),e[33]=t.control,e[34]=f,e[35]=x):x=e[35];let D;e[36]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(A,{children:"Slug"}),e[36]=D):D=e[36];let j;e[37]!==o.slug?(j=n.jsx(O,{children:n.jsx($,{value:o.slug,disabled:!0,className:"bg-muted"})}),e[37]=o.slug,e[38]=j):j=e[38];let T;e[39]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(z,{children:"The project slug cannot be changed after creation."}),e[39]=T):T=e[39];let p;e[40]!==j?(p=n.jsxs(w,{children:[D,j,T]}),e[40]=j,e[41]=p):p=e[41];let h;e[42]!==i.isPending||e[43]!==a?(h=l=>{const{field:s}=l;return n.jsxs(w,{children:[n.jsx(A,{children:"Description"}),n.jsx(O,{children:n.jsx(re,{placeholder:"Optional project description...",rows:3,...s,value:s.value??"",onBlur:()=>a(s.onBlur),disabled:i.isPending})}),n.jsx(L,{})]})},e[42]=i.isPending,e[43]=a,e[44]=h):h=e[44];let g;e[45]!==t.control||e[46]!==h?(g=n.jsx(K,{control:t.control,name:"description",render:h}),e[45]=t.control,e[46]=h,e[47]=g):g=e[47];let b;e[48]!==i.isPending||e[49]!==a?(b=l=>{const{field:s}=l;return n.jsxs(w,{children:[n.jsx(A,{children:"Color"}),n.jsx(O,{children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"size-9 rounded-md border border-input overflow-hidden cursor-pointer shrink-0",style:{backgroundColor:s.value??"#60a5fa"},children:n.jsx("input",{type:"color",value:s.value??"#60a5fa",onChange:J=>s.onChange(J.target.value),onBlur:()=>a(s.onBlur),disabled:i.isPending,className:"opacity-0 w-full h-full cursor-pointer"})}),n.jsx("span",{className:"font-mono text-sm text-muted-foreground",children:s.value??"#60a5fa"})]})}),n.jsx(L,{})]})},e[48]=i.isPending,e[49]=a,e[50]=b):b=e[50];let C;e[51]!==t.control||e[52]!==b?(C=n.jsx(K,{control:t.control,name:"themeColor",render:b}),e[51]=t.control,e[52]=b,e[53]=C):C=e[53];let _;e[54]!==u||e[55]!==x||e[56]!==p||e[57]!==g||e[58]!==C?(_=n.jsxs("form",{onSubmit:u,className:"space-y-6",children:[x,p,g,C]}),e[54]=u,e[55]=x,e[56]=p,e[57]=g,e[58]=C,e[59]=_):_=e[59];let B;return e[60]!==t||e[61]!==_?(B=n.jsx("div",{className:"flex flex-col",children:n.jsx(se,{...t,children:_})}),e[60]=t,e[61]=_,e[62]=B):B=e[62],B}function ce(e){ee.error("Failed to update project: "+(e instanceof Error?e.message:"Unknown error"))}function de(){const e=Q.c(2);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"General"}),e[0]=r):r=e[0];let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsxs("div",{className:"flex flex-col",children:[r,n.jsxs("div",{className:"pt-6 flex flex-col gap-6",children:[n.jsx(ae,{}),n.jsx(le,{})]})]}),e[1]=o):o=e[1],o}function Ce(){const e=Q.c(1);let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(de,{}),e[0]=r):r=e[0],r}export{Ce as default};
1
+ import{o as V,s as q,c as Q,u as Y,n as Z,O as H,k as W,l as X,j as n,K as U,t as ee}from"./index-DVHuYwO5.js";import{u as ne}from"./useMutation-BskhtN65.js";import{a as oe,u as te}from"./constants-DLWxw8L_.js";import{I as $}from"./input-CImrwNsE.js";import{T as re}from"./textarea-BOlS_fKd.js";import{F as K,d as O,a as se,b as w,c as A,e as z,f as L}from"./form-Bqy3P0kv.js";import{D as le}from"./danger-zone-Dhz8OLxh.js";import"./label-BEcdY3zl.js";import"./alert-dialog-WtbKGn3h.js";const ie=V({name:q().min(1,"Name is required").max(200,"Name is too long"),description:q().max(1e3,"Description is too long").nullable(),themeColor:q().nullable()});function ae(){const e=Q.c(63),{org:r,project:o}=Y(),y=Z(),P=o.slug===H;let v;e[0]!==r.id?(v={connectionId:oe,orgId:r.id},e[0]=r.id,e[1]=v):v=e[1];const G=te(v);let S;e[2]===Symbol.for("react.memo_cache_sentinel")?(S=W(ie),e[2]=S):S=e[2];const M=o.name??"",R=o.description??"",k=o.ui?.themeColor??"#60a5fa";let F;e[3]!==M||e[4]!==R||e[5]!==k?(F={resolver:S,values:{name:M,description:R,themeColor:k}},e[3]=M,e[4]=R,e[5]=k,e[6]=F):F=e[6];const t=X(F);let c;e[7]!==G||e[8]!==o.id||e[9]!==o.ui?.banner||e[10]!==o.ui?.bannerColor||e[11]!==o.ui?.icon?(c=async l=>{const s=await G.callTool({name:"PROJECT_UPDATE",arguments:{projectId:o.id,name:l.name,description:l.description||null,ui:{themeColor:l.themeColor||null,banner:o.ui?.banner??null,bannerColor:o.ui?.bannerColor??null,icon:o.ui?.icon??null}}});return s.structuredContent??s},e[7]=G,e[8]=o.id,e[9]=o.ui?.banner,e[10]=o.ui?.bannerColor,e[11]=o.ui?.icon,e[12]=c):c=e[12];let d;e[13]!==t||e[14]!==r.id||e[15]!==o.slug||e[16]!==y?(d=()=>{y.invalidateQueries({queryKey:U.project(r.id,o.slug)}),y.invalidateQueries({queryKey:U.projects(r.id)}),t.reset(t.getValues())},e[13]=t,e[14]=r.id,e[15]=o.slug,e[16]=y,e[17]=d):d=e[17];let N;e[18]!==c||e[19]!==d?(N={mutationFn:c,onSuccess:d,onError:ce},e[18]=c,e[19]=d,e[20]=N):N=e[20];const i=ne(N);let E;e[21]!==i?(E=async l=>{await i.mutateAsync(l)},e[21]=i,e[22]=E):E=e[22];const m=E;let I;e[23]!==t||e[24]!==m?(I=l=>{l(),t.handleSubmit(m)()},e[23]=t,e[24]=m,e[25]=I):I=e[25];const a=I;let u;e[26]!==t||e[27]!==m?(u=t.handleSubmit(m),e[26]=t,e[27]=m,e[28]=u):u=e[28];let f;e[29]!==P||e[30]!==i.isPending||e[31]!==a?(f=l=>{const{field:s}=l;return n.jsxs(w,{children:[n.jsx(A,{children:"Project Name"}),n.jsx(O,{children:n.jsx($,{placeholder:"My Project",...s,onBlur:()=>a(s.onBlur),disabled:P||i.isPending})}),P&&n.jsx(z,{children:"The organization admin project name cannot be changed."}),n.jsx(L,{})]})},e[29]=P,e[30]=i.isPending,e[31]=a,e[32]=f):f=e[32];let x;e[33]!==t.control||e[34]!==f?(x=n.jsx(K,{control:t.control,name:"name",render:f}),e[33]=t.control,e[34]=f,e[35]=x):x=e[35];let D;e[36]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(A,{children:"Slug"}),e[36]=D):D=e[36];let j;e[37]!==o.slug?(j=n.jsx(O,{children:n.jsx($,{value:o.slug,disabled:!0,className:"bg-muted"})}),e[37]=o.slug,e[38]=j):j=e[38];let T;e[39]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(z,{children:"The project slug cannot be changed after creation."}),e[39]=T):T=e[39];let p;e[40]!==j?(p=n.jsxs(w,{children:[D,j,T]}),e[40]=j,e[41]=p):p=e[41];let h;e[42]!==i.isPending||e[43]!==a?(h=l=>{const{field:s}=l;return n.jsxs(w,{children:[n.jsx(A,{children:"Description"}),n.jsx(O,{children:n.jsx(re,{placeholder:"Optional project description...",rows:3,...s,value:s.value??"",onBlur:()=>a(s.onBlur),disabled:i.isPending})}),n.jsx(L,{})]})},e[42]=i.isPending,e[43]=a,e[44]=h):h=e[44];let g;e[45]!==t.control||e[46]!==h?(g=n.jsx(K,{control:t.control,name:"description",render:h}),e[45]=t.control,e[46]=h,e[47]=g):g=e[47];let b;e[48]!==i.isPending||e[49]!==a?(b=l=>{const{field:s}=l;return n.jsxs(w,{children:[n.jsx(A,{children:"Color"}),n.jsx(O,{children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"size-9 rounded-md border border-input overflow-hidden cursor-pointer shrink-0",style:{backgroundColor:s.value??"#60a5fa"},children:n.jsx("input",{type:"color",value:s.value??"#60a5fa",onChange:J=>s.onChange(J.target.value),onBlur:()=>a(s.onBlur),disabled:i.isPending,className:"opacity-0 w-full h-full cursor-pointer"})}),n.jsx("span",{className:"font-mono text-sm text-muted-foreground",children:s.value??"#60a5fa"})]})}),n.jsx(L,{})]})},e[48]=i.isPending,e[49]=a,e[50]=b):b=e[50];let C;e[51]!==t.control||e[52]!==b?(C=n.jsx(K,{control:t.control,name:"themeColor",render:b}),e[51]=t.control,e[52]=b,e[53]=C):C=e[53];let _;e[54]!==u||e[55]!==x||e[56]!==p||e[57]!==g||e[58]!==C?(_=n.jsxs("form",{onSubmit:u,className:"space-y-6",children:[x,p,g,C]}),e[54]=u,e[55]=x,e[56]=p,e[57]=g,e[58]=C,e[59]=_):_=e[59];let B;return e[60]!==t||e[61]!==_?(B=n.jsx("div",{className:"flex flex-col",children:n.jsx(se,{...t,children:_})}),e[60]=t,e[61]=_,e[62]=B):B=e[62],B}function ce(e){ee.error("Failed to update project: "+(e instanceof Error?e.message:"Unknown error"))}function de(){const e=Q.c(2);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"General"}),e[0]=r):r=e[0];let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsxs("div",{className:"flex flex-col",children:[r,n.jsxs("div",{className:"pt-6 flex flex-col gap-6",children:[n.jsx(ae,{}),n.jsx(le,{})]})]}),e[1]=o):o=e[1],o}function Ce(){const e=Q.c(1);let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(de,{}),e[0]=r):r=e[0],r}export{Ce as default};
@@ -1 +1 @@
1
- import{r as v,c as M,v as L,j as s,m as q,t as w,B as E,aA as H}from"./index-CzFqQvXW.js";import{u as D}from"./topbar-portal-mNbAP1zZ.js";import{K as R,u as Z,g as I,s as Q,a as W,f as U}from"./file-browser-B8HL2Mki.js";import{i as S}from"./AlertCircle-Dvy3oHwl.js";import{n as A}from"./Download01-x2RmdAQh.js";import{i as $}from"./File02-BBbAYdh-.js";import{i as J}from"./File06-CZSeKcKm.js";import{a as P}from"./Image01-CyQ-9pmM.js";import{i as T}from"./Loading01-DvHkBn5K.js";import{s as V}from"./Trash01-DfwWsbuW.js";import{i as Y}from"./Upload01-CBnp-ZgO.js";import{u as _}from"./useMutation-DsQcwaJP.js";import{u as X}from"./useQuery-BE7O7fKt.js";import"./useInfiniteQuery-BRjF-D1B.js";import"./infiniteQueryObserver-B0QSZ6Wg.js";import"./checkbox-Bs5NWE_x.js";import"./Check-BGWNBpXb.js";import"./ChevronRight-B-dZm0Fo.js";import"./Grid01-C85povgK.js";import"./Home02-P9zxIWnB.js";import"./List-Dy03iFlP.js";const B=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C14.76 8 15.04 8 15.6 8h4.13M20 9.988V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));B.displayName="File04";const G=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437c.214.11.494.11 1.054.11h4.13M8 15v3m8-5v5m-4-7.5V18m8-8.012V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));G.displayName="File07";const K=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437c.214.11.494.11 1.054.11h4.13M14 17.5l2.5-2.5-2.5-2.5m-4 0L7.5 15l2.5 2.5m10-7.512V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));K.displayName="FileCode01";const O=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M22 8.931c0-.605 0-.908-.12-1.049a.5.5 0 0 0-.42-.173c-.183.014-.397.228-.826.657L17 12l3.634 3.634c.429.429.643.643.827.657a.5.5 0 0 0 .42-.173c.119-.14.119-.444.119-1.05V8.932ZM2 9.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 5 5.12 5 6.8 5h5.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C17 7.28 17 8.12 17 9.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C14.72 19 13.88 19 12.2 19H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 16.72 2 15.88 2 14.2V9.8Z"}));O.displayName="VideoRecorder";function ee(i){const e=M.c(5),[t,g]=v.useState(!1),c=v.useRef(null),d=v.useRef(!1);let n;e[0]!==i?(n=u=>{c.current&&(c.current.disconnect(),c.current=null),u&&!d.current&&(c.current=new IntersectionObserver(y=>{const[a]=y;a?.isIntersecting&&!d.current&&(d.current=!0,g(!0),c.current?.disconnect(),c.current=null)},i),c.current.observe(u))},e[0]=i,e[1]=n):n=e[1];const l=n;let h;return e[2]!==t||e[3]!==l?(h=[t,l],e[2]=t,e[3]=l,e[4]=h):h=e[4],h}function te(i){const e=M.c(24),{objectKey:t,alt:g,className:c}=i,d=c===void 0?"":c,{connectionId:n,toolCaller:l}=D();let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={rootMargin:"100px",threshold:0},e[0]=h):h=e[0];const[u,y]=ee(h);let a;e[1]!==n||e[2]!==t?(a=R.imagePreview(n,t),e[1]=n,e[2]=t,e[3]=a):a=e[3];let f;e[4]!==t||e[5]!==l?(f=async()=>{const{url:m}=await l("GET_PRESIGNED_URL",{key:t});return m},e[4]=t,e[5]=l,e[6]=f):f=e[6];let k;e[7]!==u||e[8]!==a||e[9]!==f?(k={queryKey:a,queryFn:f,enabled:u,staleTime:3e5,gcTime:6e5},e[7]=u,e[8]=a,e[9]=f,e[10]=k):k=e[10];const{data:b,isLoading:x,error:j}=X(k);let p;e[11]!==d?(p=L("relative w-full h-full flex items-center justify-center overflow-hidden",d),e[11]=d,e[12]=p):p=e[12];let r;e[13]!==g||e[14]!==j||e[15]!==b||e[16]!==x||e[17]!==u||e[18]!==t?(r=!u||x?s.jsx("div",{className:"flex flex-col items-center justify-center text-muted-foreground",children:x?s.jsx(T,{size:24,className:"animate-spin"}):s.jsx(P,{size:48})}):j?s.jsx("div",{className:"flex flex-col items-center justify-center text-muted-foreground",children:s.jsx(S,{size:24})}):b?s.jsx("img",{src:b,alt:g||t,className:"w-full h-full object-cover",loading:"lazy"}):null,e[13]=g,e[14]=j,e[15]=b,e[16]=x,e[17]=u,e[18]=t,e[19]=r):r=e[19];let o;return e[20]!==y||e[21]!==p||e[22]!==r?(o=s.jsx("div",{ref:y,className:p,children:r}),e[20]=y,e[21]=p,e[22]=r,e[23]=o):o=e[23],o}const z=12,se={Image01:P,VideoRecorder:O,Music01:$,File02:$,File04:B,File06:J,File07:G,FileCode01:K,Folder:H};function re(i){const e=i.split(".").pop()?.toLowerCase();return["jpg","jpeg","png","gif","webp","svg","bmp","ico"].includes(e||"")}function oe(i){const e=M.c(41),{item:t,onNavigate:g,onDownload:c,onDelete:d}=i;let n;e[0]!==t.key?(n=I(t.key),e[0]=t.key,e[1]=n):n=e[1];const l=n,h=t.isFolder?"Folder":W(t.key),u=se[h]||$;let y;e[2]!==t.isFolder||e[3]!==t.key?(y=!t.isFolder&&re(t.key),e[2]=t.isFolder,e[3]=t.key,e[4]=y):y=e[4];const a=y;let f;e[5]!==t.isFolder||e[6]!==t.key||e[7]!==g?(f=()=>t.isFolder?g(t.key):void 0,e[5]=t.isFolder,e[6]=t.key,e[7]=g,e[8]=f):f=e[8];const k=!a&&"p-4",b=t.isFolder?"cursor-pointer":"cursor-default";let x;e[9]!==k||e[10]!==b?(x=L("flex flex-col items-center justify-center w-full h-full",k,b),e[9]=k,e[10]=b,e[11]=x):x=e[11];let j;e[12]!==u||e[13]!==a||e[14]!==t.isFolder||e[15]!==t.key||e[16]!==l?(j=a?s.jsx("div",{className:"absolute inset-0",children:s.jsx(te,{objectKey:t.key,alt:l})}):s.jsx(u,{size:48,className:L(t.isFolder?"text-amber-500":"text-muted-foreground")}),e[12]=u,e[13]=a,e[14]=t.isFolder,e[15]=t.key,e[16]=l,e[17]=j):j=e[17];let p;e[18]!==a||e[19]!==t.isFolder||e[20]!==t.size||e[21]!==l?(p=a?s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-2 pt-6",children:[s.jsx("span",{className:"text-sm text-white text-center line-clamp-1 block",children:l}),s.jsx("span",{className:"text-xs text-white/70 text-center block",children:U(t.size)})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"mt-3 text-sm text-center line-clamp-2 px-2",children:l}),!t.isFolder&&s.jsx("span",{className:"mt-1 text-xs text-muted-foreground",children:U(t.size)})]}),e[18]=a,e[19]=t.isFolder,e[20]=t.size,e[21]=l,e[22]=p):p=e[22];let r;e[23]!==f||e[24]!==x||e[25]!==j||e[26]!==p?(r=s.jsxs("button",{type:"button",onClick:f,className:x,children:[j,p]}),e[23]=f,e[24]=x,e[25]=j,e[26]=p,e[27]=r):r=e[27];let o;e[28]!==t.isFolder||e[29]!==t.key||e[30]!==d||e[31]!==c?(o=!t.isFolder&&s.jsxs("div",{className:"absolute top-2 right-2 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0",onClick:F=>{F.stopPropagation(),c(t.key)},children:s.jsx(A,{size:14})}),s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:F=>{F.stopPropagation(),d(t.key)},children:s.jsx(V,{size:14})})]}),e[28]=t.isFolder,e[29]=t.key,e[30]=d,e[31]=c,e[32]=o):o=e[32];let m;e[33]!==t.isFolder||e[34]!==t.key||e[35]!==d?(m=t.isFolder&&s.jsx("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",children:s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:F=>{F.stopPropagation(),d(t.key)},children:s.jsx(V,{size:14})})}),e[33]=t.isFolder,e[34]=t.key,e[35]=d,e[36]=m):m=e[36];let N;return e[37]!==o||e[38]!==m||e[39]!==r?(N=s.jsxs("div",{className:"group relative aspect-square bg-muted/30 rounded-lg border border-border hover:border-primary/50 hover:bg-muted/50 transition-colors overflow-hidden",children:[r,o,m]}),e[37]=o,e[38]=m,e[39]=r,e[40]=N):N=e[40],N}function we({prefix:i,flat:e,onNavigate:t}){const g=v.useRef(null),c=q(),{connectionId:d,toolCaller:n}=D(),{objects:l,isLoading:h,isFetchingMore:u,hasMore:y,loadMore:a,error:f}=Z({prefix:i,flat:e,pageSize:z}),k=_({mutationFn:async r=>{const o=i+r.name,{url:m}=await n("PUT_PRESIGNED_URL",{key:o,contentType:r.type||"application/octet-stream"}),N=await fetch(m,{method:"PUT",body:r,headers:{"Content-Type":r.type||"application/octet-stream"}});if(!N.ok)throw new Error(`Upload failed: ${N.statusText}`);return o},onSuccess:r=>{w.success(`Uploaded ${I(r)}`),c.invalidateQueries({queryKey:R.objects(d,i,e,z)})},onError:r=>{w.error(`Upload failed: ${r.message}`)}}),b=_({mutationFn:async r=>r.length===1&&r[0]?n("DELETE_OBJECT",{key:r[0]}):n("DELETE_OBJECTS",{keys:r}),onSuccess:()=>{w.success("Deleted successfully"),c.invalidateQueries({queryKey:R.objects(d,i,e,z)})},onError:r=>{w.error(`Delete failed: ${r.message}`)}}),x=async r=>{try{const{url:o}=await n("GET_PRESIGNED_URL",{key:r}),m=await fetch(o);if(!m.ok)throw new Error(`Failed to fetch file: ${m.statusText}`);const N=await m.blob(),F=URL.createObjectURL(N),C=document.createElement("a");C.href=F,C.download=I(r),document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(F)}catch(o){w.error(`Download failed: ${o instanceof Error?o.message:"Unknown error"}`)}},j=r=>{const o=r.target.files;if(o){for(const m of Array.from(o))k.mutate(m);r.target.value=""}},p=r=>{if(!y||u)return;const o=r.currentTarget;o.scrollHeight-o.scrollTop-o.clientHeight<200&&a()};return f?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(S,{size:48,className:"text-destructive mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading files"}),s.jsx("p",{className:"text-muted-foreground text-center",children:f.message})]}):s.jsx("div",{className:"flex-1 overflow-y-auto p-4",onScroll:p,children:h?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[s.jsx(T,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading files..."})]}):l.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(Q,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"This folder is empty"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Upload files to get started"}),s.jsx("input",{ref:g,type:"file",multiple:!0,className:"hidden",onChange:j}),s.jsxs(E,{variant:"outline",onClick:()=>g.current?.click(),children:[s.jsx(Y,{size:14,className:"mr-1"}),"Upload files"]})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4",children:l.map(r=>s.jsx(oe,{item:r,onNavigate:t,onDownload:x,onDelete:o=>b.mutate([o])},r.key))}),u&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(T,{size:24,className:"animate-spin text-muted-foreground"})})]})})}export{we as default};
1
+ import{r as v,c as M,v as L,j as s,n as q,t as w,B as E,aA as H}from"./index-DVHuYwO5.js";import{u as D}from"./topbar-portal-Cy4hr4gX.js";import{K as R,u as Z,g as I,s as Q,a as W,f as U}from"./file-browser-Dyg6fn_p.js";import{i as S}from"./AlertCircle-DtdVhcv9.js";import{n as A}from"./Download01-Dqv2OtJR.js";import{i as $}from"./File02-8H6UbpEV.js";import{i as J}from"./File06-C1Sd5E1A.js";import{a as P}from"./Image01-B8svV61f.js";import{i as T}from"./Loading01-DUUFtL7S.js";import{s as V}from"./Trash01-DJpn1VG4.js";import{i as Y}from"./Upload01-c6QpJwvP.js";import{u as _}from"./useMutation-BskhtN65.js";import{u as X}from"./useQuery-CxvwMb--.js";import"./useInfiniteQuery-CutnJ4kj.js";import"./infiniteQueryObserver-BU31NXJd.js";import"./checkbox-C_yzLnRo.js";import"./Check-llxZXJNk.js";import"./ChevronRight-bI92hTEK.js";import"./Grid01-CfCG1RrY.js";import"./Home02-BgWCBPhH.js";import"./List-uQZNVPQ-.js";const B=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C14.76 8 15.04 8 15.6 8h4.13M20 9.988V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));B.displayName="File04";const G=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437c.214.11.494.11 1.054.11h4.13M8 15v3m8-5v5m-4-7.5V18m8-8.012V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));G.displayName="File07";const K=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437c.214.11.494.11 1.054.11h4.13M14 17.5l2.5-2.5-2.5-2.5m-4 0L7.5 15l2.5 2.5m10-7.512V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));K.displayName="FileCode01";const O=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M22 8.931c0-.605 0-.908-.12-1.049a.5.5 0 0 0-.42-.173c-.183.014-.397.228-.826.657L17 12l3.634 3.634c.429.429.643.643.827.657a.5.5 0 0 0 .42-.173c.119-.14.119-.444.119-1.05V8.932ZM2 9.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 5 5.12 5 6.8 5h5.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C17 7.28 17 8.12 17 9.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C14.72 19 13.88 19 12.2 19H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 16.72 2 15.88 2 14.2V9.8Z"}));O.displayName="VideoRecorder";function ee(i){const e=M.c(5),[t,g]=v.useState(!1),c=v.useRef(null),d=v.useRef(!1);let n;e[0]!==i?(n=u=>{c.current&&(c.current.disconnect(),c.current=null),u&&!d.current&&(c.current=new IntersectionObserver(y=>{const[a]=y;a?.isIntersecting&&!d.current&&(d.current=!0,g(!0),c.current?.disconnect(),c.current=null)},i),c.current.observe(u))},e[0]=i,e[1]=n):n=e[1];const l=n;let h;return e[2]!==t||e[3]!==l?(h=[t,l],e[2]=t,e[3]=l,e[4]=h):h=e[4],h}function te(i){const e=M.c(24),{objectKey:t,alt:g,className:c}=i,d=c===void 0?"":c,{connectionId:n,toolCaller:l}=D();let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={rootMargin:"100px",threshold:0},e[0]=h):h=e[0];const[u,y]=ee(h);let a;e[1]!==n||e[2]!==t?(a=R.imagePreview(n,t),e[1]=n,e[2]=t,e[3]=a):a=e[3];let f;e[4]!==t||e[5]!==l?(f=async()=>{const{url:m}=await l("GET_PRESIGNED_URL",{key:t});return m},e[4]=t,e[5]=l,e[6]=f):f=e[6];let k;e[7]!==u||e[8]!==a||e[9]!==f?(k={queryKey:a,queryFn:f,enabled:u,staleTime:3e5,gcTime:6e5},e[7]=u,e[8]=a,e[9]=f,e[10]=k):k=e[10];const{data:b,isLoading:x,error:j}=X(k);let p;e[11]!==d?(p=L("relative w-full h-full flex items-center justify-center overflow-hidden",d),e[11]=d,e[12]=p):p=e[12];let r;e[13]!==g||e[14]!==j||e[15]!==b||e[16]!==x||e[17]!==u||e[18]!==t?(r=!u||x?s.jsx("div",{className:"flex flex-col items-center justify-center text-muted-foreground",children:x?s.jsx(T,{size:24,className:"animate-spin"}):s.jsx(P,{size:48})}):j?s.jsx("div",{className:"flex flex-col items-center justify-center text-muted-foreground",children:s.jsx(S,{size:24})}):b?s.jsx("img",{src:b,alt:g||t,className:"w-full h-full object-cover",loading:"lazy"}):null,e[13]=g,e[14]=j,e[15]=b,e[16]=x,e[17]=u,e[18]=t,e[19]=r):r=e[19];let o;return e[20]!==y||e[21]!==p||e[22]!==r?(o=s.jsx("div",{ref:y,className:p,children:r}),e[20]=y,e[21]=p,e[22]=r,e[23]=o):o=e[23],o}const z=12,se={Image01:P,VideoRecorder:O,Music01:$,File02:$,File04:B,File06:J,File07:G,FileCode01:K,Folder:H};function re(i){const e=i.split(".").pop()?.toLowerCase();return["jpg","jpeg","png","gif","webp","svg","bmp","ico"].includes(e||"")}function oe(i){const e=M.c(41),{item:t,onNavigate:g,onDownload:c,onDelete:d}=i;let n;e[0]!==t.key?(n=I(t.key),e[0]=t.key,e[1]=n):n=e[1];const l=n,h=t.isFolder?"Folder":W(t.key),u=se[h]||$;let y;e[2]!==t.isFolder||e[3]!==t.key?(y=!t.isFolder&&re(t.key),e[2]=t.isFolder,e[3]=t.key,e[4]=y):y=e[4];const a=y;let f;e[5]!==t.isFolder||e[6]!==t.key||e[7]!==g?(f=()=>t.isFolder?g(t.key):void 0,e[5]=t.isFolder,e[6]=t.key,e[7]=g,e[8]=f):f=e[8];const k=!a&&"p-4",b=t.isFolder?"cursor-pointer":"cursor-default";let x;e[9]!==k||e[10]!==b?(x=L("flex flex-col items-center justify-center w-full h-full",k,b),e[9]=k,e[10]=b,e[11]=x):x=e[11];let j;e[12]!==u||e[13]!==a||e[14]!==t.isFolder||e[15]!==t.key||e[16]!==l?(j=a?s.jsx("div",{className:"absolute inset-0",children:s.jsx(te,{objectKey:t.key,alt:l})}):s.jsx(u,{size:48,className:L(t.isFolder?"text-amber-500":"text-muted-foreground")}),e[12]=u,e[13]=a,e[14]=t.isFolder,e[15]=t.key,e[16]=l,e[17]=j):j=e[17];let p;e[18]!==a||e[19]!==t.isFolder||e[20]!==t.size||e[21]!==l?(p=a?s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-2 pt-6",children:[s.jsx("span",{className:"text-sm text-white text-center line-clamp-1 block",children:l}),s.jsx("span",{className:"text-xs text-white/70 text-center block",children:U(t.size)})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"mt-3 text-sm text-center line-clamp-2 px-2",children:l}),!t.isFolder&&s.jsx("span",{className:"mt-1 text-xs text-muted-foreground",children:U(t.size)})]}),e[18]=a,e[19]=t.isFolder,e[20]=t.size,e[21]=l,e[22]=p):p=e[22];let r;e[23]!==f||e[24]!==x||e[25]!==j||e[26]!==p?(r=s.jsxs("button",{type:"button",onClick:f,className:x,children:[j,p]}),e[23]=f,e[24]=x,e[25]=j,e[26]=p,e[27]=r):r=e[27];let o;e[28]!==t.isFolder||e[29]!==t.key||e[30]!==d||e[31]!==c?(o=!t.isFolder&&s.jsxs("div",{className:"absolute top-2 right-2 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0",onClick:F=>{F.stopPropagation(),c(t.key)},children:s.jsx(A,{size:14})}),s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:F=>{F.stopPropagation(),d(t.key)},children:s.jsx(V,{size:14})})]}),e[28]=t.isFolder,e[29]=t.key,e[30]=d,e[31]=c,e[32]=o):o=e[32];let m;e[33]!==t.isFolder||e[34]!==t.key||e[35]!==d?(m=t.isFolder&&s.jsx("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",children:s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:F=>{F.stopPropagation(),d(t.key)},children:s.jsx(V,{size:14})})}),e[33]=t.isFolder,e[34]=t.key,e[35]=d,e[36]=m):m=e[36];let N;return e[37]!==o||e[38]!==m||e[39]!==r?(N=s.jsxs("div",{className:"group relative aspect-square bg-muted/30 rounded-lg border border-border hover:border-primary/50 hover:bg-muted/50 transition-colors overflow-hidden",children:[r,o,m]}),e[37]=o,e[38]=m,e[39]=r,e[40]=N):N=e[40],N}function we({prefix:i,flat:e,onNavigate:t}){const g=v.useRef(null),c=q(),{connectionId:d,toolCaller:n}=D(),{objects:l,isLoading:h,isFetchingMore:u,hasMore:y,loadMore:a,error:f}=Z({prefix:i,flat:e,pageSize:z}),k=_({mutationFn:async r=>{const o=i+r.name,{url:m}=await n("PUT_PRESIGNED_URL",{key:o,contentType:r.type||"application/octet-stream"}),N=await fetch(m,{method:"PUT",body:r,headers:{"Content-Type":r.type||"application/octet-stream"}});if(!N.ok)throw new Error(`Upload failed: ${N.statusText}`);return o},onSuccess:r=>{w.success(`Uploaded ${I(r)}`),c.invalidateQueries({queryKey:R.objects(d,i,e,z)})},onError:r=>{w.error(`Upload failed: ${r.message}`)}}),b=_({mutationFn:async r=>r.length===1&&r[0]?n("DELETE_OBJECT",{key:r[0]}):n("DELETE_OBJECTS",{keys:r}),onSuccess:()=>{w.success("Deleted successfully"),c.invalidateQueries({queryKey:R.objects(d,i,e,z)})},onError:r=>{w.error(`Delete failed: ${r.message}`)}}),x=async r=>{try{const{url:o}=await n("GET_PRESIGNED_URL",{key:r}),m=await fetch(o);if(!m.ok)throw new Error(`Failed to fetch file: ${m.statusText}`);const N=await m.blob(),F=URL.createObjectURL(N),C=document.createElement("a");C.href=F,C.download=I(r),document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(F)}catch(o){w.error(`Download failed: ${o instanceof Error?o.message:"Unknown error"}`)}},j=r=>{const o=r.target.files;if(o){for(const m of Array.from(o))k.mutate(m);r.target.value=""}},p=r=>{if(!y||u)return;const o=r.currentTarget;o.scrollHeight-o.scrollTop-o.clientHeight<200&&a()};return f?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(S,{size:48,className:"text-destructive mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading files"}),s.jsx("p",{className:"text-muted-foreground text-center",children:f.message})]}):s.jsx("div",{className:"flex-1 overflow-y-auto p-4",onScroll:p,children:h?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[s.jsx(T,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading files..."})]}):l.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(Q,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"This folder is empty"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Upload files to get started"}),s.jsx("input",{ref:g,type:"file",multiple:!0,className:"hidden",onChange:j}),s.jsxs(E,{variant:"outline",onClick:()=>g.current?.click(),children:[s.jsx(Y,{size:14,className:"mr-1"}),"Upload files"]})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4",children:l.map(r=>s.jsx(oe,{item:r,onNavigate:t,onDownload:x,onDelete:o=>b.mutate([o])},r.key))}),u&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(T,{size:24,className:"animate-spin text-muted-foreground"})})]})})}export{we as default};
@@ -1 +1 @@
1
- import{c as f,v as y,j as s,d as A,r as C,B as $,bA as F,b as E,m as O,t as w}from"./index-CzFqQvXW.js";import{C as k}from"./card-BECXECFc.js";import{A as R}from"./avatar-DX9xarA9.js";import{i as D}from"./AlertCircle-Dvy3oHwl.js";import{i as H}from"./Check-BGWNBpXb.js";import{s as G}from"./Plus-C48LE9QF.js";import{i as Q}from"./SearchMd-Bec1mZCp.js";import{s as q}from"./XClose-D5oa0b17.js";import{I as B}from"./input-Rcf9et7W.js";import{C as T}from"./create-organization-dialog-BRKsH8XB.js";import"./alert-dialog-CHhoNaC0.js";import"./form-EW4LFI0z.js";import"./label-DdGHGWov.js";import"./spinner-BubUCjpb.js";import"./useMutation-DsQcwaJP.js";function U(t){const e=f.c(10),{children:n,className:l,onNavigate:i,showHoverRing:r}=t,d=r===void 0?!1:r;let o;e[0]!==i?(o=p=>{i&&i(p)},e[0]=i,e[1]=o):o=e[1];const m=o,x=i&&"cursor-pointer",a=d&&"hover:ring-2 hover:ring-primary";let c;e[2]!==l||e[3]!==x||e[4]!==a?(c=y("group transition-all flex flex-col gap-0",x,a,l),e[2]=l,e[3]=x,e[4]=a,e[5]=c):c=e[5];let g;return e[6]!==n||e[7]!==m||e[8]!==c?(g=s.jsx(k,{className:c,onClick:m,children:n}),e[6]=n,e[7]=m,e[8]=c,e[9]=g):g=e[9],g}function M(t){const e=f.c(7),{url:n,fallback:l,shape:i,size:r,objectFit:d,className:o}=t,m=i===void 0?"square":i,x=r===void 0?"lg":r,a=d===void 0?"contain":d;let c;return e[0]!==o||e[1]!==l||e[2]!==a||e[3]!==m||e[4]!==x||e[5]!==n?(c=s.jsx(R,{url:n,fallback:l,shape:m,size:x,objectFit:a,className:o}),e[0]=o,e[1]=l,e[2]=a,e[3]=m,e[4]=x,e[5]=n,e[6]=c):c=e[6],c}function P(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("p-4 flex flex-col gap-4",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function V(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("font-medium truncate",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("p",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function X(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("text-sm text-muted-foreground truncate",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("h3",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function Y(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex flex-col gap-[2px]",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function J(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex justify-between items-start",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function K(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("p-4 border-t border-border flex justify-between items-center",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function W(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex items-center text-xs text-muted-foreground",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function Z(){const t=f.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex justify-between items-start",children:s.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg animate-pulse"})}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[e,s.jsxs("div",{className:"flex flex-col gap-[2px]",children:[s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg animate-pulse"}),s.jsx("div",{className:"h-4 w-40 bg-muted rounded-lg animate-pulse"})]})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(k,{className:"group transition-colors flex flex-col",children:[n,s.jsxs("div",{className:"p-4 border-t border-border flex justify-between items-center",children:[s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]}),t[2]=l):l=t[2],l}const u=Object.assign(U,{Avatar:M,AvatarSection:J,Header:P,Title:V,Subtitle:X,Content:Y,Footer:K,Badge:W,Skeleton:Z}),ee={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8"},te={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8"},se={1:"@min-3xl:grid-cols-1",2:"@min-3xl:grid-cols-2",3:"@min-3xl:grid-cols-3",4:"@min-3xl:grid-cols-4",5:"@min-3xl:grid-cols-5",6:"@min-3xl:grid-cols-6",7:"@min-3xl:grid-cols-7",8:"@min-3xl:grid-cols-8"},ie={1:"@min-6xl:grid-cols-1",2:"@min-6xl:grid-cols-2",3:"@min-6xl:grid-cols-3",4:"@min-6xl:grid-cols-4",5:"@min-6xl:grid-cols-5",6:"@min-6xl:grid-cols-6",7:"@min-6xl:grid-cols-7",8:"@min-6xl:grid-cols-8"},le={1:"@min-7xl:grid-cols-1",2:"@min-7xl:grid-cols-2",3:"@min-7xl:grid-cols-3",4:"@min-7xl:grid-cols-4",5:"@min-7xl:grid-cols-5",6:"@min-7xl:grid-cols-6",7:"@min-7xl:grid-cols-7",8:"@min-7xl:grid-cols-8"},ne={1:"@min-8xl:grid-cols-1",2:"@min-8xl:grid-cols-2",3:"@min-8xl:grid-cols-3",4:"@min-8xl:grid-cols-4",5:"@min-8xl:grid-cols-5",6:"@min-8xl:grid-cols-6",7:"@min-8xl:grid-cols-7",8:"@min-8xl:grid-cols-8"};function L(t){const e=f.c(13),{children:n,columns:l,gap:i,className:r}=t;let d;e[0]!==l?(d=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=d):d=e[1];const o=d,x=ee[i===void 0?4:i],a=o.sm&&te[o.sm],c=o.md&&se[o.md],g=o.lg&&ie[o.lg],p=o.xl&&le[o.xl],v=o["2xl"]&&ne[o["2xl"]];let N;e[2]!==r||e[3]!==x||e[4]!==a||e[5]!==c||e[6]!==g||e[7]!==p||e[8]!==v?(N=y("w-full grid",x,a,c,g,p,v,r),e[2]=r,e[3]=x,e[4]=a,e[5]=c,e[6]=g,e[7]=p,e[8]=v,e[9]=N):N=e[9];const b=N;let h;return e[10]!==n||e[11]!==b?(h=s.jsx("div",{className:b,children:n}),e[10]=n,e[11]=b,e[12]=h):h=e[12],h}function re(t){const e=f.c(9),{count:n,columns:l,gap:i,className:r}=t,d=n===void 0?8:n;let o;e[0]!==l?(o=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=o):o=e[1];const m=o,x=i===void 0?4:i;let a;e[2]!==d?(a=Array.from({length:d}).map(ae),e[2]=d,e[3]=a):a=e[3];let c;return e[4]!==r||e[5]!==m||e[6]!==x||e[7]!==a?(c=s.jsx(L,{columns:m,gap:x,className:r,children:a}),e[4]=r,e[5]=m,e[6]=x,e[7]=a,e[8]=c):c=e[8],c}function ae(t,e){return s.jsxs("div",{className:"bg-card hover:bg-accent transition-colors flex flex-col rounded-lg animate-pulse",children:[s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[s.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg"}),s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"}),s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"})]}),s.jsxs("div",{className:"p-4 border-t border-border flex items-center",children:[s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]},e)}const _=Object.assign(L,{Skeleton:re});function oe({invitation:t}){const[e,n]=C.useState(!1),[l,i]=C.useState(!1),r=O(),d=E(),o=async()=>{n(!0);try{const a=await A.organization.acceptInvitation({invitationId:t.id});if(a.error)w.error(a.error.message),n(!1);else{const c=await A.organization.setActive({organizationId:t.organizationId});c?.data?.slug?(w.success("Invitation accepted!"),d({to:"/$org",params:{org:c.data.slug}})):(w.success("Invitation accepted! Redirecting..."),d({to:"/"}))}}catch{w.error("Failed to accept invitation"),n(!1)}},m=async()=>{i(!0);try{const a=await A.organization.rejectInvitation({invitationId:t.id});a.error?(w.error(a.error.message),i(!1)):(w.success("Invitation rejected"),await r.invalidateQueries(),i(!1))}catch{w.error("Failed to reject invitation"),i(!1)}},x=t.organizationName||t.organizationId;return s.jsxs(u,{className:"border-dashed",children:[s.jsxs(u.Header,{children:[s.jsx(u.AvatarSection,{children:s.jsx(u.Avatar,{url:"",fallback:x,size:"lg",objectFit:"contain"})}),s.jsxs(u.Content,{children:[s.jsx(u.Subtitle,{children:"You've been invited to join"}),s.jsx(u.Title,{children:x})]})]}),s.jsx(u.Footer,{className:"border-t border-dashed",children:s.jsxs("div",{className:"flex h-3.5 items-center gap-2 w-full",children:[s.jsx($,{onClick:o,disabled:e||l,className:"flex-1",size:"sm",children:e?"Accepting...":s.jsxs(s.Fragment,{children:[s.jsx(H,{size:16}),"Accept"]})}),s.jsx($,{variant:"outline",onClick:m,disabled:e||l,className:"flex-1",size:"sm",children:l?"Declining...":s.jsxs(s.Fragment,{children:[s.jsx(q,{size:16}),"Decline"]})})]})})]})}function ce({query:t}){const e=C.useContext(F),{data:n}=e.hooks.useListUserInvitations(),i=(n??[]).filter(d=>d.status==="pending"&&new Date(d.expiresAt)>new Date),r=t?(()=>{const d=t.toLowerCase();return i.filter(o=>o.organizationName?.toLowerCase().includes(d)||o.organizationId.toLowerCase().includes(d))})():i;return r.length===0?null:s.jsxs("div",{className:"mb-16",children:[s.jsx("h2",{className:"text-lg font-medium pb-2 border-b border-border/50 mb-6 px-2",children:"Invitations"}),s.jsx(_,{columns:{sm:2,md:3,lg:4},children:r.map(d=>s.jsx(oe,{invitation:d},d.id))})]})}function de(t){const e=f.c(14),{query:n}=t,{data:l}=A.useListOrganizations(),i=E();let r;e[0]!==l||e[1]!==n?(r=l?n?(()=>{const a=n.toLowerCase();return l.filter(c=>c.name.toLowerCase().includes(a)||c.slug.toLowerCase().includes(a))})():l:[],e[0]=l,e[1]=n,e[2]=r):r=e[2];const d=r;if(!l||l.length===0){let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"No organizations yet. Create your first organization to get started."})}),e[3]=a):a=e[3],a}if(d.length===0){let a;return e[4]!==n?(a=s.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:s.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:['No organizations found matching "',n,'".']})}),e[4]=n,e[5]=a):a=e[5],a}let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o={sm:2,md:3,lg:4},e[6]=o):o=e[6];let m;if(e[7]!==d||e[8]!==i){let a;e[10]!==i?(a=c=>s.jsxs(u,{onNavigate:()=>i({to:"/$org",params:{org:c.slug}}),children:[s.jsxs(u.Header,{children:[s.jsx(u.AvatarSection,{children:s.jsx(u.Avatar,{url:c.logo||"",fallback:c.name,size:"lg",objectFit:"contain"})}),s.jsxs(u.Content,{children:[s.jsxs(u.Subtitle,{children:["@",c.slug]}),s.jsx(u.Title,{children:c.name})]})]}),s.jsx(u.Footer,{children:s.jsxs("div",{className:"flex h-3.5 items-center text-xs text-muted-foreground",children:["Created:"," ",new Date(c.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})]})})]},c.id),e[10]=i,e[11]=a):a=e[11],m=d.map(a),e[7]=d,e[8]=i,e[9]=m}else m=e[9];let x;return e[12]!==m?(x=s.jsx(_,{columns:o,children:m}),e[12]=m,e[13]=x):x=e[13],x}function me(t){const e=f.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(D,{size:24,className:"text-destructive"}),e[0]=l):l=e[0];let i;return e[1]!==n.message?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:[l,s.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Error loading organizations: ",n.message]})]}),e[1]=n.message,e[2]=i):i=e[2],i}function xe(){const t=f.c(27),{error:e,isPending:n}=A.useListOrganizations(),[l,i]=C.useState(""),[r,d]=C.useState(!1),o=C.useDeferredValue(l);if(n){let j;return t[0]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"max-w-6xl mx-auto p-8",children:s.jsx("div",{className:"@container",children:s.jsx(_.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}})})}),t[0]=j):j=t[0],j}if(e){let j;return t[1]!==e?(j=s.jsx("div",{className:"max-w-6xl mx-auto p-8",children:s.jsx(me,{error:e})}),t[1]=e,t[2]=j):j=t[2],j}let m;t[3]!==o?(m=s.jsx(C.Suspense,{fallback:null,children:s.jsx(ce,{query:o})}),t[3]=o,t[4]=m):m=t[4];let x;t[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("h2",{className:"text-lg font-medium",children:"My organizations"}),t[5]=x):x=t[5];let a;t[6]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Q,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),t[6]=a):a=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=j=>i(j.target.value),t[7]=c):c=t[7];let g;t[8]!==l?(g=s.jsxs("div",{className:"relative",children:[a,s.jsx(B,{className:"pl-8 h-8 w-52 border-none shadow-none focus-visible:ring-0",placeholder:"Search organizations...",value:l,onChange:c})]}),t[8]=l,t[9]=g):g=t[9];let p;t[10]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs($,{size:"sm",onClick:()=>d(!0),children:[s.jsx(G,{size:16}),s.jsx("span",{children:"New organization"})]}),t[10]=p):p=t[10];let v;t[11]!==g?(v=s.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-border/50 mb-6 px-2",children:[x,s.jsxs("div",{className:"flex items-center gap-3",children:[g,p]})]}),t[11]=g,t[12]=v):v=t[12];let N;t[13]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(_.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}}),t[13]=N):N=t[13];let b;t[14]!==o?(b=s.jsx(C.Suspense,{fallback:N,children:s.jsx(de,{query:o})}),t[14]=o,t[15]=b):b=t[15];let h;t[16]!==v||t[17]!==b?(h=s.jsxs("div",{children:[v,b]}),t[16]=v,t[17]=b,t[18]=h):h=t[18];let S;t[19]!==m||t[20]!==h?(S=s.jsxs("div",{className:"@container",children:[m,h]}),t[19]=m,t[20]=h,t[21]=S):S=t[21];let z;t[22]!==r?(z=s.jsx(T,{open:r,onOpenChange:d}),t[22]=r,t[23]=z):z=t[23];let I;return t[24]!==S||t[25]!==z?(I=s.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[S,z]}),t[24]=S,t[25]=z,t[26]=I):I=t[26],I}function Ie(){const t=f.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-full",children:s.jsx(xe,{})}),t[0]=e):e=t[0],e}export{Ie as default};
1
+ import{c as f,v as y,j as s,d as A,r as C,B as $,bA as F,b as E,n as O,t as w}from"./index-DVHuYwO5.js";import{C as k}from"./card-yVoc5Dl_.js";import{A as R}from"./avatar-C0Za2Leb.js";import{i as D}from"./AlertCircle-DtdVhcv9.js";import{i as H}from"./Check-llxZXJNk.js";import{s as G}from"./Plus-2wrCLrAD.js";import{i as Q}from"./SearchMd-DOdaT51-.js";import{s as q}from"./XClose-CYrOe1GU.js";import{I as B}from"./input-CImrwNsE.js";import{C as T}from"./create-organization-dialog-DHmNDQVx.js";import"./alert-dialog-WtbKGn3h.js";import"./form-Bqy3P0kv.js";import"./label-BEcdY3zl.js";import"./spinner-B-yGP95y.js";import"./useMutation-BskhtN65.js";function U(t){const e=f.c(10),{children:n,className:l,onNavigate:i,showHoverRing:r}=t,d=r===void 0?!1:r;let o;e[0]!==i?(o=p=>{i&&i(p)},e[0]=i,e[1]=o):o=e[1];const m=o,x=i&&"cursor-pointer",a=d&&"hover:ring-2 hover:ring-primary";let c;e[2]!==l||e[3]!==x||e[4]!==a?(c=y("group transition-all flex flex-col gap-0",x,a,l),e[2]=l,e[3]=x,e[4]=a,e[5]=c):c=e[5];let g;return e[6]!==n||e[7]!==m||e[8]!==c?(g=s.jsx(k,{className:c,onClick:m,children:n}),e[6]=n,e[7]=m,e[8]=c,e[9]=g):g=e[9],g}function M(t){const e=f.c(7),{url:n,fallback:l,shape:i,size:r,objectFit:d,className:o}=t,m=i===void 0?"square":i,x=r===void 0?"lg":r,a=d===void 0?"contain":d;let c;return e[0]!==o||e[1]!==l||e[2]!==a||e[3]!==m||e[4]!==x||e[5]!==n?(c=s.jsx(R,{url:n,fallback:l,shape:m,size:x,objectFit:a,className:o}),e[0]=o,e[1]=l,e[2]=a,e[3]=m,e[4]=x,e[5]=n,e[6]=c):c=e[6],c}function P(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("p-4 flex flex-col gap-4",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function V(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("font-medium truncate",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("p",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function X(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("text-sm text-muted-foreground truncate",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("h3",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function Y(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex flex-col gap-[2px]",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function J(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex justify-between items-start",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function K(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("p-4 border-t border-border flex justify-between items-center",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function W(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex items-center text-xs text-muted-foreground",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function Z(){const t=f.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex justify-between items-start",children:s.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg animate-pulse"})}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[e,s.jsxs("div",{className:"flex flex-col gap-[2px]",children:[s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg animate-pulse"}),s.jsx("div",{className:"h-4 w-40 bg-muted rounded-lg animate-pulse"})]})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(k,{className:"group transition-colors flex flex-col",children:[n,s.jsxs("div",{className:"p-4 border-t border-border flex justify-between items-center",children:[s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]}),t[2]=l):l=t[2],l}const u=Object.assign(U,{Avatar:M,AvatarSection:J,Header:P,Title:V,Subtitle:X,Content:Y,Footer:K,Badge:W,Skeleton:Z}),ee={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8"},te={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8"},se={1:"@min-3xl:grid-cols-1",2:"@min-3xl:grid-cols-2",3:"@min-3xl:grid-cols-3",4:"@min-3xl:grid-cols-4",5:"@min-3xl:grid-cols-5",6:"@min-3xl:grid-cols-6",7:"@min-3xl:grid-cols-7",8:"@min-3xl:grid-cols-8"},ie={1:"@min-6xl:grid-cols-1",2:"@min-6xl:grid-cols-2",3:"@min-6xl:grid-cols-3",4:"@min-6xl:grid-cols-4",5:"@min-6xl:grid-cols-5",6:"@min-6xl:grid-cols-6",7:"@min-6xl:grid-cols-7",8:"@min-6xl:grid-cols-8"},le={1:"@min-7xl:grid-cols-1",2:"@min-7xl:grid-cols-2",3:"@min-7xl:grid-cols-3",4:"@min-7xl:grid-cols-4",5:"@min-7xl:grid-cols-5",6:"@min-7xl:grid-cols-6",7:"@min-7xl:grid-cols-7",8:"@min-7xl:grid-cols-8"},ne={1:"@min-8xl:grid-cols-1",2:"@min-8xl:grid-cols-2",3:"@min-8xl:grid-cols-3",4:"@min-8xl:grid-cols-4",5:"@min-8xl:grid-cols-5",6:"@min-8xl:grid-cols-6",7:"@min-8xl:grid-cols-7",8:"@min-8xl:grid-cols-8"};function L(t){const e=f.c(13),{children:n,columns:l,gap:i,className:r}=t;let d;e[0]!==l?(d=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=d):d=e[1];const o=d,x=ee[i===void 0?4:i],a=o.sm&&te[o.sm],c=o.md&&se[o.md],g=o.lg&&ie[o.lg],p=o.xl&&le[o.xl],v=o["2xl"]&&ne[o["2xl"]];let N;e[2]!==r||e[3]!==x||e[4]!==a||e[5]!==c||e[6]!==g||e[7]!==p||e[8]!==v?(N=y("w-full grid",x,a,c,g,p,v,r),e[2]=r,e[3]=x,e[4]=a,e[5]=c,e[6]=g,e[7]=p,e[8]=v,e[9]=N):N=e[9];const b=N;let h;return e[10]!==n||e[11]!==b?(h=s.jsx("div",{className:b,children:n}),e[10]=n,e[11]=b,e[12]=h):h=e[12],h}function re(t){const e=f.c(9),{count:n,columns:l,gap:i,className:r}=t,d=n===void 0?8:n;let o;e[0]!==l?(o=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=o):o=e[1];const m=o,x=i===void 0?4:i;let a;e[2]!==d?(a=Array.from({length:d}).map(ae),e[2]=d,e[3]=a):a=e[3];let c;return e[4]!==r||e[5]!==m||e[6]!==x||e[7]!==a?(c=s.jsx(L,{columns:m,gap:x,className:r,children:a}),e[4]=r,e[5]=m,e[6]=x,e[7]=a,e[8]=c):c=e[8],c}function ae(t,e){return s.jsxs("div",{className:"bg-card hover:bg-accent transition-colors flex flex-col rounded-lg animate-pulse",children:[s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[s.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg"}),s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"}),s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"})]}),s.jsxs("div",{className:"p-4 border-t border-border flex items-center",children:[s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]},e)}const _=Object.assign(L,{Skeleton:re});function oe({invitation:t}){const[e,n]=C.useState(!1),[l,i]=C.useState(!1),r=O(),d=E(),o=async()=>{n(!0);try{const a=await A.organization.acceptInvitation({invitationId:t.id});if(a.error)w.error(a.error.message),n(!1);else{const c=await A.organization.setActive({organizationId:t.organizationId});c?.data?.slug?(w.success("Invitation accepted!"),d({to:"/$org",params:{org:c.data.slug}})):(w.success("Invitation accepted! Redirecting..."),d({to:"/"}))}}catch{w.error("Failed to accept invitation"),n(!1)}},m=async()=>{i(!0);try{const a=await A.organization.rejectInvitation({invitationId:t.id});a.error?(w.error(a.error.message),i(!1)):(w.success("Invitation rejected"),await r.invalidateQueries(),i(!1))}catch{w.error("Failed to reject invitation"),i(!1)}},x=t.organizationName||t.organizationId;return s.jsxs(u,{className:"border-dashed",children:[s.jsxs(u.Header,{children:[s.jsx(u.AvatarSection,{children:s.jsx(u.Avatar,{url:"",fallback:x,size:"lg",objectFit:"contain"})}),s.jsxs(u.Content,{children:[s.jsx(u.Subtitle,{children:"You've been invited to join"}),s.jsx(u.Title,{children:x})]})]}),s.jsx(u.Footer,{className:"border-t border-dashed",children:s.jsxs("div",{className:"flex h-3.5 items-center gap-2 w-full",children:[s.jsx($,{onClick:o,disabled:e||l,className:"flex-1",size:"sm",children:e?"Accepting...":s.jsxs(s.Fragment,{children:[s.jsx(H,{size:16}),"Accept"]})}),s.jsx($,{variant:"outline",onClick:m,disabled:e||l,className:"flex-1",size:"sm",children:l?"Declining...":s.jsxs(s.Fragment,{children:[s.jsx(q,{size:16}),"Decline"]})})]})})]})}function ce({query:t}){const e=C.useContext(F),{data:n}=e.hooks.useListUserInvitations(),i=(n??[]).filter(d=>d.status==="pending"&&new Date(d.expiresAt)>new Date),r=t?(()=>{const d=t.toLowerCase();return i.filter(o=>o.organizationName?.toLowerCase().includes(d)||o.organizationId.toLowerCase().includes(d))})():i;return r.length===0?null:s.jsxs("div",{className:"mb-16",children:[s.jsx("h2",{className:"text-lg font-medium pb-2 border-b border-border/50 mb-6 px-2",children:"Invitations"}),s.jsx(_,{columns:{sm:2,md:3,lg:4},children:r.map(d=>s.jsx(oe,{invitation:d},d.id))})]})}function de(t){const e=f.c(14),{query:n}=t,{data:l}=A.useListOrganizations(),i=E();let r;e[0]!==l||e[1]!==n?(r=l?n?(()=>{const a=n.toLowerCase();return l.filter(c=>c.name.toLowerCase().includes(a)||c.slug.toLowerCase().includes(a))})():l:[],e[0]=l,e[1]=n,e[2]=r):r=e[2];const d=r;if(!l||l.length===0){let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"No organizations yet. Create your first organization to get started."})}),e[3]=a):a=e[3],a}if(d.length===0){let a;return e[4]!==n?(a=s.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:s.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:['No organizations found matching "',n,'".']})}),e[4]=n,e[5]=a):a=e[5],a}let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o={sm:2,md:3,lg:4},e[6]=o):o=e[6];let m;if(e[7]!==d||e[8]!==i){let a;e[10]!==i?(a=c=>s.jsxs(u,{onNavigate:()=>i({to:"/$org",params:{org:c.slug}}),children:[s.jsxs(u.Header,{children:[s.jsx(u.AvatarSection,{children:s.jsx(u.Avatar,{url:c.logo||"",fallback:c.name,size:"lg",objectFit:"contain"})}),s.jsxs(u.Content,{children:[s.jsxs(u.Subtitle,{children:["@",c.slug]}),s.jsx(u.Title,{children:c.name})]})]}),s.jsx(u.Footer,{children:s.jsxs("div",{className:"flex h-3.5 items-center text-xs text-muted-foreground",children:["Created:"," ",new Date(c.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})]})})]},c.id),e[10]=i,e[11]=a):a=e[11],m=d.map(a),e[7]=d,e[8]=i,e[9]=m}else m=e[9];let x;return e[12]!==m?(x=s.jsx(_,{columns:o,children:m}),e[12]=m,e[13]=x):x=e[13],x}function me(t){const e=f.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(D,{size:24,className:"text-destructive"}),e[0]=l):l=e[0];let i;return e[1]!==n.message?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:[l,s.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Error loading organizations: ",n.message]})]}),e[1]=n.message,e[2]=i):i=e[2],i}function xe(){const t=f.c(27),{error:e,isPending:n}=A.useListOrganizations(),[l,i]=C.useState(""),[r,d]=C.useState(!1),o=C.useDeferredValue(l);if(n){let j;return t[0]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"max-w-6xl mx-auto p-8",children:s.jsx("div",{className:"@container",children:s.jsx(_.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}})})}),t[0]=j):j=t[0],j}if(e){let j;return t[1]!==e?(j=s.jsx("div",{className:"max-w-6xl mx-auto p-8",children:s.jsx(me,{error:e})}),t[1]=e,t[2]=j):j=t[2],j}let m;t[3]!==o?(m=s.jsx(C.Suspense,{fallback:null,children:s.jsx(ce,{query:o})}),t[3]=o,t[4]=m):m=t[4];let x;t[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("h2",{className:"text-lg font-medium",children:"My organizations"}),t[5]=x):x=t[5];let a;t[6]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Q,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),t[6]=a):a=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=j=>i(j.target.value),t[7]=c):c=t[7];let g;t[8]!==l?(g=s.jsxs("div",{className:"relative",children:[a,s.jsx(B,{className:"pl-8 h-8 w-52 border-none shadow-none focus-visible:ring-0",placeholder:"Search organizations...",value:l,onChange:c})]}),t[8]=l,t[9]=g):g=t[9];let p;t[10]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs($,{size:"sm",onClick:()=>d(!0),children:[s.jsx(G,{size:16}),s.jsx("span",{children:"New organization"})]}),t[10]=p):p=t[10];let v;t[11]!==g?(v=s.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-border/50 mb-6 px-2",children:[x,s.jsxs("div",{className:"flex items-center gap-3",children:[g,p]})]}),t[11]=g,t[12]=v):v=t[12];let N;t[13]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(_.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}}),t[13]=N):N=t[13];let b;t[14]!==o?(b=s.jsx(C.Suspense,{fallback:N,children:s.jsx(de,{query:o})}),t[14]=o,t[15]=b):b=t[15];let h;t[16]!==v||t[17]!==b?(h=s.jsxs("div",{children:[v,b]}),t[16]=v,t[17]=b,t[18]=h):h=t[18];let S;t[19]!==m||t[20]!==h?(S=s.jsxs("div",{className:"@container",children:[m,h]}),t[19]=m,t[20]=h,t[21]=S):S=t[21];let z;t[22]!==r?(z=s.jsx(T,{open:r,onOpenChange:d}),t[22]=r,t[23]=z):z=t[23];let I;return t[24]!==S||t[25]!==z?(I=s.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[S,z]}),t[24]=S,t[25]=z,t[26]=I):I=t[26],I}function Ie(){const t=f.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-full",children:s.jsx(xe,{})}),t[0]=e):e=t[0],e}export{Ie as default};
@@ -1 +1 @@
1
- import{r as s,D as L,G as B,j as d,R as T,H as y,I,J as U,M as E,Q as _,T as q,U as w,W as K,X as V}from"./index-CzFqQvXW.js";var b="Radio",[H,P]=w(b),[z,W]=H(b),k=s.forwardRef((t,c)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:a,value:l="on",onCheck:f,form:R,...v}=t,[p,m]=s.useState(null),i=I(c,x=>m(x)),u=s.useRef(!1),h=p?R||!!p.closest("form"):!0;return d.jsxs(z,{scope:o,checked:e,disabled:a,children:[d.jsx(y.button,{type:"button",role:"radio","aria-checked":e,"data-state":A(e),"data-disabled":a?"":void 0,disabled:a,value:l,...v,ref:i,onClick:E(t.onClick,x=>{e||f?.(),h&&(u.current=x.isPropagationStopped(),u.current||x.stopPropagation())})}),h&&d.jsx(S,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:a,form:R,style:{transform:"translateX(-100%)"}})]})});k.displayName=b;var G="RadioIndicator",g=s.forwardRef((t,c)=>{const{__scopeRadio:o,forceMount:n,...e}=t,r=W(G,o);return d.jsx(q,{present:n||r.checked,children:d.jsx(y.span,{"data-state":A(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:c})})});g.displayName=G;var X="RadioBubbleInput",S=s.forwardRef(({__scopeRadio:t,control:c,checked:o,bubbles:n=!0,...e},r)=>{const a=s.useRef(null),l=I(a,r),f=K(o),R=V(c);return s.useEffect(()=>{const v=a.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),d.jsx(y.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});S.displayName=X;function A(t){return t?"checked":"unchecked"}var J=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],C="RadioGroup",[Q]=w(C,[_,P]),j=_(),N=P(),[Y,Z]=Q(C),D=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:a=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=t,i=j(o),u=L(R),[h,x]=B({prop:r,defaultProp:e??null,onChange:p,caller:C});return d.jsx(Y,{scope:o,name:n,required:a,disabled:l,value:h,onValueChange:x,children:d.jsx(T,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:d.jsx(y.div,{role:"radiogroup","aria-required":a,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:c})})})});D.displayName=C;var M="RadioGroupItem",O=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,disabled:n,...e}=t,r=Z(M,o),a=r.disabled||n,l=j(o),f=N(o),R=s.useRef(null),v=I(c,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=h=>{J.includes(h.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),d.jsx(U,{asChild:!0,...l,focusable:!a,active:p,children:d.jsx(k,{disabled:a,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:E(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:E(e.onFocus,()=>{m.current&&R.current?.click()})})})});O.displayName=M;var $="RadioGroupIndicator",F=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,...n}=t,e=N(o);return d.jsx(g,{...e,...n,ref:c})});F.displayName=$;var oe=D,re=O,te=F;export{re as I,oe as R,te as a};
1
+ import{r as s,D as L,G as B,j as d,R as T,H as y,I,J as U,M as E,Q as _,T as q,U as w,W as K,X as V}from"./index-DVHuYwO5.js";var b="Radio",[H,P]=w(b),[z,W]=H(b),k=s.forwardRef((t,c)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:a,value:l="on",onCheck:f,form:R,...v}=t,[p,m]=s.useState(null),i=I(c,x=>m(x)),u=s.useRef(!1),h=p?R||!!p.closest("form"):!0;return d.jsxs(z,{scope:o,checked:e,disabled:a,children:[d.jsx(y.button,{type:"button",role:"radio","aria-checked":e,"data-state":A(e),"data-disabled":a?"":void 0,disabled:a,value:l,...v,ref:i,onClick:E(t.onClick,x=>{e||f?.(),h&&(u.current=x.isPropagationStopped(),u.current||x.stopPropagation())})}),h&&d.jsx(S,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:a,form:R,style:{transform:"translateX(-100%)"}})]})});k.displayName=b;var G="RadioIndicator",g=s.forwardRef((t,c)=>{const{__scopeRadio:o,forceMount:n,...e}=t,r=W(G,o);return d.jsx(q,{present:n||r.checked,children:d.jsx(y.span,{"data-state":A(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:c})})});g.displayName=G;var X="RadioBubbleInput",S=s.forwardRef(({__scopeRadio:t,control:c,checked:o,bubbles:n=!0,...e},r)=>{const a=s.useRef(null),l=I(a,r),f=K(o),R=V(c);return s.useEffect(()=>{const v=a.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),d.jsx(y.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});S.displayName=X;function A(t){return t?"checked":"unchecked"}var J=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],C="RadioGroup",[Q]=w(C,[_,P]),j=_(),N=P(),[Y,Z]=Q(C),D=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:a=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=t,i=j(o),u=L(R),[h,x]=B({prop:r,defaultProp:e??null,onChange:p,caller:C});return d.jsx(Y,{scope:o,name:n,required:a,disabled:l,value:h,onValueChange:x,children:d.jsx(T,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:d.jsx(y.div,{role:"radiogroup","aria-required":a,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:c})})})});D.displayName=C;var M="RadioGroupItem",O=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,disabled:n,...e}=t,r=Z(M,o),a=r.disabled||n,l=j(o),f=N(o),R=s.useRef(null),v=I(c,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=h=>{J.includes(h.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),d.jsx(U,{asChild:!0,...l,focusable:!a,active:p,children:d.jsx(k,{disabled:a,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:E(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:E(e.onFocus,()=>{m.current&&R.current?.click()})})})});O.displayName=M;var $="RadioGroupIndicator",F=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,...n}=t,e=N(o);return d.jsx(g,{...e,...n,ref:c})});F.displayName=$;var oe=D,re=O,te=F;export{re as I,oe as R,te as a};
@@ -1 +1 @@
1
- import{r as b,c as u,v as g,j as n,e as $,aC as T,B as _}from"./index-CzFqQvXW.js";import{u as w,L as S}from"./localstorage-keys-DtK7peUq.js";import{a as k,b as O,T as R}from"./tooltip-BGn6dJhi.js";const v=({size:t=24,color:e="currentColor",...l})=>b.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},b.createElement("path",{d:"M8 9.5h4M8 13h7m-3 8a9 9 0 1 0-8.342-5.616c.081.2.122.3.14.381a.907.907 0 0 1 .024.219c0 .083-.015.173-.045.353l-.593 3.558c-.062.373-.093.56-.035.694a.5.5 0 0 0 .262.262c.135.058.321.027.694-.035l3.558-.593c.18-.03.27-.045.353-.045.081 0 .14.006.219.024.08.018.18.059.38.14A8.973 8.973 0 0 0 12 21Z"}));v.displayName="MessageTextCircle02";function y(){const t=u.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=S.decoChatOpen(),t[0]=e):e=t[0];const[l,o]=w(e,E);let s;return t[1]!==l||t[2]!==o?(s=[l,o],t[1]=l,t[2]=o,t[3]=s):s=t[3],s}function E(t){return!!(t??!0)}function j(t,e){const l=b.Children.toArray(t);for(const o of l)if(b.isValidElement(o)&&o.type===e)return o;return null}function L(){const t=u.c(12),[e,l]=y();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},t[0]=o):o=t[0];const{org:s,project:r}=$(o),{location:h}=T();if(h.pathname===`/${s}/${r}`||h.pathname===`/${s}/${r}/`)return null;const m=e&&"bg-accent text-foreground";let i;t[1]!==m?(i=g("h-7 px-2 gap-1.5 text-xs font-medium text-muted-foreground hover:text-foreground",m),t[1]=m,t[2]=i):i=t[2];let a;t[3]!==l?(a=()=>l(P),t[3]=l,t[4]=a):a=t[4];let f;t[5]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(v,{size:14,className:"text-inherit"}),t[5]=f):f=t[5];let c;t[6]!==i||t[7]!==a?(c=n.jsx(k,{asChild:!0,children:n.jsxs(_,{variant:"ghost",className:i,onClick:a,"aria-label":"Toggle Decopilot",children:[f,"Chat"]})}),t[6]=i,t[7]=a,t[8]=c):c=t[8];let d;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(O,{side:"bottom",children:"Toggle Decopilot"}),t[9]=d):d=t[9];let p;return t[10]!==c?(p=n.jsxs(R,{children:[c,d]}),t[10]=c,t[11]=p):p=t[11],p}function P(t){return!t}function H(t){const e=u.c(5),{children:l,className:o}=t;let s;e[0]!==o?(s=g("flex flex-col h-full bg-background overflow-hidden",o),e[0]=o,e[1]=s):s=e[1];let r;return e[2]!==l||e[3]!==s?(r=n.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=r):r=e[4],r}function B(t){const e=u.c(17),{children:l,className:o,hideSidebarTrigger:s}=t;let r;e[0]!==l?(r=j(l,C),e[0]=l,e[1]=r):r=e[1];const h=r;let x;e[2]!==l?(x=j(l,N),e[2]=l,e[3]=x):x=e[3];const m=x;let i;e[4]!==o?(i=g("shrink-0 w-full border-b border-border/50 h-11 overflow-x-auto","flex items-center justify-between gap-3 pr-2 pl-4 min-w-max",o),e[4]=o,e[5]=i):i=e[5];let a;e[6]!==h?(a=n.jsx("div",{className:"flex items-center gap-1",children:h}),e[6]=h,e[7]=a):a=e[7];let f;e[8]!==s?(f=!s&&n.jsx("div",{className:"flex items-center border-l border-border/50 pl-2 ml-1",children:n.jsx(L,{})}),e[8]=s,e[9]=f):f=e[9];let c;e[10]!==m||e[11]!==f?(c=n.jsxs("div",{className:"flex items-center",children:[m,f]}),e[10]=m,e[11]=f,e[12]=c):c=e[12];let d;return e[13]!==i||e[14]!==a||e[15]!==c?(d=n.jsxs("div",{className:i,children:[a,c]}),e[13]=i,e[14]=a,e[15]=c,e[16]=d):d=e[16],d}function C(t){const e=u.c(5),{children:l,className:o}=t;let s;e[0]!==o?(s=g("flex items-center gap-2 shrink-0 overflow-hidden",o),e[0]=o,e[1]=s):s=e[1];let r;return e[2]!==l||e[3]!==s?(r=n.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=r):r=e[4],r}function N(t){const e=u.c(5),{children:l,className:o}=t;let s;e[0]!==o?(s=g("flex items-center gap-2 shrink-0 overflow-hidden border-l border-border pl-3",o),e[0]=o,e[1]=s):s=e[1];let r;return e[2]!==l||e[3]!==s?(r=n.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=r):r=e[4],r}function A(t){const e=u.c(5),{children:l,className:o}=t;let s;e[0]!==o?(s=g("flex-1 overflow-auto",o),e[0]=o,e[1]=s):s=e[1];let r;return e[2]!==l||e[3]!==s?(r=n.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=r):r=e[4],r}const G=Object.assign(H,{Header:Object.assign(B,{Left:C,Right:N}),Content:A});export{G as P,y as u};
1
+ import{r as b,c as u,v as g,j as n,e as $,aC as T,B as _}from"./index-DVHuYwO5.js";import{u as w,L as S}from"./localstorage-keys-B3yhvN27.js";import{a as k,b as O,T as R}from"./tooltip-BsUirxUt.js";const v=({size:t=24,color:e="currentColor",...l})=>b.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},b.createElement("path",{d:"M8 9.5h4M8 13h7m-3 8a9 9 0 1 0-8.342-5.616c.081.2.122.3.14.381a.907.907 0 0 1 .024.219c0 .083-.015.173-.045.353l-.593 3.558c-.062.373-.093.56-.035.694a.5.5 0 0 0 .262.262c.135.058.321.027.694-.035l3.558-.593c.18-.03.27-.045.353-.045.081 0 .14.006.219.024.08.018.18.059.38.14A8.973 8.973 0 0 0 12 21Z"}));v.displayName="MessageTextCircle02";function y(){const t=u.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=S.decoChatOpen(),t[0]=e):e=t[0];const[l,o]=w(e,E);let s;return t[1]!==l||t[2]!==o?(s=[l,o],t[1]=l,t[2]=o,t[3]=s):s=t[3],s}function E(t){return!!(t??!0)}function j(t,e){const l=b.Children.toArray(t);for(const o of l)if(b.isValidElement(o)&&o.type===e)return o;return null}function L(){const t=u.c(12),[e,l]=y();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},t[0]=o):o=t[0];const{org:s,project:r}=$(o),{location:h}=T();if(h.pathname===`/${s}/${r}`||h.pathname===`/${s}/${r}/`)return null;const m=e&&"bg-accent text-foreground";let i;t[1]!==m?(i=g("h-7 px-2 gap-1.5 text-xs font-medium text-muted-foreground hover:text-foreground",m),t[1]=m,t[2]=i):i=t[2];let a;t[3]!==l?(a=()=>l(P),t[3]=l,t[4]=a):a=t[4];let f;t[5]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(v,{size:14,className:"text-inherit"}),t[5]=f):f=t[5];let c;t[6]!==i||t[7]!==a?(c=n.jsx(k,{asChild:!0,children:n.jsxs(_,{variant:"ghost",className:i,onClick:a,"aria-label":"Toggle Decopilot",children:[f,"Chat"]})}),t[6]=i,t[7]=a,t[8]=c):c=t[8];let d;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(O,{side:"bottom",children:"Toggle Decopilot"}),t[9]=d):d=t[9];let p;return t[10]!==c?(p=n.jsxs(R,{children:[c,d]}),t[10]=c,t[11]=p):p=t[11],p}function P(t){return!t}function H(t){const e=u.c(5),{children:l,className:o}=t;let s;e[0]!==o?(s=g("flex flex-col h-full bg-background overflow-hidden",o),e[0]=o,e[1]=s):s=e[1];let r;return e[2]!==l||e[3]!==s?(r=n.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=r):r=e[4],r}function B(t){const e=u.c(17),{children:l,className:o,hideSidebarTrigger:s}=t;let r;e[0]!==l?(r=j(l,C),e[0]=l,e[1]=r):r=e[1];const h=r;let x;e[2]!==l?(x=j(l,N),e[2]=l,e[3]=x):x=e[3];const m=x;let i;e[4]!==o?(i=g("shrink-0 w-full border-b border-border/50 h-11 overflow-x-auto","flex items-center justify-between gap-3 pr-2 pl-4 min-w-max",o),e[4]=o,e[5]=i):i=e[5];let a;e[6]!==h?(a=n.jsx("div",{className:"flex items-center gap-1",children:h}),e[6]=h,e[7]=a):a=e[7];let f;e[8]!==s?(f=!s&&n.jsx("div",{className:"flex items-center border-l border-border/50 pl-2 ml-1",children:n.jsx(L,{})}),e[8]=s,e[9]=f):f=e[9];let c;e[10]!==m||e[11]!==f?(c=n.jsxs("div",{className:"flex items-center",children:[m,f]}),e[10]=m,e[11]=f,e[12]=c):c=e[12];let d;return e[13]!==i||e[14]!==a||e[15]!==c?(d=n.jsxs("div",{className:i,children:[a,c]}),e[13]=i,e[14]=a,e[15]=c,e[16]=d):d=e[16],d}function C(t){const e=u.c(5),{children:l,className:o}=t;let s;e[0]!==o?(s=g("flex items-center gap-2 shrink-0 overflow-hidden",o),e[0]=o,e[1]=s):s=e[1];let r;return e[2]!==l||e[3]!==s?(r=n.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=r):r=e[4],r}function N(t){const e=u.c(5),{children:l,className:o}=t;let s;e[0]!==o?(s=g("flex items-center gap-2 shrink-0 overflow-hidden border-l border-border pl-3",o),e[0]=o,e[1]=s):s=e[1];let r;return e[2]!==l||e[3]!==s?(r=n.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=r):r=e[4],r}function A(t){const e=u.c(5),{children:l,className:o}=t;let s;e[0]!==o?(s=g("flex-1 overflow-auto",o),e[0]=o,e[1]=s):s=e[1];let r;return e[2]!==l||e[3]!==s?(r=n.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=r):r=e[4],r}const G=Object.assign(H,{Header:Object.assign(B,{Left:C,Right:N}),Content:A});export{G as P,y as u};