@decocms/mesh 2.59.7 → 2.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/dist/client/assets/{AlertCircle-BFXBDrUr.js → AlertCircle-CiqOV3gN.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-CDtoEGeL.js → ArrowLeft-DESkG8WH.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-BDaeP-ZF.js → ArrowUp-DSzSuIWM.js} +1 -1
  4. package/dist/client/assets/{Calendar-Do1_EcNl.js → Calendar-Bgzpcx-P.js} +1 -1
  5. package/dist/client/assets/{Check-C7bGyGOC.js → Check-BwWwVwDq.js} +1 -1
  6. package/dist/client/assets/{ChevronDown-DY2hRH3P.js → ChevronDown-FrVOX9vD.js} +1 -1
  7. package/dist/client/assets/{Code01-Bti_O9RL.js → Code01-Bus4rjLa.js} +1 -1
  8. package/dist/client/assets/{Copy01-Cql6iNiT.js → Copy01-CU0ImpYo.js} +1 -1
  9. package/dist/client/assets/{DotsHorizontal-Bn70vF_C.js → DotsHorizontal-BXRQO4eG.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-55vBqpF9.js → DotsVertical-DWjt2LuM.js} +1 -1
  11. package/dist/client/assets/{Download01-CY_txTIU.js → Download01-B96RO3w0.js} +1 -1
  12. package/dist/client/assets/{Edit01-BcXXA0Bn.js → Edit01-1SiMuTuh.js} +1 -1
  13. package/dist/client/assets/{File02-CZ_CP680.js → File02-IAt_f4v7.js} +1 -1
  14. package/dist/client/assets/{File06-OiAbO58I.js → File06-C2LBZfWa.js} +1 -1
  15. package/dist/client/assets/{FilterLines-8ygYuAAi.js → FilterLines-CKQEFPmy.js} +1 -1
  16. package/dist/client/assets/{Grid01-Bdrpv4xX.js → Grid01-IjiH2KUT.js} +1 -1
  17. package/dist/client/assets/{Home02-BeNorB_C.js → Home02-B4t-Ls4v.js} +1 -1
  18. package/dist/client/assets/{Image01-DvLyxsOA.js → Image01-Bc9GrKYJ.js} +1 -1
  19. package/dist/client/assets/{Inbox01-BPkfViyI.js → Inbox01-Nf9S_z_u.js} +1 -1
  20. package/dist/client/assets/{InfoCircle-BJ2AMXf3.js → InfoCircle-f6Q2730q.js} +1 -1
  21. package/dist/client/assets/{Key01-D8HCSb8P.js → Key01-CwRA3KGV.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-BrLuchvz.js → LinkExternal01-B00_hrMY.js} +1 -1
  23. package/dist/client/assets/{List-bC7xiZ2s.js → List-CeDrqSzo.js} +1 -1
  24. package/dist/client/assets/{Loading01-BiNUjLDw.js → Loading01-k9J_51Wt.js} +1 -1
  25. package/dist/client/assets/{Lock01-Bg5yU8Wj.js → Lock01-BlcSKNwc.js} +1 -1
  26. package/dist/client/assets/{Pin01-iTXtWrRE.js → Pin01-CCrFQOyT.js} +1 -1
  27. package/dist/client/assets/{Play-C3Hph8xY.js → Play-DDry1DwY.js} +1 -1
  28. package/dist/client/assets/{Plus-BuZ2XoBN.js → Plus-B4bZuJyH.js} +1 -1
  29. package/dist/client/assets/{SearchMd-BeBVRrdw.js → SearchMd-CvLjdKIL.js} +1 -1
  30. package/dist/client/assets/{Share07-DldJlk64.js → Share07-pQXxyFdr.js} +1 -1
  31. package/dist/client/assets/{Terminal-EcSYzT5u.js → Terminal-CUhRn_Km.js} +1 -1
  32. package/dist/client/assets/{Tool01-CH0MYN-2.js → Tool01-BuQwOuwj.js} +1 -1
  33. package/dist/client/assets/{Trash01-DSwoFZY0.js → Trash01-CrkjtnA0.js} +1 -1
  34. package/dist/client/assets/{Upload01-CpcqtTNa.js → Upload01-Oco4mhUo.js} +1 -1
  35. package/dist/client/assets/{Users03-B6orUjW9.js → Users03-ChMrWUg7.js} +1 -1
  36. package/dist/client/assets/{X-DLZk4kqC.js → X-BYmeb6sr.js} +1 -1
  37. package/dist/client/assets/{XClose-C2SJXRFh.js → XClose-BrPaj-T9.js} +1 -1
  38. package/dist/client/assets/{agent-detail-1edzdNo4.js → agent-detail-BnemG27J.js} +1 -1
  39. package/dist/client/assets/{agents-CA-rSchF.js → agents-BcQ83pya.js} +1 -1
  40. package/dist/client/assets/{alert-dialog-Dllib4My.js → alert-dialog-DQH47fXT.js} +1 -1
  41. package/dist/client/assets/{auth-catchall-BOn2OyMJ.js → auth-catchall-BUSK9aWX.js} +1 -1
  42. package/dist/client/assets/{avatar-BfuaGHdb.js → avatar-DveL_Zo1.js} +1 -1
  43. package/dist/client/assets/{badge-DF_3zhMz.js → badge-DeCRZtfI.js} +1 -1
  44. package/dist/client/assets/{binder-CC8WnynZ.js → binder-ChJO9Gsr.js} +1 -1
  45. package/dist/client/assets/{button-0ydgHweE.js → button-D373Gh7m.js} +1 -1
  46. package/dist/client/assets/{card-DFhzHX-B.js → card-IZISqBEf.js} +1 -1
  47. package/dist/client/assets/{checkbox-JnNCVINs.js → checkbox-CuEgSK5M.js} +1 -1
  48. package/dist/client/assets/{circle-alert-C96B7toE.js → circle-alert-PbmGURsw.js} +1 -1
  49. package/dist/client/assets/{collapsible-CDAezpyL.js → collapsible-D5bXYEu5.js} +1 -1
  50. package/dist/client/assets/{collection-detail-ClXHe-PG.js → collection-detail-CKkNR8Za.js} +1 -1
  51. package/dist/client/assets/{collection-display-button-C0Qj_mDn.js → collection-display-button-DRWiQVZp.js} +1 -1
  52. package/dist/client/assets/{collection-header-CHcRbSVg.js → collection-header-BHLaNdMe.js} +1 -1
  53. package/dist/client/assets/{collection-page-pQhPuVgo.js → collection-page-BqHjcMvL.js} +1 -1
  54. package/dist/client/assets/{collection-search-rOPXHeEr.js → collection-search-B0S_3vCk.js} +1 -1
  55. package/dist/client/assets/{collection-tab-e3o0S9Wa.js → collection-tab-DpgA_w33.js} +1 -1
  56. package/dist/client/assets/{collection-table-wrapper-C4t2ZZhF.js → collection-table-wrapper-BP07sMyA.js} +1 -1
  57. package/dist/client/assets/{connect-DP_OT-gv.js → connect-FSagTGoo.js} +1 -1
  58. package/dist/client/assets/{connection-card-BLTFMSZS.js → connection-card-CaA_gyt_.js} +1 -1
  59. package/dist/client/assets/{connection-detail-C5TmRjj1.js → connection-detail-BjIkUIa9.js} +1 -1
  60. package/dist/client/assets/{connections-I2Vy-typ.js → connections-C53icvxv.js} +1 -1
  61. package/dist/client/assets/constants-BRQkgPgR.js +1 -0
  62. package/dist/client/assets/{constants-Mpett05j.js → constants-BsVN3aVM.js} +1 -1
  63. package/dist/client/assets/{create-organization-dialog-WqiCWTM4.js → create-organization-dialog-ByLHFsGC.js} +1 -1
  64. package/dist/client/assets/{dialog-6FUpHXs_.js → dialog-sp1iNNV1.js} +1 -1
  65. package/dist/client/assets/{dropdown-menu-CvHFB3Gz.js → dropdown-menu-B8A0M-FV.js} +1 -1
  66. package/dist/client/assets/{dynamic-plugin-layout-Mnd5muQb.js → dynamic-plugin-layout-D2ubHwXL.js} +1 -1
  67. package/dist/client/assets/{empty-state-7hq4AubF.js → empty-state-D4bELgmw.js} +1 -1
  68. package/dist/client/assets/{empty-state-BJnVPwS4.js → empty-state-DPLaHs22.js} +1 -1
  69. package/dist/client/assets/{env-vars-editor--TqeS791.js → env-vars-editor-DdPVHMBR.js} +1 -1
  70. package/dist/client/assets/{error-boundary-B6RXO2oI.js → error-boundary-DGGozsia.js} +1 -1
  71. package/dist/client/assets/{extract-connection-data-Cl2cHkSz.js → extract-connection-data-CgtoPpeo.js} +1 -1
  72. package/dist/client/assets/{file-browser-EXbuz5vW.js → file-browser-s-7cB8WF.js} +2 -2
  73. package/dist/client/assets/{form-Bu0daHLu.js → form-D_p7nR82.js} +1 -1
  74. package/dist/client/assets/{grid-view-C6S8iSjv.js → grid-view-CR-ahT4K.js} +1 -1
  75. package/dist/client/assets/{home-2CTqvtNy.js → home-BW1R0sGc.js} +1 -1
  76. package/dist/client/assets/{index-DZqSbjFw.js → index-504A5fzu.js} +2 -2
  77. package/dist/client/assets/{index-CXUcNyKS.js → index-BatxUpyp.js} +1 -1
  78. package/dist/client/assets/{index-BDvGMi--.js → index-C6RvA3pM.js} +1 -1
  79. package/dist/client/assets/index-CrlzOoQD.css +1 -0
  80. package/dist/client/assets/{index-CymrbMj5.js → index-CsaK2Zyj.js} +1 -1
  81. package/dist/client/assets/{index-Ez2DTosS.js → index-Cu1Yc5G-.js} +1 -1
  82. package/dist/client/assets/index-DsQNI0Ev.js +1 -0
  83. package/dist/client/assets/{infiniteQueryObserver-DmKtj9SR.js → infiniteQueryObserver-BZSSiryQ.js} +1 -1
  84. package/dist/client/assets/{input-u1hHzCA4.js → input-L4CnUGon.js} +1 -1
  85. package/dist/client/assets/{layout-DspSCzsh.js → layout-Cd5mhjJp.js} +1 -1
  86. package/dist/client/assets/{localstorage-keys-DpM3uKv7.js → localstorage-keys-ELyXVtKs.js} +1 -1
  87. package/dist/client/assets/{login-DoMEd-lv.js → login-DXDi7eVk.js} +1 -1
  88. package/dist/client/assets/{mcp-oauth-C7tn4XA4.js → mcp-oauth-B493s6Am.js} +1 -1
  89. package/dist/client/assets/{mcp-server-card-HpdQ81Kj.js → mcp-server-card-DAhW5oLh.js} +1 -1
  90. package/dist/client/assets/{mcp-server-detail-DhHV0S77.js → mcp-server-detail-B8SoA6bl.js} +2 -2
  91. package/dist/client/assets/{members-NoyLiC53.js → members-81fV-UkW.js} +1 -1
  92. package/dist/client/assets/{monaco-editor-CZ0mtshA.js → monaco-editor-NeTwO1He.js} +1 -1
  93. package/dist/client/assets/{monitoring-rg9mX2h3.js → monitoring-H5l7qvJR.js} +1 -1
  94. package/dist/client/assets/{oauth-callback-BskSq0jW.js → oauth-callback-areeupDS.js} +1 -1
  95. package/dist/client/assets/{page-BpnXhWf3.js → page-CA1T9606.js} +1 -1
  96. package/dist/client/assets/{page-KXdqzJaF.js → page-blk1xcgv.js} +1 -1
  97. package/dist/client/assets/{pin-to-sidebar-button-Bsv2_7kr.js → pin-to-sidebar-button-CzNm9Z63.js} +1 -1
  98. package/dist/client/assets/{plugin-empty-state-rg6DAYSw.js → plugin-empty-state-Dyr-7-tg.js} +1 -1
  99. package/dist/client/assets/{plugin-header-Cnc4tGD7.js → plugin-header-ei5KGTL7.js} +1 -1
  100. package/dist/client/assets/{plugins-CW7mTNa6.js → plugins-QxavFgPC.js} +1 -1
  101. package/dist/client/assets/{popover-DEmRxXmY.js → popover-BW-chC87.js} +1 -1
  102. package/dist/client/assets/{registry-utils-BFBDFgyu.js → registry-utils-DsqnXOg4.js} +1 -1
  103. package/dist/client/assets/{resizable-akHzriSj.js → resizable-BKhOe-uT.js} +1 -1
  104. package/dist/client/assets/{resource-tabs-1el8gNET.js → resource-tabs-BcGtnPlu.js} +1 -1
  105. package/dist/client/assets/{select-BKwPUbTK.js → select-BXQ9vi5I.js} +1 -1
  106. package/dist/client/assets/{settings-ZWpf163v.js → settings-BYYaB1XF.js} +1 -1
  107. package/dist/client/assets/shell-layout-B3owq9Ia.js +12 -0
  108. package/dist/client/assets/{spinner-Bwqz03rl.js → spinner-DGXi0Fqy.js} +1 -1
  109. package/dist/client/assets/{store-invite-DJTXOg3a.js → store-invite-B71tyOTJ.js} +1 -1
  110. package/dist/client/assets/{switch-DNIxf6Z3.js → switch-Cy8A6BDO.js} +1 -1
  111. package/dist/client/assets/{textarea-CLIBzUIu.js → textarea-D6uAjk7M.js} +1 -1
  112. package/dist/client/assets/{tools-list-DopNeyHc.js → tools-list-B4q7Xm3-.js} +1 -1
  113. package/dist/client/assets/{tooltip-9zLX7HP0.js → tooltip-BXVSpXAI.js} +1 -1
  114. package/dist/client/assets/{typewriter-title-BJariIWR.js → typewriter-title-CO1Atowa.js} +1 -1
  115. package/dist/client/assets/{use-binding-B1LqCJr8.js → use-binding-C0SFeppw.js} +1 -1
  116. package/dist/client/assets/{use-collections-DtjYeVzj.js → use-collections-DgQLvk8y.js} +1 -1
  117. package/dist/client/assets/{use-connection-BzhGWFyL.js → use-connection-CXgi6BLT.js} +1 -1
  118. package/dist/client/assets/{use-create-virtual-mcp-D-7Y6G3j.js → use-create-virtual-mcp-C56z94et.js} +1 -1
  119. package/dist/client/assets/use-deco-chat-open-CnAfKKCI.js +1 -0
  120. package/dist/client/assets/{use-list-state-BfmIALu7.js → use-list-state-DKFwP-fh.js} +1 -1
  121. package/dist/client/assets/{use-mcp-prompts-C2Az2O1z.js → use-mcp-prompts-Cauox13I.js} +1 -1
  122. package/dist/client/assets/{use-members-KzHxearI.js → use-members-hSITWRgA.js} +1 -1
  123. package/dist/client/assets/{use-mobile-VtwOaDa5.js → use-mobile-BvueHiH_.js} +1 -1
  124. package/dist/client/assets/{use-organization-settings-DMGaX8N0.js → use-organization-settings-wk-RrGpZ.js} +1 -1
  125. package/dist/client/assets/{use-virtual-mcp-D3UgDP8i.js → use-virtual-mcp-PjR1OFlb.js} +1 -1
  126. package/dist/client/assets/useInfiniteQuery-DcmndbVK.js +1 -0
  127. package/dist/client/assets/{useMutation-BReaxe_W.js → useMutation-DjmEVTlE.js} +1 -1
  128. package/dist/client/assets/useQuery-2fM2t_EQ.js +1 -0
  129. package/dist/client/assets/useSuspenseInfiniteQuery-BQW4uJSq.js +1 -0
  130. package/dist/client/assets/{view-mode-toggle-DR9UFNqr.js → view-mode-toggle-CCTPeHCH.js} +1 -1
  131. package/dist/client/assets/{workflow-B1lnmdqO.js → workflow-DcdxDnBB.js} +1 -1
  132. package/dist/client/index.html +2 -2
  133. package/package.json +1 -1
  134. package/dist/client/assets/constants-OFVhPv4G.js +0 -1
  135. package/dist/client/assets/index-6m1DUVC_.js +0 -1
  136. package/dist/client/assets/index-CqeIU8-o.css +0 -1
  137. package/dist/client/assets/shell-layout-D0SSCuI2.js +0 -3
  138. package/dist/client/assets/use-deco-chat-open-CrQFHW7J.js +0 -1
  139. package/dist/client/assets/useInfiniteQuery-CaX6JmUq.js +0 -1
  140. package/dist/client/assets/useQuery-KlPPWaKy.js +0 -1
  141. package/dist/client/assets/useSuspenseInfiniteQuery-jy6MmqiZ.js +0 -1
