@decocms/mesh 1.3.1 → 1.3.2

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 (119) hide show
  1. package/dist/client/assets/{AlertCircle-DoPcYOmu.js → AlertCircle-BMr3-fpA.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-Cho91gJm.js → ArrowLeft-BwQg_SOY.js} +1 -1
  3. package/dist/client/assets/{ChevronDown--_znWqhO.js → ChevronDown-BjyTHawB.js} +1 -1
  4. package/dist/client/assets/{Clock-OrKCoBnu.js → Clock-BqL_Iy4b.js} +1 -1
  5. package/dist/client/assets/{Code01-COExI_48.js → Code01-DkmFiQmz.js} +1 -1
  6. package/dist/client/assets/{Copy01-CdCXGmeI.js → Copy01-D2K_Muqy.js} +1 -1
  7. package/dist/client/assets/{CpuChip02-D26L6TWX.js → CpuChip02-C_MNm5X3.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-kYh71Jmo.js → DotsVertical-D0NEibaO.js} +1 -1
  9. package/dist/client/assets/{File06-D4-QxuCL.js → File06-CXgKQ6DN.js} +1 -1
  10. package/dist/client/assets/{GitBranch01-irv8ZOt4.js → GitBranch01-BUSTYQYz.js} +1 -1
  11. package/dist/client/assets/{Inbox01-CEpI9Sk9.js → Inbox01-CBPg2mpL.js} +1 -1
  12. package/dist/client/assets/{InfoCircle-BH6ukjrt.js → InfoCircle-COZlVleH.js} +1 -1
  13. package/dist/client/assets/{Key01-BvGYoGe8.js → Key01-BperTm8i.js} +1 -1
  14. package/dist/client/assets/{LinkExternal01-C8zs3bR9.js → LinkExternal01-CYB_l3HF.js} +1 -1
  15. package/dist/client/assets/{Loading01-DcFBMaXj.js → Loading01-C4j07Rkx.js} +1 -1
  16. package/dist/client/assets/{Lock01-IqrEd301.js → Lock01-CFQ55MXh.js} +1 -1
  17. package/dist/client/assets/{Play-0EPVk_yg.js → Play-BZ988K1v.js} +1 -1
  18. package/dist/client/assets/{Plus-C--SWih9.js → Plus-mxlUVGel.js} +1 -1
  19. package/dist/client/assets/{SearchMd-DiJjEUCs.js → SearchMd-COBfbXbx.js} +1 -1
  20. package/dist/client/assets/{Terminal-Fx0j4vYu.js → Terminal-RcHlyPBU.js} +1 -1
  21. package/dist/client/assets/{Trash01-ClQp3SU7.js → Trash01-CyKI-_BM.js} +1 -1
  22. package/dist/client/assets/{Upload01-qHdORxg4.js → Upload01-Ck1Svxew.js} +1 -1
  23. package/dist/client/assets/{X-tggfklJn.js → X-BXO-lbAK.js} +1 -1
  24. package/dist/client/assets/{XClose-8ptd0_kG.js → XClose-C64sfNMR.js} +1 -1
  25. package/dist/client/assets/{alert-dialog-BTnJ6w_s.js → alert-dialog-P1n_1JT7.js} +1 -1
  26. package/dist/client/assets/assistant-DpkEh-Jl.js +1 -0
  27. package/dist/client/assets/{auth-DaJav-_Q.js → auth-DP47SEOm.js} +1 -1
  28. package/dist/client/assets/{auth-catchall-Bi1SQUCA.js → auth-catchall-CfVXVPNH.js} +1 -1
  29. package/dist/client/assets/{avatar-CuTiSc9V.js → avatar-_GsuhjwG.js} +1 -1
  30. package/dist/client/assets/{badge-pWud7F0k.js → badge-DC5bHjau.js} +1 -1
  31. package/dist/client/assets/binding-collection-view-MAfjU-3d.js +1 -0
  32. package/dist/client/assets/{button-DoEGRp1U.js → button-dzqjSoP9.js} +1 -1
  33. package/dist/client/assets/{card-CJ-1atZv.js → card-C7renjvY.js} +1 -1
  34. package/dist/client/assets/{checkbox-Bh9rcCG9.js → checkbox-DAye6Bhs.js} +1 -1
  35. package/dist/client/assets/{collection-detail-7RgcpBz4.js → collection-detail-CCxtFEtB.js} +40 -40
  36. package/dist/client/assets/{collection-display-button-B5AAU4Bw.js → collection-display-button-DuYSBdla.js} +1 -1
  37. package/dist/client/assets/{collection-header-Buxr9MZE.js → collection-header-BmMDhAGN.js} +1 -1
  38. package/dist/client/assets/{collection-page-BUbDWask.js → collection-page-Cn_-fCfu.js} +1 -1
  39. package/dist/client/assets/{collection-search-DivVKI30.js → collection-search-B8kQUh1o.js} +1 -1
  40. package/dist/client/assets/collection-tab-CuS_mYhN.js +1 -0
  41. package/dist/client/assets/{collection-table-wrapper-lGkt7E0b.js → collection-table-wrapper-BxibriYd.js} +1 -1
  42. package/dist/client/assets/{connection-card-BQhG2Xa_.js → connection-card-DJnmbeP6.js} +1 -1
  43. package/dist/client/assets/connection-detail-BEAx4Rx8.js +1 -0
  44. package/dist/client/assets/{connections-BASUKxPo.js → connections-DhcecQtM.js} +1 -1
  45. package/dist/client/assets/constants-BVChjGeA.js +1 -0
  46. package/dist/client/assets/{core-DL7Okp2L.js → core-BmgwoN2D.js} +1 -1
  47. package/dist/client/assets/{create-organization-dialog-Dds34l1N.js → create-organization-dialog-C1_fICTk.js} +1 -1
  48. package/dist/client/assets/{dialog-DzOmePFm.js → dialog-CjFuRpNq.js} +1 -1
  49. package/dist/client/assets/{dropdown-menu-B9LS1Ke-.js → dropdown-menu-6B5tpY1h.js} +1 -1
  50. package/dist/client/assets/empty-state-D7F--R-i.js +1 -0
  51. package/dist/client/assets/{env-vars-editor-D8jKdEG-.js → env-vars-editor-CA1M7xF4.js} +1 -1
  52. package/dist/client/assets/{error-boundary-BAtxRJ1Q.js → error-boundary-Kj4QesDI.js} +1 -1
  53. package/dist/client/assets/extract-connection-data-DoCNquGq.js +1 -0
  54. package/dist/client/assets/{form-9MqLiR_v.js → form-DNs0FRpn.js} +1 -1
  55. package/dist/client/assets/formatDistanceToNow-ctvTO9qt.js +1 -0
  56. package/dist/client/assets/gateway-detail-e5GW9_16.js +1 -0
  57. package/dist/client/assets/{gateways-Z3eqRHG3.js → gateways-potF35CW.js} +1 -1
  58. package/dist/client/assets/{home-CKPwY7YW.js → home-CZCW3yxr.js} +1 -1
  59. package/dist/client/assets/{index-IkrlX4J3.js → index--kROx8O6.js} +15 -15
  60. package/dist/client/assets/{index-v-MZw8Iv.js → index-C5Ye_Yv8.js} +1 -1
  61. package/dist/client/assets/index-DNNzqGj5.js +25 -0
  62. package/dist/client/assets/{index-Cu-lUDuQ.js → index-DYEBIV-t.js} +1 -1
  63. package/dist/client/assets/{input-BiKrjh13.js → input-Dos1YqM9.js} +1 -1
  64. package/dist/client/assets/json-BSW9cMnN.js +1 -0
  65. package/dist/client/assets/{json-syntax-highlighter-DKWpZiaG.js → json-syntax-highlighter-DOX4DGR6.js} +2 -2
  66. package/dist/client/assets/{layout-DnHkkkij.js → layout-C2pQBqt8.js} +1 -1
  67. package/dist/client/assets/{lazy-highlighter-B7M4_4X7.js → lazy-highlighter-BeoVpvw-.js} +1 -1
  68. package/dist/client/assets/{localstorage-keys-C9gCmhF_.js → localstorage-keys-Cl6fG_mC.js} +1 -1
  69. package/dist/client/assets/{login-CAWaGgdX.js → login-BkePM8bd.js} +1 -1
  70. package/dist/client/assets/{mcp-oauth-BeIYwRKY.js → mcp-oauth-BAFvA0-x.js} +1 -1
  71. package/dist/client/assets/{members-DuEm4VkF.js → members-DOlpKNSi.js} +1 -1
  72. package/dist/client/assets/{monitoring-m_4t86_p.js → monitoring-C60hZcZG.js} +1 -1
  73. package/dist/client/assets/{oauth-callback-CDIYayLa.js → oauth-callback-Mr11rTZP.js} +1 -1
  74. package/dist/client/assets/{page-C3RAYK9Q.js → page-BxWTpniF.js} +1 -1
  75. package/dist/client/assets/pin-to-sidebar-button-DFstuxz9.js +1 -0
  76. package/dist/client/assets/{popover-DtVun_-z.js → popover-Bflc8KYR.js} +1 -1
  77. package/dist/client/assets/prism-light-CKgeoQoL.js +1 -0
  78. package/dist/client/assets/{resizable-ADGi5uO6.js → resizable-CZ3q7UHO.js} +5 -5
  79. package/dist/client/assets/{resource-tabs-B0Wxp2Cw.js → resource-tabs-C7YApwd6.js} +1 -1
  80. package/dist/client/assets/{select-C6oJSPpc.js → select-Bd0A4qyi.js} +1 -1
  81. package/dist/client/assets/{settings-DpVdsR8r.js → settings-Bzv9x0Xx.js} +1 -1
  82. package/dist/client/assets/shell-layout-JAlTNvh1.js +19 -0
  83. package/dist/client/assets/{spinner-BI2cvb0U.js → spinner-DssEQupg.js} +1 -1
  84. package/dist/client/assets/{store-RumD0h8V.js → store-DDomUn8i.js} +1 -1
  85. package/dist/client/assets/store-app-detail-Cvn5_uEK.js +1 -0
  86. package/dist/client/assets/{switch-CICUEk-x.js → switch-jY_WtmSF.js} +1 -1
  87. package/dist/client/assets/{textarea-DYZxZLq1.js → textarea-CRl6hqQJ.js} +1 -1
  88. package/dist/client/assets/{tools-list-B1pdeGzm.js → tools-list-cySZCndz.js} +1 -1
  89. package/dist/client/assets/{tooltip-DsFBYF2A.js → tooltip-wl_T0hkj.js} +1 -1
  90. package/dist/client/assets/{types-BwKekgcj.js → types-C2--1o8t.js} +1 -1
  91. package/dist/client/assets/{use-binding-CQxg2gSi.js → use-binding-DHbkm4TE.js} +1 -1
  92. package/dist/client/assets/{use-connection-B7SaX83w.js → use-connection-DwuFVoxD.js} +1 -1
  93. package/dist/client/assets/{use-connection-resources-B6GNOl9A.js → use-connection-resources-6iOIsQA9.js} +1 -1
  94. package/dist/client/assets/{use-gateway-BlseD0Sx.js → use-gateway-C48kcbNv.js} +1 -1
  95. package/dist/client/assets/{use-list-state-BU6IyL55.js → use-list-state-DC-EnrYi.js} +1 -1
  96. package/dist/client/assets/{use-mcp-C2f_uqzY.js → use-mcp-LjTWLNoY.js} +1 -1
  97. package/dist/client/assets/{use-members-CWSu_Z-H.js → use-members-k3Q2xXPW.js} +1 -1
  98. package/dist/client/assets/{use-mobile-CdiMQ9En.js → use-mobile-Bmxp2FgH.js} +1 -1
  99. package/dist/client/assets/{use-organization-settings-Cnjs0OiP.js → use-organization-settings-0ztRQ3i7.js} +1 -1
  100. package/dist/client/assets/{use-tool-call-BpBoE-Mi.js → use-tool-call-D1etRfCY.js} +1 -1
  101. package/dist/client/assets/useQuery-5Z2U7Q-f.js +1 -0
  102. package/dist/client/assets/{useSuspenseInfiniteQuery-0wQdaodf.js → useSuspenseInfiniteQuery-Br-4aSkX.js} +1 -1
  103. package/dist/client/assets/{view-mode-toggle-Dq1mWwHt.js → view-mode-toggle-D13jhPxd.js} +1 -1
  104. package/dist/client/assets/{well-known-mcp-DX3tGGx0.js → well-known-mcp-D13f-8h2.js} +1 -1
  105. package/dist/client/assets/workflow-COhnt_Eq.js +1 -0
  106. package/dist/client/index.html +1 -1
  107. package/dist/server/cli.js +124 -124
  108. package/dist/server/server.js +4 -4
  109. package/package.json +1 -1
  110. package/dist/client/assets/connection-detail-DWS__uKs.js +0 -1
  111. package/dist/client/assets/extract-connection-data-lX5EQrvR.js +0 -1
  112. package/dist/client/assets/formatDistanceToNow-D7en5Npb.js +0 -1
  113. package/dist/client/assets/gateway-detail-CxcoEeja.js +0 -1
  114. package/dist/client/assets/index-Bp5sMtgd.js +0 -25
  115. package/dist/client/assets/json-C3gxFz3i.js +0 -1
  116. package/dist/client/assets/prism-light-BDjQ_TVh.js +0 -1
  117. package/dist/client/assets/shell-layout-UFhBDwon.js +0 -19
  118. package/dist/client/assets/store-app-detail-C0Bjj1dL.js +0 -1
  119. package/dist/client/assets/useQuery-9D_KMlJN.js +0 -1
