@decocms/mesh 2.17.1 → 2.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/dist/client/assets/{AlertCircle-rclbzics.js → AlertCircle-Dvl19Bxu.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-ClViT7Hc.js → ArrowLeft-CNcRcLHi.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-BsQNKzS-.js → ArrowUp-Dj1nFRfD.js} +1 -1
  4. package/dist/client/assets/{Check-C2R_Lcai.js → Check-MZfXJ4EP.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-CGAmRXVd.js → ChevronDown-BPwd0ESk.js} +1 -1
  6. package/dist/client/assets/{Code01-CVOtW_Yi.js → Code01-ZM8AfORO.js} +1 -1
  7. package/dist/client/assets/{Copy01-BvrgG3_u.js → Copy01-DoisEbOD.js} +1 -1
  8. package/dist/client/assets/{DotsHorizontal-D-_ECokQ.js → DotsHorizontal-2xfLjpUM.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-BeOWu8ww.js → DotsVertical-CRTSoELg.js} +1 -1
  10. package/dist/client/assets/{Download01-C4VXJ4rj.js → Download01-DzrQfwIZ.js} +1 -1
  11. package/dist/client/assets/{Edit01-CkDEl3XN.js → Edit01-BVpBBN26.js} +1 -1
  12. package/dist/client/assets/{File06-DcfM98WM.js → File06-DvtIjhz0.js} +1 -1
  13. package/dist/client/assets/{FilterLines-BFhYlm1G.js → FilterLines-DkNJkoIH.js} +1 -1
  14. package/dist/client/assets/{FlipBackward-Bz0fRANc.js → FlipBackward-938bk6QK.js} +1 -1
  15. package/dist/client/assets/{GitBranch01-Bc0tKWvO.js → GitBranch01-HnfHVRyp.js} +1 -1
  16. package/dist/client/assets/{Grid01-SL4tYH2-.js → Grid01-tEwYXVxO.js} +1 -1
  17. package/dist/client/assets/{Home02-C2IjHPBI.js → Home02-9SuE7ucu.js} +1 -1
  18. package/dist/client/assets/{Image01-BQtv4av4.js → Image01-vvKwvz0g.js} +1 -1
  19. package/dist/client/assets/{Inbox01-Dq00_28Z.js → Inbox01-Cekk6aOf.js} +1 -1
  20. package/dist/client/assets/{InfoCircle-Cr1Ezl_g.js → InfoCircle-BXonO5qh.js} +1 -1
  21. package/dist/client/assets/{Key01-nM2KN2wI.js → Key01-DqRe3I-7.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-Cek4l5LT.js → LinkExternal01-BGOs7vaA.js} +1 -1
  23. package/dist/client/assets/{List-DhHX60HN.js → List-j3ISho_T.js} +1 -1
  24. package/dist/client/assets/{Loading01-CpEccvEO.js → Loading01-ByRd3GAn.js} +1 -1
  25. package/dist/client/assets/{Lock01-DkAqto6l.js → Lock01-BYKl-IKI.js} +1 -1
  26. package/dist/client/assets/{MessageChatSquare-B8VNN8W_.js → MessageChatSquare-Dfdgo-IV.js} +1 -1
  27. package/dist/client/assets/{Play-gy0OXoTQ.js → Play-DqeIwNA2.js} +1 -1
  28. package/dist/client/assets/{Plus-DjzFfDDP.js → Plus-B6dO5J-T.js} +1 -1
  29. package/dist/client/assets/{SearchMd-Cg2el-z8.js → SearchMd-RcsY4Qc3.js} +1 -1
  30. package/dist/client/assets/{Terminal-Kg8grfTZ.js → Terminal-CM4NRPaq.js} +1 -1
  31. package/dist/client/assets/{Trash01-BnAfsqRe.js → Trash01-RdHotUor.js} +1 -1
  32. package/dist/client/assets/{Upload01-DRgz8NgE.js → Upload01-B5lhw8CF.js} +1 -1
  33. package/dist/client/assets/{X-CBga9b95.js → X-JFPiVUa4.js} +1 -1
  34. package/dist/client/assets/{XClose-DEljIF8n.js → XClose-d9N07C9C.js} +1 -1
  35. package/dist/client/assets/{alert-dialog-BNxiLvEc.js → alert-dialog-DIpJg2Aj.js} +1 -1
  36. package/dist/client/assets/{auth-catchall-DeehfEMz.js → auth-catchall-B2l1mrMK.js} +1 -1
  37. package/dist/client/assets/{avatar-BXyXgGjh.js → avatar-C9xlNN_x.js} +1 -1
  38. package/dist/client/assets/{badge-Ctdv4gxt.js → badge--29UzF2m.js} +1 -1
  39. package/dist/client/assets/{binder-BxrAqFdA.js → binder-nBmgAoSK.js} +1 -1
  40. package/dist/client/assets/{button-C0pnkZlC.js → button-CJFU-RdP.js} +1 -1
  41. package/dist/client/assets/{card-DUUk5B6T.js → card-BARP50i4.js} +1 -1
  42. package/dist/client/assets/{checkbox-DSzJrlMA.js → checkbox-D4qUNjlU.js} +1 -1
  43. package/dist/client/assets/{collection-detail-iIrZ-zZ-.js → collection-detail-DBx57h0R.js} +1 -1
  44. package/dist/client/assets/{collection-display-button-DDxBelrQ.js → collection-display-button-DWT4ZvIF.js} +1 -1
  45. package/dist/client/assets/{collection-header-d89fPnWN.js → collection-header-DiGbkMTg.js} +1 -1
  46. package/dist/client/assets/{collection-page-DvY1awQQ.js → collection-page-b1I6uH8W.js} +1 -1
  47. package/dist/client/assets/{collection-search-DFSn4A42.js → collection-search-D3Bd0Mm5.js} +1 -1
  48. package/dist/client/assets/{collection-tab-J4NMpB8P.js → collection-tab-V_ZAHQk2.js} +1 -1
  49. package/dist/client/assets/{collection-table-wrapper-CB1f1HNV.js → collection-table-wrapper-DToPOpkG.js} +1 -1
  50. package/dist/client/assets/{connection-CMutAR-q.js → connection-Cgb7Z5-V.js} +1 -1
  51. package/dist/client/assets/{connection-card-DJA7LSPP.js → connection-card-B6jH4I7L.js} +1 -1
  52. package/dist/client/assets/{connection-detail-AyiveTST.js → connection-detail-DOeKZy2u.js} +1 -1
  53. package/dist/client/assets/connections-DIPInEqh.js +1 -0
  54. package/dist/client/assets/constants-CRsABbUy.js +1 -0
  55. package/dist/client/assets/{create-organization-dialog-FpknJphA.js → create-organization-dialog-BCm-rEBq.js} +1 -1
  56. package/dist/client/assets/{dialog-DGipxHKv.js → dialog-DVaRsY11.js} +1 -1
  57. package/dist/client/assets/{dropdown-menu-DXIsFCVQ.js → dropdown-menu-L8DDYrma.js} +1 -1
  58. package/dist/client/assets/{dynamic-plugin-layout-p6uYyMI7.js → dynamic-plugin-layout-BGqw6KSh.js} +1 -1
  59. package/dist/client/assets/{empty-state-BOQ8a8rM.js → empty-state-DSfHkDug.js} +1 -1
  60. package/dist/client/assets/{empty-state-CsVvxFp9.js → empty-state-DltMEOY9.js} +1 -1
  61. package/dist/client/assets/{env-vars-editor-DsDwdS2I.js → env-vars-editor-OFOnChaG.js} +1 -1
  62. package/dist/client/assets/{error-boundary-CiihS5J_.js → error-boundary-BcexB_yc.js} +1 -1
  63. package/dist/client/assets/{extract-connection-data-CZNqSTSO.js → extract-connection-data-CdV5tpm8.js} +1 -1
  64. package/dist/client/assets/{file-browser-DtPxgmLq.js → file-browser-lBeJR8bC.js} +2 -2
  65. package/dist/client/assets/{form-Cq3oH5p8.js → form-0xzFj1MQ.js} +1 -1
  66. package/dist/client/assets/{gateway-detail-Ds9jNsAy.js → gateway-detail-BjMZrPhA.js} +1 -1
  67. package/dist/client/assets/gateways-Los1KR32.js +1 -0
  68. package/dist/client/assets/{grid-view-DCCLpGyL.js → grid-view-5k-Ei6pR.js} +1 -1
  69. package/dist/client/assets/{home-C6YGDrtN.js → home-BPOuMXWN.js} +1 -1
  70. package/dist/client/assets/{index-lLPOJwFP.js → index-B2ZzxrDd.js} +2 -2
  71. package/dist/client/assets/{index-BPAz_Wmi.js → index-DYB_vmtw.js} +1 -1
  72. package/dist/client/assets/{index-BEGxRCwV.js → index-LUG2SkNP.js} +3 -3
  73. package/dist/client/assets/{index-sjg7ALLH.js → index-Wmq2F9D5.js} +1 -1
  74. package/dist/client/assets/{index-Ct-XKtSm.js → index-sGJO5Tbg.js} +1 -1
  75. package/dist/client/assets/{infiniteQueryObserver-Cg5Uwm-m.js → infiniteQueryObserver-2ElA8vy3.js} +1 -1
  76. package/dist/client/assets/{input-BtvEWyY7.js → input-BptR4gs0.js} +1 -1
  77. package/dist/client/assets/{layout-D_5LiG9u.js → layout-CuyqJIpj.js} +1 -1
  78. package/dist/client/assets/{lazy-highlighter-D262jDd3.js → lazy-highlighter-BsXV5-Cp.js} +1 -1
  79. package/dist/client/assets/{localstorage-keys-CrsmSVIa.js → localstorage-keys-1ChkoQpJ.js} +1 -1
  80. package/dist/client/assets/{login-D-eNDgSJ.js → login-9aWtH8iv.js} +1 -1
  81. package/dist/client/assets/{mcp-oauth-BlRDBNPG.js → mcp-oauth-DlEOJMOg.js} +1 -1
  82. package/dist/client/assets/{mcp-server-card-h4-acR5C.js → mcp-server-card-QpfLcKhp.js} +1 -1
  83. package/dist/client/assets/{mcp-server-detail-BIJFOf-1.js → mcp-server-detail-C1ZMmcCI.js} +1 -1
  84. package/dist/client/assets/{members-JDeSn8de.js → members-BivX1Wff.js} +1 -1
  85. package/dist/client/assets/{monaco-editor-h8_XpHnI.js → monaco-editor-eqnLepiA.js} +1 -1
  86. package/dist/client/assets/{monitoring-B5veKGER.js → monitoring-CsAomsG7.js} +1 -1
  87. package/dist/client/assets/{oauth-callback-B7GGjmT2.js → oauth-callback-tqvl2JmB.js} +1 -1
  88. package/dist/client/assets/{page-DRfRpAk9.js → page-9g38EhhR.js} +1 -1
  89. package/dist/client/assets/{page-JPTyFV98.js → page-DF7HRrxe.js} +1 -1
  90. package/dist/client/assets/{pin-to-sidebar-button-DNtnmSb8.js → pin-to-sidebar-button-SoohzyKD.js} +1 -1
  91. package/dist/client/assets/{plugin-empty-state-DrcgOOcq.js → plugin-empty-state-B7nLCaEJ.js} +1 -1
  92. package/dist/client/assets/{plugin-header-riFgGbiI.js → plugin-header-Cohl5yJx.js} +1 -1
  93. package/dist/client/assets/{plugins-DoB7Ko8p.js → plugins-B4XhV1NA.js} +1 -1
  94. package/dist/client/assets/{popover-pNwa1deQ.js → popover-DMQ4A4gY.js} +1 -1
  95. package/dist/client/assets/{project-context-provider-BMHXD39x.js → project-context-provider-CwANTiF8.js} +1 -1
  96. package/dist/client/assets/{registry-utils-BkBVcE6w.js → registry-utils-CYM7CTQI.js} +1 -1
  97. package/dist/client/assets/{resizable-jz1SBMEc.js → resizable-DPX1GbOQ.js} +1 -1
  98. package/dist/client/assets/{resource-tabs-DqRWX41r.js → resource-tabs-s8Be9X3Q.js} +1 -1
  99. package/dist/client/assets/{select-COJ5S7Rq.js → select-ChLkm3Du.js} +1 -1
  100. package/dist/client/assets/{settings-CmNkIvY0.js → settings-CtF0WgEW.js} +1 -1
  101. package/dist/client/assets/{shell-layout-B43W-k9I.js → shell-layout-CF_ayOPu.js} +1 -1
  102. package/dist/client/assets/{spinner-Deoz6N0J.js → spinner-CwrVDgbN.js} +1 -1
  103. package/dist/client/assets/{switch-Z2NGTQao.js → switch-CcWa_MNs.js} +1 -1
  104. package/dist/client/assets/{textarea-fD103gtG.js → textarea-DvOGbg2w.js} +1 -1
  105. package/dist/client/assets/{tool-set-selector-SxQbDynN.js → tool-set-selector-CcjC51rS.js} +1 -1
  106. package/dist/client/assets/{tools-list-9lgpWeKJ.js → tools-list-CZQCbddf.js} +1 -1
  107. package/dist/client/assets/{tooltip-D0yN_jPS.js → tooltip-BZp1NNfI.js} +1 -1
  108. package/dist/client/assets/{use-binding-bdIG4ysm.js → use-binding-kpHhQeiR.js} +1 -1
  109. package/dist/client/assets/{use-collections-DiH8BH96.js → use-collections-BI8SI9I-.js} +1 -1
  110. package/dist/client/assets/{use-connection-BvgGy_ae.js → use-connection-By0HWGmn.js} +1 -1
  111. package/dist/client/assets/{use-connection-resources-CazBLQYp.js → use-connection-resources-CIndv_xt.js} +1 -1
  112. package/dist/client/assets/{use-create-gateway-DWTCcW8J.js → use-create-gateway-DpNvhifN.js} +1 -1
  113. package/dist/client/assets/{use-gateway-Blme6XE1.js → use-gateway-BzFnbg51.js} +1 -1
  114. package/dist/client/assets/{use-gateway-system-prompt-DfRYNjlK.js → use-gateway-system-prompt-DKg33ZMa.js} +1 -1
  115. package/dist/client/assets/{use-list-state-C9VeGRXh.js → use-list-state-cqgmpDXc.js} +1 -1
  116. package/dist/client/assets/{use-mcp-ByUu9rNa.js → use-mcp-BY7dWO4N.js} +1 -1
  117. package/dist/client/assets/{use-members-A4eH5Mug.js → use-members-DuUTyG85.js} +1 -1
  118. package/dist/client/assets/{use-mobile-DQFSnNx5.js → use-mobile-DHVQc88b.js} +1 -1
  119. package/dist/client/assets/{use-organization-settings-CFfwAQvt.js → use-organization-settings-C3rL2iPZ.js} +1 -1
  120. package/dist/client/assets/{use-tool-call-q6DaczOv.js → use-tool-call-CuYepGvY.js} +1 -1
  121. package/dist/client/assets/useInfiniteQuery-Dbym_GhP.js +1 -0
  122. package/dist/client/assets/{useMutation-8xrpFP-l.js → useMutation-Lj6qQmhH.js} +1 -1
  123. package/dist/client/assets/useQuery-DVzj5fVO.js +1 -0
  124. package/dist/client/assets/{value-_3bvT1Yq.js → value-Cetx24MZ.js} +1 -1
  125. package/dist/client/assets/{view-mode-toggle-C7lGZNG7.js → view-mode-toggle-Df6PEFKi.js} +1 -1
  126. package/dist/client/assets/{workflow-DBXd52Rn.js → workflow-DiN6vHw9.js} +1 -1
  127. package/dist/client/index.html +1 -1
  128. package/package.json +1 -1
  129. package/dist/client/assets/connections-B5sVjhUZ.js +0 -1
  130. package/dist/client/assets/constants-Bx2xP4ra.js +0 -1
  131. package/dist/client/assets/gateways--0F8usoj.js +0 -1
  132. package/dist/client/assets/useInfiniteQuery-c0A7IUcG.js +0 -1
  133. package/dist/client/assets/useQuery-CLJFoOtO.js +0 -1
