import{cg as e,b6 as n,r as t,a_ as o,l as r,mo as s,h9 as i,iX as c,mp as a,g_ as l,g$ as d,$K as m}from"./c6eedc03a-CsEFTfjy.js";import{r as u}from"./vendor-react-Dp9pL_Wn.js";import{u as p}from"./vendor-intl-D2wGIp4M.js";import{I4 as f,I3 as g,jh as b}from"./index-CBEPphRm.js";function y(){const o=e(),r=n(e=>e.remoteStreamFirstPassComplete),s=n(e=>e.remoteStreamErrored),{isLoading:i}=t(),[c,a]=u.useState(!1);return u.useEffect(()=>{if(r)return;const e=setTimeout(()=>a(!0),1e3);return()=>clearTimeout(e)},[r]),{isLoading:o||i||!r&&!c,remoteStreamErrored:s}}const h={"https://gmail.mcp.claude.com/mcp":["google"],"https://gmailmcp.googleapis.com/mcp/v1":["google"]};function k(e){return!!e.extension||"local"===e.connector?.type||!!e.connector?.localConfig}function x(e){const n=p(),t=f(),m=g(),{extensions:y}=b(),k=o(),x=r("claudeai_org_disabled_connector_rows")&&(e?.includeOrgBlocked??!1),w=u.useMemo(()=>k.filter(e=>!s(e)),[k]);return u.useMemo(()=>{const e=[];m.filter(e=>(e.enabledForOrg||x&&e.blockedByOrgAdmin)&&e.type!==i.CANVAS).forEach(n=>{const o=!n.enabledForOrg;e.push({id:`integration-${n.type}`,name:t(n.type),iconType:"syncSource",iconSrc:n.type,firstPartyIntegration:{syncSourceType:n.type,enabledForOrg:n.enabledForOrg},isConnected:!o&&(n.connected??!1),orgHasNotEnabled:o,description:n.type===i.GITHUB?"Connect your GitHub account to give Claude access to your repositories across Claude's products.\n\n- **Chat** \u2014 Attach files directly from a repo when asking Claude a question.\n- **Projects** \u2014 Sync repository files into a Project so Claude always has your codebase as context.\n- **Claude Code** \u2014 Select repositories, browse branches, and track pull requests in remote sessions.\n- **And more** \u2014 Power repository selection across code review, admin settings, and other GitHub-backed features.":c.find(e=>e.syncSourceType===n.type)?.description})});const o=new Set;return y.forEach(n=>{const t=n.manifest.display_name??n.manifest.name;o.add(t);const r=w.find(e=>"local"===e.type&&e.name===t);e.push({id:n.id,name:t,iconType:"extension",extension:n,connector:r,isConnected:n.settings.isEnabled,description:r?.directoryMetadata?.description})}),w.forEach(t=>{if(o.has(t.name))return;const r="remote"===t.type?function(e){if(l(e.authStatus)||d(e.connectionError))return!1;if(!0===e.isConnected)return!0;if(null!==e.connectionState&&void 0!==e.connectionState)return"connected"===e.connectionState;return e.isConnected??!1}(t):t.isConnected??!1;e.push({id:t.uuid,name:a(n,t.name),iconType:t.iconType,iconSrc:t.iconSrc,connector:t,localConfig:t.localConfig,isConnected:r,description:t.directoryMetadata?.description,searchTerms:t.url?h[t.url]:void 0})}),e},[w,y,m,x,t,n])}function w(e){return e.some(e=>e.orgHasNotEnabled)?e.filter(e=>!e.orgHasNotEnabled):e}function C(e,n){return e.name.localeCompare(n.name)}function S(e){return l(e.connector?.authStatus)||d(e.connector?.connectionError)||"initiated"===e.connector?.connectionState||"error"===e.connector?.connectionState}function v(e,n){const t=S(e);if(t!==S(n))return t?-1:1;const o=!!e.orgHasNotEnabled;return o!==!!n.orgHasNotEnabled?o?1:-1:C(e,n)}function E(e){return{connectedWebItems:e.filter(e=>e.isConnected&&!k(e)).toSorted(C),connectedDesktopItems:e.filter(e=>e.isConnected&&k(e)).toSorted(C),notConnectedItems:e.filter(e=>!e.isConnected).toSorted(v)}}function _(e){const n=r("claudeai_mcp_servers_with_connection");return u.useState(()=>m.clear()),u.useEffect(()=>()=>m.clear(),[]),u.useMemo(()=>{if(!n)return E(e);const t=e=>void 0!==e.connector&&m.has(e.connector.uuid);return{connectedWebItems:e.filter(e=>e.isConnected&&!k(e)&&!t(e)).toSorted(C),connectedDesktopItems:e.filter(e=>e.isConnected&&k(e)&&!t(e)).toSorted(C),notConnectedItems:e.filter(e=>!e.isConnected||t(e)).toSorted(v)}},[e,n])}
/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
 * Released under the MIT license
 * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
 *-----------------------------------------------------------------------------*/var A={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)"),end:new RegExp("^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)")}}};const F=Object.freeze(Object.defineProperty({__proto__:null,conf:A,language:{defaultToken:"",tokenPostfix:".fs",keywords:["abstract","and","atomic","as","assert","asr","base","begin","break","checked","component","const","constraint","constructor","continue","class","default","delegate","do","done","downcast","downto","elif","else","end","exception","eager","event","external","extern","false","finally","for","fun","function","fixed","functor","global","if","in","include","inherit","inline","interface","internal","land","lor","lsl","lsr","lxor","lazy","let","match","member","mod","module","mutable","namespace","method","mixin","new","not","null","of","open","or","object","override","private","parallel","process","protected","pure","public","rec","return","static","sealed","struct","sig","then","to","true","tailcall","trait","try","type","upcast","use","val","void","virtual","volatile","when","while","with","yield"],symbols:/[=><!~?:&|+\-*\^%;\.,\/]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,integersuffix:/[uU]?[yslnLI]?/,floatsuffix:/[fFmM]?/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/\[<.*>\]/,"annotation"],[/^#(if|else|endif)/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0x[0-9a-fA-F]+LF/,"number.float"],[/0x[0-9a-fA-F]+(@integersuffix)/,"number.hex"],[/0b[0-1]+(@integersuffix)/,"number.bin"],[/\d+(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string",'@string."""'],[/"/,"string",'@string."'],[/\@"/,{token:"string.quote",next:"@litstring"}],[/'[^\\']'B?/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\(\*(?!\))/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^*(]+/,"comment"],[/\*\)/,"comment","@pop"],[/\*/,"comment"],[/\(\*\)/,"comment"],[/\(/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/("""|"B?)/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]]}}},Symbol.toStringTag,{value:"Module"}));
/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
 * Released under the MIT license
 * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
 *-----------------------------------------------------------------------------*/const I=Object.freeze(Object.defineProperty({__proto__:null,conf:{comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"}]},language:{defaultToken:"",tokenPostfix:".go",keywords:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var","bool","true","false","uint8","uint16","uint32","uint64","int8","int16","int32","int64","float32","float64","complex64","complex128","byte","rune","uint","int","uintptr","string","nil"],operators:["+","-","*","/","%","&","|","^","<<",">>","&^","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=","&^=","&&","||","<-","++","--","==","<",">","=","!","!=","<=",">=",":=","...","(",")","","]","{","}",",",";",".",":"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/\[\[.*\]\]/,"annotation"],[/^\s*#\w+/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex"],[/0[0-7']*[0-7]/,"number.octal"],[/0[bB][0-1']*[0-1]/,"number.binary"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/`/,"string","@rawstring"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],rawstring:[[/[^\`]/,"string"],[/`/,"string","@pop"]]}}},Symbol.toStringTag,{value:"Module"}));export{y as a,_ as b,E as c,F as f,I as g,k as i,w as s,x as u};
