import{r as o}from"./index-_B-Zy6Ft.js";import{c as s}from"./constants-C8myDR0I.js";const c=({size:t=24,color:n="currentColor",...e})=>o.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:n,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e},o.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"}));c.displayName="Globe02";function m(t){return t?t.find(e=>e.name.endsWith("_LIST"))?.name??"":""}function d(t){return t?t.find(e=>e.name.endsWith("_FILTERS"))?.name??"":""}function h(t){if(!t)return[];const n=[];for(const e of t){let r=[];if(Array.isArray(e))r=e;else if(typeof e=="object"&&e!==null){const i=Object.keys(e).find(a=>Array.isArray(e[a]));i&&(r=e[i])}n.push(...r)}return n}const l={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function y(t){return t?l[t]??t.toUpperCase():null}function T(t){return t?t.match(/schemas\/([\d-]+)/)?.[1]??null:null}function b(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const n=Object.keys(t).find(e=>Array.isArray(t[e]));if(n)return t[n]}return[]}async function A(t,n,e,r){const i=await s({connectionId:t,orgId:n});try{const a=await i.callTool({name:e,arguments:r});return a.structuredContent??a}finally{await i.close().catch(console.error)}}export{h as a,d as b,T as c,A as d,b as e,m as f,y as g,c as s};