@@ -1 +1 @@
1
- import{r as i,c as a}from"./index-lLPOJwFP.js";import{c as n}from"./connection-CMutAR-q.js";import{u as l}from"./project-context-provider-BMHXD39x.js";import{b as u,a as f,u as h}from"./use-collections-DiH8BH96.js";const C=({size:o=24,color:e="currentColor",...t})=>i.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},i.createElement("path",{d:"M9 2v3m6-3v3M9 19v3m6-3v3m4-13h3m-3 5h3M2 9h3m-3 5h3m4.8 5h4.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C19 16.72 19 15.88 19 14.2V9.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C16.72 5 15.88 5 14.2 5H9.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C5 7.28 5 8.12 5 9.8v4.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C7.28 19 8.12 19 9.8 19Z"}));C.displayName="CpuChip02";function g(o){const e=a.c(3);let t;e[0]!==o?(t=o===void 0?{}:o,e[0]=o,e[1]=t):t=e[1];const s=t,{org:c}=l();let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=n(),e[2]=r):r=e[2];const m=r;return u(c.slug,"GATEWAY",m,s)}function A(o){const e=a.c(1),{org:t}=l();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=n(),e[0]=s):s=e[0];const c=s;return h(t.slug,"GATEWAY",o??void 0,c)}function G(){const o=a.c(1),{org:e}=l();let t;o[0]===Symbol.for("react.memo_cache_sentinel")?(t=n(),o[0]=t):t=o[0];const s=t;return f(e.slug,"GATEWAY",s)}export{G as a,A as b,C as i,g as u};
1
+ import{r as i,c as a}from"./index-B2ZzxrDd.js";import{c as n}from"./connection-Cgb7Z5-V.js";import{u as l}from"./project-context-provider-CwANTiF8.js";import{b as u,a as f,u as h}from"./use-collections-BI8SI9I-.js";const C=({size:o=24,color:e="currentColor",...t})=>i.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},i.createElement("path",{d:"M9 2v3m6-3v3M9 19v3m6-3v3m4-13h3m-3 5h3M2 9h3m-3 5h3m4.8 5h4.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C19 16.72 19 15.88 19 14.2V9.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C16.72 5 15.88 5 14.2 5H9.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C5 7.28 5 8.12 5 9.8v4.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C7.28 19 8.12 19 9.8 19Z"}));C.displayName="CpuChip02";function g(o){const e=a.c(3);let t;e[0]!==o?(t=o===void 0?{}:o,e[0]=o,e[1]=t):t=e[1];const s=t,{org:c}=l();let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=n(),e[2]=r):r=e[2];const m=r;return u(c.slug,"GATEWAY",m,s)}function A(o){const e=a.c(1),{org:t}=l();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=n(),e[0]=s):s=e[0];const c=s;return h(t.slug,"GATEWAY",o??void 0,c)}function G(){const o=a.c(1),{org:e}=l();let t;o[0]===Symbol.for("react.memo_cache_sentinel")?(t=n(),o[0]=t):t=o[0];const s=t;return f(e.slug,"GATEWAY",s)}export{G as a,A as b,C as i,g as u};
@@ -1 +1 @@
1
- import{c as a}from"./index-lLPOJwFP.js";import{u as S}from"./project-context-provider-BMHXD39x.js";import{u as L,L as x}from"./localstorage-keys-CrsmSVIa.js";function A(e){const t=a.c(9),{locator:c}=S();let o;t[0]!==c?(o=x.gatewaySystemPrompts(c),t[0]=c,t[1]=o):o=t[1];let s;t[2]===Symbol.for("react.memo_cache_sentinel")?(s={},t[2]=s):s=t[2];const[u,l]=L(o,s),n=e?u[e]??"":"";let r;t[3]!==e||t[4]!==l?(r=f=>{e&&l(p=>({...p,[e]:f}))},t[3]=e,t[4]=l,t[5]=r):r=t[5];const i=r;let m;return t[6]!==i||t[7]!==n?(m=[n,i],t[6]=i,t[7]=n,t[8]=m):m=t[8],m}export{A as u};
1
+ import{c as a}from"./index-B2ZzxrDd.js";import{u as S}from"./project-context-provider-CwANTiF8.js";import{u as L,L as x}from"./localstorage-keys-1ChkoQpJ.js";function A(e){const t=a.c(9),{locator:c}=S();let o;t[0]!==c?(o=x.gatewaySystemPrompts(c),t[0]=c,t[1]=o):o=t[1];let s;t[2]===Symbol.for("react.memo_cache_sentinel")?(s={},t[2]=s):s=t[2];const[u,l]=L(o,s),n=e?u[e]??"":"";let r;t[3]!==e||t[4]!==l?(r=f=>{e&&l(p=>({...p,[e]:f}))},t[3]=e,t[4]=l,t[5]=r):r=t[5];const i=r;let m;return t[6]!==i||t[7]!==n?(m=[n,i],t[6]=i,t[7]=n,t[8]=m):m=t[8],m}export{A as u};
@@ -1 +1 @@
1
- import{r as a,c as T}from"./index-lLPOJwFP.js";import{u as D}from"./use-mobile-DQFSnNx5.js";const W=({size:l=24,color:e="currentColor",...t})=>a.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},a.createElement("path",{d:"M2.42 12.713c-.136-.215-.204-.323-.242-.49a1.173 1.173 0 0 1 0-.446c.038-.167.106-.274.242-.49C3.546 9.505 6.895 5 12 5s8.455 4.505 9.58 6.287c.137.215.205.323.243.49.029.125.029.322 0 .446-.038.167-.106.274-.242.49C20.455 14.495 17.105 19 12 19c-5.106 0-8.455-4.505-9.58-6.287Z"}),a.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}));W.displayName="Eye";function k(l){const e=`deco-filters-${l}`,[t,c]=a.useState(()=>{try{const o=globalThis.localStorage?.getItem(e);if(o)return JSON.parse(o)}catch(o){console.error("Failed to parse stored filters:",o)}return[]});return[t,o=>{c(o);try{globalThis.localStorage?.setItem(e,JSON.stringify(o))}catch(i){console.error("Failed to save filters:",i)}}]}function C(l){const e=T.c(7),[t,c]=a.useState(l),[s,o]=a.useState(l?"desc":null);let i;e[0]!==s||e[1]!==t?(i=h=>{t!==h?(c(h),o("asc")):s==="asc"?o("desc"):s==="desc"&&(c(void 0),o(null))},e[0]=s,e[1]=t,e[2]=i):i=e[2];const u=i;let r;return e[3]!==u||e[4]!==s||e[5]!==t?(r={sortKey:t,sortDirection:s,handleSort:u},e[3]=u,e[4]=s,e[5]=t,e[6]=r):r=e[6],r}function L(l,e){const t=T.c(12),c=e===void 0?"cards":e,s=D(),o=a.useRef(s),i=l?`deco-view-mode-${l}`:"deco-view-mode";let u;t[0]!==c||t[1]!==i?(u=()=>{const d=globalThis.localStorage?.getItem(i);return d==="cards"||d==="table"?d:c},t[0]=c,t[1]=i,t[2]=u):u=t[2];const[r,h]=a.useState(u);let f;t[3]!==i?(f=d=>{h(d),globalThis.localStorage?.setItem(i,d)},t[3]=i,t[4]=f):f=t[4];const p=f;let S,g;t[5]!==s||t[6]!==r?(S=()=>{!o.current&&s&&r==="table"&&h("cards"),o.current=s},g=[s,r],t[5]=s,t[6]=r,t[7]=S,t[8]=g):(S=t[7],g=t[8]),a.useEffect(S,g);let n;return t[9]!==p||t[10]!==r?(n=[r,p],t[9]=p,t[10]=r,t[11]=n):n=t[11],n}function O(l){const e=T.c(20),{namespace:t,resource:c,defaultSortKey:s,defaultViewMode:o}=l,i=s===void 0?"title":s,u=o===void 0?"table":o,[r,h]=a.useState(""),f=a.useDeferredValue(r),p=`${t}-${c}`,[S,g]=k(p),n=`mesh-${c}-filter-visible-${t}`;let d;e[0]!==n?(d=()=>globalThis.localStorage?.getItem(n)==="true",e[0]=n,e[1]=d):d=e[1];const[m,B]=a.useState(d);let y;e[2]!==n?(y=I=>{B(I),globalThis.localStorage?.setItem(n,String(I))},e[2]=n,e[3]=y):y=e[3];const b=y;let M;e[4]!==m||e[5]!==b?(M=()=>{b(!m)},e[4]=m,e[5]=b,e[6]=M):M=e[6];const w=M,[V,$]=L(`mesh-${c}-${t}`,u),{sortKey:x,sortDirection:F,handleSort:K}=C(i),E=x;let v;return e[7]!==m||e[8]!==S||e[9]!==K||e[10]!==r||e[11]!==f||e[12]!==b||e[13]!==g||e[14]!==$||e[15]!==F||e[16]!==E||e[17]!==w||e[18]!==V?(v={search:r,searchTerm:f,setSearch:h,filters:S,setFilters:g,filterBarVisible:m,setFilterBarVisible:b,toggleFilterBar:w,viewMode:V,setViewMode:$,sortKey:E,sortDirection:F,handleSort:K},e[7]=m,e[8]=S,e[9]=K,e[10]=r,e[11]=f,e[12]=b,e[13]=g,e[14]=$,e[15]=F,e[16]=E,e[17]=w,e[18]=V,e[19]=v):v=e[19],v}export{W as s,O as u};
1
+ import{r as a,c as T}from"./index-B2ZzxrDd.js";import{u as D}from"./use-mobile-DHVQc88b.js";const W=({size:l=24,color:e="currentColor",...t})=>a.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},a.createElement("path",{d:"M2.42 12.713c-.136-.215-.204-.323-.242-.49a1.173 1.173 0 0 1 0-.446c.038-.167.106-.274.242-.49C3.546 9.505 6.895 5 12 5s8.455 4.505 9.58 6.287c.137.215.205.323.243.49.029.125.029.322 0 .446-.038.167-.106.274-.242.49C20.455 14.495 17.105 19 12 19c-5.106 0-8.455-4.505-9.58-6.287Z"}),a.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}));W.displayName="Eye";function k(l){const e=`deco-filters-${l}`,[t,c]=a.useState(()=>{try{const o=globalThis.localStorage?.getItem(e);if(o)return JSON.parse(o)}catch(o){console.error("Failed to parse stored filters:",o)}return[]});return[t,o=>{c(o);try{globalThis.localStorage?.setItem(e,JSON.stringify(o))}catch(i){console.error("Failed to save filters:",i)}}]}function C(l){const e=T.c(7),[t,c]=a.useState(l),[s,o]=a.useState(l?"desc":null);let i;e[0]!==s||e[1]!==t?(i=h=>{t!==h?(c(h),o("asc")):s==="asc"?o("desc"):s==="desc"&&(c(void 0),o(null))},e[0]=s,e[1]=t,e[2]=i):i=e[2];const u=i;let r;return e[3]!==u||e[4]!==s||e[5]!==t?(r={sortKey:t,sortDirection:s,handleSort:u},e[3]=u,e[4]=s,e[5]=t,e[6]=r):r=e[6],r}function L(l,e){const t=T.c(12),c=e===void 0?"cards":e,s=D(),o=a.useRef(s),i=l?`deco-view-mode-${l}`:"deco-view-mode";let u;t[0]!==c||t[1]!==i?(u=()=>{const d=globalThis.localStorage?.getItem(i);return d==="cards"||d==="table"?d:c},t[0]=c,t[1]=i,t[2]=u):u=t[2];const[r,h]=a.useState(u);let f;t[3]!==i?(f=d=>{h(d),globalThis.localStorage?.setItem(i,d)},t[3]=i,t[4]=f):f=t[4];const p=f;let S,g;t[5]!==s||t[6]!==r?(S=()=>{!o.current&&s&&r==="table"&&h("cards"),o.current=s},g=[s,r],t[5]=s,t[6]=r,t[7]=S,t[8]=g):(S=t[7],g=t[8]),a.useEffect(S,g);let n;return t[9]!==p||t[10]!==r?(n=[r,p],t[9]=p,t[10]=r,t[11]=n):n=t[11],n}function O(l){const e=T.c(20),{namespace:t,resource:c,defaultSortKey:s,defaultViewMode:o}=l,i=s===void 0?"title":s,u=o===void 0?"table":o,[r,h]=a.useState(""),f=a.useDeferredValue(r),p=`${t}-${c}`,[S,g]=k(p),n=`mesh-${c}-filter-visible-${t}`;let d;e[0]!==n?(d=()=>globalThis.localStorage?.getItem(n)==="true",e[0]=n,e[1]=d):d=e[1];const[m,B]=a.useState(d);let y;e[2]!==n?(y=I=>{B(I),globalThis.localStorage?.setItem(n,String(I))},e[2]=n,e[3]=y):y=e[3];const b=y;let M;e[4]!==m||e[5]!==b?(M=()=>{b(!m)},e[4]=m,e[5]=b,e[6]=M):M=e[6];const w=M,[V,$]=L(`mesh-${c}-${t}`,u),{sortKey:x,sortDirection:F,handleSort:K}=C(i),E=x;let v;return e[7]!==m||e[8]!==S||e[9]!==K||e[10]!==r||e[11]!==f||e[12]!==b||e[13]!==g||e[14]!==$||e[15]!==F||e[16]!==E||e[17]!==w||e[18]!==V?(v={search:r,searchTerm:f,setSearch:h,filters:S,setFilters:g,filterBarVisible:m,setFilterBarVisible:b,toggleFilterBar:w,viewMode:V,setViewMode:$,sortKey:E,sortDirection:F,handleSort:K},e[7]=m,e[8]=S,e[9]=K,e[10]=r,e[11]=f,e[12]=b,e[13]=g,e[14]=$,e[15]=F,e[16]=E,e[17]=w,e[18]=V,e[19]=v):v=e[19],v}export{W as s,O as u};
@@ -1 +1 @@
1
- import{c as E,K as b}from"./index-lLPOJwFP.js";import{u as j}from"./useQuery-CLJFoOtO.js";function T(g){const e=E.c(18),{url:o,token:r,enabled:w}=g,$=w===void 0?!0:w;let i;e[0]!==r||e[1]!==o?(i=b.mcpTools(o,r),e[0]=r,e[1]=o,e[2]=i):i=e[2];let s;e[3]!==r||e[4]!==o?(s=async()=>{if(!o)return[];const m={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};r&&(m.Authorization=`Bearer ${r}`);const u=await fetch(o,{method:"POST",headers:m,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"mesh-mcp",version:"1.0.0"}}})});if(!u.ok)throw new Error(`MCP initialization failed: ${u.status}`);const h=await u.json();if(h.error)throw new Error(`MCP initialization error: ${h.error.message} (code: ${h.error.code})`);const y=await fetch(o,{method:"POST",headers:m,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"tools/list",params:{}})});if(!y.ok)throw new Error(`Failed to list tools: ${y.status}`);const l=await y.json();if(l.error)throw new Error(`Failed to list tools: ${l.error.message} (code: ${l.error.code})`);return l.result?.tools||[]},e[3]=r,e[4]=o,e[5]=s):s=e[5];const d=$&&!!o;let a;e[6]!==i||e[7]!==s||e[8]!==d?(a={queryKey:i,queryFn:s,enabled:d,staleTime:3e4,retry:!1},e[6]=i,e[7]=s,e[8]=d,e[9]=a):a=e[9];const t=j(a),f=o?t.isLoading?"connecting":t.isError?"error":"ready":"disconnected";let n;e[10]!==t.data?(n=t.data||[],e[10]=t.data,e[11]=n):n=e[11];const p=t.error;let c;return e[12]!==t.isLoading||e[13]!==t.refetch||e[14]!==f||e[15]!==n||e[16]!==p?(c={tools:n,state:f,error:p,isLoading:t.isLoading,refetch:t.refetch},e[12]=t.isLoading,e[13]=t.refetch,e[14]=f,e[15]=n,e[16]=p,e[17]=c):c=e[17],c}export{T as u};
1
+ import{c as E,K as b}from"./index-B2ZzxrDd.js";import{u as j}from"./useQuery-DVzj5fVO.js";function T(g){const e=E.c(18),{url:o,token:r,enabled:w}=g,$=w===void 0?!0:w;let i;e[0]!==r||e[1]!==o?(i=b.mcpTools(o,r),e[0]=r,e[1]=o,e[2]=i):i=e[2];let s;e[3]!==r||e[4]!==o?(s=async()=>{if(!o)return[];const m={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};r&&(m.Authorization=`Bearer ${r}`);const u=await fetch(o,{method:"POST",headers:m,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"mesh-mcp",version:"1.0.0"}}})});if(!u.ok)throw new Error(`MCP initialization failed: ${u.status}`);const h=await u.json();if(h.error)throw new Error(`MCP initialization error: ${h.error.message} (code: ${h.error.code})`);const y=await fetch(o,{method:"POST",headers:m,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"tools/list",params:{}})});if(!y.ok)throw new Error(`Failed to list tools: ${y.status}`);const l=await y.json();if(l.error)throw new Error(`Failed to list tools: ${l.error.message} (code: ${l.error.code})`);return l.result?.tools||[]},e[3]=r,e[4]=o,e[5]=s):s=e[5];const d=$&&!!o;let a;e[6]!==i||e[7]!==s||e[8]!==d?(a={queryKey:i,queryFn:s,enabled:d,staleTime:3e4,retry:!1},e[6]=i,e[7]=s,e[8]=d,e[9]=a):a=e[9];const t=j(a),f=o?t.isLoading?"connecting":t.isError?"error":"ready":"disconnected";let n;e[10]!==t.data?(n=t.data||[],e[10]=t.data,e[11]=n):n=e[11];const p=t.error;let c;return e[12]!==t.isLoading||e[13]!==t.refetch||e[14]!==f||e[15]!==n||e[16]!==p?(c={tools:n,state:f,error:p,isLoading:t.isLoading,refetch:t.refetch},e[12]=t.isLoading,e[13]=t.refetch,e[14]=f,e[15]=n,e[16]=p,e[17]=c):c=e[17],c}export{T as u};
@@ -1 +1 @@
1
- import{c as o,v as n,K as u,a as i}from"./index-lLPOJwFP.js";import{u as a}from"./project-context-provider-BMHXD39x.js";function p(){const e=o.c(4),{locator:s}=a();let t;e[0]!==s?(t=u.members(s),e[0]=s,e[1]=t):t=e[1];let r;return e[2]!==t?(r={queryKey:t,queryFn:m},e[2]=t,e[3]=r):r=e[3],n(r)}function m(){return i.organization.listMembers()}export{p as u};
1
+ import{c as o,v as n,K as u,a as i}from"./index-B2ZzxrDd.js";import{u as a}from"./project-context-provider-CwANTiF8.js";function p(){const e=o.c(4),{locator:s}=a();let t;e[0]!==s?(t=u.members(s),e[0]=s,e[1]=t):t=e[1];let r;return e[2]!==t?(r={queryKey:t,queryFn:m},e[2]=t,e[3]=r):r=e[3],n(r)}function m(){return i.organization.listMembers()}export{p as u};
@@ -1 +1 @@
1
- import{c as m,r}from"./index-lLPOJwFP.js";const a=768,o=()=>globalThis.innerWidth<a;function u(){const e=m.c(2),[l,n]=r.useState(o);let t,s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{const i=()=>n(o),c=globalThis.matchMedia(`(max-width: ${a-1}px)`);return c.addEventListener("change",i),n(o),()=>c.removeEventListener("change",i)},s=[],e[0]=t,e[1]=s):(t=e[0],s=e[1]),r.useEffect(t,s),l}export{u};
1
+ import{c as m,r}from"./index-B2ZzxrDd.js";const a=768,o=()=>globalThis.innerWidth<a;function u(){const e=m.c(2),[l,n]=r.useState(o);let t,s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{const i=()=>n(o),c=globalThis.matchMedia(`(max-width: ${a-1}px)`);return c.addEventListener("change",i),n(o),()=>c.removeEventListener("change",i)},s=[],e[0]=t,e[1]=s):(t=e[0],s=e[1]),r.useEffect(t,s),l}export{u};
@@ -1 +1 @@
1
- import{c as f,v as y,x as p,K as m}from"./index-lLPOJwFP.js";import{u as T}from"./useMutation-8xrpFP-l.js";import{c as S}from"./connection-CMutAR-q.js";function N(t){const e=f.c(8);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=S(),e[0]=n):n=e[0];const u=n;let r;e[1]!==t?(r=m.organizationSettings(t),e[1]=t,e[2]=r):r=e[2];let s;e[3]!==t?(s=async()=>{const i=await u("ORGANIZATION_SETTINGS_GET",{});return i||{organizationId:t,sidebar_items:null,enabled_plugins:null,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}},e[3]=t,e[4]=s):s=e[4];let l;e[5]!==r||e[6]!==s?(l={queryKey:r,queryFn:s,staleTime:6e4},e[5]=r,e[6]=s,e[7]=l):l=e[7];const{data:c}=y(l);return c}function C(t){const e=f.c(11),n=p();let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=S(),e[0]=u):u=e[0];const r=u;let s;e[1]!==t?(s=async o=>await r("ORGANIZATION_SETTINGS_UPDATE",{organizationId:t,...o}),e[1]=t,e[2]=s):s=e[2];let l;e[3]!==t||e[4]!==n?(l=o=>{n.setQueryData(m.organizationSettings(t),o)},e[3]=t,e[4]=n,e[5]=l):l=e[5];let c;e[6]!==s||e[7]!==l?(c={mutationFn:s,onSuccess:l},e[6]=s,e[7]=l,e[8]=c):c=e[8];const i=T(c);let a;return e[9]!==i?(a={update:i},e[9]=i,e[10]=a):a=e[10],a}export{C as a,N as u};
1
+ import{c as f,v as y,x as p,K as m}from"./index-B2ZzxrDd.js";import{u as T}from"./useMutation-Lj6qQmhH.js";import{c as S}from"./connection-Cgb7Z5-V.js";function N(t){const e=f.c(8);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=S(),e[0]=n):n=e[0];const u=n;let r;e[1]!==t?(r=m.organizationSettings(t),e[1]=t,e[2]=r):r=e[2];let s;e[3]!==t?(s=async()=>{const i=await u("ORGANIZATION_SETTINGS_GET",{});return i||{organizationId:t,sidebar_items:null,enabled_plugins:null,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}},e[3]=t,e[4]=s):s=e[4];let l;e[5]!==r||e[6]!==s?(l={queryKey:r,queryFn:s,staleTime:6e4},e[5]=r,e[6]=s,e[7]=l):l=e[7];const{data:c}=y(l);return c}function C(t){const e=f.c(11),n=p();let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=S(),e[0]=u):u=e[0];const r=u;let s;e[1]!==t?(s=async o=>await r("ORGANIZATION_SETTINGS_UPDATE",{organizationId:t,...o}),e[1]=t,e[2]=s):s=e[2];let l;e[3]!==t||e[4]!==n?(l=o=>{n.setQueryData(m.organizationSettings(t),o)},e[3]=t,e[4]=n,e[5]=l):l=e[5];let c;e[6]!==s||e[7]!==l?(c={mutationFn:s,onSuccess:l},e[6]=s,e[7]=l,e[8]=c):c=e[8];const i=T(c);let a;return e[9]!==i?(a={update:i},e[9]=i,e[10]=a):a=e[10],a}export{C as a,N as u};
@@ -1 +1 @@
1
- import{c as p,K as C,v as T}from"./index-lLPOJwFP.js";import{u as q}from"./useQuery-CLJFoOtO.js";import{u as K}from"./useMutation-8xrpFP-l.js";function E(a){const e=p.c(23);let o,l,t,s,r;e[0]!==a?({toolCaller:t,toolName:r,toolInputParams:s,scope:l,...o}=a,e[0]=a,e[1]=o,e[2]=l,e[3]=t,e[4]=s,e[5]=r):(o=e[1],l=e[2],t=e[3],s=e[4],r=e[5]);let i,c,m,u;if(e[6]!==o||e[7]!==l||e[8]!==s||e[9]!==r){const y=JSON.stringify(s);u=T,i=o,c=o.staleTime??6e4,m=C.toolCall(l,r,y),e[6]=o,e[7]=l,e[8]=s,e[9]=r,e[10]=i,e[11]=c,e[12]=m,e[13]=u}else i=e[10],c=e[11],m=e[12],u=e[13];let n;e[14]!==t||e[15]!==s||e[16]!==r?(n=async()=>await t(r,s),e[14]=t,e[15]=s,e[16]=r,e[17]=n):n=e[17];let f;return e[18]!==i||e[19]!==c||e[20]!==m||e[21]!==n?(f={...i,staleTime:c,queryKey:m,queryFn:n},e[18]=i,e[19]=c,e[20]=m,e[21]=n,e[22]=f):f=e[22],u(f)}function F(a){const e=p.c(3),{toolCaller:o,toolName:l}=a;let t;return e[0]!==o||e[1]!==l?(t={mutationFn:async s=>await o(l,s),onSuccess:S,onError:N},e[0]=o,e[1]=l,e[2]=t):t=e[2],K(t)}function N(a){console.error("tool call mutation error",a)}function S(a){console.log("tool call mutation success",a)}function I(a){const e=p.c(14),{toolCaller:o,toolName:l,toolInputParams:t,scope:s,staleTime:r,refetchInterval:i,enabled:c}=a,m=r===void 0?6e4:r;let u;e[0]!==s||e[1]!==t||e[2]!==l?(u=C.toolCall(s,l,JSON.stringify(t??{})),e[0]=s,e[1]=t,e[2]=l,e[3]=u):u=e[3];let n;e[4]!==o||e[5]!==t||e[6]!==l?(n=async()=>await o(l,t??{}),e[4]=o,e[5]=t,e[6]=l,e[7]=n):n=e[7];let f;return e[8]!==c||e[9]!==i||e[10]!==m||e[11]!==u||e[12]!==n?(f={queryKey:u,queryFn:n,enabled:c,staleTime:m,refetchInterval:i},e[8]=c,e[9]=i,e[10]=m,e[11]=u,e[12]=n,e[13]=f):f=e[13],q(f)}export{I as a,F as b,E as u};
1
+ import{c as p,K as C,v as T}from"./index-B2ZzxrDd.js";import{u as q}from"./useQuery-DVzj5fVO.js";import{u as K}from"./useMutation-Lj6qQmhH.js";function E(a){const e=p.c(23);let o,l,t,s,r;e[0]!==a?({toolCaller:t,toolName:r,toolInputParams:s,scope:l,...o}=a,e[0]=a,e[1]=o,e[2]=l,e[3]=t,e[4]=s,e[5]=r):(o=e[1],l=e[2],t=e[3],s=e[4],r=e[5]);let i,c,m,u;if(e[6]!==o||e[7]!==l||e[8]!==s||e[9]!==r){const y=JSON.stringify(s);u=T,i=o,c=o.staleTime??6e4,m=C.toolCall(l,r,y),e[6]=o,e[7]=l,e[8]=s,e[9]=r,e[10]=i,e[11]=c,e[12]=m,e[13]=u}else i=e[10],c=e[11],m=e[12],u=e[13];let n;e[14]!==t||e[15]!==s||e[16]!==r?(n=async()=>await t(r,s),e[14]=t,e[15]=s,e[16]=r,e[17]=n):n=e[17];let f;return e[18]!==i||e[19]!==c||e[20]!==m||e[21]!==n?(f={...i,staleTime:c,queryKey:m,queryFn:n},e[18]=i,e[19]=c,e[20]=m,e[21]=n,e[22]=f):f=e[22],u(f)}function F(a){const e=p.c(3),{toolCaller:o,toolName:l}=a;let t;return e[0]!==o||e[1]!==l?(t={mutationFn:async s=>await o(l,s),onSuccess:S,onError:N},e[0]=o,e[1]=l,e[2]=t):t=e[2],K(t)}function N(a){console.error("tool call mutation error",a)}function S(a){console.log("tool call mutation success",a)}function I(a){const e=p.c(14),{toolCaller:o,toolName:l,toolInputParams:t,scope:s,staleTime:r,refetchInterval:i,enabled:c}=a,m=r===void 0?6e4:r;let u;e[0]!==s||e[1]!==t||e[2]!==l?(u=C.toolCall(s,l,JSON.stringify(t??{})),e[0]=s,e[1]=t,e[2]=l,e[3]=u):u=e[3];let n;e[4]!==o||e[5]!==t||e[6]!==l?(n=async()=>await o(l,t??{}),e[4]=o,e[5]=t,e[6]=l,e[7]=n):n=e[7];let f;return e[8]!==c||e[9]!==i||e[10]!==m||e[11]!==u||e[12]!==n?(f={queryKey:u,queryFn:n,enabled:c,staleTime:m,refetchInterval:i},e[8]=c,e[9]=i,e[10]=m,e[11]=u,e[12]=n,e[13]=f):f=e[13],q(f)}export{I as a,F as b,E as u};
@@ -0,0 +1 @@
1
+ import{I as u}from"./infiniteQueryObserver-2ElA8vy3.js";import{U as i}from"./index-B2ZzxrDd.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +1 @@
1
- import{b0 as l,b2 as b,bP as n,bQ as d,b1 as h,x as p,r as o,ba as m,bR as v}from"./index-lLPOJwFP.js";var y=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),b(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&n(s.mutationKey)!==n(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??d();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,r=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#e.onSuccess?.(t.data,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(t.data,null,s,r,e)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#e.onError?.(t.error,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(void 0,t.error,s,r,e)}catch(i){Promise.reject(i)}}}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const r=p(s),[e]=o.useState(()=>new y(r,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const i=o.useSyncExternalStore(o.useCallback(a=>e.subscribe(h.batchCalls(a)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((a,c)=>{e.mutate(a,c).catch(m)},[e]);if(i.error&&v(e.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:u,mutateAsync:i.mutate}}export{O as u};
1
+ import{b0 as l,b2 as b,bP as n,bQ as d,b1 as h,x as p,r as o,ba as m,bR as v}from"./index-B2ZzxrDd.js";var y=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),b(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&n(s.mutationKey)!==n(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??d();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,r=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#e.onSuccess?.(t.data,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(t.data,null,s,r,e)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#e.onError?.(t.error,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(void 0,t.error,s,r,e)}catch(i){Promise.reject(i)}}}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const r=p(s),[e]=o.useState(()=>new y(r,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const i=o.useSyncExternalStore(o.useCallback(a=>e.subscribe(h.batchCalls(a)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((a,c)=>{e.mutate(a,c).catch(m)},[e]);if(i.error&&v(e.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:u,mutateAsync:i.mutate}}export{O as u};
@@ -0,0 +1 @@
1
+ import{U as u,b4 as s}from"./index-B2ZzxrDd.js";function o(e,r){return u(e,s,r)}export{o as u};
@@ -1 +1 @@
1
- import{r as z,aa as A,j as u,a6 as M,a8 as ge,H as h,a5 as he,ab as X,ac as pe,a4 as be,ad as me,h as ve,c as Y}from"./index-lLPOJwFP.js";import{c as Z}from"./button-C0pnkZlC.js";var ee="Toggle",te=z.forwardRef((t,e)=>{const{pressed:r,defaultPressed:n,onPressedChange:a,...o}=t,[i,s]=A({prop:r,onChange:a,defaultProp:n??!1,caller:ee});return u.jsx(M.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":t.disabled?"":void 0,...o,ref:e,onClick:ge(t.onClick,()=>{t.disabled||s(!i)})})});te.displayName=ee;var b="ToggleGroup",[re]=he(b,[X]),ne=X(),S=h.forwardRef((t,e)=>{const{type:r,...n}=t;if(r==="single"){const a=n;return u.jsx(we,{...a,ref:e})}if(r==="multiple"){const a=n;return u.jsx(ye,{...a,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${b}\``)});S.displayName=b;var[ae,ie]=re(b),we=h.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...o}=t,[i,s]=A({prop:r,defaultProp:n??"",onChange:a,caller:b});return u.jsx(ae,{scope:t.__scopeToggleGroup,type:"single",value:h.useMemo(()=>i?[i]:[],[i]),onItemActivate:s,onItemDeactivate:h.useCallback(()=>s(""),[s]),children:u.jsx(oe,{...o,ref:e})})}),ye=h.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...o}=t,[i,s]=A({prop:r,defaultProp:n??[],onChange:a,caller:b}),f=h.useCallback(l=>s((d=[])=>[...d,l]),[s]),c=h.useCallback(l=>s((d=[])=>d.filter(xe=>xe!==l)),[s]);return u.jsx(ae,{scope:t.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:f,onItemDeactivate:c,children:u.jsx(oe,{...o,ref:e})})});S.displayName=b;var[$e,Ne]=re(b),oe=h.forwardRef((t,e)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:a=!0,orientation:o,dir:i,loop:s=!0,...f}=t,c=ne(r),l=be(i),d={role:"group",dir:l,...f};return u.jsx($e,{scope:r,rovingFocus:a,disabled:n,children:a?u.jsx(me,{asChild:!0,...c,orientation:o,dir:l,loop:s,children:u.jsx(M.div,{...d,ref:e})}):u.jsx(M.div,{...d,ref:e})})}),k="ToggleGroupItem",se=h.forwardRef((t,e)=>{const r=ie(k,t.__scopeToggleGroup),n=Ne(k,t.__scopeToggleGroup),a=ne(t.__scopeToggleGroup),o=r.value.includes(t.value),i=n.disabled||t.disabled,s={...t,pressed:o,disabled:i},f=h.useRef(null);return n.rovingFocus?u.jsx(pe,{asChild:!0,...a,focusable:!i,active:o,ref:f,children:u.jsx(D,{...s,ref:e})}):u.jsx(D,{...s,ref:e})});se.displayName=k;var D=h.forwardRef((t,e)=>{const{__scopeToggleGroup:r,value:n,...a}=t,o=ie(k,r),i={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},s=o.type==="single"?i:void 0;return u.jsx(te,{...s,...a,ref:e,onPressedChange:f=>{f?o.onItemActivate(n):o.onItemDeactivate(n)}})}),Ge=S,Pe=se;const Re=ve("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),fe=z.createContext({size:"default",variant:"default"});function Ye(t){const e=Y.c(20);let r,n,a,o,i;e[0]!==t?({className:n,variant:i,size:o,children:r,...a}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=o,e[5]=i):(r=e[1],n=e[2],a=e[3],o=e[4],i=e[5]);let s;e[6]!==n?(s=Z("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",n),e[6]=n,e[7]=s):s=e[7];let f;e[8]!==o||e[9]!==i?(f={variant:i,size:o},e[8]=o,e[9]=i,e[10]=f):f=e[10];let c;e[11]!==r||e[12]!==f?(c=u.jsx(fe.Provider,{value:f,children:r}),e[11]=r,e[12]=f,e[13]=c):c=e[13];let l;return e[14]!==a||e[15]!==o||e[16]!==s||e[17]!==c||e[18]!==i?(l=u.jsx(Ge,{"data-slot":"toggle-group","data-variant":i,"data-size":o,className:s,...a,children:c}),e[14]=a,e[15]=o,e[16]=s,e[17]=c,e[18]=i,e[19]=l):l=e[19],l}function Ze(t){const e=Y.c(18);let r,n,a,o,i;e[0]!==t?({className:n,children:r,variant:i,size:o,...a}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=o,e[5]=i):(r=e[1],n=e[2],a=e[3],o=e[4],i=e[5]);const s=z.useContext(fe),f=s.variant||i,c=s.size||o;let l;e[6]!==n||e[7]!==s.size||e[8]!==s.variant||e[9]!==o||e[10]!==i?(l=Z(Re({variant:s.variant||i,size:s.size||o}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",n),e[6]=n,e[7]=s.size,e[8]=s.variant,e[9]=o,e[10]=i,e[11]=l):l=e[11];let d;return e[12]!==r||e[13]!==a||e[14]!==f||e[15]!==c||e[16]!==l?(d=u.jsx(Pe,{"data-slot":"toggle-group-item","data-variant":f,"data-size":c,className:l,...a,children:r}),e[12]=r,e[13]=a,e[14]=f,e[15]=c,e[16]=l,e[17]=d):d=e[17],d}function V(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function le(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function G(){}var y=.7,C=1/y,w="\\s*([+-]?\\d+)\\s*",$="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",p="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ke=/^#([0-9a-f]{3,8})$/,Ce=new RegExp(`^rgb\\(${w},${w},${w}\\)$`),Te=new RegExp(`^rgb\\(${p},${p},${p}\\)$`),je=new RegExp(`^rgba\\(${w},${w},${w},${$}\\)$`),_e=new RegExp(`^rgba\\(${p},${p},${p},${$}\\)$`),Me=new RegExp(`^hsl\\(${$},${p},${p}\\)$`),Ie=new RegExp(`^hsla\\(${$},${p},${p},${$}\\)$`),F={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};V(G,N,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:O,formatHex:O,formatHex8:Ee,formatHsl:He,formatRgb:B,toString:B});function O(){return this.rgb().formatHex()}function Ee(){return this.rgb().formatHex8()}function He(){return ce(this).formatHsl()}function B(){return this.rgb().formatRgb()}function N(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=ke.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?L(e):r===3?new x(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?P(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?P(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Ce.exec(t))?new x(e[1],e[2],e[3],1):(e=Te.exec(t))?new x(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=je.exec(t))?P(e[1],e[2],e[3],e[4]):(e=_e.exec(t))?P(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Me.exec(t))?K(e[1],e[2]/100,e[3]/100,1):(e=Ie.exec(t))?K(e[1],e[2]/100,e[3]/100,e[4]):F.hasOwnProperty(t)?L(F[t]):t==="transparent"?new x(NaN,NaN,NaN,0):null}function L(t){return new x(t>>16&255,t>>8&255,t&255,1)}function P(t,e,r,n){return n<=0&&(t=e=r=NaN),new x(t,e,r,n)}function ze(t){return t instanceof G||(t=N(t)),t?(t=t.rgb(),new x(t.r,t.g,t.b,t.opacity)):new x}function I(t,e,r,n){return arguments.length===1?ze(t):new x(t,e,r,n??1)}function x(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}V(x,I,le(G,{brighter(t){return t=t==null?C:Math.pow(C,t),new x(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?y:Math.pow(y,t),new x(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new x(v(this.r),v(this.g),v(this.b),T(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:U,formatHex:U,formatHex8:Ae,formatRgb:J,toString:J}));function U(){return`#${m(this.r)}${m(this.g)}${m(this.b)}`}function Ae(){return`#${m(this.r)}${m(this.g)}${m(this.b)}${m((isNaN(this.opacity)?1:this.opacity)*255)}`}function J(){const t=T(this.opacity);return`${t===1?"rgb(":"rgba("}${v(this.r)}, ${v(this.g)}, ${v(this.b)}${t===1?")":`, ${t})`}`}function T(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function v(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function m(t){return t=v(t),(t<16?"0":"")+t.toString(16)}function K(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new g(t,e,r,n)}function ce(t){if(t instanceof g)return new g(t.h,t.s,t.l,t.opacity);if(t instanceof G||(t=N(t)),!t)return new g;if(t instanceof g)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,a=Math.min(e,r,n),o=Math.max(e,r,n),i=NaN,s=o-a,f=(o+a)/2;return s?(e===o?i=(r-n)/s+(r<n)*6:r===o?i=(n-e)/s+2:i=(e-r)/s+4,s/=f<.5?o+a:2-o-a,i*=60):s=f>0&&f<1?0:i,new g(i,s,f,t.opacity)}function Se(t,e,r,n){return arguments.length===1?ce(t):new g(t,e,r,n??1)}function g(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}V(g,Se,le(G,{brighter(t){return t=t==null?C:Math.pow(C,t),new g(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?y:Math.pow(y,t),new g(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,a=2*r-n;return new x(j(t>=240?t-240:t+120,a,n),j(t,a,n),j(t<120?t+240:t-120,a,n),this.opacity)},clamp(){return new g(Q(this.h),R(this.s),R(this.l),T(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=T(this.opacity);return`${t===1?"hsl(":"hsla("}${Q(this.h)}, ${R(this.s)*100}%, ${R(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Q(t){return t=(t||0)%360,t<0?t+360:t}function R(t){return Math.max(0,Math.min(1,t||0))}function j(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const q=t=>()=>t;function Ve(t,e){return function(r){return t+r*e}}function qe(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function De(t){return(t=+t)==1?ue:function(e,r){return r-e?qe(e,r,t):q(isNaN(e)?r:e)}}function ue(t,e){var r=e-t;return r?Ve(t,r):q(isNaN(t)?e:t)}const W=(function t(e){var r=De(e);function n(a,o){var i=r((a=I(a)).r,(o=I(o)).r),s=r(a.g,o.g),f=r(a.b,o.b),c=ue(a.opacity,o.opacity);return function(l){return a.r=i(l),a.g=s(l),a.b=f(l),a.opacity=c(l),a+""}}return n.gamma=t,n})(1);function Fe(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),a;return function(o){for(a=0;a<r;++a)n[a]=t[a]*(1-o)+e[a]*o;return n}}function Oe(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Be(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,a=new Array(n),o=new Array(r),i;for(i=0;i<n;++i)a[i]=de(t[i],e[i]);for(;i<r;++i)o[i]=e[i];return function(s){for(i=0;i<n;++i)o[i]=a[i](s);return o}}function Le(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function E(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function Ue(t,e){var r={},n={},a;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(a in e)a in t?r[a]=de(t[a],e[a]):n[a]=e[a];return function(o){for(a in r)n[a]=r[a](o);return n}}var H=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_=new RegExp(H.source,"g");function Je(t){return function(){return t}}function Ke(t){return function(e){return t(e)+""}}function Qe(t,e){var r=H.lastIndex=_.lastIndex=0,n,a,o,i=-1,s=[],f=[];for(t=t+"",e=e+"";(n=H.exec(t))&&(a=_.exec(e));)(o=a.index)>r&&(o=e.slice(r,o),s[i]?s[i]+=o:s[++i]=o),(n=n[0])===(a=a[0])?s[i]?s[i]+=a:s[++i]=a:(s[++i]=null,f.push({i,x:E(n,a)})),r=_.lastIndex;return r<e.length&&(o=e.slice(r),s[i]?s[i]+=o:s[++i]=o),s.length<2?f[0]?Ke(f[0].x):Je(e):(e=f.length,function(c){for(var l=0,d;l<e;++l)s[(d=f[l]).i]=d.x(c);return s.join("")})}function de(t,e){var r=typeof e,n;return e==null||r==="boolean"?q(e):(r==="number"?E:r==="string"?(n=N(e))?(e=n,W):Qe:e instanceof N?W:e instanceof Date?Le:Oe(e)?Fe:Array.isArray(e)?Be:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Ue:E)(t,e)}export{Ze as T,W as a,Qe as b,N as c,de as d,Ye as e,E as i};
1
+ import{r as z,aa as A,j as u,a6 as M,a8 as ge,H as h,a5 as he,ab as X,ac as pe,a4 as be,ad as me,h as ve,c as Y}from"./index-B2ZzxrDd.js";import{c as Z}from"./button-CJFU-RdP.js";var ee="Toggle",te=z.forwardRef((t,e)=>{const{pressed:r,defaultPressed:n,onPressedChange:a,...o}=t,[i,s]=A({prop:r,onChange:a,defaultProp:n??!1,caller:ee});return u.jsx(M.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":t.disabled?"":void 0,...o,ref:e,onClick:ge(t.onClick,()=>{t.disabled||s(!i)})})});te.displayName=ee;var b="ToggleGroup",[re]=he(b,[X]),ne=X(),S=h.forwardRef((t,e)=>{const{type:r,...n}=t;if(r==="single"){const a=n;return u.jsx(we,{...a,ref:e})}if(r==="multiple"){const a=n;return u.jsx(ye,{...a,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${b}\``)});S.displayName=b;var[ae,ie]=re(b),we=h.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...o}=t,[i,s]=A({prop:r,defaultProp:n??"",onChange:a,caller:b});return u.jsx(ae,{scope:t.__scopeToggleGroup,type:"single",value:h.useMemo(()=>i?[i]:[],[i]),onItemActivate:s,onItemDeactivate:h.useCallback(()=>s(""),[s]),children:u.jsx(oe,{...o,ref:e})})}),ye=h.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...o}=t,[i,s]=A({prop:r,defaultProp:n??[],onChange:a,caller:b}),f=h.useCallback(l=>s((d=[])=>[...d,l]),[s]),c=h.useCallback(l=>s((d=[])=>d.filter(xe=>xe!==l)),[s]);return u.jsx(ae,{scope:t.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:f,onItemDeactivate:c,children:u.jsx(oe,{...o,ref:e})})});S.displayName=b;var[$e,Ne]=re(b),oe=h.forwardRef((t,e)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:a=!0,orientation:o,dir:i,loop:s=!0,...f}=t,c=ne(r),l=be(i),d={role:"group",dir:l,...f};return u.jsx($e,{scope:r,rovingFocus:a,disabled:n,children:a?u.jsx(me,{asChild:!0,...c,orientation:o,dir:l,loop:s,children:u.jsx(M.div,{...d,ref:e})}):u.jsx(M.div,{...d,ref:e})})}),k="ToggleGroupItem",se=h.forwardRef((t,e)=>{const r=ie(k,t.__scopeToggleGroup),n=Ne(k,t.__scopeToggleGroup),a=ne(t.__scopeToggleGroup),o=r.value.includes(t.value),i=n.disabled||t.disabled,s={...t,pressed:o,disabled:i},f=h.useRef(null);return n.rovingFocus?u.jsx(pe,{asChild:!0,...a,focusable:!i,active:o,ref:f,children:u.jsx(D,{...s,ref:e})}):u.jsx(D,{...s,ref:e})});se.displayName=k;var D=h.forwardRef((t,e)=>{const{__scopeToggleGroup:r,value:n,...a}=t,o=ie(k,r),i={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},s=o.type==="single"?i:void 0;return u.jsx(te,{...s,...a,ref:e,onPressedChange:f=>{f?o.onItemActivate(n):o.onItemDeactivate(n)}})}),Ge=S,Pe=se;const Re=ve("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),fe=z.createContext({size:"default",variant:"default"});function Ye(t){const e=Y.c(20);let r,n,a,o,i;e[0]!==t?({className:n,variant:i,size:o,children:r,...a}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=o,e[5]=i):(r=e[1],n=e[2],a=e[3],o=e[4],i=e[5]);let s;e[6]!==n?(s=Z("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",n),e[6]=n,e[7]=s):s=e[7];let f;e[8]!==o||e[9]!==i?(f={variant:i,size:o},e[8]=o,e[9]=i,e[10]=f):f=e[10];let c;e[11]!==r||e[12]!==f?(c=u.jsx(fe.Provider,{value:f,children:r}),e[11]=r,e[12]=f,e[13]=c):c=e[13];let l;return e[14]!==a||e[15]!==o||e[16]!==s||e[17]!==c||e[18]!==i?(l=u.jsx(Ge,{"data-slot":"toggle-group","data-variant":i,"data-size":o,className:s,...a,children:c}),e[14]=a,e[15]=o,e[16]=s,e[17]=c,e[18]=i,e[19]=l):l=e[19],l}function Ze(t){const e=Y.c(18);let r,n,a,o,i;e[0]!==t?({className:n,children:r,variant:i,size:o,...a}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=o,e[5]=i):(r=e[1],n=e[2],a=e[3],o=e[4],i=e[5]);const s=z.useContext(fe),f=s.variant||i,c=s.size||o;let l;e[6]!==n||e[7]!==s.size||e[8]!==s.variant||e[9]!==o||e[10]!==i?(l=Z(Re({variant:s.variant||i,size:s.size||o}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",n),e[6]=n,e[7]=s.size,e[8]=s.variant,e[9]=o,e[10]=i,e[11]=l):l=e[11];let d;return e[12]!==r||e[13]!==a||e[14]!==f||e[15]!==c||e[16]!==l?(d=u.jsx(Pe,{"data-slot":"toggle-group-item","data-variant":f,"data-size":c,className:l,...a,children:r}),e[12]=r,e[13]=a,e[14]=f,e[15]=c,e[16]=l,e[17]=d):d=e[17],d}function V(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function le(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function G(){}var y=.7,C=1/y,w="\\s*([+-]?\\d+)\\s*",$="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",p="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ke=/^#([0-9a-f]{3,8})$/,Ce=new RegExp(`^rgb\\(${w},${w},${w}\\)$`),Te=new RegExp(`^rgb\\(${p},${p},${p}\\)$`),je=new RegExp(`^rgba\\(${w},${w},${w},${$}\\)$`),_e=new RegExp(`^rgba\\(${p},${p},${p},${$}\\)$`),Me=new RegExp(`^hsl\\(${$},${p},${p}\\)$`),Ie=new RegExp(`^hsla\\(${$},${p},${p},${$}\\)$`),F={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};V(G,N,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:O,formatHex:O,formatHex8:Ee,formatHsl:He,formatRgb:B,toString:B});function O(){return this.rgb().formatHex()}function Ee(){return this.rgb().formatHex8()}function He(){return ce(this).formatHsl()}function B(){return this.rgb().formatRgb()}function N(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=ke.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?L(e):r===3?new x(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?P(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?P(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Ce.exec(t))?new x(e[1],e[2],e[3],1):(e=Te.exec(t))?new x(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=je.exec(t))?P(e[1],e[2],e[3],e[4]):(e=_e.exec(t))?P(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Me.exec(t))?K(e[1],e[2]/100,e[3]/100,1):(e=Ie.exec(t))?K(e[1],e[2]/100,e[3]/100,e[4]):F.hasOwnProperty(t)?L(F[t]):t==="transparent"?new x(NaN,NaN,NaN,0):null}function L(t){return new x(t>>16&255,t>>8&255,t&255,1)}function P(t,e,r,n){return n<=0&&(t=e=r=NaN),new x(t,e,r,n)}function ze(t){return t instanceof G||(t=N(t)),t?(t=t.rgb(),new x(t.r,t.g,t.b,t.opacity)):new x}function I(t,e,r,n){return arguments.length===1?ze(t):new x(t,e,r,n??1)}function x(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}V(x,I,le(G,{brighter(t){return t=t==null?C:Math.pow(C,t),new x(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?y:Math.pow(y,t),new x(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new x(v(this.r),v(this.g),v(this.b),T(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:U,formatHex:U,formatHex8:Ae,formatRgb:J,toString:J}));function U(){return`#${m(this.r)}${m(this.g)}${m(this.b)}`}function Ae(){return`#${m(this.r)}${m(this.g)}${m(this.b)}${m((isNaN(this.opacity)?1:this.opacity)*255)}`}function J(){const t=T(this.opacity);return`${t===1?"rgb(":"rgba("}${v(this.r)}, ${v(this.g)}, ${v(this.b)}${t===1?")":`, ${t})`}`}function T(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function v(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function m(t){return t=v(t),(t<16?"0":"")+t.toString(16)}function K(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new g(t,e,r,n)}function ce(t){if(t instanceof g)return new g(t.h,t.s,t.l,t.opacity);if(t instanceof G||(t=N(t)),!t)return new g;if(t instanceof g)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,a=Math.min(e,r,n),o=Math.max(e,r,n),i=NaN,s=o-a,f=(o+a)/2;return s?(e===o?i=(r-n)/s+(r<n)*6:r===o?i=(n-e)/s+2:i=(e-r)/s+4,s/=f<.5?o+a:2-o-a,i*=60):s=f>0&&f<1?0:i,new g(i,s,f,t.opacity)}function Se(t,e,r,n){return arguments.length===1?ce(t):new g(t,e,r,n??1)}function g(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}V(g,Se,le(G,{brighter(t){return t=t==null?C:Math.pow(C,t),new g(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?y:Math.pow(y,t),new g(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,a=2*r-n;return new x(j(t>=240?t-240:t+120,a,n),j(t,a,n),j(t<120?t+240:t-120,a,n),this.opacity)},clamp(){return new g(Q(this.h),R(this.s),R(this.l),T(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=T(this.opacity);return`${t===1?"hsl(":"hsla("}${Q(this.h)}, ${R(this.s)*100}%, ${R(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Q(t){return t=(t||0)%360,t<0?t+360:t}function R(t){return Math.max(0,Math.min(1,t||0))}function j(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const q=t=>()=>t;function Ve(t,e){return function(r){return t+r*e}}function qe(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function De(t){return(t=+t)==1?ue:function(e,r){return r-e?qe(e,r,t):q(isNaN(e)?r:e)}}function ue(t,e){var r=e-t;return r?Ve(t,r):q(isNaN(t)?e:t)}const W=(function t(e){var r=De(e);function n(a,o){var i=r((a=I(a)).r,(o=I(o)).r),s=r(a.g,o.g),f=r(a.b,o.b),c=ue(a.opacity,o.opacity);return function(l){return a.r=i(l),a.g=s(l),a.b=f(l),a.opacity=c(l),a+""}}return n.gamma=t,n})(1);function Fe(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),a;return function(o){for(a=0;a<r;++a)n[a]=t[a]*(1-o)+e[a]*o;return n}}function Oe(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Be(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,a=new Array(n),o=new Array(r),i;for(i=0;i<n;++i)a[i]=de(t[i],e[i]);for(;i<r;++i)o[i]=e[i];return function(s){for(i=0;i<n;++i)o[i]=a[i](s);return o}}function Le(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function E(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function Ue(t,e){var r={},n={},a;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(a in e)a in t?r[a]=de(t[a],e[a]):n[a]=e[a];return function(o){for(a in r)n[a]=r[a](o);return n}}var H=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_=new RegExp(H.source,"g");function Je(t){return function(){return t}}function Ke(t){return function(e){return t(e)+""}}function Qe(t,e){var r=H.lastIndex=_.lastIndex=0,n,a,o,i=-1,s=[],f=[];for(t=t+"",e=e+"";(n=H.exec(t))&&(a=_.exec(e));)(o=a.index)>r&&(o=e.slice(r,o),s[i]?s[i]+=o:s[++i]=o),(n=n[0])===(a=a[0])?s[i]?s[i]+=a:s[++i]=a:(s[++i]=null,f.push({i,x:E(n,a)})),r=_.lastIndex;return r<e.length&&(o=e.slice(r),s[i]?s[i]+=o:s[++i]=o),s.length<2?f[0]?Ke(f[0].x):Je(e):(e=f.length,function(c){for(var l=0,d;l<e;++l)s[(d=f[l]).i]=d.x(c);return s.join("")})}function de(t,e){var r=typeof e,n;return e==null||r==="boolean"?q(e):(r==="number"?E:r==="string"?(n=N(e))?(e=n,W):Qe:e instanceof N?W:e instanceof Date?Le:Oe(e)?Fe:Array.isArray(e)?Be:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Ue:E)(t,e)}export{Ze as T,W as a,Qe as b,N as c,de as d,Ye as e,E as i};
@@ -1 +1 @@
1
- import{c as Y,r as V,j as i}from"./index-lLPOJwFP.js";import{c as n}from"./button-C0pnkZlC.js";const Z={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function oe(J){const e=Y.c(66),{value:o,onValueChange:l,options:t,size:D,fullWidth:F,className:W}=J,K=D===void 0?"sm":D,w=F===void 0?!1:F,G=V.useRef(null),H=V.useRef(null);let R;e[0]===Symbol.for("react.memo_cache_sentinel")?(R={left:0,width:0,opacity:0},e[0]=R):R=e[0];const[N,O]=V.useState(R);let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=S=>{if(!S.current)return;const{offsetLeft:U,offsetWidth:X}=S.current;O({left:U,width:X,opacity:1})},e[1]=_):_=e[1];const Q=_;let C;e[2]!==t[0].value||e[3]!==o?(C=()=>{const S=o===t[0].value?G:H;Q(S)},e[2]=t[0].value,e[3]=o,e[4]=C):C=e[4];let E;e[5]!==t||e[6]!==o?(E=[o,t],e[5]=t,e[6]=o,e[7]=E):E=e[7],V.useEffect(C,E);const s=Z[K];let a;e[8]!==W?(a=n("relative flex gap-0 bg-muted rounded-lg",W),e[8]=W,e[9]=a):a=e[9];let c;e[10]!==l||e[11]!==t[0].value?(c=()=>l(t[0].value),e[10]=l,e[11]=t[0].value,e[12]=c):c=e[12];const $=w?"flex-1 h-12 px-4":s.button,I=!w&&t[0].label?"px-3":"";let r;e[13]!==I||e[14]!==$?(r=n("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",$,I),e[13]=I,e[14]=$,e[15]=r):r=e[15];const P=o===t[0].value?"text-foreground":"text-muted-foreground";let u;e[16]!==s.icon||e[17]!==P?(u=n("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",s.icon,P),e[16]=s.icon,e[17]=P,e[18]=u):u=e[18];let f;e[19]!==t[0].icon||e[20]!==u?(f=i.jsx("span",{className:u,children:t[0].icon}),e[19]=t[0].icon,e[20]=u,e[21]=f):f=e[21];let d;e[22]!==t[0].label||e[23]!==t[0].value||e[24]!==o?(d=t[0].label&&i.jsx("span",{className:n("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[0].value?"text-foreground":"text-muted-foreground"),children:t[0].label}),e[22]=t[0].label,e[23]=t[0].value,e[24]=o,e[25]=d):d=e[25];let m;e[26]!==r||e[27]!==f||e[28]!==d||e[29]!==c?(m=i.jsxs("button",{ref:G,type:"button",onClick:c,className:r,children:[f,d]}),e[26]=r,e[27]=f,e[28]=d,e[29]=c,e[30]=m):m=e[30];let x;e[31]!==l||e[32]!==t[1].value?(x=()=>l(t[1].value),e[31]=l,e[32]=t[1].value,e[33]=x):x=e[33];const L=w?"flex-1 h-12 px-4":s.button,M=!w&&t[1].label?"px-3":"";let p;e[34]!==L||e[35]!==M?(p=n("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",L,M),e[34]=L,e[35]=M,e[36]=p):p=e[36];const T=o===t[1].value?"text-foreground":"text-muted-foreground";let b;e[37]!==s.icon||e[38]!==T?(b=n("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",s.icon,T),e[37]=s.icon,e[38]=T,e[39]=b):b=e[39];let v;e[40]!==t[1].icon||e[41]!==b?(v=i.jsx("span",{className:b,children:t[1].icon}),e[40]=t[1].icon,e[41]=b,e[42]=v):v=e[42];let g;e[43]!==t[1].label||e[44]!==t[1].value||e[45]!==o?(g=t[1].label&&i.jsx("span",{className:n("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[1].value?"text-foreground":"text-muted-foreground"),children:t[1].label}),e[43]=t[1].label,e[44]=t[1].value,e[45]=o,e[46]=g):g=e[46];let h;e[47]!==x||e[48]!==p||e[49]!==v||e[50]!==g?(h=i.jsxs("button",{ref:H,type:"button",onClick:x,className:p,children:[v,g]}),e[47]=x,e[48]=p,e[49]=v,e[50]=g,e[51]=h):h=e[51];const q=w?"h-12":s.button;let y;e[52]!==q?(y=n("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",q),e[52]=q,e[53]=y):y=e[53];const A=`${N.left}px`,B=`${N.width}px`;let j;e[54]!==N.opacity||e[55]!==A||e[56]!==B?(j={left:A,width:B,opacity:N.opacity},e[54]=N.opacity,e[55]=A,e[56]=B,e[57]=j):j=e[57];let z;e[58]!==y||e[59]!==j?(z=i.jsx("div",{className:y,style:j}),e[58]=y,e[59]=j,e[60]=z):z=e[60];let k;return e[61]!==m||e[62]!==h||e[63]!==z||e[64]!==a?(k=i.jsxs("div",{className:a,children:[m,h,z]}),e[61]=m,e[62]=h,e[63]=z,e[64]=a,e[65]=k):k=e[65],k}export{oe as V};
1
+ import{c as Y,r as V,j as i}from"./index-B2ZzxrDd.js";import{c as n}from"./button-CJFU-RdP.js";const Z={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function oe(J){const e=Y.c(66),{value:o,onValueChange:l,options:t,size:D,fullWidth:F,className:W}=J,K=D===void 0?"sm":D,w=F===void 0?!1:F,G=V.useRef(null),H=V.useRef(null);let R;e[0]===Symbol.for("react.memo_cache_sentinel")?(R={left:0,width:0,opacity:0},e[0]=R):R=e[0];const[N,O]=V.useState(R);let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=S=>{if(!S.current)return;const{offsetLeft:U,offsetWidth:X}=S.current;O({left:U,width:X,opacity:1})},e[1]=_):_=e[1];const Q=_;let C;e[2]!==t[0].value||e[3]!==o?(C=()=>{const S=o===t[0].value?G:H;Q(S)},e[2]=t[0].value,e[3]=o,e[4]=C):C=e[4];let E;e[5]!==t||e[6]!==o?(E=[o,t],e[5]=t,e[6]=o,e[7]=E):E=e[7],V.useEffect(C,E);const s=Z[K];let a;e[8]!==W?(a=n("relative flex gap-0 bg-muted rounded-lg",W),e[8]=W,e[9]=a):a=e[9];let c;e[10]!==l||e[11]!==t[0].value?(c=()=>l(t[0].value),e[10]=l,e[11]=t[0].value,e[12]=c):c=e[12];const $=w?"flex-1 h-12 px-4":s.button,I=!w&&t[0].label?"px-3":"";let r;e[13]!==I||e[14]!==$?(r=n("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",$,I),e[13]=I,e[14]=$,e[15]=r):r=e[15];const P=o===t[0].value?"text-foreground":"text-muted-foreground";let u;e[16]!==s.icon||e[17]!==P?(u=n("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",s.icon,P),e[16]=s.icon,e[17]=P,e[18]=u):u=e[18];let f;e[19]!==t[0].icon||e[20]!==u?(f=i.jsx("span",{className:u,children:t[0].icon}),e[19]=t[0].icon,e[20]=u,e[21]=f):f=e[21];let d;e[22]!==t[0].label||e[23]!==t[0].value||e[24]!==o?(d=t[0].label&&i.jsx("span",{className:n("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[0].value?"text-foreground":"text-muted-foreground"),children:t[0].label}),e[22]=t[0].label,e[23]=t[0].value,e[24]=o,e[25]=d):d=e[25];let m;e[26]!==r||e[27]!==f||e[28]!==d||e[29]!==c?(m=i.jsxs("button",{ref:G,type:"button",onClick:c,className:r,children:[f,d]}),e[26]=r,e[27]=f,e[28]=d,e[29]=c,e[30]=m):m=e[30];let x;e[31]!==l||e[32]!==t[1].value?(x=()=>l(t[1].value),e[31]=l,e[32]=t[1].value,e[33]=x):x=e[33];const L=w?"flex-1 h-12 px-4":s.button,M=!w&&t[1].label?"px-3":"";let p;e[34]!==L||e[35]!==M?(p=n("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",L,M),e[34]=L,e[35]=M,e[36]=p):p=e[36];const T=o===t[1].value?"text-foreground":"text-muted-foreground";let b;e[37]!==s.icon||e[38]!==T?(b=n("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",s.icon,T),e[37]=s.icon,e[38]=T,e[39]=b):b=e[39];let v;e[40]!==t[1].icon||e[41]!==b?(v=i.jsx("span",{className:b,children:t[1].icon}),e[40]=t[1].icon,e[41]=b,e[42]=v):v=e[42];let g;e[43]!==t[1].label||e[44]!==t[1].value||e[45]!==o?(g=t[1].label&&i.jsx("span",{className:n("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[1].value?"text-foreground":"text-muted-foreground"),children:t[1].label}),e[43]=t[1].label,e[44]=t[1].value,e[45]=o,e[46]=g):g=e[46];let h;e[47]!==x||e[48]!==p||e[49]!==v||e[50]!==g?(h=i.jsxs("button",{ref:H,type:"button",onClick:x,className:p,children:[v,g]}),e[47]=x,e[48]=p,e[49]=v,e[50]=g,e[51]=h):h=e[51];const q=w?"h-12":s.button;let y;e[52]!==q?(y=n("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",q),e[52]=q,e[53]=y):y=e[53];const A=`${N.left}px`,B=`${N.width}px`;let j;e[54]!==N.opacity||e[55]!==A||e[56]!==B?(j={left:A,width:B,opacity:N.opacity},e[54]=N.opacity,e[55]=A,e[56]=B,e[57]=j):j=e[57];let z;e[58]!==y||e[59]!==j?(z=i.jsx("div",{className:y,style:j}),e[58]=y,e[59]=j,e[60]=z):z=e[60];let k;return e[61]!==m||e[62]!==h||e[63]!==z||e[64]!==a?(k=i.jsxs("div",{className:a,children:[m,h,z]}),e[61]=m,e[62]=h,e[63]=z,e[64]=a,e[65]=k):k=e[65],k}export{oe as V};
@@ -1 +1 @@
1
- import{a as L,f as P,r as v,j as e,c as k}from"./index-lLPOJwFP.js";import{d as _}from"./well-known-mcp-DOEdYmKO.js";import{C as R}from"./collection-tab-J4NMpB8P.js";import{a as z,u as A}from"./use-connection-BvgGy_ae.js";import{u as B}from"./project-context-provider-BMHXD39x.js";import{B as y}from"./button-C0pnkZlC.js";import{E as F}from"./empty-state-BOQ8a8rM.js";import{C as M}from"./collection-header-d89fPnWN.js";import{b as O,a as H}from"./use-binding-bdIG4ysm.js";import{i as T}from"./Loading01-CpEccvEO.js";import"./generate-id-Dyweu44Y.js";import"./connection-CMutAR-q.js";import"./collection-display-button-DDxBelrQ.js";import"./dropdown-menu-DXIsFCVQ.js";import"./Grid01-SL4tYH2-.js";import"./ArrowUp-BsQNKzS-.js";import"./Check-C2R_Lcai.js";import"./List-DhHX60HN.js";import"./tooltip-D0yN_jPS.js";import"./view-mode-toggle-C7lGZNG7.js";import"./collection-search-DFSn4A42.js";import"./SearchMd-Cg2el-z8.js";import"./input-BtvEWyY7.js";import"./card-DUUk5B6T.js";import"./Copy01-BvrgG3_u.js";import"./DotsVertical-BeOWu8ww.js";import"./Edit01-CkDEl3XN.js";import"./use-list-state-C9VeGRXh.js";import"./use-mobile-DQFSnNx5.js";import"./Trash01-BnAfsqRe.js";import"./collection-table-wrapper-CB1f1HNV.js";import"./empty-state-CsVvxFp9.js";import"./Inbox01-Dq00_28Z.js";import"./avatar-BXyXgGjh.js";import"./useQuery-CLJFoOtO.js";import"./pin-to-sidebar-button-DNtnmSb8.js";import"./use-organization-settings-CFfwAQvt.js";import"./useMutation-8xrpFP-l.js";import"./use-collections-DiH8BH96.js";import"./constants-Bx2xP4ra.js";import"./alert-dialog-BNxiLvEc.js";import"./Plus-DjzFfDDP.js";import"./layout-D_5LiG9u.js";import"./ArrowLeft-ClViT7Hc.js";import"./binder-BxrAqFdA.js";function V({title:i,description:t,wellKnownMcp:o,imageSrc:n,onConnected:s}){const r=z(),{org:{slug:m}}=B(),{data:h}=L.useSession(),p=P(),[a,N]=v.useState(!1),l=async()=>{if(!(!o||!h?.user?.id)){N(!0);try{const c=await r.create.mutateAsync(o);s?.(c.id),p({to:"/$org/mcps/$connectionId",params:{org:m,connectionId:c.id}})}finally{N(!1)}}},j=()=>{p({to:"/$org/mcps",params:{org:m},search:{action:"create"}})};return e.jsx(F,{image:n?e.jsx("img",{src:n,alt:i,width:336,height:320,className:"max-w-full h-auto"}):null,title:i,description:t,actions:e.jsxs(e.Fragment,{children:[e.jsxs(y,{variant:"outline",onClick:l,disabled:a||!o,children:[o?.icon&&e.jsx("img",{src:o.icon,alt:"",className:"size-4"}),a?"Installing...":`Install ${o?.title||"MCP"}`]}),e.jsx(y,{variant:"outline",onClick:j,children:"Custom Connection"})]})})}function q(i){const t=k.c(28),{bindingName:o,collectionName:n,title:s,emptyState:r,wellKnownMcp:m}=i,{org:h}=B(),p=A();let a;t[0]!==p||t[1]!==o?(a={connections:p,binding:o},t[0]=p,t[1]=o,t[2]=a):a=t[2];const l=O(a)[0],j=H(l);let c;if(t[3]!==n||t[4]!==j){let C;t[6]!==n?(C=$=>$.name.toLowerCase()===n.toLowerCase(),t[6]=n,t[7]=C):C=t[7],c=j.find(C),t[3]=n,t[4]=j,t[5]=c}else c=t[5];const S=c,[E,W]=v.useState(null),b=l&&S&&(l.id||E);let d;t[8]!==s?(d=e.jsx(M,{title:s}),t[8]=s,t[9]=d):d=t[9];let I;t[10]===Symbol.for("react.memo_cache_sentinel")?(I=e.jsx(T,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t[10]=I):I=t[10];let f;t[11]!==s?(f=s.toLowerCase(),t[11]=s,t[12]=f):f=t[12];let u;t[13]!==f?(u=e.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[I,e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Loading ",f,"..."]})]}),t[13]=f,t[14]=u):u=t[14];let g;t[15]!==S||t[16]!==l||t[17]!==r||t[18]!==h||t[19]!==b||t[20]!==m?(g=b?e.jsx(R,{connectionId:l.id,org:h.slug,activeCollection:S}):e.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:e.jsx(V,{title:r.title,description:r.description,wellKnownMcp:m,imageSrc:r.imageSrc,onConnected:C=>{W(C)}})}),t[15]=S,t[16]=l,t[17]=r,t[18]=h,t[19]=b,t[20]=m,t[21]=g):g=t[21];let x;t[22]!==u||t[23]!==g?(x=e.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:e.jsx(v.Suspense,{fallback:u,children:g})}),t[22]=u,t[23]=g,t[24]=x):x=t[24];let w;return t[25]!==d||t[26]!==x?(w=e.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[d,x]}),t[25]=d,t[26]=x,t[27]=w):w=t[27],w}function zt(){const i=k.c(1);let t;return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(q,{bindingName:"WORKFLOW",collectionName:"workflow",title:"Workflows",emptyState:{title:"Create Workflows",description:"Install MCP Studio to create and manage automated workflows with multiple steps and integrations."},wellKnownMcp:_()}),i[0]=t):t=i[0],t}export{zt as default};
1
+ import{a as L,f as P,r as v,j as e,c as k}from"./index-B2ZzxrDd.js";import{d as _}from"./well-known-mcp-DOEdYmKO.js";import{C as R}from"./collection-tab-V_ZAHQk2.js";import{a as z,u as A}from"./use-connection-By0HWGmn.js";import{u as B}from"./project-context-provider-CwANTiF8.js";import{B as y}from"./button-CJFU-RdP.js";import{E as F}from"./empty-state-DSfHkDug.js";import{C as M}from"./collection-header-DiGbkMTg.js";import{b as O,a as H}from"./use-binding-kpHhQeiR.js";import{i as T}from"./Loading01-ByRd3GAn.js";import"./generate-id-Dyweu44Y.js";import"./connection-Cgb7Z5-V.js";import"./collection-display-button-DWT4ZvIF.js";import"./dropdown-menu-L8DDYrma.js";import"./Grid01-tEwYXVxO.js";import"./ArrowUp-Dj1nFRfD.js";import"./Check-MZfXJ4EP.js";import"./List-j3ISho_T.js";import"./tooltip-BZp1NNfI.js";import"./view-mode-toggle-Df6PEFKi.js";import"./collection-search-D3Bd0Mm5.js";import"./SearchMd-RcsY4Qc3.js";import"./input-BptR4gs0.js";import"./card-BARP50i4.js";import"./Copy01-DoisEbOD.js";import"./DotsVertical-CRTSoELg.js";import"./Edit01-BVpBBN26.js";import"./use-list-state-cqgmpDXc.js";import"./use-mobile-DHVQc88b.js";import"./Trash01-RdHotUor.js";import"./collection-table-wrapper-DToPOpkG.js";import"./empty-state-DltMEOY9.js";import"./Inbox01-Cekk6aOf.js";import"./avatar-C9xlNN_x.js";import"./useQuery-DVzj5fVO.js";import"./pin-to-sidebar-button-SoohzyKD.js";import"./use-organization-settings-C3rL2iPZ.js";import"./useMutation-Lj6qQmhH.js";import"./use-collections-BI8SI9I-.js";import"./constants-CRsABbUy.js";import"./alert-dialog-DIpJg2Aj.js";import"./Plus-B6dO5J-T.js";import"./layout-CuyqJIpj.js";import"./ArrowLeft-CNcRcLHi.js";import"./binder-nBmgAoSK.js";function V({title:i,description:t,wellKnownMcp:o,imageSrc:n,onConnected:s}){const r=z(),{org:{slug:m}}=B(),{data:h}=L.useSession(),p=P(),[a,N]=v.useState(!1),l=async()=>{if(!(!o||!h?.user?.id)){N(!0);try{const c=await r.create.mutateAsync(o);s?.(c.id),p({to:"/$org/mcps/$connectionId",params:{org:m,connectionId:c.id}})}finally{N(!1)}}},j=()=>{p({to:"/$org/mcps",params:{org:m},search:{action:"create"}})};return e.jsx(F,{image:n?e.jsx("img",{src:n,alt:i,width:336,height:320,className:"max-w-full h-auto"}):null,title:i,description:t,actions:e.jsxs(e.Fragment,{children:[e.jsxs(y,{variant:"outline",onClick:l,disabled:a||!o,children:[o?.icon&&e.jsx("img",{src:o.icon,alt:"",className:"size-4"}),a?"Installing...":`Install ${o?.title||"MCP"}`]}),e.jsx(y,{variant:"outline",onClick:j,children:"Custom Connection"})]})})}function q(i){const t=k.c(28),{bindingName:o,collectionName:n,title:s,emptyState:r,wellKnownMcp:m}=i,{org:h}=B(),p=A();let a;t[0]!==p||t[1]!==o?(a={connections:p,binding:o},t[0]=p,t[1]=o,t[2]=a):a=t[2];const l=O(a)[0],j=H(l);let c;if(t[3]!==n||t[4]!==j){let C;t[6]!==n?(C=$=>$.name.toLowerCase()===n.toLowerCase(),t[6]=n,t[7]=C):C=t[7],c=j.find(C),t[3]=n,t[4]=j,t[5]=c}else c=t[5];const S=c,[E,W]=v.useState(null),b=l&&S&&(l.id||E);let d;t[8]!==s?(d=e.jsx(M,{title:s}),t[8]=s,t[9]=d):d=t[9];let I;t[10]===Symbol.for("react.memo_cache_sentinel")?(I=e.jsx(T,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t[10]=I):I=t[10];let f;t[11]!==s?(f=s.toLowerCase(),t[11]=s,t[12]=f):f=t[12];let u;t[13]!==f?(u=e.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[I,e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Loading ",f,"..."]})]}),t[13]=f,t[14]=u):u=t[14];let g;t[15]!==S||t[16]!==l||t[17]!==r||t[18]!==h||t[19]!==b||t[20]!==m?(g=b?e.jsx(R,{connectionId:l.id,org:h.slug,activeCollection:S}):e.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:e.jsx(V,{title:r.title,description:r.description,wellKnownMcp:m,imageSrc:r.imageSrc,onConnected:C=>{W(C)}})}),t[15]=S,t[16]=l,t[17]=r,t[18]=h,t[19]=b,t[20]=m,t[21]=g):g=t[21];let x;t[22]!==u||t[23]!==g?(x=e.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:e.jsx(v.Suspense,{fallback:u,children:g})}),t[22]=u,t[23]=g,t[24]=x):x=t[24];let w;return t[25]!==d||t[26]!==x?(w=e.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[d,x]}),t[25]=d,t[26]=x,t[27]=w):w=t[27],w}function zt(){const i=k.c(1);let t;return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(q,{bindingName:"WORKFLOW",collectionName:"workflow",title:"Workflows",emptyState:{title:"Create Workflows",description:"Install MCP Studio to create and manage automated workflows with multiple steps and integrations."},wellKnownMcp:_()}),i[0]=t):t=i[0],t}export{zt as default};
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <title>MCP Mesh</title>
5
5
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6
- <script type="module" crossorigin src="/assets/index-lLPOJwFP.js"></script>
6
+ <script type="module" crossorigin src="/assets/index-B2ZzxrDd.js"></script>
7
7
  <link rel="stylesheet" crossorigin href="/assets/index-CCciYu2S.css">
8
8
  </head>
9
9
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decocms/mesh",
3
- "version": "2.17.1",
3
+ "version": "2.17.2",
4
4
  "description": "MCP Mesh - Self-hostable MCP Gateway for managing AI connections and tools",
5
5
  "author": "Deco team",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- import{c as ge,j as e,r as M,f as xe,b as je,a as fe,u as ye,E as ve,B as _e,y as se,I as Ce,z as y,_ as ke}from"./index-lLPOJwFP.js";import{C as Ne}from"./collection-header-d89fPnWN.js";import{C as Se}from"./collection-page-DvY1awQQ.js";import{C as Te}from"./collection-search-DFSn4A42.js";import{C as we}from"./collection-table-wrapper-CB1f1HNV.js";import{C as De}from"./connection-card-DJA7LSPP.js";import{n as O,E as B,I as be}from"./empty-state-BOQ8a8rM.js";import{E as Pe}from"./error-boundary-CiihS5J_.js";import{a as Ie,u as Ve}from"./use-connection-BvgGy_ae.js";import{u as Ee}from"./use-binding-bdIG4ysm.js";import{u as $e,s as Q}from"./use-list-state-C9VeGRXh.js";import{u as Ae}from"./project-context-provider-BMHXD39x.js";import{f as Fe,a as He,b as Oe,c as Be,d as ze,e as Me,A as Re,g as Ue}from"./alert-dialog-BNxiLvEc.js";import{B as Xe}from"./badge-Ctdv4gxt.js";import{B as _}from"./button-C0pnkZlC.js";import{d as Le,c as We,a as Ke,D as Ge,g as qe,f as Ye}from"./dialog-DGipxHKv.js";import{b as J,D as Z,a as ee,c as E}from"./dropdown-menu-DXIsFCVQ.js";import{a as Qe,F as h,b as g,c as x,d as j,f}from"./form-Cq3oH5p8.js";import{i as te}from"./DotsVertical-BeOWu8ww.js";import{f as Je,e as Ze,s as z}from"./registry-utils-BkBVcE6w.js";import{i as et}from"./Loading01-CpEccvEO.js";import{i as tt}from"./Terminal-Kg8grfTZ.js";import{s as ne}from"./Trash01-BnAfsqRe.js";import{I as k}from"./input-BtvEWyY7.js";import{S as nt,a as ot,b as st,c as rt,d as P}from"./select-COJ5S7Rq.js";import{T as it}from"./textarea-fD103gtG.js";import{g as at}from"./generate-id-Dyweu44Y.js";import{a as ct}from"./use-tool-call-q6DaczOv.js";import{c as lt}from"./connection-CMutAR-q.js";import{i as dt,r as mt,E as ut,e as re}from"./env-vars-editor-DsDwdS2I.js";import"./collection-display-button-DDxBelrQ.js";import"./ArrowUp-BsQNKzS-.js";import"./Check-C2R_Lcai.js";import"./Grid01-SL4tYH2-.js";import"./List-DhHX60HN.js";import"./tooltip-D0yN_jPS.js";import"./view-mode-toggle-C7lGZNG7.js";import"./SearchMd-Cg2el-z8.js";import"./card-DUUk5B6T.js";import"./use-collections-DiH8BH96.js";import"./useMutation-8xrpFP-l.js";import"./binder-BxrAqFdA.js";import"./use-mobile-DQFSnNx5.js";import"./X-CBga9b95.js";import"./ChevronDown-CGAmRXVd.js";import"./useQuery-CLJFoOtO.js";import"./Plus-DjzFfDDP.js";const pt=se({key:y(),value:y()}),ht=se({title:y().min(1,"Name is required"),description:y().nullable().optional(),ui_type:ke(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:y().optional(),connection_token:y().nullable().optional(),npx_package:y().optional(),stdio_command:y().optional(),stdio_args:y().optional(),stdio_cwd:y().optional(),env_vars:Ce(pt).optional()}).refine(n=>n.ui_type==="NPX"?!!n.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(n=>n.ui_type==="STDIO"?!!n.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(n=>n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket"?!!n.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]});function A(n){const s=n.trim();if(!s)return"";try{const i=new URL(s),d=i.pathname.length>1?i.pathname.replace(/\/+$/,""):i.pathname;return`${i.origin}${d}`}catch{return s.replace(/\/+$/,"")}}function gt(n){const s=n.trim().split(/\s+/).filter(Boolean);if(s.length<2)return null;const i=s[0]?.toLowerCase();if(i!=="npx"&&i!=="bunx")return null;const u=s.slice(1).find(a=>!a.startsWith("-"));return u?{packageName:u}:null}function $(n){const{uiType:s}=n,i=A(n.connectionUrl??"");if((s==="HTTP"||s==="SSE"||s==="Websocket")&&i===A("https://api.githubcopilot.com/mcp/"))return{id:"github",title:"GitHub",description:"GitHub Copilot MCP",token:{label:"GitHub PAT",placeholder:"github_pat_…",helperText:"Paste a GitHub Personal Access Token (PAT)"}};const d=(n.npxPackage??"").trim();return s==="NPX"&&d==="@perplexity-ai/mcp-server"?{id:"perplexity",title:"Perplexity",description:"Perplexity MCP Server",envVarKeys:["PERPLEXITY_API_KEY"]}:null}function oe(n){if(n.registryItems.length===0||n.uiType!=="HTTP"&&n.uiType!=="SSE"&&n.uiType!=="Websocket")return null;const s=A(n.connectionUrl??"");if(!s)return null;const i=n.registryItems.find(a=>(a.server?.remotes??[]).some(N=>A(N.url??"")===s));if(!i)return null;const d=i.title||i.name||i.server?.title||i.server?.name||"",u=i.server?.description||i.description||i.summary||null;return d?{id:"registry",title:d,description:u}:null}function xt(n,s){const i={command:"npx",args:["-y",n]},d=re(s);return Object.keys(d).length>0&&(i.envVars=d),i}function jt(n,s,i,d){const u={command:n};s.trim()&&(u.args=s.trim().split(/\s+/)),i?.trim()&&(u.cwd=i.trim());const a=re(d);return Object.keys(a).length>0&&(u.envVars=a),u}function ft(n){return n.command==="npx"}function yt(n){return n.args?.find(s=>!s.startsWith("-"))??""}function vt(n){return{command:n.command,args:n.args?.join(" ")??"",cwd:n.cwd??""}}function _t(n,s){switch(s.type){case"edit":return{mode:"editing",connection:s.connection};case"delete":return{mode:"deleting",connection:s.connection};case"close":return{mode:"idle"}}}function Ct(){const{org:n}=Ae(),s=xe(),i=je({strict:!1}),{data:d}=fe.useSession(),{stdioEnabled:u}=ye(),a=$e({namespace:n.slug,resource:"connections"}),I=Ie(),N=Ve(a),[v,S]=M.useReducer(_t,{mode:"idle"}),R=Ee(N)[0],F=R?.id??"",U=Je(R?.tools),ie=lt(F||void 0),{data:ae}=ct({toolCaller:ie,toolName:U,toolInputParams:{limit:200},scope:F,enabled:!!(F&&U),staleTime:3600*1e3}),X=Ze(ae??[]),L=i.action==="create",ce=()=>{s({to:"/$org/mcps",params:{org:n.slug},search:{action:"create"}})},W=()=>{s({to:"/$org/mcps",params:{org:n.slug},search:{}})},r=ve({resolver:_e(ht),defaultValues:{title:"",description:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),m=r.watch("ui_type"),K=r.watch("connection_url"),le=r.watch("npx_package"),D=$({uiType:m,connectionUrl:K??"",npxPackage:le??""})??oe({uiType:m,connectionUrl:K??"",registryItems:X}),l=v.mode==="editing"?v.connection:null;M.useEffect(()=>{if(l){const t=dt(l.connection_headers)?l.connection_headers:null;if(t&&l.connection_type==="STDIO"){const o=mt(t.envVars);if(ft(t)){const c=yt(t);r.reset({title:l.title,description:l.description,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:c,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:o})}else{const c=vt(t);r.reset({title:l.title,description:l.description,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:c.command,stdio_args:c.args,stdio_cwd:c.cwd,env_vars:o})}}else r.reset({title:l.title,description:l.description,ui_type:l.connection_type,connection_url:l.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]})}else r.reset({title:"",description:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]})},[l,r]);const de=async()=>{if(v.mode!=="deleting")return;const t=v.connection.id;S({type:"close"});try{await I.delete.mutateAsync(t)}catch{}},me=async t=>{let o,c=null,T=null,C=null;if(t.ui_type==="NPX"?(o="STDIO",c="",C=xt(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(o="STDIO",c="",C=jt(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(o=t.ui_type,c=t.connection_url||"",T=t.connection_token||null),l){await I.update.mutateAsync({id:l.id,data:{title:t.title,description:t.description||null,connection_type:o,connection_url:c,...T&&{connection_token:T},...C&&{connection_headers:C}}}),S({type:"close"}),r.reset();return}const w=at("conn");await I.create.mutateAsync({id:w,title:t.title,description:t.description||null,connection_type:o,connection_url:c,connection_token:T,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:d?.user?.id||"system",organization_id:n.id,icon:null,app_name:null,app_id:null,connection_headers:C,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),W(),r.reset(),s({to:"/$org/mcps/$connectionId",params:{org:n.slug,connectionId:w}})},G=t=>{t||(L?W():S({type:"close"}),r.reset())},V=t=>{const o=t.trim();if(!o)return;const c=!!r.formState.dirtyFields.title,T=!!r.formState.dirtyFields.description,C=!!r.formState.dirtyFields.env_vars,w=p=>{if(p&&(!c&&!r.getValues("title").trim()&&p.title&&r.setValue("title",p.title,{shouldDirty:!1}),!T&&!(r.getValues("description")??"").trim()&&p.description&&r.setValue("description",p.description,{shouldDirty:!1}),!C&&p.envVarKeys?.length)){const q=r.getValues("env_vars")??[],he=new Set(q.map(b=>b.key)),Y=p.envVarKeys.filter(b=>!he.has(b));Y.length>0&&r.setValue("env_vars",[...q,...Y.map(b=>({key:b,value:""}))],{shouldDirty:!0})}},H=gt(o);if(H&&u){r.setValue("ui_type","NPX",{shouldDirty:!0}),r.setValue("npx_package",H.packageName,{shouldDirty:!0}),r.setValue("connection_url","",{shouldDirty:!0}),r.setValue("connection_token",null,{shouldDirty:!0}),w($({uiType:"NPX",npxPackage:H.packageName}));return}if(o.startsWith("http://")||o.startsWith("https://")){const p=m==="HTTP"||m==="SSE"||m==="Websocket"?m:"HTTP";r.setValue("ui_type",p,{shouldDirty:!0}),r.setValue("connection_url",o,{shouldDirty:!0}),w($({uiType:p,connectionUrl:o})??oe({uiType:p,connectionUrl:o,registryItems:X}));return}m==="NPX"&&w($({uiType:"NPX",npxPackage:o}))},ue=[{id:"icon",header:"",render:t=>e.jsx(be,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:e.jsx(O,{})}),cellClassName:"w-16 shrink-0",wrap:!0},{id:"title",header:"Name",render:t=>e.jsx("span",{className:"text-sm font-medium text-foreground truncate block",title:t.title,children:t.title}),cellClassName:"w-48 max-w-48 min-w-0 shrink-0",sortable:!0},{id:"description",header:"Description",render:t=>e.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:t.description||"—"}),cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},{id:"connection_type",header:"Type",accessor:t=>e.jsx("span",{className:"text-sm font-medium",children:t.connection_type}),cellClassName:"w-24 shrink-0",sortable:!0},{id:"connection_url",header:"URL",render:t=>{const o=t.connection_url??"",c=o.length>40?`${o.slice(0,40)}...`:o;return e.jsx("span",{className:"text-sm text-muted-foreground",children:c})},cellClassName:"w-48 min-w-0 shrink-0"},{id:"status",header:"Status",render:t=>e.jsx(Xe,{variant:t.status==="active"?"success":"outline",children:t.status}),cellClassName:"w-24 shrink-0",sortable:!0},{id:"actions",header:"",render:t=>e.jsxs(J,{children:[e.jsx(Z,{asChild:!0,children:e.jsx(_,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:o=>o.stopPropagation(),children:e.jsx(te,{size:20})})}),e.jsxs(ee,{align:"end",onClick:o=>o.stopPropagation(),children:[e.jsxs(E,{onClick:o=>{o.stopPropagation(),s({to:"/$org/mcps/$connectionId",params:{org:n.slug,connectionId:t.id}})},children:[e.jsx(Q,{size:16}),"Inspect"]}),e.jsxs(E,{variant:"destructive",onClick:o=>{o.stopPropagation(),S({type:"delete",connection:t})},children:[e.jsx(ne,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],pe=e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{variant:"outline",onClick:()=>s({to:"/$org/store",params:{org:n.slug}}),size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Browse Store"}),e.jsx(_,{onClick:ce,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Custom Connection"})]});return e.jsxs(Se,{children:[e.jsx(Le,{open:L||v.mode==="editing",onOpenChange:G,children:e.jsxs(We,{className:"sm:max-w-[525px]",children:[e.jsxs(Ke,{children:[e.jsx(Ge,{children:l?"Edit Connection":"Create Connection"}),e.jsx(qe,{children:l?"Update the connection details below.":"Create a custom connection in your organization. Fill in the details below."})]}),e.jsx(Qe,{...r,children:e.jsxs("form",{onSubmit:r.handleSubmit(me),children:[e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsx(h,{control:r.control,name:"ui_type",render:({field:t})=>e.jsxs(g,{children:[e.jsx(x,{children:"Type *"}),e.jsxs(nt,{value:t.value,onValueChange:t.onChange,children:[e.jsx(j,{children:e.jsx(ot,{children:e.jsx(st,{})})}),e.jsxs(rt,{children:[e.jsx(P,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(z,{className:"w-4 h-4"}),"HTTP"]})}),e.jsx(P,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(z,{className:"w-4 h-4"}),"SSE"]})}),e.jsx(P,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(z,{className:"w-4 h-4"}),"Websocket"]})}),u&&e.jsxs(e.Fragment,{children:[e.jsx(P,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(O,{className:"w-4 h-4"}),"NPX Package"]})}),e.jsx(P,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(tt,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),e.jsx(f,{})]})}),m==="NPX"&&e.jsx(e.Fragment,{children:e.jsx(h,{control:r.control,name:"npx_package",render:({field:t})=>e.jsxs(g,{children:[e.jsx(x,{children:"NPM Package *"}),e.jsx(j,{children:e.jsx(k,{placeholder:"@perplexity-ai/mcp-server",...t,value:t.value??"",onPaste:o=>{const c=o.clipboardData.getData("text");c&&(o.preventDefault(),r.setValue("npx_package",c.trim(),{shouldDirty:!0}),V(c))},onBlur:o=>{V(o.target.value),t.onBlur()}})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"The npm package to run with npx"}),e.jsx(f,{})]})})}),m==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(h,{control:r.control,name:"stdio_command",render:({field:t})=>e.jsxs(g,{children:[e.jsx(x,{children:"Command *"}),e.jsx(j,{children:e.jsx(k,{placeholder:"node, bun, python...",...t,value:t.value??""})}),e.jsx(f,{})]})}),e.jsx(h,{control:r.control,name:"stdio_args",render:({field:t})=>e.jsxs(g,{children:[e.jsx(x,{children:"Arguments"}),e.jsx(j,{children:e.jsx(k,{placeholder:"arg1 arg2 --flag value",...t,value:t.value??""})}),e.jsx(f,{})]})})]}),e.jsx(h,{control:r.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(g,{children:[e.jsx(x,{children:"Working Directory"}),e.jsx(j,{children:e.jsx(k,{placeholder:"/path/to/project (optional)",...t,value:t.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),e.jsx(f,{})]})})]}),(m==="NPX"||m==="STDIO")&&e.jsx(h,{control:r.control,name:"env_vars",render:({field:t})=>e.jsxs(g,{children:[e.jsx(x,{children:"Environment Variables"}),e.jsx(j,{children:e.jsx(ut,{value:t.value??[],onChange:t.onChange})}),e.jsx(f,{})]})}),m!=="NPX"&&m!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(h,{control:r.control,name:"connection_url",render:({field:t})=>e.jsxs(g,{children:[e.jsx(x,{children:"URL *"}),e.jsx(j,{children:e.jsx(k,{placeholder:"https://example.com/mcp",...t,value:t.value??"",onPaste:o=>{const c=o.clipboardData.getData("text");c&&(o.preventDefault(),r.setValue("connection_url",c.trim(),{shouldDirty:!0}),V(c))},onBlur:o=>{V(o.target.value),t.onBlur()}})}),e.jsx(f,{})]})}),e.jsx(h,{control:r.control,name:"connection_token",render:({field:t})=>e.jsxs(g,{children:[e.jsx(x,{children:D?.token?.label??"Token (optional)"}),e.jsx(j,{children:e.jsx(k,{type:"password",placeholder:D?.token?.placeholder??"Bearer token or API key",...t,value:t.value??""})}),D?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[D.token.helperText,D.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),e.jsx(f,{})]})})]}),e.jsx(h,{control:r.control,name:"title",render:({field:t})=>e.jsxs(g,{children:[e.jsx(x,{children:"Name *"}),e.jsx(j,{children:e.jsx(k,{placeholder:"My Connection",...t})}),e.jsx(f,{})]})}),e.jsx(h,{control:r.control,name:"description",render:({field:t})=>e.jsxs(g,{children:[e.jsx(x,{children:"Description"}),e.jsx(j,{children:e.jsx(it,{placeholder:"A brief description of this connection",rows:3,...t,value:t.value??""})}),e.jsx(f,{})]})})]}),e.jsxs(Ye,{children:[e.jsx(_,{type:"button",variant:"outline",onClick:()=>G(!1),children:"Cancel"}),e.jsx(_,{type:"submit",disabled:r.formState.isSubmitting,className:"min-w-40",children:r.formState.isSubmitting?"Saving...":l?"Update Connection":"Create Connection"})]})]})})]})}),e.jsx(Fe,{open:v.mode==="deleting",onOpenChange:t=>!t&&S({type:"close"}),children:e.jsxs(He,{children:[e.jsxs(Oe,{children:[e.jsx(Be,{children:"Delete Connection?"}),e.jsxs(ze,{children:["This action cannot be undone. This will permanently delete"," ",e.jsx("span",{className:"font-medium text-foreground",children:v.mode==="deleting"&&v.connection.title}),"."]})]}),e.jsxs(Me,{children:[e.jsx(Re,{children:"Cancel"}),e.jsx(Ue,{onClick:de,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})}),e.jsx(Ne,{title:"Connections",viewMode:a.viewMode,onViewModeChange:a.setViewMode,sortKey:a.sortKey,sortDirection:a.sortDirection,onSort:a.handleSort,sortOptions:[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"connection_type",label:"Type"},{id:"status",label:"Status"}],ctaButton:pe}),e.jsx(Te,{value:a.search,onChange:a.setSearch,placeholder:"Search for a Connection...",onKeyDown:t=>{t.key==="Escape"&&(a.setSearch(""),t.target.blur())}}),a.viewMode==="cards"?e.jsx("div",{className:"flex-1 overflow-auto p-5",children:N.length===0?e.jsx(B,{image:e.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),title:(a.search,"No Connections found"),description:a.search?`No Connections match "${a.search}"`:"Create a connection to get started.",actions:!a.search&&e.jsx(_,{variant:"outline",onClick:()=>s({to:"/$org/store",params:{org:n.slug}}),children:"Browse Store"})}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:N.map(t=>e.jsx(De,{connection:t,fallbackIcon:e.jsx(O,{}),onClick:()=>s({to:"/$org/mcps/$connectionId",params:{org:n.slug,connectionId:t.id}}),headerActions:e.jsxs(J,{children:[e.jsx(Z,{asChild:!0,children:e.jsx(_,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:o=>o.stopPropagation(),children:e.jsx(te,{size:20})})}),e.jsxs(ee,{align:"end",onClick:o=>o.stopPropagation(),children:[e.jsxs(E,{onClick:o=>{o.stopPropagation(),s({to:"/$org/mcps/$connectionId",params:{org:n.slug,connectionId:t.id}})},children:[e.jsx(Q,{size:16}),"Inspect"]}),e.jsxs(E,{variant:"destructive",onClick:o=>{o.stopPropagation(),S({type:"delete",connection:t})},children:[e.jsx(ne,{size:16}),"Delete"]})]})]})},t.id))})}):e.jsx(we,{columns:ue,data:N,isLoading:!1,sortKey:a.sortKey,sortDirection:a.sortDirection,onSort:a.handleSort,onRowClick:t=>s({to:"/$org/mcps/$connectionId",params:{org:n.slug,connectionId:t.id}}),emptyState:a.search?e.jsx(B,{image:e.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:400,height:178,"aria-hidden":"true"}),title:"No Connections found",description:`No Connections match "${a.search}"`}):e.jsx(B,{image:e.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:400,height:178,"aria-hidden":"true"}),title:"No Connections found",description:"Create a connection to get started.",actions:e.jsx(_,{variant:"outline",onClick:()=>s({to:"/$org/store",params:{org:n.slug}}),children:"Browse Store"})})})]})}function jn(){const n=ge.c(1);let s;return n[0]===Symbol.for("react.memo_cache_sentinel")?(s=e.jsx(Pe,{children:e.jsx(M.Suspense,{fallback:e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(et,{size:32,className:"animate-spin text-muted-foreground"})}),children:e.jsx(Ct,{})})}),n[0]=s):s=n[0],s}export{jn as default};
@@ -1 +0,0 @@
1
- import{aJ as a,bm as t}from"./index-lLPOJwFP.js";const e="mcp.mesh",s=a(t,{target:"draft-7"});export{s as B,e as M};
@@ -1 +0,0 @@
1
- import{c as ee,j as t,r as te,f as oe}from"./index-lLPOJwFP.js";import{C as re}from"./collection-header-d89fPnWN.js";import{C as ie}from"./collection-page-DvY1awQQ.js";import{C as ne}from"./collection-search-DFSn4A42.js";import{C as ae}from"./collection-table-wrapper-CB1f1HNV.js";import{C as le}from"./connection-card-DJA7LSPP.js";import{E as W,I as ce}from"./empty-state-BOQ8a8rM.js";import{E as de}from"./error-boundary-CiihS5J_.js";import{u as me,a as ue,i as x}from"./use-gateway-Blme6XE1.js";import{u as pe,s as J}from"./use-list-state-C9VeGRXh.js";import{u as ge}from"./use-create-gateway-DWTCcW8J.js";import{u as he}from"./project-context-provider-BMHXD39x.js";import{c as fe,b as xe,d as je,A as Ce,e as we,g as ye,a as Ne,f as De}from"./alert-dialog-BNxiLvEc.js";import{B as se}from"./badge-Ctdv4gxt.js";import{B as q}from"./button-C0pnkZlC.js";import{b as Q,D as U,a as X,c as B}from"./dropdown-menu-DXIsFCVQ.js";import{i as Y}from"./DotsVertical-BeOWu8ww.js";import{i as Se}from"./Loading01-CpEccvEO.js";import{s as Z}from"./Trash01-BnAfsqRe.js";import"./collection-display-button-DDxBelrQ.js";import"./ArrowUp-BsQNKzS-.js";import"./Check-C2R_Lcai.js";import"./Grid01-SL4tYH2-.js";import"./List-DhHX60HN.js";import"./tooltip-D0yN_jPS.js";import"./view-mode-toggle-C7lGZNG7.js";import"./SearchMd-Cg2el-z8.js";import"./input-BtvEWyY7.js";import"./card-DUUk5B6T.js";import"./connection-CMutAR-q.js";import"./use-collections-DiH8BH96.js";import"./useMutation-8xrpFP-l.js";import"./use-mobile-DQFSnNx5.js";function ve(e,r){switch(r.type){case"delete":return{mode:"deleting",gateway:r.gateway};case"close":return{mode:"idle"}}}function be(){const e=ee.c(63),{org:r}=he(),n=oe();let j;e[0]!==r.slug?(j={namespace:r.slug,resource:"gateways"},e[0]=r.slug,e[1]=j):j=e[1];const s=pe(j),f=me(s);let C;e[2]===Symbol.for("react.memo_cache_sentinel")?(C={navigateOnCreate:!0},e[2]=C):C=e[2];const{createGateway:G,isCreating:w}=ge(C),O=ue();let y;e[3]===Symbol.for("react.memo_cache_sentinel")?(y={mode:"idle"},e[3]=y):y=e[3];const[i,N]=te.useReducer(ve,y);let D;e[4]!==O||e[5]!==i.gateway||e[6]!==i.mode?(D=async()=>{if(i.mode!=="deleting")return;const o=i.gateway.id;N({type:"close"});try{await O.delete.mutateAsync(o)}catch{}},e[4]=O,e[5]=i.gateway,e[6]=i.mode,e[7]=D):D=e[7];const R=D;let S,v,b,k,I,_;e[8]===Symbol.for("react.memo_cache_sentinel")?(S={id:"icon",header:"",render:Ke,cellClassName:"w-16 shrink-0",wrap:!0},v={id:"title",header:"Name",render:Pe,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},b={id:"description",header:"Description",render:Ee,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},k={id:"mode",header:"Mode",accessor:$e,cellClassName:"w-[100px]"},I={id:"connections",header:"Connections",render:ze,cellClassName:"w-24 shrink-0"},_={id:"status",header:"Status",render:Me,cellClassName:"w-24 shrink-0",sortable:!0},e[8]=S,e[9]=v,e[10]=b,e[11]=k,e[12]=I,e[13]=_):(S=e[8],v=e[9],b=e[10],k=e[11],I=e[12],_=e[13]);let A;e[14]!==n||e[15]!==r.slug?(A=[S,v,b,k,I,_,{id:"actions",header:"",render:o=>t.jsxs(Q,{children:[t.jsx(U,{asChild:!0,children:t.jsx(q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ae,children:t.jsx(Y,{size:20})})}),t.jsxs(X,{align:"end",onClick:_e,children:[t.jsxs(B,{onClick:a=>{a.stopPropagation(),n({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}})},children:[t.jsx(J,{size:16}),"Inspect"]}),t.jsxs(B,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",gateway:o})},children:[t.jsx(Z,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[14]=n,e[15]=r.slug,e[16]=A):A=e[16];const T=A,V=w?"Creating...":"Create Agent";let M;e[17]!==G||e[18]!==w||e[19]!==V?(M=t.jsx(q,{onClick:G,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:w,children:V}),e[17]=G,e[18]=w,e[19]=V,e[20]=M):M=e[20];const H=M,L=i.mode==="deleting";let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=o=>!o&&N({type:"close"}),e[21]=z):z=e[21];let $;e[22]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(fe,{children:"Delete Agent?"}),e[22]=$):$=e[22];const F=i.mode==="deleting"&&i.gateway.title;let l;e[23]!==F?(l=t.jsxs(xe,{children:[$,t.jsxs(je,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:F}),"."]})]}),e[23]=F,e[24]=l):l=e[24];let E;e[25]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(Ce,{children:"Cancel"}),e[25]=E):E=e[25];let c;e[26]!==R?(c=t.jsxs(we,{children:[E,t.jsx(ye,{onClick:R,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[26]=R,e[27]=c):c=e[27];let d;e[28]!==l||e[29]!==c?(d=t.jsxs(Ne,{children:[l,c]}),e[28]=l,e[29]=c,e[30]=d):d=e[30];let m;e[31]!==L||e[32]!==d?(m=t.jsx(De,{open:L,onOpenChange:z,children:d}),e[31]=L,e[32]=d,e[33]=m):m=e[33];let P;e[34]===Symbol.for("react.memo_cache_sentinel")?(P=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"status",label:"Status"}],e[34]=P):P=e[34];let u;e[35]!==H||e[36]!==s.handleSort||e[37]!==s.setViewMode||e[38]!==s.sortDirection||e[39]!==s.sortKey||e[40]!==s.viewMode?(u=t.jsx(re,{title:"Agents",viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:P,ctaButton:H}),e[35]=H,e[36]=s.handleSort,e[37]=s.setViewMode,e[38]=s.sortDirection,e[39]=s.sortKey,e[40]=s.viewMode,e[41]=u):u=e[41];let p;e[42]!==s?(p=o=>{o.key==="Escape"&&(s.setSearch(""),o.target.blur())},e[42]=s,e[43]=p):p=e[43];let g;e[44]!==s.search||e[45]!==s.setSearch||e[46]!==p?(g=t.jsx(ne,{value:s.search,onChange:s.setSearch,placeholder:"Search for an agent...",onKeyDown:p}),e[44]=s.search,e[45]=s.setSearch,e[46]=p,e[47]=g):g=e[47];let h;e[48]!==T||e[49]!==f||e[50]!==s.handleSort||e[51]!==s.search||e[52]!==s.sortDirection||e[53]!==s.sortKey||e[54]!==s.viewMode||e[55]!==n||e[56]!==r.slug?(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(le,{connection:{id:o.id,title:o.title,description:o.description,icon:o.icon,status:o.status},fallbackIcon:t.jsx(x,{}),onClick:()=>n({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}}),footer:t.jsxs("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":""]}),t.jsx("span",{children:"•"}),t.jsx("span",{children:o.tool_selection_mode==="exclusion"?"Exclude":"Include"})]}),headerActions:t.jsxs(Q,{children:[t.jsx(U,{asChild:!0,children:t.jsx(q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ie,children:t.jsx(Y,{size:20})})}),t.jsxs(X,{align:"end",onClick:ke,children:[t.jsxs(B,{onClick:a=>{a.stopPropagation(),n({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}})},children:[t.jsx(J,{size:16}),"Inspect"]}),t.jsxs(B,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",gateway:o})},children:[t.jsx(Z,{size:16}),"Delete"]})]})]})},o.id))})}):t.jsx(ae,{columns:T,data:f,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:o=>n({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId: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[48]=T,e[49]=f,e[50]=s.handleSort,e[51]=s.search,e[52]=s.sortDirection,e[53]=s.sortKey,e[54]=s.viewMode,e[55]=n,e[56]=r.slug,e[57]=h):h=e[57];let K;return e[58]!==m||e[59]!==u||e[60]!==g||e[61]!==h?(K=t.jsxs(ie,{children:[m,u,g,h]}),e[58]=m,e[59]=u,e[60]=g,e[61]=h,e[62]=K):K=e[62],K}function ke(e){return e.stopPropagation()}function Ie(e){return e.stopPropagation()}function _e(e){return e.stopPropagation()}function Ae(e){return e.stopPropagation()}function Me(e){return t.jsx(se,{variant:e.status==="active"?"default":"outline",children:e.status})}function ze(e){return t.jsx("span",{className:"text-sm text-muted-foreground",children:e.connections.length})}function $e(e){return t.jsx(se,{variant:"outline",className:"text-xs",children:e.tool_selection_mode==="exclusion"?"Exclude":"Include"})}function Ee(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function Pe(e){return t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})}function Ke(e){return t.jsx(ce,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(x,{size:16})})}function ft(){const e=ee.c(1);let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(de,{children:t.jsx(te.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(be,{})})}),e[0]=r):r=e[0],r}export{ft as default};
@@ -1 +0,0 @@
1
- import{I as u}from"./infiniteQueryObserver-Cg5Uwm-m.js";import{U as i}from"./index-lLPOJwFP.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{U as u,b4 as s}from"./index-lLPOJwFP.js";function o(e,r){return u(e,s,r)}export{o as u};