@@ -1 +0,0 @@
1
- import{a3 as o}from"./index-IkrlX4J3.js";import{r}from"./json-BESjz4hO.js";var s=r();const e=o(s);export{e as default};
@@ -1 +0,0 @@
1
- import{r as o,h as i}from"./core-DL7Okp2L.js";import{a3 as s}from"./index-IkrlX4J3.js";var g=o();const t=s(g);var e=i(t,{});e.registerLanguage=function(a,r){return t.register(r)};e.alias=function(a,r){return t.alias(a,r)};export{e as default};
@@ -1,19 +0,0 @@
1
- import{r as y,c as p,e as nt,d as ce,K as we,t as Q,j as o,f as ne,a as X,g as at,R as ot,T as lt,D as rt,C as it,P as ct,h as dt,O as mt,i as ut,k as ft,l as ht,m as pt,G as xt,U as gt,n as bt,S as Ce,o as vt,p as jt,N as wt,q as Ct,s as Se}from"./index-IkrlX4J3.js";import{O as St,a as yt,g as Nt}from"./well-known-mcp-DX3tGGx0.js";import{g as _t}from"./generate-id-Dyweu44Y.js";import{i as kt,E as It}from"./SearchMd-DiJjEUCs.js";import{u as $t,a as Tt,I as fe,n as Mt}from"./use-connection-B7SaX83w.js";import{u as ae,L as oe}from"./localstorage-keys-C9gCmhF_.js";import{u as J,T as Ot,a as zt,b as Rt,c as Dt,L as he,i as Pt,P as Et,O as At}from"./tooltip-DsFBYF2A.js";import{B as W,c as $}from"./button-DoEGRp1U.js";import{i as re}from"./CpuChip02-D26L6TWX.js";import{i as Lt}from"./Loading01-DcFBMaXj.js";import{s as Bt}from"./Plus-C--SWih9.js";import{i as se}from"./X-tggfklJn.js";import{u as Ut}from"./use-binding-CQxg2gSi.js";import{C as D,u as pe,a as Ht,b as Gt,c as Vt,d as Wt,G as Ft,M as Kt,U as Yt,e as Zt,I as qt,D as Qt,f as Xt,g as Jt,h as es,i as ts,j as ss,R as ye,k as ns,l as as,m as os}from"./resizable-ADGi5uO6.js";import{E as de}from"./error-boundary-BAtxRJ1Q.js";import{P as Ne,a as _e,b as ke}from"./popover-DtVun_-z.js";import{s as ls}from"./Clock-OrKCoBnu.js";import{s as rs}from"./Trash01-ClQp3SU7.js";import{i as is}from"./File06-D4-QxuCL.js";import{u as ee}from"./use-mobile-CdiMQ9En.js";import{u as Ie,a as cs}from"./use-organization-settings-Cnjs0OiP.js";import{C as ds}from"./create-organization-dialog-Dds34l1N.js";import{I as ms}from"./input-BiKrjh13.js";import{A as Z}from"./avatar-CuTiSc9V.js";import{c as us,D as fs,a as hs,b as ps,d as xs,e as xe}from"./dropdown-menu-B9LS1Ke-.js";import{a as gs}from"./Copy01-CdCXGmeI.js";import{n as ge}from"./LinkExternal01-C8zs3bR9.js";import{D as $e,a as Te,b as Me,c as Oe,d as ze}from"./dialog-DzOmePFm.js";import"./useQuery-9D_KMlJN.js";import"./auth-DaJav-_Q.js";import"./use-gateway-BlseD0Sx.js";import"./AlertCircle-DoPcYOmu.js";import"./textarea-DYZxZLq1.js";import"./Terminal-Fx0j4vYu.js";import"./connection-card-BQhG2Xa_.js";import"./card-CJ-1atZv.js";import"./json-syntax-highlighter-DKWpZiaG.js";import"./alert-dialog-BTnJ6w_s.js";import"./select-C6oJSPpc.js";import"./ChevronDown--_znWqhO.js";import"./InfoCircle-BH6ukjrt.js";import"./form-9MqLiR_v.js";import"./spinner-BI2cvb0U.js";const Re=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M9 7H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 7.76 3 8.04 3 8.6v10.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21H9m0 0h6m-6 0V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 3 10.04 3 10.6 3h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 3.76 15 4.04 15 4.6V21m0-10h4.4c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C21 11.76 21 12.04 21 12.6v6.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C20.24 21 19.96 21 19.4 21H15"}));Re.displayName="BarChart10";const De=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M15 21v-5.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 14 13.96 14 13.4 14h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 14.76 9 15.04 9 15.6V21M3 7a3 3 0 0 0 6 0 3 3 0 1 0 6 0 3 3 0 1 0 6 0M6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3H6.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21Z"}));De.displayName="Building02";const Pe=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));Pe.displayName="ChevronSelectorVertical";const Ee=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M2 12h20M2 12c0 5.523 4.477 10 10 10M2 12C2 6.477 6.477 2 12 2m10 10c0 5.523-4.477 10-10 10m10-10c0-5.523-4.477-10-10-10m0 0a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10m0-20a15.3 15.3 0 0 0-4 10 15.3 15.3 0 0 0 4 10"}));Ee.displayName="Globe01";const Ae=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M9 21v-7.4c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 12 10.04 12 10.6 12h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 12.76 15 13.04 15 13.6V21M11.018 2.764 4.235 8.039c-.453.353-.68.53-.843.75a2 2 0 0 0-.318.65C3 9.704 3 9.991 3 10.565V17.8c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8v-7.235c0-.574 0-.861-.074-1.126a2.002 2.002 0 0 0-.318-.65c-.163-.22-.39-.397-.843-.75l-6.783-5.275c-.351-.273-.527-.41-.72-.462a1 1 0 0 0-.523 0c-.194.052-.37.189-.721.462Z"}));Ae.displayName="Home02";const Le=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));Le.displayName="LayoutRight";const Be=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m0-9H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H9"}));Be.displayName="LogOut01";const Ue=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m2 7 8.165 5.715c.661.463.992.695 1.351.784a2 2 0 0 0 .968 0c.36-.09.69-.32 1.351-.784L22 7M6.8 20h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 17.72 22 16.88 22 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 4 18.88 4 17.2 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 20 5.12 20 6.8 20Z"}));Ue.displayName="Mail01";const He=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}),y.createElement("path",{d:"M18.727 14.727a1.5 1.5 0 0 0 .3 1.655l.055.054a1.816 1.816 0 0 1 0 2.573 1.818 1.818 0 0 1-2.573 0l-.055-.055a1.5 1.5 0 0 0-1.654-.3 1.5 1.5 0 0 0-.91 1.373v.155a1.818 1.818 0 1 1-3.636 0V20.1a1.5 1.5 0 0 0-.981-1.373 1.5 1.5 0 0 0-1.655.3l-.054.055a1.818 1.818 0 0 1-3.106-1.287 1.818 1.818 0 0 1 .533-1.286l.054-.055a1.5 1.5 0 0 0 .3-1.654 1.5 1.5 0 0 0-1.372-.91h-.155a1.818 1.818 0 1 1 0-3.636H3.9a1.5 1.5 0 0 0 1.373-.981 1.5 1.5 0 0 0-.3-1.655l-.055-.054A1.818 1.818 0 1 1 7.491 4.99l.054.054a1.5 1.5 0 0 0 1.655.3h.073a1.5 1.5 0 0 0 .909-1.372v-.155a1.818 1.818 0 0 1 3.636 0V3.9a1.499 1.499 0 0 0 .91 1.373 1.5 1.5 0 0 0 1.654-.3l.054-.055a1.817 1.817 0 0 1 2.573 0 1.819 1.819 0 0 1 0 2.573l-.055.054a1.5 1.5 0 0 0-.3 1.655v.073a1.5 1.5 0 0 0 1.373.909h.155a1.818 1.818 0 0 1 0 3.636H20.1a1.499 1.499 0 0 0-1.373.91Z"}));He.displayName="Settings01";const Ge=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M5.316 19.438A4.001 4.001 0 0 1 9 17h6a4.001 4.001 0 0 1 3.684 2.438M16 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm6 2.5c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Ge.displayName="UserCircle";const Ve=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M22 21v-2a4.002 4.002 0 0 0-3-3.874M15.5 3.291a4.001 4.001 0 0 1 0 7.418M17 21c0-1.864 0-2.796-.305-3.53a4 4 0 0 0-2.164-2.165C13.796 15 12.864 15 11 15H8c-1.864 0-2.796 0-3.53.305a4 4 0 0 0-2.166 2.164C2 18.204 2 19.136 2 21M13.5 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));Ve.displayName="Users01";function me(){const t=p.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=oe.decoChatOpen(),t[0]=e):e=t[0];const[s,a]=ae(e,bs);let n;return t[1]!==s||t[2]!==a?(n=[s,a],t[1]=s,t[2]=a,t[3]=n):n=t[3],n}function bs(t){return!!(t??!1)}function vs(){const t=p.c(5),e=nt(),{org:s}=J();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[0]=a):a=t[0];const n=ce(a);let l;return t[1]!==s||t[2]!==n||t[3]!==e?(l=r=>{const c=r.toolCall.toolName.match(/^COLLECTION_([A-Z_]+)_(CREATE|UPDATE|DELETE)$/);if(!c||!c[1])return;const d=c[1],m=n.connectionId;if(!m)return;e.invalidateQueries({queryKey:we.collection(s.slug,m,d)});const f=d.toLowerCase().replace(/_/g," ");Q.success(`${f} updated`)},t[1]=s,t[2]=n,t[3]=e,t[4]=l):l=t[4],l}function js(t){const e=new Date(t),a=new Date().getTime()-e.getTime(),n=Math.floor(a/6e4),l=Math.floor(a/36e5);return n<1?"now":n<60?`${n}m`:`${l}h`}function ws(t){const e=new Date,s=new Date(e.getFullYear(),e.getMonth(),e.getDate()),a=new Date(s.getTime()-864e5),n=new Date(s.getTime()-7*864e5),l=new Date(s.getTime()-30*864e5),r=[],i=[],c=[],d=[],m=[];for(const u of t){const h=new Date(u.updated_at);h>=s?r.push(u):h>=a?i.push(u):h>=n?c.push(u):h>=l?d.push(u):m.push(u)}const f=[];return r.length>0&&f.push({label:"Today",threads:r,showRelativeTime:!0}),i.length>0&&f.push({label:"Yesterday",threads:i,showRelativeTime:!1}),c.length>0&&f.push({label:"7 days ago",threads:c,showRelativeTime:!1}),d.length>0&&f.push({label:"30 days ago",threads:d,showRelativeTime:!1}),m.length>0&&f.push({label:"Older",threads:m,showRelativeTime:!1}),f}function Cs(t){const e=p.c(36),{threads:s,activeThreadId:a,onSelectThread:n,onRemoveThread:l,onOpen:r}=t,[i,c]=y.useState("");let d,m,f,u,h,x,w,g,b;if(e[0]!==a||e[1]!==r||e[2]!==l||e[3]!==n||e[4]!==i||e[5]!==s){const N=i.trim()?s.filter(T=>(T.title||"New chat").toLowerCase().includes(i.toLowerCase())):s,v=ws(N);let _;e[15]!==r?(_=T=>{T?r?.():c("")},e[15]=r,e[16]=_):_=e[16];const O=_;m=Ne,g=O,e[17]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx(_e,{asChild:!0,children:o.jsx("button",{type:"button",className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:o.jsx(ls,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})})}),e[17]=b):b=e[17],d=ke,h="end",x="w-80 p-0";let I;e[18]===Symbol.for("react.memo_cache_sentinel")?(I=o.jsx(kt,{size:16,className:"text-muted-foreground shrink-0"}),e[18]=I):I=e[18];let k;e[19]===Symbol.for("react.memo_cache_sentinel")?(k=T=>c(T.target.value),e[19]=k):k=e[19],e[20]!==i?(w=o.jsx("div",{className:"border-b",children:o.jsxs("label",{className:"flex items-center gap-2.5 h-12 px-4 cursor-text",children:[I,o.jsx("input",{type:"text",placeholder:"Search chats...",value:i,onChange:k,className:"flex-1 border-0 shadow-none focus:outline-none px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[20]=i,e[21]=w):w=e[21],f="max-h-[300px] overflow-y-auto",u=N.length===0?o.jsx("div",{className:"p-4 text-center text-sm text-muted-foreground",children:i.trim()?"No chats found":"No chats yet"}):v.map((T,z)=>o.jsxs("div",{children:[z>0&&o.jsx("div",{className:"border-t mx-3"}),o.jsx("div",{className:"px-3 py-1",children:o.jsx("span",{className:"text-xs font-medium text-muted-foreground tracking-wide",children:T.label})}),T.threads.map(R=>{const L=R.id===a;return o.jsxs("div",{className:`flex items-center gap-2 px-3 py-2 hover:bg-accent cursor-pointer group ${L?"bg-accent/50":""}`,onClick:()=>n(R.id),children:[o.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[o.jsx("span",{className:"text-sm truncate",children:R.title||"New chat"}),o.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:L?"current":T.showRelativeTime?js(R.updated_at):null})]}),o.jsx("button",{type:"button",onClick:q=>{q.stopPropagation(),l(R.id)},className:"opacity-0 cursor-pointer group/trash group-hover:opacity-100 p-1 hover:bg-destructive/10 rounded transition-opacity",title:"Remove chat",children:o.jsx(rs,{size:14,className:"text-muted-foreground group-hover/trash:text-destructive"})})]},R.id)})]},T.label)),e[0]=a,e[1]=r,e[2]=l,e[3]=n,e[4]=i,e[5]=s,e[6]=d,e[7]=m,e[8]=f,e[9]=u,e[10]=h,e[11]=x,e[12]=w,e[13]=g,e[14]=b}else d=e[6],m=e[7],f=e[8],u=e[9],h=e[10],x=e[11],w=e[12],g=e[13],b=e[14];let j;e[22]!==f||e[23]!==u?(j=o.jsx("div",{className:f,children:u}),e[22]=f,e[23]=u,e[24]=j):j=e[24];let S;e[25]!==d||e[26]!==h||e[27]!==x||e[28]!==w||e[29]!==j?(S=o.jsxs(d,{align:h,className:x,children:[w,j]}),e[25]=d,e[26]=h,e[27]=x,e[28]=w,e[29]=j,e[30]=S):S=e[30];let C;return e[31]!==m||e[32]!==g||e[33]!==b||e[34]!==S?(C=o.jsxs(m,{onOpenChange:g,children:[b,S]}),e[31]=m,e[32]=g,e[33]=b,e[34]=S,e[35]=C):C=e[35],C}const Ss="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function ys(t){const e=/\/[^/]+\/mcps\/([^/]+)\/([^/]+)\/([^/]+)/,s=t.match(e);return s&&s[1]&&s[2]&&s[3]?{connectionId:decodeURIComponent(s[1]),collectionName:decodeURIComponent(s[2]),itemId:decodeURIComponent(s[3])}:{connectionId:null,collectionName:null,itemId:null}}function Ns(t,e){return t.find(e)??t[0]}function be(t,e,s,a){const n=p.c(9),l=null,[r,i]=ae(t,l);let c;n[0]!==s||n[1]!==r?(c=u=>r?s(u,r):!1,n[0]=s,n[1]=r,n[2]=c):c=n[2];let d;n[3]!==e||n[4]!==c?(d=Ns(e,c),n[3]=e,n[4]=c,n[5]=d):d=n[5];const m=d;let f;return n[6]!==m||n[7]!==i?(f=[m,i],n[6]=m,n[7]=i,n[8]=f):f=n[8],f}function _s(t){const e=p.c(2),s=at();let a;e[0]!==s.location.pathname?(a=ys(s.location.pathname),e[0]=s.location.pathname,e[1]=a):a=e[1];const{connectionId:n,collectionName:l,itemId:r}=a;return`You are an AI assistant running in an MCP Mesh environment.
2
-
3
- ## About MCP Mesh
4
- The Model Context Protocol (MCP) Mesh allows users to connect external MCP servers and expose their capabilities through gateways. Each gateway provides access to a curated set of tools from connected MCP servers.
5
-
6
- ## Important Notes
7
- - All tool calls are logged and audited for security and compliance
8
- - You have access to the tools exposed through the selected gateway
9
- - MCPs may expose resources that users can browse and edit
10
- - You have context to the current gateway and its tools, resources, and prompts
11
-
12
- ## Current Editing Context
13
- ${n?`- Connection ID: ${n}`:""}
14
- ${l?`- Collection Name: ${l}`:""}
15
- ${r?`- Item ID: ${r}`:""}
16
- ${t?`- Gateway ID: ${t}`:""}
17
-
18
- Help the user understand and work with this resource.
19
- `}function ks(){const t=p.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("img",{src:"/empty-state-openrouter.svg",alt:"",width:336,height:320,"aria-hidden":"true",className:"w-xs h-auto mask-radial-[100%_100%] mask-radial-from-20% mask-radial-to-50% mask-radial-at-center"}),t[0]=e):e=t[0],e}function Is(t){const e=p.c(3),{gatewayId:s,onSelect:a}=t,{data:n}=Zt(s);if(n.length===0)return null;let l;return e[0]!==a||e[1]!==n?(l=o.jsx(qt,{prompts:n,onSelect:a,className:"mt-6"}),e[0]=a,e[1]=n,e[2]=l):l=e[2],l}function $s(){const{org:{slug:t,id:e},locator:s}=J(),[,a]=me(),n=ne(),{data:l}=X.useSession(),r=l?.user,{createThread:i,activeThreadId:c,setActiveThreadId:d,hideThread:m}=pe(),{threads:f,refetch:u}=Ht(),h=Gt(),x=Vt(),w=$t(),[g]=Ut({connections:w,binding:"LLMS"}),b=!!g,j=h.length>0,S=b&&j,[C,N]=be(oe.chatSelectedModel(s),x,(M,E)=>M.id===E.id&&M.connectionId===E.connectionId),[v,_]=be(`${s}:selected-gateway`,h,(M,E)=>M.id===E.gatewayId),O=_s(v?.id),I=vs(),k=Wt({threadId:c,systemPrompt:O,onToolCall:I,onCreateThread:M=>i({id:M.id,title:M.title})}),{inputValue:T,setInputValue:z,branchContext:R,clearBranch:L}=pe(),{isEmpty:q}=k,K=()=>{R&&(d(R.originalThreadId),L(),z(""))},U=async M=>{if(!C){Q.error("No model configured");return}if(!v?.id){Q.error("No gateway configured");return}z(""),L();const E={created_at:new Date().toISOString(),thread_id:c,model:{id:C.id,connectionId:C.connectionId,provider:C.provider??void 0,limits:C.limits??void 0},gateway:{id:v.id},user:{avatar:r?.image??void 0,name:r?.name??"you"}};await k.sendMessage(M,E)},H=M=>{N(M)},G=M=>{_({gatewayId:M})},[F,A]=y.useState(!1),B=Tt(),Y=async()=>{if(!e||!r?.id){Q.error("Not authenticated");return}A(!0);try{const M=w?.find(st=>st.connection_url===yt);if(M){n({to:"/$org/mcps/$connectionId",params:{org:t,connectionId:M.id}});return}const E=Nt({id:_t("conn")}),tt=await B.create.mutateAsync(E);n({to:"/$org/mcps/$connectionId",params:{org:t,connectionId:tt.id}})}catch(M){Q.error(`Failed to connect OpenRouter: ${M instanceof Error?M.message:String(M)}`)}finally{A(!1)}};if(!S){let M,E;return!b&&!j?(M="Connect your providers",E="Connect an LLM provider and create a gateway to unlock AI-powered features."):b?(M="No gateways configured",E="Create a gateway to expose your MCP tools to the chat."):(M="No model provider connected",E="Connect to a model provider to unlock AI-powered features."),o.jsxs(D,{children:[o.jsxs(D.Header,{children:[o.jsxs(D.Header.Left,{children:[o.jsx("img",{src:Ss,alt:"deco chat",className:"size-5 rounded"}),o.jsx("span",{className:"text-sm font-medium",children:"deco chat"})]}),o.jsx(D.Header.Right,{children:o.jsx("button",{type:"button",onClick:()=>a(!1),className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:o.jsx(se,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})})})]}),o.jsx(D.Main,{className:"flex flex-col items-center",children:o.jsx(D.EmptyState,{children:o.jsx(It,{image:o.jsx(ks,{}),title:M,description:E,actions:o.jsxs(o.Fragment,{children:[o.jsxs(W,{variant:"outline",onClick:Y,disabled:F,children:[o.jsx("img",{src:St,alt:"OpenRouter",className:"size-4"}),F?"Installing...":"Install OpenRouter"]}),o.jsx(W,{variant:"outline",onClick:()=>n({to:"/$org/mcps",params:{org:t},search:{action:"create"}}),children:"Install MCP Server"})]})})})})]})}return o.jsxs(D,{children:[o.jsxs(D.Header,{children:[o.jsxs(D.Header.Left,{children:[o.jsx(fe,{icon:v?.icon,name:v?.title||"deco chat",size:"xs",fallbackIcon:o.jsx(re,{size:12})}),o.jsx("span",{className:"text-sm font-medium",children:v?.title||"deco chat"})]}),o.jsxs(D.Header.Right,{children:[o.jsx("button",{type:"button",onClick:()=>i(),className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"New chat",children:o.jsx(Bt,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),o.jsx(Cs,{threads:f,activeThreadId:c,onSelectThread:d,onRemoveThread:m,onOpen:()=>u()}),o.jsx("button",{type:"button",onClick:()=>a(!1),className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:o.jsx(se,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})})]})]}),o.jsx(D.Main,{children:q?o.jsx(D.EmptyState,{children:o.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[o.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[o.jsx(fe,{icon:v?.icon,name:v?.title||"deco chat",size:"lg",fallbackIcon:o.jsx(re,{size:32}),className:"size-[60px]! rounded-[18px]!"}),o.jsx("h3",{className:"text-xl font-medium text-foreground",children:v?.title||"Ask deco chat"}),o.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:v?.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),v?.id&&o.jsx(de,{fallback:null,children:o.jsx(y.Suspense,{fallback:o.jsx("div",{className:"flex justify-center",children:o.jsx(Lt,{size:20,className:"animate-spin text-muted-foreground"})}),children:o.jsx(Is,{gatewayId:v.id,onSelect:M=>{U(M.description??M.name)}})})},v.id)]})}):o.jsx(D.Messages,{messages:k.messages,status:k.status,minHeightOffset:240})}),o.jsx(D.Footer,{children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsx(D.ErrorBanner,{error:k.error,onFixInChat:()=>{k.error&&U(`I encountered this error: ${k.error.message}. Can you help me fix it?`)},onDismiss:k.clearError}),o.jsx(D.FinishReasonWarning,{finishReason:k.finishReason,onContinue:()=>{U("Please continue.")},onDismiss:k.clearFinishReason}),o.jsx(D.BranchPreview,{branchContext:R,clearBranchContext:L,onGoToOriginalMessage:K,setInputValue:z}),o.jsxs(D.Input,{value:T,onChange:z,onSubmit:async()=>{T.trim()&&await U(T.trim())},onStop:k.stop,disabled:!C||!v?.id,isStreaming:k.status==="submitted"||k.status==="streaming",placeholder:C?"Ask anything or @ for context":"Select a model to start chatting",children:[o.jsx(Ft,{selectedGatewayId:v?.id,onGatewayChange:G,placeholder:"Gateway",variant:"borderless"}),o.jsx(Kt,{selectedModel:C??void 0,onModelChange:H,placeholder:"Model",variant:"borderless"}),o.jsx(Yt,{messages:k.messages})]})]})})]})}function Ts(){const t=p.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(D.Provider,{children:o.jsx($s,{})}),t[0]=e):e=t[0],e}function Ms(t){const e=p.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o.jsx(ot,{"data-slot":"sheet",...s}),e[2]=s,e[3]=a):a=e[3],a}function Os(t){const e=p.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o.jsx(ct,{"data-slot":"sheet-portal",...s}),e[2]=s,e[3]=a):a=e[3],a}function zs(t){const e=p.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=$("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx(mt,{"data-slot":"sheet-overlay",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function Rs(t){const e=p.c(17);let s,a,n,l;e[0]!==t?({className:a,children:s,side:l,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n,e[4]=l):(s=e[1],a=e[2],n=e[3],l=e[4]);const r=l===void 0?"right":l;let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(zs,{}),e[5]=i):i=e[5];const c=r==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",d=r==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",m=r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",f=r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let u;e[6]!==a||e[7]!==c||e[8]!==d||e[9]!==m||e[10]!==f?(u=$("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",c,d,m,f,a),e[6]=a,e[7]=c,e[8]=d,e[9]=m,e[10]=f,e[11]=u):u=e[11];let h;e[12]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsxs(dt,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[o.jsx(se,{className:"size-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=h):h=e[12];let x;return e[13]!==s||e[14]!==n||e[15]!==u?(x=o.jsxs(Os,{children:[i,o.jsxs(it,{"data-slot":"sheet-content",className:u,...n,children:[s,h]})]}),e[13]=s,e[14]=n,e[15]=u,e[16]=x):x=e[16],x}function Ds(t){const e=p.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=$("flex flex-col gap-1.5 p-4",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx("div",{"data-slot":"sheet-header",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function Ps(t){const e=p.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=$("text-foreground font-semibold",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx(lt,{"data-slot":"sheet-title",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function Es(t){const e=p.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=$("text-muted-foreground text-sm",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx(rt,{"data-slot":"sheet-description",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function We(t){const e=p.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=$("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx("div",{"data-slot":"skeleton",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}const As="sidebar_state",Ls=3600*24*7,Bs="16rem",Us="18rem",Hs="3rem",Gs="b",Fe=y.createContext(null);function ue(){const t=y.useContext(Fe);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Vs(t){const e=p.c(21),{defaultOpen:s,open:a,onOpenChange:n,children:l}=t,r=s===void 0?!0:s,i=ee(),[c,d]=y.useState(!1),[m,f]=y.useState(r),u=a??m;let h;e[0]!==u||e[1]!==n?(h=O=>{const I=typeof O=="function"?O(u):O;n?n(I):f(I),document.cookie=`${As}=${I}; path=/; max-age=${Ls}`},e[0]=u,e[1]=n,e[2]=h):h=e[2];const x=h;let w;e[3]!==i||e[4]!==x?(w=()=>i?d(Fs):x(Ws),e[3]=i,e[4]=x,e[5]=w):w=e[5];const g=w;let b,j;e[6]!==g?(b=()=>{const O=I=>{if(I.key===Gs&&(I.metaKey||I.ctrlKey)){const k=I.target;if(k.tagName==="INPUT"||k.tagName==="TEXTAREA"||k.isContentEditable)return;I.preventDefault(),g()}};return globalThis.addEventListener("keydown",O),()=>globalThis.removeEventListener("keydown",O)},j=[g],e[6]=g,e[7]=b,e[8]=j):(b=e[7],j=e[8]),y.useEffect(b,j);const S=u?"expanded":"collapsed";let C;e[9]!==i||e[10]!==u||e[11]!==c||e[12]!==x||e[13]!==S||e[14]!==g?(C={state:S,open:u,setOpen:x,isMobile:i,openMobile:c,setOpenMobile:d,toggleSidebar:g},e[9]=i,e[10]=u,e[11]=c,e[12]=x,e[13]=S,e[14]=g,e[15]=C):C=e[15];const N=C;let v;e[16]!==l?(v=o.jsx(zt,{delayDuration:0,children:l}),e[16]=l,e[17]=v):v=e[17];let _;return e[18]!==N||e[19]!==v?(_=o.jsx(Fe.Provider,{value:N,children:v}),e[18]=N,e[19]=v,e[20]=_):_=e[20],_}function Ws(t){return!t}function Fs(t){return!t}function Ks(t){const e=p.c(14);let s,a,n,l;e[0]!==t?({className:a,style:l,children:s,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n,e[4]=l):(s=e[1],a=e[2],n=e[3],l=e[4]);let r;e[5]!==l?(r={"--sidebar-width":Bs,"--sidebar-width-icon":Hs,...l},e[5]=l,e[6]=r):r=e[6];const i=r;let c;e[7]!==a?(c=$("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",a),e[7]=a,e[8]=c):c=e[8];let d;return e[9]!==s||e[10]!==n||e[11]!==i||e[12]!==c?(d=o.jsx("div",{"data-slot":"sidebar-wrapper",style:i,className:c,...n,children:s}),e[9]=s,e[10]=n,e[11]=i,e[12]=c,e[13]=d):d=e[13],d}function Ys(t){const e=p.c(46);let s,a,n,l,r,i;e[0]!==t?({side:l,variant:r,collapsible:i,className:a,children:s,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n,e[4]=l,e[5]=r,e[6]=i):(s=e[1],a=e[2],n=e[3],l=e[4],r=e[5],i=e[6]);const c=l===void 0?"left":l,d=r===void 0?"sidebar":r,m=i===void 0?"offcanvas":i,{isMobile:f,state:u,openMobile:h,setOpenMobile:x}=ue();if(m==="none"){let I;e[7]!==a?(I=$("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",a),e[7]=a,e[8]=I):I=e[8];let k;return e[9]!==s||e[10]!==n||e[11]!==I?(k=o.jsx("div",{"data-slot":"sidebar",className:I,...n,children:s}),e[9]=s,e[10]=n,e[11]=I,e[12]=k):k=e[12],k}if(f){let I;e[13]===Symbol.for("react.memo_cache_sentinel")?(I={"--sidebar-width":Us},e[13]=I):I=e[13];let k;e[14]===Symbol.for("react.memo_cache_sentinel")?(k=o.jsxs(Ds,{className:"sr-only",children:[o.jsx(Ps,{children:"Sidebar"}),o.jsx(Es,{children:"Displays the mobile sidebar."})]}),e[14]=k):k=e[14];let T;e[15]!==s?(T=o.jsx("div",{className:"flex h-full w-full flex-col",children:s}),e[15]=s,e[16]=T):T=e[16];let z;e[17]!==c||e[18]!==T?(z=o.jsxs(Rs,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:I,side:c,children:[k,T]}),e[17]=c,e[18]=T,e[19]=z):z=e[19];let R;return e[20]!==h||e[21]!==n||e[22]!==x||e[23]!==z?(R=o.jsx(Ms,{open:h,onOpenChange:x,...n,children:z}),e[20]=h,e[21]=n,e[22]=x,e[23]=z,e[24]=R):R=e[24],R}const w=u==="collapsed"?m:"",g=d==="floating"||d==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let b;e[25]!==g?(b=$("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",g),e[25]=g,e[26]=b):b=e[26];let j;e[27]!==b?(j=o.jsx("div",{"data-slot":"sidebar-gap",className:b}),e[27]=b,e[28]=j):j=e[28];const S=c==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",C=d==="floating"||d==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let N;e[29]!==a||e[30]!==S||e[31]!==C?(N=$("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",S,C,a),e[29]=a,e[30]=S,e[31]=C,e[32]=N):N=e[32];let v;e[33]!==s?(v=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border py-2 flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:s}),e[33]=s,e[34]=v):v=e[34];let _;e[35]!==n||e[36]!==N||e[37]!==v?(_=o.jsx("div",{"data-slot":"sidebar-container",className:N,...n,children:v}),e[35]=n,e[36]=N,e[37]=v,e[38]=_):_=e[38];let O;return e[39]!==c||e[40]!==u||e[41]!==_||e[42]!==w||e[43]!==j||e[44]!==d?(O=o.jsxs("div",{className:"group peer text-foreground hidden md:block border-r","data-state":u,"data-collapsible":w,"data-variant":d,"data-side":c,"data-slot":"sidebar",children:[j,_]}),e[39]=c,e[40]=u,e[41]=_,e[42]=w,e[43]=j,e[44]=d,e[45]=O):O=e[45],O}function Zs(t){const e=p.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=$("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx("main",{"data-slot":"sidebar-inset",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function qs(t){const e=p.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=$("h-4 m-0! w-full",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx("div",{"data-sidebar":"separator",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function Qs(t){const e=p.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=$("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function Xs(t){const e=p.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=$("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function Js(t){const e=p.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=$("w-full text-sm",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function en(t){const e=p.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=$("flex w-full min-w-0 flex-col gap-1",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}function le(t){const e=p.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let n;e[3]!==s?(n=$("group/menu-item relative",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==a||e[6]!==n?(l=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:n,...a}),e[5]=a,e[6]=n,e[7]=l):l=e[7],l}const tn=ut("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg px-2 py-1.5 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding,colors] transition-colors duration-150 ease-out hover:transition-none focus-visible:ring-2 active:bg-sidebar-accent/75 disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent/75 [&>span:last-child]:truncate [&>svg]:size-[18px] [&>svg]:shrink-0 [&>svg]:text-muted-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent text-sidebar-foreground/80 active:text-sidebar-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-7 text-sm font-[450]",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ke(t){const e=p.c(28);let s,a,n,l,r,i,c;e[0]!==t?({asChild:n,isActive:l,variant:r,size:i,tooltip:c,className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n,e[4]=l,e[5]=r,e[6]=i,e[7]=c):(s=e[1],a=e[2],n=e[3],l=e[4],r=e[5],i=e[6],c=e[7]);const d=n===void 0?!1:n,m=l===void 0?!1:l,f=r===void 0?"default":r,u=i===void 0?"default":i,h=d?ft:"button",{isMobile:x,state:w}=ue();let g;e[8]!==s||e[9]!==u||e[10]!==f?(g=$(tn({variant:f,size:u}),s),e[8]=s,e[9]=u,e[10]=f,e[11]=g):g=e[11];let b;e[12]!==h||e[13]!==m||e[14]!==a||e[15]!==u||e[16]!==g?(b=o.jsx(h,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":m,className:g,...a}),e[12]=h,e[13]=m,e[14]=a,e[15]=u,e[16]=g,e[17]=b):b=e[17];const j=b;if(!c)return j;if(typeof c=="string"){let _;e[18]!==c?(_={children:c},e[18]=c,e[19]=_):_=e[19],c=_}let S;e[20]!==j?(S=o.jsx(Rt,{asChild:!0,children:j}),e[20]=j,e[21]=S):S=e[21];const C=w!=="collapsed"||x;let N;e[22]!==C||e[23]!==c?(N=o.jsx(Ot,{side:"right",align:"center",hidden:C,...c}),e[22]=C,e[23]=c,e[24]=N):N=e[24];let v;return e[25]!==S||e[26]!==N?(v=o.jsxs(Dt,{children:[S,N]}),e[25]=S,e[26]=N,e[27]=v):v=e[27],v}function sn(t){const e=p.c(26),{item:s}=t,a=ne(),{org:n}=J(),l=Ie(n.id),r=cs(n.id);let i;e[0]!==r.update||e[1]!==s.url||e[2]!==l?.sidebar_items?(i=async()=>{const C=(l?.sidebar_items||[]).filter(N=>N.url!==s.url);await r.update.mutateAsync({sidebar_items:C})},e[0]=r.update,e[1]=s.url,e[2]=l?.sidebar_items,e[3]=i):i=e[3];const c=i;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=/^https?:\/\/.+/,e[4]=d):d=e[4];let m;e[5]!==s.icon?(m=d.test(s.icon),e[5]=s.icon,e[6]=m):m=e[6];const f=m;let u;e[7]!==s.url||e[8]!==a?(u=()=>{a({to:s.url})},e[7]=s.url,e[8]=a,e[9]=u):u=e[9];const h=s.title;let x;e[10]!==f||e[11]!==s.icon||e[12]!==s.title?(x=o.jsx("div",{className:"flex items-center justify-center shrink-0",children:f?o.jsx("img",{src:s.icon,alt:s.title,className:"h-4 w-4 rounded object-cover"}):o.jsx(is,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=f,e[11]=s.icon,e[12]=s.title,e[13]=x):x=e[13];let w;e[14]!==s.title?(w=s.title.toLocaleLowerCase(),e[14]=s.title,e[15]=w):w=e[15];let g;e[16]!==w?(g=o.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:o.jsx("span",{className:"truncate text-sm w-full capitalize",children:w})}),e[16]=w,e[17]=g):g=e[17];let b;e[18]!==c?(b=o.jsx(se,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:S=>{S.preventDefault(),S.stopPropagation(),c()}}),e[18]=c,e[19]=b):b=e[19];let j;return e[20]!==s.title||e[21]!==u||e[22]!==x||e[23]!==g||e[24]!==b?(j=o.jsx(le,{children:o.jsxs(Ke,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:u,tooltip:h,children:[x,g,b]})}),e[20]=s.title,e[21]=u,e[22]=x,e[23]=g,e[24]=b,e[25]=j):j=e[25],j}function nn(){const t=p.c(4),{org:e}=J(),a=Ie(e.id)?.sidebar_items;if(!a?.length)return null;let n;t[0]!==a?(n=a.map(an),t[0]=a,t[1]=n):n=t[1];let l;return t[2]!==n?(l=o.jsx(Ye,{children:n}),t[2]=n,t[3]=l):l=t[3],l}function an(t){return o.jsx(sn,{item:t},t.url)}function ve(){const t=p.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(le,{children:o.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:o.jsx(We,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function Ye(t){const e=p.c(4),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(qs,{className:"my-2 -ml-1"}),e[0]=a):a=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(le,{children:o.jsx("div",{className:"group-data-[collapsible=icon]:hidden px-2 py-0 text-xs font-medium h-6 text-muted-foreground flex items-center justify-between",children:o.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=n):n=e[1];let l;return e[2]!==s?(l=o.jsxs(o.Fragment,{children:[a,n,s]}),e[2]=s,e[3]=l):l=e[3],l}function on(){const t=p.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(y.Suspense,{fallback:o.jsxs(Ye,{children:[o.jsx(ve,{}),o.jsx(ve,{})]}),children:o.jsx(nn,{})}),t[0]=e):e=t[0],e}function ln(){const t=p.c(43),{locator:e}=J(),s=ne();let a;t[0]!==e?(a=he.parse(e),t[0]=e,t[1]=a):a=t[1];const{org:n}=a;let l;t[2]!==e?(l=he.isOrgAdminProject(e),t[2]=e,t[3]=l):l=t[3];const r=l;let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(Ae,{}),t[4]=i):i=t[4];let c;t[5]!==s||t[6]!==n?(c={key:"home",label:"Home",icon:i,onClick:()=>s({to:"/$org",params:{org:n}})},t[5]=s,t[6]=n,t[7]=c):c=t[7];let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(De,{}),t[8]=d):d=t[8];let m;t[9]!==s||t[10]!==n?(m={key:"store",label:"Store",icon:d,onClick:()=>s({to:"/$org/store",params:{org:n}})},t[9]=s,t[10]=n,t[11]=m):m=t[11];let f;t[12]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(Mt,{}),t[12]=f):f=t[12];let u;t[13]!==s||t[14]!==n?(u={key:"mcps",label:"MCP Servers",icon:f,onClick:()=>s({to:"/$org/mcps",params:{org:n}})},t[13]=s,t[14]=n,t[15]=u):u=t[15];let h;t[16]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx(re,{}),t[16]=h):h=t[16];let x;t[17]!==s||t[18]!==n?(x={key:"gateways",label:"MCP Gateways",icon:h,onClick:()=>s({to:"/$org/gateways",params:{org:n}})},t[17]=s,t[18]=n,t[19]=x):x=t[19];let w;t[20]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(Re,{}),t[20]=w):w=t[20];let g;t[21]!==s||t[22]!==n?(g={key:"monitoring",label:"Monitoring",icon:w,onClick:()=>s({to:"/$org/monitoring",params:{org:n}})},t[21]=s,t[22]=n,t[23]=g):g=t[23];let b;t[24]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx(Ve,{}),t[24]=b):b=t[24];let j;t[25]!==s||t[26]!==n?(j={key:"members",label:"Members",icon:b,onClick:()=>s({to:"/$org/members",params:{org:n}})},t[25]=s,t[26]=n,t[27]=j):j=t[27];let S;t[28]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsx(He,{}),t[28]=S):S=t[28];let C;t[29]!==s||t[30]!==n?(C={key:"settings",label:"Settings",icon:S,onClick:()=>s({to:"/$org/settings",params:{org:n}})},t[29]=s,t[30]=n,t[31]=C):C=t[31];let N;t[32]!==g||t[33]!==j||t[34]!==C||t[35]!==c||t[36]!==m||t[37]!==u||t[38]!==x?(N=[c,m,u,x,g,j,C],t[32]=g,t[33]=j,t[34]=C,t[35]=c,t[36]=m,t[37]=u,t[38]=x,t[39]=N):N=t[39];const v=N;let _;return t[40]!==v||t[41]!==r?(_=r?v:[],t[40]=v,t[41]=r,t[42]=_):_=t[42],_}function Ze(t){const e=p.c(10),{navigationItems:s,footer:a,additionalContent:n,variant:l,collapsible:r}=t,i=l===void 0?"sidebar":l,c=r===void 0?"icon":r;let d;e[0]!==s?(d=s.map(rn),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==n||e[3]!==d?(m=o.jsx(Qs,{className:"flex-1 overflow-x-hidden",children:o.jsx(Xs,{className:"font-medium",children:o.jsx(Js,{children:o.jsxs(en,{className:"gap-0.5",children:[d,n]})})})}),e[2]=n,e[3]=d,e[4]=m):m=e[4];let f;return e[5]!==c||e[6]!==a||e[7]!==m||e[8]!==i?(f=o.jsxs(Ys,{variant:i,collapsible:c,children:[m,a]}),e[5]=c,e[6]=a,e[7]=m,e[8]=i,e[9]=f):f=e[9],f}function rn(t){return o.jsx(le,{children:o.jsxs(Ke,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:t.onClick,isActive:t.isActive,tooltip:t.label,children:[o.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:t.icon}),o.jsx("span",{className:"truncate",children:t.label})]})},t.key)}Ze.Skeleton=function(){return o.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,s)=>o.jsx("div",{className:"w-full h-8",children:o.jsx(We,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};function cn(){const t=p.c(3),e=ln();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(o.Fragment,{children:o.jsx(de,{children:o.jsx(y.Suspense,{fallback:null,children:o.jsx(on,{})})})}),t[0]=s):s=t[0];let a;return t[1]!==e?(a=o.jsx(Ze,{navigationItems:e,additionalContent:s}),t[1]=e,t[2]=a):a=t[2],a}function dn(t){const e=p.c(12);let s,a,n,l;e[0]!==t?({className:s,orientation:n,decorative:l,...a}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n,e[4]=l):(s=e[1],a=e[2],n=e[3],l=e[4]);const r=n===void 0?"horizontal":n,i=l===void 0?!0:l;let c;e[5]!==s?(c=$("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",s),e[5]=s,e[6]=c):c=e[6];let d;return e[7]!==i||e[8]!==r||e[9]!==a||e[10]!==c?(d=o.jsx(ht,{"data-slot":"separator-root",decorative:i,orientation:r,className:c,...a}),e[7]=i,e[8]=r,e[9]=a,e[10]=c,e[11]=d):d=e[11],d}const qe=y.createContext(null);function mn(){const t=y.useContext(qe);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function un(t){const e=p.c(10),{children:s,onItemHover:a}=t,[n,l]=y.useState(null);let r;e[0]!==a?(r=f=>{l(f),a?.(f)},e[0]=a,e[1]=r):r=e[1];const i=r;let c;e[2]!==n||e[3]!==i?(c={hoveredItem:n,setHoveredItem:i},e[2]=n,e[3]=i,e[4]=c):c=e[4];let d;e[5]!==s?(d=o.jsx(Ne,{children:s}),e[5]=s,e[6]=d):d=e[6];let m;return e[7]!==c||e[8]!==d?(m=o.jsx(qe.Provider,{value:c,children:d}),e[7]=c,e[8]=d,e[9]=m):m=e[9],m}function fn(t){const e=p.c(6),{children:s,onClick:a}=t;let n;e[0]!==s||e[1]!==a?(n=o.jsx(W,{variant:"link",className:"p-0.5 h-auto",onClick:a,type:"button",children:s}),e[0]=s,e[1]=a,e[2]=n):n=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(_e,{asChild:!0,children:o.jsx(W,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:o.jsx(Pe,{size:16,className:"opacity-50"})})}),e[3]=l):l=e[3];let r;return e[4]!==n?(r=o.jsxs("div",{className:"flex items-center gap-1",children:[n,l]}),e[4]=n,e[5]=r):r=e[5],r}function hn(t){const e=p.c(8),{item:s,fallback:a}=t,n=a===void 0?"":a,l=s?.avatarUrl??"",r=s?.name??n;let i;e[0]!==l||e[1]!==r?(i=o.jsx(Z,{url:l,fallback:r,size:"xs",objectFit:"contain"}),e[0]=l,e[1]=r,e[2]=i):i=e[2];const c=s?.name??n;let d;e[3]!==c?(d=o.jsx("span",{children:c}),e[3]=c,e[4]=d):d=e[4];let m;return e[5]!==i||e[6]!==d?(m=o.jsxs("div",{className:"flex items-center gap-2",children:[i,d]}),e[5]=i,e[6]=d,e[7]=m):m=e[7],m}function pn(t){const e=p.c(6),{children:s,align:a}=t,n=a===void 0?"start":a,r=y.Children.toArray(s).filter(xn).length===1?"280px":"480px";let i;e[0]!==r?(i={width:r},e[0]=r,e[1]=i):i=e[1];let c;return e[2]!==n||e[3]!==s||e[4]!==i?(c=o.jsx(ke,{align:n,className:"p-0 flex items-start",style:i,children:s}),e[2]=n,e[3]=s,e[4]=i,e[5]=c):c=e[5],c}function xn(t){return y.isValidElement(t)&&(t.type===Xe||t.type===Qe)}function Qe(t){const e=p.c(5),{children:s,className:a}=t;let n;e[0]!==a?(n=$("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",a),e[0]=a,e[1]=n):n=e[1];let l;return e[2]!==s||e[3]!==n?(l=o.jsx("div",{className:n,children:s}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}const Xe=Qe;function gn(t){const e=p.c(6),{placeholder:s,value:a,onChange:n}=t,l=s===void 0?"Search...":s;let r;e[0]!==n?(r=c=>n(c.target.value),e[0]=n,e[1]=r):r=e[1];let i;return e[2]!==l||e[3]!==r||e[4]!==a?(i=o.jsx(ms,{placeholder:l,value:a,onChange:r,className:"rounded-none border-t-0 border-x-0 focus-visible:border-border focus-visible:ring-0"}),e[2]=l,e[3]=r,e[4]=a,e[5]=i):i=e[5],i}function bn(t){const e=p.c(6),{children:s,emptyMessage:a}=t,n=a===void 0?"No items found.":a,l=y.Children.count(s)>0;let r;e[0]!==n||e[1]!==l?(r=!l&&o.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:n}),e[0]=n,e[1]=l,e[2]=r):r=e[2];let i;return e[3]!==s||e[4]!==r?(i=o.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[r,s]}),e[3]=s,e[4]=r,e[5]=i):i=e[5],i}function vn(t){const e=p.c(15),{item:s,onClick:a,onHover:n,children:l}=t,r=mn();let i;e[0]!==r||e[1]!==s||e[2]!==n?(i=()=>{r.setHoveredItem(s.slug),n?.(s)},e[0]=r,e[1]=s,e[2]=n,e[3]=i):i=e[3];const c=i;let d;e[4]!==s||e[5]!==a?(d=()=>a(s),e[4]=s,e[5]=a,e[6]=d):d=e[6];let m;e[7]!==l||e[8]!==s.avatarUrl||e[9]!==s.name?(m=l||o.jsxs(o.Fragment,{children:[o.jsx(Z,{url:s.avatarUrl??"",fallback:s.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),o.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:s.name})]}),e[7]=l,e[8]=s.avatarUrl,e[9]=s.name,e[10]=m):m=e[10];let f;return e[11]!==c||e[12]!==d||e[13]!==m?(f=o.jsx(W,{onClick:d,onMouseEnter:c,variant:"ghost",size:"sm",className:"w-full justify-start font-normal",children:m}),e[11]=c,e[12]=d,e[13]=m,e[14]=f):f=e[14],f}function jn(t){const e=p.c(2),{children:s}=t;let a;return e[0]!==s?(a=o.jsx("div",{className:"px-1 pb-1 pt-0.5",children:s}),e[0]=s,e[1]=a):a=e[1],a}function wn(t){const e=p.c(11),{onClick:s,icon:a,children:n,variant:l}=t,i=(l===void 0?"default":l)==="muted"&&"text-muted-foreground";let c;e[0]!==i?(c=$("w-full justify-start font-normal",i),e[0]=i,e[1]=c):c=e[1];let d;e[2]!==a?(d=a&&o.jsx("span",{className:"[&>svg]:size-4",children:a}),e[2]=a,e[3]=d):d=e[3];let m;e[4]!==n?(m=o.jsx("span",{children:n}),e[4]=n,e[5]=m):m=e[5];let f;return e[6]!==s||e[7]!==c||e[8]!==d||e[9]!==m?(f=o.jsxs(W,{variant:"ghost",size:"sm",className:c,onClick:s,children:[d,m]}),e[6]=s,e[7]=c,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}function Cn(){const t=p.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(dn,{}),t[0]=e):e=t[0],e}function Sn(){const t=p.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const P=Object.assign(un,{Trigger:fn,CurrentItem:hn,Content:pn,Panel:Xe,Search:gn,Items:bn,Item:vn,Actions:jn,Action:wn,Separator:Cn,Skeleton:Sn});function ie(){const t=p.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=ce(e),{data:a}=X.useListOrganizations(),n=ne();let l;t[1]!==s||t[2]!==a?(l=a?.find(L=>L.slug===s),t[1]=s,t[2]=a,t[3]=l):l=t[3];const r=l,[i,c]=y.useState(""),[d,m]=y.useState(!1);let f,u,h,x,w,g,b,j;if(t[4]!==r||t[5]!==n||t[6]!==s||t[7]!==i||t[8]!==a){const q=(a?(()=>{const A=a.filter(B=>B.name.toLowerCase().includes(i.toLowerCase()));if(s){const B=A.findIndex(Y=>Y.slug===s);if(B>0){const Y=A[B];Y&&(A.splice(B,1),A.unshift(Y))}}return A})():[]).map(yn);let K;t[17]!==r?(K=r?{slug:r.slug,name:r.name,avatarUrl:r.logo}:void 0,t[17]=r,t[18]=K):K=t[18];const U=K;x=P;let H;t[19]!==n||t[20]!==s?(H=()=>n({to:"/$org",params:{org:s??""}}),t[19]=n,t[20]=s,t[21]=H):H=t[21];let G;t[22]!==U?(G=o.jsx(P.CurrentItem,{item:U}),t[22]=U,t[23]=G):G=t[23],t[24]!==H||t[25]!==G?(j=o.jsx(P.Trigger,{onClick:H,children:G}),t[24]=H,t[25]=G,t[26]=j):j=t[26],h=P.Content,u=P.Panel,t[27]!==i?(b=o.jsx(P.Search,{placeholder:"Search organizations...",value:i,onChange:c}),t[27]=i,t[28]=b):b=t[28],f=P.Items,w="No organizations found.";let F;t[29]!==n?(F=A=>o.jsx(P.Item,{item:A,onClick:B=>n({to:"/$org",params:{org:B.slug}})},A.slug),t[29]=n,t[30]=F):F=t[30],g=q.map(F),t[4]=r,t[5]=n,t[6]=s,t[7]=i,t[8]=a,t[9]=f,t[10]=u,t[11]=h,t[12]=x,t[13]=w,t[14]=g,t[15]=b,t[16]=j}else f=t[9],u=t[10],h=t[11],x=t[12],w=t[13],g=t[14],b=t[15],j=t[16];let S;t[31]!==f||t[32]!==w||t[33]!==g?(S=o.jsx(f,{emptyMessage:w,children:g}),t[31]=f,t[32]=w,t[33]=g,t[34]=S):S=t[34];let C,N;t[35]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsx(P.Actions,{children:o.jsx(P.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),N=o.jsx(P.Separator,{}),t[35]=C,t[36]=N):(C=t[35],N=t[36]);let v;t[37]!==n?(v=()=>n({to:"/"}),t[37]=n,t[38]=v):v=t[38];let _;t[39]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(us,{}),t[39]=_):_=t[39];let O;t[40]!==v?(O=o.jsx(P.Actions,{children:o.jsx(P.Action,{onClick:v,icon:_,children:"See all organizations"})}),t[40]=v,t[41]=O):O=t[41];let I;t[42]!==u||t[43]!==O||t[44]!==b||t[45]!==S?(I=o.jsxs(u,{children:[b,S,C,N,O]}),t[42]=u,t[43]=O,t[44]=b,t[45]=S,t[46]=I):I=t[46];let k;t[47]!==h||t[48]!==I?(k=o.jsx(h,{children:I}),t[47]=h,t[48]=I,t[49]=k):k=t[49];let T;t[50]!==x||t[51]!==k||t[52]!==j?(T=o.jsxs(x,{children:[j,k]}),t[50]=x,t[51]=k,t[52]=j,t[53]=T):T=t[53];let z;t[54]!==d?(z=o.jsx(ds,{open:d,onOpenChange:m}),t[54]=d,t[55]=z):z=t[55];let R;return t[56]!==T||t[57]!==z?(R=o.jsxs(o.Fragment,{children:[T,z]}),t[56]=T,t[57]=z,t[58]=R):R=t[58],R}function yn(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}ie.Skeleton=P.Skeleton;const Je=y.createContext({setOpen:()=>{}}),Nn=()=>y.useContext(Je),_n=t=>{const e=p.c(25);let s,a,n,l,r;e[0]!==t?({children:s,defaultOpen:a,open:l,onOpenChange:n,...r}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n,e[4]=l,e[5]=r):(s=e[1],a=e[2],n=e[3],l=e[4],r=e[5]);const i=a??!1;let c;e[6]!==n||e[7]!==l||e[8]!==i?(c={prop:l,defaultProp:i,onChange:n},e[6]=n,e[7]=l,e[8]=i,e[9]=c):c=e[9];const[d,m]=ts(c);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let u;e[12]!==s||e[13]!==d||e[14]!==r||e[15]!==m?(u=o.jsx(ss,{open:d,onOpenChange:m,...r,children:s}),e[12]=s,e[13]=d,e[14]=r,e[15]=m,e[16]=u):u=e[16];let h;e[17]!==d||e[18]!==r||e[19]!==m||e[20]!==u?(h=o.jsx(ps,{open:d,onOpenChange:m,...r,children:u}),e[17]=d,e[18]=r,e[19]=m,e[20]=u,e[21]=h):h=e[21];let x;return e[22]!==f||e[23]!==h?(x=o.jsx(Je.Provider,{value:f,children:h}),e[22]=f,e[23]=h,e[24]=x):x=e[24],x},kn=t=>{const{children:e,title:s,...a}=t,n=ee(),{className:l,...r}=a;return n?o.jsxs(Xt,{...r,children:[o.jsx(Jt,{className:"hidden",children:o.jsx(es,{children:s})}),o.jsx("div",{className:$("flex flex-col gap-2 p-2 py-4",l),children:e})]}):o.jsx(hs,{...a,children:e})},In=t=>{const{children:e,...s}=t,{setOpen:a}=Nn(),n=ee(),{className:l,...r}=s;return n?o.jsx("div",{...r,onClick:i=>{a(!1);const{onClick:c}=r;c?.(i)},className:$("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",l),children:e}):o.jsx(xs,{...s,children:e})},$n=t=>{const e=p.c(7);let s,a;e[0]!==t?({children:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);const n=ee();let l;return e[3]!==s||e[4]!==n||e[5]!==a?(l=n?o.jsx(Qt,{asChild:!0,children:s}):o.jsx(fs,{...a,children:s}),e[3]=s,e[4]=n,e[5]=a,e[6]=l):l=e[6],l},Tn=t=>{const e=p.c(7);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);const n=ee();let l;return e[3]!==s||e[4]!==n||e[5]!==a?(l=n?o.jsx(xe,{className:$(s),...a}):o.jsx(xe,{className:$(s),...a}),e[3]=s,e[4]=n,e[5]=a,e[6]=l):l=e[6],l};function Mn(t){const e=p.c(11),{user:s,trigger:a,align:n,children:l}=t,r=n===void 0?"start":n;let i;e[0]!==a||e[1]!==s?(i=a(s),e[0]=a,e[1]=s,e[2]=i):i=e[2];let c;e[3]!==i?(c=o.jsx($n,{asChild:!0,children:o.jsx("div",{children:i})}),e[3]=i,e[4]=c):c=e[4];let d;e[5]!==r||e[6]!==l?(d=o.jsx(kn,{side:"top",align:r,className:"md:w-[240px]",children:l}),e[5]=r,e[6]=l,e[7]=d):d=e[7];let m;return e[8]!==c||e[9]!==d?(m=o.jsxs(_n,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=m):m=e[10],m}function On(t){const e=p.c(8),{children:s,onClick:a,className:n,asChild:l}=t;let r;e[0]!==l||e[1]!==s||e[2]!==a?(r=l?s:o.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:a,children:s}),e[0]=l,e[1]=s,e[2]=a,e[3]=r):r=e[3];let i;return e[4]!==l||e[5]!==n||e[6]!==r?(i=o.jsx(In,{asChild:l,className:n,children:r}),e[4]=l,e[5]=n,e[6]=r,e[7]=i):i=e[7],i}function zn(t){const e=p.c(2),{className:s}=t;let a;return e[0]!==s?(a=o.jsx(Tn,{className:s}),e[0]=s,e[1]=a):a=e[1],a}function Rn(){const t=p.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const V=Object.assign(Mn,{Item:On,Separator:zn,Skeleton:Rn});function Dn(t){const e=p.c(32),{open:s,onOpenChange:a,user:n,userImage:l}=t,[r,i]=y.useState(!1);let c;e[0]!==n.id?(c=()=>{navigator.clipboard.writeText(n.id),i(!0),setTimeout(()=>i(!1),2e3)},e[0]=n.id,e[1]=c):c=e[1];const d=c;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsxs($e,{children:[o.jsx(Te,{children:"Profile"}),o.jsx(Me,{children:"Your account information"})]}),e[2]=m):m=e[2];const f=n.name||n.email||"U";let u;e[3]!==f||e[4]!==l?(u=o.jsx(Z,{url:l,fallback:f,shape:"circle",size:"2xl"}),e[3]=f,e[4]=l,e[5]=u):u=e[5];const h=n.name||n.email;let x;e[6]!==h?(x=o.jsx("div",{className:"text-lg font-semibold text-center",children:h}),e[6]=h,e[7]=x):x=e[7];let w;e[8]!==n.email?(w=o.jsx("div",{className:"text-sm text-muted-foreground text-center",children:n.email}),e[8]=n.email,e[9]=w):w=e[9];let g;e[10]!==x||e[11]!==w?(g=o.jsxs("div",{className:"flex flex-col items-center gap-2 w-full",children:[x,w]}),e[10]=x,e[11]=w,e[12]=g):g=e[12];let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"User ID"}),e[13]=b):b=e[13];let j;e[14]!==n.id?(j=o.jsxs("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[b,o.jsx("span",{className:"text-sm font-mono truncate",children:n.id})]}),e[14]=n.id,e[15]=j):j=e[15];let S;e[16]!==r?(S=r?o.jsx(Pt,{size:16,className:"text-green-600"}):o.jsx(gs,{size:16,className:"text-muted-foreground"}),e[16]=r,e[17]=S):S=e[17];let C;e[18]!==d||e[19]!==S?(C=o.jsx("button",{type:"button",onClick:d,className:"flex-shrink-0 p-2 hover:bg-background rounded-md transition-colors","aria-label":"Copy user ID",children:S}),e[18]=d,e[19]=S,e[20]=C):C=e[20];let N;e[21]!==j||e[22]!==C?(N=o.jsxs("div",{className:"flex items-center justify-between gap-3 w-full px-4 py-3 rounded-lg bg-muted/50 border border-border",children:[j,C]}),e[21]=j,e[22]=C,e[23]=N):N=e[23];let v;e[24]!==N||e[25]!==u||e[26]!==g?(v=o.jsxs(Oe,{className:"sm:max-w-md",children:[m,o.jsxs("div",{className:"flex flex-col items-center gap-6 py-4",children:[u,g,N]})]}),e[24]=N,e[25]=u,e[26]=g,e[27]=v):v=e[27];let _;return e[28]!==a||e[29]!==s||e[30]!==v?(_=o.jsx(ze,{open:s,onOpenChange:a,children:v}),e[28]=a,e[29]=s,e[30]=v,e[31]=_):_=e[31],_}function Pn(t){const e=p.c(5),{open:s,onOpenChange:a}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsxs($e,{children:[o.jsx(Te,{children:"Invitations"}),o.jsx(Me,{children:"Your pending organization invitations"})]}),e[0]=n):n=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsxs(Oe,{className:"sm:max-w-lg",children:[n,o.jsx("div",{className:"max-h-[420px] overflow-auto pr-1",children:o.jsx(gt,{})})]}),e[1]=l):l=e[1];let r;return e[2]!==a||e[3]!==s?(r=o.jsx(ze,{open:s,onOpenChange:a,children:l}),e[2]=a,e[3]=s,e[4]=r):r=e[4],r}function En(t){const e=p.c(31),{user:s,userImage:a,hasInvites:n,showInvitesItem:l}=t,[r,i]=y.useState(!1),[c,d]=y.useState(!1);let m;e[0]!==n||e[1]!==s.email||e[2]!==s.name||e[3]!==a?(m=()=>o.jsxs("div",{className:"relative",children:[o.jsx(Z,{url:a,fallback:s.name||s.email||"U",shape:"circle",size:"sm",className:"cursor-pointer hover:ring-2 ring-muted-foreground transition-all"}),n&&o.jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2.5 w-2.5 rounded-full bg-destructive ring-2 ring-background"})]}),e[0]=n,e[1]=s.email,e[2]=s.name,e[3]=a,e[4]=m):m=e[4];let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsxs(V.Item,{onClick:()=>i(!0),children:[o.jsx(Ge,{className:"text-muted-foreground",size:18}),"Profile"]}),e[5]=f):f=e[5];let u;e[6]!==n||e[7]!==l?(u=l&&o.jsxs(V.Item,{onClick:()=>d(!0),children:[o.jsx(Ue,{className:"text-muted-foreground",size:18}),"Invitations",n&&o.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-destructive"})]}),e[6]=n,e[7]=l,e[8]=u):u=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx(V.Separator,{}),e[9]=h):h=e[9];let x;e[10]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(xt,{className:"w-4 h-4 text-muted-foreground"}),e[10]=x):x=e[10];let w;e[11]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(V.Item,{asChild:!0,children:o.jsxs("a",{href:"https://github.com/decocms/admin",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[x,"decocms/admin",o.jsx(ge,{size:18,className:"text-muted-foreground ml-auto"})]})}),e[11]=w):w=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(Ee,{className:"text-muted-foreground",size:18}),e[12]=g):g=e[12];let b,j;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx(V.Item,{asChild:!0,children:o.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[g,"Homepage",o.jsx(ge,{size:18,className:"ml-auto text-muted-foreground"})]})}),j=o.jsx(V.Separator,{}),e[13]=b,e[14]=j):(b=e[13],j=e[14]);let S;e[15]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsxs(V.Item,{onClick:An,children:[o.jsx(Be,{size:18,className:"text-muted-foreground"}),"Log out"]}),e[15]=S):S=e[15];let C;e[16]!==m||e[17]!==u||e[18]!==s?(C=o.jsxs(V,{user:s,trigger:m,align:"end",children:[f,u,h,w,b,j,S]}),e[16]=m,e[17]=u,e[18]=s,e[19]=C):C=e[19];let N;e[20]!==r||e[21]!==s||e[22]!==a?(N=r&&o.jsx(Dn,{open:r,onOpenChange:i,user:s,userImage:a}),e[20]=r,e[21]=s,e[22]=a,e[23]=N):N=e[23];let v;e[24]!==c||e[25]!==l?(v=l&&c&&o.jsx(Pn,{open:c,onOpenChange:d}),e[24]=c,e[25]=l,e[26]=v):v=e[26];let _;return e[27]!==C||e[28]!==N||e[29]!==v?(_=o.jsxs(o.Fragment,{children:[C,N,v]}),e[27]=C,e[28]=N,e[29]=v,e[30]=_):_=e[30],_}function An(){return X.signOut()}function Ln(){const{data:t}=X.useSession(),e=y.useContext(pt),{data:s}=e.hooks.useListUserInvitations(),n=(s??[]).length>0;if(!t?.user)return o.jsx(Z,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer",muted:!0});const l=t.user,r={...l,name:l.name??void 0},i=l.image;return o.jsx(En,{user:r,userImage:i,hasInvites:n,showInvitesItem:!0})}function Bn(t){const e=p.c(6),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(bt,{children:o.jsx(Ce,{})}),e[0]=a):a=e[0];let n;e[1]!==s?(n=o.jsx(vt,{children:s}),e[1]=s,e[2]=n):n=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(jt,{children:o.jsx(wt,{to:"/login",replace:!0})}),e[3]=l):l=e[3];let r;return e[4]!==n?(r=o.jsxs(o.Fragment,{children:[a,n,l]}),e[4]=n,e[5]=r):r=e[5],r}function Un(t){const e=p.c(5),{children:s,className:a}=t;let n;e[0]!==a?(n=$("fixed top-0 left-0 right-0 z-20 bg-sidebar flex items-center w-full h-12 border-b border-border",a),e[0]=a,e[1]=n):n=e[1];let l;return e[2]!==s||e[3]!==n?(l=o.jsx("div",{className:n,children:s}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}function Hn(t){const e=p.c(5),{children:s,className:a}=t;let n;e[0]!==a?(n=$("flex items-center justify-center px-2 h-full border-r border-border",a),e[0]=a,e[1]=n):n=e[1];let l;return e[2]!==s||e[3]!==n?(l=o.jsx("div",{className:n,children:s}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}function Gn(t){const e=p.c(5),{children:s,className:a}=t;let n;e[0]!==a?(n=$("flex items-center gap-2 px-2 h-full",a),e[0]=a,e[1]=n):n=e[1];let l;return e[2]!==s||e[3]!==n?(l=o.jsx("div",{className:n,children:s}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}function Vn(t){const e=p.c(5),{children:s,className:a}=t;let n;e[0]!==a?(n=$("flex items-center gap-2 px-2 h-full flex-1",a),e[0]=a,e[1]=n):n=e[1];let l;return e[2]!==s||e[3]!==n?(l=o.jsx("div",{className:n,children:s}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}function Wn(t){const e=p.c(5),{children:s,className:a}=t;let n;e[0]!==a?(n=$("flex items-center gap-2 px-2 h-full ml-auto",a),e[0]=a,e[1]=n):n=e[1];let l;return e[2]!==s||e[3]!==n?(l=o.jsx("div",{className:n,children:s}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}function Fn(){const t=p.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("div",{className:"flex items-center justify-center px-2 h-full border-r border-border",children:o.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})}),t[0]=e):e=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("div",{className:"flex items-center gap-2 px-2 h-full",children:o.jsx("div",{className:"w-32 h-6 bg-muted rounded-md animate-pulse"})}),t[1]=s):s=t[1];let a;return t[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsxs("div",{className:"fixed top-0 left-0 right-0 z-20 bg-sidebar flex items-center w-full h-12 border-b border-border",children:[e,s,o.jsx("div",{className:"flex items-center gap-2 px-2 h-full ml-auto",children:o.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"})})]}),t[2]=a):a=t[2],a}const te=Object.assign(Un,{Sidebar:Hn,Left:Gn,Center:Vn,Right:Wn,Skeleton:Fn});function et(){const t=p.c(3),{toggleSidebar:e}=ue();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(Le,{className:"text-muted-foreground/85 group-hover:text-foreground transition-colors",size:20}),t[0]=s):s=t[0];let a;return t[1]!==e?(a=o.jsx(o.Fragment,{children:o.jsx(W,{onClick:e,size:"icon",variant:"ghost",className:"w-8 h-8 rounded-md",children:s})}),t[1]=e,t[2]=a):a=t[2],a}et.Skeleton=function(){return o.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})};const Kn="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function je(t){const e=p.c(18),{showSidebarToggle:s,showOrgSwitcher:a,showDecoChat:n}=t,l=s===void 0?!1:s,r=a===void 0?!1:a,i=n===void 0?!1:n,[,c]=me();let d;e[0]!==c?(d=()=>c(Yn),e[0]=c,e[1]=d):d=e[1];const m=d;let f;e[2]!==l?(f=l&&o.jsx(te.Sidebar,{children:o.jsx(et,{})}),e[2]=l,e[3]=f):f=e[3];let u;e[4]!==r?(u=r&&o.jsx(y.Suspense,{fallback:o.jsx(ie.Skeleton,{}),children:o.jsx(ie,{})}),e[4]=r,e[5]=u):u=e[5];let h;e[6]!==u?(h=o.jsx(te.Left,{children:u}),e[6]=u,e[7]=h):h=e[7];let x;e[8]!==i||e[9]!==m?(x=i&&o.jsxs(W,{size:"sm",variant:"default",onClick:m,children:[o.jsx(Z,{url:Kn,fallback:"DC",size:"2xs",className:"rounded-sm"}),"deco chat"]}),e[8]=i,e[9]=m,e[10]=x):x=e[10];let w;e[11]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(Ln,{}),e[11]=w):w=e[11];let g;e[12]!==x?(g=o.jsxs(te.Right,{className:"gap-2",children:[x,w]}),e[12]=x,e[13]=g):g=e[13];let b;return e[14]!==g||e[15]!==f||e[16]!==h?(b=o.jsxs(te,{children:[f,h,g]}),e[14]=g,e[15]=f,e[16]=h,e[17]=b):b=e[17],b}function Yn(t){return!t}function Zn(t){const e=p.c(10),{children:s,className:a}=t,[,n]=y.useTransition();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=oe.decoChatPanelWidth(),e[0]=l):l=e[0];const[r,i]=ae(l,30);let c;e[1]!==i?(c=u=>n(()=>i(u)),e[1]=i,e[2]=c):c=e[2];const d=c;let m;e[3]!==a?(m=$("min-w-0",a),e[3]=a,e[4]=m):m=e[4];let f;return e[5]!==r||e[6]!==s||e[7]!==d||e[8]!==m?(f=o.jsx(ye,{defaultSize:r,minSize:20,className:m,onResize:d,children:s}),e[5]=r,e[6]=s,e[7]=d,e[8]=m,e[9]=f):f=e[9],f}function qn(t){const e=p.c(5),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=oe.sidebarOpen(),e[0]=a):a=e[0];const[n,l]=ae(a,!0);let r;return e[1]!==s||e[2]!==l||e[3]!==n?(r=o.jsx(Vs,{open:n,onOpenChange:l,children:s}),e[1]=s,e[2]=l,e[3]=n,e[4]=r):r=e[4],r}function Qn(){const t=p.c(9),[e]=me();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(ye,{className:"bg-background",children:o.jsx(Se,{})}),t[0]=s):s=t[0];let a;t[1]!==e?(a=o.jsx(ns,{withHandle:e}),t[1]=e,t[2]=a):a=t[2];const n=e?"max-w-none":"max-w-0";let l;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(de,{children:o.jsx(y.Suspense,{fallback:o.jsx(as,{}),children:o.jsx(Ts,{})})}),t[3]=l):l=t[3];let r;t[4]!==n?(r=o.jsx(Zn,{className:n,children:l}),t[4]=n,t[5]=r):r=t[5];let i;return t[6]!==a||t[7]!==r?(i=o.jsxs(os,{direction:"horizontal",children:[s,a,r]}),t[6]=a,t[7]=r,t[8]=i):i=t[8],i}function Xn(){const t=p.c(16);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=ce(e);let a;t[1]!==s?(a=we.activeOrganization(s),t[1]=s,t[2]=a):a=t[2];let n;t[3]!==s?(n=async()=>{if(!s)return null;const{data:u}=await X.organization.setActive({organizationSlug:s});return{org:u,project:{slug:At}}},t[3]=s,t[4]=n):n=t[4];let l;t[5]!==a||t[6]!==n?(l={queryKey:a,queryFn:n,gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1},t[5]=a,t[6]=n,t[7]=l):l=t[7];const{data:r}=Ct(l);if(!r){let u;t[8]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(je,{}),t[8]=u):u=t[8];let h;return t[9]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsxs("div",{className:"min-h-screen bg-background",children:[u,o.jsx("div",{className:"pt-12",children:o.jsx(Se,{})})]}),t[9]=h):h=t[9],h}let i;t[10]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(je,{showSidebarToggle:!0,showOrgSwitcher:!0,showDecoChat:!0}),t[10]=i):i=t[10];let c;t[11]===Symbol.for("react.memo_cache_sentinel")?(c={"--sidebar-width":"13rem","--sidebar-width-mobile":"11rem"},t[11]=c):c=t[11];let d;t[12]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(cn,{}),t[12]=d):d=t[12];let m;t[13]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(qn,{children:o.jsxs("div",{className:"flex flex-col h-screen",children:[i,o.jsxs(Ks,{className:"flex-1 bg-sidebar",style:c,children:[d,o.jsx(Zs,{className:"pt-12",children:o.jsx(Qn,{})})]})]})}),t[13]=m):m=t[13];let f;return t[14]!==r?(f=o.jsx(Et,{...r,children:m}),t[14]=r,t[15]=f):f=t[15],f}function Ha(){const t=p.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(Bn,{children:o.jsx(y.Suspense,{fallback:o.jsx(Ce,{}),children:o.jsx(Xn,{})})}),t[0]=e):e=t[0],e}export{Ha as default};
@@ -1 +0,0 @@
1
- import{r as D,c as _,j as s,f as ve,d as Se,b as Ie,a as _e,t as he}from"./index-IkrlX4J3.js";import{i as Le}from"./AlertCircle-DoPcYOmu.js";import{i as je}from"./Loading01-DcFBMaXj.js";import{B as ie}from"./button-DoEGRp1U.js";import{i as Ae}from"./ArrowLeft-Cho91gJm.js";import{I as ye,a as Ee,u as De,b as Me,c as Ue}from"./use-connection-B7SaX83w.js";import{t as Ve}from"./ChevronDown--_znWqhO.js";import{s as ge}from"./Plus-C--SWih9.js";import{b as $e,D as Re,a as ze,d as Be}from"./dropdown-menu-B9LS1Ke-.js";import{n as be}from"./LinkExternal01-C8zs3bR9.js";import{E as Pe}from"./SearchMd-DiJjEUCs.js";import{T as Ge,R as Fe}from"./tools-list-B1pdeGzm.js";import{R as Oe}from"./resource-tabs-B0Wxp2Cw.js";import{a as We}from"./use-binding-CQxg2gSi.js";import{u as He}from"./use-tool-call-BpBoE-Mi.js";import{u as Ze}from"./use-mcp-C2f_uqzY.js";import{u as Ne}from"./tooltip-DsFBYF2A.js";import{e as Ke}from"./extract-connection-data-lX5EQrvR.js";import{s as qe}from"./slugify-CEUa2lfQ.js";import{f as Je,e as Qe,b as Xe,c as Ye,g as et}from"./registry-utils-ulDDT0d8.js";import{e as tt}from"./app-name-gTETL9So.js";import{i as st}from"./InfoCircle-BH6ukjrt.js";import"./useQuery-9D_KMlJN.js";import"./File06-D4-QxuCL.js";import"./collection-display-button-B5AAU4Bw.js";import"./view-mode-toggle-Dq1mWwHt.js";import"./collection-search-DivVKI30.js";import"./input-BiKrjh13.js";import"./collection-table-wrapper-lGkt7E0b.js";import"./card-CJ-1atZv.js";import"./layout-DnHkkkij.js";import"./badge-pWud7F0k.js";import"./auth-DaJav-_Q.js";import"./generate-id-Dyweu44Y.js";const Ce=({size:t=24,color:e="currentColor",...o})=>D.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},D.createElement("path",{d:"m7.5 12 3 3 6-6m5.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Ce.displayName="CheckCircle";const we=({size:t=24,color:e="currentColor",...o})=>D.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},D.createElement("path",{d:"m21 21-3.5-3.5m2.5-6a8.5 8.5 0 1 1-17 0 8.5 8.5 0 0 1 17 0Z"}));we.displayName="SearchLg";function ot(t){const e=_.c(3),{message:o}=t,n=o===void 0?"Loading app details...":o;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(je,{size:48,className:"animate-spin mb-4"}),e[0]=r):r=e[0];let i;return e[1]!==n?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[r,s.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),e[1]=n,e[2]=i):i=e[2],i}function rt(t){const e=_.c(9),{error:o,onBack:n}=t,r=o instanceof Error?o.message:o;let i,d;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Le,{size:48,className:"text-destructive mb-4"}),d=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading app"}),e[0]=i,e[1]=d):(i=e[0],d=e[1]);let a;e[2]!==r?(a=s.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:r}),e[2]=r,e[3]=a):a=e[3];let l;e[4]!==n?(l=s.jsx("button",{onClick:n,className:"mt-4 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:"Go Back"}),e[4]=n,e[5]=l):l=e[5];let m;return e[6]!==a||e[7]!==l?(m=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[i,d,a,l]}),e[6]=a,e[7]=l,e[8]=m):m=e[8],m}function nt(t){const e=_.c(5),{onBack:o}=t;let n,r,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(we,{size:48,className:"text-muted-foreground mb-4"}),r=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"App not found"}),i=s.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:"The app you're looking for doesn't exist in this store."}),e[0]=n,e[1]=r,e[2]=i):(n=e[0],r=e[1],i=e[2]);let d;return e[3]!==o?(d=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n,r,i,s.jsx("button",{onClick:o,className:"mt-4 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:"Go Back to Store"})]}),e[3]=o,e[4]=d):d=e[4],d}function it(t){const e=_.c(3),{onBack:o}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Ae,{}),e[0]=n):n=e[0];let r;return e[1]!==o?(r=s.jsx("div",{className:"flex items-center h-12 border-b border-border shrink-0",children:s.jsx("div",{className:"flex h-full px-2 border-r items-center",children:s.jsx(ie,{variant:"ghost",size:"icon",className:"items-center size-8 text-muted-foreground",onClick:o,"aria-label":"Go back",children:n})})}),e[1]=o,e[2]=r):r=e[2],r}function lt(t){const e=_.c(25),{data:o,itemVersions:n,onInstall:r,canInstall:i,isInstalling:d}=t,a=i===void 0?!0:i,l=d===void 0?!1:d,[m,p]=D.useState(0);let x;e[0]!==r?(x=S=>{p(S),r(S)},e[0]=r,e[1]=x):x=e[1];const f=x;let h;e[2]!==o.icon||e[3]!==o.name?(h=s.jsx(ye,{icon:o.icon,name:o.name,size:"lg",className:"shrink-0 shadow-sm"}),e[2]=o.icon,e[3]=o.name,e[4]=h):h=e[4];let g;e[5]!==o.name?(g=s.jsx("h1",{className:"text-3xl font-medium",children:o.name}),e[5]=o.name,e[6]=g):g=e[6];let b;e[7]!==o.verified?(b=o.verified&&s.jsx("img",{src:"/verified-badge.svg",alt:"Verified",className:"w-5 h-5 shrink-0"}),e[7]=o.verified,e[8]=b):b=e[8];let y;e[9]!==g||e[10]!==b?(y=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsxs("div",{className:"flex items-center gap-2",children:[g,b]})}),e[9]=g,e[10]=b,e[11]=y):y=e[11];let N;e[12]!==a||e[13]!==f||e[14]!==l||e[15]!==n||e[16]!==r||e[17]!==m?(N=a?s.jsx("div",{className:"shrink-0",children:n.length>1?s.jsxs("div",{className:"flex",children:[s.jsxs(ie,{variant:"brand",onClick:()=>f(0),disabled:l,className:"shrink-0 rounded-r-none cursor-pointer",children:[s.jsx(ge,{size:20}),l?"Connecting...":"Connect MCP Server"]}),s.jsxs($e,{children:[s.jsx(Re,{asChild:!0,children:s.jsx(ie,{variant:"brand",disabled:l,className:"shrink-0 rounded-l-none px-2 border-l-2 border-l-white/50 cursor-pointer",children:s.jsx(Ve,{size:20})})}),s.jsx(ze,{align:"end",className:"w-56 max-h-[300px] overflow-y-auto",children:n.map((S,w)=>{const I=S._meta?.["io.modelcontextprotocol.registry/official"];return s.jsx(Be,{onClick:()=>f(w),disabled:l,className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center justify-between gap-2 w-full",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"font-medium text-sm",children:["v",S.server?.version||"unknown"]}),I?.isLatest&&s.jsx("div",{className:"text-xs text-muted-foreground/50 font-semibold",children:"LATEST"})]}),w===m&&s.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0"})]})},w)})})]})]}):s.jsxs(ie,{variant:"brand",onClick:()=>r(),disabled:n.length===0||l,className:"shrink-0",children:[s.jsx(ge,{size:20}),l?"Connecting...":"Connect MCP Server"]})}):s.jsx("div",{className:"shrink-0 px-4 py-2 text-sm text-muted-foreground bg-muted rounded-lg",children:"Cannot be connected"}),e[12]=a,e[13]=f,e[14]=l,e[15]=n,e[16]=r,e[17]=m,e[18]=N):N=e[18];let C;e[19]!==y||e[20]!==N?(C=s.jsxs("div",{className:"flex-1 min-w-0 flex items-center justify-between",children:[y,N]}),e[19]=y,e[20]=N,e[21]=C):C=e[21];let T;return e[22]!==h||e[23]!==C?(T=s.jsxs("div",{className:"flex items-center gap-4 py-8 px-5 border-b border-border",children:[h,C]}),e[22]=h,e[23]=C,e[24]=T):T=e[24],T}function at(t){if(!t)return"—";try{const e=new Date(t);return isNaN(e.getTime())?"—":e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function ct(t){const e=_.c(45),{data:o,publisherInfo:n,selectedItem:r}=t;let i;e[0]!==o.description?(i=o.description&&s.jsxs("div",{className:"px-5 pb-5 border-b border-border",children:[s.jsx("h2",{className:"text-base font-medium mb-3",children:"Overview"}),s.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:o.description})]}),e[0]=o.description,e[1]=i):i=e[1];const d=o.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":o.publisher;let a;e[2]!==n.logo||e[3]!==d?(a=s.jsx(ye,{icon:n.logo,name:d,size:"sm",className:"shrink-0 shadow-sm"}),e[2]=n.logo,e[3]=d,e[4]=a):a=e[4];let l;e[5]!==o.publisher?(l=o.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":o.publisher.charAt(0).toUpperCase()+o.publisher.slice(1),e[5]=o.publisher,e[6]=l):l=e[6];let m;e[7]!==l?(m=s.jsx("div",{className:"font-medium",children:l}),e[7]=l,e[8]=m):m=e[8];let p;e[9]!==n.count?(p=n.count>0?s.jsxs(s.Fragment,{children:[s.jsx("img",{src:"/globe.svg",alt:"globe",className:"w-3 h-3"}),s.jsxs("span",{children:[n.count," ",n.count===1?"published app":"published apps"]})]}):"Publisher",e[9]=n.count,e[10]=p):p=e[10];let x;e[11]!==p?(x=s.jsx("div",{className:"text-xs text-muted-foreground flex items-center gap-1",children:p}),e[11]=p,e[12]=x):x=e[12];let f;e[13]!==m||e[14]!==x?(f=s.jsxs("div",{children:[m,x]}),e[13]=m,e[14]=x,e[15]=f):f=e[15];let h;e[16]!==a||e[17]!==f?(h=s.jsx("div",{className:"px-5 border-b border-border",children:s.jsxs("div",{className:"flex items-center gap-3 py-5",children:[a,f]})}),e[16]=a,e[17]=f,e[18]=h):h=e[18];let g;e[19]!==o.version?(g=o.version&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-foreground text-sm",children:"Version"}),s.jsxs("span",{className:"text-muted-foreground uppercase text-xs",children:["v",o.version]})]}),e[19]=o.version,e[20]=g):g=e[20];let b;e[21]!==o.connectionType?(b=o.connectionType&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-foreground text-sm",children:"Connection Type"}),s.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:o.connectionType})]}),e[21]=o.connectionType,e[22]=b):b=e[22];let y;e[23]!==o.schemaVersion?(y=o.schemaVersion&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-foreground text-sm",children:"Schema Version"}),s.jsx("span",{className:"text-muted-foreground text-xs",children:o.schemaVersion})]}),e[23]=o.schemaVersion,e[24]=y):y=e[24];let N;e[25]!==o.websiteUrl?(N=o.websiteUrl&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-foreground text-sm",children:"Website"}),s.jsxs("a",{href:o.websiteUrl,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:underline flex items-center gap-1 text-xs",children:[s.jsx("span",{children:"Visit"}),s.jsx(be,{size:14})]})]}),e[25]=o.websiteUrl,e[26]=N):N=e[26];let C;e[27]!==o.repository?(C=o.repository?.url&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-foreground text-sm",children:"Source"}),s.jsxs("a",{href:o.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:underline flex items-center gap-1 text-xs",children:[s.jsx("span",{children:"GitHub"}),s.jsx(be,{size:14})]})]}),e[27]=o.repository,e[28]=C):C=e[28];let T;e[29]!==g||e[30]!==b||e[31]!==y||e[32]!==N||e[33]!==C?(T=s.jsxs("div",{className:"px-5 py-5 border-b border-border space-y-4",children:[g,b,y,N,C]}),e[29]=g,e[30]=b,e[31]=y,e[32]=N,e[33]=C,e[34]=T):T=e[34];let S;e[35]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("span",{className:"text-foreground text-sm",children:"Last Updated"}),e[35]=S):S=e[35];let w;e[36]!==r.updated_at?(w=at(r.updated_at),e[36]=r.updated_at,e[37]=w):w=e[37];let I;e[38]!==w?(I=s.jsxs("div",{className:"px-5 py-5 text-sm flex justify-between items-center border-b border-border",children:[S,s.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:w})]}),e[38]=w,e[39]=I):I=e[39];let u;return e[40]!==i||e[41]!==T||e[42]!==I||e[43]!==h?(u=s.jsxs("div",{className:"lg:col-span-1 flex flex-col pt-5",children:[i,h,T,I]}),e[40]=i,e[41]=T,e[42]=I,e[43]=h,e[44]=u):u=e[44],u}function dt(t){const e=_.c(18),{data:o,availableTabs:n,effectiveActiveTabId:r,effectiveTools:i,isLoadingTools:d,onTabChange:a}=t,l=d===void 0?!1:d;let m;e[0]!==i?(m=i.map(mt),e[0]=i,e[1]=m):m=e[1];const p=m;let x;e[2]!==n||e[3]!==r||e[4]!==a?(x=n.length>0&&s.jsx("div",{className:"px-4 py-2 border-b border-border bg-background",children:s.jsx(Oe,{tabs:n,activeTab:r,onTabChange:a})}),e[2]=n,e[3]=r,e[4]=a,e[5]=x):x=e[5];let f;e[6]!==r||e[7]!==i.length||e[8]!==l||e[9]!==p?(f=r==="tools"&&s.jsx("div",{className:"flex flex-col flex-1",children:l?s.jsxs("div",{className:"flex items-center justify-center p-8",children:[s.jsx(je,{size:24,className:"animate-spin"}),s.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:"Loading tools..."})]}):i.length>0?s.jsx(Ge,{tools:p,showToolbar:!1,emptyMessage:"This app doesn't have any tools."}):s.jsx(Pe,{image:null,title:"No tools available",description:"This app doesn't have any tools."})}),e[6]=r,e[7]=i.length,e[8]=l,e[9]=p,e[10]=f):f=e[10];let h;e[11]!==o?.repository||e[12]!==r?(h=r==="readme"&&s.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:s.jsx(Fe,{repository:o?.repository})}),e[11]=o?.repository,e[12]=r,e[13]=h):h=e[13];let g;return e[14]!==x||e[15]!==f||e[16]!==h?(g=s.jsxs("div",{className:"lg:col-span-2 flex flex-col border-l border-border",children:[x,f,h]}),e[14]=x,e[15]=f,e[16]=h,e[17]=g):g=e[17],g}function mt(t){const e=t;return{name:e.name||"",description:e.description||void 0}}function ft(t,e){if(!t||!e)return;const o=e.toLowerCase();return t.find(n=>n.app_name?.toLowerCase()===o||n.app_id?.toLowerCase()===o||n.title.toLowerCase()===o)||t.find(n=>n.title.toLowerCase().includes(o))}function ut(t,e,o,n,r){if(!e||e==="Unknown")return{count:0};if(e==="io.modelcontextprotocol.registry/official")return{logo:n?.icon||void 0,count:r??t.length};const i=e.toLowerCase(),d=t.filter(l=>(l._meta?.["io.modelcontextprotocol.registry/official"]?"io.modelcontextprotocol.registry/official":l.publisher||l._meta?.["mcp.mesh"]?.scopeName||"Unknown").toLowerCase()===i);return{logo:o?.icon||d[0]?.publisher_logo||d[0]?.icon||void 0,count:d.length}}function pt(t){const e=t.server._meta?.["mcp.mesh/publisher-provided"],o=t._meta?.["mcp.mesh"],n=t._meta?.["io.modelcontextprotocol.registry/official"],r=t.server,i=Xe(r.remotes?.[0]?.type),d=Ye(r.$schema),a=n?"io.modelcontextprotocol.registry/official":t.publisher||o?.scopeName||"Unknown",l=et(r.repository),m=t.icon||t.image||t.logo||r.icons?.[0]?.src||l||null,p=t.name||t.title||t.server?.title||"Unnamed Item";return{name:tt(p),description:t.description||t.summary||t.server?.description||"",icon:m,verified:t.verified||o?.verified,publisher:a,version:r.version||null,websiteUrl:r.websiteUrl||null,repository:r.repository||null,schemaVersion:d??null,connectionType:i,connectionUrl:null,remoteUrl:null,tools:t.tools||r.tools||e?.tools||[],models:t.models||r.models||e?.models||[],emails:t.emails||r.emails||e?.emails||[],analytics:t.analytics||r.analytics||e?.analytics,cdn:t.cdn||r.cdn||e?.cdn}}class xt extends D.Component{state={hasError:!1,error:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,o){console.error("Store app detail error:",e,o)}render(){return this.state.hasError?s.jsx(rt,{error:this.state.error||new Error("Unknown error"),onBack:this.props.onBack}):this.props.children}}function ht(){const t=_.c(70),{org:e}=Ne(),o=ve();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const{appName:r}=Se(n);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},t[1]=i):i=t[1];const{registryId:d,serverName:a}=Ie(i),[l,m]=D.useState("readme"),p=Ee(),x=De(),{data:f}=_e.useSession(),h=We(x),g=d||h[0]?.id||"",b=Me(g),y=Je(b?.tools),N=b?.tools&&b.tools.find(yt)?.name||"",C=b?.tools&&b.tools.find(jt)?.name||"",T=Ue(g),S=!!a;let w,I;S?(w=N||C,I={name:a}):(w=y,I={});const{data:u}=He({toolCaller:T,toolName:w,toolInputParams:I,scope:g});let M=[],L=[],pe=null;if(u){if(Array.isArray(u))M=u;else if(typeof u=="object"&&u!==null)if("totalCount"in u&&typeof u.totalCount=="number"&&(pe=u.totalCount),"item"in u&&u.item){const c=u.item,k=c.id||"",U=c.server,V=c._meta;let E;t[2]!==c.title||t[3]!==k||t[4]!==U||t[5]!==V?(E=[{id:k,title:c.title,server:U,_meta:V}],t[2]=c.title,t[3]=k,t[4]=U,t[5]=V,t[6]=E):E=t[6],M=E}else{let c;"versions"in u&&Array.isArray(u.versions)?c="versions":"servers"in u&&Array.isArray(u.servers)?c="servers":c=Object.keys(u).find(k=>Array.isArray(u[k])),c&&(M=u[c],(c==="versions"||w?.includes("VERSIONS"))&&(L=M))}}let X;t[7]!==r?(X=c=>{const k=c.name||c.title||c.server.title||"";return qe(k)===r},t[7]=r,t[8]=X):X=t[8];let j=M.find(X);if(!j&&a){let c;t[9]!==a?(c=k=>k.server.name===a||k.name===a||k.title===a,t[9]=a,t[10]=c):c=t[10],j=M.find(c)}const v=j?pt(j):null,le=(v?.tools?.length||0)>0,ae=j?.server?.remotes?.[0]?.url||null,J=!le&&!!ae,Q=Ze({url:J?ae:""}),Y=J&&Q.state==="connecting";let ee;t[11]!==Q||t[12]!==J?(ee=J&&Q.state==="ready"?(Q.tools||[]).map(vt):[],t[11]=Q,t[12]=J,t[13]=ee):ee=t[13];const xe=ee,$=le?v?.tools||[]:xe,ke=ft(x,v?.publisher),ce=v?ut(M,v.publisher,ke,b??null,pe):{count:0},Te=v?.repository?Qe(v.repository):null,de=!!v?.repository&&!!Te;let R;t[14]!==de?(R={id:"readme",label:"README",visible:de},t[14]=de,t[15]=R):R=t[15];const me=le||xe.length>0||Y&&!!ae;let z;t[16]!==$.length||t[17]!==me?(z={id:"tools",label:"Tools",count:$.length,visible:me},t[16]=$.length,t[17]=me,t[18]=z):z=t[18];let te;t[19]!==R||t[20]!==z?(te=[R,z].filter(bt),t[19]=R,t[20]=z,t[21]=te):te=t[21];const A=te;let se;t[22]!==l||t[23]!==A?(se=A.find(c=>c.id===l)?l:A.find(gt)?.id||A[0]?.id||"overview",t[22]=l,t[23]=A,t[24]=se):se=t[24];const fe=se;let oe;t[25]!==p||t[26]!==L||t[27]!==o||t[28]!==e||t[29]!==j||t[30]!==f?(oe=async c=>{const k=L[c??0]||j;if(!k||!e||!f?.user?.id)return;const U=Ke(k,e.id,f.user.id);if(!U.connection_url){he.error("This MCP Server cannot be connected: no connection URL available");return}try{const{id:V}=await p.create.mutateAsync(U);o({to:"/$org/mcps/$connectionId",params:{org:e.slug,connectionId:V}})}catch(V){const E=V;he.error(`Failed to connect MCP Server: ${E instanceof Error?E.message:String(E)}`)}},t[25]=p,t[26]=L,t[27]=o,t[28]=e,t[29]=j,t[30]=f,t[31]=oe):oe=t[31];const ue=oe;let re;t[32]!==o||t[33]!==e.slug?(re=()=>{o({to:"/$org/store",params:{org:e.slug}})},t[32]=o,t[33]=e.slug,t[34]=re):re=t[34];const B=re;if(!j){let c;return t[35]!==B?(c=s.jsx(nt,{onBack:B}),t[35]=B,t[36]=c):c=t[36],c}if(!v)return null;const P=(j?.server?.remotes?.length??0)>0;let G;t[37]!==B?(G=s.jsx(it,{onBack:B}),t[37]=B,t[38]=G):G=t[38];let F;t[39]!==P?(F=!P&&s.jsxs("div",{className:"mb-6 p-4 bg-amber-50 border border-amber-200 rounded-lg text-sm text-amber-900",children:[s.jsx(st,{size:16,className:"inline mr-2"}),"This MCP Server cannot be connected - no connection method available."]}),t[39]=P,t[40]=F):F=t[40];let O;t[41]!==L||t[42]!==j?(O=L.length>0?L:[j],t[41]=L,t[42]=j,t[43]=O):O=t[43];let W;t[44]!==p.create.isPending||t[45]!==P||t[46]!==v||t[47]!==ue||t[48]!==O?(W=s.jsx(lt,{data:v,itemVersions:O,onInstall:ue,canInstall:P,isInstalling:p.create.isPending}),t[44]=p.create.isPending,t[45]=P,t[46]=v,t[47]=ue,t[48]=O,t[49]=W):W=t[49];let H;t[50]!==v||t[51]!==ce||t[52]!==j?(H=s.jsx(ct,{data:v,publisherInfo:ce,selectedItem:j}),t[50]=v,t[51]=ce,t[52]=j,t[53]=H):H=t[53];let Z;t[54]!==A||t[55]!==v||t[56]!==fe||t[57]!==$||t[58]!==Y?(Z=s.jsx(dt,{data:v,availableTabs:A,effectiveActiveTabId:fe,effectiveTools:$,isLoadingTools:Y,onTabChange:m}),t[54]=A,t[55]=v,t[56]=fe,t[57]=$,t[58]=Y,t[59]=Z):Z=t[59];let K;t[60]!==H||t[61]!==Z?(K=s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 min-h-[677px]",children:[H,Z]}),t[60]=H,t[61]=Z,t[62]=K):K=t[62];let q;t[63]!==F||t[64]!==W||t[65]!==K?(q=s.jsx("div",{className:"flex-1 overflow-y-auto h-full",children:s.jsx("div",{className:"h-full",children:s.jsxs("div",{className:"h-full",children:[F,W,K]})})}),t[63]=F,t[64]=W,t[65]=K,t[66]=q):q=t[66];let ne;return t[67]!==G||t[68]!==q?(ne=s.jsxs("div",{className:"flex flex-col h-full border-l border-border",children:[G,q]}),t[67]=G,t[68]=q,t[69]=ne):ne=t[69],ne}function gt(t){return t.id==="readme"}function bt(t){return t.visible}function vt(t){return{name:t.name,description:t.description}}function jt(t){return t.name.endsWith("_GET")}function yt(t){return t.name.endsWith("_VERSIONS")}function ss(){const t=_.c(6),{org:e}=Ne(),o=ve();let n;t[0]!==o||t[1]!==e.slug?(n=()=>{o({to:"/$org/store",params:{org:e.slug}})},t[0]=o,t[1]=e.slug,t[2]=n):n=t[2];const r=n;let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(D.Suspense,{fallback:s.jsx(ot,{}),children:s.jsx(ht,{})}),t[3]=i):i=t[3];let d;return t[4]!==r?(d=s.jsx(xt,{onBack:r,children:i}),t[4]=r,t[5]=d):d=t[5],d}export{ss as default};
@@ -1 +0,0 @@
1
- import{aq as u,am as s}from"./index-IkrlX4J3.js";function o(e,r){return u(e,s,r)}export{o as u};