decocms 3.27.2 → 3.27.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/dist/client/assets/{AlertCircle-auy87G7t.js → AlertCircle-BTsannAB.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-DpDpyi30.js → ArrowUpRight-DtMpnmAC.js} +1 -1
  3. package/dist/client/assets/{Check-y8-QJq4u.js → Check-Dw5D9iXJ.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-BYcwlC0U.js → CheckCircle-Bho6B2to.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-Lk04U11C.js → ChevronDown-CWdX7_sm.js} +1 -1
  6. package/dist/client/assets/{ChevronLeft-D81UGTDc.js → ChevronLeft-ordKzex8.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-FIXGFOh_.js → ChevronRight-tUvvDqzz.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-C7bkcEQO.js → ChevronUp-CVZqh7eX.js} +1 -1
  9. package/dist/client/assets/{Container-BlrXU0Bi.js → Container-CESuzynk.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-UOMzmPdL.js → DotsVertical-BNgAjlpf.js} +1 -1
  11. package/dist/client/assets/{Eye-kDqLeKP_.js → Eye-CpCOO2EF.js} +1 -1
  12. package/dist/client/assets/{FilterLines-CqmkGI7L.js → FilterLines-sUNPJnxX.js} +1 -1
  13. package/dist/client/assets/{Globe01-CNKKD7pf.js → Globe01-CP5QNSRl.js} +1 -1
  14. package/dist/client/assets/{HardDrive-B2W-LGcr.js → HardDrive-BP6zv7bm.js} +1 -1
  15. package/dist/client/assets/{Key01-CPGjX6ze.js → Key01-CFH6lkz0.js} +1 -1
  16. package/dist/client/assets/{LayoutLeft-Cfg3KzYI.js → LayoutLeft-Dr3sGtrV.js} +1 -1
  17. package/dist/client/assets/{LinkExternal01-JnL7f_3-.js → LinkExternal01-BHt-Icgs.js} +1 -1
  18. package/dist/client/assets/{Monitor01-CojPdFxr.js → Monitor01-B4axAVMt.js} +1 -1
  19. package/dist/client/assets/{Palette-Bfo0khbj.js → Palette-BSSJKY8F.js} +1 -1
  20. package/dist/client/assets/{Play-9FnwPpbN.js → Play-CWwVT1ep.js} +1 -1
  21. package/dist/client/assets/{Plus-9-S3JWy-.js → Plus-D6ZVo7op.js} +1 -1
  22. package/dist/client/assets/{RefreshCcw01-Cs11KofH.js → RefreshCcw01-DgaWok1L.js} +1 -1
  23. package/dist/client/assets/{SearchMd-TA_AwzOv.js → SearchMd-CWML-MzT.js} +1 -1
  24. package/dist/client/assets/{Settings02-D5CpeXEI.js → Settings02-DnBIVw0J.js} +1 -1
  25. package/dist/client/assets/{Shield01-mBum1vLW.js → Shield01-CDyxjwN4.js} +1 -1
  26. package/dist/client/assets/{Star01-BhlevD6s.js → Star01-B7S_p3mf.js} +1 -1
  27. package/dist/client/assets/{Stars01-BeIDe7kj.js → Stars01-BigO76ki.js} +1 -1
  28. package/dist/client/assets/{Stars02-BzXmCUAc.js → Stars02-CNXKv81Q.js} +1 -1
  29. package/dist/client/assets/{Sun-oR2lZC_s.js → Sun-Cxxu7rF-.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-BMMM3TLo.js → SwitchHorizontal01-BJpif5Ll.js} +1 -1
  31. package/dist/client/assets/{Tool01-q5zFAXoC.js → Tool01-Dt1EhG_-.js} +1 -1
  32. package/dist/client/assets/{Trash01-Dh2vBIHv.js → Trash01-DU9k1Vtq.js} +1 -1
  33. package/dist/client/assets/{Upload01-BphfbeV8.js → Upload01-D-DASWOL.js} +1 -1
  34. package/dist/client/assets/{User01-C4XoUCJZ.js → User01-BUWoWpIi.js} +1 -1
  35. package/dist/client/assets/{Users01-C1J185Ov.js → Users01-CuU4FaYD.js} +1 -1
  36. package/dist/client/assets/{Users03-Db-xts3h.js → Users03-DNzqxyDz.js} +1 -1
  37. package/dist/client/assets/{X-Cur7ndLC.js → X-Bin-Wtwp.js} +1 -1
  38. package/dist/client/assets/{XCircle-CuAI3oge.js → XCircle-BOhKS6lm.js} +1 -1
  39. package/dist/client/assets/{XClose-vL81XCVl.js → XClose-6z0C_oDP.js} +1 -1
  40. package/dist/client/assets/{Zap-DbdE3aVD.js → Zap-D4FMWUsp.js} +1 -1
  41. package/dist/client/assets/{ZapSquare-DFzaHd62.js → ZapSquare-DO6_8wah.js} +1 -1
  42. package/dist/client/assets/{ZoomOut-CJIm6fwO.js → ZoomOut-CiH8kMDs.js} +1 -1
  43. package/dist/client/assets/{access-gate-DB8PItXV.js → access-gate-C8Ywr7l3.js} +1 -1
  44. package/dist/client/assets/{accordion-l0CMMeqZ.js → accordion-DnDUtyjB.js} +1 -1
  45. package/dist/client/assets/{add-section-modal-BnakZS1R.js → add-section-modal-BDGiAraf.js} +1 -1
  46. package/dist/client/assets/{agent-capabilities-DvcRdwPw.js → agent-capabilities-DY7PlL1Y.js} +1 -1
  47. package/dist/client/assets/{agent-icon-ZS7Hvows.js → agent-icon-osOe3Xke.js} +1 -1
  48. package/dist/client/assets/{agent-icons-BEBrceqV.js → agent-icons-DnwBS7UO.js} +1 -1
  49. package/dist/client/assets/{agents-list-DeRgtYqV.js → agents-list-BP_4F2HO.js} +1 -1
  50. package/dist/client/assets/{ai-providers-Bmm3bYhs.js → ai-providers-Bxp5C4xh.js} +1 -1
  51. package/dist/client/assets/{alert-CmVacOQH.js → alert-CW3jDgPm.js} +1 -1
  52. package/dist/client/assets/{alert-dialog-B4nGpuqy.js → alert-dialog-BMks46p7.js} +1 -1
  53. package/dist/client/assets/app-editor-BATEJr9f.js +1 -0
  54. package/dist/client/assets/{auth-catchall-CBKNvo-B.js → auth-catchall-CM-p6wBC.js} +1 -1
  55. package/dist/client/assets/{auth-split-layout-C1_0o1Py.js → auth-split-layout-RlJ5glwr.js} +1 -1
  56. package/dist/client/assets/{automation-list-row--o_2s3fx.js → automation-list-row-BTtnG0g-.js} +1 -1
  57. package/dist/client/assets/{automation-runs-f7_vKaQx.js → automation-runs-DX_e0E0R.js} +1 -1
  58. package/dist/client/assets/{automations-EfmWCRaa.js → automations-BkvRku3U.js} +1 -1
  59. package/dist/client/assets/{avatar-C8wTLH-Y.js → avatar-DUHP1iU3.js} +1 -1
  60. package/dist/client/assets/{badge-C_B5DGX7.js → badge-Cez0OzTb.js} +1 -1
  61. package/dist/client/assets/{brand-context-3Uae51-C.js → brand-context-B6gLXdfB.js} +1 -1
  62. package/dist/client/assets/{buckets-BfM3iUU4.js → buckets-BpaLxm7I.js} +1 -1
  63. package/dist/client/assets/{calendar-DhDlFhj3.js → calendar-VohCvHjP.js} +1 -1
  64. package/dist/client/assets/{capability-load-error-UM_Se0qo.js → capability-load-error-38UQQccw.js} +1 -1
  65. package/dist/client/assets/{card-CSSPEhBC.js → card-CC-M7EZ6.js} +1 -1
  66. package/dist/client/assets/{chat-context-CoAHOXH3.js → chat-context-CxtE-1u6.js} +1 -1
  67. package/dist/client/assets/{checkbox-BSUlBgmF.js → checkbox-CBeySlCT.js} +1 -1
  68. package/dist/client/assets/{cli-auth-success-COhq1kht.js → cli-auth-success-hIEHTD2J.js} +1 -1
  69. package/dist/client/assets/collection-detail-BXuNBXVS.js +1 -0
  70. package/dist/client/assets/{collection-display-button-DsyBTfO4.js → collection-display-button-kzgZUh8m.js} +1 -1
  71. package/dist/client/assets/{collection-search-DkATfzau.js → collection-search-DjpaeDqd.js} +1 -1
  72. package/dist/client/assets/{collection-table-wrapper-CrH4z06q.js → collection-table-wrapper-DEWhyWe_.js} +1 -1
  73. package/dist/client/assets/{collection-tabs-C9LjSOPJ.js → collection-tabs-BDvRsxUe.js} +1 -1
  74. package/dist/client/assets/{collections-BZkYAHVs.js → collections-BPUYMxUg.js} +1 -1
  75. package/dist/client/assets/{command-D3GXkonD.js → command-D2-J-HVJ.js} +1 -1
  76. package/dist/client/assets/{connect-desktop-dialog-DM5jQzNp.js → connect-desktop-dialog-BCyvd3Xf.js} +1 -1
  77. package/dist/client/assets/{connection-card-P0WMbyuT.js → connection-card-C7_-0Sn-.js} +1 -1
  78. package/dist/client/assets/{connection-detail-CaMGEYGt.js → connection-detail-C37HLdzH.js} +1 -1
  79. package/dist/client/assets/{connection-form-helpers-BnO9ZrS7.js → connection-form-helpers-C26m1Ef7.js} +1 -1
  80. package/dist/client/assets/{connections-CkNkhQcs.js → connections-CpYQP981.js} +1 -1
  81. package/dist/client/assets/{decopilot-sse-pool-CJdhg3t5.js → decopilot-sse-pool-CFYkM7Rh.js} +1 -1
  82. package/dist/client/assets/{dialog-B1SAW5rX.js → dialog-BR_cEBrt.js} +1 -1
  83. package/dist/client/assets/{domain-settings-CUWq8kP5.js → domain-settings-D9H1hX35.js} +1 -1
  84. package/dist/client/assets/{drawer-CjBCpOLV.js → drawer-Cy2Kz1Hn.js} +1 -1
  85. package/dist/client/assets/{dropdown-menu-Donnjq6j.js → dropdown-menu-BR-D9W2L.js} +1 -1
  86. package/dist/client/assets/{dynamic-plugin-layout-BW9wpBA2.js → dynamic-plugin-layout-CI85ZtQ1.js} +1 -1
  87. package/dist/client/assets/{empty-state-DqOR8ySk.js → empty-state-BgJJwNhs.js} +1 -1
  88. package/dist/client/assets/{empty-state-D0lbc9iO.js → empty-state-Dg8HHM9g.js} +1 -1
  89. package/dist/client/assets/{extract-connection-data-BekO5R_q.js → extract-connection-data-BxBk-cC0.js} +1 -1
  90. package/dist/client/assets/{features-BHrGTZBq.js → features-DmiLlpSQ.js} +1 -1
  91. package/dist/client/assets/{file-explorer-CH87JMow.js → file-explorer-FiO9Cf-7.js} +1 -1
  92. package/dist/client/assets/{file-type-icon-Dg4ZcoCZ.js → file-type-icon-BQANcS2o.js} +1 -1
  93. package/dist/client/assets/{files-CaH-Zqiw.js → files-BAtIs-1e.js} +1 -1
  94. package/dist/client/assets/{form-DrHlPeF0.js → form-Dk0zvzGa.js} +1 -1
  95. package/dist/client/assets/{general-BNA6ySAY.js → general-DafHYOpz.js} +1 -1
  96. package/dist/client/assets/{generate-id-Bb2FobE7.js → generate-id-BHjDNIIC.js} +1 -1
  97. package/dist/client/assets/{github-repo-picker-NDlVt-qs.js → github-repo-picker-BkgEqwQh.js} +1 -1
  98. package/dist/client/assets/{header-tab-button-CosxHue_.js → header-tab-button-BoMBpC0f.js} +1 -1
  99. package/dist/client/assets/{hover-card-BV5tJVH5.js → hover-card-Bv_j6ODB.js} +1 -1
  100. package/dist/client/assets/{image-field-BYhpz1AN.js → image-field-BqIrrPKI.js} +1 -1
  101. package/dist/client/assets/{index-BaByMAWx.js → index-BVTMo9kc.js} +1 -1
  102. package/dist/client/assets/{index-BnmY36lJ.js → index-BYrYtv_d.js} +1 -1
  103. package/dist/client/assets/{index-B1abJyb4.js → index-Bf5fJgEn.js} +4 -4
  104. package/dist/client/assets/{index-DOnDdGFk.js → index-Bk12bx9K.js} +1 -1
  105. package/dist/client/assets/{index-c6V6PMV9.js → index-BkeZywFC.js} +1 -1
  106. package/dist/client/assets/{index-BVv6NwV7.js → index-C6xUYocu.js} +1 -1
  107. package/dist/client/assets/{index-BcIWvOxR.js → index-CKzIwisI.js} +1 -1
  108. package/dist/client/assets/{index-BiPbPTPl.js → index-Ch5XdRnc.js} +1 -1
  109. package/dist/client/assets/{index-C224ZRSF.js → index-D8TzVufi.js} +1 -1
  110. package/dist/client/assets/{index-DVrPTo_A.js → index-DBJUXyq5.js} +1 -1
  111. package/dist/client/assets/{index-BtVysB8D.js → index-DaTAhfCb.js} +1 -1
  112. package/dist/client/assets/{index-mVHnTfFT.js → index-DllHR6ee.js} +1 -1
  113. package/dist/client/assets/{index-BDVa6IeA.js → index-IBt4YI87.js} +3 -3
  114. package/dist/client/assets/{index-C065mI_7.js → index-UNlOSNo_.js} +1 -1
  115. package/dist/client/assets/{index-redirect-4iHWjvR0.js → index-redirect-6YQCJuaD.js} +1 -1
  116. package/dist/client/assets/{index-zh0nLlor.js → index-zfhl8Q7y.js} +1 -1
  117. package/dist/client/assets/{infiniteQueryObserver-B_8KEl2e.js → infiniteQueryObserver-BmvWohEo.js} +1 -1
  118. package/dist/client/assets/{input-DNGVaNds.js → input-DCxahixb.js} +1 -1
  119. package/dist/client/assets/{integration-icon-CJMfMKCN.js → integration-icon-TU0D51GL.js} +1 -1
  120. package/dist/client/assets/{label-D9v72DeM.js → label-CdfI63_J.js} +1 -1
  121. package/dist/client/assets/{layout-Dv0hbN2I.js → layout-BhtdEX3U.js} +1 -1
  122. package/dist/client/assets/{login-B8Mmglnz.js → login-B9RS5Grh.js} +1 -1
  123. package/dist/client/assets/{members-CGxhAaed.js → members-7EkW-zHv.js} +1 -1
  124. package/dist/client/assets/{monaco-editor-BRCTG-o8.js → monaco-editor-CORr1Yst.js} +1 -1
  125. package/dist/client/assets/{monitoring-stats-row-B9sa3cOo.js → monitoring-stats-row-XmAF5Bgn.js} +1 -1
  126. package/dist/client/assets/{oauth-callback-DCN3xKLF.js → oauth-callback-5-7Rle0p.js} +1 -1
  127. package/dist/client/assets/{oauth-callback-ai-provider-DuGTk1UP.js → oauth-callback-ai-provider-DfEpYpoj.js} +1 -1
  128. package/dist/client/assets/{onboarding-MqwX2gbn.js → onboarding-YIjsqgJl.js} +1 -1
  129. package/dist/client/assets/{org-install-Hr0geoW4.js → org-install-Bf3OPqX7.js} +1 -1
  130. package/dist/client/assets/{org-layout-BISOFxQH.js → org-layout-CmlO60uU.js} +1 -1
  131. package/dist/client/assets/{org-plugin-layout-C9sTnQ3L.js → org-plugin-layout-DtmrEr3_.js} +1 -1
  132. package/dist/client/assets/{page-seo-form-C5DsA_Yk.js → page-seo-form-CAL1Ama2.js} +1 -1
  133. package/dist/client/assets/page-seo-sheet-CdpFODLo.js +1 -0
  134. package/dist/client/assets/{pair-CV1arxH5.js → pair-Bxl0nM3M.js} +1 -1
  135. package/dist/client/assets/{plugin-empty-state-Cn-Fc73W.js → plugin-empty-state-CRnS0p7x.js} +1 -1
  136. package/dist/client/assets/{plugin-header-A83014dg.js → plugin-header-7_Cdb1uT.js} +1 -1
  137. package/dist/client/assets/{plugin-layout-CK2N0L5T.js → plugin-layout-C-8PxgM5.js} +1 -1
  138. package/dist/client/assets/{popover-CCStmbVg.js → popover-DVm7Ssxi.js} +1 -1
  139. package/dist/client/assets/{post-editor-Dc6VYcrB.js → post-editor-DmeUGzlg.js} +1 -1
  140. package/dist/client/assets/{primitives-DwkCkK9w.js → primitives-CpDtL2ZU.js} +1 -1
  141. package/dist/client/assets/{profile-DHAWnTxJ.js → profile-Dm4Yb6eM.js} +1 -1
  142. package/dist/client/assets/project-app-view-JKj824Lw.js +1 -0
  143. package/dist/client/assets/record-editor-DwWcLb6L.js +1 -0
  144. package/dist/client/assets/registry-CDJxCTru.js +2 -0
  145. package/dist/client/assets/{registry-layout-Nby4mSd-.js → registry-layout-gSzxQgBQ.js} +1 -1
  146. package/dist/client/assets/{require-capability-bcG_hXfb.js → require-capability-C4iKMmpy.js} +1 -1
  147. package/dist/client/assets/{required-auth-layout-aOIjIjJz.js → required-auth-layout-8fkEaCnp.js} +1 -1
  148. package/dist/client/assets/{reset-password-2MaCb9eG.js → reset-password-CrMJvII1.js} +1 -1
  149. package/dist/client/assets/{resizable-BU9Jxr7F.js → resizable-DWU3ErtZ.js} +1 -1
  150. package/dist/client/assets/{roles-BrYynrdN.js → roles-DUH9IDU1.js} +1 -1
  151. package/dist/client/assets/save-referenced-block-BS5jTCGu.js +1 -0
  152. package/dist/client/assets/{save-status-BEPDvVej.js → save-status-CoUVqFSZ.js} +1 -1
  153. package/dist/client/assets/{schema-form-r2C1uN7N.js → schema-form-91G9lUBl.js} +1 -1
  154. package/dist/client/assets/{scroll-area-D51C1ACN.js → scroll-area-XoAuLxYN.js} +1 -1
  155. package/dist/client/assets/{search-input-eC2FA3jg.js → search-input-M0Ie6ly-.js} +1 -1
  156. package/dist/client/assets/{secrets-CHhWJ0Cb.js → secrets-8SZt1x7l.js} +1 -1
  157. package/dist/client/assets/{sections-editor-D9rhbH8s.js → sections-editor-DwgJqlrA.js} +1 -1
  158. package/dist/client/assets/{select-B-P2V8BM.js → select-BCbLv4__.js} +1 -1
  159. package/dist/client/assets/{select-model-BFYccCFV.js → select-model-CyGtN1M-.js} +1 -1
  160. package/dist/client/assets/{seo-editor-CLipM84S.js → seo-editor-Bs32N5T3.js} +1 -1
  161. package/dist/client/assets/{settings-layout-Dj3y8A9H.js → settings-layout-B9ZloRpE.js} +1 -1
  162. package/dist/client/assets/{settings-section-DqTv2gaX.js → settings-section-CM1lhiXq.js} +1 -1
  163. package/dist/client/assets/{sheet-B8fqQRiD.js → sheet-Dz53NwAL.js} +1 -1
  164. package/dist/client/assets/{shell-controls-CNJw3j0R.js → shell-controls-DoInONui.js} +1 -1
  165. package/dist/client/assets/{shell-layout-CHKJm8Hq.js → shell-layout-CyNNDyY2.js} +1 -1
  166. package/dist/client/assets/{shell-route-loading-Ce_mc_MZ.js → shell-route-loading-C7rwAk6O.js} +1 -1
  167. package/dist/client/assets/{sidebar-CO1-tv2S.js → sidebar-DHtVfRt2.js} +1 -1
  168. package/dist/client/assets/{skeleton-Dt8928E1.js → skeleton-4_j-emR3.js} +1 -1
  169. package/dist/client/assets/{sortable.esm-BNHcy4Wq.js → sortable.esm-BuYk742s.js} +1 -1
  170. package/dist/client/assets/{spinner-ClM1tRKH.js → spinner-Bjb2nwEj.js} +1 -1
  171. package/dist/client/assets/{sso-OFzpAnaN.js → sso-DchJ1XOr.js} +1 -1
  172. package/dist/client/assets/{store-XGDBjgoH.js → store-CQwIuLfs.js} +1 -1
  173. package/dist/client/assets/store-registry-CTjj2p5X.js +2 -0
  174. package/dist/client/assets/{studio-tools-DXz4ADLj.js → studio-tools-nLupF0VD.js} +1 -1
  175. package/dist/client/assets/{switch-jMhokor0.js → switch-DgxJQICE.js} +1 -1
  176. package/dist/client/assets/{tab-id-Tgb9l6kk.js → tab-id-R_vPeOM-.js} +1 -1
  177. package/dist/client/assets/{table-1TzZ6vZ4.js → table-BtBbNaqK.js} +1 -1
  178. package/dist/client/assets/{tabs-BsBNqcvj.js → tabs-B7rkPOQL.js} +1 -1
  179. package/dist/client/assets/{task-status-l_bC0pqR.js → task-status-o4q7-zCb.js} +1 -1
  180. package/dist/client/assets/{textarea-DwZ5CRUo.js → textarea-DVqVYdU_.js} +1 -1
  181. package/dist/client/assets/{toggle-group--11lwPpZ.js → toggle-group-Bp8xPho5.js} +1 -1
  182. package/dist/client/assets/{toolbar-CKrFJ1BF.js → toolbar-DoGR7Gvt.js} +1 -1
  183. package/dist/client/assets/{tools-list-DVti3IGS.js → tools-list-CzH1GRFq.js} +1 -1
  184. package/dist/client/assets/{tooltip-DyC38TuY.js → tooltip-uidgMYZs.js} +1 -1
  185. package/dist/client/assets/{types-Ca86MUrL.js → types-D-iISL5c.js} +1 -1
  186. package/dist/client/assets/{use-ai-providers-C5lWlohT.js → use-ai-providers-zhWaTacO.js} +1 -1
  187. package/dist/client/assets/{use-automations-BO06dZ0Y.js → use-automations-CnxwIRJi.js} +1 -1
  188. package/dist/client/assets/{use-capability-DN7Jb_Vw.js → use-capability-Iy7S17lS.js} +1 -1
  189. package/dist/client/assets/{use-collections-f-SWqrZ8.js → use-collections-Bx2is5yZ.js} +1 -1
  190. package/dist/client/assets/{use-connection-s-VKsf8Y.js → use-connection-Cp_AfkH2.js} +1 -1
  191. package/dist/client/assets/{use-copy-tZpB930y.js → use-copy-BbZfKDM_.js} +1 -1
  192. package/dist/client/assets/{use-create-virtual-mcp-BMrHAnQP.js → use-create-virtual-mcp-OVjH7swn.js} +1 -1
  193. package/dist/client/assets/{use-debounced-autosave-CPselVIo.js → use-debounced-autosave-COKPNHqz.js} +1 -1
  194. package/dist/client/assets/{use-delete-connection-LCr_hNwe.js → use-delete-connection-9HqqJhIE.js} +1 -1
  195. package/dist/client/assets/{use-file-configs-DntxTjod.js → use-file-configs-B2WdKpDl.js} +1 -1
  196. package/dist/client/assets/{use-infinite-scroll-CoEaa8i9.js → use-infinite-scroll-DnRfnOse.js} +1 -1
  197. package/dist/client/assets/{use-list-state-DzuI-74o.js → use-list-state-CS_bUcVK.js} +1 -1
  198. package/dist/client/assets/{use-mcp-client-DjtDozWo.js → use-mcp-client-BWBWxFyf.js} +1 -1
  199. package/dist/client/assets/{use-mcp-prompts-Bwc_EFaM.js → use-mcp-prompts-DceL7BOM.js} +1 -1
  200. package/dist/client/assets/{use-mcp-tools-C66MuGwS.js → use-mcp-tools-DGg_9CH1.js} +1 -1
  201. package/dist/client/assets/{use-members-DFL1gJpq.js → use-members-CMfQxSQX.js} +1 -1
  202. package/dist/client/assets/{use-navigate-to-agent-C2vzFAGC.js → use-navigate-to-agent-BcLfXkiQ.js} +1 -1
  203. package/dist/client/assets/{use-org-auth-client-BmtZCQbc.js → use-org-auth-client-CBhb39AJ.js} +1 -1
  204. package/dist/client/assets/{use-org-sso-w22tQX-q.js → use-org-sso-DNHpoek2.js} +1 -1
  205. package/dist/client/assets/{use-organization-roles-Br_eRGw7.js → use-organization-roles-Bp84xvDx.js} +1 -1
  206. package/dist/client/assets/{use-organization-settings-BhAMGPGz.js → use-organization-settings-CKbkYw8a.js} +1 -1
  207. package/dist/client/assets/{use-registry-connections-CtpWibkY.js → use-registry-connections-B0kDvUPs.js} +1 -1
  208. package/dist/client/assets/{use-secrets-zlkw9mos.js → use-secrets-B3_bXT6T.js} +1 -1
  209. package/dist/client/assets/{use-status-sounds-B_3OuJVg.js → use-status-sounds-DRJu63wo.js} +1 -1
  210. package/dist/client/assets/{use-view-mode-CRzGExU6.js → use-view-mode-BL89tUjo.js} +1 -1
  211. package/dist/client/assets/{use-virtual-mcp-CCNN2b5f.js → use-virtual-mcp--mdGOnb3.js} +1 -1
  212. package/dist/client/assets/useInfiniteQuery-DDQWxHDI.js +1 -0
  213. package/dist/client/assets/{useRouterState-ByPDltaw.js → useRouterState-B1E0dGkV.js} +1 -1
  214. package/dist/client/assets/useSuspenseInfiniteQuery-CtNc8-Ct.js +1 -0
  215. package/dist/client/assets/{user-CBeVVOc0.js → user--ESi0l1H.js} +1 -1
  216. package/dist/client/assets/{view-mode-toggle-CBdd-ysR.js → view-mode-toggle-YGR1OOUU.js} +1 -1
  217. package/dist/client/assets/{workflow-OGKhVBQk.js → workflow-CPoU6TIB.js} +1 -1
  218. package/dist/client/assets/workflow-detail-DZDWp4Au.js +1 -0
  219. package/dist/client/index.html +1 -1
  220. package/dist/server/cli.js +1 -1
  221. package/package.json +1 -1
  222. package/dist/client/assets/app-editor-3xsZVIXJ.js +0 -1
  223. package/dist/client/assets/collection-detail-BAwVUwaq.js +0 -1
  224. package/dist/client/assets/page-seo-sheet-DBVkiP10.js +0 -1
  225. package/dist/client/assets/project-app-view-B4kgMftj.js +0 -1
  226. package/dist/client/assets/record-editor-7yTWIpXw.js +0 -1
  227. package/dist/client/assets/registry-B1CINdAp.js +0 -2
  228. package/dist/client/assets/save-referenced-block-C3gVqTFV.js +0 -1
  229. package/dist/client/assets/store-registry-CjeVyjQV.js +0 -2
  230. package/dist/client/assets/useInfiniteQuery-Huaei1SN.js +0 -1
  231. package/dist/client/assets/useSuspenseInfiniteQuery-CsRl3QuB.js +0 -1
  232. package/dist/client/assets/workflow-detail-BNjqZkoT.js +0 -1
