@decocms/mesh 2.31.1 → 2.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/dist/client/assets/{AlertCircle-CNlbeaNO.js → AlertCircle-BC5XMJnh.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-H58XLYPH.js → ArrowLeft-YLXxN85l.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-C39Etgym.js → ArrowUp-B5D5I-e4.js} +1 -1
  4. package/dist/client/assets/{Check-qyrf_w7u.js → Check-BJ8aD04h.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-D4EQGXFb.js → ChevronDown-Dwu65bm7.js} +1 -1
  6. package/dist/client/assets/{Code01-B-sXoUAx.js → Code01-D5im63O6.js} +1 -1
  7. package/dist/client/assets/{Copy01-EV4WWtW9.js → Copy01-CzCGcpFB.js} +1 -1
  8. package/dist/client/assets/CpuChip02-DL5MAhty.js +1 -0
  9. package/dist/client/assets/{DotsHorizontal-BLQeuj18.js → DotsHorizontal-B8KoSTcW.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-BIgdSuWw.js → DotsVertical-Q4BfP_OZ.js} +1 -1
  11. package/dist/client/assets/{Download01-CfIslxub.js → Download01-DdEO2Y20.js} +1 -1
  12. package/dist/client/assets/{Edit01-YiEPkU0g.js → Edit01-BeUmNzHw.js} +1 -1
  13. package/dist/client/assets/{File06-BOUeu2_s.js → File06-Dbh0s9nF.js} +1 -1
  14. package/dist/client/assets/{FilterLines-C9-FwG4M.js → FilterLines-DOm0e2np.js} +1 -1
  15. package/dist/client/assets/{FlipBackward-CXUecZqc.js → FlipBackward-B0YDj6U2.js} +1 -1
  16. package/dist/client/assets/{GitBranch01-C7TElKX3.js → GitBranch01-7JSGEKWK.js} +1 -1
  17. package/dist/client/assets/{Grid01-DS_Rpsaf.js → Grid01-CxjwpfJx.js} +1 -1
  18. package/dist/client/assets/{Home02-kWTen2lJ.js → Home02-Mi1g3zml.js} +1 -1
  19. package/dist/client/assets/{Image01-C1Gj64FS.js → Image01-k29lIkxT.js} +1 -1
  20. package/dist/client/assets/{Inbox01-BWl9K4GL.js → Inbox01-C3SZugQ0.js} +1 -1
  21. package/dist/client/assets/{InfoCircle-fjnTRxT_.js → InfoCircle-BpN5-782.js} +1 -1
  22. package/dist/client/assets/{Key01-BH9DhJ8d.js → Key01-CfBi5Z2i.js} +1 -1
  23. package/dist/client/assets/{LinkExternal01-Cu4-40eG.js → LinkExternal01-D9T5dDpq.js} +1 -1
  24. package/dist/client/assets/{List-CMJ7wwXL.js → List-BH4t2L38.js} +1 -1
  25. package/dist/client/assets/{Loading01-DlgJ1_45.js → Loading01-Dk8ucN4u.js} +1 -1
  26. package/dist/client/assets/{Lock01-Bc4skRDc.js → Lock01-C_cIWOtW.js} +1 -1
  27. package/dist/client/assets/{Play-By6elSLp.js → Play-CQprIR-2.js} +1 -1
  28. package/dist/client/assets/{Plus-DtbgAjWY.js → Plus-DsxxHM8H.js} +1 -1
  29. package/dist/client/assets/{SearchMd--bzHJ7AO.js → SearchMd-COziLDJJ.js} +1 -1
  30. package/dist/client/assets/{Terminal-BVYBaOBz.js → Terminal-onO5xBIt.js} +1 -1
  31. package/dist/client/assets/{Trash01-DjLKhTdL.js → Trash01-Dz97bbYc.js} +1 -1
  32. package/dist/client/assets/{Upload01-Deo1Gmh-.js → Upload01-BX6LCIgm.js} +1 -1
  33. package/dist/client/assets/{X-C24Yv1HS.js → X-IKzqhWHn.js} +1 -1
  34. package/dist/client/assets/{XClose-CnH5yMqw.js → XClose-v1hlIgz0.js} +1 -1
  35. package/dist/client/assets/agent-detail-DJ7sCPlX.js +1 -0
  36. package/dist/client/assets/agents-B2w5ERo_.js +1 -0
  37. package/dist/client/assets/{alert-dialog-D9F5tffK.js → alert-dialog-DrQP8AK1.js} +2 -2
  38. package/dist/client/assets/{auth-catchall-CN5idKvS.js → auth-catchall-CMrAfdfW.js} +1 -1
  39. package/dist/client/assets/{avatar-BZZ8iTNu.js → avatar-BJReLfGX.js} +1 -1
  40. package/dist/client/assets/{badge-Bv6QbUSE.js → badge-DbdCj_uM.js} +1 -1
  41. package/dist/client/assets/{binder-Co4G2PF6.js → binder-D69FJEqF.js} +1 -1
  42. package/dist/client/assets/button-PodD5p0U.js +1 -0
  43. package/dist/client/assets/{card-CRtF9cdr.js → card-D-ovGS63.js} +1 -1
  44. package/dist/client/assets/checkbox-6AvRm83v.js +1 -0
  45. package/dist/client/assets/collection-detail-CQJDYkNb.js +26 -0
  46. package/dist/client/assets/{collection-display-button-CQf7wSjn.js → collection-display-button-Dh09Ilcf.js} +1 -1
  47. package/dist/client/assets/{collection-header-ebtrK-4-.js → collection-header-BmH5wfr6.js} +1 -1
  48. package/dist/client/assets/{collection-page-BhBrRtz8.js → collection-page-DQfIdy6i.js} +1 -1
  49. package/dist/client/assets/{collection-search-BHs67_UI.js → collection-search-4ynn1TPY.js} +1 -1
  50. package/dist/client/assets/collection-tab--D0SMzDr.js +1 -0
  51. package/dist/client/assets/{collection-table-wrapper-3bPS8SS1.js → collection-table-wrapper-DNSd3m2k.js} +1 -1
  52. package/dist/client/assets/{connection-card-CEKO3io8.js → connection-card-DnSsvBT0.js} +1 -1
  53. package/dist/client/assets/connection-detail-DHFifhwE.js +1 -0
  54. package/dist/client/assets/connections-B9O8nDt9.js +1 -0
  55. package/dist/client/assets/constants-B4USxFBv.js +1 -0
  56. package/dist/client/assets/constants-CmWKkXWd.js +1 -0
  57. package/dist/client/assets/create-organization-dialog-CEW5VGHH.js +1 -0
  58. package/dist/client/assets/dialog-CWaQrwji.js +1 -0
  59. package/dist/client/assets/dropdown-menu-D9Rmpcp9.js +1 -0
  60. package/dist/client/assets/dynamic-plugin-layout-CBpne9DX.js +1 -0
  61. package/dist/client/assets/{empty-state-CSTjcp0X.js → empty-state-B-Xm_EaJ.js} +1 -1
  62. package/dist/client/assets/{empty-state-CUODA5WM.js → empty-state-DqNObyCj.js} +1 -1
  63. package/dist/client/assets/env-vars-editor-CfgmDeU5.js +1 -0
  64. package/dist/client/assets/{error-boundary-DP1kX1Iw.js → error-boundary-BjOv2UWq.js} +1 -1
  65. package/dist/client/assets/{extract-connection-data-D7M4EXYt.js → extract-connection-data-0XBBnZdV.js} +1 -1
  66. package/dist/client/assets/{file-browser-C9Hg6ohe.js → file-browser-B9wkG-Sl.js} +2 -2
  67. package/dist/client/assets/form-vSEoY8gy.js +1 -0
  68. package/dist/client/assets/{grid-view-DvYWkbyi.js → grid-view-DFrm-jAH.js} +1 -1
  69. package/dist/client/assets/home-bVBdjE9M.js +1 -0
  70. package/dist/client/assets/{index-B9c3bNyk.js → index-964bfDMw.js} +29 -29
  71. package/dist/client/assets/index-B_Tj7K9k.js +1 -0
  72. package/dist/client/assets/index-Cmw-k2HD.js +1 -0
  73. package/dist/client/assets/{index-I-Aus2DH.css → index-D86tzVve.css} +1 -1
  74. package/dist/client/assets/{index-SYlc-1Tl.js → index-DuRBn85W.js} +83 -83
  75. package/dist/client/assets/index-EWMtHb8y.js +25 -0
  76. package/dist/client/assets/index-wKTAGmPb.js +1 -0
  77. package/dist/client/assets/infiniteQueryObserver-KoZoIabU.js +1 -0
  78. package/dist/client/assets/{input-Dh7sDwu6.js → input-Ej7Hdv-8.js} +1 -1
  79. package/dist/client/assets/{layout-CMBAL9_n.js → layout-CXY5gq_4.js} +1 -1
  80. package/dist/client/assets/localstorage-keys-D1mHOPHm.js +1 -0
  81. package/dist/client/assets/{login-CgLLYYgm.js → login--5WB-nLi.js} +1 -1
  82. package/dist/client/assets/mcp-oauth-BD4MGpFX.js +1 -0
  83. package/dist/client/assets/{mcp-server-card-3RQV4Klx.js → mcp-server-card-DS0l3oak.js} +1 -1
  84. package/dist/client/assets/mcp-server-detail-CJwkhfLJ.js +2 -0
  85. package/dist/client/assets/members-BJW4tDMu.js +3 -0
  86. package/dist/client/assets/{monaco-editor-9ao1STYz.js → monaco-editor-3Me4XJ9I.js} +4 -4
  87. package/dist/client/assets/monitoring-CR4-lnND.js +49 -0
  88. package/dist/client/assets/{oauth-callback-DC00uX2L.js → oauth-callback-B8Ags9WE.js} +1 -1
  89. package/dist/client/assets/page-CCwujlJd.js +21 -0
  90. package/dist/client/assets/page-CN8DT11b.js +1 -0
  91. package/dist/client/assets/pin-to-sidebar-button-CYXcrmnE.js +1 -0
  92. package/dist/client/assets/plugin-empty-state-DJU_t0en.js +1 -0
  93. package/dist/client/assets/plugin-header-DXCUdn_T.js +1 -0
  94. package/dist/client/assets/plugins-Bl59udAj.js +1 -0
  95. package/dist/client/assets/popover-DBItUBYK.js +1 -0
  96. package/dist/client/assets/registry-utils-CPkD9bdu.js +1 -0
  97. package/dist/client/assets/resizable-ZQy6ZhoG.js +1 -0
  98. package/dist/client/assets/{resource-tabs-B7x4zlfW.js → resource-tabs-eTZinrmK.js} +1 -1
  99. package/dist/client/assets/select-AaQnf6IX.js +1 -0
  100. package/dist/client/assets/settings-7r0XCBIy.js +1 -0
  101. package/dist/client/assets/shell-layout-Bi9hmLN-.js +3 -0
  102. package/dist/client/assets/{spinner-CO1NH93o.js → spinner-C--oN2eV.js} +1 -1
  103. package/dist/client/assets/{switch-IXdsAtvF.js → switch-uzDLGnXk.js} +1 -1
  104. package/dist/client/assets/{textarea-BIhbkxfH.js → textarea-E7VOwyYz.js} +1 -1
  105. package/dist/client/assets/tool-set-selector-CQhszaVY.js +1 -0
  106. package/dist/client/assets/{tools-list-DvTDsJWw.js → tools-list-BK4C4awn.js} +1 -1
  107. package/dist/client/assets/{tooltip-Bb2oNaYJ.js → tooltip-Bdoc9quu.js} +1 -1
  108. package/dist/client/assets/{typewriter-title-Dm2sjP0K.js → typewriter-title-BlMj2uGN.js} +1 -1
  109. package/dist/client/assets/use-binding-DhM8knFB.js +23 -0
  110. package/dist/client/assets/use-collections-xUu5CPtF.js +1 -0
  111. package/dist/client/assets/use-connection-Bqsa8RaS.js +1 -0
  112. package/dist/client/assets/use-create-virtual-mcp-CdxRkVjT.js +1 -0
  113. package/dist/client/assets/{use-list-state-Ck_kabtn.js → use-list-state-BmjPeRyR.js} +1 -1
  114. package/dist/client/assets/use-members-B5HINX4i.js +1 -0
  115. package/dist/client/assets/{use-mobile-Bb5jBMYm.js → use-mobile-CH4OC_dx.js} +1 -1
  116. package/dist/client/assets/use-organization-settings-BOpggtjG.js +1 -0
  117. package/dist/client/assets/use-virtual-mcp-mbM9JS_c.js +1 -0
  118. package/dist/client/assets/use-virtual-mcp-system-prompt-BlXwuykx.js +1 -0
  119. package/dist/client/assets/useInfiniteQuery-Dmu_NRFV.js +1 -0
  120. package/dist/client/assets/useMutation-BABUvOV4.js +1 -0
  121. package/dist/client/assets/useQuery-B2QbSzDL.js +1 -0
  122. package/dist/client/assets/value-D8ri8g3W.js +1 -0
  123. package/dist/client/assets/{view-mode-toggle-C6P0fGVR.js → view-mode-toggle-C-30gO9H.js} +1 -1
  124. package/dist/client/assets/virtual-mcp-zquQbLgI.js +1 -0
  125. package/dist/client/assets/workflow-Dka00GsI.js +1 -0
  126. package/dist/client/index.html +2 -2
  127. package/dist/server/cli.js +196 -176
  128. package/dist/server/migrate.js +167 -147
  129. package/dist/server/server.js +160 -160
  130. package/package.json +2 -2
  131. package/dist/client/assets/agent-detail-RPUTUaLt.js +0 -1
  132. package/dist/client/assets/agents-DLD7xSIr.js +0 -1
  133. package/dist/client/assets/button-Ta3HWdYR.js +0 -1
  134. package/dist/client/assets/checkbox-PlWQwQ-Z.js +0 -1
  135. package/dist/client/assets/collection-detail-D2KCEX1U.js +0 -26
  136. package/dist/client/assets/collection-tab-B2mnSptX.js +0 -1
  137. package/dist/client/assets/connection-C0f0eQA8.js +0 -2
  138. package/dist/client/assets/connection-detail-CdPOOjUE.js +0 -1
  139. package/dist/client/assets/connections-DiIaCwOD.js +0 -1
  140. package/dist/client/assets/constants-7IT_izqz.js +0 -1
  141. package/dist/client/assets/create-organization-dialog-dWwHUnmz.js +0 -1
  142. package/dist/client/assets/dialog-DU-St4qJ.js +0 -1
  143. package/dist/client/assets/dropdown-menu-BbIA2rWH.js +0 -1
  144. package/dist/client/assets/dynamic-plugin-layout-CvhGXoEg.js +0 -1
  145. package/dist/client/assets/env-vars-editor-D9YuRsdO.js +0 -1
  146. package/dist/client/assets/form-HErbLCwX.js +0 -1
  147. package/dist/client/assets/home-CszARX6v.js +0 -1
  148. package/dist/client/assets/index-D0C0gp7N.js +0 -1
  149. package/dist/client/assets/index-DE0l5h4l.js +0 -25
  150. package/dist/client/assets/index-DMxjLEp2.js +0 -1
  151. package/dist/client/assets/infiniteQueryObserver-DTO2dBsV.js +0 -1
  152. package/dist/client/assets/localstorage-keys-DJR10CLV.js +0 -1
  153. package/dist/client/assets/mcp-oauth-Bb9RwQ7y.js +0 -1
  154. package/dist/client/assets/mcp-server-detail-ERiwQuLO.js +0 -1
  155. package/dist/client/assets/members-COVJZ-4S.js +0 -3
  156. package/dist/client/assets/monitoring-BTGpm-FJ.js +0 -49
  157. package/dist/client/assets/page-2qu28FYa.js +0 -21
  158. package/dist/client/assets/page-CeLSKVJn.js +0 -1
  159. package/dist/client/assets/pin-to-sidebar-button-B85FzaKS.js +0 -1
  160. package/dist/client/assets/plugin-empty-state-CLZp9CCB.js +0 -1
  161. package/dist/client/assets/plugin-header-DlV51u69.js +0 -1
  162. package/dist/client/assets/plugins-BNlg-adG.js +0 -1
  163. package/dist/client/assets/popover-nSqfHOuL.js +0 -1
  164. package/dist/client/assets/project-context-provider-DJGvA4-w.js +0 -1
  165. package/dist/client/assets/registry-utils-BKwhzouz.js +0 -1
  166. package/dist/client/assets/resizable-CXrT3-gZ.js +0 -1
  167. package/dist/client/assets/schema-rISYOzpk.js +0 -1
  168. package/dist/client/assets/select-DEFdCmMs.js +0 -1
  169. package/dist/client/assets/settings-DwBDaBpc.js +0 -1
  170. package/dist/client/assets/shell-layout-BGLgMyjW.js +0 -3
  171. package/dist/client/assets/tool-set-selector-Cu6h1Zi5.js +0 -1
  172. package/dist/client/assets/use-binding-C-jiWM_O.js +0 -23
  173. package/dist/client/assets/use-collections-BnNAdJQg.js +0 -1
  174. package/dist/client/assets/use-connection-Cpo9FQLA.js +0 -1
  175. package/dist/client/assets/use-connection-resources-Bf67v2HN.js +0 -1
  176. package/dist/client/assets/use-create-virtual-mcp-B5oK5D73.js +0 -1
  177. package/dist/client/assets/use-mcp-C4SOdL_A.js +0 -1
  178. package/dist/client/assets/use-members-DKVZHAEo.js +0 -1
  179. package/dist/client/assets/use-organization-settings-BksJ8-FR.js +0 -1
  180. package/dist/client/assets/use-tool-call-CDQ4ked9.js +0 -1
  181. package/dist/client/assets/use-virtual-mcp-CMArCljo.js +0 -1
  182. package/dist/client/assets/use-virtual-mcp-system-prompt-CeE5LXb5.js +0 -1
  183. package/dist/client/assets/useInfiniteQuery-CoW_DO_L.js +0 -1
  184. package/dist/client/assets/useMutation-BYfWAlPb.js +0 -1
  185. package/dist/client/assets/useQuery-CqMcSUvK.js +0 -1
  186. package/dist/client/assets/value-CpF7GK8s.js +0 -1
  187. package/dist/client/assets/well-known-mcp-DOEdYmKO.js +0 -1
  188. package/dist/client/assets/workflow-JTUHDWeK.js +0 -1
