@decocms/mesh 2.66.0 → 2.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BmDTNgCi.js → AlertCircle-B2fkM138.js} +1 -1
- package/dist/client/assets/{ArrowUp-DYeWvB8P.js → ArrowUp-D1AvEfzg.js} +1 -1
- package/dist/client/assets/{Calendar-DmBdk9eU.js → Calendar-BVWxw6KN.js} +1 -1
- package/dist/client/assets/{Check-FOOd6Eiq.js → Check-G0Uo7MV1.js} +1 -1
- package/dist/client/assets/{CheckCircle-DQui24Wk.js → CheckCircle-Brh6alH0.js} +1 -1
- package/dist/client/assets/{ChevronDown-D2XG2Gn2.js → ChevronDown-CVB8bXEV.js} +1 -1
- package/dist/client/assets/{ChevronRight-DopLOHAf.js → ChevronRight-c4NlNF9A.js} +1 -1
- package/dist/client/assets/{Code01-5ok4pVqx.js → Code01-BVAq1cya.js} +1 -1
- package/dist/client/assets/{Copy01-DeMGkSiw.js → Copy01-C07m3ESL.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-Dqjmu4CT.js → DotsHorizontal-AVoj4qko.js} +1 -1
- package/dist/client/assets/{DotsVertical-DmUNpRAu.js → DotsVertical-BgAR-Qt1.js} +1 -1
- package/dist/client/assets/{Download01-Cv1Z4E3h.js → Download01-BaWv-MPX.js} +1 -1
- package/dist/client/assets/{Edit01-CF3AUhcj.js → Edit01-abEeaaHN.js} +1 -1
- package/dist/client/assets/{File02-CESqkWVe.js → File02-Cxg7VGhK.js} +1 -1
- package/dist/client/assets/{File06-C3Nbkeoy.js → File06-B-BJJgbp.js} +1 -1
- package/dist/client/assets/{FilterLines-DGQaIa6D.js → FilterLines-CpavrtRH.js} +1 -1
- package/dist/client/assets/{Globe02-BL9kqctd.js → Globe02-DjAe4vbB.js} +1 -1
- package/dist/client/assets/{Grid01-DDbvhTzI.js → Grid01-DkGwMObb.js} +1 -1
- package/dist/client/assets/{Home02-D7WW64qF.js → Home02-C1aheEOO.js} +1 -1
- package/dist/client/assets/{Image01-UeXsz1EO.js → Image01-BnPQLh0E.js} +1 -1
- package/dist/client/assets/{Inbox01-_-qVJU9L.js → Inbox01-TnJNmMxq.js} +1 -1
- package/dist/client/assets/{InfoCircle-DZqaw0re.js → InfoCircle-CPCf05Up.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Dzwm6JDU.js → LinkExternal01-4WgHKQsl.js} +1 -1
- package/dist/client/assets/{List-7GceYgj2.js → List-_b-aWM0n.js} +1 -1
- package/dist/client/assets/{Loading01-B_cIepvx.js → Loading01-DJg-4sIh.js} +1 -1
- package/dist/client/assets/{Lock01-itjQ9WNq.js → Lock01-bcOvI0Ko.js} +1 -1
- package/dist/client/assets/{Pin01-ycwW3H8M.js → Pin01-BmWi3GT3.js} +1 -1
- package/dist/client/assets/{Play-Bx5KdMkX.js → Play-DmKqcTBT.js} +1 -1
- package/dist/client/assets/{Plus-BTHcgiwq.js → Plus-BfhQyaT2.js} +1 -1
- package/dist/client/assets/{SearchMd-cyrKubyu.js → SearchMd-vzH73w2C.js} +1 -1
- package/dist/client/assets/{Share07-KO3g9brj.js → Share07-BebYFAZG.js} +1 -1
- package/dist/client/assets/{Terminal-C-7NXNYw.js → Terminal-cm5IHqjb.js} +1 -1
- package/dist/client/assets/{Tool01-DXuVNQ8j.js → Tool01-8pfwvGVO.js} +1 -1
- package/dist/client/assets/{Trash01-BVntsGdy.js → Trash01-uXqVqZ4v.js} +1 -1
- package/dist/client/assets/{Upload01-CZI-8Oxg.js → Upload01-D8CqJSKT.js} +1 -1
- package/dist/client/assets/{Users03-CW_MIbrQ.js → Users03-BKCrYRx-.js} +1 -1
- package/dist/client/assets/{X-nJs6CWkc.js → X-BW6YCcKc.js} +1 -1
- package/dist/client/assets/{XClose-grmHIFDR.js → XClose-C2NXNxvY.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-DRBTSbmt.js → agent-connections-preview-CGKlKFHn.js} +1 -1
- package/dist/client/assets/agent-detail-M33WpTr5.js +1 -0
- package/dist/client/assets/{agents-Ce8XdqjV.js → agents-BjHugWl0.js} +1 -1
- package/dist/client/assets/{alert-dialog-DpejafUm.js → alert-dialog-fJOs6NlL.js} +1 -1
- package/dist/client/assets/{auth-catchall-C0vi9YlN.js → auth-catchall-D-r62wiG.js} +1 -1
- package/dist/client/assets/{badge-BoqXK3lQ.js → badge-BB7crk7y.js} +1 -1
- package/dist/client/assets/{binder-CzgMN-r7.js → binder-CbZhSXdv.js} +1 -1
- package/dist/client/assets/{breadcrumb-BIaqXYfC.js → breadcrumb-niivPcbv.js} +1 -1
- package/dist/client/assets/{button-BpOnhkky.js → button-CjH_jeJQ.js} +1 -1
- package/dist/client/assets/{card-QAf6gSBk.js → card-BuSwLKUe.js} +1 -1
- package/dist/client/assets/{checkbox-M8Qpx3bB.js → checkbox-jehQHPHA.js} +1 -1
- package/dist/client/assets/{circle-alert-_paQffOL.js → circle-alert-B-boz6lj.js} +1 -1
- package/dist/client/assets/{collection-detail-C75jQ60M.js → collection-detail-1T0ecY8Q.js} +3 -3
- package/dist/client/assets/{collection-search-BHH6rJUx.js → collection-search-CEX16zDI.js} +1 -1
- package/dist/client/assets/{collection-tab-ewgG6gPy.js → collection-tab-CN84ifuT.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BSOGGyRN.js → collection-table-wrapper-Cf-srhsL.js} +1 -1
- package/dist/client/assets/{collection-tabs-BERHo0JB.js → collection-tabs-BHUXhrq0.js} +1 -1
- package/dist/client/assets/{command-j0rRzLsa.js → command-CI8tLx1q.js} +1 -1
- package/dist/client/assets/{connect-BZHDhYNf.js → connect-DnxowUrB.js} +1 -1
- package/dist/client/assets/{connection-card-BxiMoHcy.js → connection-card-BMgz1e9v.js} +1 -1
- package/dist/client/assets/connection-detail-DJfMln3d.js +1 -0
- package/dist/client/assets/connections-D9cfv_7-.js +1 -0
- package/dist/client/assets/constants-CW07-qnN.js +1 -0
- package/dist/client/assets/constants-CeDPLV3j.js +1 -0
- package/dist/client/assets/{create-organization-dialog-BQQDstNY.js → create-organization-dialog-DEJZtz9m.js} +1 -1
- package/dist/client/assets/{dialog-C0hNL5DR.js → dialog-BjAQMOK4.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DJexz_iG.js → dropdown-menu-vCMq_394.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-CQf-tOKf.js → dynamic-plugin-layout-DkBPIXG_.js} +1 -1
- package/dist/client/assets/{empty-state-C8TWk9F-.js → empty-state-BvjoZw7e.js} +1 -1
- package/dist/client/assets/{empty-state-BqgMUhfM.js → empty-state-Gbw_otIT.js} +1 -1
- package/dist/client/assets/{env-vars-editor-HJYbSC7d.js → env-vars-editor-B1PughxC.js} +1 -1
- package/dist/client/assets/{error-boundary-DxoAfcBm.js → error-boundary-CfjGe8GJ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-B9k85tYq.js → extract-connection-data-CF78Ki23.js} +1 -1
- package/dist/client/assets/{file-browser-CvDyWBhC.js → file-browser-nwtZ6onU.js} +2 -2
- package/dist/client/assets/{form-Dk7QlEAK.js → form-CHBB34OT.js} +1 -1
- package/dist/client/assets/{grid-view-Cwc1HGyY.js → grid-view-DL05Fujd.js} +1 -1
- package/dist/client/assets/{home-CN3zWCYm.js → home-CLtjbN9e.js} +1 -1
- package/dist/client/assets/{index-5OU1orTq.js → index-8kTnOBNx.js} +82 -82
- package/dist/client/assets/{index-iT9dC5c9.js → index-BMLEzHeY.js} +2 -2
- package/dist/client/assets/index-Bmf5NCxB.js +1 -0
- package/dist/client/assets/{index-u_jFx8_b.js → index-BsfqdgCF.js} +1 -1
- package/dist/client/assets/{index-s7ZD8Q89.js → index-CnGxfk10.js} +2 -2
- package/dist/client/assets/index-Ctm-JrdL.js +1 -0
- package/dist/client/assets/index-Cy9rBAOX.css +1 -0
- package/dist/client/assets/{index-5q6rcGyy.js → index-D0blI3XW.js} +1 -1
- package/dist/client/assets/{index-Dadp543V.js → index-OwZGmo7I.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BZOwrkV7.js → infiniteQueryObserver-eQjHgw7d.js} +1 -1
- package/dist/client/assets/{input-BxYV0rat.js → input-BlxXRmnq.js} +1 -1
- package/dist/client/assets/{layout-CASMZyDZ.js → layout-DF2Vd6dD.js} +1 -1
- package/dist/client/assets/{localstorage-keys-5olAunK8.js → localstorage-keys-CYYT4Okl.js} +1 -1
- package/dist/client/assets/{login-Db3PmHLF.js → login-rMJme3Jv.js} +1 -1
- package/dist/client/assets/{mcp-oauth-z5AJv_x-.js → mcp-oauth-CPPdR_so.js} +1 -1
- package/dist/client/assets/{mcp-server-card-BoB65BcA.js → mcp-server-card-Dz6OItSH.js} +1 -1
- package/dist/client/assets/mcp-server-detail-CKCgTImi.js +2 -0
- package/dist/client/assets/{members-ceiqMxhW.js → members-2hnMfIOo.js} +1 -1
- package/dist/client/assets/{monaco-editor-DGU8ljQX.js → monaco-editor-DYG-izQC.js} +1 -1
- package/dist/client/assets/{monitoring-O_ifymcw.js → monitoring-45wfQEuI.js} +5 -5
- package/dist/client/assets/{oauth-callback-CJUhWZYA.js → oauth-callback-DrWbOmjU.js} +1 -1
- package/dist/client/assets/page-CqA3sqGx.js +1 -0
- package/dist/client/assets/{page-DhHFaPO-.js → page-Dig-kXzy.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CPUeVAAU.js → plugin-empty-state-D_A0ZR3o.js} +1 -1
- package/dist/client/assets/{plugin-header-EwCcoJvN.js → plugin-header-CICDX7I-.js} +1 -1
- package/dist/client/assets/{plugins-DvqcqtBT.js → plugins-Cj62SDQ2.js} +1 -1
- package/dist/client/assets/{popover-BMJmHsYE.js → popover-JdYFp74u.js} +1 -1
- package/dist/client/assets/{registry-utils-DBl3y38w.js → registry-utils-BwCYxc2h.js} +1 -1
- package/dist/client/assets/{resizable-8AV10P7U.js → resizable-CRqJtbE0.js} +1 -1
- package/dist/client/assets/{select-CsCf0ULc.js → select-Br1I42DX.js} +1 -1
- package/dist/client/assets/{settings-DrPqjDLH.js → settings-Csz6dsxM.js} +1 -1
- package/dist/client/assets/shell-layout-CLklIdz9.js +12 -0
- package/dist/client/assets/{spinner-BEdv3OCr.js → spinner-BmgAJqAH.js} +1 -1
- package/dist/client/assets/{store-invite-DwRsaBXD.js → store-invite-DoSHlGQN.js} +1 -1
- package/dist/client/assets/{switch-BElvgI-f.js → switch-CMXpi8bR.js} +1 -1
- package/dist/client/assets/{table-CYp1yZI4.js → table-CGj3hOxZ.js} +1 -1
- package/dist/client/assets/{textarea-agcUwZUx.js → textarea-Dg4rxulg.js} +1 -1
- package/dist/client/assets/{tools-list-9l0l9v4y.js → tools-list-BVu0EauP.js} +1 -1
- package/dist/client/assets/{typewriter-title-Ai1M4PRw.js → typewriter-title-bodc21io.js} +1 -1
- package/dist/client/assets/{use-binding-DJh8-5RZ.js → use-binding-D3U0XVop.js} +1 -1
- package/dist/client/assets/use-connection-D8sP6Sf6.js +1 -0
- package/dist/client/assets/{use-create-virtual-mcp-CqBT5mhP.js → use-create-virtual-mcp-D7NmkZa5.js} +1 -1
- package/dist/client/assets/use-deco-chat-open-cI1K_3H4.js +23 -0
- package/dist/client/assets/{use-list-state-DxNIJ24C.js → use-list-state-BAGJ3irz.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-O5u3joa7.js → use-mcp-prompts-vgmIJb9h.js} +1 -1
- package/dist/client/assets/use-mcp-tools-X7PZhTof.js +1 -0
- package/dist/client/assets/{use-mobile-Dwv-QQpY.js → use-mobile-r7mBIBEK.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Bfq84pBA.js → use-organization-settings-CdospZv2.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-wUAVm-qx.js → use-virtual-mcp-DrasHs63.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CmVm1W19.js +1 -0
- package/dist/client/assets/{useMutation-DuHm_HpG.js → useMutation-CUbpcpQz.js} +1 -1
- package/dist/client/assets/useQuery-CyQI_ufp.js +1 -0
- package/dist/client/assets/{view-mode-toggle-La4Te8Tf.js → view-mode-toggle-C6XvJAEJ.js} +1 -1
- package/dist/client/assets/{workflow-DXxXXzkW.js → workflow-BSVWLVOc.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +151 -151
- package/dist/server/migrate.js +131 -131
- package/dist/server/server.js +131 -131
- package/package.json +1 -1
- package/dist/client/assets/agent-detail-B4mhxHnw.js +0 -1
- package/dist/client/assets/collapsible-Casou47x.js +0 -23
- package/dist/client/assets/connection-detail-CLDY2hTl.js +0 -1
- package/dist/client/assets/connections-CzgxDqaC.js +0 -1
- package/dist/client/assets/constants-B1dGAzkj.js +0 -1
- package/dist/client/assets/constants-CTZ4IIMo.js +0 -1
- package/dist/client/assets/index-Bj5Q4dXx.css +0 -1
- package/dist/client/assets/index-DOE-Wjlc.js +0 -1
- package/dist/client/assets/index-DlEzWBZo.js +0 -1
- package/dist/client/assets/mcp-server-detail-DdNAJTvb.js +0 -2
- package/dist/client/assets/page-PpLUsHxD.js +0 -1
- package/dist/client/assets/shell-layout-D4FIGGpu.js +0 -12
- package/dist/client/assets/use-connection-SGm9ccmH.js +0 -1
- package/dist/client/assets/use-deco-chat-open-CnW1_sXm.js +0 -1
- package/dist/client/assets/useInfiniteQuery-D_I_CqcM.js +0 -1
- package/dist/client/assets/useQuery-nHeassts.js +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-iT9dC5c9.js","assets/index-Bj5Q4dXx.css","assets/index-DlEzWBZo.js","assets/use-connection-SGm9ccmH.js","assets/useMutation-DuHm_HpG.js","assets/constants-B1dGAzkj.js","assets/useQuery-nHeassts.js","assets/use-mcp-prompts-O5u3joa7.js","assets/use-virtual-mcp-wUAVm-qx.js","assets/mcp-oauth-z5AJv_x-.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as F,c as E,j as t,u as he,v as ge,a as ke,f as Le,g as Pe,bo as ce,K as Me,l as Ve,t as de}from"./index-iT9dC5c9.js";import{i as De}from"./AlertCircle-BmDTNgCi.js";import{i as ve}from"./Loading01-B_cIepvx.js";import{P as me}from"./index-DOE-Wjlc.js";import{I as be,E as Ee}from"./empty-state-C8TWk9F-.js";import{B as te,c as $e}from"./button-BpOnhkky.js";import{i as Re}from"./CheckCircle-DQui24Wk.js";import{t as Ae}from"./ChevronDown-D2XG2Gn2.js";import{s as fe}from"./Plus-BTHcgiwq.js";import{a as Be,c as Ue,b as ze,D as Oe}from"./dropdown-menu-DJexz_iG.js";import{n as ue}from"./LinkExternal01-Dzwm6JDU.js";import{T as Fe,R as He}from"./tools-list-9l0l9v4y.js";import{C as Ge}from"./collection-tabs-BERHo0JB.js";import{s as We}from"./Globe02-BL9kqctd.js";import{a as qe,b as Ke,e as Qe}from"./mcp-server-card-BoB65BcA.js";import{i as Ye}from"./Terminal-C-7NXNYw.js";import{B as Xe,a as Ze,b as pe,c as Je,d as et,e as tt}from"./breadcrumb-BIaqXYfC.js";import{u as st}from"./use-binding-DJh8-5RZ.js";import{u as ot}from"./useQuery-nHeassts.js";import{d as rt,e as nt,c as it,f as lt}from"./use-connection-SGm9ccmH.js";import{u as at}from"./constants-B1dGAzkj.js";import{u as ct,L as dt}from"./localstorage-keys-5olAunK8.js";import{e as mt}from"./extract-connection-data-B9k85tYq.js";import{s as ft}from"./slugify-CEUa2lfQ.js";import{e as ut,g as pt}from"./github-icon-Dp3wHhYE.js";import{f as xt,g as ht,c as gt}from"./registry-utils-DBl3y38w.js";import{i as vt}from"./InfoCircle-DZqaw0re.js";import"./ChevronRight-DopLOHAf.js";import"./File06-C3Nbkeoy.js";import"./collection-table-wrapper-BSOGGyRN.js";import"./ArrowUp-DYeWvB8P.js";import"./Check-FOOd6Eiq.js";import"./Grid01-DDbvhTzI.js";import"./List-7GceYgj2.js";import"./view-mode-toggle-La4Te8Tf.js";import"./table-CYp1yZI4.js";import"./collection-search-BHH6rJUx.js";import"./SearchMd-cyrKubyu.js";import"./input-BxYV0rat.js";import"./card-QAf6gSBk.js";import"./layout-CASMZyDZ.js";import"./badge-BoqXK3lQ.js";import"./Lock01-itjQ9WNq.js";import"./binder-CzgMN-r7.js";import"./useMutation-DuHm_HpG.js";import"./constants-CTZ4IIMo.js";import"./generate-id-Dyweu44Y.js";const je=({size:o=24,color:e="currentColor",...s})=>F.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},F.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"}));je.displayName="SearchLg";function bt(o){const e=E.c(3),{message:s}=o,r=s===void 0?"Loading MCP Server details...":s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(ve,{size:48,className:"animate-spin mb-4"}),e[0]=n):n=e[0];let i;return e[1]!==r?(i=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n,t.jsx("p",{className:"text-sm text-muted-foreground",children:r})]}),e[1]=r,e[2]=i):i=e[2],i}function jt(o){const e=E.c(9),{error:s,onBack:r}=o,n=s instanceof Error?s.message:s;let i,c;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(De,{size:48,className:"text-destructive mb-4"}),c=t.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading MCP Server"}),e[0]=i,e[1]=c):(i=e[0],c=e[1]);let u;e[2]!==n?(u=t.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:n}),e[2]=n,e[3]=u):u=e[3];let d;e[4]!==r?(d=t.jsx("button",{onClick:r,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]=r,e[5]=d):d=e[5];let m;return e[6]!==u||e[7]!==d?(m=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[i,c,u,d]}),e[6]=u,e[7]=d,e[8]=m):m=e[8],m}function yt(o){const e=E.c(5),{onBack:s}=o;let r,n,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(je,{size:48,className:"text-muted-foreground mb-4"}),n=t.jsx("h3",{className:"text-lg font-medium mb-2",children:"MCP Server not found"}),i=t.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:"The MCP Server you're looking for doesn't exist in this store."}),e[0]=r,e[1]=n,e[2]=i):(r=e[0],n=e[1],i=e[2]);let c;return e[3]!==s?(c=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[r,n,i,t.jsx("button",{onClick:s,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]=s,e[4]=c):c=e[4],c}function Nt(o){const e=E.c(2),{breadcrumb:s}=o;let r;return e[0]!==s?(r=t.jsx(me.Header,{children:t.jsx(me.Header.Left,{children:s})}),e[0]=s,e[1]=r):r=e[1],r}function xe(o){const e=E.c(28),{versions:s,selectedIndex:r,onSelect:n,isInstalling:i,variant:c,showLabel:u}=o,d=i===void 0?!1:i,m=c===void 0?"brand":c,I=u===void 0?!1:u,p=s[r],S=I?"sm":"default",j=m==="brand"&&"rounded-l-none px-2 border-l-2 border-l-white/50";let y;e[0]!==j?(y=$e("shrink-0 cursor-pointer",j),e[0]=j,e[1]=y):y=e[1];let f;e[2]!==p?.server?.version||e[3]!==I?(f=I&&t.jsxs("span",{className:"mr-1",children:["v",p?.server?.version||"unknown"]}),e[2]=p?.server?.version,e[3]=I,e[4]=f):f=e[4];const N=I?14:20;let h;e[5]!==N?(h=t.jsx(Ae,{size:N}),e[5]=N,e[6]=h):h=e[6];let x;e[7]!==d||e[8]!==S||e[9]!==y||e[10]!==f||e[11]!==h||e[12]!==m?(x=t.jsx(Be,{asChild:!0,children:t.jsxs(te,{variant:m,disabled:d,size:S,className:y,children:[f,h]})}),e[7]=d,e[8]=S,e[9]=y,e[10]=f,e[11]=h,e[12]=m,e[13]=x):x=e[13];let g;if(e[14]!==d||e[15]!==n||e[16]!==r||e[17]!==s){let C;e[19]!==d||e[20]!==n||e[21]!==r?(C=(v,b)=>{const P=v._meta?.["io.modelcontextprotocol.registry/official"];return t.jsx(Ue,{onClick:()=>n(b),disabled:d,className:"cursor-pointer",children:t.jsxs("div",{className:"flex items-center justify-between gap-2 w-full",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("div",{className:"font-medium text-sm",children:["v",v.server?.version||"unknown"]}),P?.isLatest&&t.jsx("div",{className:"text-xs text-muted-foreground/50 font-semibold",children:"LATEST"})]}),b===r&&t.jsx(Re,{size:16,className:"text-muted-foreground shrink-0"})]})},b)},e[19]=d,e[20]=n,e[21]=r,e[22]=C):C=e[22],g=s.map(C),e[14]=d,e[15]=n,e[16]=r,e[17]=s,e[18]=g}else g=e[18];let _;e[23]!==g?(_=t.jsx(ze,{align:"end",className:"w-56 max-h-[300px] overflow-y-auto",children:g}),e[23]=g,e[24]=_):_=e[24];let w;return e[25]!==x||e[26]!==_?(w=t.jsxs(Oe,{children:[x,_]}),e[25]=x,e[26]=_,e[27]=w):w=e[27],w}function Ct(o){const e=E.c(46),{data:s,itemVersions:r,onInstall:n,canInstall:i,isInstalling:c,hideInstallControls:u,selectedVersionIndex:d,onVersionChange:m}=o,I=i===void 0?!0:i,p=c===void 0?!1:c,S=u===void 0?!1:u,[j,y]=F.useState(0),f=d??j;let N;e[0]!==m?(N=B=>{y(B),m?.(B)},e[0]=m,e[1]=N):N=e[1];const h=N,x=r[f]||r[0];let g;e[2]!==x?.server?.remotes?(g=x?.server?.remotes??[],e[2]=x?.server?.remotes,e[3]=g):g=e[3];const _=g;let w;e[4]!==x?.server?.packages?(w=x?.server?.packages??[],e[4]=x?.server?.packages,e[5]=w):w=e[5];const v=w.length>0,b=_.length>0,P=_.findIndex(wt),a=P>=0?P:0;let M;e[6]!==a||e[7]!==v||e[8]!==b||e[9]!==n||e[10]!==f?(M=()=>{b?n(f,a,void 0):v&&n(f,void 0,0)},e[6]=a,e[7]=v,e[8]=b,e[9]=n,e[10]=f,e[11]=M):M=e[11];const V=M;let H;e[12]!==r||e[13]!==n||e[14]!==h?(H=B=>{h(B);const X=r[B],Z=X?.server?.remotes??[],se=X?.server?.packages??[];if(Z.length>0){const J=Z.findIndex(St);n(B,J>=0?J:0,void 0)}else se.length>0&&n(B,void 0,0)},e[12]=r,e[13]=n,e[14]=h,e[15]=H):H=e[15];const K=H;let R;e[16]!==s.icon||e[17]!==s.name?(R=t.jsx(be,{icon:s.icon,name:s.name,size:"lg",className:"shrink-0 shadow-sm"}),e[16]=s.icon,e[17]=s.name,e[18]=R):R=e[18];let k;e[19]!==s.name?(k=t.jsx("h1",{className:"text-3xl font-medium",children:s.name}),e[19]=s.name,e[20]=k):k=e[20];let T;e[21]!==s.verified?(T=s.verified&&t.jsx("img",{src:"/verified-badge.svg",alt:"Verified",className:"w-5 h-5 shrink-0"}),e[21]=s.verified,e[22]=T):T=e[22];let A;e[23]!==k||e[24]!==T?(A=t.jsxs("div",{className:"flex items-center gap-2",children:[k,T]}),e[23]=k,e[24]=T,e[25]=A):A=e[25];let D;e[26]!==s.shortDescription?(D=s.shortDescription&&t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:s.shortDescription}),e[26]=s.shortDescription,e[27]=D):D=e[27];let U;e[28]!==A||e[29]!==D?(U=t.jsxs("div",{className:"flex-1 min-w-0",children:[A,D]}),e[28]=A,e[29]=D,e[30]=U):U=e[30];let z;e[31]!==I||e[32]!==V||e[33]!==K||e[34]!==S||e[35]!==p||e[36]!==r||e[37]!==f||e[38]!==h?(z=I&&!S?t.jsx("div",{className:"shrink-0 flex items-center gap-2",children:r.length>1?t.jsxs("div",{className:"flex",children:[t.jsxs(te,{variant:"brand",onClick:V,disabled:p,className:"shrink-0 rounded-r-none cursor-pointer",children:[t.jsx(fe,{size:20}),p?"Connecting...":"Connect"]}),t.jsx(xe,{versions:r,selectedIndex:f,onSelect:K,isInstalling:p,variant:"brand"})]}):t.jsxs(te,{variant:"brand",onClick:V,disabled:r.length===0||p,className:"shrink-0 cursor-pointer",children:[t.jsx(fe,{size:20}),p?"Connecting...":"Connect"]})}):S?r.length>1?t.jsx("div",{className:"shrink-0",children:t.jsx(xe,{versions:r,selectedIndex:f,onSelect:h,isInstalling:p,variant:"outline",showLabel:!0})}):null:t.jsx("div",{className:"shrink-0 px-4 py-2 text-sm text-muted-foreground bg-muted rounded-lg",children:"Cannot be connected"}),e[31]=I,e[32]=V,e[33]=K,e[34]=S,e[35]=p,e[36]=r,e[37]=f,e[38]=h,e[39]=z):z=e[39];let O;e[40]!==U||e[41]!==z?(O=t.jsxs("div",{className:"flex-1 min-w-0 flex items-center justify-between",children:[U,z]}),e[40]=U,e[41]=z,e[42]=O):O=e[42];let G;return e[43]!==O||e[44]!==R?(G=t.jsxs("div",{className:"flex items-center gap-4 py-8 px-5 border-b border-border",children:[R,O]}),e[43]=O,e[44]=R,e[45]=G):G=e[45],G}function St(o){return o.type?.toLowerCase()==="http"||o.type?.toLowerCase()==="streamable-http"}function wt(o){return o.type?.toLowerCase()==="http"||o.type?.toLowerCase()==="streamable-http"}function It(o){if(!o)return"—";try{const e=new Date(o);return isNaN(e.getTime())?"—":e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function _t(o){const e=E.c(47),{data:s,publisherInfo:r,selectedItem:n}=o;let i;e[0]!==s.description?(i=s.description&&t.jsxs("div",{className:"px-5 pb-5 border-b border-border",children:[t.jsx("h2",{className:"text-base font-medium mb-3",children:"Overview"}),t.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:s.description})]}),e[0]=s.description,e[1]=i):i=e[1];const c=s.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":s.publisher;let u;e[2]!==r.logo||e[3]!==c?(u=t.jsx(be,{icon:r.logo,name:c,size:"sm",className:"shrink-0 shadow-sm"}),e[2]=r.logo,e[3]=c,e[4]=u):u=e[4];let d;e[5]!==s.publisher?(d=s.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":s.publisher.charAt(0).toUpperCase()+s.publisher.slice(1),e[5]=s.publisher,e[6]=d):d=e[6];let m;e[7]!==d?(m=t.jsx("div",{className:"font-medium",children:d}),e[7]=d,e[8]=m):m=e[8];let I;e[9]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx("div",{className:"text-xs text-muted-foreground",children:"Publisher"}),e[9]=I):I=e[9];let p;e[10]!==m?(p=t.jsxs("div",{children:[m,I]}),e[10]=m,e[11]=p):p=e[11];let S;e[12]!==u||e[13]!==p?(S=t.jsx("div",{className:"px-5 border-b border-border",children:t.jsxs("div",{className:"flex items-center gap-3 py-5",children:[u,p]})}),e[12]=u,e[13]=p,e[14]=S):S=e[14];let j;e[15]!==s.version?(j=s.version&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Version"}),t.jsxs("span",{className:"text-muted-foreground uppercase text-xs",children:["v",s.version]})]}),e[15]=s.version,e[16]=j):j=e[16];let y;e[17]!==s.tags?(y=s.tags&&s.tags.length>0&&t.jsxs("div",{className:"flex justify-between items-start text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Tags"}),t.jsx("div",{className:"flex flex-wrap gap-1 justify-end max-w-[60%]",children:s.tags.map(kt)})]}),e[17]=s.tags,e[18]=y):y=e[18];let f;e[19]!==s.categories?(f=s.categories&&s.categories.length>0&&t.jsxs("div",{className:"flex justify-between items-start text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Categories"}),t.jsx("div",{className:"flex flex-wrap gap-1 justify-end max-w-[60%]",children:s.categories.map(Tt)})]}),e[19]=s.categories,e[20]=f):f=e[20];let N;e[21]!==s.connectionType?(N=s.connectionType&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Connection Type"}),t.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:s.connectionType})]}),e[21]=s.connectionType,e[22]=N):N=e[22];let h;e[23]!==s.schemaVersion?(h=s.schemaVersion&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Schema Version"}),t.jsx("span",{className:"text-muted-foreground text-xs",children:s.schemaVersion})]}),e[23]=s.schemaVersion,e[24]=h):h=e[24];let x;e[25]!==s.websiteUrl?(x=s.websiteUrl&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Website"}),t.jsxs("a",{href:s.websiteUrl,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:underline flex items-center gap-1 text-xs",children:[t.jsx("span",{children:"Visit"}),t.jsx(ue,{size:14})]})]}),e[25]=s.websiteUrl,e[26]=x):x=e[26];let g;e[27]!==s.repository?(g=s.repository?.url&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Source"}),t.jsxs("a",{href:s.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:underline flex items-center gap-1 text-xs",children:[t.jsx("span",{children:"GitHub"}),t.jsx(ue,{size:14})]})]}),e[27]=s.repository,e[28]=g):g=e[28];let _;e[29]!==y||e[30]!==f||e[31]!==N||e[32]!==h||e[33]!==x||e[34]!==g||e[35]!==j?(_=t.jsxs("div",{className:"px-5 py-5 border-b border-border space-y-4",children:[j,y,f,N,h,x,g]}),e[29]=y,e[30]=f,e[31]=N,e[32]=h,e[33]=x,e[34]=g,e[35]=j,e[36]=_):_=e[36];let w;e[37]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx("span",{className:"text-foreground text-sm",children:"Last Updated"}),e[37]=w):w=e[37];let C;e[38]!==n.updated_at?(C=It(n.updated_at),e[38]=n.updated_at,e[39]=C):C=e[39];let v;e[40]!==C?(v=t.jsxs("div",{className:"px-5 py-5 text-sm flex justify-between items-center border-b border-border",children:[w,t.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:C})]}),e[40]=C,e[41]=v):v=e[41];let b;return e[42]!==i||e[43]!==_||e[44]!==v||e[45]!==S?(b=t.jsxs("div",{className:"lg:col-span-1 flex flex-col pt-5",children:[i,S,_,v]}),e[42]=i,e[43]=_,e[44]=v,e[45]=S,e[46]=b):b=e[46],b}function Tt(o){return t.jsx("span",{className:"text-xs bg-muted px-2 py-0.5 rounded",children:o},o)}function kt(o){return t.jsx("span",{className:"text-xs bg-muted px-2 py-0.5 rounded",children:o},o)}const Lt=[{value:"http",label:"HTTP"},{value:"sse",label:"SSE"},{value:"stdio",label:"STDIO"},{value:"all",label:"All"}],Pt={docs:"Documentation",bindings:"Workers Bindings",builds:"Workers Builds",observability:"Observability",radar:"Radar",containers:"Containers",browser:"Browser Rendering",logs:"Logpush",autorag:"AutoRAG",auditlogs:"Audit Logs",graphql:"GraphQL",dex:"DEX Monitoring",casb:"CASB"};function Mt(o){if(!o)return"Local";try{return new URL(o).hostname}catch{return o}}function Vt(o){if(!o)return"local";try{const e=new URL(o).hostname;return e.split(".")[0]||e}catch{return"unknown"}}function Dt(o){const e=Pt[o.toLowerCase()];return e||o.replace(/[-_]/g," ").replace(/\b\w/g,s=>s.toUpperCase())}function Et(o){if(!o)return"http";const e=o.toLowerCase();return e==="sse"?"sse":e==="stdio"?"stdio":"http"}function $t(o){return o.map((e,s)=>{const r=Et(e.type),n=Mt(e.url),i=Vt(e.url),c=e.title||e.name||Dt(i);return{index:s,protocol:r,url:e.url,hostname:n,serviceName:i,displayName:c,name:e.name,title:e.title,description:e.description,_type:e._type,_index:e._index}})}function Rt(o){const e=E.c(2),{protocol:s,className:r}=o;let n;return e[0]!==r?(n={http:t.jsx(We,{className:r}),sse:t.jsx(Ke,{className:r}),stdio:t.jsx(Ye,{className:r})},e[0]=r,e[1]=n):n=e[1],n[s]}function At(o){const e=E.c(10),{options:s,selected:r,onSelect:n}=o;if(s.length<=1)return null;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("span",{className:"text-sm text-muted-foreground",children:"Protocol:"}),e[0]=i):i=e[0];let c;if(e[1]!==n||e[2]!==s||e[3]!==r){let d;e[5]!==n||e[6]!==r?(d=m=>t.jsxs(te,{variant:r===m.value?"default":"outline",size:"sm",onClick:()=>n(m.value),className:"cursor-pointer",children:[t.jsx(Rt,{protocol:m.value==="all"?"http":m.value,className:"w-4 h-4 mr-1"}),m.label]},m.value),e[5]=n,e[6]=r,e[7]=d):d=e[7],c=s.map(d),e[1]=n,e[2]=s,e[3]=r,e[4]=c}else c=e[4];let u;return e[8]!==c?(u=t.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[i,t.jsx("div",{className:"flex gap-1",children:c})]}),e[8]=c,e[9]=u):u=e[9],u}function Bt(o){const e=E.c(11),{servers:s,onInstall:r,isInstalling:n,icon:i,mcpName:c,showStdio:u}=o,d=n===void 0?!1:n,m=u===void 0?!1:u,I=m?s:s.filter(Ft),p=$t(I),S=p.length<13?"all":"http",[j,y]=F.useState(S);let f;e:{if(j==="all"){f="all";break e}let a;if(e[0]!==j?(a=V=>V.protocol===j,e[0]=j,e[1]=a):a=e[1],p.some(a)){f=j;break e}if(p.length<13){f="all";break e}f=p[0]?.protocol??"http"}const N=f,h=N==="all"?p:p.filter(a=>a.protocol===N),x=new Set(p.map(Ot));let g=Lt.filter(a=>a.value==="all"||x.has(a.value));m||(g=g.filter(zt));const _=x.size<=1?g.filter(Ut):g,w="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4";let C;e[2]!==i||e[3]!==d||e[4]!==c||e[5]!==r?(C=a=>t.jsx(qe,{variant:"server",icon:i??null,displayName:a.displayName,description:a.description??null,hostname:a.hostname,protocol:a.protocol,isInstalling:d,onClick:()=>r({type:a.protocol,url:a.url,name:a.name,title:a.title,description:a.description,_type:a._type,_index:a._index})},`${a.hostname}-${a.protocol}-${a.index}`),e[2]=i,e[3]=d,e[4]=c,e[5]=r,e[6]=C):C=e[6];const v=h.map(C);let b;e[7]!==v?(b=t.jsx("div",{className:w,children:v}),e[7]=v,e[8]=b):b=e[8];let P;return e[9]!==h.length?(P=h.length===0&&t.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No servers match the selected filter."}),e[9]=h.length,e[10]=P):P=e[10],t.jsxs("div",{className:"p-5",children:[t.jsx(At,{options:_,selected:N,onSelect:y}),b,P]})}function Ut(o){return o.value!=="all"}function zt(o){return o.value!=="stdio"}function Ot(o){return o.protocol}function Ft(o){return o.type?.toLowerCase()!=="stdio"}function Ht(o){const e=E.c(29),{data:s,availableTabs:r,effectiveActiveTabId:n,effectiveTools:i,isLoadingTools:c,onTabChange:u,servers:d,onInstallServer:m,isInstalling:I,mcpIcon:p,mcpName:S,showStdio:j}=o,y=c===void 0?!1:c;let f;e[0]!==d?(f=d===void 0?[]:d,e[0]=d,e[1]=f):f=e[1];const N=f,h=I===void 0?!1:I,x=j===void 0?!1:j;let g;e[2]!==i?(g=i.map(Gt),e[2]=i,e[3]=g):g=e[3];const _=g;let w;e[4]!==r||e[5]!==n||e[6]!==u?(w=r.length>0&&t.jsx("div",{className:"px-4 py-2 border-b border-border bg-background",children:t.jsx(Ge,{tabs:r,activeTab:n,onTabChange:u})}),e[4]=r,e[5]=n,e[6]=u,e[7]=w):w=e[7];let C;e[8]!==n||e[9]!==h||e[10]!==p||e[11]!==S||e[12]!==m||e[13]!==N||e[14]!==x?(C=n==="servers"&&N.length>0&&t.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:t.jsx(Bt,{servers:N,onInstall:a=>m?.(a),isInstalling:h,icon:p,mcpName:S,showStdio:x})}),e[8]=n,e[9]=h,e[10]=p,e[11]=S,e[12]=m,e[13]=N,e[14]=x,e[15]=C):C=e[15];let v;e[16]!==n||e[17]!==i.length||e[18]!==y||e[19]!==_?(v=n==="tools"&&t.jsx("div",{className:"flex flex-col flex-1",children:y?t.jsxs("div",{className:"flex items-center justify-center p-8",children:[t.jsx(ve,{size:24,className:"animate-spin"}),t.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:"Loading tools..."})]}):i.length>0?t.jsx(Fe,{tools:_,showToolbar:!1,emptyMessage:"This MCP Server doesn't have any tools."}):t.jsx(Ee,{image:null,title:"No tools available",description:"This MCP Server doesn't have any tools."})}),e[16]=n,e[17]=i.length,e[18]=y,e[19]=_,e[20]=v):v=e[20];let b;e[21]!==s?.repository||e[22]!==n?(b=n==="readme"&&t.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:t.jsx(He,{repository:s?.repository})}),e[21]=s?.repository,e[22]=n,e[23]=b):b=e[23];let P;return e[24]!==b||e[25]!==w||e[26]!==C||e[27]!==v?(P=t.jsxs("div",{className:"lg:col-span-2 flex flex-col border-l border-border",children:[w,C,v,b]}),e[24]=b,e[25]=w,e[26]=C,e[27]=v,e[28]=P):P=e[28],P}function Gt(o){const e=o;return{name:e.name||"",description:e.description||void 0}}function Wt(o,e){if(!o||!e)return;const s=e.toLowerCase();return o.find(r=>r.app_name?.toLowerCase()===s||r.app_id?.toLowerCase()===s||r.title.toLowerCase()===s)||o.find(r=>r.title.toLowerCase().includes(s))}function qt(o,e,s,r,n){if(!e||e==="Unknown")return{count:0};if(e==="io.modelcontextprotocol.registry/official")return{logo:r?.icon||void 0,count:n??o.length};const i=e.toLowerCase(),c=o.filter(d=>(d._meta?.["io.modelcontextprotocol.registry/official"]?"io.modelcontextprotocol.registry/official":d.publisher||d._meta?.["mcp.mesh"]?.scopeName||"Unknown").toLowerCase()===i);return{logo:s?.icon||c[0]?.publisher_logo||c[0]?.icon||void 0,count:c.length}}function Kt(o){const e=o._meta?.["mcp.mesh"],s=o._meta?.["io.modelcontextprotocol.registry/official"],r=o.server,n=ht(r.remotes?.[0]?.type),i=gt(r.$schema),c=s?"io.modelcontextprotocol.registry/official":o.publisher||e?.scopeName||"Unknown",u=pt(r.repository),d=o.icon||o.image||o.logo||r.icons?.[0]?.src||u||null,m=o.name||o.title||o.server?.title||"Unnamed Item",I=Qe(m),p=e?.friendly_name||I,S=e?.mesh_description||o.description||o.summary||r?.description||"",j=e?.short_description||null,y=e?.tags||[],f=e?.categories||[];return{name:p,description:S,shortDescription:j,icon:d,verified:o.verified||e?.verified,publisher:c,version:r.version||null,websiteUrl:r.websiteUrl||null,repository:r.repository||null,schemaVersion:i??null,connectionType:n,connectionUrl:null,remoteUrl:null,tags:y,categories:f,tools:o.tools||r.tools||e?.tools||[],models:o.models||r.models||e?.models||[],emails:o.emails||r.emails||e?.emails||[],analytics:o.analytics||r.analytics||e?.analytics,cdn:o.cdn||r.cdn||e?.cdn}}class Qt extends F.Component{state={hasError:!1,error:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,s){console.error("Store MCP server detail error:",e,s)}render(){return this.state.hasError?t.jsx(jt,{error:this.state.error||new Error("Unknown error"),onBack:this.props.onBack}):this.props.children}}function Yt(){const{org:o}=he(),e=ge(),{appName:s}=ke({strict:!1}),{registryId:r,serverName:n,stdio:i}=Le({strict:!1}),[c,u]=ct(dt.storeShowStdio(),()=>!1),d=i==="true"?!0:i==="false"?!1:c;i!==void 0&&i==="true"!==c&&u(i==="true");const[m,I]=F.useState(null),[p,S]=F.useState(null),j=rt(),y=nt(),{data:f}=Pe.useSession(),N=st(y),h=r||N[0]?.id||"",x=it(h),g=xt(x?.tools),_=x?.tools&&x.tools.find(L=>L.name.endsWith("_VERSIONS"))?.name||"",w=x?.tools&&x.tools.find(L=>L.name.endsWith("_GET"))?.name||"",C=!!n;let v="",b={};C?(v=_||w,b={name:n}):(v=g,b={});const P=at({connectionId:h||null,orgId:o.id}),{data:a}=lt({client:P,toolName:v,toolArguments:b,select:l=>l.structuredContent??l});let M=[],V=[],H=null;if(a){if(Array.isArray(a))M=a;else if(typeof a=="object"&&a!==null)if("totalCount"in a&&typeof a.totalCount=="number"&&(H=a.totalCount),"item"in a&&a.item){const l=a.item;M=[{id:l.id||"",title:l.title,server:l.server,_meta:l._meta}]}else{let l;"versions"in a&&Array.isArray(a.versions)?l="versions":"servers"in a&&Array.isArray(a.servers)?l="servers":l=Object.keys(a).find(L=>Array.isArray(a[L])),l&&(M=a[l],(l==="versions"||v?.includes("VERSIONS"))&&(V=M))}}const K=(()=>{const l=V.findIndex(L=>L._meta?.["io.modelcontextprotocol.registry/official"]?.isLatest===!0);return l>=0?l:0})(),R=p??K;let k=M.find(l=>{const L=l.name||l.title||l.server.title||"";return ft(L)===s});!k&&n&&(k=M.find(l=>l.server.name===n||l.name===n||l.title===n));const T=k?Kt(k):null,A=(T?.tools?.length||0)>0,D=k?.server?.remotes?.[0]?.url||null,U=!A&&!!D,z=ot({queryKey:Me.remoteMcpTools(D),queryFn:async()=>{if(!D)return[];const{Client:l}=await ce(async()=>{const{Client:$}=await import("./index-iT9dC5c9.js").then(q=>q.cp);return{Client:$}},__vite__mapDeps([0,1])),{StreamableHTTPClientTransport:L}=await ce(async()=>{const{StreamableHTTPClientTransport:$}=await import("./index-DlEzWBZo.js");return{StreamableHTTPClientTransport:$}},__vite__mapDeps([2,0,1,3,4,5,6,7,8,9])),W=new l({name:"mesh-store",version:"1.0.0"}),ee=new L(new URL(D),{requestInit:{headers:{Accept:"application/json, text/event-stream","Content-Type":"application/json"}}});try{return await W.connect(ee),((await W.listTools()).tools||[]).map(q=>({name:q.name,description:q.description}))}finally{await W.close().catch(console.error)}},enabled:U}),O=U&&z.isLoading,G=z.data??[],B=A?T?.tools||[]:G,X=Wt(y,T?.publisher),Z=T?qt(M,T.publisher,X,x??null,H):{count:0},se=T?.repository?ut(T.repository):null,ne=k?.server?.remotes??[],J=k?.server?.packages??[],oe=[...ne.map((l,L)=>({...l,_type:"remote",_index:L})),...J.map((l,L)=>({type:"stdio",url:void 0,name:l.name||l.identifier,title:l.name||l.identifier?.replace(/^@[^/]+\//,""),description:l.environmentVariables?.length?`Requires ${l.environmentVariables.length} environment variable(s)`:void 0,_type:"package",_index:L}))],ie=d?oe:oe.filter(l=>l.type?.toLowerCase()!=="stdio"),le=ie.length>1,Q=[{id:"servers",label:"Servers",count:ie.length,visible:le},{id:"readme",label:"README",visible:!!T?.repository&&!!se},{id:"tools",label:"Tools",count:B.length,visible:A||G.length>0||O&&!!D}].filter(l=>l.visible),ye=Q.find(l=>l.id==="servers")?.id||Q.find(l=>l.id==="readme")?.id||Q[0]?.id||"overview",Ne=m&&Q.find(l=>l.id===m)?m:ye,re=async(l,L,W)=>{const ee=V[l??0]||k;if(!ee||!o||!f?.user?.id)return;const $=mt(ee,o.id,f.user.id,{remoteIndex:W===void 0?L??0:void 0,packageIndex:W}),q=$.connection_type==="STDIO",_e=!!$.connection_url,Te=q&&$.connection_headers&&typeof $.connection_headers=="object"&&"command"in $.connection_headers;if(!_e&&!Te){de.error("This MCP Server cannot be connected: no connection method available");return}try{const{id:Y}=await j.create.mutateAsync($);e({to:"/$org/mcps/$connectionId",params:{org:o.slug,connectionId:Y}})}catch(Y){de.error(`Failed to connect MCP Server: ${Y instanceof Error?Y.message:String(Y)}`)}},Ce=()=>{e({to:"/$org/store",params:{org:o.slug}})};if(!k)return t.jsx(yt,{onBack:Ce});if(!T)return null;const Se=(k?.server?.remotes?.length??0)>0,we=(k?.server?.packages?.length??0)>0,ae=Se||we,Ie=t.jsx(Xe,{children:t.jsxs(Ze,{children:[t.jsx(pe,{children:t.jsx(Je,{asChild:!0,children:t.jsx(Ve,{to:"/$org/store",params:{org:o.slug},children:"Store"})})}),t.jsx(et,{}),t.jsx(pe,{children:t.jsx(tt,{children:T.name})})]})});return t.jsxs("div",{className:"flex flex-col h-full border-l border-border",children:[t.jsx(Nt,{breadcrumb:Ie}),t.jsx("div",{className:"flex-1 overflow-y-auto h-full",children:t.jsx("div",{className:"h-full",children:t.jsxs("div",{className:"h-full",children:[!ae&&t.jsxs("div",{className:"mb-6 p-4 bg-amber-50 border border-amber-200 rounded-lg text-sm text-amber-900",children:[t.jsx(vt,{size:16,className:"inline mr-2"}),"This MCP Server cannot be connected - no connection method available."]}),t.jsx(Ct,{data:T,itemVersions:V.length>0?V:[k],onInstall:re,canInstall:ae,isInstalling:j.create.isPending,hideInstallControls:le,selectedVersionIndex:R,onVersionChange:S}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 min-h-[677px]",children:[t.jsx(_t,{data:T,publisherInfo:Z,selectedItem:k}),t.jsx(Ht,{data:T,availableTabs:Q,effectiveActiveTabId:Ne,effectiveTools:B,isLoadingTools:O,onTabChange:I,servers:oe,onInstallServer:l=>{l._type==="remote"?re(R,l._index,void 0):re(R,void 0,l._index)},isInstalling:j.create.isPending,mcpIcon:T.icon,mcpName:T.name,showStdio:d})]})]})})})]})}function Hs(){const o=E.c(6),{org:e}=he(),s=ge();let r;o[0]!==s||o[1]!==e.slug?(r=()=>{s({to:"/$org/store",params:{org:e.slug}})},o[0]=s,o[1]=e.slug,o[2]=r):r=o[2];const n=r;let i;o[3]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(F.Suspense,{fallback:t.jsx(bt,{}),children:t.jsx(Yt,{})}),o[3]=i):i=o[3];let c;return o[4]!==n?(c=t.jsx(Qt,{onBack:n,children:i}),o[4]=n,o[5]=c):c=o[5],c}export{Hs as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as b,j as s,r as $,u as ie,g as re,t as Z}from"./index-iT9dC5c9.js";import{V as ne,C as g}from"./index-5OU1orTq.js";import{T as oe,i as ae,a as ce,t as me}from"./typewriter-title-Ai1M4PRw.js";import{E as de}from"./error-boundary-DxoAfcBm.js";import{u as Y,S as X}from"./collapsible-Casou47x.js";import{I as ee,T as G,a as K,b as J}from"./empty-state-C8TWk9F-.js";import{P as fe,a as ue,b as he}from"./popover-BMJmHsYE.js";import{c as te,B as V}from"./button-BpOnhkky.js";import{i as xe,d as pe}from"./constants-B1dGAzkj.js";import{b as ge}from"./use-virtual-mcp-wUAVm-qx.js";import{i as je}from"./ChevronRight-DopLOHAf.js";import{t as se}from"./Users03-CW_MIbrQ.js";import{P as A}from"./index-DOE-Wjlc.js";import{c as be}from"./Pin01-ycwW3H8M.js";import{s as Ne}from"./Plus-BTHcgiwq.js";import{i as ye}from"./Share07-KO3g9brj.js";import"./X-nJs6CWkc.js";import"./spinner-BEdv3OCr.js";import"./use-mcp-prompts-O5u3joa7.js";import"./useQuery-nHeassts.js";import"./dialog-C0hNL5DR.js";import"./form-Dk7QlEAK.js";import"./input-BxYV0rat.js";import"./AlertCircle-BmDTNgCi.js";import"./ArrowUp-DYeWvB8P.js";import"./ChevronDown-D2XG2Gn2.js";import"./Edit01-CF3AUhcj.js";import"./Check-FOOd6Eiq.js";import"./Copy01-DeMGkSiw.js";import"./Terminal-C-7NXNYw.js";import"./monaco-editor-DGU8ljQX.js";import"./localstorage-keys-5olAunK8.js";import"./useMutation-DuHm_HpG.js";import"./use-connection-SGm9ccmH.js";import"./generate-id-Dyweu44Y.js";import"./SearchMd-cyrKubyu.js";import"./Trash01-BVntsGdy.js";import"./badge-BoqXK3lQ.js";import"./Code01-5ok4pVqx.js";import"./infiniteQueryObserver-BZOwrkV7.js";import"./use-create-virtual-mcp-CqBT5mhP.js";import"./use-binding-DJh8-5RZ.js";import"./binder-CzgMN-r7.js";import"./select-CsCf0ULc.js";import"./File06-C3Nbkeoy.js";import"./Grid01-DDbvhTzI.js";import"./Image01-UeXsz1EO.js";function _e(e){const t=b.c(15),{agent:l}=e,{setVirtualMcpId:h}=Y();let i;t[0]!==l.id||t[1]!==h?(i=()=>{h(l.id)},t[0]=l.id,t[1]=h,t[2]=i):i=t[2];const r=i;let a;t[3]===Symbol.for("react.memo_cache_sentinel")?(a=te("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[3]=a):a=t[3];const c=`Select agent ${l.title}`;let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(se,{size:20}),t[4]=d):d=t[4];let n;t[5]!==l.icon||t[6]!==l.title?(n=s.jsx(ee,{icon:l.icon,name:l.title,fallbackIcon:d}),t[5]=l.icon,t[6]=l.title,t[7]=n):n=t[7];let o;t[8]!==l.title?(o=s.jsx("p",{className:"text-sm text-foreground text-center leading-tight line-clamp-2",children:l.title}),t[8]=l.title,t[9]=o):o=t[9];let m;return t[10]!==r||t[11]!==c||t[12]!==n||t[13]!==o?(m=s.jsxs("button",{type:"button",onClick:r,className:a,"aria-label":c,children:[n,o]}),t[10]=r,t[11]=c,t[12]=n,t[13]=o,t[14]=m):m=t[14],m}function Se(e){const t=b.c(14),{virtualMcps:l,selectedVirtualMcpId:h,onVirtualMcpChange:i}=e,[r,a]=$.useState(!1),c=$.useRef(null);let d,n;t[0]!==r?(d=()=>{r&&setTimeout(()=>{c.current?.focus()},0)},n=[r],t[0]=r,t[1]=d,t[2]=n):(d=t[1],n=t[2]),$.useEffect(d,n);let o;t[3]!==i?(o=Q=>{i(Q),a(!1)},t[3]=i,t[4]=o):o=t[4];const m=o;let f;t[5]===Symbol.for("react.memo_cache_sentinel")?(f=te("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[5]=f):f=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(fe,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-lg bg-accent flex items-center justify-center shrink-0",children:s.jsx(je,{size:24,className:"text-foreground"})}),s.jsx("p",{className:"text-sm text-foreground text-center leading-tight",children:"See all"})]})}),t[6]=u):u=t[6];let x;t[7]!==m||t[8]!==h||t[9]!==l?(x=s.jsx(ue,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(ne,{virtualMcps:l,selectedVirtualMcpId:h,onVirtualMcpChange:m,searchInputRef:c})}),t[7]=m,t[8]=h,t[9]=l,t[10]=x):x=t[10];let j;return t[11]!==r||t[12]!==x?(j=s.jsxs(he,{open:r,onOpenChange:a,children:[u,x]}),t[11]=r,t[12]=x,t[13]=j):j=t[13],j}function ve(){const e=b.c(20),t=ge(),{selectedVirtualMcp:l,setVirtualMcpId:h}=Y();let i,r,a,c,d,n;if(e[0]!==t){d=Symbol.for("react.early_return_sentinel");e:{const x=t.filter(ke).slice(0,6);if(x.length===0){d=null;break e}n=t.map(we),a="w-full max-w-[800px]",e[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("h2",{className:"text-sm font-medium text-muted-foreground mb-4",children:"Recently used agents"}),e[7]=c):c=e[7],i="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",r=x.map(Ce)}e[0]=t,e[1]=i,e[2]=r,e[3]=a,e[4]=c,e[5]=d,e[6]=n}else i=e[1],r=e[2],a=e[3],c=e[4],d=e[5],n=e[6];if(d!==Symbol.for("react.early_return_sentinel"))return d;const o=l?.id??null;let m;e[8]!==h||e[9]!==o||e[10]!==n?(m=s.jsx(Se,{virtualMcps:n,selectedVirtualMcpId:o,onVirtualMcpChange:h}),e[8]=h,e[9]=o,e[10]=n,e[11]=m):m=e[11];let f;e[12]!==i||e[13]!==r||e[14]!==m?(f=s.jsxs("div",{className:i,children:[r,m]}),e[12]=i,e[13]=r,e[14]=m,e[15]=f):f=e[15];let u;return e[16]!==a||e[17]!==c||e[18]!==f?(u=s.jsxs("div",{className:a,children:[c,f]}),e[16]=a,e[17]=c,e[18]=f,e[19]=u):u=e[19],u}function Ce(e){return s.jsx(_e,{agent:e},e.id??"default")}function we(e){return{id:e.id,title:e.title,description:e.description,icon:e.icon}}function ke(e){return e.id!==null&&!xe(e.id)}function ze(){const e=b.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(X,{className:"h-5 w-40 mb-4"}),e[0]=t):t=e[0];let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"w-full max-w-[800px]",children:[t,s.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",children:Array.from({length:7}).map(Te)})]}),e[1]=l):l=e[1],l}function Te(e,t){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 self-stretch",children:[s.jsx(X,{className:"size-6 rounded-md shrink-0"}),s.jsx(X,{className:"h-4 w-full"})]},t)}function Me(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx($.Suspense,{fallback:s.jsx(ze,{}),children:s.jsx(ve,{})}),e[0]=t):t=e[0],t}function Ie(){const e=new Date().getHours();return e>=5&&e<12?"Morning":e>=12&&e<17?"Afternoon":e>=17&&e<22?"Evening":"Night"}function Pe(){const e=b.c(60),{org:t}=ie(),{data:l}=re.useSession(),{modelsConnections:h,isChatEmpty:i,activeThreadId:r,setActiveThreadId:a,threads:c,selectedVirtualMcp:d}=Y();let n;if(e[0]!==r||e[1]!==c){let p;e[3]!==r?(p=le=>le.id===r,e[3]=r,e[4]=p):p=e[4],n=c.find(p),e[0]=r,e[1]=c,e[2]=n}else n=e[2];const o=n,[m,f]=$.useState(!1);let u;e[5]!==l?.user?.name?(u=l?.user?.name?.split(" ")[0]||"there",e[5]=l?.user?.name,e[6]=u):u=e[6];const x=u;let j;e[7]===Symbol.for("react.memo_cache_sentinel")?(j=Ie(),e[7]=j):j=e[7];const Q=j;let E;e[8]!==t.id?(E=pe(t.id),e[8]=t.id,e[9]=E):E=e[9];const H=d??E;if(h.length===0){let p;return e[10]!==t?(p=s.jsx("div",{className:"flex flex-col size-full bg-background items-center justify-center",children:s.jsx(g.NoLlmBindingEmptyState,{org:t})}),e[10]=t,e[11]=p):p=e[11],p}let N;e[12]!==o||e[13]!==i?(N=s.jsx(A.Header.Left,{className:"gap-2",children:!i&&o?.title?s.jsx(oe,{text:o.title,className:"text-sm font-medium text-foreground"}):s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Chat"})}),e[12]=o,e[13]=i,e[14]=N):N=e[14];let y;e[15]!==a?(y=()=>a(crypto.randomUUID()),e[15]=a,e[16]=y):y=e[16];let R;e[17]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(Ne,{size:16}),e[17]=R):R=e[17];let _;e[18]!==i||e[19]!==y?(_=s.jsx(G,{asChild:!0,children:s.jsx(V,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:y,disabled:i,"aria-label":"New chat",children:R})}),e[18]=i,e[19]=y,e[20]=_):_=e[20];let B;e[21]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(K,{children:"New chat"}),e[21]=B):B=e[21];let S;e[22]!==_?(S=s.jsxs(J,{children:[_,B]}),e[22]=_,e[23]=S):S=e[23];let L;e[24]===Symbol.for("react.memo_cache_sentinel")?(L=()=>f(!0),e[24]=L):L=e[24];let O;e[25]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsxs(J,{children:[s.jsx(G,{asChild:!0,children:s.jsx(V,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:L,"aria-label":"Chat history",children:s.jsx(ae,{size:16})})}),s.jsx(K,{children:"Chat history"})]}),e[25]=O):O=e[25];let D;e[26]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(be,{size:16}),e[26]=D):D=e[26];let v;e[27]!==i?(v=s.jsx(G,{asChild:!0,children:s.jsx(V,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:Ae,disabled:i,"aria-label":"Pin chat",children:D})}),e[27]=i,e[28]=v):v=e[28];let F;e[29]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(K,{children:"Pin chat"}),e[29]=F):F=e[29];let C;e[30]!==v?(C=s.jsxs(J,{children:[v,F]}),e[30]=v,e[31]=C):C=e[31];let U;e[32]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(ye,{size:16}),e[32]=U):U=e[32];let w;e[33]!==i?(w=s.jsx(G,{asChild:!0,children:s.jsx(V,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:$e,disabled:i,"aria-label":"Share chat",children:U})}),e[33]=i,e[34]=w):w=e[34];let W;e[35]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(K,{children:"Share chat"}),e[35]=W):W=e[35];let k;e[36]!==w?(k=s.jsxs(J,{children:[w,W]}),e[36]=w,e[37]=k):k=e[37];let z;e[38]!==C||e[39]!==k||e[40]!==S?(z=s.jsxs(A.Header.Right,{className:"gap-1",children:[S,O,C,k]}),e[38]=C,e[39]=k,e[40]=S,e[41]=z):z=e[41];let T;e[42]!==z||e[43]!==N?(T=s.jsxs(A.Header,{className:"flex-none",children:[N,z]}),e[42]=z,e[43]=N,e[44]=T):T=e[44];let M;e[45]!==H||e[46]!==i||e[47]!==x?(M=i?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center px-10 pb-32 pt-10",children:[s.jsxs("div",{className:"flex flex-col items-center gap-3 w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center",children:s.jsx(ee,{icon:H.icon,name:H.title,size:"md",fallbackIcon:s.jsx(se,{size:20}),className:"size-12 rounded-xl border border-stone-200/60 shadow-sm aspect-square transition-opacity duration-200"})}),s.jsxs("div",{className:"text-center",children:[s.jsxs("p",{className:"text-lg font-medium text-foreground",children:[Q," ",x,","]}),s.jsx("p",{className:"text-base text-muted-foreground opacity-50 mb-0",children:"What are we building today?"})]}),s.jsx("div",{className:"w-full -mt-1",children:s.jsx(g.Input,{})}),s.jsx(g.IceBreakers,{className:"w-full"})]}),s.jsx("div",{className:"flex flex-col items-center w-full mt-4",children:s.jsx(Me,{})})]}):s.jsxs(s.Fragment,{children:[s.jsx(g.Main,{children:s.jsx(g.Messages,{})}),s.jsx(g.Footer,{children:s.jsx(g.Input,{})})]}),e[45]=H,e[46]=i,e[47]=x,e[48]=M):M=e[48];let I;e[49]!==a?(I=p=>{a(p),f(!1)},e[49]=a,e[50]=I):I=e[50];let P;e[51]!==r||e[52]!==m||e[53]!==I||e[54]!==c?(P=s.jsx(ce,{open:m,onOpenChange:f,threads:c,activeThreadId:r,onThreadSelect:I}),e[51]=r,e[52]=m,e[53]=I,e[54]=c,e[55]=P):P=e[55];let q;return e[56]!==T||e[57]!==M||e[58]!==P?(q=s.jsxs(g,{className:"bg-background",children:[T,M,P]}),e[56]=T,e[57]=M,e[58]=P,e[59]=q):q=e[59],q}function $e(){Z.info("Share feature coming soon")}function Ae(){Z.info("Pin feature coming soon")}function Ve(e){const t=b.c(14),{error:l,onRetry:h}=e,i=l?.message?.includes("401")||l?.message?.toLowerCase().includes("unauthorized");let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(A.Header,{className:"flex-none",children:[s.jsx(A.Header.Left,{className:"gap-2",children:s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Chat"})}),s.jsx(A.Header.Right,{className:"gap-1"})]}),t[0]=r):r=t[0];let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(me,{className:"h-6 w-6 text-destructive"})}),t[1]=a):a=t[1];const c=i?"Unable to load models":"Something went wrong";let d;t[2]!==c?(d=s.jsx("h3",{className:"text-lg font-medium",children:c}),t[2]=c,t[3]=d):d=t[3];const n=i?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":l?.message||"An unexpected error occurred";let o;t[4]!==n?(o=s.jsx("p",{className:"text-sm text-muted-foreground",children:n}),t[4]=n,t[5]=o):o=t[5];let m;t[6]!==d||t[7]!==o?(m=s.jsxs("div",{className:"space-y-2",children:[d,o]}),t[6]=d,t[7]=o,t[8]=m):m=t[8];let f;t[9]!==h?(f=s.jsx(V,{variant:"outline",onClick:h,children:"Try again"}),t[9]=h,t[10]=f):f=t[10];let u;return t[11]!==m||t[12]!==f?(u=s.jsxs(g,{className:"bg-background",children:[r,s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:s.jsxs("div",{className:"max-w-sm space-y-4",children:[a,m,f]})})]}),t[11]=m,t[12]=f,t[13]=u):u=t[13],u}function It(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(de,{fallback:Ee,children:s.jsx($.Suspense,{fallback:s.jsx(g.Skeleton,{className:"bg-background"}),children:s.jsx(Pe,{})})}),e[0]=t):t=e[0],t}function Ee(e){const{error:t,resetError:l}=e;return s.jsx(Ve,{error:t,onRetry:l})}export{It as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{r as N,c as w,j as n,u as be,v as ie,bs as Ce,L as Me,n as Ct,G as kt,q as _t,t as q,bB as He,g as Z,a as ke,aU as zt,bC as $t,aY as Ue,bD as le,b as It,S as Be,d as Ot,e as Tt,N as Mt,E as Et,P as Lt,aH as We,K as At,O as Pt}from"./index-iT9dC5c9.js";import{C as V,u as Dt}from"./index-5OU1orTq.js";import{I as Rt,n as Ht,c as Fe,a as ue,T as he,b as pe}from"./empty-state-C8TWk9F-.js";import{P as re}from"./index-DOE-Wjlc.js";import{u as je}from"./use-deco-chat-open-CnW1_sXm.js";import{c as M,B as W}from"./button-BpOnhkky.js";import{d as Ut}from"./constants-B1dGAzkj.js";import{T as Bt,i as Wt,b as Ft,S as Vt,c as Kt,d as Zt,e as Gt,f as Yt,t as Ve}from"./typewriter-title-Ai1M4PRw.js";import{s as Ke}from"./Plus-BTHcgiwq.js";import{t as Ze}from"./Users03-CW_MIbrQ.js";import{i as xe}from"./X-nJs6CWkc.js";import{E as Ge}from"./error-boundary-DxoAfcBm.js";import{u as qt,S as ee,c as Jt}from"./collapsible-Casou47x.js";import{a as Xt}from"./Home02-D7WW64qF.js";import{u as _e,a as Qt}from"./use-organization-settings-Bfq84pBA.js";import{u as oe}from"./use-mobile-Dwv-QQpY.js";import{h as X}from"./alert-dialog-DpejafUm.js";import{P as ze,a as $e,b as Ie}from"./popover-BMJmHsYE.js";import{t as es}from"./ChevronDown-D2XG2Gn2.js";import{C as Ye}from"./create-organization-dialog-BQQDstNY.js";import{c as ts,b as ss,g as ns,a as as,D as rs}from"./dialog-C0hNL5DR.js";import{L as ls}from"./form-Dk7QlEAK.js";import{S as is}from"./switch-BElvgI-f.js";import{i as ge}from"./Check-FOOd6Eiq.js";import{i as os}from"./Code01-5ok4pVqx.js";import{a as qe}from"./Copy01-DeMGkSiw.js";import{n as Ee}from"./Inbox01-_-qVJU9L.js";import{B as Le}from"./badge-BoqXK3lQ.js";import{s as Ae}from"./XClose-grmHIFDR.js";import{i as cs}from"./File06-C3Nbkeoy.js";import{I as ds}from"./input-BxYV0rat.js";import{c as ms}from"./Grid01-DDbvhTzI.js";import{a as fs,b as us,D as hs,c as ps,g as Pe}from"./dropdown-menu-DJexz_iG.js";import{n as De}from"./LinkExternal01-Dzwm6JDU.js";import{u as Je,L as Xe}from"./localstorage-keys-5olAunK8.js";import{R as xs,a as Qe,b as gs}from"./resizable-8AV10P7U.js";import"./spinner-BEdv3OCr.js";import"./use-mcp-prompts-O5u3joa7.js";import"./useQuery-nHeassts.js";import"./AlertCircle-BmDTNgCi.js";import"./ArrowUp-DYeWvB8P.js";import"./Edit01-CF3AUhcj.js";import"./ChevronRight-DopLOHAf.js";import"./Terminal-C-7NXNYw.js";import"./monaco-editor-DGU8ljQX.js";import"./use-connection-SGm9ccmH.js";import"./useMutation-DuHm_HpG.js";import"./generate-id-Dyweu44Y.js";import"./SearchMd-cyrKubyu.js";import"./Trash01-BVntsGdy.js";import"./use-virtual-mcp-wUAVm-qx.js";import"./use-create-virtual-mcp-CqBT5mhP.js";import"./use-binding-DJh8-5RZ.js";import"./binder-CzgMN-r7.js";import"./select-CsCf0ULc.js";import"./Image01-UeXsz1EO.js";import"./infiniteQueryObserver-BZOwrkV7.js";const we=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"M7 17 17 7m0 0H7m10 0v10"}));we.displayName="ArrowUpRight";const et=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));et.displayName="BarChart10";const tt=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"m12 21-.1-.15c-.695-1.042-1.042-1.563-1.5-1.94a4 4 0 0 0-1.378-.737C8.453 18 7.827 18 6.575 18H5.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2 16.48 2 15.92 2 14.8V6.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C3.52 3 4.08 3 5.2 3h.4c2.24 0 3.36 0 4.216.436a4 4 0 0 1 1.748 1.748C12 6.04 12 7.16 12 9.4M12 21V9.4M12 21l.1-.15c.695-1.042 1.042-1.563 1.5-1.94a3.999 3.999 0 0 1 1.378-.737C15.547 18 16.173 18 17.425 18H18.8c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 16.48 22 15.92 22 14.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 3 19.92 3 18.8 3h-.4c-2.24 0-3.36 0-4.216.436a4 4 0 0 0-1.748 1.748C12 6.04 12 7.16 12 9.4"}));tt.displayName="BookOpen01";const st=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));st.displayName="Building02";const nt=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"m18 17-5-5 5-5m-7 10-5-5 5-5"}));nt.displayName="ChevronLeftDouble";const at=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"m6 17 5-5-5-5m7 10 5-5-5-5"}));at.displayName="ChevronRightDouble";const rt=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));rt.displayName="Globe01";const lt=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));lt.displayName="LayoutRight";const it=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));it.displayName="LogOut01";const ot=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m3 5c0 .93 0 1.395-.102 1.776a3 3 0 0 1-2.122 2.122C9.395 21 8.93 21 8 21h-.5c-1.398 0-2.097 0-2.648-.228a3 3 0 0 1-1.624-1.624C3 18.597 3 17.898 3 16.5v-9c0-1.398 0-2.097.228-2.648a3 3 0 0 1 1.624-1.624C5.403 3 6.102 3 7.5 3H8c.93 0 1.395 0 1.776.102a3 3 0 0 1 2.122 2.122C12 5.605 12 6.07 12 7"}));ot.displayName="LogOut02";const ct=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));ct.displayName="Mail01";const Oe=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}),N.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"}));Oe.displayName="Settings01";const dt=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"m9.395 19.371.585 1.315a2.212 2.212 0 0 0 4.044 0l.584-1.315a2.426 2.426 0 0 1 2.47-1.423l1.43.152a2.212 2.212 0 0 0 2.023-3.502l-.847-1.164a2.428 2.428 0 0 1-.46-1.434c0-.513.163-1.014.464-1.429l.847-1.163a2.211 2.211 0 0 0-2.022-3.502l-1.43.152a2.433 2.433 0 0 1-1.47-.312 2.426 2.426 0 0 1-1-1.117l-.589-1.315a2.212 2.212 0 0 0-4.044 0L9.395 4.63c-.207.468-.557.86-1 1.117-.445.256-.96.365-1.47.312l-1.434-.152a2.212 2.212 0 0 0-2.023 3.502l.847 1.163a2.43 2.43 0 0 1 0 2.858l-.847 1.163a2.21 2.21 0 0 0 .786 3.273c.382.195.811.274 1.237.23l1.43-.153a2.434 2.434 0 0 1 2.474 1.43Z"}),N.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}));dt.displayName="Settings02";const mt=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"M3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Zm-6 8h12M9 16a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));mt.displayName="Settings04";const ft=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"M4 21.817C4.603 22 5.416 22 6.8 22h10.4c1.384 0 2.197 0 2.8-.183m-16 0a2.18 2.18 0 0 1-.362-.144 3 3 0 0 1-1.311-1.311C2 19.72 2 18.88 2 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 2 5.12 2 6.8 2h10.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 4.28 22 5.12 22 6.8v10.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311 2.18 2.18 0 0 1-.362.144m-16 0c0-.809.005-1.237.077-1.597a4 4 0 0 1 3.143-3.143C7.606 17 8.07 17 9 17h6c.93 0 1.394 0 1.78.077a4 4 0 0 1 3.143 3.143c.072.36.077.788.077 1.597M16 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));ft.displayName="UserSquare";const ut=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"M13 2 4.093 12.688c-.348.418-.523.628-.525.804a.5.5 0 0 0 .185.397c.138.111.41.111.955.111H12l-1 8 8.907-10.688c.348-.418.523-.628.525-.804a.5.5 0 0 0-.185-.397c-.138-.111-.41-.111-.955-.111H12l1-8Z"}));ut.displayName="Zap";function bs(){const t=w.c(68),{org:e}=be(),[,s]=je(),{selectedVirtualMcp:a,modelsConnections:r,isChatEmpty:l,activeThreadId:i,setActiveThreadId:c,threads:o}=qt();let d;if(t[0]!==i||t[1]!==o){let G;t[3]!==i?(G=Q=>Q.id===i,t[3]=i,t[4]=G):G=t[4],d=o.find(G),t[0]=i,t[1]=o,t[2]=d}else d=t[2];const m=d,[f,h]=N.useState(!1),[x,b]=N.useTransition();let p;t[5]!==e.id?(p=Ut(e.id),t[5]=e.id,t[6]=p):p=t[6];const u=a??p;let j;t[7]!==c?(j=()=>{b(()=>{c(crypto.randomUUID())})},t[7]=c,t[8]=j):j=t[8];const v=j;if(r.length===0){let G;t[9]!==u.title?(G=n.jsx(re.Header.Left,{className:"gap-2",children:n.jsx("span",{className:"text-sm font-medium",children:u.title})}),t[9]=u.title,t[10]=G):G=t[10];let Q;t[11]!==s?(Q=()=>s(!1),t[11]=s,t[12]=Q):Q=t[12];let ce;t[13]===Symbol.for("react.memo_cache_sentinel")?(ce=n.jsx(xe,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[13]=ce):ce=t[13];let se;t[14]!==Q?(se=n.jsx(re.Header.Right,{className:"gap-1",children:n.jsx("button",{type:"button",onClick:Q,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:ce})}),t[14]=Q,t[15]=se):se=t[15];let ne;t[16]!==G||t[17]!==se?(ne=n.jsxs(re.Header,{className:"flex-none",children:[G,se]}),t[16]=G,t[17]=se,t[18]=ne):ne=t[18];let ae;t[19]!==e?(ae=n.jsx(V.Main,{className:"flex flex-col items-center",children:n.jsx(V.EmptyState,{children:n.jsx(V.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features.",org:e})})}),t[19]=e,t[20]=ae):ae=t[20];let de;return t[21]!==ne||t[22]!==ae?(de=n.jsxs(V,{children:[ne,ae]}),t[21]=ne,t[22]=ae,t[23]=de):de=t[23],de}const y=f?"duration-300 opacity-0 -translate-x-4 pointer-events-none":x?"duration-200 opacity-0 pointer-events-none":"duration-300 opacity-100 translate-x-0";let S;t[24]!==y?(S=M("absolute inset-0 flex flex-col transition-all ease-in-out",y),t[24]=y,t[25]=S):S=t[25];let _;t[26]!==m||t[27]!==u||t[28]!==l?(_=n.jsx(re.Header.Left,{className:"gap-2",children:!l&&m?.title?n.jsx(Bt,{text:m.title,className:"text-sm font-medium text-foreground"}):n.jsx("span",{className:"text-sm font-medium text-foreground",children:u.title})}),t[26]=m,t[27]=u,t[28]=l,t[29]=_):_=t[29];let k;t[30]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(Ke,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[30]=k):k=t[30];let $;t[31]!==v||t[32]!==x?($=n.jsx("button",{type:"button",onClick:v,disabled:x,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",title:"New chat",children:k}),t[31]=v,t[32]=x,t[33]=$):$=t[33];let C;t[34]===Symbol.for("react.memo_cache_sentinel")?(C=()=>h(!0),t[34]=C):C=t[34];let z;t[35]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsx("button",{type:"button",onClick:C,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:n.jsx(Wt,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[35]=z):z=t[35];let I;t[36]!==s?(I=()=>s(!1),t[36]=s,t[37]=I):I=t[37];let O;t[38]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(xe,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[38]=O):O=t[38];let T;t[39]!==I?(T=n.jsx("button",{type:"button",onClick:I,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}),t[39]=I,t[40]=T):T=t[40];let E;t[41]!==T||t[42]!==$?(E=n.jsxs(re.Header.Right,{className:"gap-1",children:[$,z,T]}),t[41]=T,t[42]=$,t[43]=E):E=t[43];let L;t[44]!==E||t[45]!==_?(L=n.jsxs(re.Header,{className:"flex-none",children:[_,E]}),t[44]=E,t[45]=_,t[46]=L):L=t[46];let A;t[47]!==u||t[48]!==l?(A=n.jsx(V.Main,{children:l?n.jsx(V.EmptyState,{children:n.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[n.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[n.jsx(Rt,{icon:u.icon,name:u.title,size:"lg",fallbackIcon:n.jsx(Ze,{size:32}),className:"size-[60px]! rounded-[18px]!"}),n.jsx("h3",{className:"text-xl font-medium text-foreground",children:u.title}),n.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:u.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),n.jsx(V.IceBreakers,{})]})}):n.jsx(V.Messages,{})}),t[47]=u,t[48]=l,t[49]=A):A=t[49];let K;t[50]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx(V.Footer,{children:n.jsx(V.Input,{})}),t[50]=K):K=t[50];let D;t[51]!==L||t[52]!==A||t[53]!==S?(D=n.jsxs("div",{className:S,children:[L,A,K]}),t[51]=L,t[52]=A,t[53]=S,t[54]=D):D=t[54];const U=f?"opacity-100 translate-x-0":"opacity-0 translate-x-4 pointer-events-none";let H;t[55]!==U?(H=M("absolute inset-0 flex flex-col transition-all duration-300 ease-in-out",U),t[55]=U,t[56]=H):H=t[56];let R;t[57]===Symbol.for("react.memo_cache_sentinel")?(R=()=>h(!1),t[57]=R):R=t[57];let P;t[58]!==i||t[59]!==c||t[60]!==o?(P=n.jsx(Ft,{threads:o,activeThreadId:i,onThreadSelect:c,onClose:R}),t[58]=i,t[59]=c,t[60]=o,t[61]=P):P=t[61];let B;t[62]!==H||t[63]!==P?(B=n.jsx("div",{className:H,children:P}),t[62]=H,t[63]=P,t[64]=B):B=t[64];let Y;return t[65]!==D||t[66]!==B?(Y=n.jsxs(V,{className:"relative overflow-hidden",children:[D,B]}),t[65]=D,t[66]=B,t[67]=Y):Y=t[67],Y}function js(){const t=w.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(V.Skeleton,{}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Ge,{fallback:e,children:n.jsx(N.Suspense,{fallback:n.jsx(V.Skeleton,{}),children:n.jsx(bs,{})})}),t[1]=s):s=t[1],s}function vs(){const t=w.c(14),{locator:e,org:s}=be(),a=ie(),r=Ce(),{org:l}=Me.parse(e);let i;t[0]!==e?(i=Me.isOrgAdminProject(e),t[0]=e,t[1]=i):i=t[1];const c=i,o=_e(s.id);let d;t[2]!==o?.enabled_plugins?(d=o?.enabled_plugins??[],t[2]=o?.enabled_plugins,t[3]=d):d=t[3];const m=d;let f;t[4]!==m?(f=k=>m.includes(k.pluginId),t[4]=m,t[5]=f):f=t[5];const h=Ct.filter(f),x=r.location.pathname===`/${l}`||r.location.pathname===`/${l}/`;let b;t[6]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(Xt,{}),t[6]=b):b=t[6];let p;t[7]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(st,{}),t[7]=p):p=t[7];let g;t[8]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(Ht,{}),t[8]=g):g=t[8];let u;t[9]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Ze,{}),t[9]=u):u=t[9];let j;t[10]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(ut,{}),t[10]=j):j=t[10];let v;t[11]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(et,{}),t[11]=v):v=t[11];let y;t[12]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(ft,{}),t[12]=y):y=t[12];let S;t[13]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Oe,{}),t[13]=S):S=t[13];const _=[{key:"home",label:"Home",icon:b,onClick:()=>{x?window.dispatchEvent(new CustomEvent("reset-home-view")):a({to:"/$org",params:{org:l}})}},{key:"store",label:"Store",icon:p,onClick:()=>a({to:"/$org/store",params:{org:l}})},...h.map(k=>({key:k.pluginId,label:k.label,icon:k.icon,onClick:()=>a({to:"/$org/$pluginId",params:{org:l,pluginId:k.pluginId}})})),{key:"mcps",label:"Connections",icon:g,onClick:()=>a({to:"/$org/mcps",params:{org:l}})},{key:"agents",label:"Agents",icon:u,onClick:()=>a({to:"/$org/agents",params:{org:l}})},{key:"workflow",label:"Workflows",icon:j,onClick:()=>a({to:"/$org/workflows",params:{org:l}})},{key:"monitoring",label:"Monitoring",icon:v,onClick:()=>a({to:"/$org/monitoring",params:{org:l}})},{key:"members",label:"Members",icon:y,onClick:()=>a({to:"/$org/members",params:{org:l}})},{key:"settings",label:"Settings",icon:S,onClick:()=>a({to:"/$org/settings",params:{org:l}})}];return c?_:[]}const Ns="sidebar_state",ws=3600*24*7,Ss="16rem",ys="18rem",Cs="3rem",ks="b",ht=N.createContext(null);function ve(){const t=N.useContext(ht);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function _s(t){const e=w.c(21),{defaultOpen:s,open:a,onOpenChange:r,children:l}=t,i=s===void 0?!0:s,c=oe(),[o,d]=N.useState(!1),[m,f]=N.useState(i),h=a??m;let x;e[0]!==h||e[1]!==r?(x=$=>{const C=typeof $=="function"?$(h):$;r?r(C):f(C),document.cookie=`${Ns}=${C}; path=/; max-age=${ws}`},e[0]=h,e[1]=r,e[2]=x):x=e[2];const b=x;let p;e[3]!==c||e[4]!==b?(p=()=>c?d($s):b(zs),e[3]=c,e[4]=b,e[5]=p):p=e[5];const g=p;let u,j;e[6]!==g?(u=()=>{const $=C=>{if(C.key===ks&&(C.metaKey||C.ctrlKey)){const z=C.target;if(z.tagName==="INPUT"||z.tagName==="TEXTAREA"||z.isContentEditable)return;C.preventDefault(),g()}};return globalThis.addEventListener("keydown",$),()=>globalThis.removeEventListener("keydown",$)},j=[g],e[6]=g,e[7]=u,e[8]=j):(u=e[7],j=e[8]),N.useEffect(u,j);const v=h?"expanded":"collapsed";let y;e[9]!==c||e[10]!==h||e[11]!==o||e[12]!==b||e[13]!==v||e[14]!==g?(y={state:v,open:h,setOpen:b,isMobile:c,openMobile:o,setOpenMobile:d,toggleSidebar:g},e[9]=c,e[10]=h,e[11]=o,e[12]=b,e[13]=v,e[14]=g,e[15]=y):y=e[15];const S=y;let _;e[16]!==l?(_=n.jsx(Fe,{delayDuration:0,children:l}),e[16]=l,e[17]=_):_=e[17];let k;return e[18]!==S||e[19]!==_?(k=n.jsx(ht.Provider,{value:S,children:_}),e[18]=S,e[19]=_,e[20]=k):k=e[20],k}function zs(t){return!t}function $s(t){return!t}function Is(t){const e=w.c(14);let s,a,r,l;e[0]!==t?({className:a,style:l,children:s,...r}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=r,e[4]=l):(s=e[1],a=e[2],r=e[3],l=e[4]);let i;e[5]!==l?(i={"--sidebar-width":Ss,"--sidebar-width-icon":Cs,...l},e[5]=l,e[6]=i):i=e[6];const c=i;let o;e[7]!==a?(o=M("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",a),e[7]=a,e[8]=o):o=e[8];let d;return e[9]!==s||e[10]!==r||e[11]!==c||e[12]!==o?(d=n.jsx("div",{"data-slot":"sidebar-wrapper",style:c,className:o,...r,children:s}),e[9]=s,e[10]=r,e[11]=c,e[12]=o,e[13]=d):d=e[13],d}function Os(t){const e=w.c(46);let s,a,r,l,i,c;e[0]!==t?({side:l,variant:i,collapsible:c,className:a,children:s,...r}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=r,e[4]=l,e[5]=i,e[6]=c):(s=e[1],a=e[2],r=e[3],l=e[4],i=e[5],c=e[6]);const o=l===void 0?"left":l,d=i===void 0?"sidebar":i,m=c===void 0?"offcanvas":c,{isMobile:f,state:h,openMobile:x,setOpenMobile:b}=ve();if(m==="none"){let C;e[7]!==a?(C=M("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",a),e[7]=a,e[8]=C):C=e[8];let z;return e[9]!==s||e[10]!==r||e[11]!==C?(z=n.jsx("div",{"data-slot":"sidebar",className:C,...r,children:s}),e[9]=s,e[10]=r,e[11]=C,e[12]=z):z=e[12],z}if(f){let C;e[13]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":ys},e[13]=C):C=e[13];let z;e[14]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsxs(Kt,{className:"sr-only",children:[n.jsx(Zt,{children:"Sidebar"}),n.jsx(Gt,{children:"Displays the mobile sidebar."})]}),e[14]=z):z=e[14];let I;e[15]!==s?(I=n.jsx("div",{className:"flex h-full w-full flex-col",children:s}),e[15]=s,e[16]=I):I=e[16];let O;e[17]!==o||e[18]!==I?(O=n.jsxs(Yt,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:o,children:[z,I]}),e[17]=o,e[18]=I,e[19]=O):O=e[19];let T;return e[20]!==x||e[21]!==r||e[22]!==b||e[23]!==O?(T=n.jsx(Vt,{open:x,onOpenChange:b,...r,children:O}),e[20]=x,e[21]=r,e[22]=b,e[23]=O,e[24]=T):T=e[24],T}const p=h==="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 u;e[25]!==g?(u=M("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]=u):u=e[26];let j;e[27]!==u?(j=n.jsx("div",{"data-slot":"sidebar-gap",className:u}),e[27]=u,e[28]=j):j=e[28];const v=o==="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)]",y=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 S;e[29]!==a||e[30]!==v||e[31]!==y?(S=M("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",v,y,a),e[29]=a,e[30]=v,e[31]=y,e[32]=S):S=e[32];let _;e[33]!==s?(_=n.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]=_):_=e[34];let k;e[35]!==r||e[36]!==S||e[37]!==_?(k=n.jsx("div",{"data-slot":"sidebar-container",className:S,...r,children:_}),e[35]=r,e[36]=S,e[37]=_,e[38]=k):k=e[38];let $;return e[39]!==o||e[40]!==h||e[41]!==k||e[42]!==p||e[43]!==j||e[44]!==d?($=n.jsxs("div",{className:"group peer text-foreground hidden md:block border-r","data-state":h,"data-collapsible":p,"data-variant":d,"data-side":o,"data-slot":"sidebar",children:[j,k]}),e[39]=o,e[40]=h,e[41]=k,e[42]=p,e[43]=j,e[44]=d,e[45]=$):$=e[45],$}function Ts(t){const e=w.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 r;e[3]!==s?(r=M("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]=r):r=e[4];let l;return e[5]!==a||e[6]!==r?(l=n.jsx("main",{"data-slot":"sidebar-inset",className:r,...a}),e[5]=a,e[6]=r,e[7]=l):l=e[7],l}function pt(t){const e=w.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 r;e[3]!==s?(r=M("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=r):r=e[4];let l;return e[5]!==a||e[6]!==r?(l=n.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:r,...a}),e[5]=a,e[6]=r,e[7]=l):l=e[7],l}function Ms(t){const e=w.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 r;e[3]!==s?(r=M("flex flex-col gap-2 px-2 items-start justify-start",s),e[3]=s,e[4]=r):r=e[4];let l;return e[5]!==a||e[6]!==r?(l=n.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=l):l=e[7],l}function Es(t){const e=w.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 r;e[3]!==s?(r=M("h-4 m-0! w-full",s),e[3]=s,e[4]=r):r=e[4];let l;return e[5]!==a||e[6]!==r?(l=n.jsx("div",{"data-sidebar":"separator",className:r,...a}),e[5]=a,e[6]=r,e[7]=l):l=e[7],l}function Ls(t){const e=w.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 r;e[3]!==s?(r=M("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",s),e[3]=s,e[4]=r):r=e[4];let l;return e[5]!==a||e[6]!==r?(l=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:r,...a}),e[5]=a,e[6]=r,e[7]=l):l=e[7],l}function As(t){const e=w.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 r;e[3]!==s?(r=M("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",s),e[3]=s,e[4]=r):r=e[4];let l;return e[5]!==a||e[6]!==r?(l=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:r,...a}),e[5]=a,e[6]=r,e[7]=l):l=e[7],l}function Ps(t){const e=w.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 r;e[3]!==s?(r=M("w-full text-sm",s),e[3]=s,e[4]=r):r=e[4];let l;return e[5]!==a||e[6]!==r?(l=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:r,...a}),e[5]=a,e[6]=r,e[7]=l):l=e[7],l}function Ne(t){const e=w.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 r;e[3]!==s?(r=M("flex w-full min-w-0 flex-col gap-1",s),e[3]=s,e[4]=r):r=e[4];let l;return e[5]!==a||e[6]!==r?(l=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:r,...a}),e[5]=a,e[6]=r,e[7]=l):l=e[7],l}function te(t){const e=w.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 r;e[3]!==s?(r=M("group/menu-item relative",s),e[3]=s,e[4]=r):r=e[4];let l;return e[5]!==a||e[6]!==r?(l=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:r,...a}),e[5]=a,e[6]=r,e[7]=l):l=e[7],l}const Ds=_t("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 Te(t){const e=w.c(28);let s,a,r,l,i,c,o;e[0]!==t?({asChild:r,isActive:l,variant:i,size:c,tooltip:o,className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=r,e[4]=l,e[5]=i,e[6]=c,e[7]=o):(s=e[1],a=e[2],r=e[3],l=e[4],i=e[5],c=e[6],o=e[7]);const d=r===void 0?!1:r,m=l===void 0?!1:l,f=i===void 0?"default":i,h=c===void 0?"default":c,x=d?kt:"button",{isMobile:b,state:p}=ve();let g;e[8]!==s||e[9]!==h||e[10]!==f?(g=M(Ds({variant:f,size:h}),s),e[8]=s,e[9]=h,e[10]=f,e[11]=g):g=e[11];let u;e[12]!==x||e[13]!==m||e[14]!==a||e[15]!==h||e[16]!==g?(u=n.jsx(x,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":h,"data-active":m,className:g,...a}),e[12]=x,e[13]=m,e[14]=a,e[15]=h,e[16]=g,e[17]=u):u=e[17];const j=u;if(!o)return j;if(typeof o=="string"){let k;e[18]!==o?(k={children:o},e[18]=o,e[19]=k):k=e[19],o=k}let v;e[20]!==j?(v=n.jsx(he,{asChild:!0,children:j}),e[20]=j,e[21]=v):v=e[21];const y=p!=="collapsed"||b;let S;e[22]!==y||e[23]!==o?(S=n.jsx(ue,{side:"right",align:"center",hidden:y,...o}),e[22]=y,e[23]=o,e[24]=S):S=e[24];let _;return e[25]!==v||e[26]!==S?(_=n.jsxs(pe,{children:[v,S]}),e[25]=v,e[26]=S,e[27]=_):_=e[27],_}function xt(t){const e=w.c(11),{navigationItems:s,header:a,footer:r,additionalContent:l,variant:i,collapsible:c}=t,o=i===void 0?"sidebar":i,d=c===void 0?"icon":c;let m;e[0]!==s?(m=s.map(Rs),e[0]=s,e[1]=m):m=e[1];let f;e[2]!==l||e[3]!==m?(f=n.jsx(Ls,{className:"flex-1 overflow-x-hidden",children:n.jsx(As,{className:"font-medium",children:n.jsx(Ps,{children:n.jsxs(Ne,{className:"gap-0.5",children:[m,l]})})})}),e[2]=l,e[3]=m,e[4]=f):f=e[4];let h;return e[5]!==d||e[6]!==r||e[7]!==a||e[8]!==f||e[9]!==o?(h=n.jsxs(Os,{variant:o,collapsible:d,children:[a,f,r]}),e[5]=d,e[6]=r,e[7]=a,e[8]=f,e[9]=o,e[10]=h):h=e[10],h}function Rs(t){return n.jsx(te,{children:n.jsxs(Te,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:t.onClick,isActive:t.isActive,tooltip:t.label,children:[n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:t.icon}),n.jsx("span",{className:"truncate",children:t.label})]})},t.key)}xt.Skeleton=function(){return n.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,s)=>n.jsx("div",{className:"w-full h-8",children:n.jsx(ee,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};const Hs="w-full h-8 justify-start gap-2 px-2 text-sm font-[450] text-sidebar-foreground hover:text-sidebar-foreground hover:bg-sidebar-accent active:bg-sidebar-accent/75 [&>svg]:size-[18px] [&>svg]:text-muted-foreground hover:[&>svg]:text-sidebar-foreground";function me(t){const e=w.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 r;e[3]!==s?(r=M(Hs,s),e[3]=s,e[4]=r):r=e[4];let l;return e[5]!==a||e[6]!==r?(l=n.jsx(W,{variant:"ghost",size:"sm",className:r,...a}),e[5]=a,e[6]=r,e[7]=l):l=e[7],l}function Us(t){const e=w.c(27),{user:s,userImage:a,onOpenSettings:r}=t;let l;e[0]!==s?(l=async()=>{if(!s)return;const S=`ID: ${s.id}
|
|
2
|
-
Name: ${s.name||"N/A"}
|
|
3
|
-
Email: ${s.email}`;try{await navigator.clipboard.writeText(S),q.success("User info copied to clipboard")}catch{q.error("Failed to copy user info to clipboard")}},e[0]=s,e[1]=l):l=e[1];const i=l,c=s.name||s.email||"U";let o;e[2]!==c||e[3]!==a?(o=n.jsx(X,{url:a,fallback:c,shape:"circle",size:"sm",className:"size-8 shrink-0"}),e[2]=c,e[3]=a,e[4]=o):o=e[4];const d=s.name||"User";let m;e[5]!==d?(m=n.jsx("span",{className:"text-sm text-sidebar-foreground truncate font-[450]",children:d}),e[5]=d,e[6]=m):m=e[6];let f;e[7]!==s.email?(f=n.jsx("span",{className:"text-xs text-muted-foreground truncate font-normal",children:s.email}),e[7]=s.email,e[8]=f):f=e[8];let h;e[9]!==m||e[10]!==f?(h=n.jsxs("div",{className:"flex flex-col min-w-0 text-left",children:[m,f]}),e[9]=m,e[10]=f,e[11]=h):h=e[11];let x;e[12]!==i||e[13]!==o||e[14]!==h?(x=n.jsxs(W,{variant:"ghost",onClick:i,className:"h-auto p-2 m-1 mb-0 justify-start gap-2 hover:bg-sidebar-accent hover:text-inherit active:bg-sidebar-accent/75",children:[o,h]}),e[12]=i,e[13]=o,e[14]=h,e[15]=x):x=e[15];let b;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(mt,{size:18}),e[16]=b):b=e[16];let p;e[17]!==r?(p=n.jsxs(me,{onClick:r,children:[b,"Preferences"]}),e[17]=r,e[18]=p):p=e[18];let g;e[19]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(me,{asChild:!0,children:n.jsxs("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(tt,{size:18}),n.jsx("span",{className:"flex-1",children:"Terms & Conditions"}),n.jsx(we,{size:14})]})}),e[19]=g):g=e[19];let u;e[20]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(me,{asChild:!0,children:n.jsxs("a",{href:"https://github.com/decocms/mesh",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(He,{className:"size-[18px]"}),n.jsx("span",{className:"flex-1",children:"decocms/mesh"}),n.jsx(we,{size:14})]})}),e[20]=u):u=e[20];let j;e[21]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsxs(me,{onClick:Bs,children:[n.jsx(ot,{size:18}),"Log out"]}),e[21]=j):j=e[21];let v;e[22]!==p?(v=n.jsxs("div",{className:"p-1 flex flex-col",children:[p,g,u,j]}),e[22]=p,e[23]=v):v=e[23];let y;return e[24]!==v||e[25]!==x?(y=n.jsx(n.Fragment,{children:n.jsxs("div",{className:"flex flex-col gap-0.5 bg-sidebar min-w-[250px]",children:[x,v]})}),e[24]=v,e[25]=x,e[26]=y):y=e[26],y}function Bs(){return Z.signOut()}function Ws(t){const e=w.c(22),{org:s,isActive:a,onClick:r,onSettings:l}=t,[i,c]=N.useState(!1),o=a||i,d=a&&"bg-accent hover:bg-accent";let m;e[0]!==d?(m=M("flex items-center gap-2 w-full justify-start font-normal h-10 px-2 rounded-lg cursor-pointer transition-colors hover:bg-accent/50",d),e[0]=d,e[1]=m):m=e[1];let f;e[2]!==r?(f=v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),r?.())},e[2]=r,e[3]=f):f=e[3];let h,x;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=()=>c(!0),x=()=>c(!1),e[4]=h,e[5]=x):(h=e[4],x=e[5]);const b=s.logo??void 0;let p;e[6]!==s.name||e[7]!==b?(p=n.jsx(X,{url:b,fallback:s.name,size:"sm",className:"size-6 shrink-0 rounded-md",objectFit:"cover"}),e[6]=s.name,e[7]=b,e[8]=p):p=e[8];let g;e[9]!==s.name?(g=n.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:s.name}),e[9]=s.name,e[10]=g):g=e[10];let u;e[11]!==l||e[12]!==s.name||e[13]!==o?(u=l&&o?n.jsx("button",{type:"button","aria-label":`${s.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:v=>{v.stopPropagation(),l()},children:n.jsx(dt,{size:16,className:"text-muted-foreground"})}):n.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[11]=l,e[12]=s.name,e[13]=o,e[14]=u):u=e[14];let j;return e[15]!==r||e[16]!==m||e[17]!==f||e[18]!==p||e[19]!==g||e[20]!==u?(j=n.jsxs("div",{role:"button",tabIndex:0,className:m,onClick:r,onKeyDown:f,onMouseEnter:h,onMouseLeave:x,children:[p,g,u]}),e[15]=r,e[16]=m,e[17]=f,e[18]=p,e[19]=g,e[20]=u,e[21]=j):j=e[21],j}function Fs(t){const e=w.c(30),{currentOrgSlug:s,onOrgSelect:a,onOrgSettings:r,onPopoverClose:l,onCreateOrganization:i}=t,{data:c}=Z.useListOrganizations();let o,d,m,f;if(e[0]!==s||e[1]!==i||e[2]!==a||e[3]!==r||e[4]!==l||e[5]!==c){let b;e[10]!==s?(b=(y,S)=>y.slug===s?-1:S.slug===s?1:y.name.localeCompare(S.name),e[10]=s,e[11]=b):b=e[11];const p=[...c??[]].sort(b);m="flex flex-col min-w-[275px] border-l border-border";let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:"Your Organizations"}),e[12]=g):g=e[12];let u;e[13]!==i||e[14]!==l?(u=()=>{l(),i()},e[13]=i,e[14]=l,e[15]=u):u=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(Ke,{size:16,className:"text-muted-foreground"}),e[16]=j):j=e[16],e[17]!==u?(f=n.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[g,n.jsx(W,{variant:"ghost",size:"icon",className:"size-5",onClick:u,children:j})]}),e[17]=u,e[18]=f):f=e[18],o="flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto";let v;e[19]!==s||e[20]!==a||e[21]!==r?(v=y=>n.jsx(Ws,{org:y,isActive:y.slug===s,onClick:()=>a(y.slug),onSettings:()=>r(y.slug)},y.slug),e[19]=s,e[20]=a,e[21]=r,e[22]=v):v=e[22],d=p.map(v),e[0]=s,e[1]=i,e[2]=a,e[3]=r,e[4]=l,e[5]=c,e[6]=o,e[7]=d,e[8]=m,e[9]=f}else o=e[6],d=e[7],m=e[8],f=e[9];let h;e[23]!==o||e[24]!==d?(h=n.jsx("div",{className:o,children:d}),e[23]=o,e[24]=d,e[25]=h):h=e[25];let x;return e[26]!==m||e[27]!==f||e[28]!==h?(x=n.jsxs("div",{className:m,children:[f,h]}),e[26]=m,e[27]=f,e[28]=h,e[29]=x):x=e[29],x}function gt(t){const e=w.c(48),{open:s,onOpenChange:a,user:r,userImage:l}=t,[i,c]=Dt(),[o,d]=N.useState(!1);let m;e[0]!==r.id?(m=()=>{navigator.clipboard.writeText(r.id),d(!0),setTimeout(()=>d(!1),2e3)},e[0]=r.id,e[1]=m):m=e[1];const f=m;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(ts,{className:"text-base",children:"Profile Settings"}),e[2]=h):h=e[2];let x;e[3]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsxs(ss,{className:"px-6 pt-6 pb-4 border-b border-border shrink-0 relative",children:[h,n.jsxs(ns,{className:"absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[n.jsx(xe,{size:16}),n.jsx("span",{className:"sr-only",children:"Close"})]})]}),e[3]=x):x=e[3];const b=r.name||"U";let p;e[4]!==b||e[5]!==l?(p=n.jsx(X,{url:l,fallback:b,shape:"circle",size:"xl",className:"h-16 w-16"}),e[4]=b,e[5]=l,e[6]=p):p=e[6];const g=r.name||"User";let u;e[7]!==g?(u=n.jsx("span",{className:"text-base font-medium text-foreground",children:g}),e[7]=g,e[8]=u):u=e[8];let j;e[9]!==r.email?(j=n.jsx("span",{className:"text-sm text-muted-foreground",children:r.email}),e[9]=r.email,e[10]=j):j=e[10];let v;e[11]!==u||e[12]!==j?(v=n.jsxs("div",{className:"flex flex-col gap-1",children:[u,j]}),e[11]=u,e[12]=j,e[13]=v):v=e[13];let y;e[14]!==p||e[15]!==v?(y=n.jsxs("div",{className:"flex items-center gap-4",children:[p,v]}),e[14]=p,e[15]=v,e[16]=y):y=e[16];let S;e[17]!==i||e[18]!==c?(S=()=>c(!i),e[17]=i,e[18]=c,e[19]=S):S=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(ls,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(os,{size:16,className:"text-muted-foreground"}),"Developer Mode"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Show technical details like JSON input/output for tool calls"})]}),e[20]=_):_=e[20];let k;e[21]!==i||e[22]!==c?(k=n.jsx("div",{onClick:Vs,children:n.jsx(is,{checked:i,onCheckedChange:c})}),e[21]=i,e[22]=c,e[23]=k):k=e[23];let $;e[24]!==S||e[25]!==k?($=n.jsxs("button",{type:"button",onClick:S,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[_,k]}),e[24]=S,e[25]=k,e[26]=$):$=e[26];let C;e[27]!==y||e[28]!==$?(C=n.jsxs("div",{className:"p-5 space-y-6 min-h-[225px]",children:[y,$]}),e[27]=y,e[28]=$,e[29]=C):C=e[29];let z;e[30]!==r.id?(z=n.jsx("span",{className:"font-mono text-xs",children:r.id}),e[30]=r.id,e[31]=z):z=e[31];let I;e[32]!==o?(I=o?n.jsx(ge,{size:14,className:"text-green-600"}):n.jsx(qe,{size:14,className:"opacity-0 group-hover:opacity-100 transition-opacity"}),e[32]=o,e[33]=I):I=e[33];let O;e[34]!==f||e[35]!==z||e[36]!==I?(O=n.jsx(he,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:f,className:"group flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[z,I]})}),e[34]=f,e[35]=z,e[36]=I,e[37]=O):O=e[37];let T;e[38]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(ue,{side:"top",children:n.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[38]=T):T=e[38];let E;e[39]!==O?(E=n.jsx("div",{className:"border-t border-border px-5 py-4 flex items-center shrink-0",children:n.jsx(Fe,{children:n.jsxs(pe,{children:[O,T]})})}),e[39]=O,e[40]=E):E=e[40];let L;e[41]!==C||e[42]!==E?(L=n.jsxs(as,{className:"sm:max-w-lg sm:max-h-[85vh] p-0 flex flex-col",closeButtonClassName:"hidden",children:[x,n.jsxs("div",{className:"flex flex-col",children:[C,E]})]}),e[41]=C,e[42]=E,e[43]=L):L=e[43];let A;return e[44]!==a||e[45]!==s||e[46]!==L?(A=n.jsx(rs,{open:s,onOpenChange:a,children:L}),e[44]=a,e[45]=s,e[46]=L,e[47]=A):A=e[47],A}function Vs(t){return t.stopPropagation()}function bt(t){const e=w.c(47),{isCollapsed:s}=t,a=s===void 0?!1:s;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const{org:l}=ke(r),{data:i}=Z.useListOrganizations(),{data:c}=Z.useSession(),o=ie();let d;e[1]!==l||e[2]!==i?(d=i?.find(Y=>Y.slug===l),e[1]=l,e[2]=i,e[3]=d):d=e[3];const m=d,[f,h]=N.useState(!1),[x,b]=N.useState(!1),[p,g]=N.useState(!1),u=c?.user,j=u?.image;let v;e[4]!==o?(v=Y=>{h(!1),o({to:"/$org/settings",params:{org:Y}})},e[4]=o,e[5]=v):v=e[5];const y=v;let S;e[6]!==o?(S=Y=>{h(!1),o({to:"/$org",params:{org:Y}})},e[6]=o,e[7]=S):S=e[7];const _=S,k=a?"justify-center":"justify-start",$=a?"":"pl-0.5! px-1.5 gap-1.5";let C;e[8]!==k||e[9]!==$?(C=M("h-7 min-w-0 max-w-full hover:bg-sidebar-accent",k,$),e[8]=k,e[9]=$,e[10]=C):C=e[10];const z=m?.logo??"",I=m?.name??"";let O;e[11]!==I||e[12]!==z?(O=n.jsx(X,{url:z,fallback:I,size:"xs",className:"shrink-0 rounded-[5px]",objectFit:"cover"}),e[11]=I,e[12]=z,e[13]=O):O=e[13];let T;e[14]!==m?.name||e[15]!==a?(T=!a&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"truncate text-[14px] tracking-[-0.00625rem] font-medium text-foreground text-left",children:m?.name??"Select org"}),n.jsx(es,{className:"size-3.5 text-muted-foreground shrink-0"})]}),e[14]=m?.name,e[15]=a,e[16]=T):T=e[16];let E;e[17]!==O||e[18]!==T||e[19]!==C?(E=n.jsx(ze,{asChild:!0,children:n.jsxs(W,{variant:"ghost",size:"sm",className:C,children:[O,T]})}),e[17]=O,e[18]=T,e[19]=C,e[20]=E):E=e[20];let L;e[21]!==u||e[22]!==j?(L=u&&n.jsx(Us,{user:u,userImage:j,onOpenSettings:()=>{b(!0),h(!1)}}),e[21]=u,e[22]=j,e[23]=L):L=e[23];let A,K;e[24]===Symbol.for("react.memo_cache_sentinel")?(A=()=>h(!1),K=()=>g(!0),e[24]=A,e[25]=K):(A=e[24],K=e[25]);let D;e[26]!==y||e[27]!==_||e[28]!==l?(D=n.jsx(Fs,{currentOrgSlug:l,onOrgSelect:_,onOrgSettings:y,onPopoverClose:A,onCreateOrganization:K}),e[26]=y,e[27]=_,e[28]=l,e[29]=D):D=e[29];let U;e[30]!==L||e[31]!==D?(U=n.jsxs($e,{align:"start",side:"bottom",className:"p-0 flex w-auto h-88 overflow-hidden",children:[L,D]}),e[30]=L,e[31]=D,e[32]=U):U=e[32];let H;e[33]!==f||e[34]!==E||e[35]!==U?(H=n.jsxs(Ie,{open:f,onOpenChange:h,children:[E,U]}),e[33]=f,e[34]=E,e[35]=U,e[36]=H):H=e[36];let R;e[37]!==x||e[38]!==u||e[39]!==j?(R=u&&x&&u.email&&n.jsx(gt,{open:x,onOpenChange:b,user:{...u,name:u.name??void 0,email:u.email},userImage:j}),e[37]=x,e[38]=u,e[39]=j,e[40]=R):R=e[40];let P;e[41]!==p?(P=n.jsx(Ye,{open:p,onOpenChange:g}),e[41]=p,e[42]=P):P=e[42];let B;return e[43]!==H||e[44]!==R||e[45]!==P?(B=n.jsxs(n.Fragment,{children:[H,R,P]}),e[43]=H,e[44]=R,e[45]=P,e[46]=B):B=e[46],B}bt.Skeleton=function(){return n.jsxs("div",{className:"flex items-center gap-1.5 h-7 px-1.5 w-full",children:[n.jsx(ee,{className:"size-5 rounded-[5px] shrink-0"}),n.jsx(ee,{className:"h-3.5 flex-1"})]})};function Se(){const t=w.c(45),{state:e,toggleSidebar:s}=ve(),a=e==="collapsed",[r,l]=je();let i;t[0]!==l?(i=()=>{l(Ks)},t[0]=l,t[1]=i):i=t[1];const c=i,o=a&&"group-hover/account-switcher:opacity-0 group-hover/account-switcher:pointer-events-none group-hover/account-switcher:invisible";let d;t[2]!==o?(d=M("w-full min-w-0 transition-opacity",o),t[2]=o,t[3]=d):d=t[3];let m;t[4]!==a?(m=n.jsx(bt,{isCollapsed:a}),t[4]=a,t[5]=m):m=t[5];let f;t[6]!==d||t[7]!==m?(f=n.jsx("div",{className:d,children:m}),t[6]=d,t[7]=m,t[8]=f):f=t[8];const h=a?"opacity-0 invisible pointer-events-none group-hover/account-switcher:opacity-100 group-hover/account-switcher:visible group-hover/account-switcher:pointer-events-auto":"opacity-0 invisible pointer-events-none";let x;t[9]!==h?(x=M("absolute inset-0 m-auto size-7 hover:bg-sidebar-accent transition-opacity",h),t[9]=h,t[10]=x):x=t[10];const b=!a;let p;t[11]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(at,{className:"size-4 text-muted-foreground shrink-0"}),t[11]=p):p=t[11];let g;t[12]!==x||t[13]!==b||t[14]!==s?(g=n.jsx(W,{variant:"ghost",size:"icon",className:x,onClick:s,"aria-label":"Expand sidebar",disabled:b,children:p}),t[12]=x,t[13]=b,t[14]=s,t[15]=g):g=t[15];let u;t[16]!==f||t[17]!==g?(u=n.jsxs("div",{className:"group/account-switcher relative flex items-center justify-center gap-1.5 min-w-0 flex-1 overflow-hidden",children:[f,g]}),t[16]=f,t[17]=g,t[18]=u):u=t[18];const j=a&&"hidden";let v;t[19]!==j?(v=M("flex items-center gap-0.5 shrink-0",j),t[19]=j,t[20]=v):v=t[20];let y;t[21]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(nt,{className:"size-4 text-muted-foreground"}),t[21]=y):y=t[21];let S;t[22]!==a||t[23]!==s?(S=n.jsx(he,{asChild:!0,children:n.jsx(W,{variant:"ghost",size:"icon",className:"size-7 hover:bg-sidebar-accent",onClick:s,"aria-label":"Collapse sidebar",disabled:a,children:y})}),t[22]=a,t[23]=s,t[24]=S):S=t[24];let _;t[25]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(ue,{side:"bottom",children:"Collapse sidebar"}),t[25]=_):_=t[25];let k;t[26]!==S?(k=n.jsxs(pe,{children:[S,_]}),t[26]=S,t[27]=k):k=t[27];const $=r&&"bg-sidebar-accent";let C;t[28]!==$?(C=M("size-7 hover:bg-sidebar-accent",$),t[28]=$,t[29]=C):C=t[29];let z;t[30]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsx(Ve,{size:11,className:"text-muted-foreground"}),t[30]=z):z=t[30];let I;t[31]!==a||t[32]!==C||t[33]!==c?(I=n.jsx(he,{asChild:!0,children:n.jsx(W,{variant:"ghost",size:"icon",className:C,onClick:c,"aria-label":"Toggle Decopilot",disabled:a,children:z})}),t[31]=a,t[32]=C,t[33]=c,t[34]=I):I=t[34];let O;t[35]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(ue,{side:"bottom",children:"Toggle Decopilot"}),t[35]=O):O=t[35];let T;t[36]!==I?(T=n.jsxs(pe,{children:[I,O]}),t[36]=I,t[37]=T):T=t[37];let E;t[38]!==v||t[39]!==k||t[40]!==T?(E=n.jsxs("div",{className:v,children:[k,T]}),t[38]=v,t[39]=k,t[40]=T,t[41]=E):E=t[41];let L;return t[42]!==u||t[43]!==E?(L=n.jsx(pt,{className:"h-12 gap-0 pt-0",children:n.jsx(Ne,{children:n.jsx(te,{children:n.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[u,E]})})})}),t[42]=u,t[43]=E,t[44]=L):L=t[44],L}function Ks(t){return!t}Se.Skeleton=function(){return n.jsx(pt,{className:"h-12 gap-0 pt-0",children:n.jsx(Ne,{children:n.jsx(te,{children:n.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 flex-1 px-1.5",children:[n.jsx(ee,{className:"size-5 rounded-[5px] shrink-0"}),n.jsx(ee,{className:"h-3.5 w-16"})]}),n.jsxs("div",{className:"flex items-center gap-0.5",children:[n.jsx(ee,{className:"size-7 rounded-lg"}),n.jsx(ee,{className:"size-7 rounded-lg"})]})]})})})})};function Zs({invitation:t,onStatusChange:e}){const[s,a]=N.useState(!1),[r,l]=N.useState(!1),i=ie(),c=async()=>{a(!0);try{const x=await Z.organization.acceptInvitation({invitationId:t.id});if(x.error)q.error(x.error.message),a(!1);else{e(t.id,"accepted");const b=await Z.organization.setActive({organizationId:t.organizationId});b?.data?.slug?(q.success("Invitation accepted!"),i({to:"/$org",params:{org:b.data.slug}})):(q.success("Invitation accepted! Redirecting..."),i({to:"/"}))}}catch{q.error("Failed to accept invitation"),a(!1)}},o=async()=>{l(!0);try{const x=await Z.organization.rejectInvitation({invitationId:t.id});x.error?(q.error(x.error.message),l(!1)):(q.success("Invitation rejected"),e(t.id,"rejected"),l(!1))}catch{q.error("Failed to reject invitation"),l(!1)}},d=t.organizationName||t.organizationId,m=t.status==="pending",f=t.status==="accepted",h=t.status==="rejected";return n.jsxs("div",{className:M("flex items-center gap-3 px-3 py-2 h-12 border-b border-border/50 last:border-b-0",!m&&"opacity-50"),children:[n.jsx("div",{className:"shrink-0 size-5 flex items-center justify-center",children:n.jsx(ct,{size:16,className:"text-muted-foreground"})}),n.jsxs("p",{className:"flex-1 text-sm text-foreground min-w-0 whitespace-nowrap overflow-hidden",children:["You have been invited to ",n.jsx("span",{className:"font-semibold inline-block max-w-[200px] truncate align-bottom",children:d})]}),n.jsx("div",{className:"flex items-center gap-1 shrink-0",children:m?n.jsxs(n.Fragment,{children:[n.jsx(W,{variant:"ghost",size:"icon",onClick:o,disabled:s||r,className:"h-8 w-8",children:n.jsx(Ae,{size:14})}),n.jsx(W,{variant:"outline",size:"icon",onClick:c,disabled:s||r,className:"h-8 w-8",children:n.jsx(ge,{size:14})})]}):f?n.jsxs(Le,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(ge,{size:12}),"Accepted"]}):h?n.jsxs(Le,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(Ae,{size:12}),"Declined"]}):null})]})}function Gs(){const[t,e]=N.useState(!1),s=N.useContext(zt),{data:a}=s.hooks.useListUserInvitations(),{data:r}=Z.useListOrganizations(),[l,i]=N.useState({}),m=(a??[]).filter(p=>new Date(p.expiresAt)>new Date).map(p=>{const g=(r??[]).find(u=>u.id===p.organizationId);return{...p,organizationSlug:g?.slug||p.organizationSlug,organizationName:g?.name||p.organizationName}}).map(p=>({...p,status:l[p.id]||p.status})),f=[...m].sort((p,g)=>{const u={pending:0,accepted:1,rejected:2};return(u[p.status]??999)-(u[g.status]??999)}),x=m.filter(p=>p.status==="pending").length>0,b=(p,g)=>{i(u=>({...u,[p]:g}))};return n.jsx(Ms,{className:"border-t border-border pt-2",children:n.jsx(Ne,{children:n.jsx(te,{children:n.jsxs(Ie,{open:t,onOpenChange:e,children:[n.jsx(ze,{asChild:!0,children:n.jsxs(Te,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground relative",tooltip:"Inbox",children:[n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:n.jsx(Ee,{})}),n.jsx("span",{className:"truncate",children:"Inbox"}),x&&n.jsx("span",{className:"absolute top-1 right-1 h-2 w-2 rounded-full bg-destructive"})]})}),n.jsxs($e,{align:"end",className:"w-[480px] p-0 overflow-hidden",children:[n.jsx("div",{className:"px-4 py-3 border-b border-border",children:n.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Inbox"})}),n.jsx("div",{className:"max-h-96 overflow-auto",children:f.length>0?f.map(p=>n.jsx(Zs,{invitation:p,onStatusChange:b},p.id)):n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[n.jsx(Ee,{size:32,className:"text-muted-foreground/40 mb-2"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"No invitations at the moment"})]})})]})]})})})})}function jt(t){const e=w.c(4),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Es,{className:"my-2 -ml-1"}),e[0]=a):a=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(te,{children:n.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:n.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=r):r=e[1];let l;return e[2]!==s?(l=n.jsxs(n.Fragment,{children:[a,r,s]}),e[2]=s,e[3]=l):l=e[3],l}function Ys(t){const e=w.c(26),{item:s}=t,a=ie(),{org:r}=be(),l=_e(r.id),i=Qt(r.id);let c;e[0]!==i.update||e[1]!==s.url||e[2]!==l?.sidebar_items?(c=async()=>{const y=(l?.sidebar_items||[]).filter(S=>S.url!==s.url);await i.update.mutateAsync({sidebar_items:y})},e[0]=i.update,e[1]=s.url,e[2]=l?.sidebar_items,e[3]=c):c=e[3];const o=c;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 h;e[7]!==s.url||e[8]!==a?(h=()=>{a({to:s.url})},e[7]=s.url,e[8]=a,e[9]=h):h=e[9];const x=s.title;let b;e[10]!==f||e[11]!==s.icon||e[12]!==s.title?(b=n.jsx("div",{className:"flex items-center justify-center shrink-0",children:f?n.jsx("img",{src:s.icon,alt:s.title,className:"h-4 w-4 rounded object-cover"}):n.jsx(cs,{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]=b):b=e[13];let p;e[14]!==s.title?(p=s.title.toLocaleLowerCase(),e[14]=s.title,e[15]=p):p=e[15];let g;e[16]!==p?(g=n.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:n.jsx("span",{className:"truncate text-sm w-full capitalize",children:p})}),e[16]=p,e[17]=g):g=e[17];let u;e[18]!==o?(u=n.jsx(xe,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:v=>{v.preventDefault(),v.stopPropagation(),o()}}),e[18]=o,e[19]=u):u=e[19];let j;return e[20]!==s.title||e[21]!==h||e[22]!==b||e[23]!==g||e[24]!==u?(j=n.jsx(te,{children:n.jsxs(Te,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:h,tooltip:x,children:[b,g,u]})}),e[20]=s.title,e[21]=h,e[22]=b,e[23]=g,e[24]=u,e[25]=j):j=e[25],j}function Re(){const t=w.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(te,{children:n.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:n.jsx(ee,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function qs(){const t=w.c(4),{org:e}=be(),a=_e(e.id)?.sidebar_items;if(!a?.length)return null;let r;t[0]!==a?(r=a.map(Js),t[0]=a,t[1]=r):r=t[1];let l;return t[2]!==r?(l=n.jsx(jt,{children:r}),t[2]=r,t[3]=l):l=t[3],l}function Js(t){return n.jsx(Ys,{item:t},t.url)}function Xs(){const t=w.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(N.Suspense,{fallback:n.jsxs(jt,{children:[n.jsx(Re,{}),n.jsx(Re,{})]}),children:n.jsx(qs,{})}),t[0]=e):e=t[0],e}function Qs(){const t=w.c(5),e=vs();let s,a;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(N.Suspense,{fallback:n.jsx(Se.Skeleton,{}),children:n.jsx(Se,{})}),a=n.jsx(Gs,{}),t[0]=s,t[1]=a):(s=t[0],a=t[1]);let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Ge,{children:n.jsx(N.Suspense,{fallback:null,children:n.jsx(Xs,{})})}),t[2]=r):r=t[2];let l;return t[3]!==e?(l=n.jsx(xt,{navigationItems:e,header:s,footer:a,additionalContent:r}),t[3]=e,t[4]=l):l=t[4],l}function en(t){const e=w.c(12);let s,a,r,l;e[0]!==t?({className:s,orientation:r,decorative:l,...a}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=r,e[4]=l):(s=e[1],a=e[2],r=e[3],l=e[4]);const i=r===void 0?"horizontal":r,c=l===void 0?!0:l;let o;e[5]!==s?(o=M("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]=o):o=e[6];let d;return e[7]!==c||e[8]!==i||e[9]!==a||e[10]!==o?(d=n.jsx($t,{"data-slot":"separator-root",decorative:c,orientation:i,className:o,...a}),e[7]=c,e[8]=i,e[9]=a,e[10]=o,e[11]=d):d=e[11],d}const vt=N.createContext(null);function tn(){const t=N.useContext(vt);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function sn(t){const e=w.c(10),{children:s,onItemHover:a}=t,[r,l]=N.useState(null);let i;e[0]!==a?(i=f=>{l(f),a?.(f)},e[0]=a,e[1]=i):i=e[1];const c=i;let o;e[2]!==r||e[3]!==c?(o={hoveredItem:r,setHoveredItem:c},e[2]=r,e[3]=c,e[4]=o):o=e[4];let d;e[5]!==s?(d=n.jsx(Ie,{children:s}),e[5]=s,e[6]=d):d=e[6];let m;return e[7]!==o||e[8]!==d?(m=n.jsx(vt.Provider,{value:o,children:d}),e[7]=o,e[8]=d,e[9]=m):m=e[9],m}function nn(t){const e=w.c(6),{children:s,onClick:a}=t;let r;e[0]!==s||e[1]!==a?(r=n.jsx(W,{variant:"link",className:"p-0.5 h-auto",onClick:a,type:"button",children:s}),e[0]=s,e[1]=a,e[2]=r):r=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(ze,{asChild:!0,children:n.jsx(W,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:n.jsx(Jt,{size:16,className:"opacity-50"})})}),e[3]=l):l=e[3];let i;return e[4]!==r?(i=n.jsxs("div",{className:"flex items-center gap-1",children:[r,l]}),e[4]=r,e[5]=i):i=e[5],i}function an(t){const e=w.c(8),{item:s,fallback:a}=t,r=a===void 0?"":a,l=s?.avatarUrl??"",i=s?.name??r;let c;e[0]!==l||e[1]!==i?(c=n.jsx(X,{url:l,fallback:i,size:"xs",objectFit:"contain"}),e[0]=l,e[1]=i,e[2]=c):c=e[2];const o=s?.name??r;let d;e[3]!==o?(d=n.jsx("span",{children:o}),e[3]=o,e[4]=d):d=e[4];let m;return e[5]!==c||e[6]!==d?(m=n.jsxs("div",{className:"flex items-center gap-2",children:[c,d]}),e[5]=c,e[6]=d,e[7]=m):m=e[7],m}function rn(t){const e=w.c(6),{children:s,align:a}=t,r=a===void 0?"start":a,i=N.Children.toArray(s).filter(ln).length===1?"280px":"480px";let c;e[0]!==i?(c={width:i},e[0]=i,e[1]=c):c=e[1];let o;return e[2]!==r||e[3]!==s||e[4]!==c?(o=n.jsx($e,{align:r,className:"p-0 flex items-start",style:c,children:s}),e[2]=r,e[3]=s,e[4]=c,e[5]=o):o=e[5],o}function ln(t){return N.isValidElement(t)&&(t.type===wt||t.type===Nt)}function Nt(t){const e=w.c(5),{children:s,className:a}=t;let r;e[0]!==a?(r=M("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",a),e[0]=a,e[1]=r):r=e[1];let l;return e[2]!==s||e[3]!==r?(l=n.jsx("div",{className:r,children:s}),e[2]=s,e[3]=r,e[4]=l):l=e[4],l}const wt=Nt;function on(t){const e=w.c(6),{placeholder:s,value:a,onChange:r}=t,l=s===void 0?"Search...":s;let i;e[0]!==r?(i=o=>r(o.target.value),e[0]=r,e[1]=i):i=e[1];let c;return e[2]!==l||e[3]!==i||e[4]!==a?(c=n.jsx(ds,{placeholder:l,value:a,onChange:i,className:"rounded-none border-t-0 border-x-0 focus-visible:border-border focus-visible:ring-0"}),e[2]=l,e[3]=i,e[4]=a,e[5]=c):c=e[5],c}function cn(t){const e=w.c(6),{children:s,emptyMessage:a}=t,r=a===void 0?"No items found.":a,l=N.Children.count(s)>0;let i;e[0]!==r||e[1]!==l?(i=!l&&n.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:r}),e[0]=r,e[1]=l,e[2]=i):i=e[2];let c;return e[3]!==s||e[4]!==i?(c=n.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[i,s]}),e[3]=s,e[4]=i,e[5]=c):c=e[5],c}function dn(t){const e=w.c(15),{item:s,onClick:a,onHover:r,children:l}=t,i=tn();let c;e[0]!==i||e[1]!==s||e[2]!==r?(c=()=>{i.setHoveredItem(s.slug),r?.(s)},e[0]=i,e[1]=s,e[2]=r,e[3]=c):c=e[3];const o=c;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||n.jsxs(n.Fragment,{children:[n.jsx(X,{url:s.avatarUrl??"",fallback:s.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),n.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]!==o||e[12]!==d||e[13]!==m?(f=n.jsx(W,{onClick:d,onMouseEnter:o,variant:"ghost",size:"sm",className:"w-full justify-start font-normal",children:m}),e[11]=o,e[12]=d,e[13]=m,e[14]=f):f=e[14],f}function mn(t){const e=w.c(2),{children:s}=t;let a;return e[0]!==s?(a=n.jsx("div",{className:"px-1 pb-1 pt-0.5",children:s}),e[0]=s,e[1]=a):a=e[1],a}function fn(t){const e=w.c(11),{onClick:s,icon:a,children:r,variant:l}=t,c=(l===void 0?"default":l)==="muted"&&"text-muted-foreground";let o;e[0]!==c?(o=M("w-full justify-start font-normal",c),e[0]=c,e[1]=o):o=e[1];let d;e[2]!==a?(d=a&&n.jsx("span",{className:"[&>svg]:size-4",children:a}),e[2]=a,e[3]=d):d=e[3];let m;e[4]!==r?(m=n.jsx("span",{children:r}),e[4]=r,e[5]=m):m=e[5];let f;return e[6]!==s||e[7]!==o||e[8]!==d||e[9]!==m?(f=n.jsxs(W,{variant:"ghost",size:"sm",className:o,onClick:s,children:[d,m]}),e[6]=s,e[7]=o,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}function un(){const t=w.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(en,{}),t[0]=e):e=t[0],e}function hn(){const t=w.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const F=Object.assign(sn,{Trigger:nn,CurrentItem:an,Content:rn,Panel:wt,Search:on,Items:cn,Item:dn,Actions:mn,Action:fn,Separator:un,Skeleton:hn});function ye(){const t=w.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=ke(e),{data:a}=Z.useListOrganizations(),r=ie();let l;t[1]!==s||t[2]!==a?(l=a?.find(E=>E.slug===s),t[1]=s,t[2]=a,t[3]=l):l=t[3];const i=l,[c,o]=N.useState(""),[d,m]=N.useState(!1);let f,h,x,b,p,g,u,j;if(t[4]!==i||t[5]!==r||t[6]!==s||t[7]!==c||t[8]!==a){const L=(a?(()=>{const R=a.filter(P=>P.name.toLowerCase().includes(c.toLowerCase()));if(s){const P=R.findIndex(B=>B.slug===s);if(P>0){const B=R[P];B&&(R.splice(P,1),R.unshift(B))}}return R})():[]).map(pn);let A;t[17]!==i?(A=i?{slug:i.slug,name:i.name,avatarUrl:i.logo}:void 0,t[17]=i,t[18]=A):A=t[18];const K=A;b=F;let D;t[19]!==r||t[20]!==s?(D=()=>r({to:"/$org",params:{org:s??""}}),t[19]=r,t[20]=s,t[21]=D):D=t[21];let U;t[22]!==K?(U=n.jsx(F.CurrentItem,{item:K}),t[22]=K,t[23]=U):U=t[23],t[24]!==D||t[25]!==U?(j=n.jsx(F.Trigger,{onClick:D,children:U}),t[24]=D,t[25]=U,t[26]=j):j=t[26],x=F.Content,h=F.Panel,t[27]!==c?(u=n.jsx(F.Search,{placeholder:"Search organizations...",value:c,onChange:o}),t[27]=c,t[28]=u):u=t[28],f=F.Items,p="No organizations found.";let H;t[29]!==r?(H=R=>n.jsx(F.Item,{item:R,onClick:P=>r({to:"/$org",params:{org:P.slug}})},R.slug),t[29]=r,t[30]=H):H=t[30],g=L.map(H),t[4]=i,t[5]=r,t[6]=s,t[7]=c,t[8]=a,t[9]=f,t[10]=h,t[11]=x,t[12]=b,t[13]=p,t[14]=g,t[15]=u,t[16]=j}else f=t[9],h=t[10],x=t[11],b=t[12],p=t[13],g=t[14],u=t[15],j=t[16];let v;t[31]!==f||t[32]!==p||t[33]!==g?(v=n.jsx(f,{emptyMessage:p,children:g}),t[31]=f,t[32]=p,t[33]=g,t[34]=v):v=t[34];let y,S;t[35]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(F.Actions,{children:n.jsx(F.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),S=n.jsx(F.Separator,{}),t[35]=y,t[36]=S):(y=t[35],S=t[36]);let _;t[37]!==r?(_=()=>r({to:"/"}),t[37]=r,t[38]=_):_=t[38];let k;t[39]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(ms,{}),t[39]=k):k=t[39];let $;t[40]!==_?($=n.jsx(F.Actions,{children:n.jsx(F.Action,{onClick:_,icon:k,children:"See all organizations"})}),t[40]=_,t[41]=$):$=t[41];let C;t[42]!==h||t[43]!==$||t[44]!==u||t[45]!==v?(C=n.jsxs(h,{children:[u,v,y,S,$]}),t[42]=h,t[43]=$,t[44]=u,t[45]=v,t[46]=C):C=t[46];let z;t[47]!==x||t[48]!==C?(z=n.jsx(x,{children:C}),t[47]=x,t[48]=C,t[49]=z):z=t[49];let I;t[50]!==b||t[51]!==z||t[52]!==j?(I=n.jsxs(b,{children:[j,z]}),t[50]=b,t[51]=z,t[52]=j,t[53]=I):I=t[53];let O;t[54]!==d?(O=n.jsx(Ye,{open:d,onOpenChange:m}),t[54]=d,t[55]=O):O=t[55];let T;return t[56]!==I||t[57]!==O?(T=n.jsxs(n.Fragment,{children:[I,O]}),t[56]=I,t[57]=O,t[58]=T):T=t[58],T}function pn(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}ye.Skeleton=F.Skeleton;function xn({prop:t,defaultProp:e,onChange:s=()=>{}}){const[a,r]=gn({defaultProp:e,onChange:s}),l=t!==void 0,i=l?t:a,c=Ue(s),o=N.useCallback(d=>{if(l){const f=typeof d=="function"?d(t):d;f!==t&&c(f)}else r(d)},[l,t,r,c]);return[i,o]}function gn({defaultProp:t,onChange:e}){const s=N.useState(t),[a]=s,r=N.useRef(a),l=Ue(e);return N.useEffect(()=>{r.current!==a&&(l(a),r.current=a)},[a,r,l]),s}function bn(t){const e=w.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=n.jsx(le.Root,{"data-slot":"drawer",...s}),e[2]=s,e[3]=a):a=e[3],a}function jn(t){const e=w.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=n.jsx(le.Trigger,{"data-slot":"drawer-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function vn(t){const e=w.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=n.jsx(le.Portal,{"data-slot":"drawer-portal",...s}),e[2]=s,e[3]=a):a=e[3],a}function Nn(t){const e=w.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 r;e[3]!==s?(r=M("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]=r):r=e[4];let l;return e[5]!==a||e[6]!==r?(l=n.jsx(le.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=l):l=e[7],l}function wn(t){const e=w.c(12);let s,a,r;e[0]!==t?({className:a,children:s,...r}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=r):(s=e[1],a=e[2],r=e[3]);let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Nn,{}),e[4]=l):l=e[4];let i;e[5]!==a?(i=M("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=i):i=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=c):c=e[7];let o;return e[8]!==s||e[9]!==r||e[10]!==i?(o=n.jsxs(vn,{"data-slot":"drawer-portal",children:[l,n.jsxs(le.Content,{"data-slot":"drawer-content",className:i,...r,children:[c,s]})]}),e[8]=s,e[9]=r,e[10]=i,e[11]=o):o=e[11],o}function Sn(t){const e=w.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 r;e[3]!==s?(r=M("flex flex-col gap-1.5 px-4 py-2",s),e[3]=s,e[4]=r):r=e[4];let l;return e[5]!==a||e[6]!==r?(l=n.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=l):l=e[7],l}function yn(t){const e=w.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 r;e[3]!==s?(r=M("text-foreground font-semibold",s),e[3]=s,e[4]=r):r=e[4];let l;return e[5]!==a||e[6]!==r?(l=n.jsx(le.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=l):l=e[7],l}const St=N.createContext({setOpen:()=>{}}),Cn=()=>N.useContext(St),kn=t=>{const e=w.c(25);let s,a,r,l,i;e[0]!==t?({children:s,defaultOpen:a,open:l,onOpenChange:r,...i}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=r,e[4]=l,e[5]=i):(s=e[1],a=e[2],r=e[3],l=e[4],i=e[5]);const c=a??!1;let o;e[6]!==r||e[7]!==l||e[8]!==c?(o={prop:l,defaultProp:c,onChange:r},e[6]=r,e[7]=l,e[8]=c,e[9]=o):o=e[9];const[d,m]=xn(o);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let h;e[12]!==s||e[13]!==d||e[14]!==i||e[15]!==m?(h=n.jsx(bn,{open:d,onOpenChange:m,...i,children:s}),e[12]=s,e[13]=d,e[14]=i,e[15]=m,e[16]=h):h=e[16];let x;e[17]!==d||e[18]!==i||e[19]!==m||e[20]!==h?(x=n.jsx(hs,{open:d,onOpenChange:m,...i,children:h}),e[17]=d,e[18]=i,e[19]=m,e[20]=h,e[21]=x):x=e[21];let b;return e[22]!==f||e[23]!==x?(b=n.jsx(St.Provider,{value:f,children:x}),e[22]=f,e[23]=x,e[24]=b):b=e[24],b},_n=t=>{const{children:e,title:s,...a}=t,r=oe(),{className:l,...i}=a;return r?n.jsxs(wn,{...i,children:[n.jsx(Sn,{className:"hidden",children:n.jsx(yn,{children:s})}),n.jsx("div",{className:M("flex flex-col gap-2 p-2 py-4",l),children:e})]}):n.jsx(us,{...a,children:e})},zn=t=>{const{children:e,...s}=t,{setOpen:a}=Cn(),r=oe(),{className:l,...i}=s;return r?n.jsx("div",{...i,onClick:c=>{a(!1);const{onClick:o}=i;o?.(c)},className:M("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}):n.jsx(ps,{...s,children:e})},$n=t=>{const e=w.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 r=oe();let l;return e[3]!==s||e[4]!==r||e[5]!==a?(l=r?n.jsx(jn,{asChild:!0,children:s}):n.jsx(fs,{...a,children:s}),e[3]=s,e[4]=r,e[5]=a,e[6]=l):l=e[6],l},In=t=>{const e=w.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 r=oe();let l;return e[3]!==s||e[4]!==r||e[5]!==a?(l=r?n.jsx(Pe,{className:M(s),...a}):n.jsx(Pe,{className:M(s),...a}),e[3]=s,e[4]=r,e[5]=a,e[6]=l):l=e[6],l};function On(t){const e=w.c(11),{user:s,trigger:a,align:r,children:l}=t,i=r===void 0?"start":r;let c;e[0]!==a||e[1]!==s?(c=a(s),e[0]=a,e[1]=s,e[2]=c):c=e[2];let o;e[3]!==c?(o=n.jsx($n,{asChild:!0,children:n.jsx("div",{children:c})}),e[3]=c,e[4]=o):o=e[4];let d;e[5]!==i||e[6]!==l?(d=n.jsx(_n,{side:"top",align:i,className:"md:w-[240px]",children:l}),e[5]=i,e[6]=l,e[7]=d):d=e[7];let m;return e[8]!==o||e[9]!==d?(m=n.jsxs(kn,{children:[o,d]}),e[8]=o,e[9]=d,e[10]=m):m=e[10],m}function Tn(t){const e=w.c(8),{children:s,onClick:a,className:r,asChild:l}=t;let i;e[0]!==l||e[1]!==s||e[2]!==a?(i=l?s:n.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]=i):i=e[3];let c;return e[4]!==l||e[5]!==r||e[6]!==i?(c=n.jsx(zn,{asChild:l,className:r,children:i}),e[4]=l,e[5]=r,e[6]=i,e[7]=c):c=e[7],c}function Mn(t){const e=w.c(2),{className:s}=t;let a;return e[0]!==s?(a=n.jsx(In,{className:s}),e[0]=s,e[1]=a):a=e[1],a}function En(){const t=w.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const J=Object.assign(On,{Item:Tn,Separator:Mn,Skeleton:En});function Ln(t){const e=w.c(47),{user:s,userImage:a}=t,[r,l]=N.useState(!1),[i,c]=N.useState(!1);let o;e[0]!==s.email||e[1]!==s.id||e[2]!==s.name?(o=()=>{const A=`ID: ${s.id}
|
|
4
|
-
Name: ${s.name||"N/A"}
|
|
5
|
-
Email: ${s.email}`;navigator.clipboard.writeText(A),c(!0),q.success("User info copied to clipboard"),setTimeout(()=>c(!1),2e3)},e[0]=s.email,e[1]=s.id,e[2]=s.name,e[3]=o):o=e[3];const d=o;let m;e[4]!==s.email||e[5]!==s.name||e[6]!==a?(m=()=>n.jsx(X,{url:a,fallback:s.name||s.email||"U",shape:"circle",size:"sm",className:"cursor-pointer hover:ring-2 ring-muted-foreground transition-all h-7 w-7"}),e[4]=s.email,e[5]=s.name,e[6]=a,e[7]=m):m=e[7];const f=s.name||s.email||"U";let h;e[8]!==f||e[9]!==a?(h=n.jsx(X,{url:a,fallback:f,shape:"circle",size:"sm"}),e[8]=f,e[9]=a,e[10]=h):h=e[10];const x=s.name||"User";let b;e[11]!==x?(b=n.jsx("div",{className:"text-sm font-medium truncate",children:x}),e[11]=x,e[12]=b):b=e[12];let p;e[13]!==s.email?(p=n.jsx("div",{className:"text-xs text-muted-foreground truncate",children:s.email}),e[13]=s.email,e[14]=p):p=e[14];let g;e[15]!==b||e[16]!==p?(g=n.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[b,p]}),e[15]=b,e[16]=p,e[17]=g):g=e[17];let u;e[18]!==i?(u=n.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:i?n.jsx(ge,{size:16,className:"text-green-600"}):n.jsx(qe,{size:16,className:"text-muted-foreground"})}),e[18]=i,e[19]=u):u=e[19];let j;e[20]!==h||e[21]!==g||e[22]!==u?(j=n.jsxs("div",{className:"group flex items-center gap-3 w-full py-1",children:[h,g,u]}),e[20]=h,e[21]=g,e[22]=u,e[23]=j):j=e[23];let v;e[24]!==d||e[25]!==j?(v=n.jsx(J.Item,{onClick:d,children:j}),e[24]=d,e[25]=j,e[26]=v):v=e[26];let y;e[27]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(J.Separator,{}),e[27]=y):y=e[27];let S,_;e[28]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsxs(J.Item,{onClick:()=>l(!0),children:[n.jsx(Oe,{className:"text-muted-foreground",size:18}),"Profile Settings"]}),_=n.jsx(J.Separator,{}),e[28]=S,e[29]=_):(S=e[28],_=e[29]);let k;e[30]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(He,{className:"w-4 h-4 text-muted-foreground"}),e[30]=k):k=e[30];let $;e[31]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(J.Item,{asChild:!0,children:n.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:[k,"decocms/admin",n.jsx(De,{size:18,className:"text-muted-foreground ml-auto"})]})}),e[31]=$):$=e[31];let C;e[32]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(rt,{className:"text-muted-foreground",size:18}),e[32]=C):C=e[32];let z,I;e[33]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsx(J.Item,{asChild:!0,children:n.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[C,"Homepage",n.jsx(De,{size:18,className:"ml-auto text-muted-foreground"})]})}),I=n.jsx(J.Separator,{}),e[33]=z,e[34]=I):(z=e[33],I=e[34]);let O;e[35]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsxs(J.Item,{onClick:An,children:[n.jsx(it,{size:18,className:"text-muted-foreground"}),"Log out"]}),e[35]=O):O=e[35];let T;e[36]!==v||e[37]!==m||e[38]!==s?(T=n.jsxs(J,{user:s,trigger:m,align:"end",children:[v,y,S,_,$,z,I,O]}),e[36]=v,e[37]=m,e[38]=s,e[39]=T):T=e[39];let E;e[40]!==r||e[41]!==s||e[42]!==a?(E=r&&n.jsx(gt,{open:r,onOpenChange:l,user:s,userImage:a}),e[40]=r,e[41]=s,e[42]=a,e[43]=E):E=e[43];let L;return e[44]!==T||e[45]!==E?(L=n.jsxs(n.Fragment,{children:[T,E]}),e[44]=T,e[45]=E,e[46]=L):L=e[46],L}function An(){return Z.signOut()}function Pn(){const t=w.c(7),{data:e}=Z.useSession();if(!e?.user){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(X,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer h-7 w-7",muted:!0}),t[0]=o):o=t[0],o}const s=e.user,a=s.name??void 0;let r;t[1]!==a||t[2]!==s?(r={...s,name:a},t[1]=a,t[2]=s,t[3]=r):r=t[3];const l=r,i=s.image;let c;return t[4]!==i||t[5]!==l?(c=n.jsx(Ln,{user:l,userImage:i}),t[4]=i,t[5]=l,t[6]=c):c=t[6],c}function Dn(){const t=w.c(2),s=Ce().location.href;let a;return t[0]!==s?(a=n.jsx(Mt,{to:"/login",search:{next:s},replace:!0}),t[0]=s,t[1]=a):a=t[1],a}function Rn(t){const e=w.c(6),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(It,{children:n.jsx(Be,{})}),e[0]=a):a=e[0];let r;e[1]!==s?(r=n.jsx(Ot,{children:s}),e[1]=s,e[2]=r):r=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Tt,{children:n.jsx(Dn,{})}),e[3]=l):l=e[3];let i;return e[4]!==r?(i=n.jsxs(n.Fragment,{children:[a,r,l]}),e[4]=r,e[5]=i):i=e[5],i}function Hn(t){const e=w.c(5),{children:s,className:a}=t;let r;e[0]!==a?(r=M("fixed top-0 left-0 right-0 z-20 bg-background flex items-center w-full h-12 border-b border-border",a),e[0]=a,e[1]=r):r=e[1];let l;return e[2]!==s||e[3]!==r?(l=n.jsx("div",{className:r,children:s}),e[2]=s,e[3]=r,e[4]=l):l=e[4],l}function Un(t){const e=w.c(5),{children:s,className:a}=t;let r;e[0]!==a?(r=M("flex items-center justify-center px-2.5 h-full border-r border-border",a),e[0]=a,e[1]=r):r=e[1];let l;return e[2]!==s||e[3]!==r?(l=n.jsx("div",{className:r,children:s}),e[2]=s,e[3]=r,e[4]=l):l=e[4],l}function Bn(t){const e=w.c(5),{children:s,className:a}=t;let r;e[0]!==a?(r=M("flex items-center gap-2 px-2 h-full",a),e[0]=a,e[1]=r):r=e[1];let l;return e[2]!==s||e[3]!==r?(l=n.jsx("div",{className:r,children:s}),e[2]=s,e[3]=r,e[4]=l):l=e[4],l}function Wn(t){const e=w.c(5),{children:s,className:a}=t;let r;e[0]!==a?(r=M("flex items-center gap-2 px-2 h-full flex-1",a),e[0]=a,e[1]=r):r=e[1];let l;return e[2]!==s||e[3]!==r?(l=n.jsx("div",{className:r,children:s}),e[2]=s,e[3]=r,e[4]=l):l=e[4],l}function Fn(t){const e=w.c(5),{children:s,className:a}=t;let r;e[0]!==a?(r=M("flex items-center gap-2 px-2 h-full ml-auto",a),e[0]=a,e[1]=r):r=e[1];let l;return e[2]!==s||e[3]!==r?(l=n.jsx("div",{className:r,children:s}),e[2]=s,e[3]=r,e[4]=l):l=e[4],l}function Vn(){const t=w.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center justify-center px-2 h-full border-r border-border",children:n.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=n.jsx("div",{className:"flex items-center gap-2 px-2 h-full",children:n.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=n.jsxs("div",{className:"fixed top-0 left-0 right-0 z-20 bg-background flex items-center w-full h-12 border-b border-border",children:[e,s,n.jsx("div",{className:"flex items-center gap-2 px-2 h-full ml-auto",children:n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"})})]}),t[2]=a):a=t[2],a}const fe=Object.assign(Hn,{Sidebar:Un,Left:Bn,Center:Wn,Right:Fn,Skeleton:Vn});function yt(){const t=w.c(3),{toggleSidebar:e}=ve();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(lt,{className:"text-muted-foreground/85 group-hover:text-foreground transition-colors",size:18}),t[0]=s):s=t[0];let a;return t[1]!==e?(a=n.jsx(n.Fragment,{children:n.jsx(W,{onClick:e,size:"icon",variant:"ghost",className:"w-7 h-7 rounded-md",children:s})}),t[1]=e,t[2]=a):a=t[2],a}yt.Skeleton=function(){return n.jsx("div",{className:"w-7 h-7 bg-muted rounded-md animate-pulse"})};function Kn({showSidebarToggle:t=!1,showOrgSwitcher:e=!1,showDecoChat:s=!1,disableDecoChat:a=!1}){const[r,l]=je(),i=N.useRef(a);a&&r&&i.current!==a&&l(!1),i.current=a;const c=()=>{a||l(o=>!o)};return n.jsxs(fe,{children:[t&&n.jsx(fe.Sidebar,{children:n.jsx(yt,{})}),n.jsx(fe.Left,{children:e&&n.jsx(N.Suspense,{fallback:n.jsx(ye.Skeleton,{}),children:n.jsx(ye,{})})}),n.jsxs(fe.Right,{className:"gap-2",children:[s&&!a&&n.jsxs(W,{size:"sm",variant:"default",onClick:c,className:"h-7 gap-2",children:[n.jsx(Ve,{size:16}),"Chat"]}),n.jsx(Pn,{})]})]})}function Zn(t){const e=w.c(10),{children:s,className:a}=t,[,r]=N.useTransition();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Xe.decoChatPanelWidth(),e[0]=l):l=e[0];const[i,c]=Je(l,30);let o;e[1]!==c?(o=h=>r(()=>c(h)),e[1]=c,e[2]=o):o=e[2];const d=o;let m;e[3]!==a?(m=M("min-w-0",a),e[3]=a,e[4]=m):m=e[4];let f;return e[5]!==i||e[6]!==s||e[7]!==d||e[8]!==m?(f=n.jsx(Qe,{defaultSize:i,minSize:20,className:m,onResize:d,children:s}),e[5]=i,e[6]=s,e[7]=d,e[8]=m,e[9]=f):f=e[9],f}function Gn(t){const e=w.c(5),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=Xe.sidebarOpen(),e[0]=a):a=e[0];const[r,l]=Je(a,!0);let i;return e[1]!==s||e[2]!==l||e[3]!==r?(i=n.jsx(_s,{open:r,onOpenChange:l,children:s}),e[1]=s,e[2]=l,e[3]=r,e[4]=i):i=e[4],i}function Yn(t){const e=w.c(6),{disableChat:s}=t,a=s===void 0?!1:s,[r]=je();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Qe,{className:"bg-background",children:n.jsx(We,{})}),e[0]=l):l=e[0];let i;e[1]!==r||e[2]!==a?(i=!a&&n.jsxs(n.Fragment,{children:[n.jsx(xs,{withHandle:r}),n.jsx(Zn,{className:M(r?"max-w-none":"max-w-0"),children:n.jsx(js,{})})]}),e[1]=r,e[2]=a,e[3]=i):i=e[3];let c;return e[4]!==i?(c=n.jsxs(gs,{direction:"horizontal",children:[l,i]}),e[4]=i,e[5]=c):c=e[5],c}function qn(){const t=w.c(18);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=ke(e),a=Ce(),r=a.location.pathname===`/${s}`||a.location.pathname===`/${s}/`;let l;t[1]!==s?(l=At.activeOrganization(s),t[1]=s,t[2]=l):l=t[2];let i;t[3]!==s?(i=async()=>{if(!s)return null;const{data:b}=await Z.organization.setActive({organizationSlug:s});return{org:b,project:{slug:Pt}}},t[3]=s,t[4]=i):i=t[4];let c;t[5]!==l||t[6]!==i?(c={queryKey:l,queryFn:i,gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1},t[5]=l,t[6]=i,t[7]=c):c=t[7];const{data:o}=Et(c);if(!o){let b;t[8]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(Kn,{}),t[8]=b):b=t[8];let p;return t[9]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsxs("div",{className:"min-h-screen bg-background",children:[b,n.jsx("div",{className:"pt-12",children:n.jsx(We,{})})]}),t[9]=p):p=t[9],p}let d;t[10]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("style",{children:`
|
|
6
|
-
[data-slot="sidebar-container"] {
|
|
7
|
-
top: 0 !important;
|
|
8
|
-
}
|
|
9
|
-
[data-slot="sidebar-inner"] {
|
|
10
|
-
padding-top: 0 !important;
|
|
11
|
-
}
|
|
12
|
-
`}),t[10]=d):d=t[10];let m;t[11]===Symbol.for("react.memo_cache_sentinel")?(m={"--sidebar-width":"13rem","--sidebar-width-mobile":"11rem"},t[11]=m):m=t[11];let f;t[12]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(Qs,{}),t[12]=f):f=t[12];let h;t[13]!==r?(h=n.jsx(Gn,{children:n.jsxs("div",{className:"flex flex-col h-screen",children:[d,n.jsx(V.Provider,{children:n.jsxs(Is,{className:"flex-1 bg-sidebar",style:m,children:[f,n.jsx(Ts,{children:n.jsx(Yn,{disableChat:r})})]})})]})}),t[13]=r,t[14]=h):h=t[14];let x;return t[15]!==o||t[16]!==h?(x=n.jsx(Lt,{...o,children:h}),t[15]=o,t[16]=h,t[17]=x):x=t[17],x}function er(){const t=w.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Rn,{children:n.jsx(N.Suspense,{fallback:n.jsx(Be,{}),children:n.jsx(qn,{})})}),t[0]=e):e=t[0],e}export{er as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as y,E as P,F as D,t as S,u as x}from"./index-iT9dC5c9.js";import{u as I}from"./useMutation-DuHm_HpG.js";import{K as w,a as v,u as M}from"./constants-B1dGAzkj.js";import{u as Q}from"./useQuery-nHeassts.js";function te(n){const e=y.c(12);let s,t;e[0]!==n?({client:s,...t}=n,e[0]=n,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=w.mcpToolsList(s),e[3]=s,e[4]=o):o=e[4];let r;e[5]!==s?(r=async()=>await s.listTools(),e[5]=s,e[6]=r):r=e[6];const l=t.staleTime??3e4;let i;return e[7]!==t||e[8]!==o||e[9]!==r||e[10]!==l?(i={...t,queryKey:o,queryFn:r,staleTime:l,retry:!1},e[7]=t,e[8]=o,e[9]=r,e[10]=l,e[11]=i):i=e[11],P(i)}function oe(n){const e=y.c(12);let s,t;e[0]!==n?({client:s,...t}=n,e[0]=n,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=w.mcpToolsList(s),e[3]=s,e[4]=o):o=e[4];let r;e[5]!==s?(r=async()=>await s.listTools(),e[5]=s,e[6]=r):r=e[6];const l=t.staleTime??3e4;let i;return e[7]!==t||e[8]!==o||e[9]!==r||e[10]!==l?(i={...t,queryKey:o,queryFn:r,staleTime:l,retry:!1},e[7]=t,e[8]=o,e[9]=r,e[10]=l,e[11]=i):i=e[11],Q(i)}function j(n){const e=y.c(21);let s,t,o,r;e[0]!==n?({client:s,toolName:r,toolArguments:o,...t}=n,e[0]=n,e[1]=s,e[2]=t,e[3]=o,e[4]=r):(s=e[1],t=e[2],o=e[3],r=e[4]);let l,i,c;if(e[5]!==s||e[6]!==t||e[7]!==o||e[8]!==r){const m=JSON.stringify(o??{});c=P,l=t,i=w.mcpToolCall(s,r,m),e[5]=s,e[6]=t,e[7]=o,e[8]=r,e[9]=l,e[10]=i,e[11]=c}else l=e[9],i=e[10],c=e[11];let a;e[12]!==s||e[13]!==o||e[14]!==r?(a=async()=>await s.callTool({name:r,arguments:o}),e[12]=s,e[13]=o,e[14]=r,e[15]=a):a=e[15];const f=t.staleTime??3e4;let u;return e[16]!==l||e[17]!==i||e[18]!==a||e[19]!==f?(u={...l,queryKey:i,queryFn:a,staleTime:f,retry:!1},e[16]=l,e[17]=i,e[18]=a,e[19]=f,e[20]=u):u=e[20],c(u)}function se(n){const e=y.c(21);let s,t,o,r;e[0]!==n?({client:s,toolName:r,toolArguments:o,...t}=n,e[0]=n,e[1]=s,e[2]=t,e[3]=o,e[4]=r):(s=e[1],t=e[2],o=e[3],r=e[4]);let l,i,c;if(e[5]!==s||e[6]!==t||e[7]!==o||e[8]!==r){const m=JSON.stringify(o??{});c=Q,l=t,i=w.mcpToolCall(s,r,m),e[5]=s,e[6]=t,e[7]=o,e[8]=r,e[9]=l,e[10]=i,e[11]=c}else l=e[9],i=e[10],c=e[11];let a;e[12]!==s||e[13]!==o||e[14]!==r?(a=async()=>await s.callTool({name:r,arguments:o}),e[12]=s,e[13]=o,e[14]=r,e[15]=a):a=e[15];const f=t.staleTime??3e4;let u;return e[16]!==l||e[17]!==i||e[18]!==a||e[19]!==f?(u={...l,queryKey:i,queryFn:a,staleTime:f,retry:!1},e[16]=l,e[17]=i,e[18]=a,e[19]=f,e[20]=u):u=e[20],c(u)}function ne(n){const e=y.c(8);let s,t;e[0]!==n?({client:s,...t}=n,e[0]=n,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=async l=>await s.callTool(l),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r={...t,mutationFn:o},e[5]=t,e[6]=o,e[7]=r):r=e[7],I(r)}function k(n,e,s){const t=[];if(n?.trim()){const o=n.trim(),r=s.map(l=>({field:[String(l)],operator:"contains",value:o}));r.length===1&&r[0]?t.push(r[0]):r.length>1&&t.push({operator:"or",conditions:r})}if(e&&e.length>0)for(const o of e)t.push({field:[o.column],operator:"eq",value:o.value});if(t.length!==0)return t.length===1?t[0]:{operator:"and",conditions:t}}function B(n,e,s){const t=n??s,o=e??"asc";return[{field:[String(t)],direction:o}]}function F(n){if(!n||typeof n!="object")throw new Error("Invalid result");if("isError"in n&&n.isError)throw new Error("content"in n&&Array.isArray(n.content)&&n.content[0]?.type==="text"?n.content[0].text:"Unknown error");if("structuredContent"in n)return n.structuredContent;throw new Error("No structured content found")}function U(n){try{return F(n)}catch(e){return console.error(e),null}}function J(n,e,s,t){const o=y.c(13);let r;o[0]!==e?(r=e.toUpperCase(),o[0]=e,o[1]=r):r=o[1];const i=`COLLECTION_${r}_GET`;let c;o[2]!==t||o[3]!==i||o[4]!==s?(c=w.mcpToolCall(t,i,s??""),o[2]=t,o[3]=i,o[4]=s,o[5]=c):c=o[5];let a;o[6]!==t||o[7]!==i||o[8]!==s?(a=async()=>{if(!s)return{item:null};const m=await t.callTool({name:i,arguments:{id:s}});return U(m)},o[6]=t,o[7]=i,o[8]=s,o[9]=a):a=o[9];let f;o[10]!==c||o[11]!==a?(f={queryKey:c,queryFn:a,staleTime:6e4},o[10]=c,o[11]=a,o[12]=f):f=o[12];const{data:u}=P(f);return u?.item??null}function R(n,e,s,t={}){const{searchTerm:o,filters:r,sortKey:l,sortDirection:i,searchFields:c=["title","description"],defaultSortKey:a="updated_at",pageSize:f=100}=t,m=`COLLECTION_${e.toUpperCase()}_LIST`,p=k(o,r,c),g=B(l,i,a),L={...p&&{where:p},...g&&{orderBy:g},limit:f,offset:0},{data:C}=j({client:s,toolName:m,toolArguments:L,select:T=>U(T)?.items??[]});return C}function W(n,e,s){const t=y.c(33),o=D();let r;t[0]!==e?(r=e.toUpperCase(),t[0]=e,t[1]=r):r=t[1];const l=r,i=`COLLECTION_${l}_CREATE`,c=`COLLECTION_${l}_UPDATE`,a=`COLLECTION_${l}_DELETE`;let f;t[2]!==o||t[3]!==l?(f=()=>{o.invalidateQueries({predicate:E=>{const d=E.queryKey;if(d[0]!=="mcp"||d[1]!=="client"||d[3]!=="tool-call")return!1;const _=d[4];return typeof _=="string"&&_.startsWith(`COLLECTION_${l}_`)}})},t[2]=o,t[3]=l,t[4]=f):f=t[4];const u=f;let m;t[5]!==s||t[6]!==i?(m=async E=>{const d=await s.callTool({name:i,arguments:{data:E}});if(d.isError)throw new Error(Array.isArray(d.content)?d.content[0]?.text:String(d.content));return F(d).item},t[5]=s,t[6]=i,t[7]=m):m=t[7];let p;t[8]!==u?(p=()=>{u(),S.success("Item created successfully")},t[8]=u,t[9]=p):p=t[9];let g;t[10]!==m||t[11]!==p?(g={mutationFn:m,onSuccess:p,onError:Y},t[10]=m,t[11]=p,t[12]=g):g=t[12];const L=I(g);let C;t[13]!==s||t[14]!==c?(C=async E=>{const{id:d,data:_}=E,b=await s.callTool({name:c,arguments:{id:d,data:_}});return F(b).item},t[13]=s,t[14]=c,t[15]=C):C=t[15];let T;t[16]!==u?(T=()=>{u(),S.success("Item updated successfully")},t[16]=u,t[17]=T):T=t[17];let h;t[18]!==C||t[19]!==T?(h={mutationFn:C,onSuccess:T,onError:G},t[18]=C,t[19]=T,t[20]=h):h=t[20];const K=I(h);let N;t[21]!==s||t[22]!==a?(N=async E=>{const d=await s.callTool({name:a,arguments:{id:E}});return F(d).item.id},t[21]=s,t[22]=a,t[23]=N):N=t[23];let O;t[24]!==u?(O=()=>{u(),S.success("Item deleted successfully")},t[24]=u,t[25]=O):O=t[25];let $;t[26]!==N||t[27]!==O?($={mutationFn:N,onSuccess:O,onError:z},t[26]=N,t[27]=O,t[28]=$):$=t[28];const A=I($);let q;return t[29]!==L||t[30]!==A||t[31]!==K?(q={create:L,update:K,delete:A},t[29]=L,t[30]=A,t[31]=K,t[32]=q):q=t[32],q}function z(n){const e=n instanceof Error?n.message:String(n);S.error(`Failed to delete item: ${e}`)}function G(n){const e=n instanceof Error?n.message:String(n);S.error(`Failed to update item: ${e}`)}function Y(n){const e=n instanceof Error?n.message:String(n);S.error(`Failed to create item: ${e}`)}function re(n){const e=y.c(4);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const t=s,{org:o}=x();let r;e[2]!==o.id?(r={connectionId:v,orgId:o.id},e[2]=o.id,e[3]=r):r=e[3];const l=M(r);return R(o.id,"CONNECTIONS",l,t)}function le(n){const e=y.c(2),{org:s}=x();let t;e[0]!==s.id?(t={connectionId:v,orgId:s.id},e[0]=s.id,e[1]=t):t=e[1];const o=M(t);return J(s.id,"CONNECTIONS",n,o)}function ie(){const n=y.c(2),{org:e}=x();let s;n[0]!==e.id?(s={connectionId:v,orgId:e.id},n[0]=e.id,n[1]=s):s=n[1];const t=M(s);return W(e.id,"CONNECTIONS",t)}export{J as a,R as b,le as c,ie as d,re as e,j as f,ne as g,se as h,te as i,oe as j,W as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c}from"./index-iT9dC5c9.js";import{u as s,L as a}from"./localstorage-keys-5olAunK8.js";function i(){const e=c.c(4);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=a.decoChatOpen(),e[0]=t):t=e[0];const[n,r]=s(t,m);let o;return e[1]!==n||e[2]!==r?(o=[n,r],e[1]=n,e[2]=r,e[3]=o):o=e[3],o}function m(e){return!!(e??!0)}export{i as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./infiniteQueryObserver-BZOwrkV7.js";import{a1 as i}from"./index-iT9dC5c9.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a1 as u,a4 as s}from"./index-iT9dC5c9.js";function o(e,r){return u(e,s,r)}export{o as u};
|