decocms
Version:
Deco CMS — Self-hostable MCP Gateway for managing AI connections and tools
2 lines (1 loc) • 12.5 kB
JavaScript
import{c as bt,j as r,b as Et,r as St,I as pt}from"./index-ztdGKvBm.js";import{C as Pt}from"./checkbox-QUuOza1H.js";import{L as st}from"./label-8UxgpYiA.js";import{c as ct,S as nt,b as ut,a as ft,d as xt}from"./select-CxXZwsSr.js";import{u as kt}from"./use-never-published-BJeGnEQC.js";import{u as Nt}from"./use-autosave-3MAlhbEw.js";import{S as Rt}from"./save-status-DhQhbNh0.js";import{H as Ct,ap as Tt,y as ht,aq as Kt,V as It,ar as wt}from"./blocks-tab-states-8lUCpJRf.js";import{H as Ft}from"./held-block-view-QD0AvQ2Q.js";import"./Minus-hZzPDO0w.js";import"./index-BdQq_4o_.js";import"./index-CDQbtG2e.js";import"./ChevronDown-XsLJSrfl.js";import"./ChevronUp-BQktpZWC.js";import"./use-voice-input-BMrsODyI.js";import"./session-runtime-DBl1Hlcw.js";import"./chat-context-DFEln8mI.js";import"./use-panel-navigate-0z93k6Ut.js";import"./thread-route-CfpvvkkL.js";import"./use-project-scope-BwqdbGG4.js";import"./repository-binding-D_Xc1yRH.js";import"./use-mcp-client-2MG3LveS.js";import"./auth-C82OPjUx.js";import"./use-view-draft-kind-BopwZu5H.js";import"./use-blog-view-DMfZjkz0.js";import"./use-organization-settings-C2vcrj4S.js";import"./schema-Bb-DbvPZ.js";import"./task-board-i6qU2BVR.js";import"./thread-intent-DyZ5A9F9.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DdfLfQcH.js";import"./use-entitlements-Gn1rhCN5.js";import"./use-ai-providers-Ct2xvYDX.js";import"./use-current-view-DBmQQ8uy.js";import"./use-in-settings-CFQ9B3W2.js";import"./use-decopilot-events-43RPCkUH.js";import"./use-org-fs-D9dHgOYs.js";import"./useInfiniteQuery-Ypmdjx1e.js";import"./infiniteQueryObserver-C3KEOANj.js";import"./popover-C4oz5B-L.js";import"./drawer-CROtV2u4.js";import"./tooltip-Bm0P1gm_.js";import"./use-mobile-C_hdQY5I.js";import"./agent-icon-BYWtutu9.js";import"./AlertCircle-BlMH0XE7.js";import"./UserCheck01-k-4bTA2h.js";import"./Tool01-BCJ5kyrz.js";import"./ArrowUp-D5DDc3Cp.js";import"./ArrowLeft-B0PZnf1E.js";import"./ArrowRight-mzMrxxYI.js";import"./BookOpen01-DU-B3R7s.js";import"./Globe04-CeAQ1YNm.js";import"./CheckCircle-DZ8MNpCP.js";import"./ChevronSelectorVertical-CB0fn1Nq.js";import"./UserSquare-CafFh5_d.js";import"./LinkBroken01-DfUhihLM.js";import"./CreditCard01-MY4ouqtl.js";import"./File02-DaYek2y9.js";import"./MessageCircle01-BG1RhOiZ.js";import"./SwitchHorizontal01-CMdpIiQk.js";import"./Eye-kjjhS0vP.js";import"./Fingerprint04-B2fDIuT8.js";import"./Image01-BcIZ5mtf.js";import"./Key01-CaJGjh13.js";import"./LayoutLeft-DDtN-od-.js";import"./Monitor01-DMFbvudn.js";import"./Sun-O9TdKcV_.js";import"./Play-BCFOaioW.js";import"./Plus-DWySsEmB.js";import"./SearchMd-BD2qldmS.js";import"./ShoppingBag01-BbjW7cod.js";import"./Trash01-BxBhF2b8.js";import"./Upload01-q-rKSvZf.js";import"./Users01-DM58_gUL.js";import"./XClose-CmTuu4UN.js";import"./Zap-CBJ7My90.js";import"./index-CJKec1wg.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./site-editor-toast-Dq7SmLyr.js";import"./content-changes-BFwm7dNe.js";import"./sandbox-url-D3mC8qhT.js";import"./use-sandbox-events-E6fWuIsO.js";import"./use-blocks-v8-project-BPvEDyS9.js";import"./utils-COdvgYqW.js";import"./sandbox-git-api-BsG4EzUP.js";import"./hosted-reconcile-rjhKNGnc.js";import"./search-input-BQ8Dp8aD.js";import"./tabs-nQ7_UOyl.js";import"./active-indicator-CCMhAsc_.js";import"./use-debounced-value-DO5dvp6c.js";import"./use-file-configs-3gwPBXwK.js";import"./asset-utils-DP9aQr9Q.js";import"./usage-stats-B0_Yl-r0.js";import"./utils-CVEq3hMx.js";import"./markdown-CJR_ooUO.js";import"./use-copy-DT4_uVrH.js";import"./gateway-client-B4qzR3sF.js";import"./form-DlZ0KMAb.js";import"./category-tree-DGOo1BAt.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-DmyTA2cC.js";import"./collapsible-CadTVXY4.js";import"./task-key-Bt60Ndov.js";import"./use-task-board-items-D2aUd0HA.js";import"./config-LEYSFIMn.js";import"./task-route-C3cK6F8S.js";import"./project-index-C2IrSomv.js";import"./shell-layout-UF80oiAz.js";import"./use-deployment-admin-Cr4LWHG9.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-Bg0zOPPj.js";import"./command-C3tlrKUq.js";import"./index-DMpANy5-.js";import"./integration-icon-Bo-3z9o3.js";import"./project-icon-fQqckccl.js";import"./use-navigate-to-agent-Cw8_3uU5.js";import"./new-project-dialog-BW6Lh52P.js";import"./repository-picker-CSaozawA.js";import"./github-icon-Bq9Ot22_.js";import"./collection-search-DkVgkcUC.js";import"./new-project-store-DID5OVrt.js";import"./legacy-admin-welcome-dialog-plmLACwz.js";import"./required-auth-layout-Cwtu4iIe.js";import"./use-org-sso-_fzcS8V-.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DU6s3Olv.js";import"./types-5-cDe_8u.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-C-umRrOH.js";import"./use-connection-CcG4QE1K.js";import"./use-mcp-prompts-qJSiAdA5.js";import"./use-thread-outputs-BK5BfLdO.js";import"./file-type-icon-CdjLDWdN.js";import"./section-array-field-uECXIzc8.js";import"./switch-B81oLbqr.js";import"./toggle-group-yQeAFu4u.js";import"./match-site-slug-config-B47_xZCi.js";import"./empty-state-I_cTbW85.js";import"./calendar-DNzaYWCQ.js";import"./textarea-viSdm6BE.js";import"./editor-classes-DYlqLnQ7.js";import"./sortable.esm-CKl9Rez4.js";import"./named-rule-step-BUKBZ8bi.js";import"./slider-Cqj9bgcu.js";import"./index-MkoN5oFR.js";import"./tooltipContext-CSDtg0Lk.js";import"./CategoricalChart-wSsXuALZ.js";import"./index-rjS4IUT9.js";import"./combobox-2rKAfmHD.js";import"./scroll-area-Dm3EbBj1.js";const at="type";function Mt(i){return i.split(/\*\*(.+?)\*\*/).map((t,a)=>a%2===1?r.jsx("strong",{children:t},a):r.jsx(St.Fragment,{children:t},a))}const _t=[{value:"temporary",labelKey:"sandbox.redirectEditor.typeTemporary"},{value:"permanent",labelKey:"sandbox.redirectEditor.typePermanent"}];function Lt(i){const t=bt.c(125),{orgSlug:a,virtualMcpId:u,branch:d,blockKey:c,block:p,rule:dt}=i,n=dt===void 0?null:dt,e=Et();let Z;t[0]!==d||t[1]!==a||t[2]!==u?(Z={orgSlug:a,virtualMcpId:u,branch:d},t[0]=d,t[1]=a,t[2]=u,t[3]=Z):Z=t[3];let tt;t[4]===Symbol.for("react.memo_cache_sentinel")?(tt={holdsCopy:!0},t[4]=tt):tt=t[4];const s=kt(Z,tt);let et;t[5]!==p||t[6]!==n?(et=n===null?Ct(p):Tt(p,n),t[5]=p,t[6]=n,t[7]=et):et=t[7];const yt=et;let rt;t[8]!==p||t[9]!==c||t[10]!==n||t[11]!==s?(rt=l=>{s.mutate({blockKey:c,data:n===null?It(l,p):wt(p,n,l)})},t[8]=p,t[9]=c,t[10]=n,t[11]=s,t[12]=rt):rt=t[12];let f;t[13]!==c||t[14]!==s?(f=()=>s.hold(c),t[13]=c,t[14]=s,t[15]=f):f=t[15];let it;t[16]!==s.isPending||t[17]!==f?(it={isSaving:s.isPending,onSeed:f},t[16]=s.isPending,t[17]=f,t[18]=it):it=t[18];const[o,mt]=Nt(yt,rt,it);let ot;t[19]!==o||t[20]!==mt?(ot=l=>mt({...o,...l}),t[19]=o,t[20]=mt,t[21]=ot):ot=t[21];const m=ot;let x;t[22]!==e?(x=e("sandbox.redirectEditor.title"),t[22]=e,t[23]=x):x=t[23];let h;t[24]!==x?(h=r.jsx("span",{className:"text-sm font-medium",children:x}),t[24]=x,t[25]=h):h=t[25];let b;t[26]!==s.isError||t[27]!==s.isPending?(b=r.jsx(Rt,{isPending:s.isPending,isError:s.isError}),t[26]=s.isError,t[27]=s.isPending,t[28]=b):b=t[28];let y;t[29]!==h||t[30]!==b?(y=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[h,b]}),t[29]=h,t[30]=b,t[31]=y):y=t[31];let j;t[32]!==e?(j=e("sandbox.redirectEditor.fromLabel"),t[32]=e,t[33]=j):j=t[33];let g;t[34]!==j?(g=r.jsx(st,{htmlFor:"redirect-from",children:j}),t[34]=j,t[35]=g):g=t[35];const jt=o.from;let v;t[36]!==e?(v=e("sandbox.redirectEditor.fromPlaceholder"),t[36]=e,t[37]=v):v=t[37];let E;t[38]!==m?(E=l=>m({from:l.target.value}),t[38]=m,t[39]=E):E=t[39];let S;t[40]!==o.from||t[41]!==v||t[42]!==E?(S=r.jsx(pt,{id:"redirect-from",value:jt,placeholder:v,onChange:E,className:"h-10"}),t[40]=o.from,t[41]=v,t[42]=E,t[43]=S):S=t[43];let P;t[44]!==e?(P=e("sandbox.redirectEditor.fromDescription"),t[44]=e,t[45]=P):P=t[45];let k;t[46]!==P?(k=r.jsx("p",{className:"text-xs text-muted-foreground",children:P}),t[46]=P,t[47]=k):k=t[47];let N;t[48]!==g||t[49]!==S||t[50]!==k?(N=r.jsxs("div",{className:"space-y-2",children:[g,S,k]}),t[48]=g,t[49]=S,t[50]=k,t[51]=N):N=t[51];let R;t[52]!==e?(R=e("sandbox.redirectEditor.toLabel"),t[52]=e,t[53]=R):R=t[53];let C;t[54]!==R?(C=r.jsx(st,{htmlFor:"redirect-to",children:R}),t[54]=R,t[55]=C):C=t[55];const gt=o.to;let T;t[56]!==e?(T=e("sandbox.redirectEditor.toPlaceholder"),t[56]=e,t[57]=T):T=t[57];let K;t[58]!==m?(K=l=>m({to:l.target.value}),t[58]=m,t[59]=K):K=t[59];let I;t[60]!==o.to||t[61]!==T||t[62]!==K?(I=r.jsx(pt,{id:"redirect-to",value:gt,placeholder:T,onChange:K,className:"h-10"}),t[60]=o.to,t[61]=T,t[62]=K,t[63]=I):I=t[63];let w;t[64]!==e?(w=e("sandbox.redirectEditor.toDescription"),t[64]=e,t[65]=w):w=t[65];let F;t[66]!==w?(F=r.jsx("p",{className:"text-xs text-muted-foreground",children:w}),t[66]=w,t[67]=F):F=t[67];let M;t[68]!==C||t[69]!==I||t[70]!==F?(M=r.jsxs("div",{className:"space-y-2",children:[C,I,F]}),t[68]=C,t[69]=I,t[70]=F,t[71]=M):M=t[71];let _;t[72]!==e?(_=e("sandbox.redirectEditor.typeLabel"),t[72]=e,t[73]=_):_=t[73];let L;t[74]!==_?(L=r.jsx(st,{htmlFor:"redirect-type",children:_}),t[74]=_,t[75]=L):L=t[75];const vt=o.type;let D;t[76]!==m?(D=l=>m({type:l}),t[76]=m,t[77]=D):D=t[77];let Q;t[78]!==e?(Q=e("sandbox.redirectEditor.typePlaceholder"),t[78]=e,t[79]=Q):Q=t[79];let V;t[80]!==Q?(V=r.jsx(ut,{id:"redirect-type",className:"h-10 w-full",children:r.jsx(ft,{placeholder:Q})}),t[80]=Q,t[81]=V):V=t[81];let B;t[82]!==o||t[83]!==e?(B=_t.map(l=>r.jsx(ct,{value:l.value,children:e(l.labelKey,{status:ht({...o,type:l.value,status:void 0})})},l.value)),t[82]=o,t[83]=e,t[84]=B):B=t[84];let H;t[85]!==B?(H=r.jsx(xt,{children:B}),t[85]=B,t[86]=H):H=t[86];let O;t[87]!==o.type||t[88]!==D||t[89]!==V||t[90]!==H?(O=r.jsxs(nt,{value:vt,onValueChange:D,children:[V,H]}),t[87]=o.type,t[88]=D,t[89]=V,t[90]=H,t[91]=O):O=t[91];let A;t[92]!==e?(A=Mt(e("sandbox.redirectEditor.typeHint")),t[92]=e,t[93]=A):A=t[93];let U;t[94]!==A?(U=r.jsx("p",{className:"text-xs text-muted-foreground",children:A}),t[94]=A,t[95]=U):U=t[95];let Y;t[96]!==L||t[97]!==O||t[98]!==U?(Y=r.jsxs("div",{className:"space-y-2",children:[L,O,U]}),t[96]=L,t[97]=O,t[98]=U,t[99]=Y):Y=t[99];let $;t[100]!==o||t[101]!==m||t[102]!==e?($=o.flat&&r.jsxs("div",{className:"space-y-2",children:[r.jsx(st,{htmlFor:"redirect-status",children:e("sandbox.redirectEditor.statusLabel")}),r.jsxs(nt,{value:o.status?String(o.status):at,onValueChange:l=>m({status:l===at?void 0:Number(l)}),children:[r.jsx(ut,{id:"redirect-status",className:"h-10 w-full",children:r.jsx(ft,{})}),r.jsxs(xt,{children:[r.jsx(ct,{value:at,children:e("sandbox.redirectEditor.statusFromType",{status:ht({...o,status:void 0})})}),Kt.map(Dt)]})]}),r.jsx("p",{className:"text-xs text-muted-foreground",children:e("sandbox.redirectEditor.statusDescription")})]}),t[100]=o,t[101]=m,t[102]=e,t[103]=$):$=t[103];let q;t[104]!==m?(q=l=>m({discardQueryParameters:l===!0}),t[104]=m,t[105]=q):q=t[105];let z;t[106]!==o.discardQueryParameters||t[107]!==q?(z=r.jsx(Pt,{checked:o.discardQueryParameters,onCheckedChange:q}),t[106]=o.discardQueryParameters,t[107]=q,t[108]=z):z=t[108];let G;t[109]!==e?(G=e("sandbox.redirectEditor.discardQueryParameters"),t[109]=e,t[110]=G):G=t[110];let J;t[111]!==G?(J=r.jsx("span",{className:"text-sm",children:G}),t[111]=G,t[112]=J):J=t[112];let W;t[113]!==z||t[114]!==J?(W=r.jsxs("label",{className:"flex cursor-pointer items-center gap-2.5",children:[z,J]}),t[113]=z,t[114]=J,t[115]=W):W=t[115];let X;t[116]!==N||t[117]!==M||t[118]!==Y||t[119]!==$||t[120]!==W?(X=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsxs("div",{className:"mx-auto max-w-xl space-y-6",children:[N,M,Y,$,W]})}),t[116]=N,t[117]=M,t[118]=Y,t[119]=$,t[120]=W,t[121]=X):X=t[121];let lt;return t[122]!==y||t[123]!==X?(lt=r.jsxs("div",{className:"flex h-full flex-col",children:[y,X]}),t[122]=y,t[123]=X,t[124]=lt):lt=t[124],lt}function Dt(i){return r.jsx(ct,{value:String(i),children:i},i)}function Ci(i){const t=bt.c(13);let a;t[0]!==i.block||t[1]!==i.blockKey?(a={[i.blockKey]:i.block},t[0]=i.block,t[1]=i.blockKey,t[2]=a):a=t[2];const u=i.block!==void 0;let d;t[3]!==i?(d=r.jsx(Lt,{...i}),t[3]=i,t[4]=d):d=t[4];let c;return t[5]!==i.blockKey||t[6]!==i.branch||t[7]!==i.orgSlug||t[8]!==i.virtualMcpId||t[9]!==a||t[10]!==u||t[11]!==d?(c=r.jsx(Ft,{listing:a,orgSlug:i.orgSlug,virtualMcpId:i.virtualMcpId,branch:i.branch,blockKey:i.blockKey,present:u,children:d}),t[5]=i.blockKey,t[6]=i.branch,t[7]=i.orgSlug,t[8]=i.virtualMcpId,t[9]=a,t[10]=u,t[11]=d,t[12]=c):c=t[12],c}export{Ci as RedirectEditor};