@@ -1 +0,0 @@
1
- import{r as i,a8 as $,j as c,ah as L,ao as z,a1 as A,a3 as b,a6 as g,af as _,a5 as j,ag as G,ai as w,ba as H,bb as K,a4 as U,bc as V,bd as W,be as Z,aj as q,ak as B,al as J,c as R}from"./index-B9c3bNyk.js";import{c as Q}from"./button-Ta3HWdYR.js";var m="Popover",[E]=U(m,[w]),P=w(),[X,u]=E(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:m});return c.jsx(L,{...p,children:c.jsx(X,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(C=>!C),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=m;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(_,{...s,...r,ref:e})});Y.displayName=F;var S="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,o),s=P(o),a=A(e,n.triggerRef),p=c.jsx(b.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(_,{asChild:!0,...s,children:p})});y.displayName=S;var O="PopoverPortal",[ee,oe]=E(O,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(j,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=O;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(j,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=V("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(k,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(k,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),k=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),C=P(o);return W(),c.jsx(Z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(q,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(B,{"data-state":I(f.open),role:"dialog",id:f.contentId,...C,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(T,o);return c.jsx(b.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=T;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=D,de=M;function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=Q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{ve as P,ge as a,Pe as b};
@@ -1 +0,0 @@
1
- import{r as x,c as d,j as p}from"./index-B9c3bNyk.js";const a="org-admin",P={from({org:r,project:t}){if(r?.includes("/")||t.includes("/"))throw new Error("Org or project cannot contain slashes");return`${r}/${t}`},parse(r){r.startsWith("/")&&(r=r.slice(1));const[t,e]=r.split("/");if(!t||!e)throw new Error("Invalid locator");return{org:t,project:e}},isOrgAdminProject(r){return r.split("/")[1]===a},adminProject(r){return`${r}/${a}`}},j=x.createContext(void 0),m=()=>{const r=x.useContext(j);if(!r)throw new Error("useProjectContext must be used within a ProjectContextProvider");return r},f=r=>{const t=d.c(10),{children:e,org:o,project:s}=r;let n;t[0]!==o.slug||t[1]!==s.slug?(n=P.from({org:o.slug,project:s.slug}),t[0]=o.slug,t[1]=s.slug,t[2]=n):n=t[2];const u=n;let c;t[3]!==u||t[4]!==o||t[5]!==s?(c={org:o,project:s,locator:u},t[3]=u,t[4]=o,t[5]=s,t[6]=c):c=t[6];const l=c;let i;return t[7]!==e||t[8]!==l?(i=p.jsx(j.Provider,{value:l,children:e}),t[7]=e,t[8]=l,t[9]=i):i=t[9],i};export{P as L,a as O,f as P,m as u};
@@ -1 +0,0 @@
1
- import{r as a}from"./index-B9c3bNyk.js";const s=({size:t=24,color:r="currentColor",...e})=>a.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:r,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e},a.createElement("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10m0-20a15.3 15.3 0 0 0-4 10 15.3 15.3 0 0 0 4 10m0-20C6.477 2 2 6.477 2 12s4.477 10 10 10m0-20c5.523 0 10 4.477 10 10s-4.477 10-10 10M2.5 9h19m-19 6h19"}));s.displayName="Globe02";function l(t){return t?t.find(e=>e.name.endsWith("_LIST"))?.name??"":""}function u(t){return t?t.find(e=>e.name.endsWith("_FILTERS"))?.name??"":""}function m(t){if(!t)return[];const r=[];for(const e of t){let n=[];if(Array.isArray(e))n=e;else if(typeof e=="object"&&e!==null){const i=Object.keys(e).find(o=>Array.isArray(e[o]));i&&(n=e[i])}r.push(...n)}return r}const c={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function d(t){return t?c[t]??t.toUpperCase():null}function h(t){return t?t.match(/schemas\/([\d-]+)/)?.[1]??null:null}function y(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const r=Object.keys(t).find(e=>Array.isArray(t[e]));if(r)return t[r]}return[]}export{m as a,u as b,h as c,y as e,l as f,d as g,s};
@@ -1 +0,0 @@
1
- import{r as f,Z as Pn,c as He,j as he}from"./index-B9c3bNyk.js";import{c as Je}from"./button-Ta3HWdYR.js";const Ye=({size:n=24,color:e="currentColor",...t})=>f.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},f.createElement("path",{d:"M12 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm7-14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}));Ye.displayName="DotsGrid";const Ee=f.createContext(null);Ee.displayName="PanelGroupContext";const A={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},_e=10,ne=f.useLayoutEffect,Fe=Pn.useId,wn=typeof Fe=="function"?Fe:()=>null;let En=0;function Ge(n=null){const e=wn(),t=f.useRef(n||e||null);return t.current===null&&(t.current=""+En++),n??t.current}function Qe({children:n,className:e="",collapsedSize:t,collapsible:r,defaultSize:i,forwardedRef:o,id:l,maxSize:a,minSize:s,onCollapse:h,onExpand:w,onResize:p,order:u,style:v,tagName:z="div",...C}){const E=f.useContext(Ee);if(E===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:S,expandPanel:L,getPanelSize:N,getPanelStyle:D,groupId:V,isPanelCollapsed:R,reevaluatePanelConstraints:P,registerPanel:F,resizePanel:q,unregisterPanel:W}=E,G=Ge(l),M=f.useRef({callbacks:{onCollapse:h,onExpand:w,onResize:p},constraints:{collapsedSize:t,collapsible:r,defaultSize:i,maxSize:a,minSize:s},id:G,idIsFromProps:l!==void 0,order:u});f.useRef({didLogMissingDefaultSizeWarning:!1}),ne(()=>{const{callbacks:_,constraints:H}=M.current,B={...H};M.current.id=G,M.current.idIsFromProps=l!==void 0,M.current.order=u,_.onCollapse=h,_.onExpand=w,_.onResize=p,H.collapsedSize=t,H.collapsible=r,H.defaultSize=i,H.maxSize=a,H.minSize=s,(B.collapsedSize!==H.collapsedSize||B.collapsible!==H.collapsible||B.maxSize!==H.maxSize||B.minSize!==H.minSize)&&P(M.current,B)}),ne(()=>{const _=M.current;return F(_),()=>{W(_)}},[u,G,F,W]),f.useImperativeHandle(o,()=>({collapse:()=>{S(M.current)},expand:_=>{L(M.current,_)},getId(){return G},getSize(){return N(M.current)},isCollapsed(){return R(M.current)},isExpanded(){return!R(M.current)},resize:_=>{q(M.current,_)}}),[S,L,N,R,G,q]);const Y=D(M.current,i);return f.createElement(z,{...C,children:n,className:e,id:G,style:{...Y,...v},[A.groupId]:V,[A.panel]:"",[A.panelCollapsible]:r||void 0,[A.panelId]:G,[A.panelSize]:parseFloat(""+Y.flexGrow).toFixed(1)})}const en=f.forwardRef((n,e)=>f.createElement(Qe,{...n,forwardedRef:e}));Qe.displayName="Panel";en.displayName="forwardRef(Panel)";let De=null,Se=-1,J=null;function Cn(n,e){if(e){const t=(e&ln)!==0,r=(e&an)!==0,i=(e&sn)!==0,o=(e&un)!==0;if(t)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function In(){J!==null&&(document.head.removeChild(J),De=null,J=null,Se=-1)}function ke(n,e){var t,r;const i=Cn(n,e);if(De!==i){if(De=i,J===null&&(J=document.createElement("style"),document.head.appendChild(J)),Se>=0){var o;(o=J.sheet)===null||o===void 0||o.removeRule(Se)}Se=(t=(r=J.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${i} !important;}`))!==null&&t!==void 0?t:-1}}function nn(n){return n.type==="keydown"}function tn(n){return n.type.startsWith("pointer")}function rn(n){return n.type.startsWith("mouse")}function Ce(n){if(tn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(rn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function Rn(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Ln(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function kn(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:Ve(n),b:Ve(e)};let r;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),r=n;x(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Ue(Ke(t.a)),b:Ue(Ke(t.b))};if(i.a===i.b){const o=r.childNodes,l={a:t.a.at(-1),b:t.b.at(-1)};let a=o.length;for(;a--;){const s=o[a];if(s===l.a)return 1;if(s===l.b)return-1}}return Math.sign(i.a-i.b)}const An=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Mn(n){var e;const t=getComputedStyle((e=on(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Nn(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Mn(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||An.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Ke(n){let e=n.length;for(;e--;){const t=n[e];if(x(t,"Missing node"),Nn(t))return t}return null}function Ue(n){return n&&Number(getComputedStyle(n).zIndex)||0}function Ve(n){const e=[];for(;n;)e.push(n),n=on(n);return e}function on(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const ln=1,an=2,sn=4,un=8,$n=Rn()==="coarse";let U=[],ae=!1,ee=new Map,Ie=new Map;const ze=new Set;function Dn(n,e,t,r,i){var o;const{ownerDocument:l}=e,a={direction:t,element:e,hitAreaMargins:r,setResizeHandlerState:i},s=(o=ee.get(l))!==null&&o!==void 0?o:0;return ee.set(l,s+1),ze.add(a),Pe(),function(){var w;Ie.delete(n),ze.delete(a);const p=(w=ee.get(l))!==null&&w!==void 0?w:1;if(ee.set(l,p-1),Pe(),p===1&&ee.delete(l),U.includes(a)){const u=U.indexOf(a);u>=0&&U.splice(u,1),Te(),i("up",!0,null)}}}function Hn(n){const{target:e}=n,{x:t,y:r}=Ce(n);ae=!0,Be({target:e,x:t,y:r}),Pe(),U.length>0&&(we("down",n),n.preventDefault(),cn(e)||n.stopImmediatePropagation())}function Ae(n){const{x:e,y:t}=Ce(n);if(ae&&n.buttons===0&&(ae=!1,we("up",n)),!ae){const{target:r}=n;Be({target:r,x:e,y:t})}we("move",n),Te(),U.length>0&&n.preventDefault()}function Me(n){const{target:e}=n,{x:t,y:r}=Ce(n);Ie.clear(),ae=!1,U.length>0&&(n.preventDefault(),cn(e)||n.stopImmediatePropagation()),we("up",n),Be({target:e,x:t,y:r}),Te(),Pe()}function cn(n){let e=n;for(;e;){if(e.hasAttribute(A.resizeHandle))return!0;e=e.parentElement}return!1}function Be({target:n,x:e,y:t}){U.splice(0);let r=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(r=n),ze.forEach(i=>{const{element:o,hitAreaMargins:l}=i,a=o.getBoundingClientRect(),{bottom:s,left:h,right:w,top:p}=a,u=$n?l.coarse:l.fine;if(e>=h-u&&e<=w+u&&t>=p-u&&t<=s+u){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&kn(r,o)>0){let z=r,C=!1;for(;z&&!z.contains(o);){if(Ln(z.getBoundingClientRect(),a)){C=!0;break}z=z.parentElement}if(C)return}U.push(i)}})}function Ne(n,e){Ie.set(n,e)}function Te(){let n=!1,e=!1;U.forEach(r=>{const{direction:i}=r;i==="horizontal"?n=!0:e=!0});let t=0;Ie.forEach(r=>{t|=r}),n&&e?ke("intersection",t):n?ke("horizontal",t):e?ke("vertical",t):In()}let $e=new AbortController;function Pe(){$e.abort(),$e=new AbortController;const n={capture:!0,signal:$e.signal};ze.size&&(ae?(U.length>0&&ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("contextmenu",Me,n),r.addEventListener("pointerleave",Ae,n),r.addEventListener("pointermove",Ae,n))}),window.addEventListener("pointerup",Me,n),window.addEventListener("pointercancel",Me,n)):ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("pointerdown",Hn,n),r.addEventListener("pointermove",Ae,n))}))}function we(n,e){ze.forEach(t=>{const{setResizeHandlerState:r}=t,i=U.includes(t);r(n,i,e)})}function _n(){const[n,e]=f.useState(0);return f.useCallback(()=>e(t=>t+1),[])}function x(n,e){if(!n)throw console.error(e),Error(e)}function te(n,e,t=_e){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function X(n,e,t=_e){return te(n,e,t)===0}function j(n,e,t){return te(n,e,t)===0}function Gn(n,e,t){if(n.length!==e.length)return!1;for(let r=0;r<n.length;r++){const i=n[r],o=e[r];if(!j(i,o,t))return!1}return!0}function le({panelConstraints:n,panelIndex:e,size:t}){const r=n[e];x(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:o,maxSize:l=100,minSize:a=0}=r;if(te(t,a)<0)if(o){const s=(i+a)/2;te(t,s)<0?t=i:t=a}else t=a;return t=Math.min(l,t),t=parseFloat(t.toFixed(_e)),t}function ge({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:r,prevLayout:i,trigger:o}){if(j(n,0))return e;const l=[...e],[a,s]=r;x(a!=null,"Invalid first pivot index"),x(s!=null,"Invalid second pivot index");let h=0;if(o==="keyboard"){{const p=n<0?s:a,u=t[p];x(u,`Panel constraints not found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,v)){const S=C-E;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}{const p=n<0?a:s,u=t[p];x(u,`No panel constraints found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,C)){const S=E-v;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}}{const p=n<0?1:-1;let u=n<0?s:a,v=0;for(;;){const C=e[u];x(C!=null,`Previous layout not found for panel index ${u}`);const S=le({panelConstraints:t,panelIndex:u,size:100})-C;if(v+=S,u+=p,u<0||u>=t.length)break}const z=Math.min(Math.abs(n),Math.abs(v));n=n<0?0-z:z}{let u=n<0?a:s;for(;u>=0&&u<t.length;){const v=Math.abs(n)-Math.abs(h),z=e[u];x(z!=null,`Previous layout not found for panel index ${u}`);const C=z-v,E=le({panelConstraints:t,panelIndex:u,size:C});if(!j(z,E)&&(h+=z-E,l[u]=E,h.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?u--:u++}}if(Gn(i,l))return i;{const p=n<0?s:a,u=e[p];x(u!=null,`Previous layout not found for panel index ${p}`);const v=u+h,z=le({panelConstraints:t,panelIndex:p,size:v});if(l[p]=z,!j(z,v)){let C=v-z,S=n<0?s:a;for(;S>=0&&S<t.length;){const L=l[S];x(L!=null,`Previous layout not found for panel index ${S}`);const N=L+C,D=le({panelConstraints:t,panelIndex:S,size:N});if(j(L,D)||(C-=D-L,l[S]=D),j(C,0))break;n>0?S--:S++}}}const w=l.reduce((p,u)=>u+p,0);return j(w,100)?l:i}function Bn({layout:n,panelsArray:e,pivotIndices:t}){let r=0,i=100,o=0,l=0;const a=t[0];x(a!=null,"No pivot index found"),e.forEach((p,u)=>{const{constraints:v}=p,{maxSize:z=100,minSize:C=0}=v;u===a?(r=C,i=z):(o+=C,l+=z)});const s=Math.min(i,100-o),h=Math.max(r,100-l),w=n[a];return{valueMax:s,valueMin:h,valueNow:w}}function ye(n,e=document){return Array.from(e.querySelectorAll(`[${A.resizeHandleId}][data-panel-group-id="${n}"]`))}function fn(n,e,t=document){const i=ye(n,t).findIndex(o=>o.getAttribute(A.resizeHandleId)===e);return i??null}function dn(n,e,t){const r=fn(n,e,t);return r!=null?[r,r+1]:[-1,-1]}function pn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return r||null}function Re(n,e=document){const t=e.querySelector(`[${A.resizeHandleId}="${n}"]`);return t||null}function Tn(n,e,t,r=document){var i,o,l,a;const s=Re(e,r),h=ye(n,r),w=s?h.indexOf(s):-1,p=(i=(o=t[w])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,u=(l=(a=t[w+1])===null||a===void 0?void 0:a.id)!==null&&l!==void 0?l:null;return[p,u]}function Wn({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:l}){f.useRef({didWarnAboutMissingResizeHandle:!1}),ne(()=>{if(!o)return;const a=ye(t,o);for(let s=0;s<i.length-1;s++){const{valueMax:h,valueMin:w,valueNow:p}=Bn({layout:r,panelsArray:i,pivotIndices:[s,s+1]}),u=a[s];if(u!=null){const v=i[s];x(v,`No panel data found for index "${s}"`),u.setAttribute("aria-controls",v.id),u.setAttribute("aria-valuemax",""+Math.round(h)),u.setAttribute("aria-valuemin",""+Math.round(w)),u.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{a.forEach((s,h)=>{s.removeAttribute("aria-controls"),s.removeAttribute("aria-valuemax"),s.removeAttribute("aria-valuemin"),s.removeAttribute("aria-valuenow")})}},[t,r,i,o]),f.useEffect(()=>{if(!o)return;const a=e.current;x(a,"Eager values not found");const{panelDataArray:s}=a,h=pn(t,o);x(h!=null,`No group found for id "${t}"`);const w=ye(t,o);x(w,`No resize handles found for group id "${t}"`);const p=w.map(u=>{const v=u.getAttribute(A.resizeHandleId);x(v,"Resize handle element has no handle id attribute");const[z,C]=Tn(t,v,s,o);if(z==null||C==null)return()=>{};const E=S=>{if(!S.defaultPrevented)switch(S.key){case"Enter":{S.preventDefault();const L=s.findIndex(N=>N.id===z);if(L>=0){const N=s[L];x(N,`No panel data found for index ${L}`);const D=r[L],{collapsedSize:V=0,collapsible:R,minSize:P=0}=N.constraints;if(D!=null&&R){const F=ge({delta:j(D,V)?P-V:V-D,initialLayout:r,panelConstraints:s.map(q=>q.constraints),pivotIndices:dn(t,v,o),prevLayout:r,trigger:"keyboard"});r!==F&&l(F)}}break}}};return u.addEventListener("keydown",E),()=>{u.removeEventListener("keydown",E)}});return()=>{p.forEach(u=>u())}},[o,n,e,t,r,i,l])}function Ze(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function gn(n,e){const t=n==="horizontal",{x:r,y:i}=Ce(e);return t?r:i}function jn(n,e,t,r,i){const o=t==="horizontal",l=Re(e,i);x(l,`No resize handle element found for id "${e}"`);const a=l.getAttribute(A.groupId);x(a,"Resize handle element has no group id attribute");let{initialCursorPosition:s}=r;const h=gn(t,n),w=pn(a,i);x(w,`No group element found for id "${a}"`);const p=w.getBoundingClientRect(),u=o?p.width:p.height;return(h-s)/u*100}function Fn(n,e,t,r,i,o){if(nn(n)){const l=t==="horizontal";let a=0;n.shiftKey?a=100:i!=null?a=i:a=10;let s=0;switch(n.key){case"ArrowDown":s=l?0:a;break;case"ArrowLeft":s=l?-a:0;break;case"ArrowRight":s=l?a:0;break;case"ArrowUp":s=l?0:-a;break;case"End":s=100;break;case"Home":s=-100;break}return s}else return r==null?0:jn(n,e,t,r,o)}function Kn({panelDataArray:n}){const e=Array(n.length),t=n.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;a!=null&&(r++,e[o]=a,i-=a)}for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;if(a!=null)continue;const s=n.length-r,h=i/s;r++,e[o]=h,i-=h}return e}function oe(n,e,t){e.forEach((r,i)=>{const o=n[i];x(o,`Panel data not found for index ${i}`);const{callbacks:l,constraints:a,id:s}=o,{collapsedSize:h=0,collapsible:w}=a,p=t[s];if(p==null||r!==p){t[s]=r;const{onCollapse:u,onExpand:v,onResize:z}=l;z&&z(r,p),w&&(u||v)&&(v&&(p==null||X(p,h))&&!X(r,h)&&v(),u&&(p==null||!X(p,h))&&X(r,h)&&u())}})}function be(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Un({defaultSize:n,dragState:e,layout:t,panelData:r,panelIndex:i,precision:o=3}){const l=t[i];let a;return l==null?a=n!=null?n.toPrecision(o):"1":r.length===1?a="1":a=l.toPrecision(o),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Vn(n,e=10){let t=null;return(...i)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...i)},e)}}function Oe(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function mn(n){return`react-resizable-panels:${n}`}function hn(n){return n.map(e=>{const{constraints:t,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function zn(n,e){try{const t=mn(n),r=e.getItem(t);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function Zn(n,e,t){var r,i;const o=(r=zn(n,t))!==null&&r!==void 0?r:{},l=hn(e);return(i=o[l])!==null&&i!==void 0?i:null}function On(n,e,t,r,i){var o;const l=mn(n),a=hn(e),s=(o=zn(n,i))!==null&&o!==void 0?o:{};s[a]={expandToSizes:Object.fromEntries(t.entries()),layout:r};try{i.setItem(l,JSON.stringify(s))}catch(h){console.error(h)}}function qe({layout:n,panelConstraints:e}){const t=[...n],r=t.reduce((o,l)=>o+l,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(o=>`${o}%`).join(", ")}`);if(!j(r,100)&&t.length>0)for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=100/r*l;t[o]=a}let i=0;for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=le({panelConstraints:e,panelIndex:o,size:l});l!=a&&(i+=l-a,t[o]=a)}if(!j(i,0))for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=l+i,s=le({panelConstraints:e,panelIndex:o,size:a});if(l!==s&&(i-=s-l,t[o]=s,j(i,0)))break}return t}const qn=100,me={getItem:n=>(Oe(me),me.getItem(n)),setItem:(n,e)=>{Oe(me),me.setItem(n,e)}},Xe={};function yn({autoSaveId:n=null,children:e,className:t="",direction:r,forwardedRef:i,id:o=null,onLayout:l=null,keyboardResizeBy:a=null,storage:s=me,style:h,tagName:w="div",...p}){const u=Ge(o),v=f.useRef(null),[z,C]=f.useState(null),[E,S]=f.useState([]),L=_n(),N=f.useRef({}),D=f.useRef(new Map),V=f.useRef(0),R=f.useRef({autoSaveId:n,direction:r,dragState:z,id:u,keyboardResizeBy:a,onLayout:l,storage:s}),P=f.useRef({layout:E,panelDataArray:[],panelDataArrayChanged:!1});f.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),f.useImperativeHandle(i,()=>({getId:()=>R.current.id,getLayout:()=>{const{layout:c}=P.current;return c},setLayout:c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current,d=qe({layout:c,panelConstraints:g.map(y=>y.constraints)});Ze(b,d)||(S(d),P.current.layout=d,m&&m(d),oe(g,d,N.current))}}),[]),ne(()=>{R.current.autoSaveId=n,R.current.direction=r,R.current.dragState=z,R.current.id=u,R.current.onLayout=l,R.current.storage=s}),Wn({committedValuesRef:R,eagerValuesRef:P,groupId:u,layout:E,panelDataArray:P.current.panelDataArray,setLayout:S,panelGroupElement:v.current}),f.useEffect(()=>{const{panelDataArray:c}=P.current;if(n){if(E.length===0||E.length!==c.length)return;let m=Xe[n];m==null&&(m=Vn(On,qn),Xe[n]=m);const b=[...c],g=new Map(D.current);m(n,b,g,E,s)}},[n,E,s]),f.useEffect(()=>{});const F=f.useCallback(c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current;if(c.constraints.collapsible){const d=g.map(Z=>Z.constraints),{collapsedSize:y=0,panelSize:I,pivotIndices:$}=Q(g,c,b);if(x(I!=null,`Panel size not found for panel "${c.id}"`),!X(I,y)){D.current.set(c.id,I);const O=ie(g,c)===g.length-1?I-y:y-I,k=ge({delta:O,initialLayout:b,panelConstraints:d,pivotIndices:$,prevLayout:b,trigger:"imperative-api"});be(b,k)||(S(k),P.current.layout=k,m&&m(k),oe(g,k,N.current))}}},[]),q=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current;if(c.constraints.collapsible){const y=d.map(K=>K.constraints),{collapsedSize:I=0,panelSize:$=0,minSize:Z=0,pivotIndices:O}=Q(d,c,g),k=m??Z;if(X($,I)){const K=D.current.get(c.id),de=K!=null&&K>=k?K:k,Le=ie(d,c)===d.length-1?$-de:de-$,T=ge({delta:Le,initialLayout:g,panelConstraints:y,pivotIndices:O,prevLayout:g,trigger:"imperative-api"});be(g,T)||(S(T),P.current.layout=T,b&&b(T),oe(d,T,N.current))}}},[]),W=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{panelSize:g}=Q(b,c,m);return x(g!=null,`Panel size not found for panel "${c.id}"`),g},[]),G=f.useCallback((c,m)=>{const{panelDataArray:b}=P.current,g=ie(b,c);return Un({defaultSize:m,dragState:z,layout:E,panelData:b,panelIndex:g})},[z,E]),M=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),d===!0&&X(y,g)},[]),Y=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),!d||te(y,g)>0},[]),_=f.useCallback(c=>{const{panelDataArray:m}=P.current;m.push(c),m.sort((b,g)=>{const d=b.order,y=g.order;return d==null&&y==null?0:d==null?-1:y==null?1:d-y}),P.current.panelDataArrayChanged=!0,L()},[L]);ne(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;const{autoSaveId:c,onLayout:m,storage:b}=R.current,{layout:g,panelDataArray:d}=P.current;let y=null;if(c){const $=Zn(c,d,b);$&&(D.current=new Map(Object.entries($.expandToSizes)),y=$.layout)}y==null&&(y=Kn({panelDataArray:d}));const I=qe({layout:y,panelConstraints:d.map($=>$.constraints)});Ze(g,I)||(S(I),P.current.layout=I,m&&m(I),oe(d,I,N.current))}}),ne(()=>{const c=P.current;return()=>{c.layout=[]}},[]);const H=f.useCallback(c=>{let m=!1;const b=v.current;return b&&window.getComputedStyle(b,null).getPropertyValue("direction")==="rtl"&&(m=!0),function(d){d.preventDefault();const y=v.current;if(!y)return()=>null;const{direction:I,dragState:$,id:Z,keyboardResizeBy:O,onLayout:k}=R.current,{layout:K,panelDataArray:de}=P.current,{initialLayout:ve}=$??{},Le=dn(Z,c,y);let T=Fn(d,c,I,$,O,y);const We=I==="horizontal";We&&m&&(T=-T);const bn=de.map(Sn=>Sn.constraints),pe=ge({delta:T,initialLayout:ve??K,panelConstraints:bn,pivotIndices:Le,prevLayout:K,trigger:nn(d)?"keyboard":"mouse-or-touch"}),je=!be(K,pe);(tn(d)||rn(d))&&V.current!=T&&(V.current=T,!je&&T!==0?We?Ne(c,T<0?ln:an):Ne(c,T<0?sn:un):Ne(c,0)),je&&(S(pe),P.current.layout=pe,k&&k(pe),oe(de,pe,N.current))}},[]),B=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current,y=d.map(K=>K.constraints),{panelSize:I,pivotIndices:$}=Q(d,c,g);x(I!=null,`Panel size not found for panel "${c.id}"`);const O=ie(d,c)===d.length-1?I-m:m-I,k=ge({delta:O,initialLayout:g,panelConstraints:y,pivotIndices:$,prevLayout:g,trigger:"imperative-api"});be(g,k)||(S(k),P.current.layout=k,b&&b(k),oe(d,k,N.current))},[]),se=f.useCallback((c,m)=>{const{layout:b,panelDataArray:g}=P.current,{collapsedSize:d=0,collapsible:y}=m,{collapsedSize:I=0,collapsible:$,maxSize:Z=100,minSize:O=0}=c.constraints,{panelSize:k}=Q(g,c,b);k!=null&&(y&&$&&X(k,d)?X(d,I)||B(c,I):k<O?B(c,O):k>Z&&B(c,Z))},[B]),ue=f.useCallback((c,m)=>{const{direction:b}=R.current,{layout:g}=P.current;if(!v.current)return;const d=Re(c,v.current);x(d,`Drag handle element not found for id "${c}"`);const y=gn(b,m);C({dragHandleId:c,dragHandleRect:d.getBoundingClientRect(),initialCursorPosition:y,initialLayout:g})},[]),ce=f.useCallback(()=>{C(null)},[]),xe=f.useCallback(c=>{const{panelDataArray:m}=P.current,b=ie(m,c);b>=0&&(m.splice(b,1),delete N.current[c.id],P.current.panelDataArrayChanged=!0,L())},[L]),re=f.useMemo(()=>({collapsePanel:F,direction:r,dragState:z,expandPanel:q,getPanelSize:W,getPanelStyle:G,groupId:u,isPanelCollapsed:M,isPanelExpanded:Y,reevaluatePanelConstraints:se,registerPanel:_,registerResizeHandle:H,resizePanel:B,startDragging:ue,stopDragging:ce,unregisterPanel:xe,panelGroupElement:v.current}),[F,z,r,q,W,G,u,M,Y,se,_,H,B,ue,ce,xe]),fe={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return f.createElement(Ee.Provider,{value:re},f.createElement(w,{...p,children:e,className:t,id:o,ref:v,style:{...fe,...h},[A.group]:"",[A.groupDirection]:r,[A.groupId]:u}))}const xn=f.forwardRef((n,e)=>f.createElement(yn,{...n,forwardedRef:e}));yn.displayName="PanelGroup";xn.displayName="forwardRef(PanelGroup)";function ie(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function Q(n,e,t){const r=ie(n,e),o=r===n.length-1?[r-1,r]:[r,r+1],l=t[r];return{...e.constraints,panelSize:l,pivotIndices:o}}function Xn({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:r}){f.useEffect(()=>{if(n||t==null||r==null)return;const i=Re(e,r);if(i==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),t(l);break}case"F6":{l.preventDefault();const a=i.getAttribute(A.groupId);x(a,`No group element found for id "${a}"`);const s=ye(a,r),h=fn(a,e,r);x(h!==null,`No resize element found for id "${e}"`);const w=l.shiftKey?h>0?h-1:s.length-1:h+1<s.length?h+1:0;s[w].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,n,e,t])}function vn({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:r,id:i,onBlur:o,onClick:l,onDragging:a,onFocus:s,onPointerDown:h,onPointerUp:w,style:p={},tabIndex:u=0,tagName:v="div",...z}){var C,E;const S=f.useRef(null),L=f.useRef({onClick:l,onDragging:a,onPointerDown:h,onPointerUp:w});f.useEffect(()=>{L.current.onClick=l,L.current.onDragging=a,L.current.onPointerDown=h,L.current.onPointerUp=w});const N=f.useContext(Ee);if(N===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:D,groupId:V,registerResizeHandle:R,startDragging:P,stopDragging:F,panelGroupElement:q}=N,W=Ge(i),[G,M]=f.useState("inactive"),[Y,_]=f.useState(!1),[H,B]=f.useState(null),se=f.useRef({state:G});ne(()=>{se.current.state=G}),f.useEffect(()=>{if(t)B(null);else{const re=R(W);B(()=>re)}},[t,W,R]);const ue=(C=r?.coarse)!==null&&C!==void 0?C:15,ce=(E=r?.fine)!==null&&E!==void 0?E:5;f.useEffect(()=>{if(t||H==null)return;const re=S.current;x(re,"Element ref not attached");let fe=!1;return Dn(W,re,D,{coarse:ue,fine:ce},(m,b,g)=>{if(!b){M("inactive");return}switch(m){case"down":{M("drag"),fe=!1,x(g,'Expected event to be defined for "down" action'),P(W,g);const{onDragging:d,onPointerDown:y}=L.current;d?.(!0),y?.();break}case"move":{const{state:d}=se.current;fe=!0,d!=="drag"&&M("hover"),x(g,'Expected event to be defined for "move" action'),H(g);break}case"up":{M("hover"),F();const{onClick:d,onDragging:y,onPointerUp:I}=L.current;y?.(!1),I?.(),fe||d?.();break}}})},[ue,D,t,ce,R,W,H,P,F]),Xn({disabled:t,handleId:W,resizeHandler:H,panelGroupElement:q});const xe={touchAction:"none",userSelect:"none"};return f.createElement(v,{...z,children:n,className:e,id:i,onBlur:()=>{_(!1),o?.()},onFocus:()=>{_(!0),s?.()},ref:S,role:"separator",style:{...xe,...p},tabIndex:u,[A.groupDirection]:D,[A.groupId]:V,[A.resizeHandle]:"",[A.resizeHandleActive]:G==="drag"?"pointer":Y?"keyboard":void 0,[A.resizeHandleEnabled]:!t,[A.resizeHandleId]:W,[A.resizeHandleState]:G})}vn.displayName="PanelResizeHandle";function Qn(n){const e=He.c(8);let t,r;e[0]!==n?({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let i;e[3]!==t?(i=Je("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[3]=t,e[4]=i):i=e[4];let o;return e[5]!==r||e[6]!==i?(o=he.jsx(xn,{"data-slot":"resizable-panel-group",className:i,...r}),e[5]=r,e[6]=i,e[7]=o):o=e[7],o}function et(n){const e=He.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let r;return e[2]!==t?(r=he.jsx(en,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=r):r=e[3],r}function nt(n){const e=He.c(12);let t,r,i;e[0]!==n?({withHandle:i,className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i):(t=e[1],r=e[2],i=e[3]);let o;e[4]!==t?(o=Je("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=o):o=e[5];let l;e[6]!==i?(l=i&&he.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:he.jsx(Ye,{className:"size-2.5"})}),e[6]=i,e[7]=l):l=e[7];let a;return e[8]!==r||e[9]!==o||e[10]!==l?(a=he.jsx(vn,{"data-slot":"resizable-handle",className:o,...r,children:l}),e[8]=r,e[9]=o,e[10]=l,e[11]=a):a=e[11],a}export{et as R,nt as a,Qn as b};
@@ -1 +0,0 @@
1
- import{y as o,_ as c,I as i,z as e,L as r,J as t,aD as a,aH as d}from"./index-B9c3bNyk.js";const l=o({authorizationEndpoint:e().url(),tokenEndpoint:e().url(),introspectionEndpoint:e().url().optional(),clientId:e(),clientSecret:e().optional(),scopes:i(e()),grantType:c(["authorization_code","client_credentials"])}),u=o({title:e().optional(),readOnlyHint:r().optional(),destructiveHint:r().optional(),idempotentHint:r().optional(),openWorldHint:r().optional()}),p=o({name:e(),description:e().optional(),inputSchema:t(e(),a()),outputSchema:t(e(),a()).optional(),annotations:u.optional(),_meta:t(e(),a()).optional()}),b=o({headers:t(e(),e()).optional()}),m=o({command:e().describe("Command to run (e.g., 'npx', 'node')"),args:i(e()).optional().describe("Command arguments"),cwd:e().optional().describe("Working directory"),envVars:t(e(),e()).optional().describe("Environment variables (encrypted in storage)")}),s=o({id:e().describe("Unique identifier for the connection"),title:e().describe("Human-readable name for the connection"),created_at:e().describe("When the connection was created"),updated_at:e().describe("When the connection was last updated"),created_by:e().describe("User ID who created the connection"),updated_by:e().optional().describe("User ID who last updated the connection"),organization_id:e().describe("Organization ID this connection belongs to"),description:e().nullable().describe("Description of the connection"),icon:e().nullable().describe("Icon URL for the connection"),app_name:e().nullable().describe("Associated app name"),app_id:e().nullable().describe("Associated app ID"),connection_type:c(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:e().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:e().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:d([m,b]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:l.nullable().describe("OAuth configuration"),configuration_state:t(e(),a()).nullable().describe("Configuration state (decrypted)"),configuration_scopes:i(e()).nullable().optional().describe("Configuration scopes"),metadata:t(e(),a()).nullable().describe("Additional metadata (includes repository info)"),tools:i(p).nullable().describe("Discovered tools from MCP"),bindings:i(e()).nullable().describe("Detected bindings"),status:c(["active","inactive","error"]).describe("Current status")});s.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0});s.partial();function _(n){return n!=null&&"command"in n}function f(n){return!n||!n.startsWith("virtual://")?null:n.replace("virtual://","")}export{_ as i,f as p};
@@ -1 +0,0 @@
1
- import{r as c,a2 as rt,a8 as Ne,j as d,ah as st,ao as Ie,a1 as k,af as lt,a3 as j,a6 as P,a7 as $,ag as at,Y as _e,ai as Ee,ap as it,aC as ct,m as dt,ba as ut,bd as pt,bb as ft,be as mt,aj as ht,a4 as vt,bc as gt,ak as xt,al as St,c as ee}from"./index-B9c3bNyk.js";import{V as wt}from"./tooltip-Bb2oNaYJ.js";import{i as Ct}from"./Check-qyrf_w7u.js";import{t as Re}from"./ChevronDown-D4EQGXFb.js";import{c as oe}from"./button-Ta3HWdYR.js";function Pe(n,[e,t]){return Math.min(t,Math.max(e,n))}var yt=[" ","Enter","ArrowUp","ArrowDown"],bt=[" ","Enter"],J="Select",[de,ue,It]=it(J),[ne]=vt(J,[It,Ee]),pe=Ee(),[Tt,G]=ne(J),[Nt,Pt]=ne(J),je=n=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:r,onOpenChange:i,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:I,required:w,form:S}=n,p=pe(e),[v,C]=c.useState(null),[m,x]=c.useState(null),[U,M]=c.useState(!1),re=rt(u),[_,O]=Ne({prop:o,defaultProp:r??!1,onChange:i,caller:J}),[F,q]=Ne({prop:s,defaultProp:l,onChange:a,caller:J}),L=c.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=c.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(st,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:U,onValueNodeHasChildrenChange:M,contentId:Ie(),value:F,onValueChange:q,open:_,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:I,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Nt,{scope:n.__scopeSelect,onNativeOptionAdd:c.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:c.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Qe,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:g,value:F,onChange:E=>q(E.target.value),disabled:I,form:S,children:[F===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=c.forwardRef((n,e)=>{const{__scopeSelect:t,disabled:o=!1,...r}=n,i=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=c.useRef("touch"),[g,I,w]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(lt,{asChild:!0,...i,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...r,ref:a,onClick:P(r.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:P(r.onPointerDown,p=>{h.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:P(r.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&I(p.key),!(v&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,children:i,placeholder:s="",...l}=n,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=i!==void 0,g=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):i})});De.displayName=Oe;var _t="SelectIcon",ke=c.forwardRef((n,e)=>{const{__scopeSelect:t,children:o,...r}=n;return d.jsx(j.span,{"aria-hidden":!0,...r,ref:e,children:o||"▼"})});ke.displayName=_t;var Et="SelectPortal",Le=n=>d.jsx(at,{asChild:!0,...n});Le.displayName=Et;var Q="SelectContent",Be=c.forwardRef((n,e)=>{const t=G(Q,n.__scopeSelect),[o,r]=c.useState();if($(()=>{r(new DocumentFragment)},[]),!t.open){const i=o;return i?_e.createPortal(d.jsx(Ve,{scope:n.__scopeSelect,children:d.jsx(de.Slot,{scope:n.__scopeSelect,children:d.jsx("div",{children:n.children})})}),i):null}return d.jsx(He,{...n,ref:e})});Be.displayName=Q;var A=10,[Ve,Y]=ne(Q),Rt="SelectContentImpl",jt=gt("SelectContent.RemoveScroll"),He=c.forwardRef((n,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:I,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=n,m=G(Q,t),[x,U]=c.useState(null),[M,re]=c.useState(null),_=k(e,f=>U(f)),[O,F]=c.useState(null),[q,L]=c.useState(null),B=ue(t),[W,V]=c.useState(!1),H=c.useRef(!1);c.useEffect(()=>{if(x)return ut(x)},[x]),pt();const E=c.useCallback(f=>{const[T,...R]=B().map(N=>N.ref.current),[y]=R.slice(-1),b=document.activeElement;for(const N of f)if(N===b||(N?.scrollIntoView({block:"nearest"}),N===T&&M&&(M.scrollTop=0),N===y&&M&&(M.scrollTop=M.scrollHeight),N?.focus(),document.activeElement!==b))return},[B,M]),D=c.useCallback(()=>E([O,x]),[E,O,x]);c.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;c.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),c.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(b=>!b.disabled),R=T.find(b=>b.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(F(f),y&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:I,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(ft,{as:jt,allowPinchZoom:!0,children:d.jsx(mt,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:P(r,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ie,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:P(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let y=B().filter(b=>!b.disabled).map(b=>b.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const b=f.target,N=y.indexOf(b);y=y.slice(N+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=c.forwardRef((n,e)=>{const{__scopeSelect:t,onPlaced:o,...r}=n,i=G(Q,t),s=Y(Q,t),[l,a]=c.useState(null),[u,h]=c.useState(null),g=k(e,_=>h(_)),I=ue(t),w=c.useRef(!1),S=c.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&v&&C){const _=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),F=i.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(i.dir!=="rtl"){const b=q.left-O.left,N=F.left-b,X=_.left-N,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const b=O.right-q.right,N=window.innerWidth-F.right-b,X=window.innerWidth-_.right-N,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=I(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=_.top+_.height/2-A,ie=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const b=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const N=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,se+(b?he:0)+N+D),Z=T+X;l.style.height=Z+"px"}else{const b=L.length>0&&v===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(b?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[I,i.trigger,i.valueNode,l,u,p,v,C,i.dir,o]);$(()=>x(),[x]);const[U,M]=c.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=c.useCallback(_=>{_&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:U},children:d.jsx(j.div,{...r,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=c.forwardRef((n,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:r=A,...i}=n,s=pe(t);return d.jsx(xt,{...s,...i,ref:e,align:o,collisionPadding:r,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(Q,{}),we="SelectViewport",Ue=c.forwardRef((n,e)=>{const{__scopeSelect:t,nonce:o,...r}=n,i=Y(we,t),s=Te(we,t),l=k(e,i.onViewportChange),a=c.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:P(r.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:I}=s;if(I?.current&&g){const w=Math.abs(a.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const m=C+w,x=Math.min(S,m),U=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=U>0?U:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Ue.displayName=we;var Fe="SelectGroup",[Dt,kt]=ne(Fe),Lt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=Ie();return d.jsx(Dt,{scope:t,id:r,children:d.jsx(j.div,{role:"group","aria-labelledby":r,...o,ref:e})})});Lt.displayName=Fe;var We="SelectLabel",Bt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=kt(We,t);return d.jsx(j.div,{id:r.id,...o,ref:e})});Bt.displayName=We;var ce="SelectItem",[Vt,Ke]=ne(ce),$e=c.forwardRef((n,e)=>{const{__scopeSelect:t,value:o,disabled:r=!1,textValue:i,...s}=n,l=G(ce,t),a=Y(ce,t),u=l.value===o,[h,g]=c.useState(i??""),[I,w]=c.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,r)),p=Ie(),v=c.useRef("touch"),C=()=>{r||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:r,textId:p,isSelected:u,onItemTextChange:c.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:r,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":I?"":void 0,"aria-selected":u&&I,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:S,onFocus:P(s.onFocus,()=>w(!0)),onBlur:P(s.onBlur,()=>w(!1)),onClick:P(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:P(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:P(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:P(s.onPointerMove,m=>{v.current=m.pointerType,r?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:P(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(bt.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ce;var le="SelectItemText",Ge=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,...i}=n,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=Pt(le,t),[h,g]=c.useState(null),I=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...i,ref:I}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?_e.createPortal(i.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Xe=c.forwardRef((n,e)=>{const t=Y(Ce,n.__scopeSelect),o=Te(Ce,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;i(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Je,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=c.forwardRef((n,e)=>{const t=Y(ye,n.__scopeSelect),o=Te(ye,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;i(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Je,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Je=c.forwardRef((n,e)=>{const{__scopeSelect:t,onAutoScroll:o,...r}=n,i=Y("SelectScrollButton",t),s=c.useRef(null),l=ue(t),a=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...r,ref:e,style:{flexShrink:0,...r.style},onPointerDown:P(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:P(r.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:P(r.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var be="SelectArrow",Ut=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=pe(t),i=G(be,t),s=Y(be,t);return i.open&&s.position==="popper"?d.jsx(St,{...r,...o,ref:e}):null});Ut.displayName=be;var Ft="SelectBubbleInput",Qe=c.forwardRef(({__scopeSelect:n,value:e,...t},o)=>{const r=c.useRef(null),i=k(o,r),s=ct(e);return c.useEffect(()=>{const l=r.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...wt,...t.style},ref:i,defaultValue:e})});Qe.displayName=Ft;function et(n){return n===""||n===void 0}function tt(n){const e=dt(n),t=c.useRef(""),o=c.useRef(0),r=c.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),i=c.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,r,i]}function ot(n,e,t){const r=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=t?n.indexOf(t):-1;let s=Wt(n,Math.max(i,0));r.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return a!==t?a:void 0}function Wt(n,e){return n.map((t,o)=>n[(e+o)%n.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Xt=Be,Zt=Ue,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;const nt=({size:n=24,color:e="currentColor",...t})=>c.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},c.createElement("path",{d:"m18 15-6-6-6 6"}));nt.displayName="ChevronUp";function uo(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function fo(n){const e=ee.c(13);let t,o,r,i;e[0]!==n?({className:o,size:i,children:t,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?"default":i;let l;e[5]!==o?(l=oe("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-10 data-[size=sm]:h-7 data-[size=xs]:h-7 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...r,children:[t,a]}),e[8]=t,e[9]=r,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function mo(n){const e=ee.c(25);let t,o,r,i,s;e[0]!==n?({className:o,children:t,position:i,hideScrollButtons:s,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i,e[5]=s):(t=e[1],o=e[2],r=e[3],i=e[4],s=e[5]);const l=i===void 0?"popper":i,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let g;e[9]!==a?(g=!a&&d.jsx(no,{}),e[9]=a,e[10]=g):g=e[10];const I=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==I?(w=oe("p-1",I),e[11]=I,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==r||e[20]!==h||e[21]!==g||e[22]!==S||e[23]!==p?(v=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",className:h,position:l,...r,children:[g,S,p]})}),e[18]=l,e[19]=r,e[20]=h,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function ho(n){const e=ee.c(16);let t,o,r,i;e[0]!==n?({className:o,children:t,hideCheck:i,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?!1:i;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(Ct,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==r||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...r,children:[a,u]}),e[11]=r,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(nt,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}function ro(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Re,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}export{uo as S,fo as a,po as b,mo as c,ho as d,Pe as e};
@@ -1 +0,0 @@
1
- import{r as N,f as B,x as $,E as D,B as P,t as C,K as I,a as K,j as s,M as Q,c as A,y as H,z as L}from"./index-B9c3bNyk.js";import{C as T}from"./collection-header-ebtrK-4-.js";import{C as W}from"./collection-page-BhBrRtz8.js";import{u as Y}from"./project-context-provider-DJGvA4-w.js";import{B as w}from"./button-Ta3HWdYR.js";import{a as Z,F as k,b as E,c as R,d as O,f as M,e as G}from"./form-HErbLCwX.js";import{I as U}from"./input-Dh7sDwu6.js";import{u as J}from"./useMutation-BYfWAlPb.js";import{i as V}from"./Grid01-DS_Rpsaf.js";import{i as X}from"./Upload01-Deo1Gmh-.js";import{i as _}from"./X-C24Yv1HS.js";import"./collection-display-button-CQf7wSjn.js";import"./dropdown-menu-BbIA2rWH.js";import"./ArrowUp-C39Etgym.js";import"./Check-qyrf_w7u.js";import"./List-CMJ7wwXL.js";import"./tooltip-Bb2oNaYJ.js";import"./view-mode-toggle-C6P0fGVR.js";const q=({size:d=24,color:e="currentColor",...r})=>N.createElement("svg",{viewBox:"0 0 24 24",width:d,height:d,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},N.createElement("path",{d:"m2 14.5 9.642 4.821c.131.066.197.099.266.111.06.012.123.012.184 0 .069-.012.135-.045.266-.11L22 14.5m-20-5 9.642-4.821c.131-.066.197-.098.266-.111a.5.5 0 0 1 .184 0c.069.013.135.045.266.111L22 9.5l-9.642 4.821a1.028 1.028 0 0 1-.266.111.501.501 0 0 1-.184 0c-.069-.012-.135-.045-.266-.11L2 9.5Z"}));q.displayName="LayersTwo01";const ee=H({name:L().min(1,"Name is required").max(255,"Name is too long"),slug:L().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:L().optional()});function se(d){const e=A.c(24),{value:r,onChange:a,name:m}=d,o=N.useRef(null);let u;e[0]!==a?(u=S=>{const F=S.target.files?.[0];if(F){if(F.size>2097152){C.error("Image must be smaller than 2MB");return}const c=new FileReader;c.onerror=()=>{const y=c.error;console.error("FileReader error:",y),C.error(y?.message||"Failed to read image file. Please try again."),o.current&&(o.current.value="")},c.onloadend=()=>{if(c.readyState===FileReader.DONE&&c.result){const y=c.result;a(y)}},c.readAsDataURL(F)}},e[0]=a,e[1]=u):u=e[1];const j=u;let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{o.current?.click()},e[2]=l):l=e[2];const t=l;let i;e[3]!==a?(i=S=>{S.stopPropagation(),a("")},e[3]=a,e[4]=i):i=e[4];const n=i;let g;e[5]!==j?(g=s.jsx("input",{type:"file",ref:o,className:"hidden",accept:"image/*",onChange:j}),e[5]=j,e[6]=g):g=e[6];let x;e[7]!==n||e[8]!==m||e[9]!==r?(x=r?s.jsxs("div",{className:"relative group",children:[s.jsx("div",{className:"h-20 w-20 rounded-lg border border-border bg-muted/20 overflow-hidden",children:s.jsx("img",{src:r,alt:m||"Organization logo",className:"w-full h-full object-cover"})}),s.jsx("button",{type:"button",onClick:n,className:"absolute -top-2 -right-2 h-6 w-6 rounded-full bg-destructive text-destructive-foreground opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:s.jsx(_,{className:"h-3 w-3"})})]}):s.jsxs("button",{type:"button",onClick:t,className:"h-20 w-20 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent/50 transition-colors flex flex-col items-center justify-center gap-1 text-muted-foreground hover:text-foreground",children:[s.jsx(X,{className:"h-5 w-5"}),s.jsx("span",{className:"text-xs",children:"Upload"})]}),e[7]=n,e[8]=m,e[9]=r,e[10]=x):x=e[10];const z=r?"Change Logo":"Upload Logo";let h;e[11]!==z?(h=s.jsx(w,{type:"button",variant:"outline",size:"sm",onClick:t,className:"mb-2",children:z}),e[11]=z,e[12]=h):h=e[12];let f;e[13]!==n||e[14]!==r?(f=r&&s.jsx(w,{type:"button",variant:"ghost",size:"sm",onClick:n,className:"ml-2",children:"Remove"}),e[13]=n,e[14]=r,e[15]=f):f=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),e[16]=v):v=e[16];let p;e[17]!==h||e[18]!==f?(p=s.jsxs("div",{className:"flex-1",children:[h,f,v]}),e[17]=h,e[18]=f,e[19]=p):p=e[19];let b;return e[20]!==p||e[21]!==g||e[22]!==x?(b=s.jsxs("div",{className:"flex items-start gap-4",children:[g,x,p]}),e[20]=p,e[21]=g,e[22]=x,e[23]=b):b=e[23],b}function be(){const d=B(),{org:e}=Y(),r=$(),[a,m]=N.useState(!1),o=D({resolver:P(ee),values:{name:e.name??"",slug:e.slug??"",logo:e.logo??""}}),u=J({mutationFn:async t=>{const i={name:t.name,slug:t.slug};t.logo&&(i.logo=t.logo);const n=await K.organization.update({organizationId:e.id,data:i});if(n?.error)throw new Error(n.error.message||"Failed to update organization");return n},onSuccess:t=>{r.invalidateQueries({queryKey:I.organizations()}),r.invalidateQueries({queryKey:I.activeOrganization(e.slug)}),C.success("Organization settings updated successfully"),t?.data?.slug&&t.data.slug!==e.slug&&d({to:"/$org/settings",params:{org:t.data.slug}})},onError:t=>{C.error(t instanceof Error?t.message:"Failed to update organization")},onSettled:()=>{m(!1)}}),j=t=>{m(!0),u.mutate(t)},l=o.formState.isDirty;return s.jsxs(W,{children:[s.jsx(T,{title:"Settings"}),s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsx("div",{className:"p-5 max-w-2xl",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Organization"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Update your organization's name, slug, and logo."})]}),s.jsx(Z,{...o,children:s.jsxs("form",{onSubmit:o.handleSubmit(j),className:"space-y-6",children:[s.jsx(k,{control:o.control,name:"name",render:({field:t})=>s.jsxs(E,{children:[s.jsx(R,{children:"Organization Name"}),s.jsx(O,{children:s.jsx(U,{placeholder:"My Organization",...t,disabled:a})}),s.jsx(M,{})]})}),s.jsx(k,{control:o.control,name:"slug",render:({field:t})=>s.jsxs(E,{children:[s.jsx(R,{children:"Organization Slug"}),s.jsx(O,{children:s.jsx(U,{placeholder:"my-organization",...t,disabled:a,onChange:i=>{const n=i.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");t.onChange(n)}})}),s.jsx(G,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(M,{})]})}),s.jsx(k,{control:o.control,name:"logo",render:({field:t})=>s.jsxs(E,{children:[s.jsx(R,{children:"Logo"}),s.jsx(O,{children:s.jsx(se,{value:t.value,onChange:t.onChange,name:o.watch("name")})}),s.jsx(M,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(w,{type:"submit",disabled:!l||a,className:"min-w-24",children:a?"Saving...":"Save Changes"}),l&&s.jsx(w,{type:"button",variant:"outline",onClick:()=>o.reset(),disabled:a,children:"Cancel"})]})]})}),s.jsxs("div",{className:"border-t border-border pt-6 mt-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"More Settings"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Additional configuration options for your organization."})]}),s.jsx("div",{className:"mt-4",children:s.jsxs(Q,{to:"/$org/settings/plugins",params:{org:e.slug},className:"flex items-center justify-between p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors group",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(q,{className:"h-5 w-5 text-muted-foreground"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-foreground",children:"Plugins"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Enable or disable plugins for your organization"})]})]}),s.jsx(V,{className:"h-5 w-5 text-muted-foreground group-hover:text-foreground transition-colors"})]})})]})]})})})})})]})}export{be as default};
@@ -1,3 +0,0 @@
1
- import{r as w,e as et,a as W,j as n,f as te,t as B,c as h,R as tt,T as st,D as at,C as nt,P as ot,g as lt,O as it,h as rt,i as ct,k as ve,p as dt,l as mt,d as we,m as Ne,n as Z,G as ft,o as ut,S as Se,q as pt,s as ht,N as xt,v as gt,K as bt,w as ye}from"./index-B9c3bNyk.js";import{B as H,c as z}from"./button-Ta3HWdYR.js";import{P as Ce,a as _e,b as ke}from"./popover-nSqfHOuL.js";import{B as fe}from"./badge-Bv6QbUSE.js";import{i as ee}from"./Check-qyrf_w7u.js";import{n as ue}from"./Inbox01-BWl9K4GL.js";import{s as pe}from"./XClose-CnH5yMqw.js";import{E as $e}from"./error-boundary-DP1kX1Iw.js";import{i as jt}from"./File06-BOUeu2_s.js";import{i as Y}from"./X-C24Yv1HS.js";import{u as q}from"./use-mobile-Bb5jBMYm.js";import{T as Ie,a as ze,b as Oe,c as Te}from"./tooltip-Bb2oNaYJ.js";import{S as Me,i as vt,u as wt,C as A,a as Nt,b as St}from"./index-SYlc-1Tl.js";import{u as le,a as yt}from"./use-organization-settings-BksJ8-FR.js";import{u as se,L as he,P as Ct,O as _t}from"./project-context-provider-DJGvA4-w.js";import{n as kt,I as $t}from"./empty-state-CSTjcp0X.js";import{i as Ae}from"./use-virtual-mcp-CMArCljo.js";import{a as It}from"./Home02-kWTen2lJ.js";import{C as zt}from"./create-organization-dialog-dWwHUnmz.js";import{I as Ot}from"./input-Dh7sDwu6.js";import{A as K}from"./avatar-BZZ8iTNu.js";import{c as Tt}from"./Grid01-DS_Rpsaf.js";import{D as Mt,a as At,b as Pt,c as Rt,d as xe}from"./dropdown-menu-BbIA2rWH.js";import{a as Pe}from"./Copy01-EV4WWtW9.js";import{n as ge}from"./LinkExternal01-Cu4-40eG.js";import{D as Et,a as Dt,b as Lt,c as Ht,d as Ut}from"./dialog-DU-St4qJ.js";import{L as Bt}from"./form-HErbLCwX.js";import{S as Wt}from"./switch-IXdsAtvF.js";import{i as Ft}from"./Code01-B-sXoUAx.js";import{u as ie,L as re}from"./localstorage-keys-DJR10CLV.js";import{T as Vt,t as Gt}from"./typewriter-title-Dm2sjP0K.js";import{R as Re,a as Kt,b as Zt}from"./resizable-CXrT3-gZ.js";import{s as Yt}from"./Plus-DtbgAjWY.js";import"./connection-C0f0eQA8.js";import"./use-collections-BnNAdJQg.js";import"./useMutation-BYfWAlPb.js";import"./use-connection-Cpo9FQLA.js";import"./use-binding-C-jiWM_O.js";import"./binder-Co4G2PF6.js";import"./monaco-editor-9ao1STYz.js";import"./infiniteQueryObserver-DTO2dBsV.js";import"./spinner-CO1NH93o.js";import"./use-virtual-mcp-system-prompt-CeE5LXb5.js";import"./select-DEFdCmMs.js";import"./ChevronDown-D4EQGXFb.js";import"./Image01-C1Gj64FS.js";import"./SearchMd--bzHJ7AO.js";import"./use-create-virtual-mcp-B5oK5D73.js";import"./AlertCircle-CNlbeaNO.js";import"./ArrowUp-C39Etgym.js";import"./Edit01-YiEPkU0g.js";import"./Terminal-BVYBaOBz.js";import"./well-known-mcp-DOEdYmKO.js";import"./generate-id-Dyweu44Y.js";import"./Trash01-DjLKhTdL.js";import"./alert-dialog-D9F5tffK.js";import"./useQuery-CqMcSUvK.js";const Ee=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M9 7H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 7.76 3 8.04 3 8.6v10.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21H9m0 0h6m-6 0V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 3 10.04 3 10.6 3h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 3.76 15 4.04 15 4.6V21m0-10h4.4c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C21 11.76 21 12.04 21 12.6v6.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C20.24 21 19.96 21 19.4 21H15"}));Ee.displayName="BarChart10";const De=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M15 21v-5.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 14 13.96 14 13.4 14h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 14.76 9 15.04 9 15.6V21M3 7a3 3 0 0 0 6 0 3 3 0 1 0 6 0 3 3 0 1 0 6 0M6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3H6.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21Z"}));De.displayName="Building02";const Le=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M2 12h20M2 12c0 5.523 4.477 10 10 10M2 12C2 6.477 6.477 2 12 2m10 10c0 5.523-4.477 10-10 10m10-10c0-5.523-4.477-10-10-10m0 0a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10m0-20a15.3 15.3 0 0 0-4 10 15.3 15.3 0 0 0 4 10"}));Le.displayName="Globe01";const He=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));He.displayName="LayoutRight";const Ue=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m0-9H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H9"}));Ue.displayName="LogOut01";const Be=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"m2 7 8.165 5.715c.661.463.992.695 1.351.784a2 2 0 0 0 .968 0c.36-.09.69-.32 1.351-.784L22 7M6.8 20h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 17.72 22 16.88 22 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 4 18.88 4 17.2 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 20 5.12 20 6.8 20Z"}));Be.displayName="Mail01";const ce=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}),w.createElement("path",{d:"M18.727 14.727a1.5 1.5 0 0 0 .3 1.655l.055.054a1.816 1.816 0 0 1 0 2.573 1.818 1.818 0 0 1-2.573 0l-.055-.055a1.5 1.5 0 0 0-1.654-.3 1.5 1.5 0 0 0-.91 1.373v.155a1.818 1.818 0 1 1-3.636 0V20.1a1.5 1.5 0 0 0-.981-1.373 1.5 1.5 0 0 0-1.655.3l-.054.055a1.818 1.818 0 0 1-3.106-1.287 1.818 1.818 0 0 1 .533-1.286l.054-.055a1.5 1.5 0 0 0 .3-1.654 1.5 1.5 0 0 0-1.372-.91h-.155a1.818 1.818 0 1 1 0-3.636H3.9a1.5 1.5 0 0 0 1.373-.981 1.5 1.5 0 0 0-.3-1.655l-.055-.054A1.818 1.818 0 1 1 7.491 4.99l.054.054a1.5 1.5 0 0 0 1.655.3h.073a1.5 1.5 0 0 0 .909-1.372v-.155a1.818 1.818 0 0 1 3.636 0V3.9a1.499 1.499 0 0 0 .91 1.373 1.5 1.5 0 0 0 1.654-.3l.054-.055a1.817 1.817 0 0 1 2.573 0 1.819 1.819 0 0 1 0 2.573l-.055.054a1.5 1.5 0 0 0-.3 1.655v.073a1.5 1.5 0 0 0 1.373.909h.155a1.818 1.818 0 0 1 0 3.636H20.1a1.499 1.499 0 0 0-1.373.91Z"}));ce.displayName="Settings01";const We=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M22 21v-2a4.002 4.002 0 0 0-3-3.874M15.5 3.291a4.001 4.001 0 0 1 0 7.418M17 21c0-1.864 0-2.796-.305-3.53a4 4 0 0 0-2.164-2.165C13.796 15 12.864 15 11 15H8c-1.864 0-2.796 0-3.53.305a4 4 0 0 0-2.166 2.164C2 18.204 2 19.136 2 21M13.5 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));We.displayName="Users01";const Fe=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M13 2 4.093 12.688c-.348.418-.523.628-.525.804a.5.5 0 0 0 .185.397c.138.111.41.111.955.111H12l-1 8 8.907-10.688c.348-.418.523-.628.525-.804a.5.5 0 0 0-.185-.397c-.138-.111-.41-.111-.955-.111H12l1-8Z"}));Fe.displayName="Zap";function qt({invitation:t,onStatusChange:e}){const[s,a]=w.useState(!1),[o,l]=w.useState(!1),i=te(),r=async()=>{a(!0);try{const b=await W.organization.acceptInvitation({invitationId:t.id});if(b.error)B.error(b.error.message),a(!1);else{e(t.id,"accepted");const x=await W.organization.setActive({organizationId:t.organizationId});x?.data?.slug?(B.success("Invitation accepted!"),i({to:"/$org",params:{org:x.data.slug}})):(B.success("Invitation accepted! Redirecting..."),i({to:"/"}))}}catch{B.error("Failed to accept invitation"),a(!1)}},c=async()=>{l(!0);try{const b=await W.organization.rejectInvitation({invitationId:t.id});b.error?(B.error(b.error.message),l(!1)):(B.success("Invitation rejected"),e(t.id,"rejected"),l(!1))}catch{B.error("Failed to reject invitation"),l(!1)}},d=t.organizationName||t.organizationId,m=t.status==="pending",f=t.status==="accepted",u=t.status==="rejected";return n.jsxs("div",{className:z("flex items-center gap-3 px-3 py-2 h-12 border-b border-border/50 last:border-b-0",!m&&"opacity-50"),children:[n.jsx("div",{className:"shrink-0 size-5 flex items-center justify-center",children:n.jsx(Be,{size:16,className:"text-muted-foreground"})}),n.jsxs("p",{className:"flex-1 text-sm text-foreground min-w-0 whitespace-nowrap overflow-hidden",children:["You have been invited to ",n.jsx("span",{className:"font-semibold inline-block max-w-[200px] truncate align-bottom",children:d})]}),n.jsx("div",{className:"flex items-center gap-1 shrink-0",children:m?n.jsxs(n.Fragment,{children:[n.jsx(H,{variant:"ghost",size:"icon",onClick:c,disabled:s||o,className:"h-8 w-8",children:n.jsx(pe,{size:14})}),n.jsx(H,{variant:"outline",size:"icon",onClick:r,disabled:s||o,className:"h-8 w-8",children:n.jsx(ee,{size:14})})]}):f?n.jsxs(fe,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(ee,{size:12}),"Accepted"]}):u?n.jsxs(fe,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(pe,{size:12}),"Declined"]}):null})]})}function Jt(){const[t,e]=w.useState(!1),s=w.useContext(et),{data:a}=s.hooks.useListUserInvitations(),{data:o}=W.useListOrganizations(),[l,i]=w.useState({}),m=(a??[]).filter(p=>new Date(p.expiresAt)>new Date).map(p=>{const g=(o??[]).find(j=>j.id===p.organizationId);return{...p,organizationSlug:g?.slug||p.organizationSlug,organizationName:g?.name||p.organizationName}}).map(p=>({...p,status:l[p.id]||p.status})),f=[...m].sort((p,g)=>{const j={pending:0,accepted:1,rejected:2};return(j[p.status]??999)-(j[g.status]??999)}),b=m.filter(p=>p.status==="pending").length>0,x=(p,g)=>{i(j=>({...j,[p]:g}))};return n.jsxs(Ce,{open:t,onOpenChange:e,children:[n.jsx(_e,{asChild:!0,children:n.jsxs(H,{variant:"ghost",size:"sm",className:"relative h-7 w-7 p-0","aria-label":"Inbox",children:[n.jsx(ue,{size:18,className:"text-muted-foreground"}),b&&n.jsx("span",{className:"absolute bottom-1 right-0.5 h-2 w-2 rounded-full bg-destructive ring-2 ring-background"})]})}),n.jsxs(ke,{align:"end",className:"w-[480px] p-0 overflow-hidden",children:[n.jsx("div",{className:"px-4 py-3 border-b border-border",children:n.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Inbox"})}),n.jsx("div",{className:"max-h-96 overflow-auto",children:f.length>0?f.map(p=>n.jsx(qt,{invitation:p,onStatusChange:x},p.id)):n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[n.jsx(ue,{size:32,className:"text-muted-foreground/40 mb-2"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"No invitations at the moment"})]})})]})]})}function Xt(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(tt,{"data-slot":"sheet",...s}),e[2]=s,e[3]=a):a=e[3],a}function Qt(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(ot,{"data-slot":"sheet-portal",...s}),e[2]=s,e[3]=a):a=e[3],a}function es(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=z("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx(it,{"data-slot":"sheet-overlay",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function ts(t){const e=h.c(17);let s,a,o,l;e[0]!==t?({className:a,children:s,side:l,...o}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=l):(s=e[1],a=e[2],o=e[3],l=e[4]);const i=l===void 0?"right":l;let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(es,{}),e[5]=r):r=e[5];const c=i==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",d=i==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",m=i==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",f=i==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let u;e[6]!==a||e[7]!==c||e[8]!==d||e[9]!==m||e[10]!==f?(u=z("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",c,d,m,f,a),e[6]=a,e[7]=c,e[8]=d,e[9]=m,e[10]=f,e[11]=u):u=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsxs(lt,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[n.jsx(Y,{className:"size-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=b):b=e[12];let x;return e[13]!==s||e[14]!==o||e[15]!==u?(x=n.jsxs(Qt,{children:[r,n.jsxs(nt,{"data-slot":"sheet-content",className:u,...o,children:[s,b]})]}),e[13]=s,e[14]=o,e[15]=u,e[16]=x):x=e[16],x}function ss(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=z("flex flex-col gap-1.5 p-4",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx("div",{"data-slot":"sheet-header",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function as(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=z("text-foreground font-semibold",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx(st,{"data-slot":"sheet-title",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function ns(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=z("text-muted-foreground text-sm",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx(at,{"data-slot":"sheet-description",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}const os="sidebar_state",ls=3600*24*7,is="16rem",rs="18rem",cs="3rem",ds="b",Ve=w.createContext(null);function de(){const t=w.useContext(Ve);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function ms(t){const e=h.c(21),{defaultOpen:s,open:a,onOpenChange:o,children:l}=t,i=s===void 0?!0:s,r=q(),[c,d]=w.useState(!1),[m,f]=w.useState(i),u=a??m;let b;e[0]!==u||e[1]!==o?(b=$=>{const S=typeof $=="function"?$(u):$;o?o(S):f(S),document.cookie=`${os}=${S}; path=/; max-age=${ls}`},e[0]=u,e[1]=o,e[2]=b):b=e[2];const x=b;let p;e[3]!==r||e[4]!==x?(p=()=>r?d(us):x(fs),e[3]=r,e[4]=x,e[5]=p):p=e[5];const g=p;let j,v;e[6]!==g?(j=()=>{const $=S=>{if(S.key===ds&&(S.metaKey||S.ctrlKey)){const I=S.target;if(I.tagName==="INPUT"||I.tagName==="TEXTAREA"||I.isContentEditable)return;S.preventDefault(),g()}};return globalThis.addEventListener("keydown",$),()=>globalThis.removeEventListener("keydown",$)},v=[g],e[6]=g,e[7]=j,e[8]=v):(j=e[7],v=e[8]),w.useEffect(j,v);const N=u?"expanded":"collapsed";let _;e[9]!==r||e[10]!==u||e[11]!==c||e[12]!==x||e[13]!==N||e[14]!==g?(_={state:N,open:u,setOpen:x,isMobile:r,openMobile:c,setOpenMobile:d,toggleSidebar:g},e[9]=r,e[10]=u,e[11]=c,e[12]=x,e[13]=N,e[14]=g,e[15]=_):_=e[15];const y=_;let k;e[16]!==l?(k=n.jsx(ze,{delayDuration:0,children:l}),e[16]=l,e[17]=k):k=e[17];let C;return e[18]!==y||e[19]!==k?(C=n.jsx(Ve.Provider,{value:y,children:k}),e[18]=y,e[19]=k,e[20]=C):C=e[20],C}function fs(t){return!t}function us(t){return!t}function ps(t){const e=h.c(14);let s,a,o,l;e[0]!==t?({className:a,style:l,children:s,...o}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=l):(s=e[1],a=e[2],o=e[3],l=e[4]);let i;e[5]!==l?(i={"--sidebar-width":is,"--sidebar-width-icon":cs,...l},e[5]=l,e[6]=i):i=e[6];const r=i;let c;e[7]!==a?(c=z("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",a),e[7]=a,e[8]=c):c=e[8];let d;return e[9]!==s||e[10]!==o||e[11]!==r||e[12]!==c?(d=n.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:c,...o,children:s}),e[9]=s,e[10]=o,e[11]=r,e[12]=c,e[13]=d):d=e[13],d}function hs(t){const e=h.c(46);let s,a,o,l,i,r;e[0]!==t?({side:l,variant:i,collapsible:r,className:a,children:s,...o}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=l,e[5]=i,e[6]=r):(s=e[1],a=e[2],o=e[3],l=e[4],i=e[5],r=e[6]);const c=l===void 0?"left":l,d=i===void 0?"sidebar":i,m=r===void 0?"offcanvas":r,{isMobile:f,state:u,openMobile:b,setOpenMobile:x}=de();if(m==="none"){let S;e[7]!==a?(S=z("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",a),e[7]=a,e[8]=S):S=e[8];let I;return e[9]!==s||e[10]!==o||e[11]!==S?(I=n.jsx("div",{"data-slot":"sidebar",className:S,...o,children:s}),e[9]=s,e[10]=o,e[11]=S,e[12]=I):I=e[12],I}if(f){let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S={"--sidebar-width":rs},e[13]=S):S=e[13];let I;e[14]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsxs(ss,{className:"sr-only",children:[n.jsx(as,{children:"Sidebar"}),n.jsx(ns,{children:"Displays the mobile sidebar."})]}),e[14]=I):I=e[14];let O;e[15]!==s?(O=n.jsx("div",{className:"flex h-full w-full flex-col",children:s}),e[15]=s,e[16]=O):O=e[16];let T;e[17]!==c||e[18]!==O?(T=n.jsxs(ts,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:S,side:c,children:[I,O]}),e[17]=c,e[18]=O,e[19]=T):T=e[19];let M;return e[20]!==b||e[21]!==o||e[22]!==x||e[23]!==T?(M=n.jsx(Xt,{open:b,onOpenChange:x,...o,children:T}),e[20]=b,e[21]=o,e[22]=x,e[23]=T,e[24]=M):M=e[24],M}const p=u==="collapsed"?m:"",g=d==="floating"||d==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let j;e[25]!==g?(j=z("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",g),e[25]=g,e[26]=j):j=e[26];let v;e[27]!==j?(v=n.jsx("div",{"data-slot":"sidebar-gap",className:j}),e[27]=j,e[28]=v):v=e[28];const N=c==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",_=d==="floating"||d==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let y;e[29]!==a||e[30]!==N||e[31]!==_?(y=z("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",N,_,a),e[29]=a,e[30]=N,e[31]=_,e[32]=y):y=e[32];let k;e[33]!==s?(k=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border py-2 flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:s}),e[33]=s,e[34]=k):k=e[34];let C;e[35]!==o||e[36]!==y||e[37]!==k?(C=n.jsx("div",{"data-slot":"sidebar-container",className:y,...o,children:k}),e[35]=o,e[36]=y,e[37]=k,e[38]=C):C=e[38];let $;return e[39]!==c||e[40]!==u||e[41]!==C||e[42]!==p||e[43]!==v||e[44]!==d?($=n.jsxs("div",{className:"group peer text-foreground hidden md:block border-r","data-state":u,"data-collapsible":p,"data-variant":d,"data-side":c,"data-slot":"sidebar",children:[v,C]}),e[39]=c,e[40]=u,e[41]=C,e[42]=p,e[43]=v,e[44]=d,e[45]=$):$=e[45],$}function xs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=z("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx("main",{"data-slot":"sidebar-inset",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function gs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=z("h-4 m-0! w-full",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx("div",{"data-sidebar":"separator",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function bs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=z("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function js(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=z("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function vs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=z("w-full text-sm",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function ws(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=z("flex w-full min-w-0 flex-col gap-1",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function ae(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=z("group/menu-item relative",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}const Ns=ct("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg px-2 py-1.5 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding,colors] transition-colors duration-150 ease-out hover:transition-none focus-visible:ring-2 active:bg-sidebar-accent/75 disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent/75 [&>span:last-child]:truncate [&>svg]:size-[18px] [&>svg]:shrink-0 [&>svg]:text-muted-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent text-sidebar-foreground/80 active:text-sidebar-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-7 text-sm font-[450]",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ge(t){const e=h.c(28);let s,a,o,l,i,r,c;e[0]!==t?({asChild:o,isActive:l,variant:i,size:r,tooltip:c,className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=l,e[5]=i,e[6]=r,e[7]=c):(s=e[1],a=e[2],o=e[3],l=e[4],i=e[5],r=e[6],c=e[7]);const d=o===void 0?!1:o,m=l===void 0?!1:l,f=i===void 0?"default":i,u=r===void 0?"default":r,b=d?rt:"button",{isMobile:x,state:p}=de();let g;e[8]!==s||e[9]!==u||e[10]!==f?(g=z(Ns({variant:f,size:u}),s),e[8]=s,e[9]=u,e[10]=f,e[11]=g):g=e[11];let j;e[12]!==b||e[13]!==m||e[14]!==a||e[15]!==u||e[16]!==g?(j=n.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":m,className:g,...a}),e[12]=b,e[13]=m,e[14]=a,e[15]=u,e[16]=g,e[17]=j):j=e[17];const v=j;if(!c)return v;if(typeof c=="string"){let C;e[18]!==c?(C={children:c},e[18]=c,e[19]=C):C=e[19],c=C}let N;e[20]!==v?(N=n.jsx(Oe,{asChild:!0,children:v}),e[20]=v,e[21]=N):N=e[21];const _=p!=="collapsed"||x;let y;e[22]!==_||e[23]!==c?(y=n.jsx(Ie,{side:"right",align:"center",hidden:_,...c}),e[22]=_,e[23]=c,e[24]=y):y=e[24];let k;return e[25]!==N||e[26]!==y?(k=n.jsxs(Te,{children:[N,y]}),e[25]=N,e[26]=y,e[27]=k):k=e[27],k}function Ss(t){const e=h.c(26),{item:s}=t,a=te(),{org:o}=se(),l=le(o.id),i=yt(o.id);let r;e[0]!==i.update||e[1]!==s.url||e[2]!==l?.sidebar_items?(r=async()=>{const _=(l?.sidebar_items||[]).filter(y=>y.url!==s.url);await i.update.mutateAsync({sidebar_items:_})},e[0]=i.update,e[1]=s.url,e[2]=l?.sidebar_items,e[3]=r):r=e[3];const c=r;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=/^https?:\/\/.+/,e[4]=d):d=e[4];let m;e[5]!==s.icon?(m=d.test(s.icon),e[5]=s.icon,e[6]=m):m=e[6];const f=m;let u;e[7]!==s.url||e[8]!==a?(u=()=>{a({to:s.url})},e[7]=s.url,e[8]=a,e[9]=u):u=e[9];const b=s.title;let x;e[10]!==f||e[11]!==s.icon||e[12]!==s.title?(x=n.jsx("div",{className:"flex items-center justify-center shrink-0",children:f?n.jsx("img",{src:s.icon,alt:s.title,className:"h-4 w-4 rounded object-cover"}):n.jsx(jt,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=f,e[11]=s.icon,e[12]=s.title,e[13]=x):x=e[13];let p;e[14]!==s.title?(p=s.title.toLocaleLowerCase(),e[14]=s.title,e[15]=p):p=e[15];let g;e[16]!==p?(g=n.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:n.jsx("span",{className:"truncate text-sm w-full capitalize",children:p})}),e[16]=p,e[17]=g):g=e[17];let j;e[18]!==c?(j=n.jsx(Y,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:N=>{N.preventDefault(),N.stopPropagation(),c()}}),e[18]=c,e[19]=j):j=e[19];let v;return e[20]!==s.title||e[21]!==u||e[22]!==x||e[23]!==g||e[24]!==j?(v=n.jsx(ae,{children:n.jsxs(Ge,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:u,tooltip:b,children:[x,g,j]})}),e[20]=s.title,e[21]=u,e[22]=x,e[23]=g,e[24]=j,e[25]=v):v=e[25],v}function ys(){const t=h.c(4),{org:e}=se(),a=le(e.id)?.sidebar_items;if(!a?.length)return null;let o;t[0]!==a?(o=a.map(Cs),t[0]=a,t[1]=o):o=t[1];let l;return t[2]!==o?(l=n.jsx(Ke,{children:o}),t[2]=o,t[3]=l):l=t[3],l}function Cs(t){return n.jsx(Ss,{item:t},t.url)}function be(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(ae,{children:n.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:n.jsx(Me,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function Ke(t){const e=h.c(4),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(gs,{className:"my-2 -ml-1"}),e[0]=a):a=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(ae,{children:n.jsx("div",{className:"group-data-[collapsible=icon]:hidden px-2 py-0 text-xs font-medium h-6 text-muted-foreground flex items-center justify-between",children:n.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=o):o=e[1];let l;return e[2]!==s?(l=n.jsxs(n.Fragment,{children:[a,o,s]}),e[2]=s,e[3]=l):l=e[3],l}function _s(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(w.Suspense,{fallback:n.jsxs(Ke,{children:[n.jsx(be,{}),n.jsx(be,{})]}),children:n.jsx(ys,{})}),t[0]=e):e=t[0],e}function ks(){const t=h.c(14),{locator:e,org:s}=se(),a=te(),o=ve(),{org:l}=he.parse(e);let i;t[0]!==e?(i=he.isOrgAdminProject(e),t[0]=e,t[1]=i):i=t[1];const r=i,c=le(s.id);let d;t[2]!==c?.enabled_plugins?(d=c?.enabled_plugins??[],t[2]=c?.enabled_plugins,t[3]=d):d=t[3];const m=d;let f;t[4]!==m?(f=C=>m.includes(C.pluginId),t[4]=m,t[5]=f):f=t[5];const u=dt.filter(f),b=o.location.pathname===`/${l}`||o.location.pathname===`/${l}/`;let x;t[6]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(It,{}),t[6]=x):x=t[6];let p;t[7]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(De,{}),t[7]=p):p=t[7];let g;t[8]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(kt,{}),t[8]=g):g=t[8];let j;t[9]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(Ae,{}),t[9]=j):j=t[9];let v;t[10]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Fe,{}),t[10]=v):v=t[10];let N;t[11]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(Ee,{}),t[11]=N):N=t[11];let _;t[12]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(We,{}),t[12]=_):_=t[12];let y;t[13]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(ce,{}),t[13]=y):y=t[13];const k=[{key:"home",label:"Home",icon:x,onClick:()=>{b?window.dispatchEvent(new CustomEvent("reset-home-view")):a({to:"/$org",params:{org:l}})}},{key:"store",label:"Store",icon:p,onClick:()=>a({to:"/$org/store",params:{org:l}})},...u.map(C=>({key:C.pluginId,label:C.label,icon:C.icon,onClick:()=>a({to:"/$org/$pluginId",params:{org:l,pluginId:C.pluginId}})})),{key:"mcps",label:"Connections",icon:g,onClick:()=>a({to:"/$org/mcps",params:{org:l}})},{key:"agents",label:"Agents",icon:j,onClick:()=>a({to:"/$org/agents",params:{org:l}})},{key:"workflow",label:"Workflows",icon:v,onClick:()=>a({to:"/$org/workflows",params:{org:l}})},{key:"monitoring",label:"Monitoring",icon:N,onClick:()=>a({to:"/$org/monitoring",params:{org:l}})},{key:"members",label:"Members",icon:_,onClick:()=>a({to:"/$org/members",params:{org:l}})},{key:"settings",label:"Settings",icon:y,onClick:()=>a({to:"/$org/settings",params:{org:l}})}];return r?k:[]}function Ze(t){const e=h.c(10),{navigationItems:s,footer:a,additionalContent:o,variant:l,collapsible:i}=t,r=l===void 0?"sidebar":l,c=i===void 0?"icon":i;let d;e[0]!==s?(d=s.map($s),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==o||e[3]!==d?(m=n.jsx(bs,{className:"flex-1 overflow-x-hidden",children:n.jsx(js,{className:"font-medium",children:n.jsx(vs,{children:n.jsxs(ws,{className:"gap-0.5",children:[d,o]})})})}),e[2]=o,e[3]=d,e[4]=m):m=e[4];let f;return e[5]!==c||e[6]!==a||e[7]!==m||e[8]!==r?(f=n.jsxs(hs,{variant:r,collapsible:c,children:[m,a]}),e[5]=c,e[6]=a,e[7]=m,e[8]=r,e[9]=f):f=e[9],f}function $s(t){return n.jsx(ae,{children:n.jsxs(Ge,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:t.onClick,isActive:t.isActive,tooltip:t.label,children:[n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:t.icon}),n.jsx("span",{className:"truncate",children:t.label})]})},t.key)}Ze.Skeleton=function(){return n.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,s)=>n.jsx("div",{className:"w-full h-8",children:n.jsx(Me,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};function Is(){const t=h.c(3),e=ks();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(n.Fragment,{children:n.jsx($e,{children:n.jsx(w.Suspense,{fallback:null,children:n.jsx(_s,{})})})}),t[0]=s):s=t[0];let a;return t[1]!==e?(a=n.jsx(Ze,{navigationItems:e,additionalContent:s}),t[1]=e,t[2]=a):a=t[2],a}function zs(t){const e=h.c(12);let s,a,o,l;e[0]!==t?({className:s,orientation:o,decorative:l,...a}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=l):(s=e[1],a=e[2],o=e[3],l=e[4]);const i=o===void 0?"horizontal":o,r=l===void 0?!0:l;let c;e[5]!==s?(c=z("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",s),e[5]=s,e[6]=c):c=e[6];let d;return e[7]!==r||e[8]!==i||e[9]!==a||e[10]!==c?(d=n.jsx(mt,{"data-slot":"separator-root",decorative:r,orientation:i,className:c,...a}),e[7]=r,e[8]=i,e[9]=a,e[10]=c,e[11]=d):d=e[11],d}const Ye=w.createContext(null);function Os(){const t=w.useContext(Ye);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function Ts(t){const e=h.c(10),{children:s,onItemHover:a}=t,[o,l]=w.useState(null);let i;e[0]!==a?(i=f=>{l(f),a?.(f)},e[0]=a,e[1]=i):i=e[1];const r=i;let c;e[2]!==o||e[3]!==r?(c={hoveredItem:o,setHoveredItem:r},e[2]=o,e[3]=r,e[4]=c):c=e[4];let d;e[5]!==s?(d=n.jsx(Ce,{children:s}),e[5]=s,e[6]=d):d=e[6];let m;return e[7]!==c||e[8]!==d?(m=n.jsx(Ye.Provider,{value:c,children:d}),e[7]=c,e[8]=d,e[9]=m):m=e[9],m}function Ms(t){const e=h.c(6),{children:s,onClick:a}=t;let o;e[0]!==s||e[1]!==a?(o=n.jsx(H,{variant:"link",className:"p-0.5 h-auto",onClick:a,type:"button",children:s}),e[0]=s,e[1]=a,e[2]=o):o=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(_e,{asChild:!0,children:n.jsx(H,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:n.jsx(vt,{size:16,className:"opacity-50"})})}),e[3]=l):l=e[3];let i;return e[4]!==o?(i=n.jsxs("div",{className:"flex items-center gap-1",children:[o,l]}),e[4]=o,e[5]=i):i=e[5],i}function As(t){const e=h.c(8),{item:s,fallback:a}=t,o=a===void 0?"":a,l=s?.avatarUrl??"",i=s?.name??o;let r;e[0]!==l||e[1]!==i?(r=n.jsx(K,{url:l,fallback:i,size:"xs",objectFit:"contain"}),e[0]=l,e[1]=i,e[2]=r):r=e[2];const c=s?.name??o;let d;e[3]!==c?(d=n.jsx("span",{children:c}),e[3]=c,e[4]=d):d=e[4];let m;return e[5]!==r||e[6]!==d?(m=n.jsxs("div",{className:"flex items-center gap-2",children:[r,d]}),e[5]=r,e[6]=d,e[7]=m):m=e[7],m}function Ps(t){const e=h.c(6),{children:s,align:a}=t,o=a===void 0?"start":a,i=w.Children.toArray(s).filter(Rs).length===1?"280px":"480px";let r;e[0]!==i?(r={width:i},e[0]=i,e[1]=r):r=e[1];let c;return e[2]!==o||e[3]!==s||e[4]!==r?(c=n.jsx(ke,{align:o,className:"p-0 flex items-start",style:r,children:s}),e[2]=o,e[3]=s,e[4]=r,e[5]=c):c=e[5],c}function Rs(t){return w.isValidElement(t)&&(t.type===Je||t.type===qe)}function qe(t){const e=h.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=z("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",a),e[0]=a,e[1]=o):o=e[1];let l;return e[2]!==s||e[3]!==o?(l=n.jsx("div",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=l):l=e[4],l}const Je=qe;function Es(t){const e=h.c(6),{placeholder:s,value:a,onChange:o}=t,l=s===void 0?"Search...":s;let i;e[0]!==o?(i=c=>o(c.target.value),e[0]=o,e[1]=i):i=e[1];let r;return e[2]!==l||e[3]!==i||e[4]!==a?(r=n.jsx(Ot,{placeholder:l,value:a,onChange:i,className:"rounded-none border-t-0 border-x-0 focus-visible:border-border focus-visible:ring-0"}),e[2]=l,e[3]=i,e[4]=a,e[5]=r):r=e[5],r}function Ds(t){const e=h.c(6),{children:s,emptyMessage:a}=t,o=a===void 0?"No items found.":a,l=w.Children.count(s)>0;let i;e[0]!==o||e[1]!==l?(i=!l&&n.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:o}),e[0]=o,e[1]=l,e[2]=i):i=e[2];let r;return e[3]!==s||e[4]!==i?(r=n.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[i,s]}),e[3]=s,e[4]=i,e[5]=r):r=e[5],r}function Ls(t){const e=h.c(15),{item:s,onClick:a,onHover:o,children:l}=t,i=Os();let r;e[0]!==i||e[1]!==s||e[2]!==o?(r=()=>{i.setHoveredItem(s.slug),o?.(s)},e[0]=i,e[1]=s,e[2]=o,e[3]=r):r=e[3];const c=r;let d;e[4]!==s||e[5]!==a?(d=()=>a(s),e[4]=s,e[5]=a,e[6]=d):d=e[6];let m;e[7]!==l||e[8]!==s.avatarUrl||e[9]!==s.name?(m=l||n.jsxs(n.Fragment,{children:[n.jsx(K,{url:s.avatarUrl??"",fallback:s.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),n.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:s.name})]}),e[7]=l,e[8]=s.avatarUrl,e[9]=s.name,e[10]=m):m=e[10];let f;return e[11]!==c||e[12]!==d||e[13]!==m?(f=n.jsx(H,{onClick:d,onMouseEnter:c,variant:"ghost",size:"sm",className:"w-full justify-start font-normal",children:m}),e[11]=c,e[12]=d,e[13]=m,e[14]=f):f=e[14],f}function Hs(t){const e=h.c(2),{children:s}=t;let a;return e[0]!==s?(a=n.jsx("div",{className:"px-1 pb-1 pt-0.5",children:s}),e[0]=s,e[1]=a):a=e[1],a}function Us(t){const e=h.c(11),{onClick:s,icon:a,children:o,variant:l}=t,r=(l===void 0?"default":l)==="muted"&&"text-muted-foreground";let c;e[0]!==r?(c=z("w-full justify-start font-normal",r),e[0]=r,e[1]=c):c=e[1];let d;e[2]!==a?(d=a&&n.jsx("span",{className:"[&>svg]:size-4",children:a}),e[2]=a,e[3]=d):d=e[3];let m;e[4]!==o?(m=n.jsx("span",{children:o}),e[4]=o,e[5]=m):m=e[5];let f;return e[6]!==s||e[7]!==c||e[8]!==d||e[9]!==m?(f=n.jsxs(H,{variant:"ghost",size:"sm",className:c,onClick:s,children:[d,m]}),e[6]=s,e[7]=c,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}function Bs(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(zs,{}),t[0]=e):e=t[0],e}function Ws(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const R=Object.assign(Ts,{Trigger:Ms,CurrentItem:As,Content:Ps,Panel:Je,Search:Es,Items:Ds,Item:Ls,Actions:Hs,Action:Us,Separator:Bs,Skeleton:Ws});function oe(){const t=h.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=we(e),{data:a}=W.useListOrganizations(),o=te();let l;t[1]!==s||t[2]!==a?(l=a?.find(P=>P.slug===s),t[1]=s,t[2]=a,t[3]=l):l=t[3];const i=l,[r,c]=w.useState(""),[d,m]=w.useState(!1);let f,u,b,x,p,g,j,v;if(t[4]!==i||t[5]!==o||t[6]!==s||t[7]!==r||t[8]!==a){const E=(a?(()=>{const U=a.filter(F=>F.name.toLowerCase().includes(r.toLowerCase()));if(s){const F=U.findIndex(X=>X.slug===s);if(F>0){const X=U[F];X&&(U.splice(F,1),U.unshift(X))}}return U})():[]).map(Fs);let D;t[17]!==i?(D=i?{slug:i.slug,name:i.name,avatarUrl:i.logo}:void 0,t[17]=i,t[18]=D):D=t[18];const ne=D;x=R;let V;t[19]!==o||t[20]!==s?(V=()=>o({to:"/$org",params:{org:s??""}}),t[19]=o,t[20]=s,t[21]=V):V=t[21];let G;t[22]!==ne?(G=n.jsx(R.CurrentItem,{item:ne}),t[22]=ne,t[23]=G):G=t[23],t[24]!==V||t[25]!==G?(v=n.jsx(R.Trigger,{onClick:V,children:G}),t[24]=V,t[25]=G,t[26]=v):v=t[26],b=R.Content,u=R.Panel,t[27]!==r?(j=n.jsx(R.Search,{placeholder:"Search organizations...",value:r,onChange:c}),t[27]=r,t[28]=j):j=t[28],f=R.Items,p="No organizations found.";let J;t[29]!==o?(J=U=>n.jsx(R.Item,{item:U,onClick:F=>o({to:"/$org",params:{org:F.slug}})},U.slug),t[29]=o,t[30]=J):J=t[30],g=E.map(J),t[4]=i,t[5]=o,t[6]=s,t[7]=r,t[8]=a,t[9]=f,t[10]=u,t[11]=b,t[12]=x,t[13]=p,t[14]=g,t[15]=j,t[16]=v}else f=t[9],u=t[10],b=t[11],x=t[12],p=t[13],g=t[14],j=t[15],v=t[16];let N;t[31]!==f||t[32]!==p||t[33]!==g?(N=n.jsx(f,{emptyMessage:p,children:g}),t[31]=f,t[32]=p,t[33]=g,t[34]=N):N=t[34];let _,y;t[35]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(R.Actions,{children:n.jsx(R.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),y=n.jsx(R.Separator,{}),t[35]=_,t[36]=y):(_=t[35],y=t[36]);let k;t[37]!==o?(k=()=>o({to:"/"}),t[37]=o,t[38]=k):k=t[38];let C;t[39]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(Tt,{}),t[39]=C):C=t[39];let $;t[40]!==k?($=n.jsx(R.Actions,{children:n.jsx(R.Action,{onClick:k,icon:C,children:"See all organizations"})}),t[40]=k,t[41]=$):$=t[41];let S;t[42]!==u||t[43]!==$||t[44]!==j||t[45]!==N?(S=n.jsxs(u,{children:[j,N,_,y,$]}),t[42]=u,t[43]=$,t[44]=j,t[45]=N,t[46]=S):S=t[46];let I;t[47]!==b||t[48]!==S?(I=n.jsx(b,{children:S}),t[47]=b,t[48]=S,t[49]=I):I=t[49];let O;t[50]!==x||t[51]!==I||t[52]!==v?(O=n.jsxs(x,{children:[v,I]}),t[50]=x,t[51]=I,t[52]=v,t[53]=O):O=t[53];let T;t[54]!==d?(T=n.jsx(zt,{open:d,onOpenChange:m}),t[54]=d,t[55]=T):T=t[55];let M;return t[56]!==O||t[57]!==T?(M=n.jsxs(n.Fragment,{children:[O,T]}),t[56]=O,t[57]=T,t[58]=M):M=t[58],M}function Fs(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}oe.Skeleton=R.Skeleton;function Vs({prop:t,defaultProp:e,onChange:s=()=>{}}){const[a,o]=Gs({defaultProp:e,onChange:s}),l=t!==void 0,i=l?t:a,r=Ne(s),c=w.useCallback(d=>{if(l){const f=typeof d=="function"?d(t):d;f!==t&&r(f)}else o(d)},[l,t,o,r]);return[i,c]}function Gs({defaultProp:t,onChange:e}){const s=w.useState(t),[a]=s,o=w.useRef(a),l=Ne(e);return w.useEffect(()=>{o.current!==a&&(l(a),o.current=a)},[a,o,l]),s}function Ks(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(Z.Root,{"data-slot":"drawer",...s}),e[2]=s,e[3]=a):a=e[3],a}function Zs(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(Z.Trigger,{"data-slot":"drawer-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Ys(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx(Z.Portal,{"data-slot":"drawer-portal",...s}),e[2]=s,e[3]=a):a=e[3],a}function qs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=z("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx(Z.Overlay,{"data-slot":"drawer-overlay",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function Js(t){const e=h.c(12);let s,a,o;e[0]!==t?({className:a,children:s,...o}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o):(s=e[1],a=e[2],o=e[3]);let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(qs,{}),e[4]=l):l=e[4];let i;e[5]!==a?(i=z("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=i):i=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=r):r=e[7];let c;return e[8]!==s||e[9]!==o||e[10]!==i?(c=n.jsxs(Ys,{"data-slot":"drawer-portal",children:[l,n.jsxs(Z.Content,{"data-slot":"drawer-content",className:i,...o,children:[r,s]})]}),e[8]=s,e[9]=o,e[10]=i,e[11]=c):c=e[11],c}function Xs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=z("flex flex-col gap-1.5 px-4 py-2",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx("div",{"data-slot":"drawer-header",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}function Qs(t){const e=h.c(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let o;e[3]!==s?(o=z("text-foreground font-semibold",s),e[3]=s,e[4]=o):o=e[4];let l;return e[5]!==a||e[6]!==o?(l=n.jsx(Z.Title,{"data-slot":"drawer-title",className:o,...a}),e[5]=a,e[6]=o,e[7]=l):l=e[7],l}const Xe=w.createContext({setOpen:()=>{}}),ea=()=>w.useContext(Xe),ta=t=>{const e=h.c(25);let s,a,o,l,i;e[0]!==t?({children:s,defaultOpen:a,open:l,onOpenChange:o,...i}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=o,e[4]=l,e[5]=i):(s=e[1],a=e[2],o=e[3],l=e[4],i=e[5]);const r=a??!1;let c;e[6]!==o||e[7]!==l||e[8]!==r?(c={prop:l,defaultProp:r,onChange:o},e[6]=o,e[7]=l,e[8]=r,e[9]=c):c=e[9];const[d,m]=Vs(c);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let u;e[12]!==s||e[13]!==d||e[14]!==i||e[15]!==m?(u=n.jsx(Ks,{open:d,onOpenChange:m,...i,children:s}),e[12]=s,e[13]=d,e[14]=i,e[15]=m,e[16]=u):u=e[16];let b;e[17]!==d||e[18]!==i||e[19]!==m||e[20]!==u?(b=n.jsx(Pt,{open:d,onOpenChange:m,...i,children:u}),e[17]=d,e[18]=i,e[19]=m,e[20]=u,e[21]=b):b=e[21];let x;return e[22]!==f||e[23]!==b?(x=n.jsx(Xe.Provider,{value:f,children:b}),e[22]=f,e[23]=b,e[24]=x):x=e[24],x},sa=t=>{const{children:e,title:s,...a}=t,o=q(),{className:l,...i}=a;return o?n.jsxs(Js,{...i,children:[n.jsx(Xs,{className:"hidden",children:n.jsx(Qs,{children:s})}),n.jsx("div",{className:z("flex flex-col gap-2 p-2 py-4",l),children:e})]}):n.jsx(At,{...a,children:e})},aa=t=>{const{children:e,...s}=t,{setOpen:a}=ea(),o=q(),{className:l,...i}=s;return o?n.jsx("div",{...i,onClick:r=>{a(!1);const{onClick:c}=i;c?.(r)},className:z("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",l),children:e}):n.jsx(Rt,{...s,children:e})},na=t=>{const e=h.c(7);let s,a;e[0]!==t?({children:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);const o=q();let l;return e[3]!==s||e[4]!==o||e[5]!==a?(l=o?n.jsx(Zs,{asChild:!0,children:s}):n.jsx(Mt,{...a,children:s}),e[3]=s,e[4]=o,e[5]=a,e[6]=l):l=e[6],l},oa=t=>{const e=h.c(7);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);const o=q();let l;return e[3]!==s||e[4]!==o||e[5]!==a?(l=o?n.jsx(xe,{className:z(s),...a}):n.jsx(xe,{className:z(s),...a}),e[3]=s,e[4]=o,e[5]=a,e[6]=l):l=e[6],l};function la(t){const e=h.c(11),{user:s,trigger:a,align:o,children:l}=t,i=o===void 0?"start":o;let r;e[0]!==a||e[1]!==s?(r=a(s),e[0]=a,e[1]=s,e[2]=r):r=e[2];let c;e[3]!==r?(c=n.jsx(na,{asChild:!0,children:n.jsx("div",{children:r})}),e[3]=r,e[4]=c):c=e[4];let d;e[5]!==i||e[6]!==l?(d=n.jsx(sa,{side:"top",align:i,className:"md:w-[240px]",children:l}),e[5]=i,e[6]=l,e[7]=d):d=e[7];let m;return e[8]!==c||e[9]!==d?(m=n.jsxs(ta,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=m):m=e[10],m}function ia(t){const e=h.c(8),{children:s,onClick:a,className:o,asChild:l}=t;let i;e[0]!==l||e[1]!==s||e[2]!==a?(i=l?s:n.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:a,children:s}),e[0]=l,e[1]=s,e[2]=a,e[3]=i):i=e[3];let r;return e[4]!==l||e[5]!==o||e[6]!==i?(r=n.jsx(aa,{asChild:l,className:o,children:i}),e[4]=l,e[5]=o,e[6]=i,e[7]=r):r=e[7],r}function ra(t){const e=h.c(2),{className:s}=t;let a;return e[0]!==s?(a=n.jsx(oa,{className:s}),e[0]=s,e[1]=a):a=e[1],a}function ca(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const L=Object.assign(la,{Item:ia,Separator:ra,Skeleton:ca});function da(t){const e=h.c(48),{open:s,onOpenChange:a,user:o,userImage:l}=t,[i,r]=wt(),[c,d]=w.useState(!1);let m;e[0]!==o.id?(m=()=>{navigator.clipboard.writeText(o.id),d(!0),setTimeout(()=>d(!1),2e3)},e[0]=o.id,e[1]=m):m=e[1];const f=m;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Et,{className:"text-base",children:"Profile Settings"}),e[2]=u):u=e[2];let b;e[3]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsxs(Dt,{className:"px-6 pt-6 pb-4 border-b border-border shrink-0 relative",children:[u,n.jsxs(Lt,{className:"absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[n.jsx(Y,{size:16}),n.jsx("span",{className:"sr-only",children:"Close"})]})]}),e[3]=b):b=e[3];const x=o.name||"U";let p;e[4]!==x||e[5]!==l?(p=n.jsx(K,{url:l,fallback:x,shape:"circle",size:"xl",className:"h-16 w-16"}),e[4]=x,e[5]=l,e[6]=p):p=e[6];const g=o.name||"User";let j;e[7]!==g?(j=n.jsx("span",{className:"text-base font-medium text-foreground",children:g}),e[7]=g,e[8]=j):j=e[8];let v;e[9]!==o.email?(v=n.jsx("span",{className:"text-sm text-muted-foreground",children:o.email}),e[9]=o.email,e[10]=v):v=e[10];let N;e[11]!==j||e[12]!==v?(N=n.jsxs("div",{className:"flex flex-col gap-1",children:[j,v]}),e[11]=j,e[12]=v,e[13]=N):N=e[13];let _;e[14]!==p||e[15]!==N?(_=n.jsxs("div",{className:"flex items-center gap-4",children:[p,N]}),e[14]=p,e[15]=N,e[16]=_):_=e[16];let y;e[17]!==i||e[18]!==r?(y=()=>r(!i),e[17]=i,e[18]=r,e[19]=y):y=e[19];let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(Bt,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(Ft,{size:16,className:"text-muted-foreground"}),"Developer Mode"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Show technical details like JSON input/output for tool calls"})]}),e[20]=k):k=e[20];let C;e[21]!==i||e[22]!==r?(C=n.jsx("div",{onClick:ma,children:n.jsx(Wt,{checked:i,onCheckedChange:r})}),e[21]=i,e[22]=r,e[23]=C):C=e[23];let $;e[24]!==y||e[25]!==C?($=n.jsxs("button",{type:"button",onClick:y,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[k,C]}),e[24]=y,e[25]=C,e[26]=$):$=e[26];let S;e[27]!==_||e[28]!==$?(S=n.jsxs("div",{className:"p-5 space-y-6 min-h-[225px]",children:[_,$]}),e[27]=_,e[28]=$,e[29]=S):S=e[29];let I;e[30]!==o.id?(I=n.jsx("span",{className:"font-mono text-xs",children:o.id}),e[30]=o.id,e[31]=I):I=e[31];let O;e[32]!==c?(O=c?n.jsx(ee,{size:14,className:"text-green-600"}):n.jsx(Pe,{size:14,className:"opacity-0 group-hover:opacity-100 transition-opacity"}),e[32]=c,e[33]=O):O=e[33];let T;e[34]!==f||e[35]!==I||e[36]!==O?(T=n.jsx(Oe,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:f,className:"group flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[I,O]})}),e[34]=f,e[35]=I,e[36]=O,e[37]=T):T=e[37];let M;e[38]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsx(Ie,{side:"top",children:n.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[38]=M):M=e[38];let P;e[39]!==T?(P=n.jsx("div",{className:"border-t border-border px-5 py-4 flex items-center shrink-0",children:n.jsx(ze,{children:n.jsxs(Te,{children:[T,M]})})}),e[39]=T,e[40]=P):P=e[40];let E;e[41]!==S||e[42]!==P?(E=n.jsxs(Ht,{className:"sm:max-w-lg sm:max-h-[85vh] p-0 flex flex-col",closeButtonClassName:"hidden",children:[b,n.jsxs("div",{className:"flex flex-col",children:[S,P]})]}),e[41]=S,e[42]=P,e[43]=E):E=e[43];let D;return e[44]!==a||e[45]!==s||e[46]!==E?(D=n.jsx(Ut,{open:s,onOpenChange:a,children:E}),e[44]=a,e[45]=s,e[46]=E,e[47]=D):D=e[47],D}function ma(t){return t.stopPropagation()}function fa(t){const e=h.c(47),{user:s,userImage:a}=t,[o,l]=w.useState(!1),[i,r]=w.useState(!1);let c;e[0]!==s.email||e[1]!==s.id||e[2]!==s.name?(c=()=>{const D=`ID: ${s.id}
2
- Name: ${s.name||"N/A"}
3
- Email: ${s.email}`;navigator.clipboard.writeText(D),r(!0),B.success("User info copied to clipboard"),setTimeout(()=>r(!1),2e3)},e[0]=s.email,e[1]=s.id,e[2]=s.name,e[3]=c):c=e[3];const d=c;let m;e[4]!==s.email||e[5]!==s.name||e[6]!==a?(m=()=>n.jsx(K,{url:a,fallback:s.name||s.email||"U",shape:"circle",size:"sm",className:"cursor-pointer hover:ring-2 ring-muted-foreground transition-all h-7 w-7"}),e[4]=s.email,e[5]=s.name,e[6]=a,e[7]=m):m=e[7];const f=s.name||s.email||"U";let u;e[8]!==f||e[9]!==a?(u=n.jsx(K,{url:a,fallback:f,shape:"circle",size:"sm"}),e[8]=f,e[9]=a,e[10]=u):u=e[10];const b=s.name||"User";let x;e[11]!==b?(x=n.jsx("div",{className:"text-sm font-medium truncate",children:b}),e[11]=b,e[12]=x):x=e[12];let p;e[13]!==s.email?(p=n.jsx("div",{className:"text-xs text-muted-foreground truncate",children:s.email}),e[13]=s.email,e[14]=p):p=e[14];let g;e[15]!==x||e[16]!==p?(g=n.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[x,p]}),e[15]=x,e[16]=p,e[17]=g):g=e[17];let j;e[18]!==i?(j=n.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:i?n.jsx(ee,{size:16,className:"text-green-600"}):n.jsx(Pe,{size:16,className:"text-muted-foreground"})}),e[18]=i,e[19]=j):j=e[19];let v;e[20]!==u||e[21]!==g||e[22]!==j?(v=n.jsxs("div",{className:"group flex items-center gap-3 w-full py-1",children:[u,g,j]}),e[20]=u,e[21]=g,e[22]=j,e[23]=v):v=e[23];let N;e[24]!==d||e[25]!==v?(N=n.jsx(L.Item,{onClick:d,children:v}),e[24]=d,e[25]=v,e[26]=N):N=e[26];let _;e[27]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(L.Separator,{}),e[27]=_):_=e[27];let y,k;e[28]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsxs(L.Item,{onClick:()=>l(!0),children:[n.jsx(ce,{className:"text-muted-foreground",size:18}),"Profile Settings"]}),k=n.jsx(L.Separator,{}),e[28]=y,e[29]=k):(y=e[28],k=e[29]);let C;e[30]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(ft,{className:"w-4 h-4 text-muted-foreground"}),e[30]=C):C=e[30];let $;e[31]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(L.Item,{asChild:!0,children:n.jsxs("a",{href:"https://github.com/decocms/admin",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[C,"decocms/admin",n.jsx(ge,{size:18,className:"text-muted-foreground ml-auto"})]})}),e[31]=$):$=e[31];let S;e[32]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Le,{className:"text-muted-foreground",size:18}),e[32]=S):S=e[32];let I,O;e[33]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(L.Item,{asChild:!0,children:n.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[S,"Homepage",n.jsx(ge,{size:18,className:"ml-auto text-muted-foreground"})]})}),O=n.jsx(L.Separator,{}),e[33]=I,e[34]=O):(I=e[33],O=e[34]);let T;e[35]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsxs(L.Item,{onClick:ua,children:[n.jsx(Ue,{size:18,className:"text-muted-foreground"}),"Log out"]}),e[35]=T):T=e[35];let M;e[36]!==N||e[37]!==m||e[38]!==s?(M=n.jsxs(L,{user:s,trigger:m,align:"end",children:[N,_,y,k,$,I,O,T]}),e[36]=N,e[37]=m,e[38]=s,e[39]=M):M=e[39];let P;e[40]!==o||e[41]!==s||e[42]!==a?(P=o&&n.jsx(da,{open:o,onOpenChange:l,user:s,userImage:a}),e[40]=o,e[41]=s,e[42]=a,e[43]=P):P=e[43];let E;return e[44]!==M||e[45]!==P?(E=n.jsxs(n.Fragment,{children:[M,P]}),e[44]=M,e[45]=P,e[46]=E):E=e[46],E}function ua(){return W.signOut()}function pa(){const t=h.c(7),{data:e}=W.useSession();if(!e?.user){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(K,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer h-7 w-7",muted:!0}),t[0]=c):c=t[0],c}const s=e.user,a=s.name??void 0;let o;t[1]!==a||t[2]!==s?(o={...s,name:a},t[1]=a,t[2]=s,t[3]=o):o=t[3];const l=o,i=s.image;let r;return t[4]!==i||t[5]!==l?(r=n.jsx(fa,{user:l,userImage:i}),t[4]=i,t[5]=l,t[6]=r):r=t[6],r}function me(){const t=h.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=re.decoChatOpen(),t[0]=e):e=t[0];const[s,a]=ie(e,ha);let o;return t[1]!==s||t[2]!==a?(o=[s,a],t[1]=s,t[2]=a,t[3]=o):o=t[3],o}function ha(t){return!!(t??!1)}function xa(t){const e=h.c(6),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(ut,{children:n.jsx(Se,{})}),e[0]=a):a=e[0];let o;e[1]!==s?(o=n.jsx(pt,{children:s}),e[1]=s,e[2]=o):o=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(ht,{children:n.jsx(xt,{to:"/login",replace:!0})}),e[3]=l):l=e[3];let i;return e[4]!==o?(i=n.jsxs(n.Fragment,{children:[a,o,l]}),e[4]=o,e[5]=i):i=e[5],i}function ga(t){const e=h.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=z("fixed top-0 left-0 right-0 z-20 bg-sidebar flex items-center w-full h-12 border-b border-border",a),e[0]=a,e[1]=o):o=e[1];let l;return e[2]!==s||e[3]!==o?(l=n.jsx("div",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=l):l=e[4],l}function ba(t){const e=h.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=z("flex items-center justify-center px-2.5 h-full border-r border-border",a),e[0]=a,e[1]=o):o=e[1];let l;return e[2]!==s||e[3]!==o?(l=n.jsx("div",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=l):l=e[4],l}function ja(t){const e=h.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=z("flex items-center gap-2 px-2 h-full",a),e[0]=a,e[1]=o):o=e[1];let l;return e[2]!==s||e[3]!==o?(l=n.jsx("div",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=l):l=e[4],l}function va(t){const e=h.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=z("flex items-center gap-2 px-2 h-full flex-1",a),e[0]=a,e[1]=o):o=e[1];let l;return e[2]!==s||e[3]!==o?(l=n.jsx("div",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=l):l=e[4],l}function wa(t){const e=h.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=z("flex items-center gap-2 px-2 h-full ml-auto",a),e[0]=a,e[1]=o):o=e[1];let l;return e[2]!==s||e[3]!==o?(l=n.jsx("div",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=l):l=e[4],l}function Na(){const t=h.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center justify-center px-2 h-full border-r border-border",children:n.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})}),t[0]=e):e=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("div",{className:"flex items-center gap-2 px-2 h-full",children:n.jsx("div",{className:"w-32 h-6 bg-muted rounded-md animate-pulse"})}),t[1]=s):s=t[1];let a;return t[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsxs("div",{className:"fixed top-0 left-0 right-0 z-20 bg-sidebar flex items-center w-full h-12 border-b border-border",children:[e,s,n.jsx("div",{className:"flex items-center gap-2 px-2 h-full ml-auto",children:n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"})})]}),t[2]=a):a=t[2],a}const Q=Object.assign(ga,{Sidebar:ba,Left:ja,Center:va,Right:wa,Skeleton:Na});function Qe(){const t=h.c(3),{toggleSidebar:e}=de();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(He,{className:"text-muted-foreground/85 group-hover:text-foreground transition-colors",size:18}),t[0]=s):s=t[0];let a;return t[1]!==e?(a=n.jsx(n.Fragment,{children:n.jsx(H,{onClick:e,size:"icon",variant:"ghost",className:"w-7 h-7 rounded-md",children:s})}),t[1]=e,t[2]=a):a=t[2],a}Qe.Skeleton=function(){return n.jsx("div",{className:"w-7 h-7 bg-muted rounded-md animate-pulse"})};const Sa="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function ya(){const t=h.c(45),{org:e}=se(),[,s]=me(),{selectedVirtualMcp:a,modelsConnections:o,isChatEmpty:l,activeThreadId:i,setActiveThreadId:r,threads:c}=St();let d;if(t[0]!==i||t[1]!==c){let $;t[3]!==i?($=S=>S.id===i,t[3]=i,t[4]=$):$=t[4],d=c.find($),t[0]=i,t[1]=c,t[2]=d}else d=t[2];const m=d;if(o.length===0){let $;t[5]===Symbol.for("react.memo_cache_sentinel")?($=n.jsxs(A.Header.Left,{children:[n.jsx("img",{src:Sa,alt:"Chat",className:"size-5 rounded"}),n.jsx("span",{className:"text-sm font-medium",children:"Chat"})]}),t[5]=$):$=t[5];let S;t[6]!==s?(S=()=>s(!1),t[6]=s,t[7]=S):S=t[7];let I;t[8]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(Y,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[8]=I):I=t[8];let O;t[9]!==S?(O=n.jsxs(A.Header,{children:[$,n.jsx(A.Header.Right,{children:n.jsx("button",{type:"button",onClick:S,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:I})})]}),t[9]=S,t[10]=O):O=t[10];let T;t[11]!==e?(T=n.jsx(A.Main,{className:"flex flex-col items-center",children:n.jsx(A.EmptyState,{children:n.jsx(A.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features.",org:e})})}),t[11]=e,t[12]=T):T=t[12];let M;return t[13]!==O||t[14]!==T?(M=n.jsxs(A,{children:[O,T]}),t[13]=O,t[14]=T,t[15]=M):M=t[15],M}let f;t[16]!==m||t[17]!==l?(f=n.jsx(A.Header.Left,{children:!l&&m?.title?n.jsx(Vt,{text:m.title,className:"text-sm font-medium text-foreground"}):n.jsx("span",{className:"text-sm font-medium text-foreground",children:"Chat"})}),t[16]=m,t[17]=l,t[18]=f):f=t[18];let u;t[19]!==r?(u=()=>r(crypto.randomUUID()),t[19]=r,t[20]=u):u=t[20];let b;t[21]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(Yt,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[21]=b):b=t[21];let x;t[22]!==u?(x=n.jsx("button",{type:"button",onClick:u,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"New chat",children:b}),t[22]=u,t[23]=x):x=t[23];let p;t[24]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(A.ThreadHistoryPopover,{}),t[24]=p):p=t[24];let g;t[25]!==s?(g=()=>s(!1),t[25]=s,t[26]=g):g=t[26];let j;t[27]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(Y,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[27]=j):j=t[27];let v;t[28]!==g?(v=n.jsx("button",{type:"button",onClick:g,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:j}),t[28]=g,t[29]=v):v=t[29];let N;t[30]!==x||t[31]!==v?(N=n.jsxs(A.Header.Right,{children:[x,p,v]}),t[30]=x,t[31]=v,t[32]=N):N=t[32];let _;t[33]!==f||t[34]!==N?(_=n.jsxs(A.Header,{children:[f,N]}),t[33]=f,t[34]=N,t[35]=_):_=t[35];let y;t[36]!==l||t[37]!==a?.description||t[38]!==a?.icon||t[39]!==a?.title?(y=n.jsx(A.Main,{children:l?n.jsx(A.EmptyState,{children:n.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[n.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[n.jsx($t,{icon:a?.icon??"/favicon.svg",name:a?.title||"Chat",size:"lg",fallbackIcon:n.jsx(Ae,{size:32}),className:"size-[60px]! rounded-[18px]!"}),n.jsx("h3",{className:"text-xl font-medium text-foreground",children:a?.title||"Chat"}),n.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:a?.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),n.jsx(A.IceBreakers,{})]})}):n.jsx(A.Messages,{minHeightOffset:280})}),t[36]=l,t[37]=a?.description,t[38]=a?.icon,t[39]=a?.title,t[40]=y):y=t[40];let k;t[41]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(A.Footer,{children:n.jsx(A.Input,{})}),t[41]=k):k=t[41];let C;return t[42]!==_||t[43]!==y?(C=n.jsxs(A,{children:[_,y,k]}),t[42]=_,t[43]=y,t[44]=C):C=t[44],C}function Ca(){const t=h.c(6),{threads:e,hasNextPage:s,isFetchingNextPage:a,fetchNextPage:o}=Nt();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(ya,{}),t[0]=l):l=t[0];let i;return t[1]!==o||t[2]!==s||t[3]!==a||t[4]!==e?(i=n.jsx(A.Provider,{initialThreads:e,hasNextPage:s,isFetchingNextPage:a,fetchNextPage:o,children:l}),t[1]=o,t[2]=s,t[3]=a,t[4]=e,t[5]=i):i=t[5],i}function _a(){const t=h.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(A.Skeleton,{}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx($e,{fallback:e,children:n.jsx(w.Suspense,{fallback:n.jsx(A.Skeleton,{}),children:n.jsx(Ca,{})})}),t[1]=s):s=t[1],s}function je({showSidebarToggle:t=!1,showOrgSwitcher:e=!1,showDecoChat:s=!1,disableDecoChat:a=!1}){const[o,l]=me(),i=w.useRef(a);a&&o&&i.current!==a&&l(!1),i.current=a;const r=()=>{a||l(c=>!c)};return n.jsxs(Q,{children:[t&&n.jsx(Q.Sidebar,{children:n.jsx(Qe,{})}),n.jsx(Q.Left,{children:e&&n.jsx(w.Suspense,{fallback:n.jsx(oe.Skeleton,{}),children:n.jsx(oe,{})})}),n.jsxs(Q.Right,{className:"gap-2",children:[n.jsx(Jt,{}),s&&!a&&n.jsxs(H,{size:"sm",variant:"default",onClick:r,className:"h-7 gap-2",children:[n.jsx(Gt,{size:16}),"Chat"]}),n.jsx(pa,{})]})]})}function ka(t){const e=h.c(10),{children:s,className:a}=t,[,o]=w.useTransition();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=re.decoChatPanelWidth(),e[0]=l):l=e[0];const[i,r]=ie(l,30);let c;e[1]!==r?(c=u=>o(()=>r(u)),e[1]=r,e[2]=c):c=e[2];const d=c;let m;e[3]!==a?(m=z("min-w-0",a),e[3]=a,e[4]=m):m=e[4];let f;return e[5]!==i||e[6]!==s||e[7]!==d||e[8]!==m?(f=n.jsx(Re,{defaultSize:i,minSize:20,className:m,onResize:d,children:s}),e[5]=i,e[6]=s,e[7]=d,e[8]=m,e[9]=f):f=e[9],f}function $a(t){const e=h.c(5),{children:s}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=re.sidebarOpen(),e[0]=a):a=e[0];const[o,l]=ie(a,!0);let i;return e[1]!==s||e[2]!==l||e[3]!==o?(i=n.jsx(ms,{open:o,onOpenChange:l,children:s}),e[1]=s,e[2]=l,e[3]=o,e[4]=i):i=e[4],i}function Ia(t){const e=h.c(12),{disableChat:s}=t,a=s===void 0?!1:s,[o]=me(),l=o&&!a;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Re,{className:"bg-background",children:n.jsx(ye,{})}),e[0]=i):i=e[0];let r;e[1]!==a||e[2]!==l?(r=!a&&n.jsx(Kt,{withHandle:l}),e[1]=a,e[2]=l,e[3]=r):r=e[3];const c=l?"max-w-none":"max-w-0";let d;e[4]!==c?(d=z(c),e[4]=c,e[5]=d):d=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(_a,{}),e[6]=m):m=e[6];let f;e[7]!==d?(f=n.jsx(ka,{className:d,children:m}),e[7]=d,e[8]=f):f=e[8];let u;return e[9]!==r||e[10]!==f?(u=n.jsxs(Zt,{direction:"horizontal",children:[i,r,f]}),e[9]=r,e[10]=f,e[11]=u):u=e[11],u}function za(){const t=h.c(22);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=we(e),a=ve(),o=a.location.pathname===`/${s}`||a.location.pathname===`/${s}/`;let l;t[1]!==s?(l=bt.activeOrganization(s),t[1]=s,t[2]=l):l=t[2];let i;t[3]!==s?(i=async()=>{if(!s)return null;const{data:p}=await W.organization.setActive({organizationSlug:s});return{org:p,project:{slug:_t}}},t[3]=s,t[4]=i):i=t[4];let r;t[5]!==l||t[6]!==i?(r={queryKey:l,queryFn:i,gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1},t[5]=l,t[6]=i,t[7]=r):r=t[7];const{data:c}=gt(r);if(!c){let p;t[8]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(je,{}),t[8]=p):p=t[8];let g;return t[9]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsxs("div",{className:"min-h-screen bg-background",children:[p,n.jsx("div",{className:"pt-12",children:n.jsx(ye,{})})]}),t[9]=g):g=t[9],g}let d;t[10]!==o?(d=n.jsx(je,{showSidebarToggle:!0,showOrgSwitcher:!0,showDecoChat:!0,disableDecoChat:o}),t[10]=o,t[11]=d):d=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m={"--sidebar-width":"13rem","--sidebar-width-mobile":"11rem"},t[12]=m):m=t[12];let f;t[13]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(Is,{}),t[13]=f):f=t[13];let u;t[14]!==o?(u=n.jsxs(ps,{className:"flex-1 bg-sidebar",style:m,children:[f,n.jsx(xs,{className:"pt-12",children:n.jsx(Ia,{disableChat:o})})]}),t[14]=o,t[15]=u):u=t[15];let b;t[16]!==d||t[17]!==u?(b=n.jsx($a,{children:n.jsxs("div",{className:"flex flex-col h-screen",children:[d,u]})}),t[16]=d,t[17]=u,t[18]=b):b=t[18];let x;return t[19]!==c||t[20]!==b?(x=n.jsx(Ct,{...c,children:b}),t[19]=c,t[20]=b,t[21]=x):x=t[21],x}function Pn(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(xa,{children:n.jsx(w.Suspense,{fallback:n.jsx(Se,{}),children:n.jsx(za,{})})}),t[0]=e):e=t[0],e}export{Pn as default};
@@ -1 +0,0 @@
1
- import{r as N,c as F,j as t}from"./index-B9c3bNyk.js";import{I as R}from"./empty-state-CSTjcp0X.js";import{C as B}from"./checkbox-PlWQwQ-Z.js";import{c as T,B as A}from"./button-Ta3HWdYR.js";import{i as V}from"./ArrowLeft-H58XLYPH.js";import{u as L}from"./use-connection-Cpo9FQLA.js";import{C as q}from"./collection-search-BHs67_UI.js";import{p as G}from"./schema-rISYOzpk.js";const H=N.memo(function(S){const e=F.c(21),{connection:o,isSelected:a,hasToolsEnabled:p,activeToolsCount:l,totalToolsCount:h,onSelect:g,onToggle:m}=S,f=a?"bg-accent/50":"hover:bg-muted/50";let r;e[0]!==f?(r=T("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",f),e[0]=f,e[1]=r):r=e[1];let i;e[2]!==o.icon||e[3]!==o.title?(i=t.jsx(R,{icon:o.icon,name:o.title,size:"xs"}),e[2]=o.icon,e[3]=o.title,e[4]=i):i=e[4];let u;e[5]!==o.title?(u=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:o.title})}),e[5]=o.title,e[6]=u):u=e[6];let c;e[7]!==g||e[8]!==i||e[9]!==u?(c=t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:g,children:[i,u]}),e[7]=g,e[8]=i,e[9]=u,e[10]=c):c=e[10];let x;e[11]!==l||e[12]!==o.tools||e[13]!==p||e[14]!==m||e[15]!==h?(x=o.tools&&o.tools.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[l,"/",h]}),t.jsx(B,{checked:p,onCheckedChange:m,onClick:K})]}),e[11]=l,e[12]=o.tools,e[13]=p,e[14]=m,e[15]=h,e[16]=x):x=e[16];let j;return e[17]!==r||e[18]!==c||e[19]!==x?(j=t.jsxs("div",{className:r,children:[c,x]}),e[17]=r,e[18]=c,e[19]=x,e[20]=j):j=e[20],j}),J=N.memo(function(S){const e=F.c(18),{connectionId:o,tool:a,isSelected:p,onToggle:l}=S,h=`tool-${o}-${a.name}`,g=p?"text-foreground":"text-muted-foreground";let m;e[0]!==g?(m=T("text-sm font-medium",g),e[0]=g,e[1]=m):m=e[1];let f;e[2]!==m||e[3]!==a.name?(f=t.jsx("div",{className:"flex items-center gap-2 mb-1",children:t.jsx("span",{className:m,children:a.name})}),e[2]=m,e[3]=a.name,e[4]=f):f=e[4];let r;e[5]!==a.description?(r=a.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:a.description}),e[5]=a.description,e[6]=r):r=e[6];let i;e[7]!==f||e[8]!==r?(i=t.jsxs("div",{className:"flex-1 min-w-0",children:[f,r]}),e[7]=f,e[8]=r,e[9]=i):i=e[9];const u=`tool-${o}-${a.name}`;let c;e[10]!==p||e[11]!==l||e[12]!==u?(c=t.jsx("div",{className:"flex items-center shrink-0",children:t.jsx(B,{id:u,checked:p,onCheckedChange:l,onClick:W})}),e[10]=p,e[11]=l,e[12]=u,e[13]=c):c=e[13];let x;return e[14]!==h||e[15]!==i||e[16]!==c?(x=t.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:h,children:[i,c]}),e[14]=h,e[15]=i,e[16]=c,e[17]=x):x=e[17],x});function ne({toolSet:d,onToolSetChange:S,excludeVirtualMcpId:e}){const[o,a]=N.useState(""),p=N.useDeferredValue(o),[l,h]=N.useState("all"),[g,m]=N.useState(!1),f=N.useRef(new Set(Object.keys(d))),r=L({searchTerm:p.trim()||void 0}),i=e?r.filter(s=>s.connection_type!=="VIRTUAL"?!0:G(s.connection_url)!==e):r,u=f.current,c=[...u.values()].map(s=>i.find(n=>n.id===s)).filter(s=>s!==void 0),x=i.filter(s=>!u.has(s.id)),j=[...c,...x],I=s=>{const n=d[s];return n!==void 0&&n.length>0},$=j.filter(s=>{if(l==="all")return!0;const n=I(s.id);return l==="selected"?n:l==="unselected"?!n:!0}),[M,E]=N.useState(j[0]?.id??null),b=M?j.find(s=>s.id===M)??null:null,z=b?.tools??[],D=(s,n)=>d[s]?.includes(n)??!1,O=(s,n)=>{const v=d[s]??[],k=v.includes(n),y={...d};if(k){const w=v.filter(C=>C!==n);w.length===0?delete y[s]:y[s]=w}else y[s]=[...v,n];S(y)},P=s=>{const n=j.find(C=>C.id===s);if(!n?.tools)return;const v=d[s]??[],k=n.tools.map(C=>C.name),y=v.length>0&&k.every(C=>v.includes(C)),w={...d};y?delete w[s]:(w[s]=k,E(s)),S(w)},Q=s=>{E(s),m(!0)},U=()=>{m(!1)};return t.jsxs("div",{className:"flex h-full",children:[t.jsxs("div",{className:T("w-full md:w-80 border-r border-border flex flex-col",g&&"hidden md:flex"),children:[t.jsx(q,{value:o,onChange:a,placeholder:"Search MCP Servers..."}),t.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[t.jsx("button",{onClick:()=>h("all"),className:T("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",l==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),t.jsx("button",{onClick:()=>h("selected"),className:T("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",l==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),t.jsx("button",{onClick:()=>h("unselected"),className:T("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",l==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),t.jsx("div",{className:"flex-1 overflow-auto",children:$.length===0?t.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:o?"No connections found":l==="selected"?"No servers selected":l==="unselected"?"No unselected servers":"No connections available"}):t.jsx("div",{className:"p-2 space-y-1",children:$.map(s=>{const n=s.tools?.length??0,v=d[s.id]?.length??0;return t.jsx(H,{connection:s,isSelected:M===s.id,hasToolsEnabled:I(s.id),activeToolsCount:v,totalToolsCount:n,onSelect:()=>Q(s.id),onToggle:()=>P(s.id)},s.id)})})})]}),t.jsx("div",{className:T("flex-1 flex-col",g?"flex":"hidden md:flex"),children:b?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[t.jsx(A,{variant:"ghost",size:"sm",onClick:U,className:"h-8 w-8 p-0 shrink-0",children:t.jsx(V,{size:20})}),t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx(R,{icon:b.icon,name:b.title,size:"sm"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:b.title}),b.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:b.description})]})]})]}),t.jsx("div",{className:"flex-1 overflow-auto p-4",children:z.length===0?t.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:"This connection has no tools available"}):t.jsx("div",{className:"space-y-2",children:z.map(s=>t.jsx(J,{connectionId:b.id,tool:s,isSelected:D(b.id,s.name),onToggle:()=>O(b.id,s.name)},s.name))})})]}):t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"Select a connection to view its tools"})})})]})}function K(d){return d.stopPropagation()}function W(d){return d.stopPropagation()}export{ne as T};
@@ -1,23 +0,0 @@
1
- import{c as v}from"./binder-Co4G2PF6.js";import{bD as T,bC as O,y as t,z as e,J as p,I as c,bE as l,bF as R,bG as U,aM as i,_ as C,aH as u,L as g,aN as n,aD as b,aK as L,aL as B,bH as x}from"./index-B9c3bNyk.js";const W=O.extend({avatar:e().describe("URL or data URI to the assistant's avatar image"),system_prompt:e().describe("System prompt that defines the assistant's behavior"),virtual_mcp_id:e().describe("Virtual MCP ID to use for this assistant"),model:t({id:e().describe("Model ID"),connectionId:e().describe("Connection ID that provides the model")}).describe("Selected model reference for this assistant")}),F=T("assistant",W),G=[...F],w=L(()=>u([B(),e(),i(),g(),p(e(),w),c(w)])),f=p(e(),p(e(),w)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),E=t({type:n("text"),text:e().describe("The text content"),providerOptions:f}),q=t({type:n("text"),text:e().describe("The text content"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),j=e().describe("File data as URL string"),k=t({type:n("file"),filename:e().optional().describe("Optional filename of the file"),data:j,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:f}),J=t({type:n("file"),mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),data:e().describe("Generated file data as base64 encoded string")}),$=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerOptions:f}),K=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),H=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call, used to match with tool result"),toolName:e().describe("Name of the tool being called"),input:e().describe("Arguments of the tool call (JSON-serializable object matching tool input schema)"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerOptions:f}),z=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call"),toolName:e().describe("Name of the tool being called"),input:e().describe("Stringified JSON object with the tool call arguments"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),V=u([t({type:n("text"),value:e()}),t({type:n("json"),value:w}),t({type:n("error-text"),value:e()}),t({type:n("error-json"),value:w}),t({type:n("content"),value:c(u([t({type:n("text"),text:e().describe("Text content")}),t({type:n("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))})]),A=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output:V.describe("Result of the tool call"),result:b().describe("Unknown result of the tool call"),providerOptions:f}),X=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),result:l().describe("Result of the tool call (JSON-serializable)"),isError:g().optional().describe("Whether the result is an error or error message"),providerExecuted:g().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),Y=u([t({type:n("source"),sourceType:n("url"),id:e().describe("The ID of the source"),url:e().describe("The URL of the source"),title:e().optional().describe("The title of the source"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),t({type:n("source"),sourceType:n("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:l().optional().describe("Additional provider-specific metadata")})]),Z=t({role:n("system"),content:e().describe("System message content"),providerOptions:f}),Q=t({role:n("user"),content:c(u([E,k])).describe("User message content parts (text or file)"),providerOptions:f}),ee=t({role:n("assistant"),content:c(u([E,k,$,H,A])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:f}),te=t({role:n("tool"),content:c(A).describe("Tool message content (tool results)"),providerOptions:f}),oe=u([Z,Q,ee,te]),ae=c(oe).describe("A list of messages forming the prompt"),ie=t({prompt:ae.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:i().optional().describe("Maximum number of tokens to generate"),temperature:i().optional().describe("Temperature setting. The range depends on the provider and model"),topP:i().optional().describe("Nucleus sampling parameter"),topK:i().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:i().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:i().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:i().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:c(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:u([t({type:n("text")}),t({type:n("json"),schema:l().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:c(l()).optional().describe("The tools that are available for the model"),toolChoice:l().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:g().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:l().optional().describe("Abort signal for cancelling the operation"),providerOptions:l().optional().describe("Additional provider-specific options")}),ne=t({content:c(u([q,J,K,z,X,Y])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:C(["stop","length","content-filter","tool-calls","error","other","unknown"]).describe("Reason why generation stopped"),usage:U({inputTokens:i().optional(),outputTokens:i().optional(),totalTokens:i().optional(),reasoningTokens:i().optional()}).describe("Usage information for the language model call"),providerMetadata:l().optional().describe("Additional provider-specific metadata"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({id:e().optional().describe("ID for the generated response"),timestamp:R().optional().describe("Timestamp for the start of the generated response"),modelId:e().optional().describe("The ID of the response model that was used"),headers:p(e(),e()).optional().describe("Response headers"),body:l().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:c(l()).describe("Warnings for the call, e.g. unsupported settings")});t({stream:l().describe("ReadableStream of LanguageModelV2StreamPart"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({headers:p(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const se=t({supportedUrls:p(e(),c(e())).describe("Supported URL patterns by media type for the provider")});t({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:C(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const N=t({modelId:e().describe("The ID of the model"),callOptions:ie}),re=O.extend({logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:C(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),le=T("llm",re,{readOnly:!0}),ce=[{name:"LLM_METADATA",inputSchema:t({modelId:e().describe("The ID of the model")}),outputSchema:se},{name:"LLM_DO_STREAM",inputSchema:N,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:N,outputSchema:ne},...le],de=t({scopes:c(e()).describe("List of scopes available"),stateSchema:p(e(),b()).describe("JSON Schema (draft-07) defining the state structure")}),pe=[{name:"MCP_CONFIGURATION",inputSchema:t({}),outputSchema:de}],ue=t({toolName:e().describe("Name of the tool to invoke on that connection"),transformCode:e().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(input): Output { ... }`\n The input will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output. \n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),me=t({code:e().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(input): Output { ... }\`
2
- The input is the resolved value of the references in the input field. Example:
3
- {
4
- "input": {
5
- "name": "@Step_1.name",
6
- "age": "@Step_2.age"
7
- },
8
- "code": "export default function(input): Output { return { result: \`\${input.name} is \${input.age} years old.\` } }"
9
- }
10
- `)});t({signalName:e().describe("Signal name to wait for (e.g., 'approval'). Execution pauses until SEND_SIGNAL is called with this name.")});const he=u([ue.describe("Call an external tool via MCP connection. "),me.describe("Run pure TypeScript code for data transformation. Useful to merge data from multiple steps and transform it.")]),fe=t({maxAttempts:i().optional().describe("Max retry attempts on failure (default: 1, no retries)"),backoffMs:i().optional().describe("Initial delay between retries in ms (doubles each attempt)"),timeoutMs:i().optional().describe("Max execution time in ms before step fails (default: 30000)")}),D=L(()=>t({type:e().optional(),properties:p(e(),b()).optional(),required:c(e()).optional(),description:e().optional(),additionalProperties:g().optional(),additionalItems:g().optional(),items:D.optional()}).passthrough()),be=t({name:e().min(1).describe("Unique identifier for this step. Other steps reference its output as @name.field"),description:e().optional().describe("What this step does"),action:he,input:p(e(),b()).optional().describe("Data passed to the action. Use @ref for dynamic values: @input.field (workflow input), @stepName.field (previous step output), @item/@index (loop context). Example: { 'userId': '@input.user_id', 'data': '@fetch.result' }"),outputSchema:D.optional().describe("Optional JSON Schema describing the expected output of the step."),config:fe.optional().describe("Retry and timeout settings")}),ge=C(["enqueued","running","success","error","failed","cancelled"]).default("enqueued"),M=O.extend({virtual_mcp_id:e().describe("ID of the virtual MCP (agent) that will be used to execute the workflow"),status:ge.describe("Current status of the workflow execution"),input:p(e(),b()).optional().describe("Input data for the workflow execution"),output:b().optional().describe("Output data for the workflow execution"),completed_at_epoch_ms:i().nullish().describe("Timestamp of when the workflow execution completed"),start_at_epoch_ms:i().nullish().describe("Timestamp of when the workflow execution started or will start"),timeout_ms:i().nullish().describe("Timeout in milliseconds for the workflow execution"),deadline_at_epoch_ms:i().nullish().describe("Deadline for the workflow execution - when the workflow execution will be cancelled if it is not completed. This is read-only and is set by the workflow engine when an execution is created."),error:b().nullish().describe("Error that occurred during the workflow execution"),completed_steps:t({success:c(e()).describe("Names of the steps that were completed successfully"),error:c(e()).describe("Names of the steps that errored")}).optional().describe("Names of the steps that were completed and their status")}),Se=C(["signal","timer","message","output","step_started","step_completed","workflow_started","workflow_completed"]);O.extend({execution_id:e(),type:Se,name:e().nullish(),payload:b().optional(),visible_at:i().nullish(),consumed_at:i().nullish(),source_execution_id:e().nullish()});const ye=O.extend({description:e().optional().describe("Human-readable summary of what this workflow does"),steps:c(be).describe("Ordered list of steps. Execution order is auto-determined by @ref dependencies: steps with no @ref dependencies run in parallel; steps referencing @stepName wait for that step to complete.")}),Te=T("workflow",ye),Oe={maxAttempts:1,timeoutMs:3e4},Me={name:"Initial Step",action:{code:`
11
- interface Input {
12
- example: string;
13
- }
14
-
15
- interface Output {
16
- result: unknown;
17
- }
18
-
19
- export default async function(input: Input): Promise<Output> {
20
- return {
21
- result: input.example
22
- }
23
- }`},config:Oe,outputSchema:{type:"object",properties:{result:{type:"string",description:"The result of the step"}},required:["result"],description:"The output of the step. This is a JSON Schema describing the expected output of the step."}},Ie=T("workflow_execution",M),we=[...Te,...Ie],Ce=[...we],xe=T("workflow_execution",M),_={LLMS:ce,WORKFLOW:Ce,WORKFLOW_EXECUTION:xe,ASSISTANTS:G,MCP:pe};function Ne(o){return o.map(a=>({name:a.name,inputSchema:a.inputSchema?(()=>{try{return x(a.inputSchema)}catch(r){return console.error(`Failed to convert input schema for ${a.name}:`,r),t({})}})():t({}),outputSchema:a.outputSchema?(()=>{try{return x(a.outputSchema)}catch(r){return console.error(`Failed to convert output schema for ${a.name}:`,r),t({})}})():t({})}))}function _e(o,a){const r=o.tools;if(!r||r.length===0)return!1;const s=r.map(m=>({name:m.name,inputSchema:m.inputSchema})),d=a.map(m=>({name:m.name,inputSchema:m.inputSchema,opt:m.opt}));return v(d).isImplementedBy(s)}function Pe({connections:o,binding:a}){const r=(()=>{if(a){if(typeof a=="string"){const s=a.toUpperCase(),d=_[s];if(!d){console.warn(`[useBindingConnections] Unknown binding "${a}". Available bindings: ${Object.keys(_).join(", ")}. Returning all connections without filtering.`);return}return d}if(a.length===0){console.warn("[useBindingConnections] Empty binding array provided. Returning all connections without filtering.");return}return Ne(a)}})();return o?r?o.filter(s=>_e(s,r)):o:[]}function ve(o){return o.toLowerCase().split("_").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}function P(o){if(!o||o.length===0)return[];const a=/^COLLECTION_(.+)_LIST$/,r=[];for(const s of o){const d=s.name.match(a);d?.[1]&&r.push(d[1])}return r}function Le(o,a){const s=o.find(h=>h.name===`COLLECTION_${a}_CREATE`)?.inputSchema?.properties;if(s&&typeof s=="object"&&"data"in s)return s.data;const S=o.find(h=>h.name===`COLLECTION_${a}_UPDATE`)?.inputSchema?.properties;if(S&&typeof S=="object"&&"data"in S)return S.data;const I=o.find(h=>h.name===`COLLECTION_${a}_LIST`)?.outputSchema?.properties;if(I&&typeof I=="object"&&"items"in I){const h=I.items;if(h.items)return h.items}}function Ee(o,a){const r=a.toUpperCase();return{hasCreateTool:o.some(s=>s.name===`COLLECTION_${r}_CREATE`),hasUpdateTool:o.some(s=>s.name===`COLLECTION_${r}_UPDATE`),hasDeleteTool:o.some(s=>s.name===`COLLECTION_${r}_DELETE`)}}function ke(o){if(!o||o.length===0)return[];const a=P(o);if(a.length===0)return[];const r=[];for(const s of a)try{const d=T(s.toLowerCase(),O,{readOnly:!0}),S=o.map(y=>({name:y.name,inputSchema:y.inputSchema})),m=d.map(y=>({name:y.name,inputSchema:y.inputSchema}));if(v(m).isImplementedBy(S)){const y=Ee(o,s);r.push({name:s,displayName:ve(s),schema:Le(o,s),...y})}}catch{}return r}function Re(o){return ke(o?.tools??null)}function Ue(o){return o?o.filter(a=>P(a.tools).find(r=>r==="REGISTRY_APP")):[]}export{Me as D,Re as a,Pe as b,Ue as u};
@@ -1 +0,0 @@
1
- import{c as x,K as F,v as U,x as b,t as v}from"./index-B9c3bNyk.js";import{u as w}from"./useMutation-BYfWAlPb.js";import{u as I}from"./project-context-provider-DJGvA4-w.js";function A(n,s,i){const t=[];if(n?.trim()){const e=n.trim(),r=i.map(o=>({field:[String(o)],operator:"contains",value:e}));r.length===1&&r[0]?t.push(r[0]):r.length>1&&t.push({operator:"or",conditions:r})}if(s&&s.length>0)for(const e of s)t.push({field:[e.column],operator:"eq",value:e.value});if(t.length!==0)return t.length===1?t[0]:{operator:"and",conditions:t}}function D(n,s,i){const t=n??i,e=s??"asc";return[{field:[String(t)],direction:e}]}function J(n,s,i,t){const e=x.c(14),{org:r}=I();let o;e[0]!==s?(o=s.toUpperCase(),e[0]=s,e[1]=o):o=e[1];const E=`COLLECTION_${o}_GET`;let a;e[2]!==s||e[3]!==i||e[4]!==r.slug||e[5]!==n?(a=F.collectionItem(r.slug,n,s,i??""),e[2]=s,e[3]=i,e[4]=r.slug,e[5]=n,e[6]=a):a=e[6];let c;e[7]!==E||e[8]!==i||e[9]!==t?(c=async()=>i?await t(E,{id:i}):{item:null},e[7]=E,e[8]=i,e[9]=t,e[10]=c):c=e[10];let u;e[11]!==a||e[12]!==c?(u={queryKey:a,queryFn:c,staleTime:6e4},e[11]=a,e[12]=c,e[13]=u):u=e[13];const{data:l}=U(u);return l.item}function K(n,s,i,t){const e=x.c(11),r=t===void 0?{}:t,{org:o}=I(),{searchTerm:L,filters:E,sortKey:a,sortDirection:c,searchFields:u,defaultSortKey:l,pageSize:_}=r,O=u===void 0?["title","description"]:u,S=l===void 0?"updated_at":l,p=_===void 0?100:_;let y;e[0]!==s?(y=s.toUpperCase(),e[0]=s,e[1]=y):y=e[1];const g=`COLLECTION_${y}_LIST`,f=A(L,E,O),m=D(a,c,S),$=JSON.stringify({where:f,orderBy:m,limit:p}),T=F.collectionList(o.slug,n,s,$);let d;e[2]!==g||e[3]!==m||e[4]!==p||e[5]!==i||e[6]!==f?(d=async()=>{const Q={...f&&{where:f},...m&&{orderBy:m},limit:p,offset:0};return(await i(g,Q))?.items??[]},e[2]=g,e[3]=m,e[4]=p,e[5]=i,e[6]=f,e[7]=d):d=e[7];let h;e[8]!==T||e[9]!==d?(h={queryKey:T,queryFn:d},e[8]=T,e[9]=d,e[10]=h):h=e[10];const{data:C}=U(h);return C}function M(n,s,i){const t=x.c(39),{org:e}=I(),r=b();let o;t[0]!==s?(o=s.toUpperCase(),t[0]=s,t[1]=o):o=t[1];const L=o,E=`COLLECTION_${L}_CREATE`,a=`COLLECTION_${L}_UPDATE`,c=`COLLECTION_${L}_DELETE`;let u;t[2]!==E||t[3]!==i?(u=async d=>(await i(E,{data:d})).item,t[2]=E,t[3]=i,t[4]=u):u=t[4];let l;t[5]!==s||t[6]!==e||t[7]!==r||t[8]!==n?(l=()=>{r.invalidateQueries({queryKey:F.collection(e.slug,n,s)}),v.success("Item created successfully")},t[5]=s,t[6]=e,t[7]=r,t[8]=n,t[9]=l):l=t[9];let _;t[10]!==u||t[11]!==l?(_={mutationFn:u,onSuccess:l,onError:P},t[10]=u,t[11]=l,t[12]=_):_=t[12];const O=w(_);let S;t[13]!==i||t[14]!==a?(S=async d=>{const{id:h,data:C}=d;return(await i(a,{id:h,data:C})).item},t[13]=i,t[14]=a,t[15]=S):S=t[15];let p;t[16]!==s||t[17]!==e||t[18]!==r||t[19]!==n?(p=()=>{r.invalidateQueries({queryKey:F.collection(e.slug,n,s)}),v.success("Item updated successfully")},t[16]=s,t[17]=e,t[18]=r,t[19]=n,t[20]=p):p=t[20];let y;t[21]!==S||t[22]!==p?(y={mutationFn:S,onSuccess:p,onError:B},t[21]=S,t[22]=p,t[23]=y):y=t[23];const q=w(y);let g;t[24]!==c||t[25]!==i?(g=async d=>(await i(c,{id:d})).item.id,t[24]=c,t[25]=i,t[26]=g):g=t[26];let f;t[27]!==s||t[28]!==e||t[29]!==r||t[30]!==n?(f=()=>{r.invalidateQueries({queryKey:F.collection(e.slug,n,s)}),v.success("Item deleted successfully")},t[27]=s,t[28]=e,t[29]=r,t[30]=n,t[31]=f):f=t[31];let m;t[32]!==g||t[33]!==f?(m={mutationFn:g,onSuccess:f,onError:z},t[32]=g,t[33]=f,t[34]=m):m=t[34];const $=w(m);let T;return t[35]!==O||t[36]!==$||t[37]!==q?(T={create:O,update:q,delete:$},t[35]=O,t[36]=$,t[37]=q,t[38]=T):T=t[38],T}function z(n){const s=n instanceof Error?n.message:String(n);v.error(`Failed to delete item: ${s}`)}function B(n){const s=n instanceof Error?n.message:String(n);v.error(`Failed to update item: ${s}`)}function P(n){const s=n instanceof Error?n.message:String(n);v.error(`Failed to create item: ${s}`)}export{M as a,K as b,J as u};
@@ -1 +0,0 @@
1
- import{c as l}from"./index-B9c3bNyk.js";import{c as r}from"./connection-C0f0eQA8.js";import{u as i}from"./project-context-provider-DJGvA4-w.js";import{b as m,a as u,u as C}from"./use-collections-BnNAdJQg.js";function O(t){const o=l.c(3);let e;o[0]!==t?(e=t===void 0?{}:t,o[0]=t,o[1]=e):e=o[1];const n=e,{org:c}=i();let s;o[2]===Symbol.for("react.memo_cache_sentinel")?(s=r(),o[2]=s):s=o[2];const a=s;return m(c.slug,"CONNECTIONS",a,n)}function S(t){const o=l.c(1),{org:e}=i();let n;o[0]===Symbol.for("react.memo_cache_sentinel")?(n=r(),o[0]=n):n=o[0];const c=n;return C(e.slug,"CONNECTIONS",t,c)}function _(){const t=l.c(1),{org:o}=i();let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r(),t[0]=e):e=t[0];const n=e;return u(o.slug,"CONNECTIONS",n)}export{_ as a,S as b,O as u};
@@ -1 +0,0 @@
1
- import{c as l,K as f}from"./index-B9c3bNyk.js";import{u as y}from"./index-DMxjLEp2.js";async function h(t){const e=`/mcp/${t}`,s={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};try{const n=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{prompts:{}},clientInfo:{name:"mesh-prompts",version:"1.0.0"}}})});if(!n.ok)return[];const i=await n.json();if(i.error)return[];const{capabilities:o}=i.result;if(!o?.prompts)return[];const r=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"prompts/list",params:{}})});if(!r.ok)return[];const a=await r.json();return a.error?[]:a.result?.prompts||[]}catch{return[]}}function T(t){const e=l.c(13);let s;e[0]!==t?(s=t.map(q),e[0]=t,e[1]=s):s=e[1];let n;e[2]!==s?(n={queries:s},e[2]=s,e[3]=n):n=e[3];const i=y(n);let o,r;if(e[4]!==t||e[5]!==i){r=new Map;let p;e[8]!==i?(p=i.some(j),e[8]=i,e[9]=p):p=e[9],o=p,t.forEach((u,m)=>{const c=i[m];c?.data?r.set(u,c.data.map(d)):r.set(u,[])}),e[4]=t,e[5]=i,e[6]=o,e[7]=r}else o=e[6],r=e[7];let a;return e[10]!==o||e[11]!==r?(a={promptsMap:r,isLoading:o},e[10]=o,e[11]=r,e[12]=a):a=e[12],a}function d(t){return{name:t.name,description:t.description}}function j(t){return t.isLoading}function q(t){return{queryKey:f.connectionPrompts(t),queryFn:()=>h(t),staleTime:6e4,retry:!1}}async function w(t){const e=`/mcp/${t}`,s={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};try{const n=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{tools:{},resources:{},prompts:{}},clientInfo:{name:"mesh-resources",version:"1.0.0"}}})});if(!n.ok)return[];const i=await n.json();if(i.error)return[];const{capabilities:o}=i.result;if(!o?.resources)return[];const r=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"resources/list",params:{}})});if(!r.ok)return[];const a=await r.json();return a.error?[]:a.result?.resources||[]}catch{return[]}}function P(t){const e=l.c(13);let s;e[0]!==t?(s=t.map(g),e[0]=t,e[1]=s):s=e[1];let n;e[2]!==s?(n={queries:s},e[2]=s,e[3]=n):n=e[3];const i=y(n);let o,r;if(e[4]!==t||e[5]!==i){r=new Map;let p;e[8]!==i?(p=i.some(b),e[8]=i,e[9]=p):p=e[9],o=p,t.forEach((u,m)=>{const c=i[m];c?.data?r.set(u,c.data.map(S)):r.set(u,[])}),e[4]=t,e[5]=i,e[6]=o,e[7]=r}else o=e[6],r=e[7];let a;return e[10]!==o||e[11]!==r?(a={resourcesMap:r,isLoading:o},e[10]=o,e[11]=r,e[12]=a):a=e[12],a}function S(t){return{uri:t.uri,name:t.name,description:t.description}}function b(t){return t.isLoading}function g(t){return{queryKey:f.connectionResources(t),queryFn:()=>w(t),staleTime:6e4,retry:!1}}export{P as a,T as u};
@@ -1 +0,0 @@
1
- import{c as m,f as p}from"./index-B9c3bNyk.js";import{a as f}from"./use-virtual-mcp-CMArCljo.js";import{u as v}from"./project-context-provider-DJGvA4-w.js";function y(o){const e=m.c(10);let s;e[0]!==o?(s=o===void 0?{}:o,e[0]=o,e[1]=s):s=e[1];const d=s,{navigateOnCreate:g}=d,a=g===void 0?!1:g,{org:r}=v(),c=p(),t=f();let i;e[2]!==t.create||e[3]!==c||e[4]!==a||e[5]!==r?(i=async()=>{const u=await t.create.mutateAsync({title:"New Agent",description:"Agents let you securely expose integrated tools to the outside world.",status:"active",tool_selection_mode:"inclusion",connections:[]});return a&&c({to:"/$org/agents/$agentId",params:{org:r.slug,agentId:u.id}}),{id:u.id,virtualMcp:u}},e[2]=t.create,e[3]=c,e[4]=a,e[5]=r,e[6]=i):i=e[6];const l=i;let n;return e[7]!==t.create.isPending||e[8]!==l?(n={createVirtualMCP:l,isCreating:t.create.isPending},e[7]=t.create.isPending,e[8]=l,e[9]=n):n=e[9],n}export{y as u};
@@ -1 +0,0 @@
1
- import{c as E,K as b}from"./index-B9c3bNyk.js";import{u as j}from"./useQuery-CqMcSUvK.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 +0,0 @@
1
- import{c as o,v as n,K as u,a as i}from"./index-B9c3bNyk.js";import{u as a}from"./project-context-provider-DJGvA4-w.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 +0,0 @@
1
- import{c as f,v as y,x as p,K as m}from"./index-B9c3bNyk.js";import{u as T}from"./useMutation-BYfWAlPb.js";import{c as S}from"./connection-C0f0eQA8.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 +0,0 @@
1
- import{c as p,K as C,v as T}from"./index-B9c3bNyk.js";import{u as q}from"./useQuery-CqMcSUvK.js";import{u as K}from"./useMutation-BYfWAlPb.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 +0,0 @@
1
- import{r as T,c as h,x as S,K as r,t as a}from"./index-B9c3bNyk.js";import{u as p}from"./useMutation-BYfWAlPb.js";import{c as L}from"./connection-C0f0eQA8.js";import{u as M}from"./project-context-provider-DJGvA4-w.js";import{b as v,u as A}from"./use-collections-BnNAdJQg.js";const I=({size:e=24,color:t="currentColor",...o})=>T.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},T.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"}));I.displayName="CpuChip02";function F(e){const t=h.c(3);let o;t[0]!==e?(o=e===void 0?{}:e,t[0]=e,t[1]=o):o=t[1];const n=o,{org:s}=M();let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=L(),t[2]=l):l=t[2];const c=l;return v(s.slug,"VIRTUAL_MCP",c,n)}function Q(e){const t=h.c(1),{org:o}=M();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=L(),t[0]=n):n=t[0];const s=n;return A(o.slug,"VIRTUAL_MCP",e??void 0,s)}function $(){const e=h.c(17),{org:t}=M();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=L(),e[0]=o):o=e[0];const n=o,s=S();let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=async i=>(await n("COLLECTION_VIRTUAL_MCP_CREATE",{data:i})).item,e[1]=l):l=e[1];let c;e[2]!==t||e[3]!==s?(c={mutationFn:l,onSuccess:()=>{s.invalidateQueries({queryKey:r.collection(t.slug,t.slug,"VIRTUAL_MCP")}),s.invalidateQueries({queryKey:r.collection(t.slug,t.slug,"CONNECTIONS")}),a.success("Agent created successfully")},onError:N},e[2]=t,e[3]=s,e[4]=c):c=e[4];const _=p(c);let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=async i=>{const{id:E,data:P}=i;return(await n("COLLECTION_VIRTUAL_MCP_UPDATE",{id:E,data:P})).item},e[5]=u):u=e[5];let m;e[6]!==t||e[7]!==s?(m={mutationFn:u,onSuccess:()=>{s.invalidateQueries({queryKey:r.collection(t.slug,t.slug,"VIRTUAL_MCP")}),a.success("Agent updated successfully")},onError:b},e[6]=t,e[7]=s,e[8]=m):m=e[8];const g=p(m);let C;e[9]===Symbol.for("react.memo_cache_sentinel")?(C=async i=>(await n("COLLECTION_VIRTUAL_MCP_DELETE",{id:i})).item.id,e[9]=C):C=e[9];let d;e[10]!==t||e[11]!==s?(d={mutationFn:C,onSuccess:()=>{s.invalidateQueries({queryKey:r.collection(t.slug,t.slug,"VIRTUAL_MCP")}),s.invalidateQueries({queryKey:r.collection(t.slug,t.slug,"CONNECTIONS")}),a.success("Agent deleted successfully")},onError:V},e[10]=t,e[11]=s,e[12]=d):d=e[12];const y=p(d);let f;return e[13]!==_||e[14]!==y||e[15]!==g?(f={create:_,update:g,delete:y},e[13]=_,e[14]=y,e[15]=g,e[16]=f):f=e[16],f}function V(e){const t=e instanceof Error?e.message:String(e);a.error(`Failed to delete agent: ${t}`)}function b(e){const t=e instanceof Error?e.message:String(e);a.error(`Failed to update agent: ${t}`)}function N(e){const t=e instanceof Error?e.message:String(e);a.error(`Failed to create agent: ${t}`)}export{$ as a,Q as b,I as i,F as u};
@@ -1 +0,0 @@
1
- import{c as p}from"./index-B9c3bNyk.js";import{u as S}from"./project-context-provider-DJGvA4-w.js";import{u as L,L as P}from"./localstorage-keys-DJR10CLV.js";function E(t){const e=p.c(9),{locator:n}=S();let o;e[0]!==n?(o=P.virtualMcpSystemPrompts(n),e[0]=n,e[1]=o):o=e[1];let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s={},e[2]=s):s=e[2];const[f,l]=L(o,s),a=t?f[t]??"":"";let r;e[3]!==l||e[4]!==t?(r=i=>{t&&l(u=>({...u,[t]:i}))},e[3]=l,e[4]=t,e[5]=r):r=e[5];const c=r;let m;return e[6]!==c||e[7]!==a?(m=[a,c],e[6]=c,e[7]=a,e[8]=m):m=e[8],m}export{E as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./infiniteQueryObserver-DTO2dBsV.js";import{b8 as i}from"./index-B9c3bNyk.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{bf as l,bh as d,c3 as a,c4 as b,bg as h,x as p,r as o,bp as m,c5 as v}from"./index-B9c3bNyk.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),d(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&a(s.mutationKey)!==a(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??b();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(n=>e.subscribe(h.batchCalls(n)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((n,c)=>{e.mutate(n,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 +0,0 @@
1
- import{b8 as u,bj as s}from"./index-B9c3bNyk.js";function o(e,r){return u(e,s,r)}export{o as u};