UNPKG

decocms

Version:

Deco CMS — Self-hostable MCP Gateway for managing AI connections and tools

2 lines (1 loc) • 1.34 kB
import{c as y,f as _,u as x,a6 as j,h5 as S,aY as b,hQ as v,j as p,N as d}from"./index-DoEtSiIe.js";import{L}from"./legacy-main-redirect-oBYkuRmD.js";import"./thread-route-D-UE3Db_.js";function k(){const e=y.c(16);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const g=_(o);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[1]=n):n=e[1];const s=x(n),{org:t}=j(),f="_splat"in g&&typeof g._splat=="string"?g._splat:"";let c,a;if(e[2]!==t.id||e[3]!==t.slug||e[4]!==s||e[5]!==f){a=Symbol.for("react.early_return_sentinel");e:{const m=f.split("/").find(Boolean);if(!m){let r;e[8]!==t.slug?(r={org:t.slug},e[8]=t.slug,e[9]=r):r=e[9];let u;e[10]!==s||e[11]!==r?(u=p.jsx(d,{to:"/$org/projects",params:r,search:s,hash:!0,replace:!0}),e[10]=s,e[11]=r,e[12]=u):u=e[12],a=u;break e}const h=S({virtualMcpIdSearch:s.virtualmcpid,fallbackAgentId:b(t.id).id});c=v({org:t.slug,agentId:h,panel:m,source:"view-first",search:s})}e[2]=t.id,e[3]=t.slug,e[4]=s,e[5]=f,e[6]=c,e[7]=a}else c=e[6],a=e[7];if(a!==Symbol.for("react.early_return_sentinel"))return a;const l=c;let i;return e[13]!==t.slug||e[14]!==l?(i=l?.kind==="canonical"?p.jsx(L,{target:{route:l.route,search:l.search}}):p.jsx(d,{to:"/$org/home",params:{org:t.slug},replace:!0}),e[13]=t.slug,e[14]=l,e[15]=i):i=e[15],i}export{k as default};