@@ -1 +1 @@
1
- import{c as Z,j as t,r as ee,u as te,l as se}from"./index-DZqSbjFw.js";import{C as oe}from"./collection-header-CHcRbSVg.js";import{C as re}from"./collection-page-pQhPuVgo.js";import{C as ne}from"./collection-search-rOPXHeEr.js";import{C as ie}from"./collection-table-wrapper-C4t2ZZhF.js";import{C as ae}from"./connection-card-BLTFMSZS.js";import{E as W,I as le}from"./empty-state-BJnVPwS4.js";import{E as ce}from"./error-boundary-B6RXO2oI.js";import{u as de,s as G}from"./use-list-state-BfmIALu7.js";import{u as me}from"./use-create-virtual-mcp-D-7Y6G3j.js";import{i as ge}from"./constants-Mpett05j.js";import{b as ue,a as pe}from"./use-virtual-mcp-D3UgDP8i.js";import{c as he,b as fe,d as xe,A as je,e as Ce,g as we,a as ye,f as Ne}from"./alert-dialog-Dllib4My.js";import{B as De}from"./badge-DF_3zhMz.js";import{B as q}from"./button-0ydgHweE.js";import{D as J,a as Q,b as U,c as E}from"./dropdown-menu-CvHFB3Gz.js";import{i as X}from"./DotsVertical-55vBqpF9.js";import{i as Se}from"./Loading01-BiNUjLDw.js";import{s as Y}from"./Trash01-DSwoFZY0.js";import{t as x}from"./Users03-B6orUjW9.js";import"./collection-display-button-C0Qj_mDn.js";import"./ArrowUp-BDaeP-ZF.js";import"./Check-C7bGyGOC.js";import"./Grid01-Bdrpv4xX.js";import"./List-bC7xiZ2s.js";import"./tooltip-9zLX7HP0.js";import"./view-mode-toggle-DR9UFNqr.js";import"./SearchMd-BeBVRrdw.js";import"./input-u1hHzCA4.js";import"./card-DFhzHX-B.js";import"./use-mobile-VtwOaDa5.js";import"./use-collections-DtjYeVzj.js";import"./useMutation-BReaxe_W.js";import"./useQuery-KlPPWaKy.js";function be(e,r){switch(r.type){case"delete":return{mode:"deleting",virtualMcp:r.virtualMcp};case"close":return{mode:"idle"}}}function ve(){const e=Z.c(62),{org:r}=te(),i=se();let j;e[0]!==r.slug?(j={namespace:r.slug,resource:"agents"},e[0]=r.slug,e[1]=j):j=e[1];const s=de(j),f=ue(s);let C;e[2]===Symbol.for("react.memo_cache_sentinel")?(C={navigateOnCreate:!0},e[2]=C):C=e[2];const{createVirtualMCP:V,isCreating:w}=me(C),O=pe();let y;e[3]===Symbol.for("react.memo_cache_sentinel")?(y={mode:"idle"},e[3]=y):y=e[3];const[n,N]=ee.useReducer(be,y);let D;e[4]!==O||e[5]!==n.mode||e[6]!==n.virtualMcp?(D=async()=>{if(n.mode!=="deleting")return;const o=n.virtualMcp.id;if(N({type:"close"}),!(!o||ge(o)))try{await O.delete.mutateAsync(o)}catch{}},e[4]=O,e[5]=n.mode,e[6]=n.virtualMcp,e[7]=D):D=e[7];const B=D;let S,b,v,k,A;e[8]===Symbol.for("react.memo_cache_sentinel")?(S={id:"icon",header:"",render:Ke,cellClassName:"w-16 shrink-0",wrap:!0},b={id:"title",header:"Name",render:$e,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},v={id:"description",header:"Description",render:_e,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},k={id:"connections",header:"Connections",render:Pe,cellClassName:"w-24 shrink-0"},A={id:"status",header:"Status",render:Ie,cellClassName:"w-24 shrink-0",sortable:!0},e[8]=S,e[9]=b,e[10]=v,e[11]=k,e[12]=A):(S=e[8],b=e[9],v=e[10],k=e[11],A=e[12]);let z;e[13]!==i||e[14]!==r.slug?(z=[S,b,v,k,A,{id:"actions",header:"",render:o=>t.jsxs(J,{children:[t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Me,children:t.jsx(X,{size:20})})}),t.jsxs(U,{align:"end",onClick:ze,children:[t.jsxs(E,{onClick:a=>{a.stopPropagation(),i({to:"/$org/agents/$agentId",params:{org:r.slug,agentId:o.id}})},children:[t.jsx(G,{size:16}),"Open"]}),t.jsxs(E,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",virtualMcp:o})},children:[t.jsx(Y,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[13]=i,e[14]=r.slug,e[15]=z):z=e[15];const R=z,T=w?"Creating...":"Create Agent";let M;e[16]!==V||e[17]!==w||e[18]!==T?(M=t.jsx(q,{onClick:V,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:w,children:T}),e[16]=V,e[17]=w,e[18]=T,e[19]=M):M=e[19];const H=M,L=n.mode==="deleting";let I;e[20]===Symbol.for("react.memo_cache_sentinel")?(I=o=>!o&&N({type:"close"}),e[20]=I):I=e[20];let P;e[21]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(he,{children:"Delete Agent?"}),e[21]=P):P=e[21];const F=n.mode==="deleting"&&n.virtualMcp.title;let l;e[22]!==F?(l=t.jsxs(fe,{children:[P,t.jsxs(xe,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:F}),"."]})]}),e[22]=F,e[23]=l):l=e[23];let _;e[24]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(je,{children:"Cancel"}),e[24]=_):_=e[24];let c;e[25]!==B?(c=t.jsxs(Ce,{children:[_,t.jsx(we,{onClick:B,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[25]=B,e[26]=c):c=e[26];let d;e[27]!==l||e[28]!==c?(d=t.jsxs(ye,{children:[l,c]}),e[27]=l,e[28]=c,e[29]=d):d=e[29];let m;e[30]!==L||e[31]!==d?(m=t.jsx(Ne,{open:L,onOpenChange:I,children:d}),e[30]=L,e[31]=d,e[32]=m):m=e[32];let $;e[33]===Symbol.for("react.memo_cache_sentinel")?($=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"status",label:"Status"}],e[33]=$):$=e[33];let g;e[34]!==H||e[35]!==s.handleSort||e[36]!==s.setViewMode||e[37]!==s.sortDirection||e[38]!==s.sortKey||e[39]!==s.viewMode?(g=t.jsx(oe,{title:"Agents",viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:$,ctaButton:H}),e[34]=H,e[35]=s.handleSort,e[36]=s.setViewMode,e[37]=s.sortDirection,e[38]=s.sortKey,e[39]=s.viewMode,e[40]=g):g=e[40];let u;e[41]!==s?(u=o=>{o.key==="Escape"&&(s.setSearch(""),o.target.blur())},e[41]=s,e[42]=u):u=e[42];let p;e[43]!==s.search||e[44]!==s.setSearch||e[45]!==u?(p=t.jsx(ne,{value:s.search,onChange:s.setSearch,placeholder:"Search for an agent...",onKeyDown:u}),e[43]=s.search,e[44]=s.setSearch,e[45]=u,e[46]=p):p=e[46];let h;e[47]!==R||e[48]!==s.handleSort||e[49]!==s.search||e[50]!==s.sortDirection||e[51]!==s.sortKey||e[52]!==s.viewMode||e[53]!==i||e[54]!==r.slug||e[55]!==f?(h=s.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:f.length===0?t.jsx(W,{image:t.jsx(x,{size:36,className:"text-muted-foreground"}),title:s.search?"No agents found":"No agents yet",description:s.search?`No agents match "${s.search}"`:"Create an agent to aggregate tools from multiple Connections."}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:f.map(o=>t.jsx(ae,{connection:{id:o.id??"",title:o.title,description:o.description,icon:o.icon,status:o.status},fallbackIcon:t.jsx(x,{}),onClick:()=>i({to:"/$org/agents/$agentId",params:{org:r.slug,agentId:o.id}}),footer:t.jsx("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:t.jsxs("span",{children:[o.connections.length," connection",o.connections.length!==1?"s":""]})}),headerActions:t.jsxs(J,{children:[t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ae,children:t.jsx(X,{size:20})})}),t.jsxs(U,{align:"end",onClick:ke,children:[t.jsxs(E,{onClick:a=>{a.stopPropagation(),i({to:"/$org/agents/$agentId",params:{org:r.slug,agentId:o.id}})},children:[t.jsx(G,{size:16}),"Open"]}),t.jsxs(E,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",virtualMcp:o})},children:[t.jsx(Y,{size:16}),"Delete"]})]})]})},o.id??"default"))})}):t.jsx(ie,{columns:R,data:f,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:o=>i({to:"/$org/agents/$agentId",params:{org:r.slug,agentId:o.id}}),emptyState:s.search?t.jsx(W,{image:t.jsx(x,{size:36,className:"text-muted-foreground"}),title:"No agents found",description:`No agents match "${s.search}"`}):t.jsx(W,{image:t.jsx(x,{size:36,className:"text-muted-foreground"}),title:"No agents yet",description:"Create an agent to aggregate tools from multiple Connections."})}),e[47]=R,e[48]=s.handleSort,e[49]=s.search,e[50]=s.sortDirection,e[51]=s.sortKey,e[52]=s.viewMode,e[53]=i,e[54]=r.slug,e[55]=f,e[56]=h):h=e[56];let K;return e[57]!==m||e[58]!==g||e[59]!==p||e[60]!==h?(K=t.jsxs(re,{children:[m,g,p,h]}),e[57]=m,e[58]=g,e[59]=p,e[60]=h,e[61]=K):K=e[61],K}function ke(e){return e.stopPropagation()}function Ae(e){return e.stopPropagation()}function ze(e){return e.stopPropagation()}function Me(e){return e.stopPropagation()}function Ie(e){return t.jsx(De,{variant:e.status==="active"?"default":"outline",children:e.status})}function Pe(e){return t.jsx("span",{className:"text-sm text-muted-foreground",children:e.connections.length})}function _e(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function $e(e){return t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})}function Ke(e){return t.jsx(le,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(x,{size:16})})}function ft(){const e=Z.c(1);let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(ce,{children:t.jsx(ee.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Se,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(ve,{})})}),e[0]=r):r=e[0],r}export{ft as default};
1
+ import{c as Z,j as t,r as ee,u as te,l as se}from"./index-504A5fzu.js";import{C as oe}from"./collection-header-BHLaNdMe.js";import{C as re}from"./collection-page-BqHjcMvL.js";import{C as ne}from"./collection-search-B0S_3vCk.js";import{C as ie}from"./collection-table-wrapper-BP07sMyA.js";import{C as ae}from"./connection-card-CaA_gyt_.js";import{E as W,I as le}from"./empty-state-DPLaHs22.js";import{E as ce}from"./error-boundary-DGGozsia.js";import{u as de,s as G}from"./use-list-state-DKFwP-fh.js";import{u as me}from"./use-create-virtual-mcp-C56z94et.js";import{i as ge}from"./constants-BsVN3aVM.js";import{b as ue,a as pe}from"./use-virtual-mcp-PjR1OFlb.js";import{c as he,b as fe,d as xe,A as je,e as Ce,g as we,a as ye,f as Ne}from"./alert-dialog-DQH47fXT.js";import{B as De}from"./badge-DeCRZtfI.js";import{B as q}from"./button-D373Gh7m.js";import{D as J,a as Q,b as U,c as E}from"./dropdown-menu-B8A0M-FV.js";import{i as X}from"./DotsVertical-DWjt2LuM.js";import{i as Se}from"./Loading01-k9J_51Wt.js";import{s as Y}from"./Trash01-CrkjtnA0.js";import{t as x}from"./Users03-ChMrWUg7.js";import"./collection-display-button-DRWiQVZp.js";import"./ArrowUp-DSzSuIWM.js";import"./Check-BwWwVwDq.js";import"./Grid01-IjiH2KUT.js";import"./List-CeDrqSzo.js";import"./tooltip-BXVSpXAI.js";import"./view-mode-toggle-CCTPeHCH.js";import"./SearchMd-CvLjdKIL.js";import"./input-L4CnUGon.js";import"./card-IZISqBEf.js";import"./use-mobile-BvueHiH_.js";import"./use-collections-DgQLvk8y.js";import"./useMutation-DjmEVTlE.js";import"./useQuery-2fM2t_EQ.js";function be(e,r){switch(r.type){case"delete":return{mode:"deleting",virtualMcp:r.virtualMcp};case"close":return{mode:"idle"}}}function ve(){const e=Z.c(62),{org:r}=te(),i=se();let j;e[0]!==r.slug?(j={namespace:r.slug,resource:"agents"},e[0]=r.slug,e[1]=j):j=e[1];const s=de(j),f=ue(s);let C;e[2]===Symbol.for("react.memo_cache_sentinel")?(C={navigateOnCreate:!0},e[2]=C):C=e[2];const{createVirtualMCP:V,isCreating:w}=me(C),O=pe();let y;e[3]===Symbol.for("react.memo_cache_sentinel")?(y={mode:"idle"},e[3]=y):y=e[3];const[n,N]=ee.useReducer(be,y);let D;e[4]!==O||e[5]!==n.mode||e[6]!==n.virtualMcp?(D=async()=>{if(n.mode!=="deleting")return;const o=n.virtualMcp.id;if(N({type:"close"}),!(!o||ge(o)))try{await O.delete.mutateAsync(o)}catch{}},e[4]=O,e[5]=n.mode,e[6]=n.virtualMcp,e[7]=D):D=e[7];const B=D;let S,b,v,k,A;e[8]===Symbol.for("react.memo_cache_sentinel")?(S={id:"icon",header:"",render:Ke,cellClassName:"w-16 shrink-0",wrap:!0},b={id:"title",header:"Name",render:$e,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},v={id:"description",header:"Description",render:_e,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},k={id:"connections",header:"Connections",render:Pe,cellClassName:"w-24 shrink-0"},A={id:"status",header:"Status",render:Ie,cellClassName:"w-24 shrink-0",sortable:!0},e[8]=S,e[9]=b,e[10]=v,e[11]=k,e[12]=A):(S=e[8],b=e[9],v=e[10],k=e[11],A=e[12]);let z;e[13]!==i||e[14]!==r.slug?(z=[S,b,v,k,A,{id:"actions",header:"",render:o=>t.jsxs(J,{children:[t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Me,children:t.jsx(X,{size:20})})}),t.jsxs(U,{align:"end",onClick:ze,children:[t.jsxs(E,{onClick:a=>{a.stopPropagation(),i({to:"/$org/agents/$agentId",params:{org:r.slug,agentId:o.id}})},children:[t.jsx(G,{size:16}),"Open"]}),t.jsxs(E,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",virtualMcp:o})},children:[t.jsx(Y,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[13]=i,e[14]=r.slug,e[15]=z):z=e[15];const R=z,T=w?"Creating...":"Create Agent";let M;e[16]!==V||e[17]!==w||e[18]!==T?(M=t.jsx(q,{onClick:V,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:w,children:T}),e[16]=V,e[17]=w,e[18]=T,e[19]=M):M=e[19];const H=M,L=n.mode==="deleting";let I;e[20]===Symbol.for("react.memo_cache_sentinel")?(I=o=>!o&&N({type:"close"}),e[20]=I):I=e[20];let P;e[21]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(he,{children:"Delete Agent?"}),e[21]=P):P=e[21];const F=n.mode==="deleting"&&n.virtualMcp.title;let l;e[22]!==F?(l=t.jsxs(fe,{children:[P,t.jsxs(xe,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:F}),"."]})]}),e[22]=F,e[23]=l):l=e[23];let _;e[24]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(je,{children:"Cancel"}),e[24]=_):_=e[24];let c;e[25]!==B?(c=t.jsxs(Ce,{children:[_,t.jsx(we,{onClick:B,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[25]=B,e[26]=c):c=e[26];let d;e[27]!==l||e[28]!==c?(d=t.jsxs(ye,{children:[l,c]}),e[27]=l,e[28]=c,e[29]=d):d=e[29];let m;e[30]!==L||e[31]!==d?(m=t.jsx(Ne,{open:L,onOpenChange:I,children:d}),e[30]=L,e[31]=d,e[32]=m):m=e[32];let $;e[33]===Symbol.for("react.memo_cache_sentinel")?($=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"status",label:"Status"}],e[33]=$):$=e[33];let g;e[34]!==H||e[35]!==s.handleSort||e[36]!==s.setViewMode||e[37]!==s.sortDirection||e[38]!==s.sortKey||e[39]!==s.viewMode?(g=t.jsx(oe,{title:"Agents",viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:$,ctaButton:H}),e[34]=H,e[35]=s.handleSort,e[36]=s.setViewMode,e[37]=s.sortDirection,e[38]=s.sortKey,e[39]=s.viewMode,e[40]=g):g=e[40];let u;e[41]!==s?(u=o=>{o.key==="Escape"&&(s.setSearch(""),o.target.blur())},e[41]=s,e[42]=u):u=e[42];let p;e[43]!==s.search||e[44]!==s.setSearch||e[45]!==u?(p=t.jsx(ne,{value:s.search,onChange:s.setSearch,placeholder:"Search for an agent...",onKeyDown:u}),e[43]=s.search,e[44]=s.setSearch,e[45]=u,e[46]=p):p=e[46];let h;e[47]!==R||e[48]!==s.handleSort||e[49]!==s.search||e[50]!==s.sortDirection||e[51]!==s.sortKey||e[52]!==s.viewMode||e[53]!==i||e[54]!==r.slug||e[55]!==f?(h=s.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:f.length===0?t.jsx(W,{image:t.jsx(x,{size:36,className:"text-muted-foreground"}),title:s.search?"No agents found":"No agents yet",description:s.search?`No agents match "${s.search}"`:"Create an agent to aggregate tools from multiple Connections."}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:f.map(o=>t.jsx(ae,{connection:{id:o.id??"",title:o.title,description:o.description,icon:o.icon,status:o.status},fallbackIcon:t.jsx(x,{}),onClick:()=>i({to:"/$org/agents/$agentId",params:{org:r.slug,agentId:o.id}}),footer:t.jsx("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:t.jsxs("span",{children:[o.connections.length," connection",o.connections.length!==1?"s":""]})}),headerActions:t.jsxs(J,{children:[t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ae,children:t.jsx(X,{size:20})})}),t.jsxs(U,{align:"end",onClick:ke,children:[t.jsxs(E,{onClick:a=>{a.stopPropagation(),i({to:"/$org/agents/$agentId",params:{org:r.slug,agentId:o.id}})},children:[t.jsx(G,{size:16}),"Open"]}),t.jsxs(E,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",virtualMcp:o})},children:[t.jsx(Y,{size:16}),"Delete"]})]})]})},o.id??"default"))})}):t.jsx(ie,{columns:R,data:f,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:o=>i({to:"/$org/agents/$agentId",params:{org:r.slug,agentId:o.id}}),emptyState:s.search?t.jsx(W,{image:t.jsx(x,{size:36,className:"text-muted-foreground"}),title:"No agents found",description:`No agents match "${s.search}"`}):t.jsx(W,{image:t.jsx(x,{size:36,className:"text-muted-foreground"}),title:"No agents yet",description:"Create an agent to aggregate tools from multiple Connections."})}),e[47]=R,e[48]=s.handleSort,e[49]=s.search,e[50]=s.sortDirection,e[51]=s.sortKey,e[52]=s.viewMode,e[53]=i,e[54]=r.slug,e[55]=f,e[56]=h):h=e[56];let K;return e[57]!==m||e[58]!==g||e[59]!==p||e[60]!==h?(K=t.jsxs(re,{children:[m,g,p,h]}),e[57]=m,e[58]=g,e[59]=p,e[60]=h,e[61]=K):K=e[61],K}function ke(e){return e.stopPropagation()}function Ae(e){return e.stopPropagation()}function ze(e){return e.stopPropagation()}function Me(e){return e.stopPropagation()}function Ie(e){return t.jsx(De,{variant:e.status==="active"?"default":"outline",children:e.status})}function Pe(e){return t.jsx("span",{className:"text-sm text-muted-foreground",children:e.connections.length})}function _e(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function $e(e){return t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})}function Ke(e){return t.jsx(le,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(x,{size:16})})}function ft(){const e=Z.c(1);let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(ce,{children:t.jsx(ee.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Se,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(ve,{})})}),e[0]=r):r=e[0],r}export{ft as default};
@@ -1,4 +1,4 @@
1
- import{r as i,y as m,j as r,aL as T,J as w,z as O,X as A,H as M,T as I,M as z,Q as L,aM as D,aN as F,E as G,W as H,U as W,c as n}from"./index-DZqSbjFw.js";import{c as p,b as v}from"./button-0ydgHweE.js";var x="AlertDialog",[k]=G(x,[D]),d=D(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(M,{...a,...t,modal:!0})};N.displayName=x;var V="AlertDialogTrigger",Y=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(H,{...o,...a,ref:e})});Y.displayName=V;var q="AlertDialogPortal",y=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(L,{...a,...t})};y.displayName=q;var B="AlertDialogOverlay",_=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(W,{...o,...a,ref:e})});_.displayName=B;var f="AlertDialogContent",[J,Q]=k(f),U=F("AlertDialogContent"),j=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=i.useRef(null),P=m(e,c),u=i.useRef(null);return r.jsx(T,{contentName:f,titleName:b,docsSlug:"alert-dialog",children:r.jsx(J,{scope:t,cancelRef:u,children:r.jsxs(w,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:O(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[r.jsx(U,{children:a}),r.jsx(K,{contentRef:c})]})})})});j.displayName=f;var b="AlertDialogTitle",h=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(I,{...o,...a,ref:e})});h.displayName=b;var E="AlertDialogDescription",R=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(z,{...o,...a,ref:e})});R.displayName=E;var X="AlertDialogAction",C=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});C.displayName=X;var $="AlertDialogCancel",S=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=Q($,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});S.displayName=$;var K=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
1
+ import{r as i,y as m,j as r,aL as T,J as w,z as O,X as A,H as M,T as I,M as z,Q as L,aM as D,aN as F,E as G,W as H,U as W,c as n}from"./index-504A5fzu.js";import{c as p,b as v}from"./button-D373Gh7m.js";var x="AlertDialog",[k]=G(x,[D]),d=D(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(M,{...a,...t,modal:!0})};N.displayName=x;var V="AlertDialogTrigger",Y=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(H,{...o,...a,ref:e})});Y.displayName=V;var q="AlertDialogPortal",y=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(L,{...a,...t})};y.displayName=q;var B="AlertDialogOverlay",_=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(W,{...o,...a,ref:e})});_.displayName=B;var f="AlertDialogContent",[J,Q]=k(f),U=F("AlertDialogContent"),j=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=i.useRef(null),P=m(e,c),u=i.useRef(null);return r.jsx(T,{contentName:f,titleName:b,docsSlug:"alert-dialog",children:r.jsx(J,{scope:t,cancelRef:u,children:r.jsxs(w,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:O(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[r.jsx(U,{children:a}),r.jsx(K,{contentRef:c})]})})})});j.displayName=f;var b="AlertDialogTitle",h=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(I,{...o,...a,ref:e})});h.displayName=b;var E="AlertDialogDescription",R=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(z,{...o,...a,ref:e})});R.displayName=E;var X="AlertDialogAction",C=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});C.displayName=X;var $="AlertDialogCancel",S=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=Q($,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});S.displayName=$;var K=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
2
2
 
