@decocms/mesh 2.29.2 → 2.29.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BjDAjYli.js → AlertCircle-CNlbeaNO.js} +1 -1
- package/dist/client/assets/{ArrowLeft-C3b0kZkv.js → ArrowLeft-H58XLYPH.js} +1 -1
- package/dist/client/assets/{ArrowUp-UuyzMrp7.js → ArrowUp-C39Etgym.js} +1 -1
- package/dist/client/assets/{Check-BBlt8nj4.js → Check-qyrf_w7u.js} +1 -1
- package/dist/client/assets/{ChevronDown-C2nnNiko.js → ChevronDown-D4EQGXFb.js} +1 -1
- package/dist/client/assets/{Code01-BkX8PbNA.js → Code01-B-sXoUAx.js} +1 -1
- package/dist/client/assets/{Copy01-eVnag3mk.js → Copy01-EV4WWtW9.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-D8Oa-FB4.js → DotsHorizontal-BLQeuj18.js} +1 -1
- package/dist/client/assets/{DotsVertical-Cl1hRwhg.js → DotsVertical-BIgdSuWw.js} +1 -1
- package/dist/client/assets/{Download01-BW7f1rv9.js → Download01-CfIslxub.js} +1 -1
- package/dist/client/assets/{Edit01-C2f_e3xp.js → Edit01-YiEPkU0g.js} +1 -1
- package/dist/client/assets/{File06-D5XMLdKt.js → File06-BOUeu2_s.js} +1 -1
- package/dist/client/assets/{FilterLines-ZY2ZET-V.js → FilterLines-C9-FwG4M.js} +1 -1
- package/dist/client/assets/{FlipBackward-BX_e7PV2.js → FlipBackward-CXUecZqc.js} +1 -1
- package/dist/client/assets/{GitBranch01-BBkuZ0g6.js → GitBranch01-C7TElKX3.js} +1 -1
- package/dist/client/assets/{Grid01-uChhmLMS.js → Grid01-DS_Rpsaf.js} +1 -1
- package/dist/client/assets/{Home02-C3AGNyGt.js → Home02-kWTen2lJ.js} +1 -1
- package/dist/client/assets/{Image01-Ca9fCk1g.js → Image01-C1Gj64FS.js} +1 -1
- package/dist/client/assets/{Inbox01-7yaEdhih.js → Inbox01-BWl9K4GL.js} +1 -1
- package/dist/client/assets/{InfoCircle-ZFVXEe-o.js → InfoCircle-fjnTRxT_.js} +1 -1
- package/dist/client/assets/{Key01-BVzZzDXG.js → Key01-BH9DhJ8d.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DYbIdjWG.js → LinkExternal01-Cu4-40eG.js} +1 -1
- package/dist/client/assets/{List-DTNJ5e_Z.js → List-CMJ7wwXL.js} +1 -1
- package/dist/client/assets/{Loading01-CVbOjnPi.js → Loading01-DlgJ1_45.js} +1 -1
- package/dist/client/assets/{Lock01-Irv7dEl1.js → Lock01-Bc4skRDc.js} +1 -1
- package/dist/client/assets/{Play-el8E8avm.js → Play-By6elSLp.js} +1 -1
- package/dist/client/assets/{Plus-jsBXu2Jm.js → Plus-DtbgAjWY.js} +1 -1
- package/dist/client/assets/{SearchMd-CDx95UHX.js → SearchMd--bzHJ7AO.js} +1 -1
- package/dist/client/assets/{Terminal-C4vz1dQ0.js → Terminal-BVYBaOBz.js} +1 -1
- package/dist/client/assets/{Trash01-hrLLpuYX.js → Trash01-DjLKhTdL.js} +1 -1
- package/dist/client/assets/{Upload01-CdFUIAAb.js → Upload01-Deo1Gmh-.js} +1 -1
- package/dist/client/assets/{X-Bp6jT_CT.js → X-C24Yv1HS.js} +1 -1
- package/dist/client/assets/{XClose-ChfIwjbU.js → XClose-CnH5yMqw.js} +1 -1
- package/dist/client/assets/{agent-detail-BvL0RN-C.js → agent-detail-RPUTUaLt.js} +1 -1
- package/dist/client/assets/{agents-CDU0paf2.js → agents-DLD7xSIr.js} +1 -1
- package/dist/client/assets/{alert-dialog-5F29h7ch.js → alert-dialog-D9F5tffK.js} +1 -1
- package/dist/client/assets/{auth-catchall-BnUTAkiU.js → auth-catchall-CN5idKvS.js} +1 -1
- package/dist/client/assets/{avatar-_fJCi1jf.js → avatar-BZZ8iTNu.js} +1 -1
- package/dist/client/assets/{badge-DIpSEo79.js → badge-Bv6QbUSE.js} +1 -1
- package/dist/client/assets/{binder-QE3BUq_4.js → binder-Co4G2PF6.js} +1 -1
- package/dist/client/assets/{button-BID2CMhP.js → button-Ta3HWdYR.js} +1 -1
- package/dist/client/assets/{card-6juGo41K.js → card-CRtF9cdr.js} +1 -1
- package/dist/client/assets/{checkbox-BR6ZWQcp.js → checkbox-PlWQwQ-Z.js} +1 -1
- package/dist/client/assets/{collection-detail-DdU0S4bC.js → collection-detail-D2KCEX1U.js} +1 -1
- package/dist/client/assets/{collection-display-button-CES97i9G.js → collection-display-button-CQf7wSjn.js} +1 -1
- package/dist/client/assets/{collection-header-C2jCnQ0V.js → collection-header-ebtrK-4-.js} +1 -1
- package/dist/client/assets/{collection-page-DQBRHwuf.js → collection-page-BhBrRtz8.js} +1 -1
- package/dist/client/assets/{collection-search-CYQ70Hoa.js → collection-search-BHs67_UI.js} +1 -1
- package/dist/client/assets/{collection-tab-5E9Q1B_9.js → collection-tab-B2mnSptX.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CVkp-9hJ.js → collection-table-wrapper-3bPS8SS1.js} +1 -1
- package/dist/client/assets/{connection-CzagOXhI.js → connection-C0f0eQA8.js} +1 -1
- package/dist/client/assets/{connection-card-De1P7KUX.js → connection-card-CEKO3io8.js} +1 -1
- package/dist/client/assets/{connection-detail-C6yPmWnc.js → connection-detail-CdPOOjUE.js} +1 -1
- package/dist/client/assets/{connections-JU4CGCz5.js → connections-DiIaCwOD.js} +1 -1
- package/dist/client/assets/constants-7IT_izqz.js +1 -0
- package/dist/client/assets/{create-organization-dialog-DjIYezTr.js → create-organization-dialog-dWwHUnmz.js} +1 -1
- package/dist/client/assets/{dialog-N6lD2G23.js → dialog-DU-St4qJ.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CZuHPcK3.js → dropdown-menu-BbIA2rWH.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-D2QU16mz.js → dynamic-plugin-layout-CvhGXoEg.js} +1 -1
- package/dist/client/assets/{empty-state-aph8hymo.js → empty-state-CSTjcp0X.js} +1 -1
- package/dist/client/assets/{empty-state-B2MmEXSc.js → empty-state-CUODA5WM.js} +1 -1
- package/dist/client/assets/{env-vars-editor-Bw5ArpUL.js → env-vars-editor-D9YuRsdO.js} +1 -1
- package/dist/client/assets/{error-boundary-BSc3aikh.js → error-boundary-DP1kX1Iw.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DsBhcJbM.js → extract-connection-data-D7M4EXYt.js} +1 -1
- package/dist/client/assets/{file-browser-C7oCWAQD.js → file-browser-C9Hg6ohe.js} +2 -2
- package/dist/client/assets/{form-R15NVDAL.js → form-HErbLCwX.js} +1 -1
- package/dist/client/assets/{grid-view-CW_NhGu9.js → grid-view-DvYWkbyi.js} +1 -1
- package/dist/client/assets/{home-QfrULyzV.js → home-CszARX6v.js} +1 -1
- package/dist/client/assets/{index-C0cxXUhv.js → index-B9c3bNyk.js} +5 -5
- package/dist/client/assets/{index-kNWs-Kaj.js → index-D0C0gp7N.js} +1 -1
- package/dist/client/assets/{index-DJuj6s5W.js → index-DE0l5h4l.js} +1 -1
- package/dist/client/assets/{index-wl-vFw7b.js → index-DMxjLEp2.js} +1 -1
- package/dist/client/assets/{index-BfX1PMhV.js → index-SYlc-1Tl.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CzQcKMvF.js → infiniteQueryObserver-DTO2dBsV.js} +1 -1
- package/dist/client/assets/{input-DHdPZHvh.js → input-Dh7sDwu6.js} +1 -1
- package/dist/client/assets/{layout-DVqtFrGe.js → layout-CMBAL9_n.js} +1 -1
- package/dist/client/assets/{localstorage-keys-CySryjw_.js → localstorage-keys-DJR10CLV.js} +1 -1
- package/dist/client/assets/{login-DK-wLmSi.js → login-CgLLYYgm.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C_uVzdje.js → mcp-oauth-Bb9RwQ7y.js} +1 -1
- package/dist/client/assets/{mcp-server-card-utdZ5S32.js → mcp-server-card-3RQV4Klx.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-MhY6fdyG.js → mcp-server-detail-ERiwQuLO.js} +1 -1
- package/dist/client/assets/{members-BM4vbqXY.js → members-COVJZ-4S.js} +1 -1
- package/dist/client/assets/{monaco-editor-Bvv8L85C.js → monaco-editor-9ao1STYz.js} +1 -1
- package/dist/client/assets/{monitoring-CaEhdIcr.js → monitoring-BTGpm-FJ.js} +1 -1
- package/dist/client/assets/{oauth-callback-HFODG9C4.js → oauth-callback-DC00uX2L.js} +1 -1
- package/dist/client/assets/{page-BbtKYCEh.js → page-2qu28FYa.js} +1 -1
- package/dist/client/assets/{page-0IgoQPj0.js → page-CeLSKVJn.js} +1 -1
- package/dist/client/assets/{pin-to-sidebar-button-BTWnJIgz.js → pin-to-sidebar-button-B85FzaKS.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-LAcvmaUO.js → plugin-empty-state-CLZp9CCB.js} +1 -1
- package/dist/client/assets/{plugin-header-CIa7SNC1.js → plugin-header-DlV51u69.js} +1 -1
- package/dist/client/assets/{plugins-Zgv-qqyu.js → plugins-BNlg-adG.js} +1 -1
- package/dist/client/assets/{popover-ffhxj7L9.js → popover-nSqfHOuL.js} +1 -1
- package/dist/client/assets/{project-context-provider-CG5Jt9jX.js → project-context-provider-DJGvA4-w.js} +1 -1
- package/dist/client/assets/{registry-utils-Cqqa8TSE.js → registry-utils-BKwhzouz.js} +1 -1
- package/dist/client/assets/{resizable-e7LRtN-0.js → resizable-CXrT3-gZ.js} +1 -1
- package/dist/client/assets/{resource-tabs-B6SPH4Q6.js → resource-tabs-B7x4zlfW.js} +1 -1
- package/dist/client/assets/{schema-BesiDnBO.js → schema-rISYOzpk.js} +1 -1
- package/dist/client/assets/{select-Cd19OBy8.js → select-DEFdCmMs.js} +1 -1
- package/dist/client/assets/{settings-DgjJ7rwy.js → settings-DwBDaBpc.js} +1 -1
- package/dist/client/assets/{shell-layout-C4m50Amb.js → shell-layout-BGLgMyjW.js} +1 -1
- package/dist/client/assets/{spinner-B3XPkxOB.js → spinner-CO1NH93o.js} +1 -1
- package/dist/client/assets/{switch-rXNPyRWr.js → switch-IXdsAtvF.js} +1 -1
- package/dist/client/assets/{textarea-B0dfI4Xu.js → textarea-BIhbkxfH.js} +1 -1
- package/dist/client/assets/{tool-set-selector-DCV0H2hh.js → tool-set-selector-Cu6h1Zi5.js} +1 -1
- package/dist/client/assets/{tools-list-DcCgeTm7.js → tools-list-DvTDsJWw.js} +1 -1
- package/dist/client/assets/{tooltip-BpIeWmG3.js → tooltip-Bb2oNaYJ.js} +1 -1
- package/dist/client/assets/{typewriter-title-vmu3HKS1.js → typewriter-title-Dm2sjP0K.js} +1 -1
- package/dist/client/assets/{use-binding-CmWOKG-X.js → use-binding-C-jiWM_O.js} +1 -1
- package/dist/client/assets/{use-collections-BRVu5nwP.js → use-collections-BnNAdJQg.js} +1 -1
- package/dist/client/assets/{use-connection-D__nfNf6.js → use-connection-Cpo9FQLA.js} +1 -1
- package/dist/client/assets/{use-connection-resources-CaArMBqO.js → use-connection-resources-Bf67v2HN.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CULFY9tZ.js → use-create-virtual-mcp-B5oK5D73.js} +1 -1
- package/dist/client/assets/{use-list-state-D7wpG1Rh.js → use-list-state-Ck_kabtn.js} +1 -1
- package/dist/client/assets/{use-mcp-DsR0-4yM.js → use-mcp-C4SOdL_A.js} +1 -1
- package/dist/client/assets/{use-members-BTTcGaAb.js → use-members-DKVZHAEo.js} +1 -1
- package/dist/client/assets/{use-mobile-Bw0zGvKx.js → use-mobile-Bb5jBMYm.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DYYG9Qqm.js → use-organization-settings-BksJ8-FR.js} +1 -1
- package/dist/client/assets/{use-tool-call-DdCnWg9K.js → use-tool-call-CDQ4ked9.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-aCxo16E3.js → use-virtual-mcp-CMArCljo.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-system-prompt-Be4EZZHh.js → use-virtual-mcp-system-prompt-CeE5LXb5.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CoW_DO_L.js +1 -0
- package/dist/client/assets/{useMutation-DujnxbMG.js → useMutation-BYfWAlPb.js} +1 -1
- package/dist/client/assets/useQuery-CqMcSUvK.js +1 -0
- package/dist/client/assets/{value-BpSoQ0Q3.js → value-CpF7GK8s.js} +1 -1
- package/dist/client/assets/{view-mode-toggle--WEYRZgf.js → view-mode-toggle-C6P0fGVR.js} +1 -1
- package/dist/client/assets/{workflow-DtxWy1GI.js → workflow-JTUHDWeK.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +137 -137
- package/dist/server/migrate.js +102 -102
- package/dist/server/server.js +111 -111
- package/package.json +1 -1
- package/dist/client/assets/constants-VQyKSexs.js +0 -1
- package/dist/client/assets/useInfiniteQuery-Dee7xpCM.js +0 -1
- package/dist/client/assets/useQuery-CENoGrPp.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as R,c as j,j as i,i as I,bz as $,bA as L,bB as M}from"./index-
|
|
1
|
+
import{r as R,c as j,j as i,i as I,bz as $,bA as L,bB as M}from"./index-B9c3bNyk.js";import{c as f}from"./button-Ta3HWdYR.js";const V=({size:a=24,color:e="currentColor",...s})=>R.createElement("svg",{viewBox:"0 0 24 24",width:a,height:a,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},R.createElement("path",{d:"M20 21c0-1.396 0-2.093-.172-2.661a4 4 0 0 0-2.667-2.667c-.568-.172-1.265-.172-2.661-.172h-5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C4 18.907 4 19.604 4 21M16.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));V.displayName="User01";function O(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx(M,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}function B(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx($,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}function T(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx(L,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}const S=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],W="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function _(a){let e=0;for(let t=0;t<a.length;t++)e=a.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%S.length;return S[s]}const U=I("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-xs font-semibold","2xs":"w-4 h-4 text-xs font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),D=I("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),Z=a=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[a]||e.base};function G(a){const e=j.c(35);let s,t,o,r,n,d,g,l;e[0]!==a?({url:l,fallback:t,shape:r,size:n,objectFit:d,className:s,muted:g,...o}=a,e[0]=a,e[1]=s,e[2]=t,e[3]=o,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,[m,x]=R.useState(!1);let F;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],F=c;break e}F=t}const C=F;let z;e:{if(k){z=W;break e}if(typeof t=="string"){let c;e[11]!==t?(c=_(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=S[0]}const y=z;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const E=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=f(U({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==y||e[23]!==C||e[24]!==E||e[25]!==m||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",y),children:i.jsx(V,{size:Z(h)})}):i.jsxs(i.Fragment,{children:[l&&!m&&i.jsx(B,{src:l,loading:"lazy",alt:"Avatar",className:f(D({objectFit:u})),onError:()=>x(!0)}),(!l||m)&&i.jsx(T,{className:f(y,"rounded-none"),children:C})]}),e[22]=y,e[23]=C,e[24]=E,e[25]=m,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let A;return e[31]!==o||e[32]!==v||e[33]!==w?(A=i.jsx(O,{className:w,...o,children:v}),e[31]=o,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function H(a){const e=j.c(18);let s,t,o,r,n,d,g,l;e[0]!==a?({shape:r,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=a,e[0]=a,e[1]=s,e[2]=t,e[3]=o,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,m=h??"base";let x;return e[9]!==s||e[10]!==t||e[11]!==k||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==m||e[16]!==l?(x=i.jsx(G,{shape:b,url:l,fallback:t,size:m,objectFit:u,className:s,muted:k,...o}),e[9]=s,e[10]=t,e[11]=k,e[12]=u,e[13]=o,e[14]=b,e[15]=m,e[16]=l,e[17]=x):x=e[17],x}H.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(U({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{H as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,j as u,h as l,i as v}from"./index-
|
|
1
|
+
import{c as d,j as u,h as l,i as v}from"./index-B9c3bNyk.js";import{c as g}from"./button-Ta3HWdYR.js";const f=v("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function m(o){const e=d.c(12);let r,s,a,t;e[0]!==o?({className:r,variant:t,asChild:a,...s}=o,e[0]=o,e[1]=r,e[2]=s,e[3]=a,e[4]=t):(r=e[1],s=e[2],a=e[3],t=e[4]);const c=(a===void 0?!1:a)?l:"span";let i;e[5]!==r||e[6]!==t?(i=g(f({variant:t}),r),e[5]=r,e[6]=t,e[7]=i):i=e[7];let n;return e[8]!==c||e[9]!==s||e[10]!==i?(n=u.jsx(c,{"data-slot":"badge",className:i,...s}),e[8]=c,e[9]=s,e[10]=i,e[11]=n):n=e[11],n}export{m as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./index-
|
|
1
|
+
import"./index-B9c3bNyk.js";function a(o){return{isImplementedBy:c=>{for(const e of o){const r=typeof e.name=="string"?new RegExp(`^${e.name}$`):e.name,t=c.find(i=>r.test(i.name));if(!(!t&&e.opt)&&!t)return!1}return!0}}}function s(o,c){const e=o.tools;if(!e||e.length===0)return!1;const r=e.map(n=>({name:n.name,inputSchema:n.inputSchema})),t=c.map(n=>({name:n.name,inputSchema:n.inputSchema,opt:n.opt}));return a(t).isImplementedBy(r)}export{s as a,a as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ax as g,W as u,c as l,j as v,h as b,i as p}from"./index-
|
|
1
|
+
import{ax as g,W as u,c as l,j as v,h as b,i as p}from"./index-B9c3bNyk.js";function x(...a){return g(u(a))}const h=p("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground",brand:"bg-brand-green-light text-brand-green-dark hover:bg-brand-green-light/90"},size:{default:"h-10 px-4 py-2 has-[>svg]:px-3",sm:"h-7 gap-1.5 px-3 has-[>svg]:px-2.5",xs:"h-6 gap-1 px-2 text-xs has-[>svg]:px-1.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-10"}},defaultVariants:{variant:"default",size:"default"}});function k(a){const e=l.c(14);let t,r,s,o,i;e[0]!==a?({className:t,variant:i,size:s,asChild:o,...r}=a,e[0]=a,e[1]=t,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(t=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const c=(o===void 0?!1:o)?b:"button";let n;e[6]!==t||e[7]!==s||e[8]!==i?(n=x(h({variant:i,size:s,className:t})),e[6]=t,e[7]=s,e[8]=i,e[9]=n):n=e[9];let d;return e[10]!==c||e[11]!==r||e[12]!==n?(d=v.jsx(c,{"data-slot":"button",className:n,...r}),e[10]=c,e[11]=r,e[12]=n,e[13]=d):d=e[13],d}export{k as B,h as b,x as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,j as l}from"./index-
|
|
1
|
+
import{c,j as l}from"./index-B9c3bNyk.js";import{c as d}from"./button-Ta3HWdYR.js";function f(a){const e=c.c(8);let r,o;e[0]!==a?({className:r,...o}=a,e[0]=a,e[1]=r,e[2]=o):(r=e[1],o=e[2]);let t;e[3]!==r?(t=d("bg-card text-card-foreground hover:bg-accent/50 flex flex-col gap-6 rounded-xl border border-border/75",r),e[3]=r,e[4]=t):t=e[4];let s;return e[5]!==o||e[6]!==t?(s=l.jsx("div",{"data-slot":"card",className:t,...o}),e[5]=o,e[6]=t,e[7]=s):s=e[7],s}export{f as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,j as c,ay as n,az as l}from"./index-
|
|
1
|
+
import{c as d,j as c,ay as n,az as l}from"./index-B9c3bNyk.js";import{i as m}from"./Check-qyrf_w7u.js";import{c as b}from"./button-Ta3HWdYR.js";function f(o){const e=d.c(9);let r,a;e[0]!==o?({className:r,...a}=o,e[0]=o,e[1]=r,e[2]=a):(r=e[1],a=e[2]);let i;e[3]!==r?(i=b("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",r),e[3]=r,e[4]=i):i=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(l,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==a||e[7]!==i?(s=c.jsx(n,{"data-slot":"checkbox",className:i,...a,children:t}),e[6]=a,e[7]=i,e[8]=s):s=e[8],s}export{f as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ae as X,r as C,y as ns,z as Ze,c as N,j as o,k as at,E as ss,i as os,d as ne,b as rs,t as Zt,H as U,F as is,af as ls,a3 as dt,a6 as Q,a5 as Yt,ag as cs,a8 as ut,ah as as,ai as Qt,a1 as en,aj as ds,ak as us,a4 as tn,al as fs,am as ft,an as ms,ao as ps,ap as xs,a2 as hs,aq as gs,ad as nn}from"./index-C0cxXUhv.js";import{U as le,c as Z}from"./connection-CzagOXhI.js";import{E as sn,I as ze,n as bs}from"./empty-state-aph8hymo.js";import{E as on}from"./error-boundary-BSc3aikh.js";import{u as mt,a as pt}from"./use-collections-BRVu5nwP.js";import{P as xt}from"./pin-to-sidebar-button-BTWnJIgz.js";import{B,c as O}from"./button-BID2CMhP.js";import{F as Ye,a as js,b as ht,d as gt}from"./form-R15NVDAL.js";import{I as bt}from"./input-DHdPZHvh.js";import{T as rt}from"./textarea-B0dfI4Xu.js";import{b as se,T as oe,a as re,c as ie}from"./tooltip-BpIeWmG3.js";import{i as rn}from"./FlipBackward-BX_e7PV2.js";import{a as ln,V as jt,b as ve}from"./layout-DVqtFrGe.js";import{b as vt,u as vs}from"./use-connection-D__nfNf6.js";import{i as ws}from"./AlertCircle-BjDAjYli.js";import{s as ys,M as we}from"./monaco-editor-Bvv8L85C.js";import{i as Ss}from"./Code01-BkX8PbNA.js";import{a as Ns}from"./Copy01-eVnag3mk.js";import{i as _e}from"./Loading01-CVbOjnPi.js";import{i as wt,n as ks}from"./Play-el8E8avm.js";import{s as yt}from"./XClose-ChfIwjbU.js";import{u as Cs,O as Is,M as _s,F as Ts,v as $s}from"./index-DJuj6s5W.js";import{u as St}from"./use-mcp-DsR0-4yM.js";import{E as Nt}from"./empty-state-B2MmEXSc.js";import{D as Es,b as Os}from"./use-binding-CmWOKG-X.js";import{u as Rs}from"./use-virtual-mcp-aCxo16E3.js";import{b as As,R as Wt,a as Ps}from"./resizable-e7LRtN-0.js";import{c as Ms,N as Ls,d as zs,e as Ds,f as Ws,m as Oe,P as Hs,g as Vs,R as Fs,h as Us,j as Bs,k as Ht,E as qs,l as Ks,n as Js,o as Gs,T as Xs,p as cn}from"./index-BfX1PMhV.js";import{d as Zs,b as Ys,a as Qs,c as eo,S as to}from"./select-Cd19OBy8.js";import{S as De}from"./spinner-B3XPkxOB.js";import{V as no}from"./view-mode-toggle--WEYRZgf.js";import{i as so}from"./GitBranch01-BBkuZ0g6.js";import{a as kt,b as Ct}from"./use-tool-call-DdCnWg9K.js";import"./project-context-provider-CG5Jt9jX.js";import{a as oo,D as ro,g as io,f as lo,c as co,d as ao}from"./dialog-N6lD2G23.js";import"./index-kNWs-Kaj.js";import{s as an}from"./Plus-jsBXu2Jm.js";import{i as It}from"./Check-BBlt8nj4.js";import{i as uo}from"./DotsHorizontal-D8Oa-FB4.js";import{b as fo,D as mo,a as po,c as Vt}from"./dropdown-menu-CZuHPcK3.js";import{i as xo}from"./Grid01-uChhmLMS.js";import{B as je}from"./badge-DIpSEo79.js";import{i as dn}from"./X-Bp6jT_CT.js";import"./useMutation-DujnxbMG.js";import"./use-organization-settings-DYYG9Qqm.js";import"./ArrowLeft-C3b0kZkv.js";import"./infiniteQueryObserver-CzQcKMvF.js";import"./mcp-oauth-C_uVzdje.js";import"./schema-BesiDnBO.js";import"./env-vars-editor-Bw5ArpUL.js";import"./Trash01-hrLLpuYX.js";import"./File06-D5XMLdKt.js";import"./Key01-BVzZzDXG.js";import"./extract-connection-data-DsBhcJbM.js";import"./constants-VQyKSexs.js";import"./github-icon-Dp3wHhYE.js";import"./registry-utils-Cqqa8TSE.js";import"./generate-id-Dyweu44Y.js";import"./Terminal-C4vz1dQ0.js";import"./index-wl-vFw7b.js";import"./useQuery-CENoGrPp.js";import"./binder-QE3BUq_4.js";import"./use-virtual-mcp-system-prompt-Be4EZZHh.js";import"./localstorage-keys-CySryjw_.js";import"./popover-ffhxj7L9.js";import"./Image01-Ca9fCk1g.js";import"./SearchMd-CDx95UHX.js";import"./use-create-virtual-mcp-CULFY9tZ.js";import"./ArrowUp-UuyzMrp7.js";import"./ChevronDown-C2nnNiko.js";import"./Edit01-C2f_e3xp.js";import"./well-known-mcp-DOEdYmKO.js";const un=X("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const fn=X("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const _t=X("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Tt=X("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const ho=X("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const go=X("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const mn=X("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const pn=X("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const xn=X("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const hn=X("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const gn=X("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),$t=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"M12 8v4m0 4h.01M2 8.523v6.954c0 .245 0 .367.028.482a1 1 0 0 0 .12.29c.061.1.148.187.32.36l4.923 4.922c.173.173.26.26.36.322.09.054.188.095.29.12.115.027.237.027.482.027h6.954c.245 0 .367 0 .482-.028a.998.998 0 0 0 .29-.12c.1-.061.187-.148.36-.32l4.922-4.923c.173-.173.26-.26.322-.36a.998.998 0 0 0 .12-.29c.027-.115.027-.237.027-.482V8.523c0-.245 0-.367-.028-.482a.998.998 0 0 0-.12-.29c-.061-.1-.148-.187-.32-.36L16.608 2.47c-.173-.173-.26-.26-.36-.322a1 1 0 0 0-.29-.12C15.844 2 15.722 2 15.477 2H8.523c-.245 0-.367 0-.482.028a1 1 0 0 0-.29.12c-.1.061-.187.148-.36.32L2.47 7.392c-.173.173-.26.26-.322.36a1 1 0 0 0-.12.29C2 8.156 2 8.278 2 8.523Z"}));$t.displayName="AlertOctagon";const bn=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"M20.5 8v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.22 21 17.38 21 15.7 21H8.3c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3.5 18.72 3.5 17.88 3.5 16.2V8m.1-5h16.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C22 3.76 22 4.04 22 4.6v1.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C21.24 8 20.96 8 20.4 8H3.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C2 7.24 2 6.96 2 6.4V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C2.76 3 3.04 3 3.6 3Zm6 8.5h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 12.26 16 12.54 16 13.1v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437c-.214.109-.494.109-1.054.109H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 14.74 8 14.46 8 13.9v-.8c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 11.5 9.04 11.5 9.6 11.5Z"}));bn.displayName="Box";const jn=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"m22.7 11.5-2 2-2-2m2.245 1.5A9 9 0 1 0 19 17.657M12 7v5l3 2"}));jn.displayName="ClockFastForward";const vn=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"m17 17 5-5-5-5M7 7l-5 5 5 5m7-14-4 18"}));vn.displayName="Code02";const Re=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"M6.8 3h-.6c-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 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C10 19.48 10 18.92 10 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C8.48 3 7.92 3 6.8 3Zm11 0h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C14 4.52 14 5.08 14 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C15.52 21 16.08 21 17.2 21h.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 3Z"}));Re.displayName="Columns01";const wn=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"M4 4v1.4c0 3.36 0 5.04.654 6.324a6 6 0 0 0 2.622 2.622C8.56 15 10.24 15 13.6 15H20m0 0-5-5m5 5-5 5"}));wn.displayName="CornerDownRight";const yn=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"M21 5c0 1.657-4.03 3-9 3S3 6.657 3 5m18 0c0-1.657-4.03-3-9-3S3 3.343 3 5m18 0v14c0 1.66-4 3-9 3s-9-1.34-9-3V5m18 7c0 1.66-4 3-9 3s-9-1.34-9-3"}));yn.displayName="Database01";const Sn=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"m13 22-3-3m0 0 3-3m-3 3h5a7 7 0 0 0 3-13.326M6 18.326A7 7 0 0 1 9 5h5m0 0-3-3m3 3-3 3"}));Sn.displayName="Repeat03";const Et=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"M15 8H8.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C7 7.24 7 6.96 7 6.4V3m10 18v-6.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C16.24 13 15.96 13 15.4 13H8.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C7 13.76 7 14.04 7 14.6V21M21 9.325V16.2c0 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 3h6.875c.489 0 .733 0 .963.055.204.05.4.13.579.24.201.123.374.296.72.642l3.126 3.126c.346.346.519.519.642.72.11.18.19.374.24.579.055.23.055.474.055.963Z"}));Et.displayName="Save02";const Nn=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"M15.631 7.631c-.396-.396-.594-.594-.668-.822a1 1 0 0 1 0-.618c.074-.228.272-.426.668-.822L18.47 2.53a6 6 0 0 0-8.3 6.895c.12.49.179.734.168.888a.849.849 0 0 1-.11.392c-.07.138-.207.274-.48.547L3.5 17.5a2.121 2.121 0 0 0 3 3l6.248-6.248c.273-.273.41-.41.547-.48a.849.849 0 0 1 .392-.11c.154-.011.399.049.888.168a6 6 0 0 0 6.895-8.3l-2.84 2.84c-.396.396-.594.594-.822.668a1 1 0 0 1-.618 0c-.228-.074-.426-.272-.822-.668l-.738-.738Z"}));Nn.displayName="Tool01";ns({title:Ze().min(1),description:Ze().nullable(),body:Ze()});function Qe(t){for(const e of t.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function bo(){const t=window.location.pathname.split("/").filter(Boolean),e=t.findIndex(s=>s==="mcps"),n=e>=0?t[e+1]:void 0;return n?decodeURIComponent(n):void 0}function jo(t){const e=N.c(13),{form:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=s):s=e[0];let i;e[1]!==n.control?(i=o.jsxs("div",{className:"flex flex-col gap-4",children:[s,o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(Ye,{control:n.control,name:"title",render:yo}),o.jsx(Ye,{control:n.control,name:"description",render:wo})]})]}),e[1]=n.control,e[2]=i):i=e[2];let r,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),l=o.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=l):(r=e[3],l=e[4]);let c;e[5]!==n.control?(c=o.jsxs("div",{className:"flex flex-col gap-2",children:[r,l,o.jsx(Ye,{control:n.control,name:"body",render:vo})]}),e[5]=n.control,e[6]=c):c=e[6];let a;e[7]!==i||e[8]!==c?(a=o.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[i,c]}),e[7]=i,e[8]=c,e[9]=a):a=e[9];let d;return e[10]!==n||e[11]!==a?(d=o.jsx(js,{...n,children:a}),e[10]=n,e[11]=a,e[12]=d):d=e[12],d}function vo(t){const{field:e}=t;return o.jsx(ht,{children:o.jsx(gt,{children:o.jsx(rt,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function wo(t){const{field:e}=t;return o.jsxs(ht,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),o.jsx(gt,{children:o.jsx(bt,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function yo(t){const{field:e}=t;return o.jsxs(ht,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),o.jsx(gt,{children:o.jsx(bt,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function So(t){const e=N.c(51),{providerId:n,promptId:s,onBack:i}=t,l=at().location.href,c=n||le;let a;e[0]!==c?(a=Z(c),e[0]=c,e[1]=a):a=e[1];const d=a,u=mt(n,"PROMPT",s,d),f=pt(n,"PROMPT",d),p=f.update.isPending;let m;e[2]!==u?(m=u?{title:u.title,description:u.description??null,body:Qe(u)}:void 0,e[2]=u,e[3]=m):m=e[3];let x;e[4]!==m?(x={values:m},e[4]=m,e[5]=x):x=e[5];const h=ss(x);let g;e[6]!==h||e[7]!==u?(g=()=>{u&&h.reset({title:u.title,description:u.description??null,body:Qe(u)})},e[6]=h,e[7]=u,e[8]=g):g=e[8];const b=g;let j;e[9]!==f.update||e[10]!==h||e[11]!==s?(j=h.handleSubmit(async W=>{const G=await f.update.mutateAsync({id:s,data:{title:W.title,description:W.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:W.body}}]}});h.reset({title:G.title,description:G.description??null,body:Qe(G)})}),e[9]=f.update,e[10]=h,e[11]=s,e[12]=j):j=e[12];const v=j;if(!u){let W;return e[13]===Symbol.for("react.memo_cache_sentinel")?(W=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(sn,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[13]=W):W=e[13],W}let S;e[14]!==u.title?(S=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:u.title}),e[14]=u.title,e[15]=S):S=e[15];let w;e[16]!==u.description?(w=u.description?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),o.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:u.description})]}):null,e[16]=u.description,e[17]=w):w=e[17];let y;e[18]!==S||e[19]!==w?(y=o.jsx(ln,{children:o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[S,w]})}),e[18]=S,e[19]=w,e[20]=y):y=e[20];let k;e[21]!==u.title||e[22]!==l?(k=o.jsx(xt,{title:u.title,url:l,icon:"description"}),e[21]=u.title,e[22]=l,e[23]=k):k=e[23];const $=!h.formState.isDirty||p;let _;e[24]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(rn,{size:14}),e[24]=_):_=e[24];let R;e[25]!==b||e[26]!==$?(R=o.jsx(se,{asChild:!0,children:o.jsx("span",{className:"inline-block",children:o.jsx(B,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:$,onClick:b,"aria-label":"Cancel",children:_})})}),e[25]=b,e[26]=$,e[27]=R):R=e[27];let A;e[28]===Symbol.for("react.memo_cache_sentinel")?(A=o.jsx(oe,{side:"bottom",children:"Cancel"}),e[28]=A):A=e[28];let P;e[29]!==R?(P=o.jsx(re,{children:o.jsxs(ie,{delayDuration:0,children:[R,A]})}),e[29]=R,e[30]=P):P=e[30];const M=!h.formState.isDirty||p;let z;e[31]!==v?(z=()=>{v()},e[31]=v,e[32]=z):z=e[32];let H;e[33]===Symbol.for("react.memo_cache_sentinel")?(H=o.jsx(Et,{size:14}),e[33]=H):H=e[33];let I;e[34]!==M||e[35]!==z?(I=o.jsx(se,{asChild:!0,children:o.jsx("span",{className:"inline-block",children:o.jsx(B,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:M,onClick:z,"aria-label":"Save",children:H})})}),e[34]=M,e[35]=z,e[36]=I):I=e[36];let E;e[37]===Symbol.for("react.memo_cache_sentinel")?(E=o.jsx(oe,{side:"bottom",children:"Save"}),e[37]=E):E=e[37];let T;e[38]!==I?(T=o.jsx(re,{children:o.jsxs(ie,{delayDuration:0,children:[I,E]})}),e[38]=I,e[39]=T):T=e[39];let L;e[40]!==k||e[41]!==P||e[42]!==T?(L=o.jsxs(jt,{children:[k,P,T]}),e[40]=k,e[41]=P,e[42]=T,e[43]=L):L=e[43];let V;e[44]!==h?(V=o.jsx("div",{className:"h-full",children:o.jsx(jo,{form:h})}),e[44]=h,e[45]=V):V=e[45];let K;return e[46]!==i||e[47]!==L||e[48]!==V||e[49]!==y?(K=o.jsxs(ve,{onBack:i,children:[y,L,V]}),e[46]=i,e[47]=L,e[48]=V,e[49]=y,e[50]=K):K=e[50],K}function No(t){const e=N.c(5),{itemId:n,onBack:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=bo()??le,e[0]=i):i=e[0];const r=i;if(!r||r===le){let c;return e[1]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(sn,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=c):c=e[1],c}let l;return e[2]!==n||e[3]!==s?(l=o.jsx(on,{children:o.jsx(C.Suspense,{fallback:null,children:o.jsx(So,{providerId:r,promptId:n,onBack:s})})}),e[2]=n,e[3]=s,e[4]=l):l=e[4],l}const ko=os("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function Co(t){const e=N.c(10);let n,s,i;e[0]!==t?({className:n,variant:i,...s}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=i):(n=e[1],s=e[2],i=e[3]);let r;e[4]!==n||e[5]!==i?(r=O(ko({variant:i}),n),e[4]=n,e[5]=i,e[6]=r):r=e[6];let l;return e[7]!==s||e[8]!==r?(l=o.jsx("div",{"data-slot":"alert",role:"alert",className:r,...s}),e[7]=s,e[8]=r,e[9]=l):l=e[9],l}function Io(t){const e=N.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=O("line-clamp-1 min-h-4 font-medium tracking-tight",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-title",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}function _o(t){const e=N.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=O("text-muted-foreground leading-relaxed",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-description",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}const To=t=>t.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function $o(t){const e=N.c(13),{toolName:n,connectionId:s,onBack:i}=t,r=`/mcp/${s}`;let l;e[0]!==r?(l=new URL(r,window.location.origin),e[0]=r,e[1]=l):l=e[1];const c=l;let a;e[2]!==s?(a={connectionId:s},e[2]=s,e[3]=a):a=e[3];const d=Cs(a);if(!d.isAuthenticated){let p;return e[4]!==d.supportsOAuth||e[5]!==i?(p=o.jsx("div",{className:"flex h-full items-center justify-center",children:d.supportsOAuth?o.jsx(Is,{onAuthenticate:()=>i(),buttonText:"Go back to authenticate"}):o.jsx(_s,{hasReadme:!1})}),e[4]=d.supportsOAuth,e[5]=i,e[6]=p):p=e[6],p}const u=`${s}:${n}`;let f;return e[7]!==s||e[8]!==c||e[9]!==i||e[10]!==u||e[11]!==n?(f=o.jsx(Eo,{toolName:n,connectionId:s,mcpProxyUrl:c,onBack:i},u),e[7]=s,e[8]=c,e[9]=i,e[10]=u,e[11]=n,e[12]=f):f=e[12],f}function Eo({toolName:t,connectionId:e,mcpProxyUrl:n,onBack:s}){const r=at().location.href,{replayId:l}=rs({strict:!1}),c=(()=>{if(!l)return null;const I=`replay-${l}`,E=sessionStorage.getItem(I);if(!E)return null;sessionStorage.removeItem(I);try{return JSON.parse(E)}catch{return null}})(),a=(()=>{if(!c)return null;const I={};for(const[E,T]of Object.entries(c))T!==null&&typeof T=="object"?I[E]=JSON.stringify(T,null,2):I[E]=T;return I})(),[d,u]=C.useState(a??{}),[f,p]=C.useState(c?JSON.stringify(c,null,2):"{}"),[m,x]=C.useState(null),[h,g]=C.useState(null),[b,j]=C.useState(!1),[v,S]=C.useState(null),w=vt(e),y=St({url:n.href});C.useEffect(()=>{y.error&&console.error("MCP Error:",y.error)},[y.error]);const k=y.tools?.find(I=>I.name===t),$=k?.inputSchema?.properties,_=$?Object.keys($):[],R=_.length>0,A={};if(R&&k?.inputSchema?.properties)for(const I of _)A[I]=k.inputSchema.required?.includes(I)?"":void 0;const P=I=>Object.prototype.hasOwnProperty.call(d,I),M=async()=>{j(!0),g(null),x(null),S(null);const I=performance.now(),E=Z(e);try{const T=R?{...A,...d}:(()=>{const F=f.trim();if(!F)return{};const D=JSON.parse(F);if(D&&typeof D=="object")return D;throw new Error("Raw JSON input must be an object.")})();R&&k?.inputSchema?.properties&&Object.entries(k.inputSchema.properties).forEach(([F,D])=>{if((D.type==="object"||D.type==="array")&&typeof T[F]=="string")try{T[F]=JSON.parse(T[F])}catch{}});const L=await E(t,T),V=performance.now(),K=Math.round(V-I);x(L);const W=JSON.stringify(L),G=new TextEncoder().encode(W).length;S({duration:`${K}ms`,bytes:`${G} bytes`,tokens:`~${Math.ceil(G/4)} tokens`,cost:"$0.0000"})}catch(T){const L=T instanceof Error?T.message:String(T);g(L||"Unknown error occurred");const V=performance.now();S({duration:`${Math.round(V-I)}ms`})}finally{j(!1)}},z=(I,E)=>{u(T=>({...T,[I]:E}))},H=()=>{x(null),g(null),S(null)};return o.jsxs(ve,{onBack:s,children:[o.jsx(jt,{children:o.jsx(xt,{title:k?.name??To(t),url:r,icon:"build"})}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 h-full",children:[o.jsx("div",{className:"flex flex-col border-r border-border overflow-hidden",children:o.jsxs("div",{className:"flex-1 overflow-auto",children:[o.jsx("div",{className:"flex flex-col gap-4 p-6 border-b border-border min-h-28",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(ze,{icon:w?.icon||null,name:w?.title||t,size:"sm",className:"shadow-sm shrink-0"}),o.jsx("h1",{className:"text-lg font-medium text-foreground leading-none",children:t}),o.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit",children:[y.state==="ready"?o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):y.state==="connecting"?o.jsx(_e,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),o.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:y.state.replace("_"," ")})]})]}),o.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:k?.description||"No description available"})]})}),o.jsxs("div",{className:"flex flex-col p-6 gap-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),k?.inputSchema?.required&&k.inputSchema.required.length>0&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),o.jsx("div",{className:"space-y-4",children:R&&k?.inputSchema?.properties?Object.entries(k.inputSchema.properties).map(([I,E])=>o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[I,k.inputSchema?.required?.includes(I)&&o.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),o.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:E.type})]}),E.description&&o.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:E.description}),E.type==="object"||E.type==="array"?o.jsx(rt,{className:"font-mono text-xs",value:P(I)?d[I]??"":A[I]??"",onChange:T=>z(I,T.target.value),placeholder:`Enter ${I} as JSON...`,rows:3}):o.jsx(bt,{value:P(I)?d[I]??"":A[I]??"",onChange:T=>z(I,T.target.value),placeholder:`Enter ${I}...`})]},I)):k?.inputSchema&&!R?o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),o.jsx(rt,{className:"font-mono text-xs min-h-[120px]",value:f,onChange:I=>p(I.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):o.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})})]})]})}),o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-t lg:border-t-0 border-b border-border bg-background",children:[o.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),v&&o.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(ys,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:v.duration})]}),v.tokens&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(bn,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:v.tokens})]}),v.bytes&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(yn,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:v.bytes})]}),v.cost&&o.jsx("div",{className:"flex items-center gap-1.5",children:o.jsx("span",{className:"font-mono text-foreground",children:v.cost})})]})]}),o.jsx("div",{className:"flex items-center justify-end lg:justify-between px-4 h-14 border-b border-border bg-background",children:o.jsxs("div",{className:"flex items-center gap-2 w-full lg:w-auto",children:[o.jsx(B,{size:"sm",variant:"default",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:M,disabled:b,children:b?o.jsxs(o.Fragment,{children:[o.jsx(_e,{size:14,className:"animate-spin"}),"Executing..."]}):o.jsxs(o.Fragment,{children:[o.jsx(wt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})}),o.jsx(re,{children:o.jsxs(ie,{children:[o.jsx(se,{asChild:!0,children:o.jsx(B,{size:"icon",variant:"outline",className:"h-8 w-8 shrink-0",onClick:H,disabled:!m&&!h,children:o.jsx(yt,{size:14})})}),o.jsx(oe,{children:o.jsx("p",{children:"Clear results"})})]})})]})}),h&&o.jsx("div",{className:"px-6 py-4 bg-background",children:o.jsx(Co,{variant:"destructive",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ws,{className:"h-4 w-4"}),o.jsx(Io,{className:"mb-0",children:"Execution Failed"})]}),o.jsx(_o,{className:"text-xs text-destructive",children:h})]})})}),o.jsx("div",{className:"relative flex-1 overflow-auto bg-muted/50",children:m?o.jsxs(o.Fragment,{children:[o.jsx(we,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),o.jsx(B,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),Zt.success("Copied to clipboard")},children:o.jsx(Ns,{className:"h-3.5 w-3.5"})})]}):o.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[o.jsx(Ss,{className:"h-12 w-12 mb-3 opacity-40"}),o.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]})]})]})}function Oo(t){const e=N.c(7),{itemId:n,onBack:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[0]=i):i=e[0];const l=ne(i).connectionId??le;if(!vt(l)){let u;return e[1]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[1]=u):u=e[1],u}let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(_e,{size:32,className:"animate-spin text-muted-foreground"})}),e[2]=a):a=e[2];let d;return e[3]!==l||e[4]!==s||e[5]!==n?(d=o.jsx(C.Suspense,{fallback:a,children:o.jsx($o,{toolName:n,connectionId:l,onBack:s})}),e[3]=l,e[4]=s,e[5]=n,e[6]=d):d=e[6],d}const Ft=t=>{let e;const n=new Set,s=(d,u)=>{const f=typeof d=="function"?d(e):d;if(!Object.is(f,e)){const p=e;e=u??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(m=>m(e,p))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:d=>(n.add(d),()=>n.delete(d))},a=e=t(s,i,c);return c},Ot=(t=>t?Ft(t):Ft),Ro=t=>t;function it(t,e=Ro){const n=U.useSyncExternalStore(t.subscribe,U.useCallback(()=>e(t.getState()),[t,e]),U.useCallback(()=>e(t.getInitialState()),[t,e]));return U.useDebugValue(n),n}const Ao=t=>{const e=Ot(t),n=s=>it(e,s);return Object.assign(n,e),n},Po=(t=>Ao);function kn(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const lt=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return lt(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return lt(s)(n)}}}},Mo=(t,e)=>(n,s,i)=>{let r={storage:kn(()=>localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,d=new Set;let u=r.storage;if(!u)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return u.setItem(r.name,{state:g,version:r.version})},p=i.setState;i.setState=(g,b)=>(p(g,b),f());const m=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>m;let x;const h=()=>{var g,b;if(!u)return;const j=++c;l=!1,a.forEach(S=>{var w;return S((w=s())!=null?w:m)});const v=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:m))||void 0;return lt(u.getItem.bind(u))(r.name).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==r.version){if(r.migrate){const w=r.migrate(S.state,S.version);return w instanceof Promise?w.then(y=>[!0,y]):[!0,w]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,S.state];return[!1,void 0]}).then(S=>{var w;if(j!==c)return;const[y,k]=S;if(x=r.merge(k,(w=s())!=null?w:m),n(x,!0),y)return f()}).then(()=>{j===c&&(v?.(x,void 0),x=s(),l=!0,d.forEach(S=>S(x)))}).catch(S=>{j===c&&v?.(void 0,S)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(u=g.storage)},clearStorage:()=>{u?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(d.add(g),()=>{d.delete(g)})},r.skipHydration||h(),x||m},Cn=Mo,{useSyncExternalStoreWithSelector:Lo}=is,zo=t=>t;function Do(t,e=zo,n){const s=Lo(t.subscribe,t.getState,t.getInitialState,e,n);return U.useDebugValue(s),s}const Ut=t=>Symbol.iterator in t,Bt=t=>"entries"in t,qt=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},Wo=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function Ho(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Ut(t)&&Ut(e)?Bt(t)&&Bt(e)?qt(t,e):Wo(t,e):qt({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Vo(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
|
|
1
|
+
import{ae as X,r as C,y as ns,z as Ze,c as N,j as o,k as at,E as ss,i as os,d as ne,b as rs,t as Zt,H as U,F as is,af as ls,a3 as dt,a6 as Q,a5 as Yt,ag as cs,a8 as ut,ah as as,ai as Qt,a1 as en,aj as ds,ak as us,a4 as tn,al as fs,am as ft,an as ms,ao as ps,ap as xs,a2 as hs,aq as gs,ad as nn}from"./index-B9c3bNyk.js";import{U as le,c as Z}from"./connection-C0f0eQA8.js";import{E as sn,I as ze,n as bs}from"./empty-state-CSTjcp0X.js";import{E as on}from"./error-boundary-DP1kX1Iw.js";import{u as mt,a as pt}from"./use-collections-BnNAdJQg.js";import{P as xt}from"./pin-to-sidebar-button-B85FzaKS.js";import{B,c as O}from"./button-Ta3HWdYR.js";import{F as Ye,a as js,b as ht,d as gt}from"./form-HErbLCwX.js";import{I as bt}from"./input-Dh7sDwu6.js";import{T as rt}from"./textarea-BIhbkxfH.js";import{b as se,T as oe,a as re,c as ie}from"./tooltip-Bb2oNaYJ.js";import{i as rn}from"./FlipBackward-CXUecZqc.js";import{a as ln,V as jt,b as ve}from"./layout-CMBAL9_n.js";import{b as vt,u as vs}from"./use-connection-Cpo9FQLA.js";import{i as ws}from"./AlertCircle-CNlbeaNO.js";import{s as ys,M as we}from"./monaco-editor-9ao1STYz.js";import{i as Ss}from"./Code01-B-sXoUAx.js";import{a as Ns}from"./Copy01-EV4WWtW9.js";import{i as _e}from"./Loading01-DlgJ1_45.js";import{i as wt,n as ks}from"./Play-By6elSLp.js";import{s as yt}from"./XClose-CnH5yMqw.js";import{u as Cs,O as Is,M as _s,F as Ts,v as $s}from"./index-DE0l5h4l.js";import{u as St}from"./use-mcp-C4SOdL_A.js";import{E as Nt}from"./empty-state-CUODA5WM.js";import{D as Es,b as Os}from"./use-binding-C-jiWM_O.js";import{u as Rs}from"./use-virtual-mcp-CMArCljo.js";import{b as As,R as Wt,a as Ps}from"./resizable-CXrT3-gZ.js";import{c as Ms,N as Ls,d as zs,e as Ds,f as Ws,m as Oe,P as Hs,g as Vs,R as Fs,h as Us,j as Bs,k as Ht,E as qs,l as Ks,n as Js,o as Gs,T as Xs,p as cn}from"./index-SYlc-1Tl.js";import{d as Zs,b as Ys,a as Qs,c as eo,S as to}from"./select-DEFdCmMs.js";import{S as De}from"./spinner-CO1NH93o.js";import{V as no}from"./view-mode-toggle-C6P0fGVR.js";import{i as so}from"./GitBranch01-C7TElKX3.js";import{a as kt,b as Ct}from"./use-tool-call-CDQ4ked9.js";import"./project-context-provider-DJGvA4-w.js";import{a as oo,D as ro,g as io,f as lo,c as co,d as ao}from"./dialog-DU-St4qJ.js";import"./index-D0C0gp7N.js";import{s as an}from"./Plus-DtbgAjWY.js";import{i as It}from"./Check-qyrf_w7u.js";import{i as uo}from"./DotsHorizontal-BLQeuj18.js";import{b as fo,D as mo,a as po,c as Vt}from"./dropdown-menu-BbIA2rWH.js";import{i as xo}from"./Grid01-DS_Rpsaf.js";import{B as je}from"./badge-Bv6QbUSE.js";import{i as dn}from"./X-C24Yv1HS.js";import"./useMutation-BYfWAlPb.js";import"./use-organization-settings-BksJ8-FR.js";import"./ArrowLeft-H58XLYPH.js";import"./infiniteQueryObserver-DTO2dBsV.js";import"./mcp-oauth-Bb9RwQ7y.js";import"./schema-rISYOzpk.js";import"./env-vars-editor-D9YuRsdO.js";import"./Trash01-DjLKhTdL.js";import"./File06-BOUeu2_s.js";import"./Key01-BH9DhJ8d.js";import"./extract-connection-data-D7M4EXYt.js";import"./constants-7IT_izqz.js";import"./github-icon-Dp3wHhYE.js";import"./registry-utils-BKwhzouz.js";import"./generate-id-Dyweu44Y.js";import"./Terminal-BVYBaOBz.js";import"./index-DMxjLEp2.js";import"./useQuery-CqMcSUvK.js";import"./binder-Co4G2PF6.js";import"./use-virtual-mcp-system-prompt-CeE5LXb5.js";import"./localstorage-keys-DJR10CLV.js";import"./popover-nSqfHOuL.js";import"./Image01-C1Gj64FS.js";import"./SearchMd--bzHJ7AO.js";import"./use-create-virtual-mcp-B5oK5D73.js";import"./ArrowUp-C39Etgym.js";import"./ChevronDown-D4EQGXFb.js";import"./Edit01-YiEPkU0g.js";import"./well-known-mcp-DOEdYmKO.js";const un=X("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const fn=X("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const _t=X("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Tt=X("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const ho=X("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const go=X("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const mn=X("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const pn=X("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const xn=X("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const hn=X("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const gn=X("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),$t=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"M12 8v4m0 4h.01M2 8.523v6.954c0 .245 0 .367.028.482a1 1 0 0 0 .12.29c.061.1.148.187.32.36l4.923 4.922c.173.173.26.26.36.322.09.054.188.095.29.12.115.027.237.027.482.027h6.954c.245 0 .367 0 .482-.028a.998.998 0 0 0 .29-.12c.1-.061.187-.148.36-.32l4.922-4.923c.173-.173.26-.26.322-.36a.998.998 0 0 0 .12-.29c.027-.115.027-.237.027-.482V8.523c0-.245 0-.367-.028-.482a.998.998 0 0 0-.12-.29c-.061-.1-.148-.187-.32-.36L16.608 2.47c-.173-.173-.26-.26-.36-.322a1 1 0 0 0-.29-.12C15.844 2 15.722 2 15.477 2H8.523c-.245 0-.367 0-.482.028a1 1 0 0 0-.29.12c-.1.061-.187.148-.36.32L2.47 7.392c-.173.173-.26.26-.322.36a1 1 0 0 0-.12.29C2 8.156 2 8.278 2 8.523Z"}));$t.displayName="AlertOctagon";const bn=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"M20.5 8v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.22 21 17.38 21 15.7 21H8.3c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3.5 18.72 3.5 17.88 3.5 16.2V8m.1-5h16.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C22 3.76 22 4.04 22 4.6v1.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C21.24 8 20.96 8 20.4 8H3.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C2 7.24 2 6.96 2 6.4V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C2.76 3 3.04 3 3.6 3Zm6 8.5h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 12.26 16 12.54 16 13.1v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437c-.214.109-.494.109-1.054.109H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 14.74 8 14.46 8 13.9v-.8c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 11.5 9.04 11.5 9.6 11.5Z"}));bn.displayName="Box";const jn=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"m22.7 11.5-2 2-2-2m2.245 1.5A9 9 0 1 0 19 17.657M12 7v5l3 2"}));jn.displayName="ClockFastForward";const vn=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"m17 17 5-5-5-5M7 7l-5 5 5 5m7-14-4 18"}));vn.displayName="Code02";const Re=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"M6.8 3h-.6c-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 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C10 19.48 10 18.92 10 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C8.48 3 7.92 3 6.8 3Zm11 0h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C14 4.52 14 5.08 14 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C15.52 21 16.08 21 17.2 21h.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 3Z"}));Re.displayName="Columns01";const wn=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"M4 4v1.4c0 3.36 0 5.04.654 6.324a6 6 0 0 0 2.622 2.622C8.56 15 10.24 15 13.6 15H20m0 0-5-5m5 5-5 5"}));wn.displayName="CornerDownRight";const yn=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"M21 5c0 1.657-4.03 3-9 3S3 6.657 3 5m18 0c0-1.657-4.03-3-9-3S3 3.343 3 5m18 0v14c0 1.66-4 3-9 3s-9-1.34-9-3V5m18 7c0 1.66-4 3-9 3s-9-1.34-9-3"}));yn.displayName="Database01";const Sn=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"m13 22-3-3m0 0 3-3m-3 3h5a7 7 0 0 0 3-13.326M6 18.326A7 7 0 0 1 9 5h5m0 0-3-3m3 3-3 3"}));Sn.displayName="Repeat03";const Et=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"M15 8H8.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C7 7.24 7 6.96 7 6.4V3m10 18v-6.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C16.24 13 15.96 13 15.4 13H8.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C7 13.76 7 14.04 7 14.6V21M21 9.325V16.2c0 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 3h6.875c.489 0 .733 0 .963.055.204.05.4.13.579.24.201.123.374.296.72.642l3.126 3.126c.346.346.519.519.642.72.11.18.19.374.24.579.055.23.055.474.055.963Z"}));Et.displayName="Save02";const Nn=({size:t=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"M15.631 7.631c-.396-.396-.594-.594-.668-.822a1 1 0 0 1 0-.618c.074-.228.272-.426.668-.822L18.47 2.53a6 6 0 0 0-8.3 6.895c.12.49.179.734.168.888a.849.849 0 0 1-.11.392c-.07.138-.207.274-.48.547L3.5 17.5a2.121 2.121 0 0 0 3 3l6.248-6.248c.273-.273.41-.41.547-.48a.849.849 0 0 1 .392-.11c.154-.011.399.049.888.168a6 6 0 0 0 6.895-8.3l-2.84 2.84c-.396.396-.594.594-.822.668a1 1 0 0 1-.618 0c-.228-.074-.426-.272-.822-.668l-.738-.738Z"}));Nn.displayName="Tool01";ns({title:Ze().min(1),description:Ze().nullable(),body:Ze()});function Qe(t){for(const e of t.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function bo(){const t=window.location.pathname.split("/").filter(Boolean),e=t.findIndex(s=>s==="mcps"),n=e>=0?t[e+1]:void 0;return n?decodeURIComponent(n):void 0}function jo(t){const e=N.c(13),{form:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=s):s=e[0];let i;e[1]!==n.control?(i=o.jsxs("div",{className:"flex flex-col gap-4",children:[s,o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(Ye,{control:n.control,name:"title",render:yo}),o.jsx(Ye,{control:n.control,name:"description",render:wo})]})]}),e[1]=n.control,e[2]=i):i=e[2];let r,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),l=o.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=l):(r=e[3],l=e[4]);let c;e[5]!==n.control?(c=o.jsxs("div",{className:"flex flex-col gap-2",children:[r,l,o.jsx(Ye,{control:n.control,name:"body",render:vo})]}),e[5]=n.control,e[6]=c):c=e[6];let a;e[7]!==i||e[8]!==c?(a=o.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[i,c]}),e[7]=i,e[8]=c,e[9]=a):a=e[9];let d;return e[10]!==n||e[11]!==a?(d=o.jsx(js,{...n,children:a}),e[10]=n,e[11]=a,e[12]=d):d=e[12],d}function vo(t){const{field:e}=t;return o.jsx(ht,{children:o.jsx(gt,{children:o.jsx(rt,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function wo(t){const{field:e}=t;return o.jsxs(ht,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),o.jsx(gt,{children:o.jsx(bt,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function yo(t){const{field:e}=t;return o.jsxs(ht,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),o.jsx(gt,{children:o.jsx(bt,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function So(t){const e=N.c(51),{providerId:n,promptId:s,onBack:i}=t,l=at().location.href,c=n||le;let a;e[0]!==c?(a=Z(c),e[0]=c,e[1]=a):a=e[1];const d=a,u=mt(n,"PROMPT",s,d),f=pt(n,"PROMPT",d),p=f.update.isPending;let m;e[2]!==u?(m=u?{title:u.title,description:u.description??null,body:Qe(u)}:void 0,e[2]=u,e[3]=m):m=e[3];let x;e[4]!==m?(x={values:m},e[4]=m,e[5]=x):x=e[5];const h=ss(x);let g;e[6]!==h||e[7]!==u?(g=()=>{u&&h.reset({title:u.title,description:u.description??null,body:Qe(u)})},e[6]=h,e[7]=u,e[8]=g):g=e[8];const b=g;let j;e[9]!==f.update||e[10]!==h||e[11]!==s?(j=h.handleSubmit(async W=>{const G=await f.update.mutateAsync({id:s,data:{title:W.title,description:W.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:W.body}}]}});h.reset({title:G.title,description:G.description??null,body:Qe(G)})}),e[9]=f.update,e[10]=h,e[11]=s,e[12]=j):j=e[12];const v=j;if(!u){let W;return e[13]===Symbol.for("react.memo_cache_sentinel")?(W=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(sn,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[13]=W):W=e[13],W}let S;e[14]!==u.title?(S=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:u.title}),e[14]=u.title,e[15]=S):S=e[15];let w;e[16]!==u.description?(w=u.description?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),o.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:u.description})]}):null,e[16]=u.description,e[17]=w):w=e[17];let y;e[18]!==S||e[19]!==w?(y=o.jsx(ln,{children:o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[S,w]})}),e[18]=S,e[19]=w,e[20]=y):y=e[20];let k;e[21]!==u.title||e[22]!==l?(k=o.jsx(xt,{title:u.title,url:l,icon:"description"}),e[21]=u.title,e[22]=l,e[23]=k):k=e[23];const $=!h.formState.isDirty||p;let _;e[24]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(rn,{size:14}),e[24]=_):_=e[24];let R;e[25]!==b||e[26]!==$?(R=o.jsx(se,{asChild:!0,children:o.jsx("span",{className:"inline-block",children:o.jsx(B,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:$,onClick:b,"aria-label":"Cancel",children:_})})}),e[25]=b,e[26]=$,e[27]=R):R=e[27];let A;e[28]===Symbol.for("react.memo_cache_sentinel")?(A=o.jsx(oe,{side:"bottom",children:"Cancel"}),e[28]=A):A=e[28];let P;e[29]!==R?(P=o.jsx(re,{children:o.jsxs(ie,{delayDuration:0,children:[R,A]})}),e[29]=R,e[30]=P):P=e[30];const M=!h.formState.isDirty||p;let z;e[31]!==v?(z=()=>{v()},e[31]=v,e[32]=z):z=e[32];let H;e[33]===Symbol.for("react.memo_cache_sentinel")?(H=o.jsx(Et,{size:14}),e[33]=H):H=e[33];let I;e[34]!==M||e[35]!==z?(I=o.jsx(se,{asChild:!0,children:o.jsx("span",{className:"inline-block",children:o.jsx(B,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:M,onClick:z,"aria-label":"Save",children:H})})}),e[34]=M,e[35]=z,e[36]=I):I=e[36];let E;e[37]===Symbol.for("react.memo_cache_sentinel")?(E=o.jsx(oe,{side:"bottom",children:"Save"}),e[37]=E):E=e[37];let T;e[38]!==I?(T=o.jsx(re,{children:o.jsxs(ie,{delayDuration:0,children:[I,E]})}),e[38]=I,e[39]=T):T=e[39];let L;e[40]!==k||e[41]!==P||e[42]!==T?(L=o.jsxs(jt,{children:[k,P,T]}),e[40]=k,e[41]=P,e[42]=T,e[43]=L):L=e[43];let V;e[44]!==h?(V=o.jsx("div",{className:"h-full",children:o.jsx(jo,{form:h})}),e[44]=h,e[45]=V):V=e[45];let K;return e[46]!==i||e[47]!==L||e[48]!==V||e[49]!==y?(K=o.jsxs(ve,{onBack:i,children:[y,L,V]}),e[46]=i,e[47]=L,e[48]=V,e[49]=y,e[50]=K):K=e[50],K}function No(t){const e=N.c(5),{itemId:n,onBack:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=bo()??le,e[0]=i):i=e[0];const r=i;if(!r||r===le){let c;return e[1]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(sn,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=c):c=e[1],c}let l;return e[2]!==n||e[3]!==s?(l=o.jsx(on,{children:o.jsx(C.Suspense,{fallback:null,children:o.jsx(So,{providerId:r,promptId:n,onBack:s})})}),e[2]=n,e[3]=s,e[4]=l):l=e[4],l}const ko=os("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function Co(t){const e=N.c(10);let n,s,i;e[0]!==t?({className:n,variant:i,...s}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=i):(n=e[1],s=e[2],i=e[3]);let r;e[4]!==n||e[5]!==i?(r=O(ko({variant:i}),n),e[4]=n,e[5]=i,e[6]=r):r=e[6];let l;return e[7]!==s||e[8]!==r?(l=o.jsx("div",{"data-slot":"alert",role:"alert",className:r,...s}),e[7]=s,e[8]=r,e[9]=l):l=e[9],l}function Io(t){const e=N.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=O("line-clamp-1 min-h-4 font-medium tracking-tight",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-title",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}function _o(t){const e=N.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=O("text-muted-foreground leading-relaxed",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-description",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}const To=t=>t.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function $o(t){const e=N.c(13),{toolName:n,connectionId:s,onBack:i}=t,r=`/mcp/${s}`;let l;e[0]!==r?(l=new URL(r,window.location.origin),e[0]=r,e[1]=l):l=e[1];const c=l;let a;e[2]!==s?(a={connectionId:s},e[2]=s,e[3]=a):a=e[3];const d=Cs(a);if(!d.isAuthenticated){let p;return e[4]!==d.supportsOAuth||e[5]!==i?(p=o.jsx("div",{className:"flex h-full items-center justify-center",children:d.supportsOAuth?o.jsx(Is,{onAuthenticate:()=>i(),buttonText:"Go back to authenticate"}):o.jsx(_s,{hasReadme:!1})}),e[4]=d.supportsOAuth,e[5]=i,e[6]=p):p=e[6],p}const u=`${s}:${n}`;let f;return e[7]!==s||e[8]!==c||e[9]!==i||e[10]!==u||e[11]!==n?(f=o.jsx(Eo,{toolName:n,connectionId:s,mcpProxyUrl:c,onBack:i},u),e[7]=s,e[8]=c,e[9]=i,e[10]=u,e[11]=n,e[12]=f):f=e[12],f}function Eo({toolName:t,connectionId:e,mcpProxyUrl:n,onBack:s}){const r=at().location.href,{replayId:l}=rs({strict:!1}),c=(()=>{if(!l)return null;const I=`replay-${l}`,E=sessionStorage.getItem(I);if(!E)return null;sessionStorage.removeItem(I);try{return JSON.parse(E)}catch{return null}})(),a=(()=>{if(!c)return null;const I={};for(const[E,T]of Object.entries(c))T!==null&&typeof T=="object"?I[E]=JSON.stringify(T,null,2):I[E]=T;return I})(),[d,u]=C.useState(a??{}),[f,p]=C.useState(c?JSON.stringify(c,null,2):"{}"),[m,x]=C.useState(null),[h,g]=C.useState(null),[b,j]=C.useState(!1),[v,S]=C.useState(null),w=vt(e),y=St({url:n.href});C.useEffect(()=>{y.error&&console.error("MCP Error:",y.error)},[y.error]);const k=y.tools?.find(I=>I.name===t),$=k?.inputSchema?.properties,_=$?Object.keys($):[],R=_.length>0,A={};if(R&&k?.inputSchema?.properties)for(const I of _)A[I]=k.inputSchema.required?.includes(I)?"":void 0;const P=I=>Object.prototype.hasOwnProperty.call(d,I),M=async()=>{j(!0),g(null),x(null),S(null);const I=performance.now(),E=Z(e);try{const T=R?{...A,...d}:(()=>{const F=f.trim();if(!F)return{};const D=JSON.parse(F);if(D&&typeof D=="object")return D;throw new Error("Raw JSON input must be an object.")})();R&&k?.inputSchema?.properties&&Object.entries(k.inputSchema.properties).forEach(([F,D])=>{if((D.type==="object"||D.type==="array")&&typeof T[F]=="string")try{T[F]=JSON.parse(T[F])}catch{}});const L=await E(t,T),V=performance.now(),K=Math.round(V-I);x(L);const W=JSON.stringify(L),G=new TextEncoder().encode(W).length;S({duration:`${K}ms`,bytes:`${G} bytes`,tokens:`~${Math.ceil(G/4)} tokens`,cost:"$0.0000"})}catch(T){const L=T instanceof Error?T.message:String(T);g(L||"Unknown error occurred");const V=performance.now();S({duration:`${Math.round(V-I)}ms`})}finally{j(!1)}},z=(I,E)=>{u(T=>({...T,[I]:E}))},H=()=>{x(null),g(null),S(null)};return o.jsxs(ve,{onBack:s,children:[o.jsx(jt,{children:o.jsx(xt,{title:k?.name??To(t),url:r,icon:"build"})}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 h-full",children:[o.jsx("div",{className:"flex flex-col border-r border-border overflow-hidden",children:o.jsxs("div",{className:"flex-1 overflow-auto",children:[o.jsx("div",{className:"flex flex-col gap-4 p-6 border-b border-border min-h-28",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(ze,{icon:w?.icon||null,name:w?.title||t,size:"sm",className:"shadow-sm shrink-0"}),o.jsx("h1",{className:"text-lg font-medium text-foreground leading-none",children:t}),o.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit",children:[y.state==="ready"?o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):y.state==="connecting"?o.jsx(_e,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),o.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:y.state.replace("_"," ")})]})]}),o.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:k?.description||"No description available"})]})}),o.jsxs("div",{className:"flex flex-col p-6 gap-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),k?.inputSchema?.required&&k.inputSchema.required.length>0&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),o.jsx("div",{className:"space-y-4",children:R&&k?.inputSchema?.properties?Object.entries(k.inputSchema.properties).map(([I,E])=>o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[I,k.inputSchema?.required?.includes(I)&&o.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),o.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:E.type})]}),E.description&&o.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:E.description}),E.type==="object"||E.type==="array"?o.jsx(rt,{className:"font-mono text-xs",value:P(I)?d[I]??"":A[I]??"",onChange:T=>z(I,T.target.value),placeholder:`Enter ${I} as JSON...`,rows:3}):o.jsx(bt,{value:P(I)?d[I]??"":A[I]??"",onChange:T=>z(I,T.target.value),placeholder:`Enter ${I}...`})]},I)):k?.inputSchema&&!R?o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),o.jsx(rt,{className:"font-mono text-xs min-h-[120px]",value:f,onChange:I=>p(I.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):o.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})})]})]})}),o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-t lg:border-t-0 border-b border-border bg-background",children:[o.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),v&&o.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(ys,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:v.duration})]}),v.tokens&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(bn,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:v.tokens})]}),v.bytes&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(yn,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:v.bytes})]}),v.cost&&o.jsx("div",{className:"flex items-center gap-1.5",children:o.jsx("span",{className:"font-mono text-foreground",children:v.cost})})]})]}),o.jsx("div",{className:"flex items-center justify-end lg:justify-between px-4 h-14 border-b border-border bg-background",children:o.jsxs("div",{className:"flex items-center gap-2 w-full lg:w-auto",children:[o.jsx(B,{size:"sm",variant:"default",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:M,disabled:b,children:b?o.jsxs(o.Fragment,{children:[o.jsx(_e,{size:14,className:"animate-spin"}),"Executing..."]}):o.jsxs(o.Fragment,{children:[o.jsx(wt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})}),o.jsx(re,{children:o.jsxs(ie,{children:[o.jsx(se,{asChild:!0,children:o.jsx(B,{size:"icon",variant:"outline",className:"h-8 w-8 shrink-0",onClick:H,disabled:!m&&!h,children:o.jsx(yt,{size:14})})}),o.jsx(oe,{children:o.jsx("p",{children:"Clear results"})})]})})]})}),h&&o.jsx("div",{className:"px-6 py-4 bg-background",children:o.jsx(Co,{variant:"destructive",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ws,{className:"h-4 w-4"}),o.jsx(Io,{className:"mb-0",children:"Execution Failed"})]}),o.jsx(_o,{className:"text-xs text-destructive",children:h})]})})}),o.jsx("div",{className:"relative flex-1 overflow-auto bg-muted/50",children:m?o.jsxs(o.Fragment,{children:[o.jsx(we,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),o.jsx(B,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),Zt.success("Copied to clipboard")},children:o.jsx(Ns,{className:"h-3.5 w-3.5"})})]}):o.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[o.jsx(Ss,{className:"h-12 w-12 mb-3 opacity-40"}),o.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]})]})]})}function Oo(t){const e=N.c(7),{itemId:n,onBack:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[0]=i):i=e[0];const l=ne(i).connectionId??le;if(!vt(l)){let u;return e[1]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[1]=u):u=e[1],u}let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(_e,{size:32,className:"animate-spin text-muted-foreground"})}),e[2]=a):a=e[2];let d;return e[3]!==l||e[4]!==s||e[5]!==n?(d=o.jsx(C.Suspense,{fallback:a,children:o.jsx($o,{toolName:n,connectionId:l,onBack:s})}),e[3]=l,e[4]=s,e[5]=n,e[6]=d):d=e[6],d}const Ft=t=>{let e;const n=new Set,s=(d,u)=>{const f=typeof d=="function"?d(e):d;if(!Object.is(f,e)){const p=e;e=u??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(m=>m(e,p))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:d=>(n.add(d),()=>n.delete(d))},a=e=t(s,i,c);return c},Ot=(t=>t?Ft(t):Ft),Ro=t=>t;function it(t,e=Ro){const n=U.useSyncExternalStore(t.subscribe,U.useCallback(()=>e(t.getState()),[t,e]),U.useCallback(()=>e(t.getInitialState()),[t,e]));return U.useDebugValue(n),n}const Ao=t=>{const e=Ot(t),n=s=>it(e,s);return Object.assign(n,e),n},Po=(t=>Ao);function kn(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const lt=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return lt(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return lt(s)(n)}}}},Mo=(t,e)=>(n,s,i)=>{let r={storage:kn(()=>localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,d=new Set;let u=r.storage;if(!u)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return u.setItem(r.name,{state:g,version:r.version})},p=i.setState;i.setState=(g,b)=>(p(g,b),f());const m=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>m;let x;const h=()=>{var g,b;if(!u)return;const j=++c;l=!1,a.forEach(S=>{var w;return S((w=s())!=null?w:m)});const v=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:m))||void 0;return lt(u.getItem.bind(u))(r.name).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==r.version){if(r.migrate){const w=r.migrate(S.state,S.version);return w instanceof Promise?w.then(y=>[!0,y]):[!0,w]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,S.state];return[!1,void 0]}).then(S=>{var w;if(j!==c)return;const[y,k]=S;if(x=r.merge(k,(w=s())!=null?w:m),n(x,!0),y)return f()}).then(()=>{j===c&&(v?.(x,void 0),x=s(),l=!0,d.forEach(S=>S(x)))}).catch(S=>{j===c&&v?.(void 0,S)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(u=g.storage)},clearStorage:()=>{u?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(d.add(g),()=>{d.delete(g)})},r.skipHydration||h(),x||m},Cn=Mo,{useSyncExternalStoreWithSelector:Lo}=is,zo=t=>t;function Do(t,e=zo,n){const s=Lo(t.subscribe,t.getState,t.getInitialState,e,n);return U.useDebugValue(s),s}const Ut=t=>Symbol.iterator in t,Bt=t=>"entries"in t,qt=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},Wo=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function Ho(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Ut(t)&&Ut(e)?Bt(t)&&Bt(e)?qt(t,e):Wo(t,e):qt({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Vo(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
|
|
2
2
|
${Object.entries(l).map(([d,u])=>{const f=c.has(d)?"":"?";return`${u.description?` /** ${u.description} */
|
|
3
3
|
`:""} ${d}${f}: ${n(u)};`}).join(`
|
|
4
4
|
`)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as j,c as k,j as s}from"./index-
|
|
1
|
+
import{r as j,c as k,j as s}from"./index-B9c3bNyk.js";import{c as N,B as C}from"./button-Ta3HWdYR.js";import{c as y,D as M,b as z,a as D}from"./dropdown-menu-BbIA2rWH.js";import{i as S}from"./ArrowUp-C39Etgym.js";import{i as T}from"./Check-qyrf_w7u.js";import{c as E}from"./Grid01-DS_Rpsaf.js";import{i as V}from"./List-CMJ7wwXL.js";import{a as _,c as B,b as L,T as $}from"./tooltip-Bb2oNaYJ.js";import{V as W}from"./view-mode-toggle-C6P0fGVR.js";const w=({size:r=24,color:e="currentColor",...o})=>j.createElement("svg",{viewBox:"0 0 24 24",width:r,height:r,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},j.createElement("path",{d:"M12 5v14m0 0 7-7m-7 7-7-7"}));w.displayName="ArrowDown";const b=({size:r=24,color:e="currentColor",...o})=>j.createElement("svg",{viewBox:"0 0 24 24",width:r,height:r,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},j.createElement("path",{d:"M5 21v-7m0-4V3m7 18v-9m0-4V3m7 18v-5m0-4V3M2 14h6m1-6h6m1 8h6"}));b.displayName="Sliders01";function H(r){const e=k.c(16),{viewMode:o,onViewModeChange:g,sortKey:v,sortDirection:n,onSort:l,sortOptions:a}=r;let c;e[0]!==a?(c=a===void 0?[]:a,e[0]=a,e[1]=c):c=e[1];const d=c;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(_,{children:s.jsxs(B,{children:[s.jsx(L,{asChild:!0,children:s.jsx(M,{asChild:!0,children:s.jsx(C,{variant:"outline",size:"icon",className:"size-7 border border-input",children:s.jsx(b,{size:16})})})}),s.jsx($,{children:"Search filters"})]})}),e[2]=m):m=e[2];let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p={value:"table",icon:s.jsx(V,{})},e[3]=p):p=e[3];let h;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=[p,{value:"cards",icon:s.jsx(E,{})}],e[4]=h):h=e[4];let t;e[5]!==g||e[6]!==o?(t=s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(W,{value:o,onValueChange:g,fullWidth:!0,options:h})}),e[5]=g,e[6]=o,e[7]=t):t=e[7];let i;e[8]!==l||e[9]!==n||e[10]!==v||e[11]!==d?(i=d.length>0&&l&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),d.map(u=>{const f=v===u.id;return s.jsx(y,{onClick:()=>l(u.id),className:N("h-8 px-2 py-0 cursor-pointer",f&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[f&&s.jsx(T,{size:16,className:"text-foreground shrink-0"}),!f&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:u.label}),f&&n&&(n==="asc"?s.jsx(S,{size:16,className:"text-foreground shrink-0"}):s.jsx(w,{size:16,className:"text-foreground shrink-0"}))]})},u.id)})]}),e[8]=l,e[9]=n,e[10]=v,e[11]=d,e[12]=i):i=e[12];let x;return e[13]!==t||e[14]!==i?(x=s.jsxs(z,{children:[m,s.jsxs(D,{align:"end",className:"w-[200px] p-0 gap-0",children:[t,i]})]}),e[13]=t,e[14]=i,e[15]=x):x=e[15],x}export{H as C,w as n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,j as l}from"./index-
|
|
1
|
+
import{c as v,j as l}from"./index-B9c3bNyk.js";import{C as b}from"./collection-display-button-CQf7wSjn.js";function w(g){const e=v.c(20),{title:r,viewMode:n,onViewModeChange:c,sortKey:f,sortDirection:x,onSort:p,sortOptions:a,ctaButton:h,leftElement:u}=g;let m;e[0]!==a?(m=a===void 0?[]:a,e[0]=a,e[1]=m):m=e[1];const j=m;let t;e[2]!==r?(t=typeof r=="string"?l.jsx("h1",{className:"text-sm font-medium text-foreground",children:r}):r,e[2]=r,e[3]=t):t=e[3];let s;e[4]!==u||e[5]!==t?(s=l.jsxs("div",{className:"flex items-center gap-2",children:[u,t]}),e[4]=u,e[5]=t,e[6]=s):s=e[6];let i;e[7]!==p||e[8]!==c||e[9]!==x||e[10]!==f||e[11]!==j||e[12]!==n?(i=n&&c&&l.jsx(b,{viewMode:n,onViewModeChange:c,sortKey:f,sortDirection:x,onSort:p,sortOptions:j}),e[7]=p,e[8]=c,e[9]=x,e[10]=f,e[11]=j,e[12]=n,e[13]=i):i=e[13];let o;e[14]!==h||e[15]!==i?(o=l.jsxs("div",{className:"flex items-center gap-2",children:[i,h]}),e[14]=h,e[15]=i,e[16]=o):o=e[16];let d;return e[17]!==s||e[18]!==o?(d=l.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:l.jsxs("div",{className:"flex items-center justify-between gap-3 h-12 px-4",children:[s,o]})}),e[17]=s,e[18]=o,e[19]=d):d=e[19],d}export{w as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,j as c}from"./index-
|
|
1
|
+
import{c as s,j as c}from"./index-B9c3bNyk.js";function r(t){const e=s.c(2),{children:l}=t;let o;return e[0]!==l?(o=c.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden",children:l}),e[0]=l,e[1]=o):o=e[1],o}export{r as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,j as a}from"./index-
|
|
1
|
+
import{c as g,j as a}from"./index-B9c3bNyk.js";import{i as b}from"./Loading01-DlgJ1_45.js";import{i as j}from"./SearchMd--bzHJ7AO.js";import{I as N}from"./input-Dh7sDwu6.js";import{c as v}from"./button-Ta3HWdYR.js";function E(h){const e=g.c(17),{value:n,onChange:c,placeholder:x,onKeyDown:m,className:f,isSearching:d}=h,p=x===void 0?"Search...":x;let s;e[0]!==f?(s=v("shrink-0 w-full border-b border-border h-12",f),e[0]=f,e[1]=s):s=e[1];let t;e[2]!==d?(t=d?a.jsx(b,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):a.jsx(j,{size:16,className:"text-muted-foreground shrink-0"}),e[2]=d,e[3]=t):t=e[3];let r;e[4]!==c?(r=u=>c(u.target.value),e[4]=c,e[5]=r):r=e[5];let o;e[6]!==m||e[7]!==p||e[8]!==r||e[9]!==n?(o=a.jsx(N,{value:n,onChange:r,onKeyDown:m,placeholder:p,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"}),e[6]=m,e[7]=p,e[8]=r,e[9]=n,e[10]=o):o=e[10];let l;e[11]!==t||e[12]!==o?(l=a.jsxs("label",{className:"flex items-center gap-2.5 h-12 px-4 cursor-text",children:[t,o]}),e[11]=t,e[12]=o,e[13]=l):l=e[13];let i;return e[14]!==s||e[15]!==l?(i=a.jsx("div",{className:s,children:l}),e[14]=s,e[15]=l,e[16]=i):i=e[16],i}export{E as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as ne,j as t,K as nt,f as lt,k as rt,a as at,r as ct,t as dt}from"./index-C0cxXUhv.js";import{g as Me}from"./generate-id-Dyweu44Y.js";import{c as Re}from"./connection-CzagOXhI.js";import{C as Ve}from"./collection-display-button-CES97i9G.js";import{C as mt}from"./collection-search-CYQ70Hoa.js";import{C as ft}from"./card-6juGo41K.js";import{I as qe,E as ut}from"./empty-state-aph8hymo.js";import{b as Ge,D as We,a as He,c as F}from"./dropdown-menu-CZuHPcK3.js";import{B as ke,c as ze}from"./button-BID2CMhP.js";import{a as Je}from"./Copy01-eVnag3mk.js";import{i as Qe}from"./DotsVertical-Cl1hRwhg.js";import{i as Ye}from"./Edit01-C2f_e3xp.js";import{s as Xe,u as pt}from"./use-list-state-D7wpG1Rh.js";import{s as Ze}from"./Trash01-hrLLpuYX.js";import{C as ht}from"./collection-table-wrapper-CVkp-9hJ.js";import{E as Ue}from"./empty-state-B2MmEXSc.js";import{n as Be}from"./Inbox01-7yaEdhih.js";import{A as Oe}from"./avatar-_fJCi1jf.js";import{u as xt}from"./useQuery-CENoGrPp.js";import{P as gt}from"./pin-to-sidebar-button-BTWnJIgz.js";import{b as jt}from"./use-connection-D__nfNf6.js";import{a as Ct,b as vt}from"./use-collections-BRVu5nwP.js";import{B as bt}from"./constants-VQyKSexs.js";import{A as yt,g as Nt,c as wt,b as St,d as _t,e as Dt,a as At,f as Tt}from"./alert-dialog-5F29h7ch.js";import{s as It}from"./Plus-jsBXu2Jm.js";import{V as Pt}from"./layout-DVqtFrGe.js";function $t(n,e){const s=n.properties||{};for(const o in s){const l=s[o];if(l&&l.type==="string"&&(l.format==="url"||l.format==="uri")&&e&&typeof e=="object"&&o in e&&e[o])return e[o]}const d=["image","img","avatar","icon","logo","thumbnail","cover"];for(const o of d)if(e&&typeof e=="object"&&o in e&&typeof e[o]=="string")return e[o]}function Et(n){const e=ne.c(25),{item:s,schema:d,actions:o}=n;let l;e[0]!==s||e[1]!==d?(l=$t(d,s),e[0]=s,e[1]=d,e[2]=l):l=e[2];const a=l,c=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let f;e[3]!==o?(f=o&&Object.keys(o).length>0,e[3]=o,e[4]=f):f=e[4];const i=f;let u;e[5]!==a||e[6]!==s.title?(u=t.jsx(qe,{icon:a,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=a,e[6]=s.title,e[7]=u):u=e[7];let j;e[8]!==s.title?(j=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=j):j=e[9];const h=c||"No description";let m;e[10]!==h?(m=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:h}),e[10]=h,e[11]=m):m=e[11];let x;e[12]!==j||e[13]!==m?(x=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[j,m]}),e[12]=j,e[13]=m,e[14]=x):x=e[14];let y;e[15]!==u||e[16]!==x?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[u,x]}),e[15]=u,e[16]=x,e[17]=y):y=e[17];let C;e[18]!==o||e[19]!==i||e[20]!==s?(C=i&&t.jsx("div",{className:"absolute top-6 right-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:Ft,onMouseDown:kt,children:t.jsxs(Ge,{children:[t.jsx(We,{asChild:!0,children:t.jsx(ke,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:Ot,children:t.jsx(Qe,{size:20})})}),t.jsxs(He,{align:"end",onClick:zt,children:[o.open&&t.jsxs(F,{onClick:r=>{r.stopPropagation(),o.open?.(s)},children:[t.jsx(Xe,{size:16}),"Open"]}),o.edit&&t.jsxs(F,{onClick:r=>{r.stopPropagation(),o.edit?.(s)},children:[t.jsx(Ye,{size:16}),"Edit"]}),o.duplicate&&t.jsxs(F,{onClick:r=>{r.stopPropagation(),o.duplicate?.(s)},children:[t.jsx(Je,{size:16}),"Duplicate"]}),o.delete&&t.jsxs(F,{variant:"destructive",onClick:r=>{r.stopPropagation(),o.delete?.(s)},children:[t.jsx(Ze,{size:16}),"Delete"]})]})]})}),e[18]=o,e[19]=i,e[20]=s,e[21]=C):C=e[21];let S;return e[22]!==y||e[23]!==C?(S=t.jsxs(ft,{className:"cursor-pointer transition-colors h-full flex flex-col group relative",children:[y,C]}),e[22]=y,e[23]=C,e[24]=S):S=e[24],S}function zt(n){return n.stopPropagation()}function Ot(n){return n.stopPropagation()}function kt(n){return n.stopPropagation()}function Ft(n){return n.stopPropagation()}function Kt(n){const e=ne.c(9);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=Re(),e[0]=s):s=e[0];const d=s;let o;e[1]!==n?(o=nt.user(n),e[1]=n,e[2]=o):o=e[2];let l;e[3]!==n?(l=async()=>(await d("USER_GET",{id:n})).user,e[3]=n,e[4]=l):l=e[4];const a=!!n;let c;return e[5]!==o||e[6]!==l||e[7]!==a?(c={queryKey:o,queryFn:l,staleTime:3e5,retry:1,enabled:a},e[5]=o,e[6]=l,e[7]=a,e[8]=c):c=e[8],xt(c)}function Mt(n){const e=ne.c(39),{id:s,size:d,showEmail:o,className:l}=n,a=d===void 0?"xs":d,c=o===void 0?!1:o,{data:f,isLoading:i,isError:u}=Kt(s);if(i){let r;e[0]!==l?(r=ze("flex items-center gap-2",l),e[0]=l,e[1]=r):r=e[1];let g;e[2]!==a?(g=t.jsx(Oe.Skeleton,{shape:"circle",size:a}),e[2]=a,e[3]=g):g=e[3];let v;e[4]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"h-3 w-24 bg-muted animate-pulse rounded"}),e[4]=v):v=e[4];let p;e[5]!==c?(p=c&&t.jsx("div",{className:"h-2 w-32 bg-muted animate-pulse rounded"}),e[5]=c,e[6]=p):p=e[6];let _;e[7]!==p?(_=t.jsxs("div",{className:"flex flex-col gap-1",children:[v,p]}),e[7]=p,e[8]=_):_=e[8];let b;return e[9]!==r||e[10]!==g||e[11]!==_?(b=t.jsxs("div",{className:r,children:[g,_]}),e[9]=r,e[10]=g,e[11]=_,e[12]=b):b=e[12],b}if(u||!f){let r;e[13]!==l?(r=ze("flex items-center gap-2",l),e[13]=l,e[14]=r):r=e[14];let g;e[15]!==a?(g=t.jsx(Oe,{shape:"circle",size:a,fallback:"?",muted:!0}),e[15]=a,e[16]=g):g=e[16];let v;e[17]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"flex flex-col",children:t.jsx("div",{className:"text-sm text-muted-foreground",children:"Unknown User"})}),e[17]=v):v=e[17];let p;return e[18]!==r||e[19]!==g?(p=t.jsxs("div",{className:r,children:[g,v]}),e[18]=r,e[19]=g,e[20]=p):p=e[20],p}let j;e[21]!==l?(j=ze("flex items-center gap-2",l),e[21]=l,e[22]=j):j=e[22];const h=f.image??void 0;let m;e[23]!==a||e[24]!==h||e[25]!==f.name?(m=t.jsx(Oe,{shape:"circle",size:a,url:h,fallback:f.name}),e[23]=a,e[24]=h,e[25]=f.name,e[26]=m):m=e[26];let x;e[27]!==f.name?(x=t.jsx("div",{className:"text-sm font-medium",children:f.name}),e[27]=f.name,e[28]=x):x=e[28];let y;e[29]!==c||e[30]!==f.email?(y=c&&t.jsx("div",{className:"text-xs text-muted-foreground",children:f.email}),e[29]=c,e[30]=f.email,e[31]=y):y=e[31];let C;e[32]!==x||e[33]!==y?(C=t.jsxs("div",{className:"flex flex-col",children:[x,y]}),e[32]=x,e[33]=y,e[34]=C):C=e[34];let S;return e[35]!==j||e[36]!==m||e[37]!==C?(S=t.jsxs("div",{className:j,children:[m,C]}),e[35]=j,e[36]=m,e[37]=C,e[38]=S):S=e[38],S}const Ut=["icon","avatar","logo"],Le=["created_at","created_by","id"];function Bt(n){return Object.keys(n).find(e=>Ut.includes(e.toLowerCase()))}function et(n,e){return Object.keys(n.properties||{}).filter(s=>["id","created_at","updated_at","created_by","updated_by"].includes(s)?!1:e?e.includes(s):!0).map(s=>({id:s,label:s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," ")}))}function Lt(n){const e=ne.c(32),{data:s,schema:d,viewMode:o,onViewModeChange:l,search:a,sortKey:c,sortDirection:f,onSort:i,actions:u,onItemClick:j,headerActions:h,emptyState:m,readOnly:x,columns:y,hideToolbar:C,sortableFields:S}=n,r=l===void 0?Wt:l,g=f===void 0?"asc":f,v=i===void 0?Gt:i;let p;e[0]!==u?(p=u===void 0?{}:u,e[0]=u,e[1]=p):p=e[1];const _=p,b=j===void 0?qt:j,P=h===void 0?null:h,T=m===void 0?null:m,E=x===void 0?!1:x,N=y===void 0?void 0:y,$=C===void 0?!1:C,D=S===void 0?void 0:S;let z;e[2]!==N||e[3]!==d||e[4]!==D?(z=N?N.filter(Vt).filter(k=>!D||D.includes(k.id)).map(Rt):et(d,D),e[2]=N,e[3]=d,e[4]=D,e[5]=z):z=e[5];const K=z;let I;e[6]!==P||e[7]!==$||e[8]!==v||e[9]!==r||e[10]!==g||e[11]!==c||e[12]!==K||e[13]!==o?(I=!$&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:P}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Ve,{viewMode:o,onViewModeChange:r,sortKey:c,sortDirection:g,onSort:v,sortOptions:K})})]})}),e[6]=P,e[7]=$,e[8]=v,e[9]=r,e[10]=g,e[11]=c,e[12]=K,e[13]=o,e[14]=I):I=e[14];let A;e[15]!==_||e[16]!==N||e[17]!==s||e[18]!==T||e[19]!==b||e[20]!==v||e[21]!==E||e[22]!==d||e[23]!==a||e[24]!==g||e[25]!==c||e[26]!==D||e[27]!==o?(A=o==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:T||t.jsx(Ue,{icon:t.jsx(Be,{size:36,className:"text-muted-foreground"}),title:"No items found",description:a?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:s.map(k=>t.jsx("div",{onClick:()=>b?.(k),className:"cursor-pointer h-full",children:t.jsx(Et,{item:k,schema:d,readOnly:E,actions:_})},k.id))})}):t.jsx(ht,{columns:Qt(N,d,D,_),data:s,sortKey:c,sortDirection:g,onSort:v,onRowClick:b,emptyState:T||t.jsx(Ue,{icon:t.jsx(Be,{size:36,className:"text-muted-foreground"}),title:"No items found",description:a?"Try adjusting your search":"No items to display"})}),e[15]=_,e[16]=N,e[17]=s,e[18]=T,e[19]=b,e[20]=v,e[21]=E,e[22]=d,e[23]=a,e[24]=g,e[25]=c,e[26]=D,e[27]=o,e[28]=A):A=e[28];let O;return e[29]!==I||e[30]!==A?(O=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[I,A]}),e[29]=I,e[30]=A,e[31]=O):O=e[31],O}function Rt(n){return{id:n.id,label:typeof n.header=="string"?n.header:n.id}}function Vt(n){return n.sortable!==!1}function qt(){}function Gt(){}function Wt(){}function Ht(n){return{id:"actions",header:"",render:e=>t.jsxs(Ge,{children:[t.jsx(We,{asChild:!0,children:t.jsx(ke,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:s=>s.stopPropagation(),children:t.jsx(Qe,{size:20})})}),t.jsxs(He,{align:"end",onClick:s=>s.stopPropagation(),children:[n.open&&t.jsxs(F,{onClick:s=>{s.stopPropagation(),n.open?.(e)},children:[t.jsx(Xe,{size:16}),"Open"]}),n.edit&&t.jsxs(F,{onClick:s=>{s.stopPropagation(),n.edit?.(e)},children:[t.jsx(Ye,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(F,{onClick:s=>{s.stopPropagation(),n.duplicate?.(e)},children:[t.jsx(Je,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(F,{variant:"destructive",onClick:s=>{s.stopPropagation(),n.delete?.(e)},children:[t.jsx(Ze,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function tt(n){const e=n.type;return Array.isArray(e)?e.every(s=>tt({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function Jt(n,e){const s=n.properties||{},d=Object.keys(s).filter(i=>{const u=s[i];return u&&tt(u)}),o=Bt(s),l=[],a=new Set;o&&d.includes(o)&&(l.push(o),a.add(o));const c=["title","description","updated_at","updated_by"];for(const i of c)d.includes(i)&&!a.has(i)&&(l.push(i),a.add(i));const f=d.filter(i=>!a.has(i)&&!Le.includes(i)).sort((i,u)=>i.localeCompare(u));for(const i of f)l.push(i),a.add(i);for(const i of Le)d.includes(i)&&!a.has(i)&&(l.push(i),a.add(i));return l.map(i=>{const u=s[i],j=e?e.includes(i):!["id"].includes(i);return i===o?{id:i,header:"",render:h=>{const m=h[i];return t.jsx(qe,{icon:m,name:h.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:i==="description"?{id:i,header:"Description",render:h=>{const m=h[i];return m==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(m)})},sortable:j,cellClassName:"max-w-[50ch]"}:i==="created_by"||i==="updated_by"?{id:i,header:i.charAt(0).toUpperCase()+i.slice(1).replace(/_/g," "),render:h=>{const m=h[i];return m?t.jsx(Mt,{id:String(m),size:"xs"}):"—"},sortable:j,cellClassName:"max-w-[250px]"}:u?.format==="date-time"||i.endsWith("_at")?{id:i,header:i.charAt(0).toUpperCase()+i.slice(1).replace(/_/g," "),render:h=>{const m=h[i];return m?t.jsx("span",{className:"block truncate max-w-full",children:new Date(m).toLocaleDateString()}):"—"},sortable:j,cellClassName:"max-w-[200px]"}:{id:i,header:i.charAt(0).toUpperCase()+i.slice(1).replace(/_/g," "),render:h=>{const m=h[i];return m==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(m)})},sortable:j,cellClassName:"max-w-[200px]"}})}function Qt(n,e,s,d){const o=n||Jt(e,s);return o.some(c=>c.id==="actions")?o:Object.keys(d).length>0?[...o,Ht(d)]:o}function ws(n){const e=ne.c(117),{connectionId:s,org:d,activeCollection:o}=n,l=o.name,a=o.schema??bt,c=o.hasCreateTool,f=o.hasUpdateTool,i=o.hasDeleteTool,u=lt(),h=rt().location.href,{data:m}=at.useSession(),x=m?.user?.id||"unknown",y=jt(s);let C;e[0]!==s?(C=Re(s),e[0]=s,e[1]=C):C=e[1];const S=C,r=Ct(s,l,S),g=`${s}-${l}`;let v;e[2]!==d||e[3]!==g?(v={namespace:d,resource:g,defaultSortKey:"updated_at"},e[2]=d,e[3]=g,e[4]=v):v=e[4];const{search:p,searchTerm:_,setSearch:b,viewMode:P,setViewMode:T,sortKey:E,sortDirection:N,handleSort:$}=pt(v);let D;e[5]!==_||e[6]!==N||e[7]!==E?(D={searchTerm:_,sortKey:E,sortDirection:N},e[5]=_,e[6]=N,e[7]=E,e[8]=D):D=e[8];const z=vt(s,l,S,D),K=!c&&!f&&!i;let I;e[9]!==l||e[10]!==s||e[11]!==u||e[12]!==d?(I=w=>{u({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:d,connectionId:s,collectionName:l,itemId:w.id}})},e[9]=l,e[10]=s,e[11]=u,e[12]=d,e[13]=I):I=e[13];const A=I;let O;e[14]!==r.create||e[15]!==x?(O=async w=>{const he=new Date().toISOString();await r.create.mutateAsync({...w,id:Me("conn"),title:`${w.title} (Copy)`,created_at:he,updated_at:he,created_by:x,updated_by:x})},e[14]=r.create,e[15]=x,e[16]=O):O=e[16];const k=O,[M,xe]=ct.useState(null);let le;e[17]===Symbol.for("react.memo_cache_sentinel")?(le=w=>{xe(w)},e[17]=le):le=e[17];const st=le;let U;e[18]!==A||e[19]!==f?(U=f&&{edit:A},e[18]=A,e[19]=f,e[20]=U):U=e[20];let B;e[21]!==k||e[22]!==c?(B=c&&{duplicate:k},e[21]=k,e[22]=c,e[23]=B):B=e[23];let L;e[24]!==i?(L=i&&{delete:st},e[24]=i,e[25]=L):L=e[25];let re;e[26]!==L||e[27]!==U||e[28]!==B?(re={...U,...B,...L},e[26]=L,e[27]=U,e[28]=B,e[29]=re):re=e[29];const ge=re;let ae;e[30]!==r.delete||e[31]!==M?(ae=async()=>{M&&(await r.delete.mutateAsync(M.id),xe(null))},e[30]=r.delete,e[31]=M,e[32]=ae):ae=e[32];const je=ae;let ce;e[33]!==r.create||e[34]!==l||e[35]!==s||e[36]!==c||e[37]!==u||e[38]!==d||e[39]!==x?(ce=async()=>{if(!c){dt.error("Create operation is not available for this collection");return}const w=new Date().toISOString(),he={id:Me("conn"),title:"New Item",description:"A brief description of the item",created_at:w,updated_at:w,created_by:x,updated_by:x};try{const Ee=await r.create.mutateAsync(he);u({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:d,connectionId:s,collectionName:l,itemId:Ee.id}})}catch(Ee){console.error("Failed to create item:",Ee)}},e[33]=r.create,e[34]=l,e[35]=s,e[36]=c,e[37]=u,e[38]=d,e[39]=x,e[40]=ce):ce=e[40];const Ce=ce;let de;e[41]!==a?(de=et(a),e[41]=a,e[42]=de):de=e[42];const ve=de,Fe=(z?.length??0)>0,it=c&&Fe,ot=c&&!Fe&&!p;let me;e[43]!==r.create||e[44]!==Ce||e[45]!==c?(me=c?t.jsxs(ke,{onClick:Ce,size:"sm",disabled:r.create.isPending,className:"h-7",children:[t.jsx(It,{className:"mr-2 h-4 w-4"}),r.create.isPending?"Creating...":"Create"]}):null,e[43]=r.create,e[44]=Ce,e[45]=c,e[46]=me):me=e[46];const Ke=me,be=E;let R;e[47]!==$||e[48]!==T||e[49]!==N||e[50]!==ve||e[51]!==be||e[52]!==P?(R=t.jsx(Ve,{viewMode:P,onViewModeChange:T,sortKey:be,sortDirection:N,onSort:$,sortOptions:ve}),e[47]=$,e[48]=T,e[49]=N,e[50]=ve,e[51]=be,e[52]=P,e[53]=R):R=e[53];const ye=`${l}s`,Ne=y?.icon??"grid_view";let V;e[54]!==ye||e[55]!==Ne||e[56]!==h?(V=t.jsx(gt,{title:ye,url:h,icon:Ne}),e[54]=ye,e[55]=Ne,e[56]=h,e[57]=V):V=e[57];const we=it&&Ke;let q;e[58]!==R||e[59]!==V||e[60]!==we?(q=t.jsxs(Pt,{children:[R,V,we]}),e[58]=R,e[59]=V,e[60]=we,e[61]=q):q=e[61];const Se=`Search ${l}...`;let G;e[62]!==b?(G=w=>{w.key==="Escape"&&(b(""),w.target.blur())},e[62]=b,e[63]=G):G=e[63];let W;e[64]!==p||e[65]!==b||e[66]!==Se||e[67]!==G?(W=t.jsx(mt,{value:p,onChange:b,placeholder:Se,onKeyDown:G}),e[64]=p,e[65]=b,e[66]=Se,e[67]=G,e[68]=W):W=e[68];let H;e[69]!==z?(H=z??[],e[69]=z,e[70]=H):H=e[70];const _e=E;let J;e[71]!==A?(J=w=>A(w),e[71]=A,e[72]=J):J=e[72];const De="No items found",Ae=p?"Try adjusting your search terms":"This collection doesn't have any items yet.",Te=ot?Ke:void 0;let Q;e[73]!==De||e[74]!==Ae||e[75]!==Te?(Q=t.jsx(ut,{image:null,title:De,description:Ae,actions:Te}),e[73]=De,e[74]=Ae,e[75]=Te,e[76]=Q):Q=e[76];let Y;e[77]!==$||e[78]!==K||e[79]!==ge||e[80]!==a||e[81]!==p||e[82]!==b||e[83]!==T||e[84]!==N||e[85]!==H||e[86]!==_e||e[87]!==J||e[88]!==Q||e[89]!==P?(Y=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Lt,{hideToolbar:!0,data:H,schema:a,viewMode:P,onViewModeChange:T,search:p,onSearchChange:b,sortKey:_e,sortDirection:N,onSort:$,actions:ge,onItemClick:J,readOnly:K,emptyState:Q})}),e[77]=$,e[78]=K,e[79]=ge,e[80]=a,e[81]=p,e[82]=b,e[83]=T,e[84]=N,e[85]=H,e[86]=_e,e[87]=J,e[88]=Q,e[89]=P,e[90]=Y):Y=e[90];let X;e[91]!==W||e[92]!==Y?(X=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[W,Y]}),e[91]=W,e[92]=Y,e[93]=X):X=e[93];const Ie=!!M;let fe;e[94]===Symbol.for("react.memo_cache_sentinel")?(fe=w=>{w||xe(null)},e[94]=fe):fe=e[94];let ue;e[95]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx(wt,{children:"Delete item?"}),e[95]=ue):ue=e[95];const Pe=M?.title;let Z;e[96]!==Pe?(Z=t.jsxs(St,{children:[ue,t.jsxs(_t,{children:['Are you sure you want to delete "',Pe,'"? This action cannot be undone.']})]}),e[96]=Pe,e[97]=Z):Z=e[97];let ee;e[98]!==r.delete.isPending?(ee=t.jsx(yt,{disabled:r.delete.isPending,children:"Cancel"}),e[98]=r.delete.isPending,e[99]=ee):ee=e[99];const $e=r.delete.isPending?"Deleting...":"Delete";let te;e[100]!==r.delete.isPending||e[101]!==je||e[102]!==$e?(te=t.jsx(Nt,{onClick:je,disabled:r.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:$e}),e[100]=r.delete.isPending,e[101]=je,e[102]=$e,e[103]=te):te=e[103];let se;e[104]!==ee||e[105]!==te?(se=t.jsxs(Dt,{children:[ee,te]}),e[104]=ee,e[105]=te,e[106]=se):se=e[106];let ie;e[107]!==Z||e[108]!==se?(ie=t.jsxs(At,{children:[Z,se]}),e[107]=Z,e[108]=se,e[109]=ie):ie=e[109];let oe;e[110]!==Ie||e[111]!==ie?(oe=t.jsx(Tt,{open:Ie,onOpenChange:fe,children:ie}),e[110]=Ie,e[111]=ie,e[112]=oe):oe=e[112];let pe;return e[113]!==q||e[114]!==X||e[115]!==oe?(pe=t.jsxs(t.Fragment,{children:[q,X,oe]}),e[113]=q,e[114]=X,e[115]=oe,e[116]=pe):pe=e[116],pe}export{ws as C};
|
|
1
|
+
import{c as ne,j as t,K as nt,f as lt,k as rt,a as at,r as ct,t as dt}from"./index-B9c3bNyk.js";import{g as Me}from"./generate-id-Dyweu44Y.js";import{c as Re}from"./connection-C0f0eQA8.js";import{C as Ve}from"./collection-display-button-CQf7wSjn.js";import{C as mt}from"./collection-search-BHs67_UI.js";import{C as ft}from"./card-CRtF9cdr.js";import{I as qe,E as ut}from"./empty-state-CSTjcp0X.js";import{b as Ge,D as We,a as He,c as F}from"./dropdown-menu-BbIA2rWH.js";import{B as ke,c as ze}from"./button-Ta3HWdYR.js";import{a as Je}from"./Copy01-EV4WWtW9.js";import{i as Qe}from"./DotsVertical-BIgdSuWw.js";import{i as Ye}from"./Edit01-YiEPkU0g.js";import{s as Xe,u as pt}from"./use-list-state-Ck_kabtn.js";import{s as Ze}from"./Trash01-DjLKhTdL.js";import{C as ht}from"./collection-table-wrapper-3bPS8SS1.js";import{E as Ue}from"./empty-state-CUODA5WM.js";import{n as Be}from"./Inbox01-BWl9K4GL.js";import{A as Oe}from"./avatar-BZZ8iTNu.js";import{u as xt}from"./useQuery-CqMcSUvK.js";import{P as gt}from"./pin-to-sidebar-button-B85FzaKS.js";import{b as jt}from"./use-connection-Cpo9FQLA.js";import{a as Ct,b as vt}from"./use-collections-BnNAdJQg.js";import{B as bt}from"./constants-7IT_izqz.js";import{A as yt,g as Nt,c as wt,b as St,d as _t,e as Dt,a as At,f as Tt}from"./alert-dialog-D9F5tffK.js";import{s as It}from"./Plus-DtbgAjWY.js";import{V as Pt}from"./layout-CMBAL9_n.js";function $t(n,e){const s=n.properties||{};for(const o in s){const l=s[o];if(l&&l.type==="string"&&(l.format==="url"||l.format==="uri")&&e&&typeof e=="object"&&o in e&&e[o])return e[o]}const d=["image","img","avatar","icon","logo","thumbnail","cover"];for(const o of d)if(e&&typeof e=="object"&&o in e&&typeof e[o]=="string")return e[o]}function Et(n){const e=ne.c(25),{item:s,schema:d,actions:o}=n;let l;e[0]!==s||e[1]!==d?(l=$t(d,s),e[0]=s,e[1]=d,e[2]=l):l=e[2];const a=l,c=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let f;e[3]!==o?(f=o&&Object.keys(o).length>0,e[3]=o,e[4]=f):f=e[4];const i=f;let u;e[5]!==a||e[6]!==s.title?(u=t.jsx(qe,{icon:a,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=a,e[6]=s.title,e[7]=u):u=e[7];let j;e[8]!==s.title?(j=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=j):j=e[9];const h=c||"No description";let m;e[10]!==h?(m=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:h}),e[10]=h,e[11]=m):m=e[11];let x;e[12]!==j||e[13]!==m?(x=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[j,m]}),e[12]=j,e[13]=m,e[14]=x):x=e[14];let y;e[15]!==u||e[16]!==x?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[u,x]}),e[15]=u,e[16]=x,e[17]=y):y=e[17];let C;e[18]!==o||e[19]!==i||e[20]!==s?(C=i&&t.jsx("div",{className:"absolute top-6 right-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:Ft,onMouseDown:kt,children:t.jsxs(Ge,{children:[t.jsx(We,{asChild:!0,children:t.jsx(ke,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:Ot,children:t.jsx(Qe,{size:20})})}),t.jsxs(He,{align:"end",onClick:zt,children:[o.open&&t.jsxs(F,{onClick:r=>{r.stopPropagation(),o.open?.(s)},children:[t.jsx(Xe,{size:16}),"Open"]}),o.edit&&t.jsxs(F,{onClick:r=>{r.stopPropagation(),o.edit?.(s)},children:[t.jsx(Ye,{size:16}),"Edit"]}),o.duplicate&&t.jsxs(F,{onClick:r=>{r.stopPropagation(),o.duplicate?.(s)},children:[t.jsx(Je,{size:16}),"Duplicate"]}),o.delete&&t.jsxs(F,{variant:"destructive",onClick:r=>{r.stopPropagation(),o.delete?.(s)},children:[t.jsx(Ze,{size:16}),"Delete"]})]})]})}),e[18]=o,e[19]=i,e[20]=s,e[21]=C):C=e[21];let S;return e[22]!==y||e[23]!==C?(S=t.jsxs(ft,{className:"cursor-pointer transition-colors h-full flex flex-col group relative",children:[y,C]}),e[22]=y,e[23]=C,e[24]=S):S=e[24],S}function zt(n){return n.stopPropagation()}function Ot(n){return n.stopPropagation()}function kt(n){return n.stopPropagation()}function Ft(n){return n.stopPropagation()}function Kt(n){const e=ne.c(9);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=Re(),e[0]=s):s=e[0];const d=s;let o;e[1]!==n?(o=nt.user(n),e[1]=n,e[2]=o):o=e[2];let l;e[3]!==n?(l=async()=>(await d("USER_GET",{id:n})).user,e[3]=n,e[4]=l):l=e[4];const a=!!n;let c;return e[5]!==o||e[6]!==l||e[7]!==a?(c={queryKey:o,queryFn:l,staleTime:3e5,retry:1,enabled:a},e[5]=o,e[6]=l,e[7]=a,e[8]=c):c=e[8],xt(c)}function Mt(n){const e=ne.c(39),{id:s,size:d,showEmail:o,className:l}=n,a=d===void 0?"xs":d,c=o===void 0?!1:o,{data:f,isLoading:i,isError:u}=Kt(s);if(i){let r;e[0]!==l?(r=ze("flex items-center gap-2",l),e[0]=l,e[1]=r):r=e[1];let g;e[2]!==a?(g=t.jsx(Oe.Skeleton,{shape:"circle",size:a}),e[2]=a,e[3]=g):g=e[3];let v;e[4]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"h-3 w-24 bg-muted animate-pulse rounded"}),e[4]=v):v=e[4];let p;e[5]!==c?(p=c&&t.jsx("div",{className:"h-2 w-32 bg-muted animate-pulse rounded"}),e[5]=c,e[6]=p):p=e[6];let _;e[7]!==p?(_=t.jsxs("div",{className:"flex flex-col gap-1",children:[v,p]}),e[7]=p,e[8]=_):_=e[8];let b;return e[9]!==r||e[10]!==g||e[11]!==_?(b=t.jsxs("div",{className:r,children:[g,_]}),e[9]=r,e[10]=g,e[11]=_,e[12]=b):b=e[12],b}if(u||!f){let r;e[13]!==l?(r=ze("flex items-center gap-2",l),e[13]=l,e[14]=r):r=e[14];let g;e[15]!==a?(g=t.jsx(Oe,{shape:"circle",size:a,fallback:"?",muted:!0}),e[15]=a,e[16]=g):g=e[16];let v;e[17]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"flex flex-col",children:t.jsx("div",{className:"text-sm text-muted-foreground",children:"Unknown User"})}),e[17]=v):v=e[17];let p;return e[18]!==r||e[19]!==g?(p=t.jsxs("div",{className:r,children:[g,v]}),e[18]=r,e[19]=g,e[20]=p):p=e[20],p}let j;e[21]!==l?(j=ze("flex items-center gap-2",l),e[21]=l,e[22]=j):j=e[22];const h=f.image??void 0;let m;e[23]!==a||e[24]!==h||e[25]!==f.name?(m=t.jsx(Oe,{shape:"circle",size:a,url:h,fallback:f.name}),e[23]=a,e[24]=h,e[25]=f.name,e[26]=m):m=e[26];let x;e[27]!==f.name?(x=t.jsx("div",{className:"text-sm font-medium",children:f.name}),e[27]=f.name,e[28]=x):x=e[28];let y;e[29]!==c||e[30]!==f.email?(y=c&&t.jsx("div",{className:"text-xs text-muted-foreground",children:f.email}),e[29]=c,e[30]=f.email,e[31]=y):y=e[31];let C;e[32]!==x||e[33]!==y?(C=t.jsxs("div",{className:"flex flex-col",children:[x,y]}),e[32]=x,e[33]=y,e[34]=C):C=e[34];let S;return e[35]!==j||e[36]!==m||e[37]!==C?(S=t.jsxs("div",{className:j,children:[m,C]}),e[35]=j,e[36]=m,e[37]=C,e[38]=S):S=e[38],S}const Ut=["icon","avatar","logo"],Le=["created_at","created_by","id"];function Bt(n){return Object.keys(n).find(e=>Ut.includes(e.toLowerCase()))}function et(n,e){return Object.keys(n.properties||{}).filter(s=>["id","created_at","updated_at","created_by","updated_by"].includes(s)?!1:e?e.includes(s):!0).map(s=>({id:s,label:s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," ")}))}function Lt(n){const e=ne.c(32),{data:s,schema:d,viewMode:o,onViewModeChange:l,search:a,sortKey:c,sortDirection:f,onSort:i,actions:u,onItemClick:j,headerActions:h,emptyState:m,readOnly:x,columns:y,hideToolbar:C,sortableFields:S}=n,r=l===void 0?Wt:l,g=f===void 0?"asc":f,v=i===void 0?Gt:i;let p;e[0]!==u?(p=u===void 0?{}:u,e[0]=u,e[1]=p):p=e[1];const _=p,b=j===void 0?qt:j,P=h===void 0?null:h,T=m===void 0?null:m,E=x===void 0?!1:x,N=y===void 0?void 0:y,$=C===void 0?!1:C,D=S===void 0?void 0:S;let z;e[2]!==N||e[3]!==d||e[4]!==D?(z=N?N.filter(Vt).filter(k=>!D||D.includes(k.id)).map(Rt):et(d,D),e[2]=N,e[3]=d,e[4]=D,e[5]=z):z=e[5];const K=z;let I;e[6]!==P||e[7]!==$||e[8]!==v||e[9]!==r||e[10]!==g||e[11]!==c||e[12]!==K||e[13]!==o?(I=!$&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:P}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Ve,{viewMode:o,onViewModeChange:r,sortKey:c,sortDirection:g,onSort:v,sortOptions:K})})]})}),e[6]=P,e[7]=$,e[8]=v,e[9]=r,e[10]=g,e[11]=c,e[12]=K,e[13]=o,e[14]=I):I=e[14];let A;e[15]!==_||e[16]!==N||e[17]!==s||e[18]!==T||e[19]!==b||e[20]!==v||e[21]!==E||e[22]!==d||e[23]!==a||e[24]!==g||e[25]!==c||e[26]!==D||e[27]!==o?(A=o==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:T||t.jsx(Ue,{icon:t.jsx(Be,{size:36,className:"text-muted-foreground"}),title:"No items found",description:a?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:s.map(k=>t.jsx("div",{onClick:()=>b?.(k),className:"cursor-pointer h-full",children:t.jsx(Et,{item:k,schema:d,readOnly:E,actions:_})},k.id))})}):t.jsx(ht,{columns:Qt(N,d,D,_),data:s,sortKey:c,sortDirection:g,onSort:v,onRowClick:b,emptyState:T||t.jsx(Ue,{icon:t.jsx(Be,{size:36,className:"text-muted-foreground"}),title:"No items found",description:a?"Try adjusting your search":"No items to display"})}),e[15]=_,e[16]=N,e[17]=s,e[18]=T,e[19]=b,e[20]=v,e[21]=E,e[22]=d,e[23]=a,e[24]=g,e[25]=c,e[26]=D,e[27]=o,e[28]=A):A=e[28];let O;return e[29]!==I||e[30]!==A?(O=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[I,A]}),e[29]=I,e[30]=A,e[31]=O):O=e[31],O}function Rt(n){return{id:n.id,label:typeof n.header=="string"?n.header:n.id}}function Vt(n){return n.sortable!==!1}function qt(){}function Gt(){}function Wt(){}function Ht(n){return{id:"actions",header:"",render:e=>t.jsxs(Ge,{children:[t.jsx(We,{asChild:!0,children:t.jsx(ke,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:s=>s.stopPropagation(),children:t.jsx(Qe,{size:20})})}),t.jsxs(He,{align:"end",onClick:s=>s.stopPropagation(),children:[n.open&&t.jsxs(F,{onClick:s=>{s.stopPropagation(),n.open?.(e)},children:[t.jsx(Xe,{size:16}),"Open"]}),n.edit&&t.jsxs(F,{onClick:s=>{s.stopPropagation(),n.edit?.(e)},children:[t.jsx(Ye,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(F,{onClick:s=>{s.stopPropagation(),n.duplicate?.(e)},children:[t.jsx(Je,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(F,{variant:"destructive",onClick:s=>{s.stopPropagation(),n.delete?.(e)},children:[t.jsx(Ze,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function tt(n){const e=n.type;return Array.isArray(e)?e.every(s=>tt({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function Jt(n,e){const s=n.properties||{},d=Object.keys(s).filter(i=>{const u=s[i];return u&&tt(u)}),o=Bt(s),l=[],a=new Set;o&&d.includes(o)&&(l.push(o),a.add(o));const c=["title","description","updated_at","updated_by"];for(const i of c)d.includes(i)&&!a.has(i)&&(l.push(i),a.add(i));const f=d.filter(i=>!a.has(i)&&!Le.includes(i)).sort((i,u)=>i.localeCompare(u));for(const i of f)l.push(i),a.add(i);for(const i of Le)d.includes(i)&&!a.has(i)&&(l.push(i),a.add(i));return l.map(i=>{const u=s[i],j=e?e.includes(i):!["id"].includes(i);return i===o?{id:i,header:"",render:h=>{const m=h[i];return t.jsx(qe,{icon:m,name:h.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:i==="description"?{id:i,header:"Description",render:h=>{const m=h[i];return m==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(m)})},sortable:j,cellClassName:"max-w-[50ch]"}:i==="created_by"||i==="updated_by"?{id:i,header:i.charAt(0).toUpperCase()+i.slice(1).replace(/_/g," "),render:h=>{const m=h[i];return m?t.jsx(Mt,{id:String(m),size:"xs"}):"—"},sortable:j,cellClassName:"max-w-[250px]"}:u?.format==="date-time"||i.endsWith("_at")?{id:i,header:i.charAt(0).toUpperCase()+i.slice(1).replace(/_/g," "),render:h=>{const m=h[i];return m?t.jsx("span",{className:"block truncate max-w-full",children:new Date(m).toLocaleDateString()}):"—"},sortable:j,cellClassName:"max-w-[200px]"}:{id:i,header:i.charAt(0).toUpperCase()+i.slice(1).replace(/_/g," "),render:h=>{const m=h[i];return m==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(m)})},sortable:j,cellClassName:"max-w-[200px]"}})}function Qt(n,e,s,d){const o=n||Jt(e,s);return o.some(c=>c.id==="actions")?o:Object.keys(d).length>0?[...o,Ht(d)]:o}function ws(n){const e=ne.c(117),{connectionId:s,org:d,activeCollection:o}=n,l=o.name,a=o.schema??bt,c=o.hasCreateTool,f=o.hasUpdateTool,i=o.hasDeleteTool,u=lt(),h=rt().location.href,{data:m}=at.useSession(),x=m?.user?.id||"unknown",y=jt(s);let C;e[0]!==s?(C=Re(s),e[0]=s,e[1]=C):C=e[1];const S=C,r=Ct(s,l,S),g=`${s}-${l}`;let v;e[2]!==d||e[3]!==g?(v={namespace:d,resource:g,defaultSortKey:"updated_at"},e[2]=d,e[3]=g,e[4]=v):v=e[4];const{search:p,searchTerm:_,setSearch:b,viewMode:P,setViewMode:T,sortKey:E,sortDirection:N,handleSort:$}=pt(v);let D;e[5]!==_||e[6]!==N||e[7]!==E?(D={searchTerm:_,sortKey:E,sortDirection:N},e[5]=_,e[6]=N,e[7]=E,e[8]=D):D=e[8];const z=vt(s,l,S,D),K=!c&&!f&&!i;let I;e[9]!==l||e[10]!==s||e[11]!==u||e[12]!==d?(I=w=>{u({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:d,connectionId:s,collectionName:l,itemId:w.id}})},e[9]=l,e[10]=s,e[11]=u,e[12]=d,e[13]=I):I=e[13];const A=I;let O;e[14]!==r.create||e[15]!==x?(O=async w=>{const he=new Date().toISOString();await r.create.mutateAsync({...w,id:Me("conn"),title:`${w.title} (Copy)`,created_at:he,updated_at:he,created_by:x,updated_by:x})},e[14]=r.create,e[15]=x,e[16]=O):O=e[16];const k=O,[M,xe]=ct.useState(null);let le;e[17]===Symbol.for("react.memo_cache_sentinel")?(le=w=>{xe(w)},e[17]=le):le=e[17];const st=le;let U;e[18]!==A||e[19]!==f?(U=f&&{edit:A},e[18]=A,e[19]=f,e[20]=U):U=e[20];let B;e[21]!==k||e[22]!==c?(B=c&&{duplicate:k},e[21]=k,e[22]=c,e[23]=B):B=e[23];let L;e[24]!==i?(L=i&&{delete:st},e[24]=i,e[25]=L):L=e[25];let re;e[26]!==L||e[27]!==U||e[28]!==B?(re={...U,...B,...L},e[26]=L,e[27]=U,e[28]=B,e[29]=re):re=e[29];const ge=re;let ae;e[30]!==r.delete||e[31]!==M?(ae=async()=>{M&&(await r.delete.mutateAsync(M.id),xe(null))},e[30]=r.delete,e[31]=M,e[32]=ae):ae=e[32];const je=ae;let ce;e[33]!==r.create||e[34]!==l||e[35]!==s||e[36]!==c||e[37]!==u||e[38]!==d||e[39]!==x?(ce=async()=>{if(!c){dt.error("Create operation is not available for this collection");return}const w=new Date().toISOString(),he={id:Me("conn"),title:"New Item",description:"A brief description of the item",created_at:w,updated_at:w,created_by:x,updated_by:x};try{const Ee=await r.create.mutateAsync(he);u({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:d,connectionId:s,collectionName:l,itemId:Ee.id}})}catch(Ee){console.error("Failed to create item:",Ee)}},e[33]=r.create,e[34]=l,e[35]=s,e[36]=c,e[37]=u,e[38]=d,e[39]=x,e[40]=ce):ce=e[40];const Ce=ce;let de;e[41]!==a?(de=et(a),e[41]=a,e[42]=de):de=e[42];const ve=de,Fe=(z?.length??0)>0,it=c&&Fe,ot=c&&!Fe&&!p;let me;e[43]!==r.create||e[44]!==Ce||e[45]!==c?(me=c?t.jsxs(ke,{onClick:Ce,size:"sm",disabled:r.create.isPending,className:"h-7",children:[t.jsx(It,{className:"mr-2 h-4 w-4"}),r.create.isPending?"Creating...":"Create"]}):null,e[43]=r.create,e[44]=Ce,e[45]=c,e[46]=me):me=e[46];const Ke=me,be=E;let R;e[47]!==$||e[48]!==T||e[49]!==N||e[50]!==ve||e[51]!==be||e[52]!==P?(R=t.jsx(Ve,{viewMode:P,onViewModeChange:T,sortKey:be,sortDirection:N,onSort:$,sortOptions:ve}),e[47]=$,e[48]=T,e[49]=N,e[50]=ve,e[51]=be,e[52]=P,e[53]=R):R=e[53];const ye=`${l}s`,Ne=y?.icon??"grid_view";let V;e[54]!==ye||e[55]!==Ne||e[56]!==h?(V=t.jsx(gt,{title:ye,url:h,icon:Ne}),e[54]=ye,e[55]=Ne,e[56]=h,e[57]=V):V=e[57];const we=it&&Ke;let q;e[58]!==R||e[59]!==V||e[60]!==we?(q=t.jsxs(Pt,{children:[R,V,we]}),e[58]=R,e[59]=V,e[60]=we,e[61]=q):q=e[61];const Se=`Search ${l}...`;let G;e[62]!==b?(G=w=>{w.key==="Escape"&&(b(""),w.target.blur())},e[62]=b,e[63]=G):G=e[63];let W;e[64]!==p||e[65]!==b||e[66]!==Se||e[67]!==G?(W=t.jsx(mt,{value:p,onChange:b,placeholder:Se,onKeyDown:G}),e[64]=p,e[65]=b,e[66]=Se,e[67]=G,e[68]=W):W=e[68];let H;e[69]!==z?(H=z??[],e[69]=z,e[70]=H):H=e[70];const _e=E;let J;e[71]!==A?(J=w=>A(w),e[71]=A,e[72]=J):J=e[72];const De="No items found",Ae=p?"Try adjusting your search terms":"This collection doesn't have any items yet.",Te=ot?Ke:void 0;let Q;e[73]!==De||e[74]!==Ae||e[75]!==Te?(Q=t.jsx(ut,{image:null,title:De,description:Ae,actions:Te}),e[73]=De,e[74]=Ae,e[75]=Te,e[76]=Q):Q=e[76];let Y;e[77]!==$||e[78]!==K||e[79]!==ge||e[80]!==a||e[81]!==p||e[82]!==b||e[83]!==T||e[84]!==N||e[85]!==H||e[86]!==_e||e[87]!==J||e[88]!==Q||e[89]!==P?(Y=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Lt,{hideToolbar:!0,data:H,schema:a,viewMode:P,onViewModeChange:T,search:p,onSearchChange:b,sortKey:_e,sortDirection:N,onSort:$,actions:ge,onItemClick:J,readOnly:K,emptyState:Q})}),e[77]=$,e[78]=K,e[79]=ge,e[80]=a,e[81]=p,e[82]=b,e[83]=T,e[84]=N,e[85]=H,e[86]=_e,e[87]=J,e[88]=Q,e[89]=P,e[90]=Y):Y=e[90];let X;e[91]!==W||e[92]!==Y?(X=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[W,Y]}),e[91]=W,e[92]=Y,e[93]=X):X=e[93];const Ie=!!M;let fe;e[94]===Symbol.for("react.memo_cache_sentinel")?(fe=w=>{w||xe(null)},e[94]=fe):fe=e[94];let ue;e[95]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx(wt,{children:"Delete item?"}),e[95]=ue):ue=e[95];const Pe=M?.title;let Z;e[96]!==Pe?(Z=t.jsxs(St,{children:[ue,t.jsxs(_t,{children:['Are you sure you want to delete "',Pe,'"? This action cannot be undone.']})]}),e[96]=Pe,e[97]=Z):Z=e[97];let ee;e[98]!==r.delete.isPending?(ee=t.jsx(yt,{disabled:r.delete.isPending,children:"Cancel"}),e[98]=r.delete.isPending,e[99]=ee):ee=e[99];const $e=r.delete.isPending?"Deleting...":"Delete";let te;e[100]!==r.delete.isPending||e[101]!==je||e[102]!==$e?(te=t.jsx(Nt,{onClick:je,disabled:r.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:$e}),e[100]=r.delete.isPending,e[101]=je,e[102]=$e,e[103]=te):te=e[103];let se;e[104]!==ee||e[105]!==te?(se=t.jsxs(Dt,{children:[ee,te]}),e[104]=ee,e[105]=te,e[106]=se):se=e[106];let ie;e[107]!==Z||e[108]!==se?(ie=t.jsxs(At,{children:[Z,se]}),e[107]=Z,e[108]=se,e[109]=ie):ie=e[109];let oe;e[110]!==Ie||e[111]!==ie?(oe=t.jsx(Tt,{open:Ie,onOpenChange:fe,children:ie}),e[110]=Ie,e[111]=ie,e[112]=oe):oe=e[112];let pe;return e[113]!==q||e[114]!==X||e[115]!==oe?(pe=t.jsxs(t.Fragment,{children:[q,X,oe]}),e[113]=q,e[114]=X,e[115]=oe,e[116]=pe):pe=e[116],pe}export{ws as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,j as o}from"./index-
|
|
1
|
+
import{c as g,j as o}from"./index-B9c3bNyk.js";import{c as u}from"./button-Ta3HWdYR.js";import{n as T}from"./collection-display-button-CQf7wSjn.js";import{i as $}from"./ArrowUp-C39Etgym.js";function R(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("div",{"data-slot":"table-container",className:"relative w-full min-w-0",children:o.jsx("table",{"data-slot":"table",className:l,...s})}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function H(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("[&_tr]:border-b",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("thead",{"data-slot":"table-header",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function L(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("tbody",{"data-slot":"table-body",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function S(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("tr",{"data-slot":"table-row",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function z(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("th",{"data-slot":"table-head",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function D(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("td",{"data-slot":"table-cell",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function E(a){const e=g.c(29),{columns:t,data:s,sortKey:l,sortDirection:r,onSort:f,onRowClick:c,rowClassName:x}=a;let h;e[0]!==r?(h=function(n,N){return o.jsx("div",{className:"w-4 flex items-center justify-center",children:N&&r&&(r==="asc"?o.jsx($,{size:16,className:"text-muted-foreground transition-colors"}):o.jsx(T,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=r,e[1]=h):h=e[1];const w=h;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=function(n,N){let C="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-xs h-9 uppercase tracking-wider";return n===N-1&&(C="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-xs h-9 uppercase tracking-wider w-8"),C},e[2]=p):p=e[2];const i=p;let d;if(e[3]!==t||e[4]!==f||e[5]!==w||e[6]!==l){let m;e[8]!==t.length||e[9]!==f||e[10]!==w||e[11]!==l?(m=(n,N)=>{const C=l===n.id;return o.jsx(z,{className:u(i(N,t.length),"group transition-colors select-none",n.sortable&&"hover:bg-accent cursor-pointer",n.rowClassName,n.cellClassName),onClick:n.sortable&&f?()=>f(n.id):void 0,children:o.jsxs("span",{className:"flex items-center gap-1",children:[n.header,n.sortable&&w(n.id,C)]})},n.id)},e[8]=t.length,e[9]=f,e[10]=w,e[11]=l,e[12]=m):m=e[12],d=t.map(m),e[3]=t,e[4]=f,e[5]=w,e[6]=l,e[7]=d}else d=e[7];let j;e[13]!==d?(j=o.jsx(H,{className:"sticky top-0 z-10 border-b-0 bg-muted/30",children:o.jsx(S,{className:"h-9 hover:bg-transparent border-b border-border",children:d})}),e[13]=d,e[14]=j):j=e[14];let v;if(e[15]!==t||e[16]!==s||e[17]!==c||e[18]!==x){let m;e[20]!==t||e[21]!==c||e[22]!==x?(m=(n,N)=>{const C=x?.(n);return o.jsx(S,{"data-row-index":N,className:u("group/data-row transition-colors border-b-0 hover:bg-accent/50",c?"cursor-pointer":"",C),onClick:c?()=>c(n):void 0,children:t.map(b=>o.jsx(D,{className:u("px-5 py-4 h-16 align-middle text-sm text-foreground",b.cellClassName,b.wrap?"whitespace-normal wrap-break-word":""),children:o.jsx("div",{className:u(b.wrap?"w-full":"min-w-0 w-full",!b.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:b.render?b.render(n):b.accessor?b.accessor(n):null})},b.id))},N)},e[20]=t,e[21]=c,e[22]=x,e[23]=m):m=e[23],v=s.map(m),e[15]=t,e[16]=s,e[17]=c,e[18]=x,e[19]=v}else v=e[19];let y;e[24]!==v?(y=o.jsx(L,{children:v}),e[24]=v,e[25]=y):y=e[25];let k;return e[26]!==j||e[27]!==y?(k=o.jsx("div",{className:"w-full bg-background min-w-0",children:o.jsxs(R,{className:"w-full border-collapse",children:[j,y]})}),e[26]=j,e[27]=y,e[28]=k):k=e[28],k}function W(a){const e=g.c(12),{columns:t,data:s,isLoading:l,sortKey:r,sortDirection:f,onSort:c,onRowClick:x,emptyState:h}=a;if(l===void 0?!1:l){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex items-center justify-center h-full",children:o.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=i):i=e[0],i}if(s.length===0){let i;e[1]!==h?(i=h||o.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=h,e[2]=i):i=e[2];let d;return e[3]!==i?(d=o.jsx("div",{className:"flex items-center justify-center h-full",children:i}),e[3]=i,e[4]=d):d=e[4],d}let p;return e[5]!==t||e[6]!==s||e[7]!==x||e[8]!==c||e[9]!==f||e[10]!==r?(p=o.jsx("div",{className:"flex-1 overflow-auto",children:o.jsx(E,{columns:t,data:s,sortKey:r,sortDirection:f,onSort:c,onRowClick:x})}),e[5]=t,e[6]=s,e[7]=x,e[8]=c,e[9]=f,e[10]=r,e[11]=p):p=e[11],p}export{W as C};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as b,y as r,_ as d,I as a,z as e,J as n,aD as s,aH as m}from"./index-
|
|
1
|
+
import{r as b,y as r,_ as d,I as a,z as e,J as n,aD as s,aH as m}from"./index-B9c3bNyk.js";b.createContext(void 0);const h="UNKNOWN_CONNECTION_ID",_=async o=>{const i=(await o.text()).split(`
|
|
2
2
|
`).find(t=>t.startsWith("data: "));if(!i)throw new Error("No data received from the server");return JSON.parse(i.replace("data: ",""))};function w(o){if(o===h)return(async()=>{});const l=o?`/mcp/${o}`:"/mcp";return async(i,u)=>{const t=await fetch(l,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:"tools/call",params:{name:i,arguments:u}}),headers:{"Content-Type":"application/json",Accept:"application/json, text/event-stream"},credentials:"include"});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const c=(t.headers.get("Content-Type")??"").startsWith("application/json")?await t.json():await _(t);if(c.result?.isError)throw new Error(c.result.content?.[0]?.text||"Tool call failed");return c.result?.structuredContent||c.result}}const f=r({authorizationEndpoint:e().url(),tokenEndpoint:e().url(),introspectionEndpoint:e().url().optional(),clientId:e(),clientSecret:e().optional(),scopes:a(e()),grantType:d(["authorization_code","client_credentials"])}),g=r({name:e(),description:e().optional(),inputSchema:n(e(),s()),outputSchema:n(e(),s()).optional()}),T=r({headers:n(e(),e()).optional()}),y=r({command:e().describe("Command to run (e.g., 'npx', 'node')"),args:a(e()).optional().describe("Command arguments"),cwd:e().optional().describe("Working directory"),envVars:n(e(),e()).optional().describe("Environment variables (encrypted in storage)")}),p=r({id:e().describe("Unique identifier for the connection"),title:e().describe("Human-readable name for the connection"),created_at:e().describe("When the connection was created"),updated_at:e().describe("When the connection was last updated"),created_by:e().describe("User ID who created the connection"),updated_by:e().optional().describe("User ID who last updated the connection"),organization_id:e().describe("Organization ID this connection belongs to"),description:e().nullable().describe("Description of the connection"),icon:e().nullable().describe("Icon URL for the connection"),app_name:e().nullable().describe("Associated app name"),app_id:e().nullable().describe("Associated app ID"),connection_type:d(["HTTP","SSE","Websocket","STDIO"]).describe("Type of connection"),connection_url:e().nullable().describe("URL for HTTP/SSE/WebSocket connections. Null for STDIO."),connection_token:e().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:m([y,T]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:f.nullable().describe("OAuth configuration"),configuration_state:n(e(),s()).nullable().describe("Configuration state (decrypted)"),configuration_scopes:a(e()).nullable().optional().describe("Configuration scopes"),metadata:n(e(),s()).nullable().describe("Additional metadata (includes repository info)"),tools:a(g).nullable().describe("Discovered tools from MCP"),bindings:a(e()).nullable().describe("Detected bindings"),status:d(["active","inactive","error"]).describe("Current status")});p.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0});p.partial();export{h as U,w as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,j as s}from"./index-
|
|
1
|
+
import{c as S,j as s}from"./index-B9c3bNyk.js";import{C as _}from"./card-CRtF9cdr.js";import{c as j}from"./button-Ta3HWdYR.js";import{I as A}from"./empty-state-CSTjcp0X.js";function H(h){const e=S.c(40),{connection:t,onClick:g,headerActions:v,footer:C,className:k,size:R,fallbackIcon:z}=h,b=R===void 0?"md":R,y=b==="sm"?"p-4":"p-6",I=b==="sm"?"text-sm":"text-base",w=b==="sm"?"text-xs":"text-sm",E=g&&"hover:bg-muted/50";let i;e[0]!==k||e[1]!==E?(i=j("cursor-pointer transition-colors group",E,k),e[0]=k,e[1]=E,e[2]=i):i=e[2];let l;e[3]!==y?(l=j("flex flex-col gap-4 relative",y),e[3]=y,e[4]=l):l=e[4];let o;e[5]!==t.icon||e[6]!==t.title||e[7]!==z?(o=s.jsx(A,{icon:t.icon,name:t.title,size:"md",className:"shrink-0 shadow-sm",fallbackIcon:z}),e[5]=t.icon,e[6]=t.title,e[7]=z,e[8]=o):o=e[8];let n;e[9]!==v?(n=v&&s.jsx("div",{className:j("transition-opacity","opacity-0 group-hover:opacity-100"),onClick:q,children:v}),e[9]=v,e[10]=n):n=e[10];let c;e[11]!==n?(c=s.jsx("div",{className:"relative",children:n}),e[11]=n,e[12]=c):c=e[12];let r;e[13]!==o||e[14]!==c?(r=s.jsxs("div",{className:"flex items-start justify-between",children:[o,c]}),e[13]=o,e[14]=c,e[15]=r):r=e[15];let a;e[16]!==I?(a=j("font-medium text-foreground truncate",I),e[16]=I,e[17]=a):a=e[17];let m;e[18]!==t.title||e[19]!==a?(m=s.jsx("h3",{className:a,children:t.title}),e[18]=t.title,e[19]=a,e[20]=m):m=e[20];let d;e[21]!==w?(d=j("text-muted-foreground line-clamp-2",w),e[21]=w,e[22]=d):d=e[22];const P=t.description||"No description";let f;e[23]!==d||e[24]!==P?(f=s.jsx("p",{className:d,children:P}),e[23]=d,e[24]=P,e[25]=f):f=e[25];let p;e[26]!==m||e[27]!==f?(p=s.jsxs("div",{className:"flex flex-col gap-0",children:[m,f]}),e[26]=m,e[27]=f,e[28]=p):p=e[28];let x;e[29]!==C?(x=C&&s.jsx("div",{onClick:$,children:C}),e[29]=C,e[30]=x):x=e[30];let u;e[31]!==p||e[32]!==x||e[33]!==l||e[34]!==r?(u=s.jsxs("div",{className:l,children:[r,p,x]}),e[31]=p,e[32]=x,e[33]=l,e[34]=r,e[35]=u):u=e[35];let N;return e[36]!==g||e[37]!==u||e[38]!==i?(N=s.jsx(_,{className:i,onClick:g,children:u}),e[36]=g,e[37]=u,e[38]=i,e[39]=N):N=e[39],N}function $(h){return h.stopPropagation()}function q(h){return h.stopPropagation()}export{H as C};
|