@@ -1 +1 @@
1
- import{r as h}from"./index-BDVa6IeA.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
1
+ import{r as h}from"./index-IBt4YI87.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
@@ -1 +1 @@
1
- import{e as c,g as p,j as s,l as u,N as a}from"./index-BDVa6IeA.js";import{a as x}from"./use-capability-DN7Jb_Vw.js";import{C as j}from"./capability-load-error-UM_Se0qo.js";function v(){const t=c.c(21);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:f,error:g}=x();if(f){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:s.jsx(u,{size:20,className:"animate-spin text-muted-foreground"})}),t[1]=e):e=t[1],e}if(g){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("registry:manage")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/store",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("monitoring:view")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}if(i("members:manage")){let e;return t[17]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[17]=r,t[18]=e):e=t[18],e}let n;return t[19]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[19]=r,t[20]=n):n=t[20],n}export{v as default};
1
+ import{e as c,g as p,j as s,l as u,N as a}from"./index-IBt4YI87.js";import{a as x}from"./use-capability-Iy7S17lS.js";import{C as j}from"./capability-load-error-38UQQccw.js";function v(){const t=c.c(21);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:f,error:g}=x();if(f){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:s.jsx(u,{size:20,className:"animate-spin text-muted-foreground"})}),t[1]=e):e=t[1],e}if(g){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("registry:manage")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/store",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("monitoring:view")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}if(i("members:manage")){let e;return t[17]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[17]=r,t[18]=e):e=t[18],e}let n;return t[19]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[19]=r,t[20]=n):n=t[20],n}export{v as default};
@@ -1,4 +1,4 @@
1
- import{e as le,r as K,f as bt,q as Be,j as t,B as Z,o as Ce,c as ce,K as it,n as yt,v as ss,d as rs,t as xt,E as ls}from"./index-BDVa6IeA.js";import{S as os}from"./search-input-eC2FA3jg.js";import{P as Me}from"./index-c6V6PMV9.js";import{E as wt}from"./empty-state-D0lbc9iO.js";import{R as as}from"./require-capability-bcG_hXfb.js";import{B as rt}from"./badge-C_B5DGX7.js";import{P as ct,a as dt,b as mt}from"./popover-CCStmbVg.js";import{b as Ze,T as et,a as tt}from"./tooltip-DyC38TuY.js";import{i as ft}from"./Check-y8-QJq4u.js";import{a as Xe}from"./Eye-kDqLeKP_.js";import{n as kt}from"./Globe01-CNKKD7pf.js";import{i as Pt}from"./FilterLines-CqmkGI7L.js";import{i as ns}from"./Key01-CPGjX6ze.js";import{i as is}from"./Play-9FnwPpbN.js";import{a9 as cs,aa as ds,R as ms,G as us}from"./agent-icon-ZS7Hvows.js";import{M as Tt}from"./monaco-editor-BRCTG-o8.js";import{u as xs}from"./use-members-DFL1gJpq.js";import{u as Mt}from"./use-connection-s-VKsf8Y.js";import{a as fs,u as ps,W as hs}from"./use-mcp-client-DjtDozWo.js";import{a as gs}from"./use-virtual-mcp-CCNN2b5f.js";import{n as Qe}from"./Container-BlrXU0Bi.js";import{c as js}from"./SwitchHorizontal01-BMMM3TLo.js";import{s as vs}from"./Plus-9-S3JWy-.js";import{s as Ns}from"./Trash01-Dh2vBIHv.js";import{I as Ge}from"./input-DNGVaNds.js";import{g as bs,b as _t,f as st,a as At,c as pt,d as ys,e as Dt,h as Vt,A as ws,T as Ss,i as Is,M as ht}from"./automation-runs-f7_vKaQx.js";import{S as lt,a as ot,b as at,c as Fe,d as nt}from"./select-B-P2V8BM.js";import{S as Cs}from"./scroll-area-D51C1ACN.js";import{t as Ut}from"./ChevronDown-Lk04U11C.js";import{C as ks}from"./calendar-DhDlFhj3.js";import{T as Ts}from"./textarea-DwZ5CRUo.js";import{C as Kt}from"./collection-tabs-C9LjSOPJ.js";import{S as Ms}from"./switch-jMhokor0.js";import{L as _s}from"./label-D9v72DeM.js";import{I as qe}from"./integration-icon-CJMfMKCN.js";import{A as qt}from"./avatar-C8wTLH-Y.js";import{A as Ds,a as Ls,b as Fs}from"./alert-CmVacOQH.js";import{C as Bt}from"./card-CSSPEhBC.js";import{K as ke}from"./monitoring-stats-row-B9sa3cOo.js";import{u as Ht}from"./studio-tools-DXz4ADLj.js";import{g as $s}from"./connection-slug-eyAPH6o3.js";import{u as Rs}from"./useSuspenseInfiniteQuery-CsRl3QuB.js";import{d as zs,S as Os,a as Es,b as Ps}from"./sheet-B8fqQRiD.js";import{T as De,a as ut,b as Jt,c as Gt,d as Qt,e as oe}from"./table-1TzZ6vZ4.js";import{n as As}from"./ChevronUp-C7bkcEQO.js";import{u as Vs}from"./use-infinite-scroll-CoEaa8i9.js";import{c as Us,b as Ks}from"./use-automations-BO06dZ0Y.js";import"./SearchMd-TA_AwzOv.js";import"./sidebar-CO1-tv2S.js";import"./LayoutLeft-Cfg3KzYI.js";import"./use-capability-DN7Jb_Vw.js";import"./access-gate-DB8PItXV.js";import"./capability-load-error-UM_Se0qo.js";import"./AlertCircle-auy87G7t.js";import"./Tool01-q5zFAXoC.js";import"./RefreshCcw01-Cs11KofH.js";import"./XCircle-CuAI3oge.js";import"./ArrowUpRight-DpDpyi30.js";import"./ZapSquare-DFzaHd62.js";import"./Users03-Db-xts3h.js";import"./CheckCircle-BYcwlC0U.js";import"./ChevronLeft-D81UGTDc.js";import"./ChevronRight-FIXGFOh_.js";import"./DotsVertical-UOMzmPdL.js";import"./ZoomOut-CJIm6fwO.js";import"./Star01-BhlevD6s.js";import"./Palette-Bfo0khbj.js";import"./HardDrive-B2W-LGcr.js";import"./Stars02-BzXmCUAc.js";import"./LinkExternal01-JnL7f_3-.js";import"./Monitor01-CojPdFxr.js";import"./Sun-oR2lZC_s.js";import"./Settings02-D5CpeXEI.js";import"./Shield01-mBum1vLW.js";import"./Stars01-BeIDe7kj.js";import"./Upload01-BphfbeV8.js";import"./User01-C4XoUCJZ.js";import"./Users01-C1J185Ov.js";import"./XClose-vL81XCVl.js";import"./X-Cur7ndLC.js";import"./Zap-DbdE3aVD.js";import"./index-BtVysB8D.js";import"./spinner-ClM1tRKH.js";import"./use-org-auth-client-BmtZCQbc.js";import"./use-collections-f-SWqrZ8.js";import"./useInfiniteQuery-Huaei1SN.js";import"./infiniteQueryObserver-B_8KEl2e.js";import"./task-status-l_bC0pqR.js";import"./checkbox-BSUlBgmF.js";import"./command-D3GXkonD.js";import"./index-BVv6NwV7.js";import"./dialog-B1SAW5rX.js";import"./pair-CV1arxH5.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-tZpB930y.js";import"./file-type-icon-Dg4ZcoCZ.js";import"./content-blocks-o63cs2vh.js";import"./types-Ca86MUrL.js";import"./chat-context-CoAHOXH3.js";import"./tab-id-Tgb9l6kk.js";import"./decopilot-sse-pool-CJdhg3t5.js";import"./create-sse-subscription-BS5983N4.js";import"./use-ai-providers-C5lWlohT.js";import"./use-organization-settings-BhAMGPGz.js";import"./shell-layout-CHKJm8Hq.js";import"./required-auth-layout-aOIjIjJz.js";import"./useRouterState-ByPDltaw.js";import"./use-org-sso-w22tQX-q.js";import"./use-navigate-to-agent-C2vzFAGC.js";import"./use-mcp-prompts-Bwc_EFaM.js";import"./form-DrHlPeF0.js";import"./index-BiPbPTPl.js";const vt={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Le(s){return s.filter(e=>e.key.trim()).map(e=>{const r=encodeURIComponent(e.key.trim()),l=encodeURIComponent(e.value||"");return`${r}:${e.operator}:${l}`}).join(",")}function qs(s){return s?s.split(",").map(e=>{const[r,l,...a]=e.split(":");return{key:decodeURIComponent(r||""),operator:l||"eq",value:decodeURIComponent(a.join(":")||"")}}):[]}function Ye(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
1
+ import{e as le,r as K,f as bt,q as Be,j as t,B as Z,o as Ce,c as ce,K as it,n as yt,v as ss,d as rs,t as xt,E as ls}from"./index-IBt4YI87.js";import{S as os}from"./search-input-M0Ie6ly-.js";import{P as Me}from"./index-BkeZywFC.js";import{E as wt}from"./empty-state-Dg8HHM9g.js";import{R as as}from"./require-capability-C4iKMmpy.js";import{B as rt}from"./badge-Cez0OzTb.js";import{P as ct,a as dt,b as mt}from"./popover-DVm7Ssxi.js";import{b as Ze,T as et,a as tt}from"./tooltip-uidgMYZs.js";import{i as ft}from"./Check-Dw5D9iXJ.js";import{a as Xe}from"./Eye-CpCOO2EF.js";import{n as kt}from"./Globe01-CP5QNSRl.js";import{i as Pt}from"./FilterLines-sUNPJnxX.js";import{i as ns}from"./Key01-CFH6lkz0.js";import{i as is}from"./Play-CWwVT1ep.js";import{a9 as cs,aa as ds,R as ms,G as us}from"./agent-icon-osOe3Xke.js";import{M as Tt}from"./monaco-editor-CORr1Yst.js";import{u as xs}from"./use-members-CMfQxSQX.js";import{u as Mt}from"./use-connection-Cp_AfkH2.js";import{a as fs,u as ps,W as hs}from"./use-mcp-client-BWBWxFyf.js";import{a as gs}from"./use-virtual-mcp--mdGOnb3.js";import{n as Qe}from"./Container-CESuzynk.js";import{c as js}from"./SwitchHorizontal01-BJpif5Ll.js";import{s as vs}from"./Plus-D6ZVo7op.js";import{s as Ns}from"./Trash01-DU9k1Vtq.js";import{I as Ge}from"./input-DCxahixb.js";import{g as bs,b as _t,f as st,a as At,c as pt,d as ys,e as Dt,h as Vt,A as ws,T as Ss,i as Is,M as ht}from"./automation-runs-DX_e0E0R.js";import{S as lt,a as ot,b as at,c as Fe,d as nt}from"./select-BCbLv4__.js";import{S as Cs}from"./scroll-area-XoAuLxYN.js";import{t as Ut}from"./ChevronDown-CWdX7_sm.js";import{C as ks}from"./calendar-VohCvHjP.js";import{T as Ts}from"./textarea-DVqVYdU_.js";import{C as Kt}from"./collection-tabs-BDvRsxUe.js";import{S as Ms}from"./switch-DgxJQICE.js";import{L as _s}from"./label-CdfI63_J.js";import{I as qe}from"./integration-icon-TU0D51GL.js";import{A as qt}from"./avatar-DUHP1iU3.js";import{A as Ds,a as Ls,b as Fs}from"./alert-CW3jDgPm.js";import{C as Bt}from"./card-CC-M7EZ6.js";import{K as ke}from"./monitoring-stats-row-XmAF5Bgn.js";import{u as Ht}from"./studio-tools-nLupF0VD.js";import{g as $s}from"./connection-slug-eyAPH6o3.js";import{u as Rs}from"./useSuspenseInfiniteQuery-CtNc8-Ct.js";import{d as zs,S as Os,a as Es,b as Ps}from"./sheet-Dz53NwAL.js";import{T as De,a as ut,b as Jt,c as Gt,d as Qt,e as oe}from"./table-BtBbNaqK.js";import{n as As}from"./ChevronUp-CVZqh7eX.js";import{u as Vs}from"./use-infinite-scroll-DnRfnOse.js";import{c as Us,b as Ks}from"./use-automations-CnxwIRJi.js";import"./SearchMd-CWML-MzT.js";import"./sidebar-DHtVfRt2.js";import"./LayoutLeft-Dr3sGtrV.js";import"./use-capability-Iy7S17lS.js";import"./access-gate-C8Ywr7l3.js";import"./capability-load-error-38UQQccw.js";import"./AlertCircle-BTsannAB.js";import"./Tool01-Dt1EhG_-.js";import"./RefreshCcw01-DgaWok1L.js";import"./XCircle-BOhKS6lm.js";import"./ArrowUpRight-DtMpnmAC.js";import"./ZapSquare-DO6_8wah.js";import"./Users03-DNzqxyDz.js";import"./CheckCircle-Bho6B2to.js";import"./ChevronLeft-ordKzex8.js";import"./ChevronRight-tUvvDqzz.js";import"./DotsVertical-BNgAjlpf.js";import"./ZoomOut-CiH8kMDs.js";import"./Star01-B7S_p3mf.js";import"./Palette-BSSJKY8F.js";import"./HardDrive-BP6zv7bm.js";import"./Stars02-CNXKv81Q.js";import"./LinkExternal01-BHt-Icgs.js";import"./Monitor01-B4axAVMt.js";import"./Sun-Cxxu7rF-.js";import"./Settings02-DnBIVw0J.js";import"./Shield01-CDyxjwN4.js";import"./Stars01-BigO76ki.js";import"./Upload01-D-DASWOL.js";import"./User01-BUWoWpIi.js";import"./Users01-CuU4FaYD.js";import"./XClose-6z0C_oDP.js";import"./X-Bin-Wtwp.js";import"./Zap-D4FMWUsp.js";import"./index-DaTAhfCb.js";import"./spinner-Bjb2nwEj.js";import"./use-org-auth-client-CBhb39AJ.js";import"./use-collections-Bx2is5yZ.js";import"./useInfiniteQuery-DDQWxHDI.js";import"./infiniteQueryObserver-BmvWohEo.js";import"./task-status-o4q7-zCb.js";import"./checkbox-CBeySlCT.js";import"./command-D2-J-HVJ.js";import"./index-C6xUYocu.js";import"./dialog-BR_cEBrt.js";import"./pair-Bxl0nM3M.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BbZfKDM_.js";import"./file-type-icon-BQANcS2o.js";import"./content-blocks-o63cs2vh.js";import"./types-D-iISL5c.js";import"./chat-context-CxtE-1u6.js";import"./tab-id-R_vPeOM-.js";import"./decopilot-sse-pool-CFYkM7Rh.js";import"./create-sse-subscription-BS5983N4.js";import"./use-ai-providers-zhWaTacO.js";import"./use-organization-settings-CKbkYw8a.js";import"./shell-layout-CyNNDyY2.js";import"./required-auth-layout-8fkEaCnp.js";import"./useRouterState-B1E0dGkV.js";import"./use-org-sso-DNHpoek2.js";import"./use-navigate-to-agent-BcLfXkiQ.js";import"./use-mcp-prompts-DceL7BOM.js";import"./form-Dk0zvzGa.js";import"./index-Ch5XdRnc.js";const vt={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Le(s){return s.filter(e=>e.key.trim()).map(e=>{const r=encodeURIComponent(e.key.trim()),l=encodeURIComponent(e.value||"");return`${r}:${e.operator}:${l}`}).join(",")}function qs(s){return s?s.split(",").map(e=>{const[r,l,...a]=e.split(":");return{key:decodeURIComponent(r||""),operator:l||"eq",value:decodeURIComponent(a.join(":")||"")}}):[]}function Ye(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
2
2
  `)}function Lt(s){return s.trim()?s.split(`
3
3
  `).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[r,...l]=e.split("=");return{key:r||"",operator:"eq",value:l.join("=")}}if(e.includes("~")){const[r,...l]=e.split("~");return{key:r||"",operator:"contains",value:l.join("~")}}if(e.includes("@")){const[r,...l]=e.split("@");return{key:r||"",operator:"in",value:l.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Bs(s){const e={},r={},l=[],a={};for(const o of s)if(o.key.trim())switch(o.operator){case"eq":o.value&&(e[o.key]=o.value);break;case"contains":o.value&&(r[o.key]=`%${o.value}%`);break;case"exists":l.push(o.key);break;case"in":o.value&&(a[o.key]=o.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(r).length>0?r:void 0,propertyKeys:l.length>0?l:void 0,propertyInValues:Object.keys(a).length>0?a:void 0}}function Ft(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};if(typeof s._decocms_truncated=="string")return{content:s._decocms_truncated,isTruncated:!0,originalSize:s._decocms_truncated.length};const e=JSON.stringify(s,null,2),r=e.length;return r<=vt.maxJsonRenderSize?{content:e,isTruncated:!1,originalSize:r}:{content:e.slice(0,vt.maxJsonRenderSize)+`
4
4
 
@@ -1 +1 @@
1
- import{av as g,dE as d,dF as v}from"./index-BDVa6IeA.js";var b=class extends g{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:u,isError:c,isRefetchError:P}=i,r=s.fetchMeta?.fetchMore?.direction,h=c&&r==="forward",o=a&&r==="forward",n=c&&r==="backward",f=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,s.data),hasPreviousPage:d(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:f,isRefetchError:P&&!h&&!n,isRefetching:u&&!o&&!f}}};export{b as I};
1
+ import{av as g,dE as d,dF as v}from"./index-IBt4YI87.js";var b=class extends g{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:u,isError:c,isRefetchError:P}=i,r=s.fetchMeta?.fetchMore?.direction,h=c&&r==="forward",o=a&&r==="forward",n=c&&r==="backward",f=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,s.data),hasPreviousPage:d(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:f,isRefetchError:P&&!h&&!n,isRefetching:u&&!o&&!f}}};export{b as I};
@@ -1 +1 @@
1
- import{e as s,c as a,j as d}from"./index-BDVa6IeA.js";function f(l){const e=s.c(10);let i,t,r;e[0]!==l?({className:i,type:r,...t}=l,e[0]=l,e[1]=i,e[2]=t,e[3]=r):(i=e[1],t=e[2],r=e[3]);let n;e[4]!==i?(n=a("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-lg bg-background dark:bg-input/30 px-3 py-1 text-sm transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:opacity-50 card-shadow","focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==r?(o=d.jsx("input",{type:r,"data-slot":"input",className:n,...t}),e[6]=t,e[7]=n,e[8]=r,e[9]=o):o=e[9],o}export{f as I};
1
+ import{e as s,c as a,j as d}from"./index-IBt4YI87.js";function f(l){const e=s.c(10);let i,t,r;e[0]!==l?({className:i,type:r,...t}=l,e[0]=l,e[1]=i,e[2]=t,e[3]=r):(i=e[1],t=e[2],r=e[3]);let n;e[4]!==i?(n=a("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-lg bg-background dark:bg-input/30 px-3 py-1 text-sm transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:opacity-50 card-shadow","focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==r?(o=d.jsx("input",{type:r,"data-slot":"input",className:n,...t}),e[6]=t,e[7]=n,e[8]=r,e[9]=o):o=e[9],o}export{f as I};
@@ -1 +1 @@
1
- import{e as A,j as h,r as z,c as _}from"./index-BDVa6IeA.js";import{n as L}from"./Container-BlrXU0Bi.js";import{A as k}from"./agent-icon-ZS7Hvows.js";const C={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},Z={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},y={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},M={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function q(E){const e=A.c(12),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w;if(t?.startsWith("icon://")||t?.includes("#agentcolor=")){const r=M[n];let l;return e[0]!==o||e[1]!==t||e[2]!==s||e[3]!==r?(l=h.jsx(k,{icon:t,name:s,size:r,className:o}),e[0]=o,e[1]=t,e[2]=s,e[3]=r,e[4]=l):l=e[4],l}const g=t??"no-icon";let i;return e[5]!==o||e[6]!==c||e[7]!==t||e[8]!==s||e[9]!==n||e[10]!==g?(i=h.jsx(R,{icon:t,name:s,size:n,className:o,fallbackIcon:c},g),e[5]=o,e[6]=c,e[7]=t,e[8]=s,e[9]=n,e[10]=g,e[11]=i):i=e[11],i}function R(E){const e=A.c(24),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w,[g,i]=z.useState(!1),r=!!t&&g,l=C[n],b=Z[n];let a;e[0]!==o||e[1]!==l||e[2]!==b?(a=_("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,b,o),e[0]=o,e[1]=l,e[2]=b,e[3]=a):a=e[3];const p=t||void 0,N=!r&&"hidden";let m;e[4]!==N?(m=_("h-full w-full object-cover",N),e[4]=N,e[5]=m):m=e[5];let I,S;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=()=>i(!1),S=()=>i(!0),e[6]=I,e[7]=S):(I=e[6],S=e[7]);let d;e[8]!==s||e[9]!==p||e[10]!==m?(d=h.jsx("img",{src:p,alt:s,className:m,onError:I,onLoad:S}),e[8]=s,e[9]=p,e[10]=m,e[11]=d):d=e[11];const v=r&&"hidden";let f;e[12]!==v?(f=_("h-full w-full flex items-center justify-center bg-muted/20",v),e[12]=v,e[13]=f):f=e[13];let x;e[14]!==c||e[15]!==n?(x=c??h.jsx(L,{size:y[n],className:"text-muted-foreground"}),e[14]=c,e[15]=n,e[16]=x):x=e[16];let u;e[17]!==f||e[18]!==x?(u=h.jsx("div",{className:f,children:x}),e[17]=f,e[18]=x,e[19]=u):u=e[19];let j;return e[20]!==d||e[21]!==u||e[22]!==a?(j=h.jsxs("div",{className:a,children:[d,u]}),e[20]=d,e[21]=u,e[22]=a,e[23]=j):j=e[23],j}export{q as I};
1
+ import{e as A,j as h,r as z,c as _}from"./index-IBt4YI87.js";import{n as L}from"./Container-CESuzynk.js";import{A as k}from"./agent-icon-osOe3Xke.js";const C={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},Z={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},y={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},M={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function q(E){const e=A.c(12),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w;if(t?.startsWith("icon://")||t?.includes("#agentcolor=")){const r=M[n];let l;return e[0]!==o||e[1]!==t||e[2]!==s||e[3]!==r?(l=h.jsx(k,{icon:t,name:s,size:r,className:o}),e[0]=o,e[1]=t,e[2]=s,e[3]=r,e[4]=l):l=e[4],l}const g=t??"no-icon";let i;return e[5]!==o||e[6]!==c||e[7]!==t||e[8]!==s||e[9]!==n||e[10]!==g?(i=h.jsx(R,{icon:t,name:s,size:n,className:o,fallbackIcon:c},g),e[5]=o,e[6]=c,e[7]=t,e[8]=s,e[9]=n,e[10]=g,e[11]=i):i=e[11],i}function R(E){const e=A.c(24),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w,[g,i]=z.useState(!1),r=!!t&&g,l=C[n],b=Z[n];let a;e[0]!==o||e[1]!==l||e[2]!==b?(a=_("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,b,o),e[0]=o,e[1]=l,e[2]=b,e[3]=a):a=e[3];const p=t||void 0,N=!r&&"hidden";let m;e[4]!==N?(m=_("h-full w-full object-cover",N),e[4]=N,e[5]=m):m=e[5];let I,S;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=()=>i(!1),S=()=>i(!0),e[6]=I,e[7]=S):(I=e[6],S=e[7]);let d;e[8]!==s||e[9]!==p||e[10]!==m?(d=h.jsx("img",{src:p,alt:s,className:m,onError:I,onLoad:S}),e[8]=s,e[9]=p,e[10]=m,e[11]=d):d=e[11];const v=r&&"hidden";let f;e[12]!==v?(f=_("h-full w-full flex items-center justify-center bg-muted/20",v),e[12]=v,e[13]=f):f=e[13];let x;e[14]!==c||e[15]!==n?(x=c??h.jsx(L,{size:y[n],className:"text-muted-foreground"}),e[14]=c,e[15]=n,e[16]=x):x=e[16];let u;e[17]!==f||e[18]!==x?(u=h.jsx("div",{className:f,children:x}),e[17]=f,e[18]=x,e[19]=u):u=e[19];let j;return e[20]!==d||e[21]!==u||e[22]!==a?(j=h.jsxs("div",{className:a,children:[d,u]}),e[20]=d,e[21]=u,e[22]=a,e[23]=j):j=e[23],j}export{q as I};
@@ -1 +1 @@
1
- import{e as n,c as r,j as i,bw as p}from"./index-BDVa6IeA.js";function c(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=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{c as L};
1
+ import{e as n,c as r,j as i,bw as p}from"./index-IBt4YI87.js";function c(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=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{c as L};
@@ -1 +1 @@
1
- import{e as C,r as i,c as A,j as a,aU as V}from"./index-BDVa6IeA.js";import{P as E}from"./index-c6V6PMV9.js";const H=i.createContext(null);function q(x){const e=C.c(3),{children:l}=x,s=i.useContext(H);if(!s?.tabsEl)return null;let c;return e[0]!==l||e[1]!==s.tabsEl?(c=V.createPortal(l,s.tabsEl),e[0]=l,e[1]=s.tabsEl,e[2]=c):c=e[2],c}function D(x){const e=C.c(3),{children:l}=x,s=i.useContext(H);if(!s?.actionsEl)return null;let c;return e[0]!==l||e[1]!==s.actionsEl?(c=V.createPortal(l,s.actionsEl),e[0]=l,e[1]=s.actionsEl,e[2]=c):c=e[2],c}const z=D;function B(x){const e=C.c(21),{children:l,breadcrumb:s,hideHeader:c}=x;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={leftEl:null,tabsEl:null,actionsEl:null},e[0]=b):b=e[0];const[w,g]=i.useState(b),N=i.useRef(null),P=i.useRef(null),L=i.useRef(null);let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=t=>{N.current=t,t&&g(n=>n.leftEl===t?n:{...n,leftEl:t})},e[1]=h):h=e[1];const $=h;let R;e[2]===Symbol.for("react.memo_cache_sentinel")?(R=t=>{P.current=t,t&&g(n=>n.tabsEl===t?n:{...n,tabsEl:t})},e[2]=R):R=e[2];const _=R;let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t=>{L.current=t,t&&g(n=>n.actionsEl===t?n:{...n,actionsEl:t})},e[3]=d):d=e[3];const k=d,p=c&&"hidden";let o;e[4]!==p?(o=A(p),e[4]=p,e[5]=o):o=e[5];let j;e[6]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx("div",{ref:$,className:"flex items-center gap-2 min-w-0"}),e[6]=j):j=e[6];let r;e[7]!==s?(r=a.jsxs(E.Header.Left,{children:[s,j]}),e[7]=s,e[8]=r):r=e[8];let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsxs(E.Header.Right,{children:[a.jsx("div",{ref:_,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),a.jsx("div",{ref:k,className:"flex items-center gap-2 shrink-0"})]}),e[9]=y):y=e[9];let f;e[10]!==o||e[11]!==r?(f=a.jsxs(E.Header,{className:o,children:[r,y]}),e[10]=o,e[11]=r,e[12]=f):f=e[12];let m;e[13]!==l?(m=a.jsx(E.Content,{children:l}),e[13]=l,e[14]=m):m=e[14];let u;e[15]!==f||e[16]!==m?(u=a.jsxs(E,{children:[f,m]}),e[15]=f,e[16]=m,e[17]=u):u=e[17];let S;return e[18]!==w||e[19]!==u?(S=a.jsx(H,{value:w,children:u}),e[18]=w,e[19]=u,e[20]=S):S=e[20],S}export{B as V,z as a,q as b};
1
+ import{e as C,r as i,c as A,j as a,aU as V}from"./index-IBt4YI87.js";import{P as E}from"./index-BkeZywFC.js";const H=i.createContext(null);function q(x){const e=C.c(3),{children:l}=x,s=i.useContext(H);if(!s?.tabsEl)return null;let c;return e[0]!==l||e[1]!==s.tabsEl?(c=V.createPortal(l,s.tabsEl),e[0]=l,e[1]=s.tabsEl,e[2]=c):c=e[2],c}function D(x){const e=C.c(3),{children:l}=x,s=i.useContext(H);if(!s?.actionsEl)return null;let c;return e[0]!==l||e[1]!==s.actionsEl?(c=V.createPortal(l,s.actionsEl),e[0]=l,e[1]=s.actionsEl,e[2]=c):c=e[2],c}const z=D;function B(x){const e=C.c(21),{children:l,breadcrumb:s,hideHeader:c}=x;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={leftEl:null,tabsEl:null,actionsEl:null},e[0]=b):b=e[0];const[w,g]=i.useState(b),N=i.useRef(null),P=i.useRef(null),L=i.useRef(null);let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=t=>{N.current=t,t&&g(n=>n.leftEl===t?n:{...n,leftEl:t})},e[1]=h):h=e[1];const $=h;let R;e[2]===Symbol.for("react.memo_cache_sentinel")?(R=t=>{P.current=t,t&&g(n=>n.tabsEl===t?n:{...n,tabsEl:t})},e[2]=R):R=e[2];const _=R;let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t=>{L.current=t,t&&g(n=>n.actionsEl===t?n:{...n,actionsEl:t})},e[3]=d):d=e[3];const k=d,p=c&&"hidden";let o;e[4]!==p?(o=A(p),e[4]=p,e[5]=o):o=e[5];let j;e[6]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx("div",{ref:$,className:"flex items-center gap-2 min-w-0"}),e[6]=j):j=e[6];let r;e[7]!==s?(r=a.jsxs(E.Header.Left,{children:[s,j]}),e[7]=s,e[8]=r):r=e[8];let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsxs(E.Header.Right,{children:[a.jsx("div",{ref:_,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),a.jsx("div",{ref:k,className:"flex items-center gap-2 shrink-0"})]}),e[9]=y):y=e[9];let f;e[10]!==o||e[11]!==r?(f=a.jsxs(E.Header,{className:o,children:[r,y]}),e[10]=o,e[11]=r,e[12]=f):f=e[12];let m;e[13]!==l?(m=a.jsx(E.Content,{children:l}),e[13]=l,e[14]=m):m=e[14];let u;e[15]!==f||e[16]!==m?(u=a.jsxs(E,{children:[f,m]}),e[15]=f,e[16]=m,e[17]=u):u=e[17];let S;return e[18]!==w||e[19]!==u?(S=a.jsx(H,{value:w,children:u}),e[18]=w,e[19]=u,e[20]=S):S=e[20],S}export{B as V,z as a,q as b};
@@ -1 +1 @@
1
- import{u as X,r as m,a as z,t as P,b,j as e,c as B,B as Q,d as ie,S as W,N as oe,e as le}from"./index-BDVa6IeA.js";import{I}from"./input-DNGVaNds.js";import{A as de}from"./auth-split-layout-C1_0o1Py.js";function ce({redirectUrl:s,callbackUrl:n="/"}){const{emailAndPassword:d,resetPassword:u,emailOtp:i,socialProviders:l}=X(),[r,j]=m.useState(""),[y,D]=m.useState(""),[w,C]=m.useState(""),[A,O]=m.useState(""),[f,L]=m.useState(!1),[F,N]=m.useState(()=>i.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[c,S]=m.useState(""),[$,Y]=m.useState(!1),h=F==="signUp",p=F==="forgotPassword",x=F==="emailOtp",R=z({mutationFn:async({email:t,password:a,name:q})=>{try{if(h){const g=await b.signUp.email({email:t,password:a,name:q||""});if(g.error)throw new Error(g.error.message||"Sign up failed");return g}else{const g=await b.signIn.email({email:t,password:a});if(g.error)throw new Error(g.error.message||"Sign in failed");return g}}catch(g){throw g instanceof Error?g:new Error("Authentication failed")}},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??n},onError:t=>{P(h?"user_signup_failed":"user_signin_failed",{error:t instanceof Error?t.message:String(t)})}}),U=z({mutationFn:async({email:t})=>{const a=await b.requestPasswordReset({email:t,redirectTo:"/reset-password"});if(a.error)throw new Error(a.error.message||"Failed to send reset email");return a},onSuccess:()=>{P("password_reset_requested"),Y(!0)},onError:t=>{P("password_reset_request_failed",{error:t instanceof Error?t.message:String(t)})}}),E=z({mutationFn:async({email:t})=>{const a=await b.emailOtp.sendVerificationOtp({email:t,type:"sign-in"});if(a.error)throw new Error(a.error.message||"Failed to send code");return a},onSuccess:()=>{P("email_otp_sent"),L(!0)},onError:t=>{P("email_otp_send_failed",{error:t instanceof Error?t.message:String(t)})}}),_=z({mutationFn:async({email:t,otp:a})=>{const q=await b.signIn.emailOtp({email:t,otp:a});if(q.error)throw new Error(q.error.message||"Invalid code");return q},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??n},onError:t=>{P("email_otp_verify_failed",{error:t instanceof Error?t.message:String(t)})}}),T=t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),V=()=>{r.trim()&&!T(r)&&S("Invalid email address")},Z=t=>{if(t.preventDefault(),!T(r)){S("Invalid email address");return}R.mutate({email:r,password:y,name:w})},ee=t=>{if(t.preventDefault(),!T(r)){S("Invalid email address");return}U.mutate({email:r})},te=t=>{if(t.preventDefault(),!T(r)){S("Invalid email address");return}E.mutate({email:r})},se=t=>{t.preventDefault(),_.mutate({email:r,otp:A})},k=t=>a=>{t(a.target.value),G&&R.reset(),H&&U.reset(),J&&(E.reset(),_.reset()),t===j&&c&&S("")},M=t=>{N(t),C(""),O(""),L(!1),S(""),Y(!1),R.reset(),U.reset(),E.reset(),_.reset()},o=R.isPending||U.isPending||E.isPending||_.isPending,G=R.error,H=U.error,J=E.error||_.error,v=h?r.trim()&&y.trim()&&w.trim():p?r.trim():x?f?A.trim():r.trim():r.trim()&&y.trim(),ne=t=>{if(!t)return null;const a=t.message.toLowerCase();return a.includes("unauthorized")||a.includes("401")?"Invalid email or password. Please try again.":a.includes("already exists")||a.includes("409")?"An account with this email already exists. Try signing in instead.":a.includes("network")||a.includes("fetch")?"Network error. Please check your connection and try again.":a.includes("rate limit")||a.includes("429")?"Too many attempts. Please wait a moment and try again.":a.includes("invalid")&&a.includes("otp")?"Invalid or expired code. Please try again.":t.message||"An error occurred. Please try again."},K=G||H||J,re=p?"Reset your password":x&&f?"Enter verification code":"Welcome to deco",ae=p?"We'll send you a reset link":x&&f?`Code sent to ${r}`:"Sign in or create a new account";return e.jsxs("div",{className:"w-full grid gap-10",children:[e.jsxs("div",{children:[e.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),e.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-medium leading-8",children:re}),e.jsx("p",{className:"text-base text-muted-foreground leading-6",children:ae})]}),K&&e.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:ne(K)}),$&&e.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Check your email for a password reset link."}),!p&&!(x&&f)&&l.enabled&&e.jsx("div",{className:"grid gap-2",children:l.providers.map(t=>e.jsxs("button",{type:"button",disabled:o,onClick:()=>{b.signIn.social({provider:t.name,callbackURL:s??n})},className:"flex h-12 w-full items-center justify-center gap-3 rounded-xl bg-background dark:bg-input/30 px-3 text-sm font-medium text-foreground card-shadow transition-colors hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 disabled:opacity-50 disabled:pointer-events-none",children:[t.icon&&e.jsx("img",{src:t.icon,alt:"",className:B("h-5 w-5",t.name==="github"&&"dark:invert"),"aria-hidden":"true"}),"Continue with"," ",t.name.charAt(0).toUpperCase()+t.name.slice(1)]},t.name))}),!p&&!(x&&f)&&l.enabled&&(d.enabled||i.enabled)&&e.jsxs("div",{className:"flex items-center gap-2.5 -my-4",children:[e.jsx("div",{className:"h-px flex-1 bg-border"}),e.jsx("span",{className:"text-base text-muted-foreground",children:"or"}),e.jsx("div",{className:"h-px flex-1 bg-border"})]}),x&&i.enabled&&e.jsx(e.Fragment,{children:f?e.jsxs("form",{onSubmit:se,className:"grid gap-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:"Verification code"}),e.jsx(I,{type:"text",placeholder:"Enter code",value:A,onChange:k(O),required:!0,disabled:o,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),e.jsx("button",{type:"submit",disabled:o||!v,className:"flex h-12 w-full items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:opacity-50 disabled:pointer-events-none",children:o?"Verifying...":"Verify"}),e.jsx("button",{type:"button",onClick:()=>{L(!1),O(""),E.reset(),_.reset()},disabled:o,className:"mt-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Use a different email"})]}):e.jsxs("form",{onSubmit:te,className:"grid gap-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:"Email"}),e.jsx(I,{type:"email",placeholder:"Email address",value:r,onChange:k(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c,className:"h-11 rounded-lg"}),c&&e.jsx("p",{className:"text-xs text-destructive",children:c})]}),e.jsx("button",{type:"submit",disabled:o||!v,className:"flex h-12 w-full items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:opacity-50 disabled:pointer-events-none",children:o?"Sending...":"Send code"})]})}),p&&d.enabled&&!$&&e.jsxs("form",{onSubmit:ee,className:"grid gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:r,onChange:k(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c,className:"h-11 rounded-lg"}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsx(Q,{type:"submit",disabled:o||!v,className:"w-full font-semibold",size:"xl",children:o?"Sending...":"Send reset link"})]}),!p&&!x&&d.enabled&&e.jsxs("form",{onSubmit:Z,className:"grid gap-5",children:[h&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Name"}),e.jsx(I,{type:"text",placeholder:"Your name",value:w,onChange:k(C),required:!0,disabled:o,className:"h-11 rounded-lg"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:r,onChange:k(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c,className:"h-11 rounded-lg"}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Password"}),!h&&u.enabled&&e.jsx("button",{type:"button",onClick:()=>M("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Forgot password?"})]}),e.jsx(I,{type:"password",placeholder:"••••••••",value:y,onChange:k(D),required:!0,disabled:o,className:"h-11 rounded-lg"})]}),e.jsx("div",{className:B("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",v?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsx("div",{className:B("p-1",!v&&"pointer-events-none"),children:e.jsx(Q,{type:"submit",disabled:o||!v,className:B("w-full font-semibold"),size:"xl","aria-hidden":!v,children:o?h?"Creating account...":"Signing in...":"Continue"})})})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:p?e.jsx("button",{type:"button",onClick:()=>M("signIn"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:"Back to sign in"}):x&&d.enabled?e.jsx("button",{type:"button",onClick:()=>M("signIn"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:"Sign in with password instead"}):!x&&d.enabled?e.jsxs(e.Fragment,{children:[h?"Already have an account? ":"Don't have an account? ",e.jsx("button",{type:"button",onClick:()=>M(h?"signIn":"signUp"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:h?"Sign in":"Sign up"}),i.enabled&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"mx-2",children:"·"}),e.jsx("button",{type:"button",onClick:()=>M("emailOtp"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:"Sign in with email code"})]})]}):null})]})}function ue({redirectTo:s}){const[n,d]=m.useState(null);return m.useEffect(()=>{let u=!1;return(async()=>{try{let i;for(let l=0;l<5&&(i=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"}),!(i.ok||i.status<500));l++)await new Promise(r=>setTimeout(r,Math.min(1e3*2**l,1e4)));if(!i?.ok){const l=await i?.json().catch(()=>({}));throw new Error(l?.error||"Auto-login failed")}if(!u){const l=s.startsWith("/")&&!s.startsWith("//")?s:"/";window.location.href=l}}catch(i){u||d(i instanceof Error?i.message:"Auto-login failed")}})(),()=>{u=!0}},[s]),n?e.jsx("div",{className:"flex min-h-screen items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-destructive mb-2",children:["Auto-login failed: ",n]}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Try restarting the server."})]})}):e.jsx(W,{})}function me(s){if(!s.client_id||s.response_type!=="code")return null;const n=new URLSearchParams;return s.client_id&&n.set("client_id",s.client_id),s.redirect_uri&&n.set("redirect_uri",s.redirect_uri),s.response_type&&n.set("response_type",s.response_type),s.state&&n.set("state",s.state),s.scope&&n.set("scope",s.scope),s.code_challenge&&n.set("code_challenge",s.code_challenge),s.code_challenge_method&&n.set("code_challenge_method",s.code_challenge_method),`/api/auth/mcp/authorize?${n.toString()}`}function ge(s){const n=le.c(5),{callbackURL:d,providerId:u}=s;let i,l;n[0]!==d||n[1]!==u?(i=()=>{(async()=>await b.signIn.sso({providerId:u,callbackURL:d}))()},l=[u,d],n[0]=d,n[1]=u,n[2]=i,n[3]=l):(i=n[2],l=n[3]),m.useEffect(i,l);let r;return n[4]===Symbol.for("react.memo_cache_sentinel")?(r=e.jsx(W,{}),n[4]=r):r=n[4],r}function pe(){const s=b.useSession(),n=ie({from:"/login"}),{next:d="/",client_id:u,redirect_uri:i,response_type:l,state:r,scope:j,code_challenge:y,code_challenge_method:D}=n,w=d.startsWith("/")&&!d.startsWith("//")?d:"/",{sso:C,emailAndPassword:A,magicLink:O,emailOtp:f,socialProviders:L,localMode:F}=X(),N=me({client_id:u,redirect_uri:i,response_type:l,state:r,scope:j,code_challenge:y,code_challenge_method:D}),c=N||w;return s.data?N?(window.location.href=N,e.jsx(W,{})):e.jsx(oe,{to:w}):F?e.jsx(ue,{redirectTo:c}):C.enabled?e.jsx(ge,{callbackURL:c,providerId:C.providerId}):A.enabled||O.enabled||f.enabled||L.enabled?e.jsx(de,{children:e.jsx(ce,{redirectUrl:N,callbackUrl:w})}):e.jsx("div",{children:"No login options available"})}export{pe as default};
1
+ import{u as X,r as m,a as z,t as P,b,j as e,c as B,B as Q,d as ie,S as W,N as oe,e as le}from"./index-IBt4YI87.js";import{I}from"./input-DCxahixb.js";import{A as de}from"./auth-split-layout-RlJ5glwr.js";function ce({redirectUrl:s,callbackUrl:n="/"}){const{emailAndPassword:d,resetPassword:u,emailOtp:i,socialProviders:l}=X(),[r,j]=m.useState(""),[y,D]=m.useState(""),[w,C]=m.useState(""),[A,O]=m.useState(""),[f,L]=m.useState(!1),[F,N]=m.useState(()=>i.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[c,S]=m.useState(""),[$,Y]=m.useState(!1),h=F==="signUp",p=F==="forgotPassword",x=F==="emailOtp",R=z({mutationFn:async({email:t,password:a,name:q})=>{try{if(h){const g=await b.signUp.email({email:t,password:a,name:q||""});if(g.error)throw new Error(g.error.message||"Sign up failed");return g}else{const g=await b.signIn.email({email:t,password:a});if(g.error)throw new Error(g.error.message||"Sign in failed");return g}}catch(g){throw g instanceof Error?g:new Error("Authentication failed")}},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??n},onError:t=>{P(h?"user_signup_failed":"user_signin_failed",{error:t instanceof Error?t.message:String(t)})}}),U=z({mutationFn:async({email:t})=>{const a=await b.requestPasswordReset({email:t,redirectTo:"/reset-password"});if(a.error)throw new Error(a.error.message||"Failed to send reset email");return a},onSuccess:()=>{P("password_reset_requested"),Y(!0)},onError:t=>{P("password_reset_request_failed",{error:t instanceof Error?t.message:String(t)})}}),E=z({mutationFn:async({email:t})=>{const a=await b.emailOtp.sendVerificationOtp({email:t,type:"sign-in"});if(a.error)throw new Error(a.error.message||"Failed to send code");return a},onSuccess:()=>{P("email_otp_sent"),L(!0)},onError:t=>{P("email_otp_send_failed",{error:t instanceof Error?t.message:String(t)})}}),_=z({mutationFn:async({email:t,otp:a})=>{const q=await b.signIn.emailOtp({email:t,otp:a});if(q.error)throw new Error(q.error.message||"Invalid code");return q},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??n},onError:t=>{P("email_otp_verify_failed",{error:t instanceof Error?t.message:String(t)})}}),T=t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),V=()=>{r.trim()&&!T(r)&&S("Invalid email address")},Z=t=>{if(t.preventDefault(),!T(r)){S("Invalid email address");return}R.mutate({email:r,password:y,name:w})},ee=t=>{if(t.preventDefault(),!T(r)){S("Invalid email address");return}U.mutate({email:r})},te=t=>{if(t.preventDefault(),!T(r)){S("Invalid email address");return}E.mutate({email:r})},se=t=>{t.preventDefault(),_.mutate({email:r,otp:A})},k=t=>a=>{t(a.target.value),G&&R.reset(),H&&U.reset(),J&&(E.reset(),_.reset()),t===j&&c&&S("")},M=t=>{N(t),C(""),O(""),L(!1),S(""),Y(!1),R.reset(),U.reset(),E.reset(),_.reset()},o=R.isPending||U.isPending||E.isPending||_.isPending,G=R.error,H=U.error,J=E.error||_.error,v=h?r.trim()&&y.trim()&&w.trim():p?r.trim():x?f?A.trim():r.trim():r.trim()&&y.trim(),ne=t=>{if(!t)return null;const a=t.message.toLowerCase();return a.includes("unauthorized")||a.includes("401")?"Invalid email or password. Please try again.":a.includes("already exists")||a.includes("409")?"An account with this email already exists. Try signing in instead.":a.includes("network")||a.includes("fetch")?"Network error. Please check your connection and try again.":a.includes("rate limit")||a.includes("429")?"Too many attempts. Please wait a moment and try again.":a.includes("invalid")&&a.includes("otp")?"Invalid or expired code. Please try again.":t.message||"An error occurred. Please try again."},K=G||H||J,re=p?"Reset your password":x&&f?"Enter verification code":"Welcome to deco",ae=p?"We'll send you a reset link":x&&f?`Code sent to ${r}`:"Sign in or create a new account";return e.jsxs("div",{className:"w-full grid gap-10",children:[e.jsxs("div",{children:[e.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),e.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-medium leading-8",children:re}),e.jsx("p",{className:"text-base text-muted-foreground leading-6",children:ae})]}),K&&e.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:ne(K)}),$&&e.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Check your email for a password reset link."}),!p&&!(x&&f)&&l.enabled&&e.jsx("div",{className:"grid gap-2",children:l.providers.map(t=>e.jsxs("button",{type:"button",disabled:o,onClick:()=>{b.signIn.social({provider:t.name,callbackURL:s??n})},className:"flex h-12 w-full items-center justify-center gap-3 rounded-xl bg-background dark:bg-input/30 px-3 text-sm font-medium text-foreground card-shadow transition-colors hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 disabled:opacity-50 disabled:pointer-events-none",children:[t.icon&&e.jsx("img",{src:t.icon,alt:"",className:B("h-5 w-5",t.name==="github"&&"dark:invert"),"aria-hidden":"true"}),"Continue with"," ",t.name.charAt(0).toUpperCase()+t.name.slice(1)]},t.name))}),!p&&!(x&&f)&&l.enabled&&(d.enabled||i.enabled)&&e.jsxs("div",{className:"flex items-center gap-2.5 -my-4",children:[e.jsx("div",{className:"h-px flex-1 bg-border"}),e.jsx("span",{className:"text-base text-muted-foreground",children:"or"}),e.jsx("div",{className:"h-px flex-1 bg-border"})]}),x&&i.enabled&&e.jsx(e.Fragment,{children:f?e.jsxs("form",{onSubmit:se,className:"grid gap-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:"Verification code"}),e.jsx(I,{type:"text",placeholder:"Enter code",value:A,onChange:k(O),required:!0,disabled:o,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),e.jsx("button",{type:"submit",disabled:o||!v,className:"flex h-12 w-full items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:opacity-50 disabled:pointer-events-none",children:o?"Verifying...":"Verify"}),e.jsx("button",{type:"button",onClick:()=>{L(!1),O(""),E.reset(),_.reset()},disabled:o,className:"mt-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Use a different email"})]}):e.jsxs("form",{onSubmit:te,className:"grid gap-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:"Email"}),e.jsx(I,{type:"email",placeholder:"Email address",value:r,onChange:k(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c,className:"h-11 rounded-lg"}),c&&e.jsx("p",{className:"text-xs text-destructive",children:c})]}),e.jsx("button",{type:"submit",disabled:o||!v,className:"flex h-12 w-full items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:opacity-50 disabled:pointer-events-none",children:o?"Sending...":"Send code"})]})}),p&&d.enabled&&!$&&e.jsxs("form",{onSubmit:ee,className:"grid gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:r,onChange:k(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c,className:"h-11 rounded-lg"}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsx(Q,{type:"submit",disabled:o||!v,className:"w-full font-semibold",size:"xl",children:o?"Sending...":"Send reset link"})]}),!p&&!x&&d.enabled&&e.jsxs("form",{onSubmit:Z,className:"grid gap-5",children:[h&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Name"}),e.jsx(I,{type:"text",placeholder:"Your name",value:w,onChange:k(C),required:!0,disabled:o,className:"h-11 rounded-lg"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:r,onChange:k(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c,className:"h-11 rounded-lg"}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Password"}),!h&&u.enabled&&e.jsx("button",{type:"button",onClick:()=>M("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Forgot password?"})]}),e.jsx(I,{type:"password",placeholder:"••••••••",value:y,onChange:k(D),required:!0,disabled:o,className:"h-11 rounded-lg"})]}),e.jsx("div",{className:B("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",v?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsx("div",{className:B("p-1",!v&&"pointer-events-none"),children:e.jsx(Q,{type:"submit",disabled:o||!v,className:B("w-full font-semibold"),size:"xl","aria-hidden":!v,children:o?h?"Creating account...":"Signing in...":"Continue"})})})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:p?e.jsx("button",{type:"button",onClick:()=>M("signIn"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:"Back to sign in"}):x&&d.enabled?e.jsx("button",{type:"button",onClick:()=>M("signIn"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:"Sign in with password instead"}):!x&&d.enabled?e.jsxs(e.Fragment,{children:[h?"Already have an account? ":"Don't have an account? ",e.jsx("button",{type:"button",onClick:()=>M(h?"signIn":"signUp"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:h?"Sign in":"Sign up"}),i.enabled&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"mx-2",children:"·"}),e.jsx("button",{type:"button",onClick:()=>M("emailOtp"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:"Sign in with email code"})]})]}):null})]})}function ue({redirectTo:s}){const[n,d]=m.useState(null);return m.useEffect(()=>{let u=!1;return(async()=>{try{let i;for(let l=0;l<5&&(i=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"}),!(i.ok||i.status<500));l++)await new Promise(r=>setTimeout(r,Math.min(1e3*2**l,1e4)));if(!i?.ok){const l=await i?.json().catch(()=>({}));throw new Error(l?.error||"Auto-login failed")}if(!u){const l=s.startsWith("/")&&!s.startsWith("//")?s:"/";window.location.href=l}}catch(i){u||d(i instanceof Error?i.message:"Auto-login failed")}})(),()=>{u=!0}},[s]),n?e.jsx("div",{className:"flex min-h-screen items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-destructive mb-2",children:["Auto-login failed: ",n]}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Try restarting the server."})]})}):e.jsx(W,{})}function me(s){if(!s.client_id||s.response_type!=="code")return null;const n=new URLSearchParams;return s.client_id&&n.set("client_id",s.client_id),s.redirect_uri&&n.set("redirect_uri",s.redirect_uri),s.response_type&&n.set("response_type",s.response_type),s.state&&n.set("state",s.state),s.scope&&n.set("scope",s.scope),s.code_challenge&&n.set("code_challenge",s.code_challenge),s.code_challenge_method&&n.set("code_challenge_method",s.code_challenge_method),`/api/auth/mcp/authorize?${n.toString()}`}function ge(s){const n=le.c(5),{callbackURL:d,providerId:u}=s;let i,l;n[0]!==d||n[1]!==u?(i=()=>{(async()=>await b.signIn.sso({providerId:u,callbackURL:d}))()},l=[u,d],n[0]=d,n[1]=u,n[2]=i,n[3]=l):(i=n[2],l=n[3]),m.useEffect(i,l);let r;return n[4]===Symbol.for("react.memo_cache_sentinel")?(r=e.jsx(W,{}),n[4]=r):r=n[4],r}function pe(){const s=b.useSession(),n=ie({from:"/login"}),{next:d="/",client_id:u,redirect_uri:i,response_type:l,state:r,scope:j,code_challenge:y,code_challenge_method:D}=n,w=d.startsWith("/")&&!d.startsWith("//")?d:"/",{sso:C,emailAndPassword:A,magicLink:O,emailOtp:f,socialProviders:L,localMode:F}=X(),N=me({client_id:u,redirect_uri:i,response_type:l,state:r,scope:j,code_challenge:y,code_challenge_method:D}),c=N||w;return s.data?N?(window.location.href=N,e.jsx(W,{})):e.jsx(oe,{to:w}):F?e.jsx(ue,{redirectTo:c}):C.enabled?e.jsx(ge,{callbackURL:c,providerId:C.providerId}):A.enabled||O.enabled||f.enabled||L.enabled?e.jsx(de,{children:e.jsx(ce,{redirectUrl:N,callbackUrl:w})}):e.jsx("div",{children:"No login options available"})}export{pe as default};
@@ -1,3 +1,3 @@
1
- import{W as zt,r as ce,q as fe,G as $e,b as $t,H as Dt,a as pe,t as ue,o as G,K as ie,j as s,B as Pe,e as Y,s as kt,n as Nt,c as ze,l as Ze,E as Ft}from"./index-BDVa6IeA.js";import{C as Ot}from"./collection-display-button-DsyBTfO4.js";import{S as Lt}from"./search-input-eC2FA3jg.js";import{P as Ee}from"./index-c6V6PMV9.js";import{C as qt}from"./collection-table-wrapper-CrH4z06q.js";import{E as Je}from"./empty-state-D0lbc9iO.js";import{D as Bt,i as Kt,a as Vt,b as Qt,c as Ut,d as Gt}from"./dialog-B1SAW5rX.js";import{a as Ht,F as ot,b as rt,c as Jt,d as ct,f as mt}from"./form-DrHlPeF0.js";import{d as Xe,S as et,a as tt,b as st,c as nt}from"./select-B-P2V8BM.js";import{T as Wt}from"./textarea-DwZ5CRUo.js";import{u as at}from"./use-org-auth-client-BmtZCQbc.js";import{u as Tt}from"./use-organization-roles-Br_eRGw7.js";import{u as Yt}from"./use-members-DFL1gJpq.js";import{u as De}from"./studio-tools-DXz4ADLj.js";import{T as Zt,a as Xt,c as es,b as ts}from"./tooltip-DyC38TuY.js";import{a as dt,e as ut,g as ft,b as ht,c as gt,d as pt,f as xt,A as bt}from"./alert-dialog-B4nGpuqy.js";import{A as Ke}from"./avatar-C8wTLH-Y.js";import{B as Qe}from"./badge-C_B5DGX7.js";import{C as jt}from"./card-CSSPEhBC.js";import{D as It,a as At,b as Mt,d as ss,e as ns,f as is,c as it,g as as}from"./dropdown-menu-Donnjq6j.js";import{i as Et}from"./DotsVertical-UOMzmPdL.js";import{i as ls}from"./Key01-CPGjX6ze.js";import{i as os}from"./Shield01-mBum1vLW.js";import{a as rs}from"./SwitchHorizontal01-BMMM3TLo.js";import{s as cs}from"./Trash01-Dh2vBIHv.js";import{s as Pt}from"./XClose-vL81XCVl.js";import{C as vt}from"./checkbox-BSUlBgmF.js";import{a as We,e as Ye,f as Ct,C as ms,d as ds,b as us,c as fs}from"./command-D3GXkonD.js";import{b as hs,P as gs,a as ps}from"./popover-CCStmbVg.js";import{t as xs}from"./ChevronDown-Lk04U11C.js";import{s as bs}from"./Plus-9-S3JWy-.js";import{R as js}from"./require-capability-bcG_hXfb.js";import"./Check-y8-QJq4u.js";import"./view-mode-toggle-CBdd-ysR.js";import"./SearchMd-TA_AwzOv.js";import"./sidebar-CO1-tv2S.js";import"./LayoutLeft-Cfg3KzYI.js";import"./sheet-B8fqQRiD.js";import"./X-Cur7ndLC.js";import"./table-1TzZ6vZ4.js";import"./label-D9v72DeM.js";import"./ChevronUp-C7bkcEQO.js";import"./User01-C4XoUCJZ.js";import"./ChevronRight-FIXGFOh_.js";import"./index-BVv6NwV7.js";import"./use-capability-DN7Jb_Vw.js";import"./access-gate-DB8PItXV.js";import"./capability-load-error-UM_Se0qo.js";const vs=zt().email("Invalid email address");function Cs(t){if(!t.trim())return[];const e=t.split(/[,;\n]/).map(n=>n.trim().toLowerCase()).filter(n=>n.length>0);return Array.from(new Set(e))}function ys({trigger:t}){const[e,n]=ce.useState(!1),{locator:l}=fe(),a=at(),i=$e(),{data:o}=$t.useSession(),c=o?.user?.email,{roles:p,isLoading:x}=Tt(),j=p.filter(m=>m.role!=="owner"),g=Dt({mode:"onChange",defaultValues:{emailsText:"",role:"user"}}),b=g.watch("emailsText"),M=g.watch("role"),v=Cs(b).filter(m=>{const r=vs.safeParse(m).success,f=!c||m!==c.toLowerCase();return r&&f}),N=pe({mutationFn:async({emails:m,role:r})=>{if(!r)throw new Error("Please select a role");const f=await Promise.allSettled(m.map(async w=>{const A=await a.organization.inviteMember({email:w,role:r});if(A.error)throw new Error(A.error.message);return A.data})),I=f.filter(w=>w.status==="rejected");if(I.length>0)throw new Error(`Failed to invite ${I.length} member${I.length>1?"s":""}`);return f},onSuccess:(m,{emails:r,role:f})=>{ue("member_invited",{count:r.length,role:f}),i.invalidateQueries({queryKey:ie.members(l)}),i.invalidateQueries({queryKey:ie.invitations(l)}),G.success(r.length===1?"Member invited successfully!":`${r.length} members invited successfully!`),g.reset({emailsText:"",role:"user"}),n(!1)},onError:(m,{emails:r,role:f})=>{ue("member_invite_failed",{count:r.length,role:f,error:m instanceof Error?m.message:String(m)}),G.error(m instanceof Error?m.message:"Failed to invite members")}}),y=m=>{if(v.length===0){G.error("Please enter at least one valid email address");return}if(!m.role){G.error("Please select a role");return}N.mutate({emails:v,role:m.role})},$=v.length>0&&!!M;return s.jsxs(Bt,{open:e,onOpenChange:n,children:[s.jsx(Kt,{asChild:!0,children:t}),s.jsxs(Vt,{className:"sm:max-w-lg",children:[s.jsx(Qt,{children:s.jsx(Ut,{children:"Invite members"})}),s.jsx(Ht,{...g,children:s.jsxs("form",{onSubmit:g.handleSubmit(y),className:"space-y-4",children:[s.jsx(ot,{control:g.control,name:"emailsText",render:({field:m})=>s.jsxs(rt,{children:[s.jsx(Jt,{children:"Email addresses"}),s.jsx(ct,{children:s.jsx(Wt,{...m,disabled:N.isPending,placeholder:`Enter email addresses separated by commas or new lines
1
+ import{W as zt,r as ce,q as fe,G as $e,b as $t,H as Dt,a as pe,t as ue,o as G,K as ie,j as s,B as Pe,e as Y,s as kt,n as Nt,c as ze,l as Ze,E as Ft}from"./index-IBt4YI87.js";import{C as Ot}from"./collection-display-button-kzgZUh8m.js";import{S as Lt}from"./search-input-M0Ie6ly-.js";import{P as Ee}from"./index-BkeZywFC.js";import{C as qt}from"./collection-table-wrapper-DEWhyWe_.js";import{E as Je}from"./empty-state-Dg8HHM9g.js";import{D as Bt,i as Kt,a as Vt,b as Qt,c as Ut,d as Gt}from"./dialog-BR_cEBrt.js";import{a as Ht,F as ot,b as rt,c as Jt,d as ct,f as mt}from"./form-Dk0zvzGa.js";import{d as Xe,S as et,a as tt,b as st,c as nt}from"./select-BCbLv4__.js";import{T as Wt}from"./textarea-DVqVYdU_.js";import{u as at}from"./use-org-auth-client-CBhb39AJ.js";import{u as Tt}from"./use-organization-roles-Bp84xvDx.js";import{u as Yt}from"./use-members-CMfQxSQX.js";import{u as De}from"./studio-tools-nLupF0VD.js";import{T as Zt,a as Xt,c as es,b as ts}from"./tooltip-uidgMYZs.js";import{a as dt,e as ut,g as ft,b as ht,c as gt,d as pt,f as xt,A as bt}from"./alert-dialog-BMks46p7.js";import{A as Ke}from"./avatar-DUHP1iU3.js";import{B as Qe}from"./badge-Cez0OzTb.js";import{C as jt}from"./card-CC-M7EZ6.js";import{D as It,a as At,b as Mt,d as ss,e as ns,f as is,c as it,g as as}from"./dropdown-menu-BR-D9W2L.js";import{i as Et}from"./DotsVertical-BNgAjlpf.js";import{i as ls}from"./Key01-CFH6lkz0.js";import{i as os}from"./Shield01-CDyxjwN4.js";import{a as rs}from"./SwitchHorizontal01-BJpif5Ll.js";import{s as cs}from"./Trash01-DU9k1Vtq.js";import{s as Pt}from"./XClose-6z0C_oDP.js";import{C as vt}from"./checkbox-CBeySlCT.js";import{a as We,e as Ye,f as Ct,C as ms,d as ds,b as us,c as fs}from"./command-D2-J-HVJ.js";import{b as hs,P as gs,a as ps}from"./popover-DVm7Ssxi.js";import{t as xs}from"./ChevronDown-CWdX7_sm.js";import{s as bs}from"./Plus-D6ZVo7op.js";import{R as js}from"./require-capability-C4iKMmpy.js";import"./Check-Dw5D9iXJ.js";import"./view-mode-toggle-YGR1OOUU.js";import"./SearchMd-CWML-MzT.js";import"./sidebar-DHtVfRt2.js";import"./LayoutLeft-Dr3sGtrV.js";import"./sheet-Dz53NwAL.js";import"./X-Bin-Wtwp.js";import"./table-BtBbNaqK.js";import"./label-CdfI63_J.js";import"./ChevronUp-CVZqh7eX.js";import"./User01-BUWoWpIi.js";import"./ChevronRight-tUvvDqzz.js";import"./index-C6xUYocu.js";import"./use-capability-Iy7S17lS.js";import"./access-gate-C8Ywr7l3.js";import"./capability-load-error-38UQQccw.js";const vs=zt().email("Invalid email address");function Cs(t){if(!t.trim())return[];const e=t.split(/[,;\n]/).map(n=>n.trim().toLowerCase()).filter(n=>n.length>0);return Array.from(new Set(e))}function ys({trigger:t}){const[e,n]=ce.useState(!1),{locator:l}=fe(),a=at(),i=$e(),{data:o}=$t.useSession(),c=o?.user?.email,{roles:p,isLoading:x}=Tt(),j=p.filter(m=>m.role!=="owner"),g=Dt({mode:"onChange",defaultValues:{emailsText:"",role:"user"}}),b=g.watch("emailsText"),M=g.watch("role"),v=Cs(b).filter(m=>{const r=vs.safeParse(m).success,f=!c||m!==c.toLowerCase();return r&&f}),N=pe({mutationFn:async({emails:m,role:r})=>{if(!r)throw new Error("Please select a role");const f=await Promise.allSettled(m.map(async w=>{const A=await a.organization.inviteMember({email:w,role:r});if(A.error)throw new Error(A.error.message);return A.data})),I=f.filter(w=>w.status==="rejected");if(I.length>0)throw new Error(`Failed to invite ${I.length} member${I.length>1?"s":""}`);return f},onSuccess:(m,{emails:r,role:f})=>{ue("member_invited",{count:r.length,role:f}),i.invalidateQueries({queryKey:ie.members(l)}),i.invalidateQueries({queryKey:ie.invitations(l)}),G.success(r.length===1?"Member invited successfully!":`${r.length} members invited successfully!`),g.reset({emailsText:"",role:"user"}),n(!1)},onError:(m,{emails:r,role:f})=>{ue("member_invite_failed",{count:r.length,role:f,error:m instanceof Error?m.message:String(m)}),G.error(m instanceof Error?m.message:"Failed to invite members")}}),y=m=>{if(v.length===0){G.error("Please enter at least one valid email address");return}if(!m.role){G.error("Please select a role");return}N.mutate({emails:v,role:m.role})},$=v.length>0&&!!M;return s.jsxs(Bt,{open:e,onOpenChange:n,children:[s.jsx(Kt,{asChild:!0,children:t}),s.jsxs(Vt,{className:"sm:max-w-lg",children:[s.jsx(Qt,{children:s.jsx(Ut,{children:"Invite members"})}),s.jsx(Ht,{...g,children:s.jsxs("form",{onSubmit:g.handleSubmit(y),className:"space-y-4",children:[s.jsx(ot,{control:g.control,name:"emailsText",render:({field:m})=>s.jsxs(rt,{children:[s.jsx(Jt,{children:"Email addresses"}),s.jsx(ct,{children:s.jsx(Wt,{...m,disabled:N.isPending,placeholder:`Enter email addresses separated by commas or new lines
2
2
  e.g. user1@example.com, user2@example.com
3
3
  or one per line`,className:"min-h-[120px] resize-none"})}),s.jsx(mt,{})]})}),s.jsx(ot,{control:g.control,name:"role",render:({field:m})=>s.jsxs(rt,{children:[s.jsx(ct,{children:s.jsxs(Xe,{value:m.value,onValueChange:m.onChange,disabled:N.isPending||x,children:[s.jsx(et,{className:"w-full",children:s.jsx(tt,{placeholder:"Select a role"})}),s.jsx(st,{children:j.map(r=>{const f=[];return r.isBuiltin||(r.allowsAllStaticPermissions?f.push("Full org access"):r.staticPermissionCount&&r.staticPermissionCount>0&&f.push(`${r.staticPermissionCount} org perm${r.staticPermissionCount!==1?"s":""}`),r.allowsAllConnections?f.push("All connections"):r.connectionCount&&r.connectionCount>0&&f.push(`${r.connectionCount} connection${r.connectionCount!==1?"s":""}`),(r.connectionCount!==0||r.allowsAllConnections)&&(r.allowsAllTools?f.push("all tools"):r.toolCount&&r.toolCount>0&&f.push(`${r.toolCount} tool${r.toolCount!==1?"s":""}`))),s.jsx(nt,{value:r.role,children:s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{children:r.label}),!r.isBuiltin&&f.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:f.join(", ")})]})},r.role)})})]})}),s.jsx(mt,{})]})}),s.jsxs(Gt,{children:[s.jsx(Pe,{variant:"outline",onClick:()=>{g.reset({emailsText:"",role:"user"}),n(!1)},type:"button",disabled:N.isPending,children:"Cancel"}),s.jsx(Pe,{type:"submit",disabled:N.isPending||!$,children:N.isPending?"Inviting...":`Invite ${v.length||0} Member${v.length!==1?"s":""}`})]})]})})]})]})}function Ss(){const t=Y.c(7),{locator:e}=fe(),n=De();let l;t[0]!==e?(l=ie.invitations(e),t[0]=e,t[1]=l):l=t[1];let a;t[2]!==n?(a=async()=>(await n.call("ORGANIZATION_GET",{}))?.invitations??[],t[2]=n,t[3]=a):a=t[3];let i;return t[4]!==l||t[5]!==a?(i={queryKey:l,queryFn:a},t[4]=l,t[5]=a,t[6]=i):i=t[6],kt(i)}function ws(){const t=Y.c(10),{locator:e}=fe(),n=at(),l=$e();let a;t[0]!==n?(a=async x=>{const j=await n.organization.cancelInvitation({invitationId:x});if(j?.error)throw new Error(j.error.message);return j.data},t[0]=n,t[1]=a):a=t[1];let i;t[2]!==e||t[3]!==l?(i=()=>{l.invalidateQueries({queryKey:ie.invitations(e)}),G.success("Invitation cancelled")},t[2]=e,t[3]=l,t[4]=i):i=t[4];let o;t[5]!==a||t[6]!==i?(o={mutationFn:a,onSuccess:i,onError:Ns},t[5]=a,t[6]=i,t[7]=o):o=t[7];const c=pe(o);let p;return t[8]!==c?(p={cancel:c},t[8]=c,t[9]=p):p=t[9],p}function Ns(t){G.error(t instanceof Error?t.message:"Failed to cancel invitation")}function Ts(){const t=Y.c(7),{locator:e}=fe(),n=De();let l;t[0]!==e?(l=ie.tags(e),t[0]=e,t[1]=l):l=t[1];let a;t[2]!==n?(a=async()=>{const{tags:o}=await n.call("TAGS_LIST",{});return o},t[2]=n,t[3]=a):a=t[3];let i;return t[4]!==l||t[5]!==a?(i={queryKey:l,queryFn:a,staleTime:3e4},t[4]=l,t[5]=a,t[6]=i):i=t[6],Nt(i)}function Is(){const t=Y.c(8),e=$e(),{locator:n}=fe(),l=De();let a;t[0]!==l?(a=async c=>{const{tag:p}=await l.call("TAGS_CREATE",{name:c});return p},t[0]=l,t[1]=a):a=t[1];let i;t[2]!==n||t[3]!==e?(i=()=>{e.invalidateQueries({queryKey:ie.tags(n)})},t[2]=n,t[3]=e,t[4]=i):i=t[4];let o;return t[5]!==a||t[6]!==i?(o={mutationFn:a,onSuccess:i,onError:As},t[5]=a,t[6]=i,t[7]=o):o=t[7],pe(o)}function As(t){G.error(t instanceof Error?t.message:"Failed to create tag")}function Ms(t){const e=Y.c(10),{locator:n}=fe(),l=De();let a;e[0]!==n||e[1]!==t?(a=ie.memberTags(n,t),e[0]=n,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==t||e[4]!==l?(i=async()=>{const{tags:p}=await l.call("MEMBER_TAGS_GET",{memberId:t});return p},e[3]=t,e[4]=l,e[5]=i):i=e[5];const o=!!t;let c;return e[6]!==a||e[7]!==i||e[8]!==o?(c={queryKey:a,queryFn:i,staleTime:3e4,enabled:o},e[6]=a,e[7]=i,e[8]=o,e[9]=c):c=e[9],Nt(c)}function Es(){const t=Y.c(8),e=$e(),{locator:n}=fe(),l=De();let a;t[0]!==l?(a=async c=>{const{memberId:p,tagIds:x}=c;return await l.call("MEMBER_TAGS_SET",{memberId:p,tagIds:x})},t[0]=l,t[1]=a):a=t[1];let i;t[2]!==n||t[3]!==e?(i=(c,p)=>{e.invalidateQueries({queryKey:ie.memberTags(n,p.memberId)})},t[2]=n,t[3]=e,t[4]=i):i=t[4];let o;return t[5]!==a||t[6]!==i?(o={mutationFn:a,onSuccess:i,onError:Ps},t[5]=a,t[6]=i,t[7]=o):o=t[7],pe(o)}function Ps(t){G.error(t instanceof Error?t.message:"Failed to update member tags")}function _t(t){const e=Y.c(44),{memberId:n,className:l,disabled:a,placeholder:i,maxDisplay:o}=t,c=a===void 0?!1:a,p=i===void 0?"Add tags...":i,x=o===void 0?2:o,[j,g]=ce.useState(!1),[b,M]=ce.useState(""),{data:R,isLoading:v}=Ts(),N=R===void 0?[]:R,{data:y,isLoading:$}=Ms(n),m=y===void 0?[]:y,r=Is(),f=Es(),I=v||$,w=m.map(Rs);let A;e[0]!==b?(A=S=>S.name.toLowerCase().includes(b.toLowerCase()),e[0]=b,e[1]=A):A=e[1];const z=N.filter(A);let T;e[2]!==b?(T=S=>S.name.toLowerCase()===b.toLowerCase(),e[2]=b,e[3]=T):T=e[3];const K=N.find(T),E=b.trim()&&!K,k=async S=>{const ge=w.includes(S.id)?w.filter(je=>je!==S.id):[...w,S.id];await f.mutateAsync({memberId:n,tagIds:ge})},P=async()=>{if(!b.trim())return;const S=await r.mutateAsync(b.trim());await f.mutateAsync({memberId:n,tagIds:[...w,S.id]}),M("")},d=async S=>{const ne=w.filter(ge=>ge!==S);await f.mutateAsync({memberId:n,tagIds:ne})},C=r.isPending||f.isPending,L=gs;let D;e[4]!==j?(D=()=>g(!j),e[4]=j,e[5]=D):D=e[5];let F;e[6]!==l?(F=ze("h-auto min-h-8 px-2 py-1 justify-start font-normal","hover:bg-accent/50",l),e[6]=l,e[7]=F):F=e[7];const V=c||I,O=I?s.jsx(Ze,{size:14,className:"animate-spin text-muted-foreground"}):m.length>0?s.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[m.slice(0,x).map(_s),m.length>x&&s.jsxs(Qe,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:["+",m.length-x]})]}):s.jsx("span",{className:"text-muted-foreground text-xs",children:p});let Q;e[8]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(xs,{size:14,className:"ml-1 shrink-0 opacity-50"}),e[8]=Q):Q=e[8];let q;e[9]!==V||e[10]!==O||e[11]!==D||e[12]!==F?(q=s.jsx(ps,{asChild:!0,children:s.jsxs(Pe,{variant:"ghost",size:"sm",onClick:D,className:F,disabled:V,children:[O,Q]})}),e[9]=V,e[10]=O,e[11]=D,e[12]=F,e[13]=q):q=e[13];const U=hs,H="w-56 p-0",J="start";let W;e[14]===Symbol.for("react.memo_cache_sentinel")?(W=()=>g(!1),e[14]=W):W=e[14];const ae=us,xe=!1;let Z;e[15]!==b?(Z=s.jsx(fs,{placeholder:"Search or create...",value:b,onValueChange:M,className:"h-9"}),e[15]=b,e[16]=Z):Z=e[16];const le=ds,me=m.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(We,{heading:"Selected",children:m.map(S=>s.jsx(Ye,{onSelect:()=>k(S),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center justify-between w-full",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(vt,{checked:!0,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:S.name})]}),s.jsx("button",{onClick:ne=>{ne.stopPropagation(),d(S.id)},className:"opacity-50 hover:opacity-100",disabled:C,children:s.jsx(Pt,{size:14})})]})},S.id))}),s.jsx(Ct,{})]}),_e=We,be="Available",Re=z.length===0&&!E&&s.jsx(ms,{children:"No tags found."}),he=z.filter(S=>!w.includes(S.id)).map(S=>s.jsx(Ye,{onSelect:()=>k(S),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(vt,{checked:!1,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:S.name})]})},S.id));let oe;e[17]!==_e||e[18]!==Re||e[19]!==he?(oe=s.jsxs(_e,{heading:be,children:[Re,he]}),e[17]=_e,e[18]=Re,e[19]=he,e[20]=oe):oe=e[20];let re;e[21]!==P||e[22]!==C||e[23]!==b||e[24]!==E?(re=E&&s.jsxs(s.Fragment,{children:[s.jsx(Ct,{}),s.jsx(We,{children:s.jsx(Ye,{onSelect:P,className:"cursor-pointer",disabled:C,children:s.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[C?s.jsx(Ze,{size:14,className:"animate-spin"}):s.jsx(bs,{size:14}),s.jsxs("span",{children:['Create "',b.trim(),'"']})]})})})]}),e[21]=P,e[22]=C,e[23]=b,e[24]=E,e[25]=re):re=e[25];let X;e[26]!==le||e[27]!==me||e[28]!==oe||e[29]!==re?(X=s.jsxs(le,{children:[me,oe,re]}),e[26]=le,e[27]=me,e[28]=oe,e[29]=re,e[30]=X):X=e[30];let ee;e[31]!==ae||e[32]!==Z||e[33]!==X?(ee=s.jsxs(ae,{shouldFilter:xe,children:[Z,X]}),e[31]=ae,e[32]=Z,e[33]=X,e[34]=ee):ee=e[34];let te;e[35]!==U||e[36]!==W||e[37]!==ee?(te=s.jsx(U,{className:H,align:J,onEscapeKeyDown:W,children:ee}),e[35]=U,e[36]=W,e[37]=ee,e[38]=te):te=e[38];let se;return e[39]!==L||e[40]!==j||e[41]!==q||e[42]!==te?(se=s.jsxs(L,{open:j,onOpenChange:g,children:[q,te]}),e[39]=L,e[40]=j,e[41]=q,e[42]=te,e[43]=se):se=e[43],se}function _s(t){return s.jsx(Qe,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:t.name},t.id)}function Rs(t){return t.id}const yt=["bg-neutral-400","bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500","bg-slate-500"],zs={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function Ve(t){return t?t.split(" ").map(e=>e[0]).join("").toUpperCase().slice(0,2):"?"}function $s(t){const e=new Map;for(const[n,l]of Object.entries(zs))e.set(n,l);for(let n=0;n<t.length;n++){const l=t[n];l&&!e.has(l.role)&&e.set(l.role,yt[n%yt.length]??"bg-neutral-400")}return e}function Ds(t){return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}function Be(t){const e=Y.c(79),{role:n,memberId:l,isOwner:a,roleColorMap:i,selectableRoles:o,onRoleChange:c,size:p,className:x}=t,j=p===void 0?"xs":p;let g,b,M,R,v,N,y,$,m,r,f;if(e[0]!==x||e[1]!==a||e[2]!==l||e[3]!==c||e[4]!==n||e[5]!==i||e[6]!==o||e[7]!==j){f=Symbol.for("react.early_return_sentinel");e:{const P=i.get(n)??"bg-neutral-400";if(a){let d;e[19]!==l||e[20]!==c?(d=H=>c(l,H),e[19]=l,e[20]=c,e[21]=d):d=e[21];let C;e[22]!==n?(C=s.jsx("span",{className:"capitalize truncate",children:n}),e[22]=n,e[23]=C):C=e[23];const L=s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx("div",{className:ze("size-2 rounded-full shrink-0",P)}),C]});let D;e[24]!==L?(D=s.jsx(tt,{children:L}),e[24]=L,e[25]=D):D=e[25];let F;e[26]!==x||e[27]!==j||e[28]!==D?(F=s.jsx(et,{size:j,className:x,children:D}),e[26]=x,e[27]=j,e[28]=D,e[29]=F):F=e[29];let V;if(e[30]!==i||e[31]!==o){let H;e[33]!==i?(H=J=>{const W=i.get(J.role)??"bg-neutral-400";return s.jsx(nt,{value:J.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:ze("size-3 rounded-full",W)}),s.jsx("span",{className:"capitalize",children:J.label})]})},J.role)},e[33]=i,e[34]=H):H=e[34],V=o.map(H),e[30]=i,e[31]=o,e[32]=V}else V=e[32];let O;e[35]!==V?(O=s.jsx(st,{children:V}),e[35]=V,e[36]=O):O=e[36];let Q;e[37]!==a||e[38]!==n||e[39]!==d||e[40]!==F||e[41]!==O?(Q=s.jsx(Zt,{asChild:!0,children:s.jsx("div",{className:"w-fit",children:s.jsxs(Xe,{value:n,onValueChange:d,disabled:a,children:[F,O]})})}),e[37]=a,e[38]=n,e[39]=d,e[40]=F,e[41]=O,e[42]=Q):Q=e[42];let q;e[43]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(Xt,{children:s.jsx("p",{children:"The owner role cannot be changed"})}),e[43]=q):q=e[43];let U;e[44]!==Q?(U=s.jsx(es,{children:s.jsxs(ts,{children:[Q,q]})}),e[44]=Q,e[45]=U):U=e[45],f=U;break e}M=Xe,$=n,e[46]!==l||e[47]!==c?(m=d=>c(l,d),e[46]=l,e[47]=c,e[48]=m):m=e[48],r=a,b=et,N=j,y=x,g=tt,v="flex items-center gap-2 min-w-0",R=ze("size-2 rounded-full shrink-0",P)}e[0]=x,e[1]=a,e[2]=l,e[3]=c,e[4]=n,e[5]=i,e[6]=o,e[7]=j,e[8]=g,e[9]=b,e[10]=M,e[11]=R,e[12]=v,e[13]=N,e[14]=y,e[15]=$,e[16]=m,e[17]=r,e[18]=f}else g=e[8],b=e[9],M=e[10],R=e[11],v=e[12],N=e[13],y=e[14],$=e[15],m=e[16],r=e[17],f=e[18];if(f!==Symbol.for("react.early_return_sentinel"))return f;let I;e[49]!==R?(I=s.jsx("div",{className:R}),e[49]=R,e[50]=I):I=e[50];let w;e[51]!==n?(w=s.jsx("span",{className:"capitalize truncate",children:n}),e[51]=n,e[52]=w):w=e[52];let A;e[53]!==I||e[54]!==w||e[55]!==v?(A=s.jsxs("div",{className:v,children:[I,w]}),e[53]=I,e[54]=w,e[55]=v,e[56]=A):A=e[56];let z;e[57]!==g||e[58]!==A?(z=s.jsx(g,{children:A}),e[57]=g,e[58]=A,e[59]=z):z=e[59];let T;e[60]!==b||e[61]!==z||e[62]!==N||e[63]!==y?(T=s.jsx(b,{size:N,className:y,children:z}),e[60]=b,e[61]=z,e[62]=N,e[63]=y,e[64]=T):T=e[64];let K;if(e[65]!==i||e[66]!==o){let P;e[68]!==i?(P=d=>{const C=i.get(d.role)??"bg-neutral-400";return s.jsx(nt,{value:d.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:ze("size-3 rounded-full",C)}),s.jsx("span",{className:"capitalize",children:d.label})]})},d.role)},e[68]=i,e[69]=P):P=e[69],K=o.map(P),e[65]=i,e[66]=o,e[67]=K}else K=e[67];let E;e[70]!==K?(E=s.jsx(st,{children:K}),e[70]=K,e[71]=E):E=e[71];let k;return e[72]!==M||e[73]!==T||e[74]!==E||e[75]!==$||e[76]!==m||e[77]!==r?(k=s.jsxs(M,{value:$,onValueChange:m,disabled:r,children:[T,E]}),e[72]=M,e[73]=T,e[74]=E,e[75]=$,e[76]=m,e[77]=r,e[78]=k):k=e[78],k}function St(t){const e=Y.c(51),{member:n,roles:l,onChangeRole:a,onRemove:i,isUpdating:o}=t,c=o===void 0?!1:o,p=n.role==="owner";let x,j,g,b,M,R,v,N,y;if(e[0]!==p||e[1]!==c||e[2]!==n.id||e[3]!==n.role||e[4]!==a||e[5]!==l){let T;e[15]!==n.role?(T=d=>d.role!==n.role&&d.role!=="owner",e[15]=n.role,e[16]=T):T=e[16];const K=l.filter(T);b=It;let E;e[17]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(Et,{size:20}),e[17]=E):E=e[17],e[18]!==p?(y=s.jsx(At,{asChild:!0,children:s.jsx(Pe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:p,onClick:Fs,children:E})}),e[18]=p,e[19]=y):y=e[19],g=Mt,v="end",N=ks,j=ss;let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(rs,{size:16}),e[20]=k):k=e[20],e[21]!==c?(R=s.jsxs(ns,{disabled:c,children:[k,"Change Role"]}),e[21]=c,e[22]=R):R=e[22],x=is;let P;e[23]!==c||e[24]!==n.id||e[25]!==a?(P=d=>{const C=[];return d.isBuiltin||(d.allowsAllStaticPermissions?C.push("Full org access"):d.staticPermissionCount&&d.staticPermissionCount>0&&C.push(`${d.staticPermissionCount} org perm${d.staticPermissionCount!==1?"s":""}`),d.allowsAllConnections?C.push("All connections"):d.connectionCount&&d.connectionCount>0&&C.push(`${d.connectionCount} connection${d.connectionCount!==1?"s":""}`),(d.connectionCount!==0||d.allowsAllConnections)&&(d.allowsAllTools?C.push("all tools"):d.toolCount&&d.toolCount>0&&C.push(`${d.toolCount} tool${d.toolCount!==1?"s":""}`))),s.jsxs(it,{onClick:L=>{L.stopPropagation(),a(n.id,d.role)},disabled:c,children:[d.isBuiltin?s.jsx(os,{size:16}):s.jsx(ls,{size:16}),s.jsxs("span",{className:"flex flex-col",children:[s.jsx("span",{children:d.label}),!d.isBuiltin&&C.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:C.join(", ")})]})]},d.role)},e[23]=c,e[24]=n.id,e[25]=a,e[26]=P):P=e[26],M=K.map(P),e[0]=p,e[1]=c,e[2]=n.id,e[3]=n.role,e[4]=a,e[5]=l,e[6]=x,e[7]=j,e[8]=g,e[9]=b,e[10]=M,e[11]=R,e[12]=v,e[13]=N,e[14]=y}else x=e[6],j=e[7],g=e[8],b=e[9],M=e[10],R=e[11],v=e[12],N=e[13],y=e[14];let $;e[27]!==x||e[28]!==M?($=s.jsx(x,{children:M}),e[27]=x,e[28]=M,e[29]=$):$=e[29];let m;e[30]!==j||e[31]!==R||e[32]!==$?(m=s.jsxs(j,{children:[R,$]}),e[30]=j,e[31]=R,e[32]=$,e[33]=m):m=e[33];let r;e[34]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(as,{}),e[34]=r):r=e[34];let f;e[35]!==n.id||e[36]!==i?(f=T=>{T.stopPropagation(),i(n.id)},e[35]=n.id,e[36]=i,e[37]=f):f=e[37];let I;e[38]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(cs,{size:16}),e[38]=I):I=e[38];let w;e[39]!==f?(w=s.jsxs(it,{variant:"destructive",onClick:f,children:[I,"Remove Member"]}),e[39]=f,e[40]=w):w=e[40];let A;e[41]!==g||e[42]!==w||e[43]!==v||e[44]!==N||e[45]!==m?(A=s.jsxs(g,{align:v,onClick:N,children:[m,r,w]}),e[41]=g,e[42]=w,e[43]=v,e[44]=N,e[45]=m,e[46]=A):A=e[46];let z;return e[47]!==b||e[48]!==A||e[49]!==y?(z=s.jsxs(b,{children:[y,A]}),e[47]=b,e[48]=A,e[49]=y,e[50]=z):z=e[50],z}function ks(t){return t.stopPropagation()}function Fs(t){return t.stopPropagation()}function wt(t){const e=Y.c(8),{invitationId:n,onCancel:l,isCancelling:a}=t,i=a===void 0?!1:a;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(At,{asChild:!0,children:s.jsx(Pe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ls,children:s.jsx(Et,{size:20})})}),e[0]=o):o=e[0];let c;e[1]!==n||e[2]!==l?(c=j=>{j.stopPropagation(),l(n)},e[1]=n,e[2]=l,e[3]=c):c=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Pt,{size:16}),e[4]=p):p=e[4];let x;return e[5]!==i||e[6]!==c?(x=s.jsxs(It,{children:[o,s.jsx(Mt,{align:"end",onClick:Os,children:s.jsxs(it,{variant:"destructive",onClick:c,disabled:i,children:[p,"Cancel Invitation"]})})]}),e[5]=i,e[6]=c,e[7]=x):x=e[7],x}function Os(t){return t.stopPropagation()}function Ls(t){return t.stopPropagation()}function qs(){const t=Y.c(101),{data:e}=Yt(),{data:n}=Ss(),l=ws(),a=$e(),{locator:i}=fe(),o=at(),[c,p]=ce.useState(null),[x,j]=ce.useState(null),[g,b]=ce.useState(""),[M,R]=ce.useState("table"),[v,N]=ce.useState("member"),[y,$]=ce.useState("asc"),m=e?.data?.members;let r;t[0]!==v?(r=u=>{v===u?$(Zs):(N(u),$("asc"))},t[0]=v,t[1]=r):r=t[1];const f=r;let I=m??[],w=n??[];if(g){const u=g.toLowerCase();I=I.filter(h=>h.user?.name?.toLowerCase().includes(u)||h.user?.email?.toLowerCase().includes(u)||h.role?.toLowerCase().includes(u)),w=w.filter(h=>h.email?.toLowerCase().includes(u)||h.role?.toLowerCase().includes(u))}if(v&&y){let u;t[2]!==y||t[3]!==v?(u=(h,_)=>{let B,de;e:switch(v){case"member":{B=h.user?.name||"",de=_.user?.name||"";break e}case"role":{B=h.role||"",de=_.role||"";break e}case"joined":{B=h.createdAt?typeof h.createdAt=="string"?h.createdAt:h.createdAt.toISOString():"",de=_.createdAt?typeof _.createdAt=="string"?_.createdAt:_.createdAt.toISOString():"";break e}default:return 0}return y==="asc"?B.localeCompare(de):de.localeCompare(B)},t[2]=y,t[3]=v,t[4]=u):u=t[4],I=[...I].sort(u)}const A=I;let z;t[5]!==o?(z=async u=>{const h=await o.organization.removeMember({memberIdOrEmail:u});if(h?.error)throw new Error(h.error.message)},t[5]=o,t[6]=z):z=t[6];let T;t[7]!==i||t[8]!==a?(T=()=>{ue("member_removed"),a.invalidateQueries({queryKey:ie.members(i)}),G.success("Member has been removed from the organization"),p(null)},t[7]=i,t[8]=a,t[9]=T):T=t[9];let K;t[10]!==z||t[11]!==T?(K={mutationFn:z,onSuccess:T,onError:Ys},t[10]=z,t[11]=T,t[12]=K):K=t[12];const E=pe(K);let k;t[13]!==o?(k=async u=>{const{memberId:h,role:_}=u,B=await o.organization.updateMemberRole({memberId:h,role:[_]});if(B?.error)throw new Error(B.error.message)},t[13]=o,t[14]=k):k=t[14];let P;t[15]!==i||t[16]!==a?(P=(u,h)=>{ue("member_role_updated",{new_role:h.role}),a.invalidateQueries({queryKey:ie.members(i)}),G.success("Member's role has been updated")},t[15]=i,t[16]=a,t[17]=P):P=t[17];let d;t[18]!==k||t[19]!==P?(d={mutationFn:k,onSuccess:P,onError:Ws},t[18]=k,t[19]=P,t[20]=d):d=t[20];const C=pe(d);let L;t[21]!==o?(L=async u=>{const{invitationId:h,role:_,email:B}=u,de=await o.organization.cancelInvitation({invitationId:h});if(de?.error)throw new Error(de.error.message);const lt=await o.organization.inviteMember({email:B,role:_});if(lt?.error)throw new Error(lt.error.message)},t[21]=o,t[22]=L):L=t[22];let D;t[23]!==i||t[24]!==a?(D=(u,h)=>{ue("invitation_role_updated",{new_role:h.role}),a.invalidateQueries({queryKey:ie.invitations(i)}),G.success("Invitation role has been updated")},t[23]=i,t[24]=a,t[25]=D):D=t[25];let F;t[26]!==L||t[27]!==D?(F={mutationFn:L,onSuccess:D,onError:Js},t[26]=L,t[27]=D,t[28]=F):F=t[28];const V=pe(F),{roles:O,customRoles:Q}=Tt();let q;t[29]!==Q?(q=$s(Q),t[29]=Q,t[30]=q):q=t[30];const U=q;let H;t[31]!==O?(H=O.filter(Hs),t[31]=O,t[32]=H):H=t[32];const J=H;let W;t[33]===Symbol.for("react.memo_cache_sentinel")?(W={id:"member",header:"Member",render:Gs,cellClassName:"flex-1 min-w-0",sortable:!0},t[33]=W):W=t[33];let ae;t[34]!==U||t[35]!==J||t[36]!==V||t[37]!==C?(ae={id:"role",header:"Role",render:u=>u.type==="member"?s.jsx(Be,{role:u.data.role,memberId:u.data.id,isOwner:u.data.role==="owner",roleColorMap:U,selectableRoles:J,onRoleChange:(h,_)=>C.mutate({memberId:h,role:_}),className:"w-36"}):s.jsx(Be,{role:u.data.role,memberId:u.data.id,isOwner:!1,roleColorMap:U,selectableRoles:J,onRoleChange:(h,_)=>V.mutate({invitationId:h,role:_,email:u.data.email}),className:"w-36"}),cellClassName:"w-36 shrink-0",sortable:!0},t[34]=U,t[35]=J,t[36]=V,t[37]=C,t[38]=ae):ae=t[38];let xe,Z;t[39]===Symbol.for("react.memo_cache_sentinel")?(xe={id:"tags",header:"Tags",render:Us,cellClassName:"w-40 shrink-0"},Z={id:"joined",header:"Joined",render:Qs,cellClassName:"w-48 shrink-0",sortable:!0},t[39]=xe,t[40]=Z):(xe=t[39],Z=t[40]);let le;t[41]!==l.cancel.isPending||t[42]!==O||t[43]!==C?(le={id:"actions",header:"",render:u=>u.type==="member"?s.jsx(St,{member:u.data,roles:O,onChangeRole:(h,_)=>C.mutate({memberId:h,role:_}),onRemove:p,isUpdating:C.isPending}):s.jsx(wt,{invitationId:u.data.id,onCancel:j,isCancelling:l.cancel.isPending}),cellClassName:"w-12 shrink-0"},t[41]=l.cancel.isPending,t[42]=O,t[43]=C,t[44]=le):le=t[44];let me;t[45]!==ae||t[46]!==le?(me=[W,ae,xe,Z,le],t[45]=ae,t[46]=le,t[47]=me):me=t[47];const _e=me;let be;t[48]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(ys,{trigger:s.jsx(Pe,{children:"Invite Member"})})}),t[48]=be):be=t[48];const Re=be,he=[...A.map(Vs),...w.filter(Ks).map(Bs)],oe=Ee,re=!!x;let X;t[49]===Symbol.for("react.memo_cache_sentinel")?(X=()=>j(null),t[49]=X):X=t[49];let ee;t[50]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsxs(ht,{children:[s.jsx(gt,{children:"Cancel Invitation"}),s.jsx(pt,{children:"Are you sure you want to cancel this invitation? The invitee will no longer be able to join the organization with this invitation."})]}),t[50]=ee):ee=t[50];let te;t[51]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx(xt,{children:"Keep Invitation"}),t[51]=te):te=t[51];let se;t[52]!==l.cancel||t[53]!==x?(se=()=>{x&&(l.cancel.mutate(x),j(null))},t[52]=l.cancel,t[53]=x,t[54]=se):se=t[54];let S;t[55]!==l.cancel.isPending||t[56]!==se?(S=s.jsxs(dt,{children:[ee,s.jsxs(ut,{children:[te,s.jsx(ft,{onClick:se,disabled:l.cancel.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Cancel Invitation"})]})]}),t[55]=l.cancel.isPending,t[56]=se,t[57]=S):S=t[57];let ne;t[58]!==re||t[59]!==S?(ne=s.jsx(bt,{open:re,onOpenChange:X,children:S}),t[58]=re,t[59]=S,t[60]=ne):ne=t[60];const ge=!!c;let je;t[61]===Symbol.for("react.memo_cache_sentinel")?(je=()=>p(null),t[61]=je):je=t[61];let ke;t[62]===Symbol.for("react.memo_cache_sentinel")?(ke=s.jsxs(ht,{children:[s.jsx(gt,{children:"Remove Member"}),s.jsx(pt,{children:"Are you sure you want to remove this member from the organization? This action cannot be undone."})]}),t[62]=ke):ke=t[62];let Fe;t[63]===Symbol.for("react.memo_cache_sentinel")?(Fe=s.jsx(xt,{children:"Cancel"}),t[63]=Fe):Fe=t[63];let ve;t[64]!==c||t[65]!==E?(ve=()=>c&&E.mutate(c),t[64]=c,t[65]=E,t[66]=ve):ve=t[66];let Ce;t[67]!==E.isPending||t[68]!==ve?(Ce=s.jsxs(dt,{children:[ke,s.jsxs(ut,{children:[Fe,s.jsx(ft,{onClick:ve,disabled:E.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Remove"})]})]}),t[67]=E.isPending,t[68]=ve,t[69]=Ce):Ce=t[69];let ye;t[70]!==ge||t[71]!==Ce?(ye=s.jsx(bt,{open:ge,onOpenChange:je,children:Ce}),t[70]=ge,t[71]=Ce,t[72]=ye):ye=t[72];const Ue=Ee,Ge=Ee,Rt="flex flex-col gap-6";let Se;t[73]===Symbol.for("react.memo_cache_sentinel")?(Se=s.jsx(Ee.Title,{children:"Members"}),t[73]=Se):Se=t[73];let Oe;t[74]===Symbol.for("react.memo_cache_sentinel")?(Oe=u=>{u.key==="Escape"&&(b(""),u.target.blur())},t[74]=Oe):Oe=t[74];let we;t[75]!==g?(we=s.jsx(Lt,{value:g,onChange:b,placeholder:"Search members...",className:"w-full md:w-[375px]",onKeyDown:Oe}),t[75]=g,t[76]=we):we=t[76];let Le;t[77]===Symbol.for("react.memo_cache_sentinel")?(Le=[{id:"member",label:"Name"},{id:"role",label:"Role"},{id:"joined",label:"Joined"}],t[77]=Le):Le=t[77];let Ne;t[78]!==f||t[79]!==y||t[80]!==v||t[81]!==M?(Ne=s.jsx(Ot,{viewMode:M,onViewModeChange:R,sortKey:v,sortDirection:y,onSort:f,sortOptions:Le}),t[78]=f,t[79]=y,t[80]=v,t[81]=M,t[82]=Ne):Ne=t[82];let Te;t[83]!==we||t[84]!==Ne?(Te=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[we,Ne]}),Re]}),t[83]=we,t[84]=Ne,t[85]=Te):Te=t[85];const He=M==="cards"?s.jsx("div",{children:he.length===0?s.jsx(Je,{title:"No members found",description:g?`No members match "${g}"`:"Invite members to get started."}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:he.map(u=>{if(u.type==="invitation")return s.jsxs(jt,{className:"transition-colors relative opacity-75",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(wt,{invitationId:u.data.id,onCancel:j,isCancelling:l.cancel.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(Ke,{fallback:Ve(u.data.email),shape:"circle",size:"lg",className:"shrink-0"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:u.data.email}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(Qe,{variant:"outline",className:"w-fit text-amber-600 border-amber-400",children:"Pending"})}),s.jsx(Be,{role:u.data.role,memberId:u.data.id,isOwner:!1,roleColorMap:U,selectableRoles:J,onRoleChange:(_,B)=>V.mutate({invitationId:_,role:B,email:u.data.email}),className:"w-fit"})]})]})]},`inv-${u.data.id}`);const h=u.data;return s.jsxs(jt,{className:"transition-colors relative",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(St,{member:h,roles:O,onChangeRole:(_,B)=>C.mutate({memberId:_,role:B}),onRemove:p,isUpdating:C.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(Ke,{url:h.user?.image??void 0,fallback:Ve(h.user?.name),shape:"circle",size:"lg",className:"shrink-0"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:h.user?.name||"Unknown"}),s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:h.user?.email}),s.jsx(Be,{role:h.role,memberId:h.id,isOwner:h.role==="owner",roleColorMap:U,selectableRoles:J,onRoleChange:(_,B)=>C.mutate({memberId:_,role:B}),className:"w-fit"}),s.jsx(_t,{memberId:h.id,maxDisplay:3})]})]})]},h.id)})})}):s.jsx(qt,{columns:_e,data:he,isLoading:!1,sortKey:v,sortDirection:y,onSort:f,emptyState:g?s.jsx(Je,{title:"No members found",description:`No members match "${g}"`}):s.jsx(Je,{title:"No members found",description:"Invite members to get started."})});let Ie;t[86]!==Se||t[87]!==Te||t[88]!==He?(Ie=s.jsxs("div",{className:Rt,children:[Se,Te,He]}),t[86]=Se,t[87]=Te,t[88]=He,t[89]=Ie):Ie=t[89];let Ae;t[90]!==Ge.Body||t[91]!==Ie?(Ae=s.jsx(Ge.Body,{children:Ie}),t[90]=Ge.Body,t[91]=Ie,t[92]=Ae):Ae=t[92];let Me;t[93]!==Ue.Content||t[94]!==Ae?(Me=s.jsx(Ue.Content,{children:Ae}),t[93]=Ue.Content,t[94]=Ae,t[95]=Me):Me=t[95];let qe;return t[96]!==oe||t[97]!==ne||t[98]!==ye||t[99]!==Me?(qe=s.jsxs(oe,{children:[ne,ye,Me]}),t[96]=oe,t[97]=ne,t[98]=ye,t[99]=Me,t[100]=qe):qe=t[100],qe}function Bs(t){return{type:"invitation",data:t}}function Ks(t){return t.status==="pending"}function Vs(t){return{type:"member",data:t}}function Qs(t){return t.type==="member"?s.jsx("span",{className:"text-sm text-foreground",children:t.data.createdAt?Ds(t.data.createdAt):"N/A"}):s.jsx(Qe,{variant:"outline",children:"Pending"})}function Us(t){return t.type==="member"?s.jsx(_t,{memberId:t.data.id,maxDisplay:2}):s.jsx("span",{className:"text-xs text-muted-foreground",children:"-"})}function Gs(t){return t.type==="member"?s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Ke,{url:t.data.user?.image??void 0,fallback:Ve(t.data.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.data.user?.name||"Unknown"}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.data.user?.email})]})]}):s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Ke,{fallback:Ve(t.data.email),shape:"circle",size:"sm"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.data.email}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:"Invitation sent"})]})]})}function Hs(t){return t.role!=="owner"}function Js(t,e){ue("invitation_role_update_failed",{new_role:e.role,error:t instanceof Error?t.message:String(t)}),G.error(t instanceof Error?t.message:"Failed to update invitation role")}function Ws(t,e){ue("member_role_update_failed",{new_role:e.role,error:t instanceof Error?t.message:String(t)}),G.error(t instanceof Error?t.message:"Failed to update role")}function Ys(t){ue("member_remove_failed",{error:t instanceof Error?t.message:String(t)}),G.error(t instanceof Error?t.message:"Failed to remove member")}function Zs(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function Xs(){const t=Y.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ee,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:"Failed to load members"})})}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Ft,{fallback:e,children:s.jsx(ce.Suspense,{fallback:s.jsx(Ee,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Ze,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(qs,{})})}),t[1]=n):n=t[1],n}function Jn(){const t=Y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(js,{capability:"members:manage",area:"members",children:s.jsx(Xs,{})}),t[0]=e):e=t[0],e}export{Jn as default};
@@ -1,4 +1,4 @@
1
- import{r as c,e as $,j as f,_ as O}from"./index-BDVa6IeA.js";import{l as I,F as K}from"./index-BtVysB8D.js";import{S as N}from"./spinner-ClM1tRKH.js";async function A(t){const e=t.getModel();if(!e)throw new Error("[Monaco] No model found in editor");const r=e.getValue(),i=r.replace(/export default (async )?function/,"export default $1function __default")+`
1
+ import{r as c,e as $,j as f,_ as O}from"./index-IBt4YI87.js";import{l as I,F as K}from"./index-DaTAhfCb.js";import{S as N}from"./spinner-Bjb2nwEj.js";async function A(t){const e=t.getModel();if(!e)throw new Error("[Monaco] No model found in editor");const r=e.getValue(),i=r.replace(/export default (async )?function/,"export default $1function __default")+`
2
2
  type __ExpandRecursively<T> = T extends (...args: infer A) => infer R
3
3
  ? (...args: __ExpandRecursively<A>) => __ExpandRecursively<R>
4
4
  : T extends object