3
3
  You can add a description to the \`${f}\` by passing a \`${E}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
4
 
@@ -1 +1 @@
1
- import{c as r,a as m,j as n,A as o}from"./index-DZqSbjFw.js";function i(){const e=r.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/auth/$pathname"},e[0]=t):t=e[0];const{pathname:s}=m(t);let a;return e[1]!==s?(a=n.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:n.jsx(o,{pathname:s})}),e[1]=s,e[2]=a):a=e[2],a}export{i as default};
1
+ import{c as r,a as m,j as n,A as o}from"./index-504A5fzu.js";function i(){const e=r.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/auth/$pathname"},e[0]=t):t=e[0];const{pathname:s}=m(t);let a;return e[1]!==s?(a=n.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:n.jsx(o,{pathname:s})}),e[1]=s,e[2]=a):a=e[2],a}export{i as default};
@@ -1 +1 @@
1
- import{r as I,c as j,j as i,t as S,aI as $,aJ as L,aK as M}from"./index-DZqSbjFw.js";import{c as f}from"./button-0ydgHweE.js";const V=({size:a=24,color:e="currentColor",...s})=>I.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},I.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 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("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 W(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 R=["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"],_="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function B(a){let e=0;for(let t=0;t<a.length;t++)e=a.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%R.length;return R[s]}const U=S("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=S("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),J=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 K(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]=I.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=_;break e}if(typeof t=="string"){let c;e[11]!==t?(c=B(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=R[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:J(h)})}):i.jsxs(i.Fragment,{children:[l&&!m&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:f(D({objectFit:u})),onError:()=>x(!0)}),(!l||m)&&i.jsx(W,{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 Z(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(K,{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}Z.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{Z as A};
1
+ import{r as I,c as j,j as i,t as S,aI as $,aJ as L,aK as M}from"./index-504A5fzu.js";import{c as f}from"./button-D373Gh7m.js";const V=({size:a=24,color:e="currentColor",...s})=>I.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},I.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 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("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 W(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 R=["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"],_="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function B(a){let e=0;for(let t=0;t<a.length;t++)e=a.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%R.length;return R[s]}const U=S("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=S("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),J=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 K(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]=I.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=_;break e}if(typeof t=="string"){let c;e[11]!==t?(c=B(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=R[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:J(h)})}):i.jsxs(i.Fragment,{children:[l&&!m&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:f(D({objectFit:u})),onError:()=>x(!0)}),(!l||m)&&i.jsx(W,{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 Z(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(K,{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}Z.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{Z as A};
@@ -1 +1 @@
1
- import{c as d,j as u,$ as l,t as v}from"./index-DZqSbjFw.js";import{c as g}from"./button-0ydgHweE.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
+ import{c as d,j as u,$ as l,t as v}from"./index-504A5fzu.js";import{c as g}from"./button-D373Gh7m.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-DZqSbjFw.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{a,s as c};
1
+ import"./index-504A5fzu.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{a,s as c};
@@ -1 +1 @@
1
- import{aR as g,aS as u,c as l,j as v,$ as b,t as p}from"./index-DZqSbjFw.js";function x(...a){return g(u(a))}const f=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(f({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,f as b,x as c};
1
+ import{aR as g,aS as u,c as l,j as v,$ as b,t as p}from"./index-504A5fzu.js";function x(...a){return g(u(a))}const f=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(f({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,f as b,x as c};
@@ -1 +1 @@
1
- import{c,j as l}from"./index-DZqSbjFw.js";import{c as n}from"./button-0ydgHweE.js";function f(o){const e=c.c(8);let r,t;e[0]!==o?({className:r,...t}=o,e[0]=o,e[1]=r,e[2]=t):(r=e[1],t=e[2]);let s;e[3]!==r?(s=n("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]=s):s=e[4];let a;return e[5]!==t||e[6]!==s?(a=l.jsx("div",{"data-slot":"card",className:s,...t}),e[5]=t,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(4);let r;e[0]!==o?({...r}=o,e[0]=o,e[1]=r):r=e[1];let t;return e[2]!==r?(t=l.jsx("div",{"data-slot":"card-content",...r}),e[2]=r,e[3]=t):t=e[3],t}export{f as C,p as a};
1
+ import{c,j as l}from"./index-504A5fzu.js";import{c as n}from"./button-D373Gh7m.js";function f(o){const e=c.c(8);let r,t;e[0]!==o?({className:r,...t}=o,e[0]=o,e[1]=r,e[2]=t):(r=e[1],t=e[2]);let s;e[3]!==r?(s=n("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]=s):s=e[4];let a;return e[5]!==t||e[6]!==s?(a=l.jsx("div",{"data-slot":"card",className:s,...t}),e[5]=t,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(4);let r;e[0]!==o?({...r}=o,e[0]=o,e[1]=r):r=e[1];let t;return e[2]!==r?(t=l.jsx("div",{"data-slot":"card-content",...r}),e[2]=r,e[3]=t):t=e[3],t}export{f as C,p as a};
@@ -1 +1 @@
1
- import{c as d,j as c,ae as n,af as l}from"./index-DZqSbjFw.js";import{i as m}from"./Check-C7bGyGOC.js";import{c as b}from"./button-0ydgHweE.js";function x(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{x as C};
1
+ import{c as d,j as c,ae as n,af as l}from"./index-504A5fzu.js";import{i as m}from"./Check-BwWwVwDq.js";import{c as b}from"./button-D373Gh7m.js";function x(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{x as C};
@@ -1 +1 @@
1
- import{r as c}from"./index-DZqSbjFw.js";const h=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase()),i=t=>{const e=y(t);return e.charAt(0).toUpperCase()+e.slice(1)},l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim(),f=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var k={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const w=c.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:s="",children:a,iconNode:p,...n},d)=>c.createElement("svg",{ref:d,...k,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",s),...!a&&!f(n)&&{"aria-hidden":"true"},...n},[...p.map(([m,C])=>c.createElement(m,C)),...Array.isArray(a)?a:[a]]));const u=(t,e)=>{const r=c.forwardRef(({className:o,...s},a)=>c.createElement(w,{ref:a,iconNode:e,className:l(`lucide-${h(i(t))}`,`lucide-${t}`,o),...s}));return r.displayName=i(t),r};const g=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],b=u("check",g);const x=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],L=u("circle-alert",x);export{L as C,b as a,u as c};
1
+ import{r as c}from"./index-504A5fzu.js";const h=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase()),i=t=>{const e=y(t);return e.charAt(0).toUpperCase()+e.slice(1)},l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim(),f=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var k={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const w=c.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:s="",children:a,iconNode:p,...n},d)=>c.createElement("svg",{ref:d,...k,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",s),...!a&&!f(n)&&{"aria-hidden":"true"},...n},[...p.map(([m,C])=>c.createElement(m,C)),...Array.isArray(a)?a:[a]]));const u=(t,e)=>{const r=c.forwardRef(({className:o,...s},a)=>c.createElement(w,{ref:a,iconNode:e,className:l(`lucide-${h(i(t))}`,`lucide-${t}`,o),...s}));return r.displayName=i(t),r};const g=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],b=u("check",g);const x=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],L=u("circle-alert",x);export{L as C,b as a,u as c};
@@ -1,4 +1,4 @@
1
- import{r as C,bv as Na,bw as Ca,a0 as Ta,bd as B,s as h,bx as je,by as Ot,bh as Aa,bi as Ma,bc as Ra,be as U,b8 as Ie,n as Ne,o as R,bf as I,bg as re,bz as ja,bA as O,_ as Oa,bq as ka,c as D,u as Ce,a as kt,K as Pt,ab as Pa,ao as ze,j as d,g as Da,w as $a,x as Xe,aw as La,z as Za,E as Fa,D as Ua,y as za,b1 as Ba}from"./index-DZqSbjFw.js";import{u as ke,a as Ke,d as Va}from"./constants-Mpett05j.js";import{b as qa}from"./use-virtual-mcp-D3UgDP8i.js";import{b as Dt}from"./use-collections-DtjYeVzj.js";import{b as Ja}from"./use-connection-BzhGWFyL.js";import{a as Wa}from"./use-binding-B1LqCJr8.js";import{u as Ha}from"./useSuspenseInfiniteQuery-jy6MmqiZ.js";import{u as Be,L as $t}from"./localstorage-keys-DpM3uKv7.js";import{c as et,B as Ya}from"./button-0ydgHweE.js";import{I as Ga}from"./input-u1hHzCA4.js";import{P as Qa,a as Xa,b as Ka}from"./popover-DEmRxXmY.js";import{S as es,a as ts,b as as,c as ss,d as rs}from"./select-BKwPUbTK.js";import{t as ut}from"./ChevronDown-DY2hRH3P.js";import{i as ns}from"./File06-OiAbO58I.js";import{c as os}from"./Grid01-Bdrpv4xX.js";import{a as is}from"./Image01-DvLyxsOA.js";import{i as Lt}from"./SearchMd-BeBVRrdw.js";var Ee;(function(t){t.assertEqual=r=>{};function e(r){}t.assertIs=e;function a(r){throw new Error}t.assertNever=a,t.arrayToEnum=r=>{const n={};for(const i of r)n[i]=i;return n},t.getValidEnumValues=r=>{const n=t.objectKeys(r).filter(o=>typeof r[r[o]]!="number"),i={};for(const o of n)i[o]=r[o];return t.objectValues(i)},t.objectValues=r=>t.objectKeys(r).map(function(n){return r[n]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const n=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&n.push(i);return n},t.find=(r,n)=>{for(const i of r)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function s(r,n=" | "){return r.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=s,t.jsonStringifyReplacer=(r,n)=>typeof n=="bigint"?n.toString():n})(Ee||(Ee={}));var dt;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(dt||(dt={}));Ee.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);Ee.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Oe extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(n){return n.message},s={_errors:[]},r=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(r);else if(i.code==="invalid_return_type")r(i.returnTypeError);else if(i.code==="invalid_arguments")r(i.argumentsError);else if(i.path.length===0)s._errors.push(a(i));else{let o=s,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(a(i))):o[l]=o[l]||{_errors:[]},o=o[l],c++}}};return r(this),s}static assert(e){if(!(e instanceof Oe))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ee.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),s=[];for(const r of this.issues)if(r.path.length>0){const n=r.path[0];a[n]=a[n]||[],a[n].push(e(r))}else s.push(e(r));return{formErrors:s,fieldErrors:a}}get formErrors(){return this.flatten()}}Oe.create=t=>new Oe(t);var pt;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(pt||(pt={}));var w;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(w||(w={}));const Zt=({size:t=24,color:e="currentColor",...a})=>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",...a},C.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));Zt.displayName="ChevronSelectorVertical";const Ft=({size:t=24,color:e="currentColor",...a})=>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",...a},C.createElement("path",{d:"M6 16a4 4 0 0 0 4 4h4a4 4 0 0 0 0-8h-4a4 4 0 0 1 0-8h4a4 4 0 0 1 4 4m-6-6v20"}));Ft.displayName="CurrencyDollar";const Ut=({size:t=24,color:e="currentColor",...a})=>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",...a},C.createElement("path",{d:"m18 8 4 4m0 0-4 4m4-4H9m6-7.796A8.383 8.383 0 0 0 10.667 3C5.88 3 2 7.03 2 12s3.88 9 8.667 9A8.384 8.384 0 0 0 15 19.796"}));Ut.displayName="LogOut04";const zt=({size:t=24,color:e="currentColor",...a})=>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",...a},C.createElement("path",{d:"m6.5 13 .784 1.569c.266.53.399.796.576 1.026a3 3 0 0 0 .545.545c.23.177.495.31 1.026.575L11 17.5l-1.569.785c-.53.265-.796.398-1.026.575a3 3 0 0 0-.545.545c-.177.23-.31.495-.576 1.026L6.5 22l-.784-1.569c-.266-.53-.399-.796-.576-1.026a3 3 0 0 0-.545-.545c-.23-.177-.495-.31-1.026-.575L2 17.5l1.569-.785c.53-.265.796-.398 1.026-.575a3 3 0 0 0 .545-.545c.177-.23.31-.495.576-1.026L6.5 13ZM15 2l1.179 3.064c.282.734.423 1.1.642 1.409a3 3 0 0 0 .706.706c.309.22.675.36 1.409.642L22 9l-3.064 1.179c-.734.282-1.1.423-1.409.642a3 3 0 0 0-.706.706c-.22.309-.36.675-.642 1.409L15 16l-1.179-3.064c-.282-.734-.423-1.1-.642-1.409a3 3 0 0 0-.706-.706c-.309-.22-.675-.36-1.409-.642L8 9l3.064-1.179c.734-.282 1.1-.423 1.409-.642a3 3 0 0 0 .706-.706c.22-.309.36-.675.642-1.409L15 2Z"}));zt.displayName="Stars01";var Bt="vercel.ai.error",ls=Symbol.for(Bt),mt,ft,Q=class Vt extends(ft=Error,mt=ls,ft){constructor({name:e,message:a,cause:s}){super(a),this[mt]=!0,this.name=e,this.cause=s}static isInstance(e){return Vt.hasMarker(e,Bt)}static hasMarker(e,a){const s=Symbol.for(a);return e!=null&&typeof e=="object"&&s in e&&typeof e[s]=="boolean"&&e[s]===!0}};function qt(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Jt="AI_InvalidArgumentError",Wt=`vercel.ai.error.${Jt}`,cs=Symbol.for(Wt),ht,gt,us=class extends(gt=Q,ht=cs,gt){constructor({message:t,cause:e,argument:a}){super({name:Jt,message:t,cause:e}),this[ht]=!0,this.argument=a}static isInstance(t){return Q.hasMarker(t,Wt)}},Ht="AI_JSONParseError",Yt=`vercel.ai.error.${Ht}`,ds=Symbol.for(Yt),vt,yt,bt=class extends(yt=Q,vt=ds,yt){constructor({text:t,cause:e}){super({name:Ht,message:`JSON parsing failed: Text: ${t}.
1
+ import{r as C,bu as Na,bv as Ca,a0 as Ta,bd as B,s as h,bw as je,bx as Ot,bh as Aa,bi as Ma,bc as Ra,be as U,b8 as Ie,n as Ne,o as R,bf as I,bg as re,by as ja,bz as O,_ as Oa,bq as ka,c as D,u as Ce,a as kt,K as Pt,ab as Pa,ao as ze,j as d,g as Da,w as $a,x as Xe,aw as La,z as Za,E as Fa,D as Ua,y as za,b1 as Ba}from"./index-504A5fzu.js";import{u as ke,a as Ke,d as Va}from"./constants-BsVN3aVM.js";import{b as qa}from"./use-virtual-mcp-PjR1OFlb.js";import{b as Dt}from"./use-collections-DgQLvk8y.js";import{b as Ja}from"./use-connection-CXgi6BLT.js";import{a as Wa}from"./use-binding-C0SFeppw.js";import{u as Ha}from"./useSuspenseInfiniteQuery-BQW4uJSq.js";import{u as Be,L as $t}from"./localstorage-keys-ELyXVtKs.js";import{c as et,B as Ya}from"./button-D373Gh7m.js";import{I as Ga}from"./input-L4CnUGon.js";import{P as Qa,a as Xa,b as Ka}from"./popover-BW-chC87.js";import{S as es,a as ts,b as as,c as ss,d as rs}from"./select-BXQ9vi5I.js";import{t as ut}from"./ChevronDown-FrVOX9vD.js";import{i as ns}from"./File06-C2LBZfWa.js";import{c as os}from"./Grid01-IjiH2KUT.js";import{a as is}from"./Image01-Bc9GrKYJ.js";import{i as Lt}from"./SearchMd-CvLjdKIL.js";var Ee;(function(t){t.assertEqual=r=>{};function e(r){}t.assertIs=e;function a(r){throw new Error}t.assertNever=a,t.arrayToEnum=r=>{const n={};for(const i of r)n[i]=i;return n},t.getValidEnumValues=r=>{const n=t.objectKeys(r).filter(o=>typeof r[r[o]]!="number"),i={};for(const o of n)i[o]=r[o];return t.objectValues(i)},t.objectValues=r=>t.objectKeys(r).map(function(n){return r[n]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const n=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&n.push(i);return n},t.find=(r,n)=>{for(const i of r)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function s(r,n=" | "){return r.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=s,t.jsonStringifyReplacer=(r,n)=>typeof n=="bigint"?n.toString():n})(Ee||(Ee={}));var dt;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(dt||(dt={}));Ee.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);Ee.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Oe extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(n){return n.message},s={_errors:[]},r=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(r);else if(i.code==="invalid_return_type")r(i.returnTypeError);else if(i.code==="invalid_arguments")r(i.argumentsError);else if(i.path.length===0)s._errors.push(a(i));else{let o=s,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(a(i))):o[l]=o[l]||{_errors:[]},o=o[l],c++}}};return r(this),s}static assert(e){if(!(e instanceof Oe))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ee.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),s=[];for(const r of this.issues)if(r.path.length>0){const n=r.path[0];a[n]=a[n]||[],a[n].push(e(r))}else s.push(e(r));return{formErrors:s,fieldErrors:a}}get formErrors(){return this.flatten()}}Oe.create=t=>new Oe(t);var pt;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(pt||(pt={}));var w;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(w||(w={}));const Zt=({size:t=24,color:e="currentColor",...a})=>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",...a},C.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));Zt.displayName="ChevronSelectorVertical";const Ft=({size:t=24,color:e="currentColor",...a})=>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",...a},C.createElement("path",{d:"M6 16a4 4 0 0 0 4 4h4a4 4 0 0 0 0-8h-4a4 4 0 0 1 0-8h4a4 4 0 0 1 4 4m-6-6v20"}));Ft.displayName="CurrencyDollar";const Ut=({size:t=24,color:e="currentColor",...a})=>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",...a},C.createElement("path",{d:"m18 8 4 4m0 0-4 4m4-4H9m6-7.796A8.383 8.383 0 0 0 10.667 3C5.88 3 2 7.03 2 12s3.88 9 8.667 9A8.384 8.384 0 0 0 15 19.796"}));Ut.displayName="LogOut04";const zt=({size:t=24,color:e="currentColor",...a})=>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",...a},C.createElement("path",{d:"m6.5 13 .784 1.569c.266.53.399.796.576 1.026a3 3 0 0 0 .545.545c.23.177.495.31 1.026.575L11 17.5l-1.569.785c-.53.265-.796.398-1.026.575a3 3 0 0 0-.545.545c-.177.23-.31.495-.576 1.026L6.5 22l-.784-1.569c-.266-.53-.399-.796-.576-1.026a3 3 0 0 0-.545-.545c-.23-.177-.495-.31-1.026-.575L2 17.5l1.569-.785c.53-.265.796-.398 1.026-.575a3 3 0 0 0 .545-.545c.177-.23.31-.495.576-1.026L6.5 13ZM15 2l1.179 3.064c.282.734.423 1.1.642 1.409a3 3 0 0 0 .706.706c.309.22.675.36 1.409.642L22 9l-3.064 1.179c-.734.282-1.1.423-1.409.642a3 3 0 0 0-.706.706c-.22.309-.36.675-.642 1.409L15 16l-1.179-3.064c-.282-.734-.423-1.1-.642-1.409a3 3 0 0 0-.706-.706c-.309-.22-.675-.36-1.409-.642L8 9l3.064-1.179c.734-.282 1.1-.423 1.409-.642a3 3 0 0 0 .706-.706c.22-.309.36-.675.642-1.409L15 2Z"}));zt.displayName="Stars01";var Bt="vercel.ai.error",ls=Symbol.for(Bt),mt,ft,Q=class Vt extends(ft=Error,mt=ls,ft){constructor({name:e,message:a,cause:s}){super(a),this[mt]=!0,this.name=e,this.cause=s}static isInstance(e){return Vt.hasMarker(e,Bt)}static hasMarker(e,a){const s=Symbol.for(a);return e!=null&&typeof e=="object"&&s in e&&typeof e[s]=="boolean"&&e[s]===!0}};function qt(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Jt="AI_InvalidArgumentError",Wt=`vercel.ai.error.${Jt}`,cs=Symbol.for(Wt),ht,gt,us=class extends(gt=Q,ht=cs,gt){constructor({message:t,cause:e,argument:a}){super({name:Jt,message:t,cause:e}),this[ht]=!0,this.argument=a}static isInstance(t){return Q.hasMarker(t,Wt)}},Ht="AI_JSONParseError",Yt=`vercel.ai.error.${Ht}`,ds=Symbol.for(Yt),vt,yt,bt=class extends(yt=Q,vt=ds,yt){constructor({text:t,cause:e}){super({name:Ht,message:`JSON parsing failed: Text: ${t}.
2
2
  Error message: ${qt(e)}`,cause:e}),this[vt]=!0,this.text=t}static isInstance(t){return Q.hasMarker(t,Yt)}},Gt="AI_TypeValidationError",Qt=`vercel.ai.error.${Gt}`,ps=Symbol.for(Qt),xt,_t,ve=class Ve extends(_t=Q,xt=ps,_t){constructor({value:e,cause:a,context:s}){let r="Type validation failed";if(s?.field&&(r+=` for ${s.field}`),s?.entityName||s?.entityId){r+=" (";const n=[];s.entityName&&n.push(s.entityName),s.entityId&&n.push(`id: "${s.entityId}"`),r+=n.join(", "),r+=")"}super({name:Gt,message:`${r}: Value: ${JSON.stringify(e)}.
3
3
  Error message: ${qt(a)}`,cause:a}),this[xt]=!0,this.value=e,this.context=s}static isInstance(e){return Q.hasMarker(e,Qt)}static wrap({value:e,cause:a,context:s}){var r,n,i;return Ve.isInstance(a)&&a.value===e&&((r=a.context)==null?void 0:r.field)===s?.field&&((n=a.context)==null?void 0:n.entityName)===s?.entityName&&((i=a.context)==null?void 0:i.entityId)===s?.entityId?a:new Ve({value:e,cause:a,context:s})}},Te=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:s="-"}={})=>{const r=()=>{const n=a.length,i=new Array(e);for(let o=0;o<e;o++)i[o]=a[Math.random()*n|0];return i.join("")};if(t==null)return r;if(a.includes(s))throw new us({argument:"separator",message:`The separator "${s}" must not be part of the alphabet "${a}".`});return()=>`${t}${s}${r()}`},ms=Te();function It(t=globalThis){var e,a,s;return t.window?"runtime/browser":(e=t.navigator)!=null&&e.userAgent?`runtime/${t.navigator.userAgent.toLowerCase()}`:(s=(a=t.process)==null?void 0:a.versions)!=null&&s.node?`runtime/node.js/${t.process.version.substring(0)}`:t.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function pe(t){if(t==null)return{};const e={};if(t instanceof Headers)t.forEach((a,s)=>{e[s.toLowerCase()]=a});else{Array.isArray(t)||(t=Object.entries(t));for(const[a,s]of t)s!=null&&(e[a.toLowerCase()]=s)}return e}function Et(t,...e){const a=new Headers(pe(t)),s=a.get("user-agent")||"";return a.set("user-agent",[s,...e].filter(Boolean).join(" ")),Object.fromEntries(a.entries())}var fs=/"__proto__"\s*:/,hs=/"constructor"\s*:/;function wt(t){const e=JSON.parse(t);return e===null||typeof e!="object"||fs.test(t)===!1&&hs.test(t)===!1?e:gs(e)}function gs(t){let e=[t];for(;e.length;){const a=e;e=[];for(const s of a){if(Object.prototype.hasOwnProperty.call(s,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(s,"constructor")&&Object.prototype.hasOwnProperty.call(s.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const r in s){const n=s[r];n&&typeof n=="object"&&e.push(n)}}}return t}function vs(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return wt(t)}try{return wt(t)}finally{Error.stackTraceLimit=e}}function tt(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const s of Object.keys(a))a[s]=de(a[s])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(de):de(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(de)),t.allOf!=null&&(t.allOf=t.allOf.map(de)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(de));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=de(e[a]);return t}function de(t){return typeof t=="boolean"?t:tt(t)}var ys=Symbol("Let zodToJsonSchema decide on which parser to use"),St={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},bs=t=>typeof t=="string"?{...St,name:t}:{...St,...t};function q(){return{}}function xs(t,e){var a,s,r;const n={type:"array"};return(a=t.type)!=null&&a._def&&((r=(s=t.type)==null?void 0:s._def)==null?void 0:r.typeName)!==w.ZodAny&&(n.items=M(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(n.minItems=t.minLength.value),t.maxLength&&(n.maxItems=t.maxLength.value),t.exactLength&&(n.minItems=t.exactLength.value,n.maxItems=t.exactLength.value),n}function _s(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function Is(){return{type:"boolean"}}function Xt(t,e){return M(t.type._def,e)}var Es=(t,e)=>M(t.innerType._def,e);function Kt(t,e,a){const s=a??e.dateStrategy;if(Array.isArray(s))return{anyOf:s.map((r,n)=>Kt(t,e,r))};switch(s){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return ws(t)}}var ws=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Ss(t,e){return{...M(t.innerType._def,e),default:t.defaultValue()}}function Ns(t,e){return e.effectStrategy==="input"?M(t.schema._def,e):q()}function Cs(t){return{type:"string",enum:Array.from(t.values)}}var Ts=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function As(t,e){const a=[M(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),M(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(r=>!!r),s=[];return a.forEach(r=>{if(Ts(r))s.push(...r.allOf);else{let n=r;if("additionalProperties"in r&&r.additionalProperties===!1){const{additionalProperties:i,...o}=r;n=o}s.push(n)}}),s.length?{allOf:s}:void 0}function Ms(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var Ze=void 0,H={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Ze===void 0&&(Ze=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Ze),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function ea(t,e){const a={type:"string"};if(t.checks)for(const s of t.checks)switch(s.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,s.value):s.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,s.value):s.value;break;case"email":switch(e.emailStrategy){case"format:email":Y(a,"email",s.message,e);break;case"format:idn-email":Y(a,"idn-email",s.message,e);break;case"pattern:zod":F(a,H.email,s.message,e);break}break;case"url":Y(a,"uri",s.message,e);break;case"uuid":Y(a,"uuid",s.message,e);break;case"regex":F(a,s.regex,s.message,e);break;case"cuid":F(a,H.cuid,s.message,e);break;case"cuid2":F(a,H.cuid2,s.message,e);break;case"startsWith":F(a,RegExp(`^${Fe(s.value,e)}`),s.message,e);break;case"endsWith":F(a,RegExp(`${Fe(s.value,e)}$`),s.message,e);break;case"datetime":Y(a,"date-time",s.message,e);break;case"date":Y(a,"date",s.message,e);break;case"time":Y(a,"time",s.message,e);break;case"duration":Y(a,"duration",s.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,s.value):s.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,s.value):s.value;break;case"includes":{F(a,RegExp(Fe(s.value,e)),s.message,e);break}case"ip":{s.version!=="v6"&&Y(a,"ipv4",s.message,e),s.version!=="v4"&&Y(a,"ipv6",s.message,e);break}case"base64url":F(a,H.base64url,s.message,e);break;case"jwt":F(a,H.jwt,s.message,e);break;case"cidr":{s.version!=="v6"&&F(a,H.ipv4Cidr,s.message,e),s.version!=="v4"&&F(a,H.ipv6Cidr,s.message,e);break}case"emoji":F(a,H.emoji(),s.message,e);break;case"ulid":{F(a,H.ulid,s.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{Y(a,"binary",s.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{F(a,H.base64,s.message,e);break}}break}case"nanoid":F(a,H.nanoid,s.message,e)}return a}function Fe(t,e){return e.patternStrategy==="escape"?js(t):t}var Rs=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function js(t){let e="";for(let a=0;a<t.length;a++)Rs.has(t[a])||(e+="\\"),e+=t[a];return e}function Y(t,e,a,s){var r;t.format||(r=t.anyOf)!=null&&r.some(n=>n.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&s.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function F(t,e,a,s){var r;t.pattern||(r=t.allOf)!=null&&r.some(n=>n.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Nt(e,s),...a&&s.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Nt(e,s)}function Nt(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const s={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},r=s.i?t.source.toLowerCase():t.source;let n="",i=!1,o=!1,c=!1;for(let l=0;l<r.length;l++){if(i){n+=r[l],i=!1;continue}if(s.i){if(o){if(r[l].match(/[a-z]/)){c?(n+=r[l],n+=`${r[l-2]}-${r[l]}`.toUpperCase(),c=!1):r[l+1]==="-"&&((a=r[l+2])!=null&&a.match(/[a-z]/))?(n+=r[l],c=!0):n+=`${r[l]}${r[l].toUpperCase()}`;continue}}else if(r[l].match(/[a-z]/)){n+=`[${r[l]}${r[l].toUpperCase()}]`;continue}}if(s.m){if(r[l]==="^"){n+=`(^|(?<=[\r
4
4
  ]))`;continue}else if(r[l]==="$"){n+=`($|(?=[\r
@@ -1,4 +1,4 @@
1
- import{bE as Q,r as C,o as As,s as mt,c as N,j as o,b6 as It,u as Y,k as Ms,t as Ps,a as oe,f as Ls,ao as gn,bu as F,bF as zs,ax as Ds,x as _t,z as ne,D as bn,ay as Ws,w as Tt,av as Hs,az as jn,y as vn,aF as Fs,aG as Vs,E as yn,aH as Bs,bG as $t,bH as Us,aw as qs,b2 as Ks,v as Js,bI as Gs,bn as Sn}from"./index-DZqSbjFw.js";import{E as wn,I as Ye,n as Xs}from"./empty-state-BJnVPwS4.js";import{E as Nn}from"./error-boundary-B6RXO2oI.js";import{a as Et,u as Ot,g as Rt,e as At,d as Mt}from"./use-collections-DtjYeVzj.js";import{u as ee,i as Zs}from"./constants-Mpett05j.js";import{P as Pt}from"./pin-to-sidebar-button-Bsv2_7kr.js";import{B as V,c as O}from"./button-0ydgHweE.js";import{F as pt,a as Qs,b as Lt,d as zt}from"./form-Bu0daHLu.js";import{I as Dt}from"./input-u1hHzCA4.js";import{T as yt}from"./textarea-CLIBzUIu.js";import{T as le,a as ce,b as ae,c as de}from"./tooltip-9zLX7HP0.js";import{i as kn,a as Ys}from"./Tool01-CH0MYN-2.js";import{a as Cn,V as Wt,b as Ee}from"./layout-DspSCzsh.js";import{S as In,a as _n,b as Tn,c as $n,d as St}from"./select-BKwPUbTK.js";import{i as eo}from"./AlertCircle-BFXBDrUr.js";import{s as to,M as Oe}from"./monaco-editor-CZ0mtshA.js";import{i as no}from"./Code01-Bti_O9RL.js";import{a as so}from"./Copy01-Cql6iNiT.js";import{i as ze}from"./Loading01-BiNUjLDw.js";import{i as Ht}from"./Play-C3Hph8xY.js";import{s as Ft}from"./XClose-C2SJXRFh.js";import{u as oo,O as ro,M as io,F as lo,v as co}from"./index-BDvGMi--.js";import{u as Vt,b as ao}from"./use-connection-BzhGWFyL.js";import{E as Bt}from"./empty-state-7hq4AubF.js";import{D as uo,a as fo}from"./use-binding-B1LqCJr8.js";import{b as En}from"./use-virtual-mcp-D3UgDP8i.js";import{b as mo,a as rn,R as po}from"./resizable-akHzriSj.js";import{S as De}from"./spinner-Bwqz03rl.js";import{V as xo}from"./view-mode-toggle-DR9UFNqr.js";import{N as ho,S as go,a as bo,c as jo,m as Ke,P as vo,i as yo,R as So,b as wo,d as No,e as ln,E as ko,f as Co}from"./index-CymrbMj5.js";import{b as Io,c as _o,d as To,e as $o,a as Eo,D as Oo}from"./dialog-6FUpHXs_.js";import"./index-6m1DUVC_.js";import{s as On}from"./Plus-BuZ2XoBN.js";import{n as Ro}from"./Calendar-Do1_EcNl.js";import{i as Ut}from"./Check-C7bGyGOC.js";import{i as Ao}from"./DotsHorizontal-Bn70vF_C.js";import{D as Mo,a as Po,b as Lo,c as cn}from"./dropdown-menu-CvHFB3Gz.js";import{T as zo,R as Do,b as Wo,c as Rn}from"./collapsible-CDAezpyL.js";import{i as Ho}from"./Grid01-Bdrpv4xX.js";import{B as $e}from"./badge-DF_3zhMz.js";import{i as An}from"./X-DLZk4kqC.js";import"./useMutation-BReaxe_W.js";import"./useQuery-KlPPWaKy.js";import"./Pin01-iTXtWrRE.js";import"./use-organization-settings-DMGaX8N0.js";import"./ArrowLeft-CDtoEGeL.js";import"./ChevronDown-DY2hRH3P.js";import"./mcp-oauth-C7tn4XA4.js";import"./env-vars-editor--TqeS791.js";import"./Trash01-DSwoFZY0.js";import"./File06-OiAbO58I.js";import"./Key01-D8HCSb8P.js";import"./extract-connection-data-Cl2cHkSz.js";import"./constants-OFVhPv4G.js";import"./github-icon-Dp3wHhYE.js";import"./registry-utils-BFBDFgyu.js";import"./generate-id-Dyweu44Y.js";import"./Terminal-EcSYzT5u.js";import"./Users03-B6orUjW9.js";import"./circle-alert-C96B7toE.js";import"./index-CXUcNyKS.js";import"./binder-CC8WnynZ.js";import"./popover-DEmRxXmY.js";import"./use-mcp-prompts-C2Az2O1z.js";import"./ArrowUp-BDaeP-ZF.js";import"./Edit01-BcXXA0Bn.js";import"./localstorage-keys-DpM3uKv7.js";import"./SearchMd-BeBVRrdw.js";import"./use-create-virtual-mcp-D-7Y6G3j.js";import"./useSuspenseInfiniteQuery-jy6MmqiZ.js";import"./infiniteQueryObserver-DmKtj9SR.js";import"./Image01-DvLyxsOA.js";const Mn=Q("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 Pn=Q("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 qt=Q("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Kt=Q("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Fo=Q("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const Vo=Q("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const Bo=Q("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 Ln=Q("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 zn=Q("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 Dn=Q("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 Wn=Q("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 Hn=Q("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"}]]),Jt=({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"}));Jt.displayName="AlertOctagon";const Fn=({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"}));Fn.displayName="Box";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:"m22.7 11.5-2 2-2-2m2.245 1.5A9 9 0 1 0 19 17.657M12 7v5l3 2"}));Vn.displayName="ClockFastForward";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:"m17 17 5-5-5-5M7 7l-5 5 5 5m7-14-4 18"}));Bn.displayName="Code02";const Je=({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"}));Je.displayName="Columns01";const Un=({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"}));Un.displayName="CornerDownRight";const qn=({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"}));qn.displayName="Database01";const Kn=({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:"M3 3v10.2c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 18 6.12 18 7.8 18H15m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0ZM3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Z"}));Kn.displayName="GitBranch01";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:"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"}));Jn.displayName="Repeat03";const Gt=({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"}));Gt.displayName="Save02";As({title:mt().min(1),description:mt().nullable(),body:mt()});function xt(t){for(const e of t.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Uo(){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 qo(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(pt,{control:n.control,name:"title",render:Go}),o.jsx(pt,{control:n.control,name:"description",render:Jo})]})]}),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(pt,{control:n.control,name:"body",render:Ko})]}),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(Qs,{...n,children:a}),e[10]=n,e[11]=a,e[12]=d):d=e[12],d}function Ko(t){const{field:e}=t;return o.jsx(Lt,{children:o.jsx(zt,{children:o.jsx(yt,{...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 Jo(t){const{field:e}=t;return o.jsxs(Lt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),o.jsx(zt,{children:o.jsx(Dt,{...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 Go(t){const{field:e}=t;return o.jsxs(Lt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),o.jsx(zt,{children:o.jsx(Dt,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Xo(t){const e=N.c(52),{providerId:n,promptId:s,onBack:i}=t,l=It().location.href,{org:c}=Y(),a=n||null;let d;e[0]!==c.id||e[1]!==a?(d={connectionId:a,orgId:c.id},e[0]=c.id,e[1]=a,e[2]=d):d=e[2];const u=ee(d),f=Et(n,"PROMPT",s,u),m=Ot(n,"PROMPT",u),x=m.update.isPending;let p;e[3]!==f?(p=f?{title:f.title,description:f.description??null,body:xt(f)}:void 0,e[3]=f,e[4]=p):p=e[4];let h;e[5]!==p?(h={values:p},e[5]=p,e[6]=h):h=e[6];const g=Ms(h);let b;e[7]!==g||e[8]!==f?(b=()=>{f&&g.reset({title:f.title,description:f.description??null,body:xt(f)})},e[7]=g,e[8]=f,e[9]=b):b=e[9];const j=b;let y;e[10]!==m.update||e[11]!==g||e[12]!==s?(y=g.handleSubmit(async D=>{const G=await m.update.mutateAsync({id:s,data:{title:D.title,description:D.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:D.body}}]}});g.reset({title:G.title,description:G.description??null,body:xt(G)})}),e[10]=m.update,e[11]=g,e[12]=s,e[13]=y):y=e[13];const S=y;if(!f){let D;return e[14]===Symbol.for("react.memo_cache_sentinel")?(D=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(wn,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[14]=D):D=e[14],D}let v;e[15]!==f.title?(v=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:f.title}),e[15]=f.title,e[16]=v):v=e[16];let w;e[17]!==f.description?(w=f.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:f.description})]}):null,e[17]=f.description,e[18]=w):w=e[18];let k;e[19]!==v||e[20]!==w?(k=o.jsx(Cn,{children:o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[v,w]})}),e[19]=v,e[20]=w,e[21]=k):k=e[21];let I;e[22]!==f.title||e[23]!==l?(I=o.jsx(Pt,{title:f.title,url:l,icon:"description"}),e[22]=f.title,e[23]=l,e[24]=I):I=e[24];const T=!g.formState.isDirty||x;let M;e[25]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsx(kn,{size:14}),e[25]=M):M=e[25];let R;e[26]!==j||e[27]!==T?(R=o.jsx(le,{asChild:!0,children:o.jsx("span",{className:"inline-block",children:o.jsx(V,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:T,onClick:j,"aria-label":"Cancel",children:M})})}),e[26]=j,e[27]=T,e[28]=R):R=e[28];let P;e[29]===Symbol.for("react.memo_cache_sentinel")?(P=o.jsx(ce,{side:"bottom",children:"Cancel"}),e[29]=P):P=e[29];let z;e[30]!==R?(z=o.jsx(ae,{children:o.jsxs(de,{delayDuration:0,children:[R,P]})}),e[30]=R,e[31]=z):z=e[31];const q=!g.formState.isDirty||x;let A;e[32]!==S?(A=()=>{S()},e[32]=S,e[33]=A):A=e[33];let J;e[34]===Symbol.for("react.memo_cache_sentinel")?(J=o.jsx(Gt,{size:14}),e[34]=J):J=e[34];let _;e[35]!==q||e[36]!==A?(_=o.jsx(le,{asChild:!0,children:o.jsx("span",{className:"inline-block",children:o.jsx(V,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:q,onClick:A,"aria-label":"Save",children:J})})}),e[35]=q,e[36]=A,e[37]=_):_=e[37];let $;e[38]===Symbol.for("react.memo_cache_sentinel")?($=o.jsx(ce,{side:"bottom",children:"Save"}),e[38]=$):$=e[38];let E;e[39]!==_?(E=o.jsx(ae,{children:o.jsxs(de,{delayDuration:0,children:[_,$]})}),e[39]=_,e[40]=E):E=e[40];let L;e[41]!==I||e[42]!==z||e[43]!==E?(L=o.jsxs(Wt,{children:[I,z,E]}),e[41]=I,e[42]=z,e[43]=E,e[44]=L):L=e[44];let H;e[45]!==g?(H=o.jsx("div",{className:"h-full",children:o.jsx(qo,{form:g})}),e[45]=g,e[46]=H):H=e[46];let Z;return e[47]!==i||e[48]!==L||e[49]!==H||e[50]!==k?(Z=o.jsxs(Ee,{onBack:i,children:[k,L,H]}),e[47]=i,e[48]=L,e[49]=H,e[50]=k,e[51]=Z):Z=e[51],Z}function Zo(t){const e=N.c(5),{itemId:n,onBack:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=Uo(),e[0]=i):i=e[0];const r=i;if(!r){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(wn,{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(Nn,{children:o.jsx(C.Suspense,{fallback:null,children:o.jsx(Xo,{providerId:r,promptId:n,onBack:s})})}),e[2]=n,e[3]=s,e[4]=l):l=e[4],l}const Qo=Ps("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 Yo(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(Qo({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 er(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 tr(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 nr=t=>t.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function sr(t){const e=N.c(10),{toolName:n,connectionId:s,onBack:i}=t;let r;e[0]!==s?(r={connectionId:s},e[0]=s,e[1]=r):r=e[1];const l=oo(r);if(!l.isAuthenticated){let d;return e[2]!==l.supportsOAuth||e[3]!==i?(d=o.jsx("div",{className:"flex h-full items-center justify-center",children:l.supportsOAuth?o.jsx(ro,{onAuthenticate:()=>i(),buttonText:"Go back to authenticate"}):o.jsx(io,{hasReadme:!1})}),e[2]=l.supportsOAuth,e[3]=i,e[4]=d):d=e[4],d}const c=`${s}:${n}`;let a;return e[5]!==s||e[6]!==i||e[7]!==c||e[8]!==n?(a=o.jsx(or,{toolName:n,connectionId:s,onBack:i},c),e[5]=s,e[6]=i,e[7]=c,e[8]=n,e[9]=a):a=e[9],a}function or({toolName:t,connectionId:e,onBack:n}){const i=It().location.href,{replayId:r}=Ls({strict:!1}),l=(()=>{if(!r)return null;const _=`replay-${r}`,$=sessionStorage.getItem(_);if(!$)return null;sessionStorage.removeItem(_);try{return JSON.parse($)}catch{return null}})(),c=(()=>{if(!l)return null;const _={};for(const[$,E]of Object.entries(l))E!==null&&typeof E=="object"?_[$]=JSON.stringify(E,null,2):_[$]=E;return _})(),[a,d]=C.useState(c??{}),[u,f]=C.useState(l?JSON.stringify(l,null,2):"{}"),[m,x]=C.useState(null),[p,h]=C.useState(null),[g,b]=C.useState(!1),[j,y]=C.useState(null),{org:S}=Y(),v=Vt(e),w=ee({connectionId:e,orgId:S.id}),k=Rt({client:w}),I=k.data?.tools?.find(_=>_.name===t),T=I?.inputSchema?.properties,M=T?Object.keys(T):[],R=M.length>0,P={};if(R&&I?.inputSchema?.properties)for(const _ of M)P[_]=I.inputSchema.required?.includes(_)?"":void 0;const z=_=>Object.prototype.hasOwnProperty.call(a,_),q=async()=>{b(!0),h(null),x(null),y(null);const _=performance.now();try{if(!w)throw new Error("MCP client is not available");const $=R?{...P,...a}:(()=>{const B=u.trim();if(!B)return{};const K=JSON.parse(B);if(K&&typeof K=="object")return K;throw new Error("Raw JSON input must be an object.")})();R&&I?.inputSchema?.properties&&Object.entries(I.inputSchema.properties).forEach(([B,K])=>{if((K.type==="object"||K.type==="array")&&typeof $[B]=="string")try{$[B]=JSON.parse($[B])}catch{}});const E=await w.callTool({name:t,arguments:$}),L=E.structuredContent??E,H=performance.now(),Z=Math.round(H-_);x(L);const D=JSON.stringify(L),G=new TextEncoder().encode(D).length;y({duration:`${Z}ms`,bytes:`${G} bytes`,tokens:`~${Math.ceil(G/4)} tokens`,cost:"$0.0000"})}catch($){const E=$ instanceof Error?$.message:String($);h(E||"Unknown error occurred");const L=performance.now();y({duration:`${Math.round(L-_)}ms`})}finally{b(!1)}},A=(_,$)=>{d(E=>({...E,[_]:$}))},J=()=>{x(null),h(null),y(null)};return o.jsxs(Ee,{onBack:n,children:[o.jsx(Wt,{children:o.jsx(Pt,{title:I?.name??nr(t),url:i,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(Ye,{icon:v?.icon||null,name:v?.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:[k.isSuccess?o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):k.isLoading?o.jsx(ze,{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:k.isSuccess?"ready":k.isLoading?"connecting":"error"})]})]}),o.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:I?.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"}),I?.inputSchema?.required&&I.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&&I?.inputSchema?.properties?Object.entries(I.inputSchema.properties).map(([_,$])=>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.inputSchema?.required?.includes(_)&&o.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),o.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:$.type})]}),$.description&&o.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:$.description}),$.type==="object"||$.type==="array"?o.jsx(yt,{className:"font-mono text-xs",value:z(_)?a[_]??"":P[_]??"",onChange:E=>A(_,E.target.value),placeholder:`Enter ${_} as JSON...`,rows:3}):$.type==="boolean"?o.jsxs(In,{value:z(_)?String(a[_]??""):"",onValueChange:E=>A(_,E==="true"),children:[o.jsx(_n,{children:o.jsx(Tn,{placeholder:"Select true or false..."})}),o.jsxs($n,{children:[o.jsx(St,{value:"true",children:"true"}),o.jsx(St,{value:"false",children:"false"})]})]}):o.jsx(Dt,{value:z(_)?a[_]??"":P[_]??"",onChange:E=>A(_,E.target.value),placeholder:`Enter ${_}...`})]},_)):I?.inputSchema&&!R?o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),o.jsx(yt,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:_=>f(_.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"}),j&&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(to,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:j.duration})]}),j.tokens&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(Fn,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:j.tokens})]}),j.bytes&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(qn,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:j.bytes})]}),j.cost&&o.jsx("div",{className:"flex items-center gap-1.5",children:o.jsx("span",{className:"font-mono text-foreground",children:j.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(V,{size:"sm",variant:"default",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:q,disabled:g,children:g?o.jsxs(o.Fragment,{children:[o.jsx(ze,{size:14,className:"animate-spin"}),"Executing..."]}):o.jsxs(o.Fragment,{children:[o.jsx(Ht,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})}),o.jsx(ae,{children:o.jsxs(de,{children:[o.jsx(le,{asChild:!0,children:o.jsx(V,{size:"icon",variant:"outline",className:"h-8 w-8 shrink-0",onClick:J,disabled:!m&&!p,children:o.jsx(Ft,{size:14})})}),o.jsx(ce,{children:o.jsx("p",{children:"Clear results"})})]})})]})}),p&&o.jsx("div",{className:"px-6 py-4 bg-background",children:o.jsx(Yo,{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(eo,{className:"h-4 w-4"}),o.jsx(er,{className:"mb-0",children:"Execution Failed"})]}),o.jsx(tr,{className:"text-xs text-destructive",children:p})]})})}),o.jsx("div",{className:"relative flex-1 overflow-auto bg-muted/50",children:m?o.jsxs(o.Fragment,{children:[o.jsx(Oe,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),o.jsx(V,{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)),gn.success("Copied to clipboard")},children:o.jsx(so,{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(no,{className:"h-12 w-12 mb-3 opacity-40"}),o.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]})]})]})}function rr(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=oe(i).connectionId;if(!Vt(l)||!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(ze,{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(sr,{toolName:n,connectionId:l,onBack:s})}),e[3]=l,e[4]=s,e[5]=n,e[6]=d):d=e[6],d}const an=t=>{let e;const n=new Set,s=(d,u)=>{const f=typeof d=="function"?d(e):d;if(!Object.is(f,e)){const m=e;e=u??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(x=>x(e,m))}},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},Xt=(t=>t?an(t):an),ir=t=>t;function wt(t,e=ir){const n=F.useSyncExternalStore(t.subscribe,F.useCallback(()=>e(t.getState()),[t,e]),F.useCallback(()=>e(t.getInitialState()),[t,e]));return F.useDebugValue(n),n}const lr=t=>{const e=Xt(t),n=s=>wt(e,s);return Object.assign(n,e),n},cr=(t=>lr);function Gn(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 Nt=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return Nt(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return Nt(s)(n)}}}},ar=(t,e)=>(n,s,i)=>{let r={storage:Gn(()=>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})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const x=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>x;let p;const h=()=>{var g,b;if(!u)return;const j=++c;l=!1,a.forEach(S=>{var v;return S((v=s())!=null?v:x)});const y=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:x))||void 0;return Nt(u.getItem.bind(u))(r.name).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==r.version){if(r.migrate){const v=r.migrate(S.state,S.version);return v instanceof Promise?v.then(w=>[!0,w]):[!0,v]}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 v;if(j!==c)return;const[w,k]=S;if(p=r.merge(k,(v=s())!=null?v:x),n(p,!0),w)return f()}).then(()=>{j===c&&(y?.(p,void 0),p=s(),l=!0,d.forEach(S=>S(p)))}).catch(S=>{j===c&&y?.(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(),p||x},Xn=ar,{useSyncExternalStoreWithSelector:dr}=zs,ur=t=>t;function fr(t,e=ur,n){const s=dr(t.subscribe,t.getState,t.getInitialState,e,n);return F.useDebugValue(s),s}const dn=t=>Symbol.iterator in t,un=t=>"entries"in t,fn=(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},mr=(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 pr(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:dn(t)&&dn(e)?un(t)&&un(e)?fn(t,e):mr(t,e):fn({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function xr(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{bD as Q,r as C,o as As,s as mt,c as N,j as o,b6 as It,u as Y,k as Ms,t as Ps,a as oe,f as Ls,ao as gn,bt as F,bE as zs,ax as Ds,x as _t,z as ne,D as bn,ay as Ws,w as Tt,av as Hs,az as jn,y as vn,aF as Fs,aG as Vs,E as yn,aH as Bs,bF as $t,bG as Us,aw as qs,b2 as Ks,v as Js,bH as Gs,bn as Sn}from"./index-504A5fzu.js";import{E as wn,I as Ye,n as Xs}from"./empty-state-DPLaHs22.js";import{E as Nn}from"./error-boundary-DGGozsia.js";import{a as Et,u as Ot,g as Rt,e as At,d as Mt}from"./use-collections-DgQLvk8y.js";import{u as ee,i as Zs}from"./constants-BsVN3aVM.js";import{P as Pt}from"./pin-to-sidebar-button-CzNm9Z63.js";import{B as V,c as O}from"./button-D373Gh7m.js";import{F as pt,a as Qs,b as Lt,d as zt}from"./form-D_p7nR82.js";import{I as Dt}from"./input-L4CnUGon.js";import{T as yt}from"./textarea-D6uAjk7M.js";import{T as le,a as ce,b as ae,c as de}from"./tooltip-BXVSpXAI.js";import{i as kn,a as Ys}from"./Tool01-BuQwOuwj.js";import{a as Cn,V as Wt,b as Ee}from"./layout-Cd5mhjJp.js";import{S as In,a as _n,b as Tn,c as $n,d as St}from"./select-BXQ9vi5I.js";import{i as eo}from"./AlertCircle-CiqOV3gN.js";import{s as to,M as Oe}from"./monaco-editor-NeTwO1He.js";import{i as no}from"./Code01-Bus4rjLa.js";import{a as so}from"./Copy01-CU0ImpYo.js";import{i as ze}from"./Loading01-k9J_51Wt.js";import{i as Ht}from"./Play-DDry1DwY.js";import{s as Ft}from"./XClose-BrPaj-T9.js";import{u as oo,O as ro,M as io,F as lo,v as co}from"./index-C6RvA3pM.js";import{u as Vt,b as ao}from"./use-connection-CXgi6BLT.js";import{E as Bt}from"./empty-state-D4bELgmw.js";import{D as uo,a as fo}from"./use-binding-C0SFeppw.js";import{b as En}from"./use-virtual-mcp-PjR1OFlb.js";import{b as mo,a as rn,R as po}from"./resizable-BKhOe-uT.js";import{S as De}from"./spinner-DGXi0Fqy.js";import{V as xo}from"./view-mode-toggle-CCTPeHCH.js";import{N as ho,S as go,a as bo,c as jo,m as Ke,P as vo,i as yo,R as So,b as wo,d as No,e as ln,E as ko,f as Co}from"./index-CsaK2Zyj.js";import{b as Io,c as _o,d as To,e as $o,a as Eo,D as Oo}from"./dialog-sp1iNNV1.js";import"./index-DsQNI0Ev.js";import{s as On}from"./Plus-B4bZuJyH.js";import{n as Ro}from"./Calendar-Bgzpcx-P.js";import{i as Ut}from"./Check-BwWwVwDq.js";import{i as Ao}from"./DotsHorizontal-BXRQO4eG.js";import{D as Mo,a as Po,b as Lo,c as cn}from"./dropdown-menu-B8A0M-FV.js";import{T as zo,R as Do,b as Wo,c as Rn}from"./collapsible-D5bXYEu5.js";import{i as Ho}from"./Grid01-IjiH2KUT.js";import{B as $e}from"./badge-DeCRZtfI.js";import{i as An}from"./X-BYmeb6sr.js";import"./useMutation-DjmEVTlE.js";import"./useQuery-2fM2t_EQ.js";import"./Pin01-CCrFQOyT.js";import"./use-organization-settings-wk-RrGpZ.js";import"./ArrowLeft-DESkG8WH.js";import"./ChevronDown-FrVOX9vD.js";import"./mcp-oauth-B493s6Am.js";import"./env-vars-editor-DdPVHMBR.js";import"./Trash01-CrkjtnA0.js";import"./File06-C2LBZfWa.js";import"./Key01-CwRA3KGV.js";import"./extract-connection-data-CgtoPpeo.js";import"./constants-BRQkgPgR.js";import"./github-icon-Dp3wHhYE.js";import"./registry-utils-DsqnXOg4.js";import"./generate-id-Dyweu44Y.js";import"./Terminal-CUhRn_Km.js";import"./Users03-ChMrWUg7.js";import"./circle-alert-PbmGURsw.js";import"./index-BatxUpyp.js";import"./binder-ChJO9Gsr.js";import"./popover-BW-chC87.js";import"./use-mcp-prompts-Cauox13I.js";import"./ArrowUp-DSzSuIWM.js";import"./Edit01-1SiMuTuh.js";import"./localstorage-keys-ELyXVtKs.js";import"./SearchMd-CvLjdKIL.js";import"./use-create-virtual-mcp-C56z94et.js";import"./useSuspenseInfiniteQuery-BQW4uJSq.js";import"./infiniteQueryObserver-BZSSiryQ.js";import"./Image01-Bc9GrKYJ.js";const Mn=Q("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 Pn=Q("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 qt=Q("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Kt=Q("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Fo=Q("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const Vo=Q("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const Bo=Q("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 Ln=Q("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 zn=Q("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 Dn=Q("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 Wn=Q("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 Hn=Q("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"}]]),Jt=({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"}));Jt.displayName="AlertOctagon";const Fn=({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"}));Fn.displayName="Box";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:"m22.7 11.5-2 2-2-2m2.245 1.5A9 9 0 1 0 19 17.657M12 7v5l3 2"}));Vn.displayName="ClockFastForward";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:"m17 17 5-5-5-5M7 7l-5 5 5 5m7-14-4 18"}));Bn.displayName="Code02";const Je=({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"}));Je.displayName="Columns01";const Un=({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"}));Un.displayName="CornerDownRight";const qn=({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"}));qn.displayName="Database01";const Kn=({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:"M3 3v10.2c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 18 6.12 18 7.8 18H15m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0ZM3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Z"}));Kn.displayName="GitBranch01";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:"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"}));Jn.displayName="Repeat03";const Gt=({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"}));Gt.displayName="Save02";As({title:mt().min(1),description:mt().nullable(),body:mt()});function xt(t){for(const e of t.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Uo(){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 qo(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(pt,{control:n.control,name:"title",render:Go}),o.jsx(pt,{control:n.control,name:"description",render:Jo})]})]}),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(pt,{control:n.control,name:"body",render:Ko})]}),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(Qs,{...n,children:a}),e[10]=n,e[11]=a,e[12]=d):d=e[12],d}function Ko(t){const{field:e}=t;return o.jsx(Lt,{children:o.jsx(zt,{children:o.jsx(yt,{...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 Jo(t){const{field:e}=t;return o.jsxs(Lt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),o.jsx(zt,{children:o.jsx(Dt,{...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 Go(t){const{field:e}=t;return o.jsxs(Lt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),o.jsx(zt,{children:o.jsx(Dt,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Xo(t){const e=N.c(52),{providerId:n,promptId:s,onBack:i}=t,l=It().location.href,{org:c}=Y(),a=n||null;let d;e[0]!==c.id||e[1]!==a?(d={connectionId:a,orgId:c.id},e[0]=c.id,e[1]=a,e[2]=d):d=e[2];const u=ee(d),f=Et(n,"PROMPT",s,u),m=Ot(n,"PROMPT",u),x=m.update.isPending;let p;e[3]!==f?(p=f?{title:f.title,description:f.description??null,body:xt(f)}:void 0,e[3]=f,e[4]=p):p=e[4];let h;e[5]!==p?(h={values:p},e[5]=p,e[6]=h):h=e[6];const g=Ms(h);let b;e[7]!==g||e[8]!==f?(b=()=>{f&&g.reset({title:f.title,description:f.description??null,body:xt(f)})},e[7]=g,e[8]=f,e[9]=b):b=e[9];const j=b;let y;e[10]!==m.update||e[11]!==g||e[12]!==s?(y=g.handleSubmit(async D=>{const G=await m.update.mutateAsync({id:s,data:{title:D.title,description:D.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:D.body}}]}});g.reset({title:G.title,description:G.description??null,body:xt(G)})}),e[10]=m.update,e[11]=g,e[12]=s,e[13]=y):y=e[13];const S=y;if(!f){let D;return e[14]===Symbol.for("react.memo_cache_sentinel")?(D=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(wn,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[14]=D):D=e[14],D}let v;e[15]!==f.title?(v=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:f.title}),e[15]=f.title,e[16]=v):v=e[16];let w;e[17]!==f.description?(w=f.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:f.description})]}):null,e[17]=f.description,e[18]=w):w=e[18];let k;e[19]!==v||e[20]!==w?(k=o.jsx(Cn,{children:o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[v,w]})}),e[19]=v,e[20]=w,e[21]=k):k=e[21];let I;e[22]!==f.title||e[23]!==l?(I=o.jsx(Pt,{title:f.title,url:l,icon:"description"}),e[22]=f.title,e[23]=l,e[24]=I):I=e[24];const T=!g.formState.isDirty||x;let M;e[25]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsx(kn,{size:14}),e[25]=M):M=e[25];let R;e[26]!==j||e[27]!==T?(R=o.jsx(le,{asChild:!0,children:o.jsx("span",{className:"inline-block",children:o.jsx(V,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:T,onClick:j,"aria-label":"Cancel",children:M})})}),e[26]=j,e[27]=T,e[28]=R):R=e[28];let P;e[29]===Symbol.for("react.memo_cache_sentinel")?(P=o.jsx(ce,{side:"bottom",children:"Cancel"}),e[29]=P):P=e[29];let z;e[30]!==R?(z=o.jsx(ae,{children:o.jsxs(de,{delayDuration:0,children:[R,P]})}),e[30]=R,e[31]=z):z=e[31];const q=!g.formState.isDirty||x;let A;e[32]!==S?(A=()=>{S()},e[32]=S,e[33]=A):A=e[33];let J;e[34]===Symbol.for("react.memo_cache_sentinel")?(J=o.jsx(Gt,{size:14}),e[34]=J):J=e[34];let _;e[35]!==q||e[36]!==A?(_=o.jsx(le,{asChild:!0,children:o.jsx("span",{className:"inline-block",children:o.jsx(V,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:q,onClick:A,"aria-label":"Save",children:J})})}),e[35]=q,e[36]=A,e[37]=_):_=e[37];let $;e[38]===Symbol.for("react.memo_cache_sentinel")?($=o.jsx(ce,{side:"bottom",children:"Save"}),e[38]=$):$=e[38];let E;e[39]!==_?(E=o.jsx(ae,{children:o.jsxs(de,{delayDuration:0,children:[_,$]})}),e[39]=_,e[40]=E):E=e[40];let L;e[41]!==I||e[42]!==z||e[43]!==E?(L=o.jsxs(Wt,{children:[I,z,E]}),e[41]=I,e[42]=z,e[43]=E,e[44]=L):L=e[44];let H;e[45]!==g?(H=o.jsx("div",{className:"h-full",children:o.jsx(qo,{form:g})}),e[45]=g,e[46]=H):H=e[46];let Z;return e[47]!==i||e[48]!==L||e[49]!==H||e[50]!==k?(Z=o.jsxs(Ee,{onBack:i,children:[k,L,H]}),e[47]=i,e[48]=L,e[49]=H,e[50]=k,e[51]=Z):Z=e[51],Z}function Zo(t){const e=N.c(5),{itemId:n,onBack:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=Uo(),e[0]=i):i=e[0];const r=i;if(!r){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(wn,{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(Nn,{children:o.jsx(C.Suspense,{fallback:null,children:o.jsx(Xo,{providerId:r,promptId:n,onBack:s})})}),e[2]=n,e[3]=s,e[4]=l):l=e[4],l}const Qo=Ps("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 Yo(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(Qo({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 er(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 tr(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 nr=t=>t.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function sr(t){const e=N.c(10),{toolName:n,connectionId:s,onBack:i}=t;let r;e[0]!==s?(r={connectionId:s},e[0]=s,e[1]=r):r=e[1];const l=oo(r);if(!l.isAuthenticated){let d;return e[2]!==l.supportsOAuth||e[3]!==i?(d=o.jsx("div",{className:"flex h-full items-center justify-center",children:l.supportsOAuth?o.jsx(ro,{onAuthenticate:()=>i(),buttonText:"Go back to authenticate"}):o.jsx(io,{hasReadme:!1})}),e[2]=l.supportsOAuth,e[3]=i,e[4]=d):d=e[4],d}const c=`${s}:${n}`;let a;return e[5]!==s||e[6]!==i||e[7]!==c||e[8]!==n?(a=o.jsx(or,{toolName:n,connectionId:s,onBack:i},c),e[5]=s,e[6]=i,e[7]=c,e[8]=n,e[9]=a):a=e[9],a}function or({toolName:t,connectionId:e,onBack:n}){const i=It().location.href,{replayId:r}=Ls({strict:!1}),l=(()=>{if(!r)return null;const _=`replay-${r}`,$=sessionStorage.getItem(_);if(!$)return null;sessionStorage.removeItem(_);try{return JSON.parse($)}catch{return null}})(),c=(()=>{if(!l)return null;const _={};for(const[$,E]of Object.entries(l))E!==null&&typeof E=="object"?_[$]=JSON.stringify(E,null,2):_[$]=E;return _})(),[a,d]=C.useState(c??{}),[u,f]=C.useState(l?JSON.stringify(l,null,2):"{}"),[m,x]=C.useState(null),[p,h]=C.useState(null),[g,b]=C.useState(!1),[j,y]=C.useState(null),{org:S}=Y(),v=Vt(e),w=ee({connectionId:e,orgId:S.id}),k=Rt({client:w}),I=k.data?.tools?.find(_=>_.name===t),T=I?.inputSchema?.properties,M=T?Object.keys(T):[],R=M.length>0,P={};if(R&&I?.inputSchema?.properties)for(const _ of M)P[_]=I.inputSchema.required?.includes(_)?"":void 0;const z=_=>Object.prototype.hasOwnProperty.call(a,_),q=async()=>{b(!0),h(null),x(null),y(null);const _=performance.now();try{if(!w)throw new Error("MCP client is not available");const $=R?{...P,...a}:(()=>{const B=u.trim();if(!B)return{};const K=JSON.parse(B);if(K&&typeof K=="object")return K;throw new Error("Raw JSON input must be an object.")})();R&&I?.inputSchema?.properties&&Object.entries(I.inputSchema.properties).forEach(([B,K])=>{if((K.type==="object"||K.type==="array")&&typeof $[B]=="string")try{$[B]=JSON.parse($[B])}catch{}});const E=await w.callTool({name:t,arguments:$}),L=E.structuredContent??E,H=performance.now(),Z=Math.round(H-_);x(L);const D=JSON.stringify(L),G=new TextEncoder().encode(D).length;y({duration:`${Z}ms`,bytes:`${G} bytes`,tokens:`~${Math.ceil(G/4)} tokens`,cost:"$0.0000"})}catch($){const E=$ instanceof Error?$.message:String($);h(E||"Unknown error occurred");const L=performance.now();y({duration:`${Math.round(L-_)}ms`})}finally{b(!1)}},A=(_,$)=>{d(E=>({...E,[_]:$}))},J=()=>{x(null),h(null),y(null)};return o.jsxs(Ee,{onBack:n,children:[o.jsx(Wt,{children:o.jsx(Pt,{title:I?.name??nr(t),url:i,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(Ye,{icon:v?.icon||null,name:v?.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:[k.isSuccess?o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):k.isLoading?o.jsx(ze,{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:k.isSuccess?"ready":k.isLoading?"connecting":"error"})]})]}),o.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:I?.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"}),I?.inputSchema?.required&&I.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&&I?.inputSchema?.properties?Object.entries(I.inputSchema.properties).map(([_,$])=>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.inputSchema?.required?.includes(_)&&o.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),o.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:$.type})]}),$.description&&o.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:$.description}),$.type==="object"||$.type==="array"?o.jsx(yt,{className:"font-mono text-xs",value:z(_)?a[_]??"":P[_]??"",onChange:E=>A(_,E.target.value),placeholder:`Enter ${_} as JSON...`,rows:3}):$.type==="boolean"?o.jsxs(In,{value:z(_)?String(a[_]??""):"",onValueChange:E=>A(_,E==="true"),children:[o.jsx(_n,{children:o.jsx(Tn,{placeholder:"Select true or false..."})}),o.jsxs($n,{children:[o.jsx(St,{value:"true",children:"true"}),o.jsx(St,{value:"false",children:"false"})]})]}):o.jsx(Dt,{value:z(_)?a[_]??"":P[_]??"",onChange:E=>A(_,E.target.value),placeholder:`Enter ${_}...`})]},_)):I?.inputSchema&&!R?o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),o.jsx(yt,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:_=>f(_.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"}),j&&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(to,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:j.duration})]}),j.tokens&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(Fn,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:j.tokens})]}),j.bytes&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(qn,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:j.bytes})]}),j.cost&&o.jsx("div",{className:"flex items-center gap-1.5",children:o.jsx("span",{className:"font-mono text-foreground",children:j.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(V,{size:"sm",variant:"default",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:q,disabled:g,children:g?o.jsxs(o.Fragment,{children:[o.jsx(ze,{size:14,className:"animate-spin"}),"Executing..."]}):o.jsxs(o.Fragment,{children:[o.jsx(Ht,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})}),o.jsx(ae,{children:o.jsxs(de,{children:[o.jsx(le,{asChild:!0,children:o.jsx(V,{size:"icon",variant:"outline",className:"h-8 w-8 shrink-0",onClick:J,disabled:!m&&!p,children:o.jsx(Ft,{size:14})})}),o.jsx(ce,{children:o.jsx("p",{children:"Clear results"})})]})})]})}),p&&o.jsx("div",{className:"px-6 py-4 bg-background",children:o.jsx(Yo,{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(eo,{className:"h-4 w-4"}),o.jsx(er,{className:"mb-0",children:"Execution Failed"})]}),o.jsx(tr,{className:"text-xs text-destructive",children:p})]})})}),o.jsx("div",{className:"relative flex-1 overflow-auto bg-muted/50",children:m?o.jsxs(o.Fragment,{children:[o.jsx(Oe,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),o.jsx(V,{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)),gn.success("Copied to clipboard")},children:o.jsx(so,{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(no,{className:"h-12 w-12 mb-3 opacity-40"}),o.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]})]})]})}function rr(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=oe(i).connectionId;if(!Vt(l)||!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(ze,{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(sr,{toolName:n,connectionId:l,onBack:s})}),e[3]=l,e[4]=s,e[5]=n,e[6]=d):d=e[6],d}const an=t=>{let e;const n=new Set,s=(d,u)=>{const f=typeof d=="function"?d(e):d;if(!Object.is(f,e)){const m=e;e=u??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(x=>x(e,m))}},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},Xt=(t=>t?an(t):an),ir=t=>t;function wt(t,e=ir){const n=F.useSyncExternalStore(t.subscribe,F.useCallback(()=>e(t.getState()),[t,e]),F.useCallback(()=>e(t.getInitialState()),[t,e]));return F.useDebugValue(n),n}const lr=t=>{const e=Xt(t),n=s=>wt(e,s);return Object.assign(n,e),n},cr=(t=>lr);function Gn(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 Nt=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return Nt(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return Nt(s)(n)}}}},ar=(t,e)=>(n,s,i)=>{let r={storage:Gn(()=>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})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const x=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>x;let p;const h=()=>{var g,b;if(!u)return;const j=++c;l=!1,a.forEach(S=>{var v;return S((v=s())!=null?v:x)});const y=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:x))||void 0;return Nt(u.getItem.bind(u))(r.name).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==r.version){if(r.migrate){const v=r.migrate(S.state,S.version);return v instanceof Promise?v.then(w=>[!0,w]):[!0,v]}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 v;if(j!==c)return;const[w,k]=S;if(p=r.merge(k,(v=s())!=null?v:x),n(p,!0),w)return f()}).then(()=>{j===c&&(y?.(p,void 0),p=s(),l=!0,d.forEach(S=>S(p)))}).catch(S=>{j===c&&y?.(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(),p||x},Xn=ar,{useSyncExternalStoreWithSelector:dr}=zs,ur=t=>t;function fr(t,e=ur,n){const s=dr(t.subscribe,t.getState,t.getInitialState,e,n);return F.useDebugValue(s),s}const dn=t=>Symbol.iterator in t,un=t=>"entries"in t,fn=(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},mr=(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 pr(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:dn(t)&&dn(e)?un(t)&&un(e)?fn(t,e):mr(t,e):fn({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function xr(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-DZqSbjFw.js";import{c as N,B as C}from"./button-0ydgHweE.js";import{c as y,a as M,D as z,b as D}from"./dropdown-menu-CvHFB3Gz.js";import{i as S}from"./ArrowUp-BDaeP-ZF.js";import{i as T}from"./Check-C7bGyGOC.js";import{c as E}from"./Grid01-Bdrpv4xX.js";import{i as V}from"./List-bC7xiZ2s.js";import{b as _,c as B,T as L,a as $}from"./tooltip-9zLX7HP0.js";import{V as W}from"./view-mode-toggle-DR9UFNqr.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
+ import{r as j,c as k,j as s}from"./index-504A5fzu.js";import{c as N,B as C}from"./button-D373Gh7m.js";import{c as y,a as M,D as z,b as D}from"./dropdown-menu-B8A0M-FV.js";import{i as S}from"./ArrowUp-DSzSuIWM.js";import{i as T}from"./Check-BwWwVwDq.js";import{c as E}from"./Grid01-IjiH2KUT.js";import{i as V}from"./List-CeDrqSzo.js";import{b as _,c as B,T as L,a as $}from"./tooltip-BXVSpXAI.js";import{V as W}from"./view-mode-toggle-CCTPeHCH.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-DZqSbjFw.js";import{C as b}from"./collection-display-button-C0Qj_mDn.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
+ import{c as v,j as l}from"./index-504A5fzu.js";import{C as b}from"./collection-display-button-DRWiQVZp.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-DZqSbjFw.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
+ import{c as s,j as c}from"./index-504A5fzu.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 v,j as i}from"./index-DZqSbjFw.js";import{i as w}from"./Loading01-BiNUjLDw.js";import{i as C}from"./SearchMd-BeBVRrdw.js";import{I as k}from"./input-u1hHzCA4.js";import{c as b}from"./button-0ydgHweE.js";function R(j){const e=v.c(21),{value:m,onChange:d,placeholder:g,onKeyDown:f,className:p,isSearching:u,disabled:n}=j,x=g===void 0?"Search...":g;let t;e[0]!==p?(t=b("shrink-0 w-full border-b border-border h-12",p),e[0]=p,e[1]=t):t=e[1];const h=n?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let r;e[4]!==u?(r=u?i.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):i.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=u,e[5]=r):r=e[5];let o;e[6]!==d?(o=N=>d(N.target.value),e[6]=d,e[7]=o):o=e[7];let l;e[8]!==n||e[9]!==f||e[10]!==x||e[11]!==o||e[12]!==m?(l=i.jsx(k,{value:m,onChange:o,onKeyDown:f,placeholder:x,disabled:n,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[8]=n,e[9]=f,e[10]=x,e[11]=o,e[12]=m,e[13]=l):l=e[13];let a;e[14]!==s||e[15]!==r||e[16]!==l?(a=i.jsxs("label",{className:s,children:[r,l]}),e[14]=s,e[15]=r,e[16]=l,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=i.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{R as C};
1
+ import{c as v,j as i}from"./index-504A5fzu.js";import{i as w}from"./Loading01-k9J_51Wt.js";import{i as C}from"./SearchMd-CvLjdKIL.js";import{I as k}from"./input-L4CnUGon.js";import{c as b}from"./button-D373Gh7m.js";function R(j){const e=v.c(21),{value:m,onChange:d,placeholder:g,onKeyDown:f,className:p,isSearching:u,disabled:n}=j,x=g===void 0?"Search...":g;let t;e[0]!==p?(t=b("shrink-0 w-full border-b border-border h-12",p),e[0]=p,e[1]=t):t=e[1];const h=n?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let r;e[4]!==u?(r=u?i.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):i.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=u,e[5]=r):r=e[5];let o;e[6]!==d?(o=N=>d(N.target.value),e[6]=d,e[7]=o):o=e[7];let l;e[8]!==n||e[9]!==f||e[10]!==x||e[11]!==o||e[12]!==m?(l=i.jsx(k,{value:m,onChange:o,onKeyDown:f,placeholder:x,disabled:n,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[8]=n,e[9]=f,e[10]=x,e[11]=o,e[12]=m,e[13]=l):l=e[13];let a;e[14]!==s||e[15]!==r||e[16]!==l?(a=i.jsxs("label",{className:s,children:[r,l]}),e[14]=s,e[15]=r,e[16]=l,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=i.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{R as C};