@mcp-graph-workflow/mcp-graph 5.0.4 → 5.0.5

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.
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/graph-tab-BK8wjCuY.js","assets/graph-utils-qelY_PVT.js","assets/constants-BIEJOBya.js","assets/graph-utils-BZV40eAE.css","assets/prd-backlog-tab-DkTq385t.js","assets/gitnexus-tab-DMCU41Nr.js","assets/gitnexus-tab-DEqMBSbC.css","assets/insights-tab-OQnPT7h1.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/graph-tab-Dp7PfUEJ.js","assets/graph-utils-D5iPoiPD.js","assets/constants-BIEJOBya.js","assets/graph-utils-BZV40eAE.css","assets/prd-backlog-tab-BBLpErTk.js","assets/gitnexus-tab-D7If6lxT.js","assets/gitnexus-tab-DEqMBSbC.css","assets/insights-tab-CLA0OIxd.js"])))=>i.map(i=>d[i]);
2
2
  var ah=Object.defineProperty;var uh=(m,A,_)=>A in m?ah(m,A,{enumerable:!0,configurable:!0,writable:!0,value:_}):m[A]=_;var Ln=(m,A,_)=>uh(m,typeof A!="symbol"?A+"":A,_);(function(){const A=document.createElement("link").relList;if(A&&A.supports&&A.supports("modulepreload"))return;for(const M of document.querySelectorAll('link[rel="modulepreload"]'))s(M);new MutationObserver(M=>{for(const C of M)if(C.type==="childList")for(const G of C.addedNodes)G.tagName==="LINK"&&G.rel==="modulepreload"&&s(G)}).observe(document,{childList:!0,subtree:!0});function _(M){const C={};return M.integrity&&(C.integrity=M.integrity),M.referrerPolicy&&(C.referrerPolicy=M.referrerPolicy),M.crossOrigin==="use-credentials"?C.credentials="include":M.crossOrigin==="anonymous"?C.credentials="omit":C.credentials="same-origin",C}function s(M){if(M.ep)return;M.ep=!0;const C=_(M);fetch(M.href,C)}})();function nh(m){return m&&m.__esModule&&Object.prototype.hasOwnProperty.call(m,"default")?m.default:m}var sf={exports:{}},Tu={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
@@ -50,4 +50,4 @@ Error generating stack: `+a.message+`
50
50
  `).replace(Av,"")}function Gr(l,t){return t=Yr(t),Yr(l)===t}function vl(l,t,e,a,u,n){switch(e){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Fe(l,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Fe(l,""+a);break;case"className":ju(l,"class",a);break;case"tabIndex":ju(l,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ju(l,e,a);break;case"style":Yf(l,a,n);break;case"data":if(t!=="object"){ju(l,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||e!=="href")){l.removeAttribute(e);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){l.removeAttribute(e);break}a=Cu(""+a),l.setAttribute(e,a);break;case"action":case"formAction":if(typeof a=="function"){l.setAttribute(e,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof n=="function"&&(e==="formAction"?(t!=="input"&&vl(l,t,"name",u.name,u,null),vl(l,t,"formEncType",u.formEncType,u,null),vl(l,t,"formMethod",u.formMethod,u,null),vl(l,t,"formTarget",u.formTarget,u,null)):(vl(l,t,"encType",u.encType,u,null),vl(l,t,"method",u.method,u,null),vl(l,t,"target",u.target,u,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){l.removeAttribute(e);break}a=Cu(""+a),l.setAttribute(e,a);break;case"onClick":a!=null&&(l.onclick=qt);break;case"onScroll":a!=null&&P("scroll",l);break;case"onScrollEnd":a!=null&&P("scrollend",l);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(s(61));if(e=a.__html,e!=null){if(u.children!=null)throw Error(s(60));l.innerHTML=e}}break;case"multiple":l.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":l.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){l.removeAttribute("xlink:href");break}e=Cu(""+a),l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?l.setAttribute(e,""+a):l.removeAttribute(e);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?l.setAttribute(e,""):l.removeAttribute(e);break;case"capture":case"download":a===!0?l.setAttribute(e,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?l.setAttribute(e,a):l.removeAttribute(e);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?l.setAttribute(e,a):l.removeAttribute(e);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?l.removeAttribute(e):l.setAttribute(e,a);break;case"popover":P("beforetoggle",l),P("toggle",l),Mu(l,"popover",a);break;case"xlinkActuate":Bt(l,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Bt(l,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Bt(l,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Bt(l,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Bt(l,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Bt(l,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Bt(l,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Bt(l,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Bt(l,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Mu(l,"is",a);break;case"innerText":case"textContent":break;default:(!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(e=Pd.get(e)||e,Mu(l,e,a))}}function Vi(l,t,e,a,u,n){switch(e){case"style":Yf(l,a,n);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(s(61));if(e=a.__html,e!=null){if(u.children!=null)throw Error(s(60));l.innerHTML=e}}break;case"children":typeof a=="string"?Fe(l,a):(typeof a=="number"||typeof a=="bigint")&&Fe(l,""+a);break;case"onScroll":a!=null&&P("scroll",l);break;case"onScrollEnd":a!=null&&P("scrollend",l);break;case"onClick":a!=null&&(l.onclick=qt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Df.hasOwnProperty(e))l:{if(e[0]==="o"&&e[1]==="n"&&(u=e.endsWith("Capture"),t=e.slice(2,u?e.length-7:void 0),n=l[Pl]||null,n=n!=null?n[e]:null,typeof n=="function"&&l.removeEventListener(t,n,u),typeof a=="function")){typeof n!="function"&&n!==null&&(e in l?l[e]=null:l.hasAttribute(e)&&l.removeAttribute(e)),l.addEventListener(t,a,u);break l}e in l?l[e]=a:a===!0?l.setAttribute(e,""):Mu(l,e,a)}}}function Jl(l,t,e){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":P("error",l),P("load",l);var a=!1,u=!1,n;for(n in e)if(e.hasOwnProperty(n)){var c=e[n];if(c!=null)switch(n){case"src":a=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:vl(l,t,n,c,e,null)}}u&&vl(l,t,"srcSet",e.srcSet,e,null),a&&vl(l,t,"src",e.src,e,null);return;case"input":P("invalid",l);var i=n=c=u=null,f=null,h=null;for(a in e)if(e.hasOwnProperty(a)){var p=e[a];if(p!=null)switch(a){case"name":u=p;break;case"type":c=p;break;case"checked":f=p;break;case"defaultChecked":h=p;break;case"value":n=p;break;case"defaultValue":i=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(s(137,t));break;default:vl(l,t,a,p,e,null)}}Rf(l,n,i,f,h,c,u,!1);return;case"select":P("invalid",l),a=c=n=null;for(u in e)if(e.hasOwnProperty(u)&&(i=e[u],i!=null))switch(u){case"value":n=i;break;case"defaultValue":c=i;break;case"multiple":a=i;default:vl(l,t,u,i,e,null)}t=n,e=c,l.multiple=!!a,t!=null?$e(l,!!a,t,!1):e!=null&&$e(l,!!a,e,!0);return;case"textarea":P("invalid",l),n=u=a=null;for(c in e)if(e.hasOwnProperty(c)&&(i=e[c],i!=null))switch(c){case"value":a=i;break;case"defaultValue":u=i;break;case"children":n=i;break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(s(91));break;default:vl(l,t,c,i,e,null)}Bf(l,a,u,n);return;case"option":for(f in e)if(e.hasOwnProperty(f)&&(a=e[f],a!=null))switch(f){case"selected":l.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:vl(l,t,f,a,e,null)}return;case"dialog":P("beforetoggle",l),P("toggle",l),P("cancel",l),P("close",l);break;case"iframe":case"object":P("load",l);break;case"video":case"audio":for(a=0;a<mu.length;a++)P(mu[a],l);break;case"image":P("error",l),P("load",l);break;case"details":P("toggle",l);break;case"embed":case"source":case"link":P("error",l),P("load",l);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(h in e)if(e.hasOwnProperty(h)&&(a=e[h],a!=null))switch(h){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:vl(l,t,h,a,e,null)}return;default:if(uc(t)){for(p in e)e.hasOwnProperty(p)&&(a=e[p],a!==void 0&&Vi(l,t,p,a,e,void 0));return}}for(i in e)e.hasOwnProperty(i)&&(a=e[i],a!=null&&vl(l,t,i,a,e,null))}function _v(l,t,e,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,n=null,c=null,i=null,f=null,h=null,p=null;for(S in e){var E=e[S];if(e.hasOwnProperty(S)&&E!=null)switch(S){case"checked":break;case"value":break;case"defaultValue":f=E;default:a.hasOwnProperty(S)||vl(l,t,S,null,a,E)}}for(var y in a){var S=a[y];if(E=e[y],a.hasOwnProperty(y)&&(S!=null||E!=null))switch(y){case"type":n=S;break;case"name":u=S;break;case"checked":h=S;break;case"defaultChecked":p=S;break;case"value":c=S;break;case"defaultValue":i=S;break;case"children":case"dangerouslySetInnerHTML":if(S!=null)throw Error(s(137,t));break;default:S!==E&&vl(l,t,y,S,a,E)}}ec(l,c,i,f,h,p,n,u);return;case"select":S=c=i=y=null;for(n in e)if(f=e[n],e.hasOwnProperty(n)&&f!=null)switch(n){case"value":break;case"multiple":S=f;default:a.hasOwnProperty(n)||vl(l,t,n,null,a,f)}for(u in a)if(n=a[u],f=e[u],a.hasOwnProperty(u)&&(n!=null||f!=null))switch(u){case"value":y=n;break;case"defaultValue":i=n;break;case"multiple":c=n;default:n!==f&&vl(l,t,u,n,a,f)}t=i,e=c,a=S,y!=null?$e(l,!!e,y,!1):!!a!=!!e&&(t!=null?$e(l,!!e,t,!0):$e(l,!!e,e?[]:"",!1));return;case"textarea":S=y=null;for(i in e)if(u=e[i],e.hasOwnProperty(i)&&u!=null&&!a.hasOwnProperty(i))switch(i){case"value":break;case"children":break;default:vl(l,t,i,null,a,u)}for(c in a)if(u=a[c],n=e[c],a.hasOwnProperty(c)&&(u!=null||n!=null))switch(c){case"value":y=u;break;case"defaultValue":S=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(s(91));break;default:u!==n&&vl(l,t,c,u,a,n)}Hf(l,y,S);return;case"option":for(var R in e)if(y=e[R],e.hasOwnProperty(R)&&y!=null&&!a.hasOwnProperty(R))switch(R){case"selected":l.selected=!1;break;default:vl(l,t,R,null,a,y)}for(f in a)if(y=a[f],S=e[f],a.hasOwnProperty(f)&&y!==S&&(y!=null||S!=null))switch(f){case"selected":l.selected=y&&typeof y!="function"&&typeof y!="symbol";break;default:vl(l,t,f,y,a,S)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Z in e)y=e[Z],e.hasOwnProperty(Z)&&y!=null&&!a.hasOwnProperty(Z)&&vl(l,t,Z,null,a,y);for(h in a)if(y=a[h],S=e[h],a.hasOwnProperty(h)&&y!==S&&(y!=null||S!=null))switch(h){case"children":case"dangerouslySetInnerHTML":if(y!=null)throw Error(s(137,t));break;default:vl(l,t,h,y,a,S)}return;default:if(uc(t)){for(var hl in e)y=e[hl],e.hasOwnProperty(hl)&&y!==void 0&&!a.hasOwnProperty(hl)&&Vi(l,t,hl,void 0,a,y);for(p in a)y=a[p],S=e[p],!a.hasOwnProperty(p)||y===S||y===void 0&&S===void 0||Vi(l,t,p,y,a,S);return}}for(var d in e)y=e[d],e.hasOwnProperty(d)&&y!=null&&!a.hasOwnProperty(d)&&vl(l,t,d,null,a,y);for(E in a)y=a[E],S=e[E],!a.hasOwnProperty(E)||y===S||y==null&&S==null||vl(l,t,E,y,a,S)}function Xr(l){switch(l){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ov(){if(typeof performance.getEntriesByType=="function"){for(var l=0,t=0,e=performance.getEntriesByType("resource"),a=0;a<e.length;a++){var u=e[a],n=u.transferSize,c=u.initiatorType,i=u.duration;if(n&&i&&Xr(c)){for(c=0,i=u.responseEnd,a+=1;a<e.length;a++){var f=e[a],h=f.startTime;if(h>i)break;var p=f.transferSize,E=f.initiatorType;p&&Xr(E)&&(f=f.responseEnd,c+=p*(f<i?1:(i-h)/(f-h)))}if(--a,t+=8*(n+c)/(u.duration/1e3),l++,10<l)break}}if(0<l)return t/l/1e6}return navigator.connection&&(l=navigator.connection.downlink,typeof l=="number")?l:5}var Ki=null,Ji=null;function Dn(l){return l.nodeType===9?l:l.ownerDocument}function Qr(l){switch(l){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Zr(l,t){if(l===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return l===1&&t==="foreignObject"?0:l}function wi(l,t){return l==="textarea"||l==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ki=null;function Nv(){var l=window.event;return l&&l.type==="popstate"?l===ki?!1:(ki=l,!0):(ki=null,!1)}var Lr=typeof setTimeout=="function"?setTimeout:void 0,Dv=typeof clearTimeout=="function"?clearTimeout:void 0,Vr=typeof Promise=="function"?Promise:void 0,Mv=typeof queueMicrotask=="function"?queueMicrotask:typeof Vr<"u"?function(l){return Vr.resolve(null).then(l).catch(jv)}:Lr;function jv(l){setTimeout(function(){throw l})}function Se(l){return l==="head"}function Kr(l,t){var e=t,a=0;do{var u=e.nextSibling;if(l.removeChild(e),u&&u.nodeType===8)if(e=u.data,e==="/$"||e==="/&"){if(a===0){l.removeChild(u),Na(t);return}a--}else if(e==="$"||e==="$?"||e==="$~"||e==="$!"||e==="&")a++;else if(e==="html")hu(l.ownerDocument.documentElement);else if(e==="head"){e=l.ownerDocument.head,hu(e);for(var n=e.firstChild;n;){var c=n.nextSibling,i=n.nodeName;n[Ca]||i==="SCRIPT"||i==="STYLE"||i==="LINK"&&n.rel.toLowerCase()==="stylesheet"||e.removeChild(n),n=c}}else e==="body"&&hu(l.ownerDocument.body);e=u}while(e);Na(t)}function Jr(l,t){var e=l;l=0;do{var a=e.nextSibling;if(e.nodeType===1?t?(e._stashedDisplay=e.style.display,e.style.display="none"):(e.style.display=e._stashedDisplay||"",e.getAttribute("style")===""&&e.removeAttribute("style")):e.nodeType===3&&(t?(e._stashedText=e.nodeValue,e.nodeValue=""):e.nodeValue=e._stashedText||""),a&&a.nodeType===8)if(e=a.data,e==="/$"){if(l===0)break;l--}else e!=="$"&&e!=="$?"&&e!=="$~"&&e!=="$!"||l++;e=a}while(e)}function Wi(l){var t=l.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var e=t;switch(t=t.nextSibling,e.nodeName){case"HTML":case"HEAD":case"BODY":Wi(e),lc(e);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(e.rel.toLowerCase()==="stylesheet")continue}l.removeChild(e)}}function Uv(l,t,e,a){for(;l.nodeType===1;){var u=e;if(l.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(l.nodeName!=="INPUT"||l.type!=="hidden"))break}else if(a){if(!l[Ca])switch(t){case"meta":if(!l.hasAttribute("itemprop"))break;return l;case"link":if(n=l.getAttribute("rel"),n==="stylesheet"&&l.hasAttribute("data-precedence"))break;if(n!==u.rel||l.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||l.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||l.getAttribute("title")!==(u.title==null?null:u.title))break;return l;case"style":if(l.hasAttribute("data-precedence"))break;return l;case"script":if(n=l.getAttribute("src"),(n!==(u.src==null?null:u.src)||l.getAttribute("type")!==(u.type==null?null:u.type)||l.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&n&&l.hasAttribute("async")&&!l.hasAttribute("itemprop"))break;return l;default:return l}}else if(t==="input"&&l.type==="hidden"){var n=u.name==null?null:""+u.name;if(u.type==="hidden"&&l.getAttribute("name")===n)return l}else return l;if(l=At(l.nextSibling),l===null)break}return null}function Cv(l,t,e){if(t==="")return null;for(;l.nodeType!==3;)if((l.nodeType!==1||l.nodeName!=="INPUT"||l.type!=="hidden")&&!e||(l=At(l.nextSibling),l===null))return null;return l}function wr(l,t){for(;l.nodeType!==8;)if((l.nodeType!==1||l.nodeName!=="INPUT"||l.type!=="hidden")&&!t||(l=At(l.nextSibling),l===null))return null;return l}function $i(l){return l.data==="$?"||l.data==="$~"}function Fi(l){return l.data==="$!"||l.data==="$?"&&l.ownerDocument.readyState!=="loading"}function Rv(l,t){var e=l.ownerDocument;if(l.data==="$~")l._reactRetry=t;else if(l.data!=="$?"||e.readyState!=="loading")t();else{var a=function(){t(),e.removeEventListener("DOMContentLoaded",a)};e.addEventListener("DOMContentLoaded",a),l._reactRetry=a}}function At(l){for(;l!=null;l=l.nextSibling){var t=l.nodeType;if(t===1||t===3)break;if(t===8){if(t=l.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return l}var Ii=null;function kr(l){l=l.nextSibling;for(var t=0;l;){if(l.nodeType===8){var e=l.data;if(e==="/$"||e==="/&"){if(t===0)return At(l.nextSibling);t--}else e!=="$"&&e!=="$!"&&e!=="$?"&&e!=="$~"&&e!=="&"||t++}l=l.nextSibling}return null}function Wr(l){l=l.previousSibling;for(var t=0;l;){if(l.nodeType===8){var e=l.data;if(e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"){if(t===0)return l;t--}else e!=="/$"&&e!=="/&"||t++}l=l.previousSibling}return null}function $r(l,t,e){switch(t=Dn(e),l){case"html":if(l=t.documentElement,!l)throw Error(s(452));return l;case"head":if(l=t.head,!l)throw Error(s(453));return l;case"body":if(l=t.body,!l)throw Error(s(454));return l;default:throw Error(s(451))}}function hu(l){for(var t=l.attributes;t.length;)l.removeAttributeNode(t[0]);lc(l)}var _t=new Map,Fr=new Set;function Mn(l){return typeof l.getRootNode=="function"?l.getRootNode():l.nodeType===9?l:l.ownerDocument}var Pt=j.d;j.d={f:Hv,r:Bv,D:qv,C:Yv,L:Gv,m:Xv,X:Zv,S:Qv,M:Lv};function Hv(){var l=Pt.f(),t=xn();return l||t}function Bv(l){var t=we(l);t!==null&&t.tag===5&&t.type==="form"?vo(t):Pt.r(l)}var Aa=typeof document>"u"?null:document;function Ir(l,t,e){var a=Aa;if(a&&typeof t=="string"&&t){var u=bt(t);u='link[rel="'+l+'"][href="'+u+'"]',typeof e=="string"&&(u+='[crossorigin="'+e+'"]'),Fr.has(u)||(Fr.add(u),l={rel:l,crossOrigin:e,href:t},a.querySelector(u)===null&&(t=a.createElement("link"),Jl(t,"link",l),ql(t),a.head.appendChild(t)))}}function qv(l){Pt.D(l),Ir("dns-prefetch",l,null)}function Yv(l,t){Pt.C(l,t),Ir("preconnect",l,t)}function Gv(l,t,e){Pt.L(l,t,e);var a=Aa;if(a&&l&&t){var u='link[rel="preload"][as="'+bt(t)+'"]';t==="image"&&e&&e.imageSrcSet?(u+='[imagesrcset="'+bt(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(u+='[imagesizes="'+bt(e.imageSizes)+'"]')):u+='[href="'+bt(l)+'"]';var n=u;switch(t){case"style":n=_a(l);break;case"script":n=Oa(l)}_t.has(n)||(l=O({rel:"preload",href:t==="image"&&e&&e.imageSrcSet?void 0:l,as:t},e),_t.set(n,l),a.querySelector(u)!==null||t==="style"&&a.querySelector(yu(n))||t==="script"&&a.querySelector(gu(n))||(t=a.createElement("link"),Jl(t,"link",l),ql(t),a.head.appendChild(t)))}}function Xv(l,t){Pt.m(l,t);var e=Aa;if(e&&l){var a=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+bt(a)+'"][href="'+bt(l)+'"]',n=u;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=Oa(l)}if(!_t.has(n)&&(l=O({rel:"modulepreload",href:l},t),_t.set(n,l),e.querySelector(u)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(gu(n)))return}a=e.createElement("link"),Jl(a,"link",l),ql(a),e.head.appendChild(a)}}}function Qv(l,t,e){Pt.S(l,t,e);var a=Aa;if(a&&l){var u=ke(a).hoistableStyles,n=_a(l);t=t||"default";var c=u.get(n);if(!c){var i={loading:0,preload:null};if(c=a.querySelector(yu(n)))i.loading=5;else{l=O({rel:"stylesheet",href:l,"data-precedence":t},e),(e=_t.get(n))&&Pi(l,e);var f=c=a.createElement("link");ql(f),Jl(f,"link",l),f._p=new Promise(function(h,p){f.onload=h,f.onerror=p}),f.addEventListener("load",function(){i.loading|=1}),f.addEventListener("error",function(){i.loading|=2}),i.loading|=4,jn(c,t,a)}c={type:"stylesheet",instance:c,count:1,state:i},u.set(n,c)}}}function Zv(l,t){Pt.X(l,t);var e=Aa;if(e&&l){var a=ke(e).hoistableScripts,u=Oa(l),n=a.get(u);n||(n=e.querySelector(gu(u)),n||(l=O({src:l,async:!0},t),(t=_t.get(u))&&lf(l,t),n=e.createElement("script"),ql(n),Jl(n,"link",l),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},a.set(u,n))}}function Lv(l,t){Pt.M(l,t);var e=Aa;if(e&&l){var a=ke(e).hoistableScripts,u=Oa(l),n=a.get(u);n||(n=e.querySelector(gu(u)),n||(l=O({src:l,async:!0,type:"module"},t),(t=_t.get(u))&&lf(l,t),n=e.createElement("script"),ql(n),Jl(n,"link",l),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},a.set(u,n))}}function Pr(l,t,e,a){var u=(u=F.current)?Mn(u):null;if(!u)throw Error(s(446));switch(l){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(t=_a(e.href),e=ke(u).hoistableStyles,a=e.get(t),a||(a={type:"style",instance:null,count:0,state:null},e.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){l=_a(e.href);var n=ke(u).hoistableStyles,c=n.get(l);if(c||(u=u.ownerDocument||u,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(l,c),(n=u.querySelector(yu(l)))&&!n._p&&(c.instance=n,c.state.loading=5),_t.has(l)||(e={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},_t.set(l,e),n||Vv(u,l,e,c.state))),t&&a===null)throw Error(s(528,""));return c}if(t&&a!==null)throw Error(s(529,""));return null;case"script":return t=e.async,e=e.src,typeof e=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Oa(e),e=ke(u).hoistableScripts,a=e.get(t),a||(a={type:"script",instance:null,count:0,state:null},e.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,l))}}function _a(l){return'href="'+bt(l)+'"'}function yu(l){return'link[rel="stylesheet"]['+l+"]"}function ld(l){return O({},l,{"data-precedence":l.precedence,precedence:null})}function Vv(l,t,e,a){l.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=l.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Jl(t,"link",e),ql(t),l.head.appendChild(t))}function Oa(l){return'[src="'+bt(l)+'"]'}function gu(l){return"script[async]"+l}function td(l,t,e){if(t.count++,t.instance===null)switch(t.type){case"style":var a=l.querySelector('style[data-href~="'+bt(e.href)+'"]');if(a)return t.instance=a,ql(a),a;var u=O({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return a=(l.ownerDocument||l).createElement("style"),ql(a),Jl(a,"style",u),jn(a,e.precedence,l),t.instance=a;case"stylesheet":u=_a(e.href);var n=l.querySelector(yu(u));if(n)return t.state.loading|=4,t.instance=n,ql(n),n;a=ld(e),(u=_t.get(u))&&Pi(a,u),n=(l.ownerDocument||l).createElement("link"),ql(n);var c=n;return c._p=new Promise(function(i,f){c.onload=i,c.onerror=f}),Jl(n,"link",a),t.state.loading|=4,jn(n,e.precedence,l),t.instance=n;case"script":return n=Oa(e.src),(u=l.querySelector(gu(n)))?(t.instance=u,ql(u),u):(a=e,(u=_t.get(n))&&(a=O({},e),lf(a,u)),l=l.ownerDocument||l,u=l.createElement("script"),ql(u),Jl(u,"link",a),l.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,jn(a,e.precedence,l));return t.instance}function jn(l,t,e){for(var a=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=a.length?a[a.length-1]:null,n=u,c=0;c<a.length;c++){var i=a[c];if(i.dataset.precedence===t)n=i;else if(n!==u)break}n?n.parentNode.insertBefore(l,n.nextSibling):(t=e.nodeType===9?e.head:e,t.insertBefore(l,t.firstChild))}function Pi(l,t){l.crossOrigin==null&&(l.crossOrigin=t.crossOrigin),l.referrerPolicy==null&&(l.referrerPolicy=t.referrerPolicy),l.title==null&&(l.title=t.title)}function lf(l,t){l.crossOrigin==null&&(l.crossOrigin=t.crossOrigin),l.referrerPolicy==null&&(l.referrerPolicy=t.referrerPolicy),l.integrity==null&&(l.integrity=t.integrity)}var Un=null;function ed(l,t,e){if(Un===null){var a=new Map,u=Un=new Map;u.set(e,a)}else u=Un,a=u.get(e),a||(a=new Map,u.set(e,a));if(a.has(l))return a;for(a.set(l,null),e=e.getElementsByTagName(l),u=0;u<e.length;u++){var n=e[u];if(!(n[Ca]||n[Zl]||l==="link"&&n.getAttribute("rel")==="stylesheet")&&n.namespaceURI!=="http://www.w3.org/2000/svg"){var c=n.getAttribute(t)||"";c=l+c;var i=a.get(c);i?i.push(n):a.set(c,[n])}}return a}function ad(l,t,e){l=l.ownerDocument||l,l.head.insertBefore(e,t==="title"?l.querySelector("head > title"):null)}function Kv(l,t,e){if(e===1||t.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return l=t.disabled,typeof t.precedence=="string"&&l==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ud(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function Jv(l,t,e,a){if(e.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(e.state.loading&4)===0){if(e.instance===null){var u=_a(a.href),n=t.querySelector(yu(u));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=Cn.bind(l),t.then(l,l)),e.state.loading|=4,e.instance=n,ql(n);return}n=t.ownerDocument||t,a=ld(a),(u=_t.get(u))&&Pi(a,u),n=n.createElement("link"),ql(n);var c=n;c._p=new Promise(function(i,f){c.onload=i,c.onerror=f}),Jl(n,"link",a),e.instance=n}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(e,t),(t=e.state.preload)&&(e.state.loading&3)===0&&(l.count++,e=Cn.bind(l),t.addEventListener("load",e),t.addEventListener("error",e))}}var tf=0;function wv(l,t){return l.stylesheets&&l.count===0&&Hn(l,l.stylesheets),0<l.count||0<l.imgCount?function(e){var a=setTimeout(function(){if(l.stylesheets&&Hn(l,l.stylesheets),l.unsuspend){var n=l.unsuspend;l.unsuspend=null,n()}},6e4+t);0<l.imgBytes&&tf===0&&(tf=62500*Ov());var u=setTimeout(function(){if(l.waitingForImages=!1,l.count===0&&(l.stylesheets&&Hn(l,l.stylesheets),l.unsuspend)){var n=l.unsuspend;l.unsuspend=null,n()}},(l.imgBytes>tf?50:800)+t);return l.unsuspend=e,function(){l.unsuspend=null,clearTimeout(a),clearTimeout(u)}}:null}function Cn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Hn(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var Rn=null;function Hn(l,t){l.stylesheets=null,l.unsuspend!==null&&(l.count++,Rn=new Map,t.forEach(kv,l),Rn=null,Cn.call(l))}function kv(l,t){if(!(t.state.loading&4)){var e=Rn.get(l);if(e)var a=e.get(null);else{e=new Map,Rn.set(l,e);for(var u=l.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n<u.length;n++){var c=u[n];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(e.set(c.dataset.precedence,c),a=c)}a&&e.set(null,a)}u=t.instance,c=u.getAttribute("data-precedence"),n=e.get(c)||a,n===a&&e.set(null,u),e.set(c,u),this.count++,a=Cn.bind(this),u.addEventListener("load",a),u.addEventListener("error",a),n?n.parentNode.insertBefore(u,n.nextSibling):(l=l.nodeType===9?l.head:l,l.insertBefore(u,l.firstChild)),t.state.loading|=4}}var bu={$$typeof:_l,Provider:null,Consumer:null,_currentValue:L,_currentValue2:L,_threadCount:0};function Wv(l,t,e,a,u,n,c,i,f){this.tag=1,this.containerInfo=l,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=$n(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$n(0),this.hiddenUpdates=$n(null),this.identifierPrefix=a,this.onUncaughtError=u,this.onCaughtError=n,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=f,this.incompleteTransitions=new Map}function nd(l,t,e,a,u,n,c,i,f,h,p,E){return l=new Wv(l,t,e,c,f,h,p,E,i),t=1,n===!0&&(t|=24),n=ot(3,null,null,t),l.current=n,n.stateNode=l,t=Rc(),t.refCount++,l.pooledCache=t,t.refCount++,n.memoizedState={element:a,isDehydrated:e,cache:t},Yc(n),l}function cd(l){return l?(l=ua,l):ua}function id(l,t,e,a,u,n){u=cd(u),a.context===null?a.context=u:a.pendingContext=u,a=fe(t),a.payload={element:e},n=n===void 0?null:n,n!==null&&(a.callback=n),e=se(l,a,t),e!==null&&(nt(e,l,t),$a(e,l,t))}function fd(l,t){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var e=l.retryLane;l.retryLane=e!==0&&e<t?e:t}}function ef(l,t){fd(l,t),(l=l.alternate)&&fd(l,t)}function sd(l){if(l.tag===13||l.tag===31){var t=je(l,67108864);t!==null&&nt(t,l,67108864),ef(l,67108864)}}function od(l){if(l.tag===13||l.tag===31){var t=ht();t=Fn(t);var e=je(l,t);e!==null&&nt(e,l,t),ef(l,t)}}var Bn=!0;function $v(l,t,e,a){var u=x.T;x.T=null;var n=j.p;try{j.p=2,af(l,t,e,a)}finally{j.p=n,x.T=u}}function Fv(l,t,e,a){var u=x.T;x.T=null;var n=j.p;try{j.p=8,af(l,t,e,a)}finally{j.p=n,x.T=u}}function af(l,t,e,a){if(Bn){var u=uf(a);if(u===null)Li(l,t,a,qn,e),dd(l,a);else if(Pv(u,l,t,e,a))a.stopPropagation();else if(dd(l,a),t&4&&-1<Iv.indexOf(l)){for(;u!==null;){var n=we(u);if(n!==null)switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var c=_e(n.pendingLanes);if(c!==0){var i=n;for(i.pendingLanes|=2,i.entangledLanes|=2;c;){var f=1<<31-ft(c);i.entanglements[1]|=f,c&=~f}Ht(n),(il&6)===0&&(Sn=ct()+500,du(0))}}break;case 31:case 13:i=je(n,2),i!==null&&nt(i,n,2),xn(),ef(n,2)}if(n=uf(a),n===null&&Li(l,t,a,qn,e),n===u)break;u=n}u!==null&&a.stopPropagation()}else Li(l,t,a,null,e)}}function uf(l){return l=cc(l),nf(l)}var qn=null;function nf(l){if(qn=null,l=Je(l),l!==null){var t=C(l);if(t===null)l=null;else{var e=t.tag;if(e===13){if(l=G(t),l!==null)return l;l=null}else if(e===31){if(l=Y(t),l!==null)return l;l=null}else if(e===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;l=null}else t!==l&&(l=null)}}return qn=l,null}function rd(l){switch(l){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(qd()){case bf:return 2;case Sf:return 8;case Au:case Yd:return 32;case pf:return 268435456;default:return 32}default:return 32}}var cf=!1,pe=null,xe=null,Te=null,Su=new Map,pu=new Map,Ee=[],Iv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function dd(l,t){switch(l){case"focusin":case"focusout":pe=null;break;case"dragenter":case"dragleave":xe=null;break;case"mouseover":case"mouseout":Te=null;break;case"pointerover":case"pointerout":Su.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":pu.delete(t.pointerId)}}function xu(l,t,e,a,u,n){return l===null||l.nativeEvent!==n?(l={blockedOn:t,domEventName:e,eventSystemFlags:a,nativeEvent:n,targetContainers:[u]},t!==null&&(t=we(t),t!==null&&sd(t)),l):(l.eventSystemFlags|=a,t=l.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),l)}function Pv(l,t,e,a,u){switch(t){case"focusin":return pe=xu(pe,l,t,e,a,u),!0;case"dragenter":return xe=xu(xe,l,t,e,a,u),!0;case"mouseover":return Te=xu(Te,l,t,e,a,u),!0;case"pointerover":var n=u.pointerId;return Su.set(n,xu(Su.get(n)||null,l,t,e,a,u)),!0;case"gotpointercapture":return n=u.pointerId,pu.set(n,xu(pu.get(n)||null,l,t,e,a,u)),!0}return!1}function md(l){var t=Je(l.target);if(t!==null){var e=C(t);if(e!==null){if(t=e.tag,t===13){if(t=G(e),t!==null){l.blockedOn=t,_f(l.priority,function(){od(e)});return}}else if(t===31){if(t=Y(e),t!==null){l.blockedOn=t,_f(l.priority,function(){od(e)});return}}else if(t===3&&e.stateNode.current.memoizedState.isDehydrated){l.blockedOn=e.tag===3?e.stateNode.containerInfo:null;return}}}l.blockedOn=null}function Yn(l){if(l.blockedOn!==null)return!1;for(var t=l.targetContainers;0<t.length;){var e=uf(l.nativeEvent);if(e===null){e=l.nativeEvent;var a=new e.constructor(e.type,e);nc=a,e.target.dispatchEvent(a),nc=null}else return t=we(e),t!==null&&sd(t),l.blockedOn=e,!1;t.shift()}return!0}function vd(l,t,e){Yn(l)&&e.delete(t)}function lh(){cf=!1,pe!==null&&Yn(pe)&&(pe=null),xe!==null&&Yn(xe)&&(xe=null),Te!==null&&Yn(Te)&&(Te=null),Su.forEach(vd),pu.forEach(vd)}function Gn(l,t){l.blockedOn===t&&(l.blockedOn=null,cf||(cf=!0,m.unstable_scheduleCallback(m.unstable_NormalPriority,lh)))}var Xn=null;function hd(l){Xn!==l&&(Xn=l,m.unstable_scheduleCallback(m.unstable_NormalPriority,function(){Xn===l&&(Xn=null);for(var t=0;t<l.length;t+=3){var e=l[t],a=l[t+1],u=l[t+2];if(typeof a!="function"){if(nf(a||e)===null)continue;break}var n=we(e);n!==null&&(l.splice(t,3),t-=3,ui(n,{pending:!0,data:u,method:e.method,action:a},a,u))}}))}function Na(l){function t(f){return Gn(f,l)}pe!==null&&Gn(pe,l),xe!==null&&Gn(xe,l),Te!==null&&Gn(Te,l),Su.forEach(t),pu.forEach(t);for(var e=0;e<Ee.length;e++){var a=Ee[e];a.blockedOn===l&&(a.blockedOn=null)}for(;0<Ee.length&&(e=Ee[0],e.blockedOn===null);)md(e),e.blockedOn===null&&Ee.shift();if(e=(l.ownerDocument||l).$$reactFormReplay,e!=null)for(a=0;a<e.length;a+=3){var u=e[a],n=e[a+1],c=u[Pl]||null;if(typeof n=="function")c||hd(e);else if(c){var i=null;if(n&&n.hasAttribute("formAction")){if(u=n,c=n[Pl]||null)i=c.formAction;else if(nf(u)!==null)continue}else i=c.action;typeof i=="function"?e[a+1]=i:(e.splice(a,3),a-=3),hd(e)}}}function yd(){function l(n){n.canIntercept&&n.info==="react-transition"&&n.intercept({handler:function(){return new Promise(function(c){return u=c})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),a||setTimeout(e,20)}function e(){if(!a&&!navigation.transition){var n=navigation.currentEntry;n&&n.url!=null&&navigation.navigate(n.url,{state:n.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,u=null;return navigation.addEventListener("navigate",l),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(e,100),function(){a=!0,navigation.removeEventListener("navigate",l),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function ff(l){this._internalRoot=l}Qn.prototype.render=ff.prototype.render=function(l){var t=this._internalRoot;if(t===null)throw Error(s(409));var e=t.current,a=ht();id(e,a,l,t,null,null)},Qn.prototype.unmount=ff.prototype.unmount=function(){var l=this._internalRoot;if(l!==null){this._internalRoot=null;var t=l.containerInfo;id(l.current,2,null,l,null,null),xn(),t[Ke]=null}};function Qn(l){this._internalRoot=l}Qn.prototype.unstable_scheduleHydration=function(l){if(l){var t=Af();l={blockedOn:null,target:l,priority:t};for(var e=0;e<Ee.length&&t!==0&&t<Ee[e].priority;e++);Ee.splice(e,0,l),e===0&&md(l)}};var gd=A.version;if(gd!=="19.2.4")throw Error(s(527,gd,"19.2.4"));j.findDOMNode=function(l){var t=l._reactInternals;if(t===void 0)throw typeof l.render=="function"?Error(s(188)):(l=Object.keys(l).join(","),Error(s(268,l)));return l=g(t),l=l!==null?H(l):null,l=l===null?null:l.stateNode,l};var th={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:x,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Zn=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zn.isDisabled&&Zn.supportsFiber)try{Ma=Zn.inject(th),it=Zn}catch{}}return Eu.createRoot=function(l,t){if(!M(l))throw Error(s(299));var e=!1,a="",u=zo,n=Ao,c=_o;return t!=null&&(t.unstable_strictMode===!0&&(e=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(n=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=nd(l,1,!1,null,null,e,a,null,u,n,c,yd),l[Ke]=t.current,Zi(l),new ff(t)},Eu.hydrateRoot=function(l,t,e){if(!M(l))throw Error(s(299));var a=!1,u="",n=zo,c=Ao,i=_o,f=null;return e!=null&&(e.unstable_strictMode===!0&&(a=!0),e.identifierPrefix!==void 0&&(u=e.identifierPrefix),e.onUncaughtError!==void 0&&(n=e.onUncaughtError),e.onCaughtError!==void 0&&(c=e.onCaughtError),e.onRecoverableError!==void 0&&(i=e.onRecoverableError),e.formState!==void 0&&(f=e.formState)),t=nd(l,1,!0,t,e??null,a,u,f,n,c,i,yd),t.context=cd(null),e=t.current,a=ht(),a=Fn(a),u=fe(a),u.callback=null,se(e,u,a),e=a,t.current.lanes=e,Ua(t,e),Ht(t),l[Ke]=t.current,Zi(l),new Qn(t)},Eu.version="19.2.4",Eu}var Od;function hh(){if(Od)return rf.exports;Od=1;function m(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(m)}catch(A){console.error(A)}}return m(),rf.exports=vh(),rf.exports}var yh=hh();const gh="modulepreload",bh=function(m){return"/"+m},Nd={},Ve=function(A,_,s){let M=Promise.resolve();if(_&&_.length>0){let G=function(g){return Promise.all(g.map(H=>Promise.resolve(H).then(O=>({status:"fulfilled",value:O}),O=>({status:"rejected",reason:O}))))};document.getElementsByTagName("link");const Y=document.querySelector("meta[property=csp-nonce]"),N=(Y==null?void 0:Y.nonce)||(Y==null?void 0:Y.getAttribute("nonce"));M=G(_.map(g=>{if(g=bh(g),g in Nd)return;Nd[g]=!0;const H=g.endsWith(".css"),O=H?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${O}`))return;const V=document.createElement("link");if(V.rel=H?"stylesheet":gh,H||(V.as="script"),V.crossOrigin="",V.href=g,N&&V.setAttribute("nonce",N),document.head.appendChild(V),H)return new Promise((yl,fl)=>{V.addEventListener("load",yl),V.addEventListener("error",()=>fl(new Error(`Unable to preload CSS for ${g}`)))})}))}function C(G){const Y=new Event("vite:preloadError",{cancelable:!0});if(Y.payload=G,window.dispatchEvent(Y),!Y.defaultPrevented)throw G}return M.then(G=>{for(const Y of G||[])Y.status==="rejected"&&C(Y.reason);return A().catch(C)})},Md=D.createContext({theme:"dark",toggleTheme:()=>{}});function Sh({children:m}){const[A,_]=D.useState(()=>{const M=localStorage.getItem("mcp-graph-theme");return M==="light"||M==="dark"?M:"dark"});D.useEffect(()=>{document.body.classList.toggle("dark",A==="dark"),localStorage.setItem("mcp-graph-theme",A)},[A]);const s=D.useCallback(()=>{_(M=>M==="dark"?"light":"dark")},[]);return b.jsx(Md,{value:{theme:A,toggleTheme:s},children:m})}function ph(){return D.useContext(Md)}const jd="/api/v1";class Ud extends Error{constructor(_,s,M){super(_);Ln(this,"status");Ln(this,"details");this.name="ApiError",this.status=s,this.details=M}}async function el(m,A={}){const _=`${jd}${m}`,s=await fetch(_,{headers:{"Content-Type":"application/json",...A.headers},...A});if(s.status===204)return null;const M=await s.json();if(!s.ok)throw new Ud(M.error||`HTTP ${s.status}`,s.status,M.details);return M}const jt={request:el,getProject:()=>el("/project"),initProject:m=>el("/project/init",{method:"POST",body:JSON.stringify({name:m})}),getProjects:()=>el("/project/list"),getActiveProject:()=>el("/project/active"),activateProject:m=>el(`/project/${m}/activate`,{method:"POST"}),getNodes:(m={})=>{const A=new URLSearchParams(m).toString();return el(`/nodes${A?"?"+A:""}`)},getNode:m=>el(`/nodes/${m}`),createNode:m=>el("/nodes",{method:"POST",body:JSON.stringify(m)}),updateNode:(m,A)=>el(`/nodes/${m}`,{method:"PATCH",body:JSON.stringify(A)}),deleteNode:m=>el(`/nodes/${m}`,{method:"DELETE"}),getEdges:()=>el("/edges"),createEdge:m=>el("/edges",{method:"POST",body:JSON.stringify(m)}),deleteEdge:m=>el(`/edges/${m}`,{method:"DELETE"}),getStats:()=>el("/stats"),search:(m,A)=>{const _={q:m};return A&&(_.limit=String(A)),el(`/search?${new URLSearchParams(_)}`)},getGraph:()=>el("/graph"),importFile:async(m,A=!1)=>{const _=new FormData;_.append("file",m),A&&_.append("force","true");const s=await fetch(`${jd}/import`,{method:"POST",body:_}),M=await s.json();if(!s.ok)throw new Ud(M.error||`HTTP ${s.status}`,s.status);return M},getIntegrationStatus:()=>el("/integrations/status"),getBottlenecks:()=>el("/insights/bottlenecks"),getRecommendations:()=>el("/insights/recommendations"),getMetrics:()=>el("/insights/metrics"),getSkills:()=>el("/skills"),captureUrl:(m,A,_)=>el("/capture",{method:"POST",body:JSON.stringify({url:m,selector:A,waitForSelector:_})}),getGitNexusStatus:()=>el("/gitnexus/status"),queryCodeGraph:m=>el("/gitnexus/query",{method:"POST",body:JSON.stringify({query:m})}),getSymbolContext:m=>el("/gitnexus/context",{method:"POST",body:JSON.stringify({symbol:m})}),getSymbolImpact:m=>el("/gitnexus/impact",{method:"POST",body:JSON.stringify({symbol:m})}),getFullCodeGraph:()=>el("/gitnexus/query",{method:"POST",body:JSON.stringify({query:"MATCH (n)-[r:CodeRelation]->(m) RETURN n.name AS src, n.filePath AS srcFile, r.type AS relType, m.name AS dst, m.filePath AS dstFile LIMIT 2000"})}),triggerAnalyze:()=>el("/gitnexus/analyze",{method:"POST"}),triggerServe:()=>el("/gitnexus/serve",{method:"POST"}),getSerenaMemories:()=>el("/integrations/serena/memories"),getFolder:()=>el("/folder"),openFolder:m=>el("/folder/open",{method:"POST",body:JSON.stringify({path:m})}),browseFolder:m=>el(`/folder/browse?path=${encodeURIComponent(m)}`),getLogs:m=>{const A=new URLSearchParams;m!=null&&m.level&&A.set("level",m.level),(m==null?void 0:m.since)!==void 0&&A.set("since",String(m.since)),m!=null&&m.search&&A.set("search",m.search);const _=A.toString();return el(`/logs${_?"?"+_:""}`)},clearLogs:()=>el("/logs",{method:"DELETE"})},Cd=D.createContext({projects:[],activeProject:null,loading:!0,switchProject:async()=>{},refreshProjects:async()=>{}});function xh({children:m,onProjectChange:A}){const[_,s]=D.useState([]),[M,C]=D.useState(null),[G,Y]=D.useState(!0),N=D.useCallback(async()=>{try{const[H,O]=await Promise.all([jt.getProjects().catch(()=>({total:0,projects:[]})),jt.getActiveProject().catch(()=>null)]);s(H.projects),C(O)}catch{}finally{Y(!1)}},[]),g=D.useCallback(async H=>{try{const O=await jt.activateProject(H);O.project&&(C(O.project),A==null||A())}catch{}},[A]);return D.useEffect(()=>{N()},[N]),b.jsx(Cd.Provider,{value:{projects:_,activeProject:M,loading:G,switchProject:g,refreshProjects:N},children:m})}function Th(){return D.useContext(Cd)}const Eh=D.memo(function(){const{projects:A,activeProject:_,loading:s,switchProject:M}=Th(),[C,G]=D.useState(!1),Y=D.useRef(null);D.useEffect(()=>{if(!C)return;function g(H){Y.current&&!Y.current.contains(H.target)&&G(!1)}return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[C]);const N=D.useCallback(g=>{g.key==="Escape"&&G(!1)},[]);return s||A.length<=1?b.jsx("span",{className:"text-sm text-[var(--color-text-muted)] truncate max-w-[200px]",title:_==null?void 0:_.name,children:(_==null?void 0:_.name)??"No project"}):b.jsxs("div",{ref:Y,className:"relative",onKeyDown:N,children:[b.jsxs("button",{onClick:()=>G(g=>!g),className:"flex items-center gap-1 px-2 py-1 text-sm border border-[var(--color-border)] rounded hover:bg-[var(--color-bg-tertiary)] transition-colors truncate max-w-[200px]","aria-haspopup":"listbox","aria-expanded":C,"aria-label":"Select project",children:[b.jsx("span",{className:"truncate",children:(_==null?void 0:_.name)??"Select project"}),b.jsx("svg",{className:"w-3 h-3 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),C&&b.jsx("ul",{role:"listbox","aria-label":"Projects",className:"absolute top-full left-0 mt-1 w-56 bg-[var(--color-bg-secondary)] border border-[var(--color-border)] rounded shadow-lg z-50 max-h-60 overflow-y-auto",children:A.map(g=>b.jsx("li",{role:"option","aria-selected":g.id===(_==null?void 0:_.id),children:b.jsx("button",{onClick:()=>{M(g.id),G(!1)},className:`w-full text-left px-3 py-2 text-sm hover:bg-[var(--color-bg-tertiary)] transition-colors ${g.id===(_==null?void 0:_.id)?"text-[var(--color-accent)] font-medium":"text-[var(--color-text)]"}`,children:g.name})},g.id))})]})}),zh=D.memo(function({stats:A,onImport:_,onCapture:s,onOpenFolder:M}){var g;const{theme:C,toggleTheme:G}=ph(),Y=((g=A==null?void 0:A.byStatus)==null?void 0:g.done)??0,N=(A==null?void 0:A.totalNodes)??0;return b.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-2 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("h1",{className:"text-lg font-bold text-[var(--color-accent)]",children:"mcp-graph"}),b.jsx(Eh,{}),N>0&&b.jsxs("span",{className:"text-sm text-[var(--color-text-muted)]",children:[Y,"/",N," done"]})]}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("button",{onClick:M,className:"px-3 py-1.5 text-sm border border-[var(--color-border)] rounded hover:bg-[var(--color-bg-tertiary)] transition-colors","aria-label":"Open project folder",title:"Open a different project folder",children:"Open Folder"}),b.jsx("button",{onClick:_,className:"px-3 py-1.5 text-sm bg-[var(--color-accent)] text-white rounded hover:bg-[var(--color-accent-light)] transition-colors","aria-label":"Import PRD file",children:"Import PRD"}),b.jsx("button",{onClick:s,className:"px-3 py-1.5 text-sm border border-[var(--color-border)] rounded hover:bg-[var(--color-bg-tertiary)] transition-colors","aria-label":"Capture web content",children:"Capture"}),b.jsx("button",{onClick:G,className:"px-2 py-1.5 text-sm border border-[var(--color-border)] rounded hover:bg-[var(--color-bg-tertiary)] transition-colors",title:`Switch to ${C==="dark"?"light":"dark"} mode`,"aria-label":`Switch to ${C==="dark"?"light":"dark"} mode`,children:C==="dark"?"☀":"☾"})]})]})}),Ah=[{id:"graph",label:"Graph"},{id:"prd-backlog",label:"PRD & Backlog"},{id:"gitnexus",label:"GitNexus"},{id:"serena",label:"Serena"},{id:"insights",label:"Insights"},{id:"benchmark",label:"Benchmark"},{id:"logs",label:"Logs"}],_h=D.memo(function({activeTab:A,onTabChange:_}){return b.jsx("nav",{className:"flex overflow-x-auto border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",role:"tablist","aria-label":"Dashboard sections",children:Ah.map(s=>b.jsx("button",{role:"tab","aria-selected":A===s.id,"aria-controls":`panel-${s.id}`,id:`tab-${s.id}`,tabIndex:A===s.id?0:-1,onClick:()=>_(s.id),className:`px-4 py-2 text-sm font-medium transition-colors border-b-2 whitespace-nowrap ${A===s.id?"border-[var(--color-accent)] text-[var(--color-accent)]":"border-transparent text-[var(--color-text-muted)] hover:text-[var(--color-text)]"}`,children:s.label},s.id))})});function Oh(){const[m,A]=D.useState(null),[_,s]=D.useState(!0),[M,C]=D.useState(null),G=D.useCallback(async()=>{try{s(!0),C(null);const Y=await jt.getGraph();A(Y)}catch(Y){C(Y instanceof Error?Y.message:"Failed to load graph")}finally{s(!1)}},[]);return D.useEffect(()=>{G()},[G]),{graph:m,loading:_,error:M,refresh:G}}function Nh(){const[m,A]=D.useState(null),_=D.useCallback(async()=>{try{const s=await jt.getStats();A(s)}catch{}},[]);return D.useEffect(()=>{_()},[_]),{stats:m,refresh:_}}function Dh(m){const A=D.useRef(m);A.current=m;const _=D.useCallback(()=>{const s=new EventSource("/api/v1/events"),M=G=>{try{const Y=JSON.parse(G.data);A.current(G.type,Y)}catch{}},C=["node:created","node:updated","node:deleted","edge:created","edge:deleted","import:completed"];for(const G of C)s.addEventListener(G,M);return s.onmessage=M,s.onerror=()=>{s.close(),setTimeout(_,5e3)},s},[]);D.useEffect(()=>{const s=_();return()=>s.close()},[_])}function Mh({open:m,onClose:A,onImported:_}){const[s,M]=D.useState(null),[C,G]=D.useState(!1),[Y,N]=D.useState(null),[g,H]=D.useState(!1),[O,V]=D.useState(!1),yl=D.useRef(null),fl=D.useCallback(W=>{W.preventDefault(),V(!1),W.dataTransfer.files.length&&M(W.dataTransfer.files[0])},[]),Tl=D.useCallback(async()=>{if(s){H(!0),N({type:"info",message:"Uploading and processing..."});try{const W=await jt.importFile(s,C);N({type:"success",message:`Imported ${W.nodesCreated} nodes and ${W.edgesCreated} edges.`}),setTimeout(()=>{A(),_(),M(null),N(null)},1500)}catch(W){N({type:"error",message:W instanceof Error?W.message:"Import failed"})}finally{H(!1)}}},[s,C,A,_]);return m?b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:W=>{W.target===W.currentTarget&&A()},children:b.jsxs("div",{className:"bg-[var(--color-bg)] rounded-lg shadow-xl w-full max-w-md p-6",children:[b.jsxs("div",{className:"flex items-center justify-between mb-4",children:[b.jsx("h2",{className:"text-lg font-semibold",children:"Import PRD"}),b.jsx("button",{onClick:A,className:"text-[var(--color-text-muted)] hover:text-[var(--color-text)] text-xl",children:"×"})]}),b.jsxs("div",{className:`border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-colors mb-4 ${O?"border-[var(--color-accent)] bg-[var(--color-accent)]10":"border-[var(--color-border)]"}`,onClick:()=>{var W;return(W=yl.current)==null?void 0:W.click()},onDragOver:W=>{W.preventDefault(),V(!0)},onDragLeave:()=>V(!1),onDrop:fl,children:[b.jsx("input",{ref:yl,type:"file",accept:".md,.txt,.pdf,.html,.htm",className:"hidden",onChange:W=>{var El;(El=W.target.files)!=null&&El.length&&M(W.target.files[0])}}),b.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:s?`Selected: ${s.name} (${jh(s.size)})`:`Drag & drop a file here
51
51
  or click to select`})]}),b.jsxs("label",{className:"flex items-center gap-2 mb-4 text-sm",children:[b.jsx("input",{type:"checkbox",checked:C,onChange:W=>G(W.target.checked)}),"Force re-import (overwrite existing)"]}),Y&&b.jsx("div",{className:`text-sm p-2 rounded mb-4 ${Y.type==="success"?"bg-green-500/10 text-green-500":Y.type==="error"?"bg-red-500/10 text-red-500":"bg-blue-500/10 text-blue-500"}`,children:Y.message}),b.jsxs("div",{className:"flex justify-end gap-2",children:[b.jsx("button",{onClick:A,className:"px-3 py-1.5 text-sm border border-[var(--color-border)] rounded hover:bg-[var(--color-bg-tertiary)]",children:"Cancel"}),b.jsx("button",{onClick:Tl,disabled:!s||g,className:"px-3 py-1.5 text-sm bg-[var(--color-accent)] text-white rounded hover:bg-[var(--color-accent-light)] disabled:opacity-50",children:g?"Importing...":"Import"})]})]})}):null}function jh(m){return m<1024?m+" B":m<1048576?(m/1024).toFixed(1)+" KB":(m/1048576).toFixed(1)+" MB"}function Uh({open:m,onClose:A,onImported:_}){const[s,M]=D.useState(""),[C,G]=D.useState(""),[Y,N]=D.useState(""),[g,H]=D.useState(null),[O,V]=D.useState(null),[yl,fl]=D.useState(!1),Tl=D.useCallback(async()=>{if(!s.trim()){H({type:"error",message:"Please enter a URL"});return}fl(!0),H({type:"info",message:"Capturing page... This may take a few seconds."}),V(null);try{const ul=await jt.captureUrl(s.trim(),C.trim()||void 0,Y.trim()||void 0);V(ul),H({type:"success",message:`Captured: ${ul.wordCount} words`})}catch(ul){H({type:"error",message:`Capture failed: ${ul instanceof Error?ul.message:"Unknown error"}`})}finally{fl(!1)}},[s,C,Y]),W=D.useCallback(async()=>{if(O){H({type:"info",message:"Importing captured content as PRD..."});try{const ul=new Blob([O.text],{type:"text/markdown"}),_l=(O.title||"captured-page").replace(/[^a-zA-Z0-9-_]/g,"-")+".md",Gl=new File([ul],_l,{type:"text/markdown"});await jt.importFile(Gl),H({type:"success",message:"Import completed!"}),setTimeout(()=>{A(),_()},1e3)}catch(ul){H({type:"error",message:`Import failed: ${ul instanceof Error?ul.message:"Unknown error"}`})}}},[O,A,_]),El=D.useCallback(async()=>{O&&(await navigator.clipboard.writeText(O.text),H({type:"success",message:"Copied to clipboard!"}))},[O]);return m?b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:ul=>{ul.target===ul.currentTarget&&A()},children:b.jsxs("div",{className:"bg-[var(--color-bg)] rounded-lg shadow-xl w-full max-w-lg p-6 max-h-[80vh] overflow-y-auto",children:[b.jsxs("div",{className:"flex items-center justify-between mb-4",children:[b.jsx("h2",{className:"text-lg font-semibold",children:"Capture Web Page"}),b.jsx("button",{onClick:A,className:"text-[var(--color-text-muted)] hover:text-[var(--color-text)] text-xl",children:"×"})]}),b.jsxs("div",{className:"space-y-3 mb-4",children:[b.jsxs("div",{children:[b.jsx("label",{className:"block text-xs font-medium mb-1",children:"URL"}),b.jsx("input",{type:"url",value:s,onChange:ul=>M(ul.target.value),placeholder:"https://example.com/prd",className:"w-full px-2 py-1.5 text-sm border border-[var(--color-border)] rounded bg-[var(--color-bg)]",onKeyDown:ul=>{ul.key==="Enter"&&Tl()}})]}),b.jsxs("div",{children:[b.jsx("label",{className:"block text-xs font-medium mb-1",children:"CSS Selector (optional)"}),b.jsx("input",{type:"text",value:C,onChange:ul=>G(ul.target.value),placeholder:"main, article, .content",className:"w-full px-2 py-1.5 text-sm border border-[var(--color-border)] rounded bg-[var(--color-bg)]"})]}),b.jsxs("div",{children:[b.jsx("label",{className:"block text-xs font-medium mb-1",children:"Wait for Selector (optional)"}),b.jsx("input",{type:"text",value:Y,onChange:ul=>N(ul.target.value),placeholder:".loaded, #content",className:"w-full px-2 py-1.5 text-sm border border-[var(--color-border)] rounded bg-[var(--color-bg)]"})]})]}),g&&b.jsx("div",{className:`text-sm p-2 rounded mb-4 ${g.type==="success"?"bg-green-500/10 text-green-500":g.type==="error"?"bg-red-500/10 text-red-500":"bg-blue-500/10 text-blue-500"}`,children:g.message}),O&&b.jsxs("div",{className:"mb-4 p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[b.jsx("h3",{className:"text-sm font-medium mb-2",children:"Extracted Content"}),b.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] space-y-0.5 mb-2",children:[b.jsxs("p",{children:[b.jsx("strong",{children:"Title:"})," ",O.title||"—"]}),b.jsxs("p",{children:[b.jsx("strong",{children:"Words:"})," ",O.wordCount]}),b.jsxs("p",{children:[b.jsx("strong",{children:"Captured:"})," ",new Date(O.capturedAt).toLocaleString()]})]}),b.jsxs("pre",{className:"text-xs whitespace-pre-wrap max-h-40 overflow-y-auto p-2 bg-[var(--color-bg-tertiary)] rounded",children:[O.text.substring(0,5e3),O.text.length>5e3&&`
52
52
 
53
- ... (truncated)`]}),b.jsxs("div",{className:"flex gap-2 mt-2",children:[b.jsx("button",{onClick:W,className:"px-3 py-1 text-xs bg-[var(--color-accent)] text-white rounded hover:bg-[var(--color-accent-light)]",children:"Import as PRD"}),b.jsx("button",{onClick:El,className:"px-3 py-1 text-xs border border-[var(--color-border)] rounded hover:bg-[var(--color-bg-tertiary)]",children:"Copy Text"})]})]}),b.jsx("div",{className:"flex justify-end",children:b.jsx("button",{onClick:Tl,disabled:yl,className:"px-3 py-1.5 text-sm bg-[var(--color-accent)] text-white rounded hover:bg-[var(--color-accent-light)] disabled:opacity-50",children:yl?"Capturing...":"Capture"})})]})}):null}function Ch({open:m,onClose:A,onFolderChanged:_}){const[s,M]=D.useState(""),[C,G]=D.useState(""),[Y,N]=D.useState([]),[g,H]=D.useState(null),[O,V]=D.useState(!1),[yl,fl]=D.useState(""),[Tl,W]=D.useState([]),[El,ul]=D.useState(""),[_l,Gl]=D.useState(!1),[Fl,Xl]=D.useState(""),[$,Ql]=D.useState(!1);D.useEffect(()=>{m&&(H(null),M(""),Ql(!1),W([]),jt.getFolder().then(Q=>{G(Q.currentPath),N(Q.recentFolders)}).catch(()=>{}))},[m]);const wl=D.useCallback(async Q=>{Gl(!0),Xl("");try{const Ol=await jt.browseFolder(Q);fl(Ol.path),ul(Ol.parent),W(Ol.entries),Ql(!0)}catch(Ol){Xl(Ol instanceof Error?Ol.message:"Failed to browse")}finally{Gl(!1)}},[]),Ot=D.useCallback(async Q=>{const Ol=Q??s.trim();if(Ol){V(!0),H({type:"info",message:"Opening folder..."});try{const Nl=await jt.openFolder(Ol);if(!Nl.ok){H({type:"error",message:Nl.error??"Failed to open folder"});return}H({type:"success",message:`Opened: ${Nl.basePath}`}),G(Nl.basePath??Ol),Nl.recentFolders&&N(Nl.recentFolders),setTimeout(()=>{A(),_()},800)}catch(Nl){H({type:"error",message:Nl instanceof Error?Nl.message:"Failed to open folder"})}finally{V(!1)}}},[s,A,_]),yt=D.useCallback(()=>{const Q=C&&C.split("/").slice(0,-1).join("/")||"/";wl(Q)},[C,wl]);return m?b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:Q=>{Q.target===Q.currentTarget&&A()},children:b.jsxs("div",{className:"bg-[var(--color-bg)] rounded-lg shadow-xl w-full max-w-lg p-6 max-h-[80vh] flex flex-col",children:[b.jsxs("div",{className:"flex items-center justify-between mb-4",children:[b.jsx("h2",{className:"text-lg font-semibold",children:"Open Folder"}),b.jsx("button",{onClick:A,className:"text-[var(--color-text-muted)] hover:text-[var(--color-text)] text-xl",children:"×"})]}),b.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] mb-3",children:["Current: ",b.jsx("span",{className:"font-mono",children:C||"..."})]}),b.jsxs("div",{className:"mb-3",children:[b.jsx("label",{className:"block text-sm mb-1",children:"Project folder path"}),b.jsxs("div",{className:"flex gap-2",children:[b.jsx("input",{type:"text",value:s,onChange:Q=>M(Q.target.value),onKeyDown:Q=>{Q.key==="Enter"&&Ot()},placeholder:"/path/to/project",className:"flex-1 px-3 py-2 text-sm bg-[var(--color-bg-secondary)] border border-[var(--color-border)] rounded font-mono focus:outline-none focus:border-[var(--color-accent)]",autoFocus:!0}),b.jsx("button",{onClick:()=>void Ot(),disabled:!s.trim()||O,className:"px-4 py-2 text-sm bg-[var(--color-accent)] text-white rounded hover:bg-[var(--color-accent-light)] disabled:opacity-50",children:O?"...":"Open"})]}),b.jsx("button",{onClick:yt,className:"mt-1 text-xs text-[var(--color-accent)] hover:underline",children:"Browse directories..."})]}),g&&b.jsx("div",{className:`text-sm p-2 rounded mb-3 ${g.type==="success"?"bg-green-500/10 text-green-500":g.type==="error"?"bg-red-500/10 text-red-500":"bg-blue-500/10 text-blue-500"}`,children:g.message}),$&&b.jsxs("div",{className:"mb-3 border border-[var(--color-border)] rounded overflow-hidden",children:[b.jsx("div",{className:"flex items-center gap-1 px-3 py-2 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] text-xs font-mono overflow-x-auto whitespace-nowrap",children:yl.split("/").filter(Boolean).map((Q,Ol,Nl)=>{const Il="/"+Nl.slice(0,Ol+1).join("/");return b.jsxs("span",{className:"flex items-center gap-1",children:[Ol>0&&b.jsx("span",{className:"text-[var(--color-text-muted)]",children:"/"}),b.jsx("button",{onClick:()=>void wl(Il),className:"hover:text-[var(--color-accent)] hover:underline",children:Q})]},Il)})}),_l&&b.jsx("div",{className:"px-3 py-4 text-sm text-[var(--color-text-muted)] text-center",children:"Loading..."}),Fl&&b.jsx("div",{className:"px-3 py-2 text-sm text-red-500",children:Fl}),!_l&&!Fl&&b.jsxs("ul",{className:"max-h-48 overflow-y-auto",children:[El&&El!==yl&&b.jsx("li",{children:b.jsxs("button",{onClick:()=>void wl(El),className:"w-full text-left px-3 py-1.5 text-sm hover:bg-[var(--color-bg-tertiary)] flex items-center gap-2",children:[b.jsx("span",{className:"text-[var(--color-text-muted)]",children:".."}),b.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"(parent)"})]})}),Tl.length===0&&b.jsx("li",{className:"px-3 py-2 text-sm text-[var(--color-text-muted)]",children:"No subdirectories"}),Tl.map(Q=>b.jsxs("li",{className:"flex items-center",children:[b.jsxs("button",{onClick:()=>void wl(Q.path),className:"flex-1 text-left px-3 py-1.5 text-sm hover:bg-[var(--color-bg-tertiary)] flex items-center gap-2 min-w-0",children:[b.jsx("span",{className:"shrink-0",children:Q.hasGraph?"📂":"📁"}),b.jsx("span",{className:`truncate ${Q.hasGraph?"font-medium text-[var(--color-accent)]":""}`,children:Q.name}),Q.hasGraph&&b.jsx("span",{className:"shrink-0 text-xs bg-[var(--color-accent)]/20 text-[var(--color-accent)] px-1.5 py-0.5 rounded",children:"graph"})]}),Q.hasGraph&&b.jsx("button",{onClick:()=>void Ot(Q.path),disabled:O||Q.path===C,className:"shrink-0 mr-2 px-2 py-1 text-xs bg-[var(--color-accent)] text-white rounded hover:bg-[var(--color-accent-light)] disabled:opacity-50",children:Q.path===C?"current":"Open"})]},Q.path))]})]}),b.jsx("div",{className:"flex-1 min-h-0 overflow-hidden flex flex-col",children:Y.length>0&&b.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[b.jsx("h3",{className:"text-sm font-medium mb-2 text-[var(--color-text-muted)] shrink-0",children:"Recent folders"}),b.jsx("ul",{className:"space-y-1 overflow-y-auto min-h-0",children:Y.map(Q=>b.jsx("li",{children:b.jsxs("button",{onClick:()=>void Ot(Q),disabled:O||Q===C,className:`w-full text-left px-3 py-1.5 text-sm font-mono rounded transition-colors ${Q===C?"bg-[var(--color-accent)]/10 text-[var(--color-accent)] cursor-default":"hover:bg-[var(--color-bg-tertiary)] text-[var(--color-text)]"}`,title:Q,children:[b.jsx("span",{className:"truncate block",children:Q}),Q===C&&b.jsx("span",{className:"text-xs text-[var(--color-accent)]",children:" (current)"})]})},Q))})]})}),b.jsx("div",{className:"flex justify-end mt-4 shrink-0",children:b.jsx("button",{onClick:A,className:"px-3 py-1.5 text-sm border border-[var(--color-border)] rounded hover:bg-[var(--color-bg-tertiary)]",children:"Cancel"})})]})}):null}const Rh=D.lazy(()=>Ve(()=>import("./graph-tab-BK8wjCuY.js"),__vite__mapDeps([0,1,2,3])).then(m=>({default:m.GraphTab}))),Hh=D.lazy(()=>Ve(()=>import("./prd-backlog-tab-DkTq385t.js"),__vite__mapDeps([4,1,2,3])).then(m=>({default:m.PrdBacklogTab}))),Bh=D.lazy(()=>Ve(()=>import("./gitnexus-tab-DMCU41Nr.js"),__vite__mapDeps([5,2,6])).then(m=>({default:m.GitNexusTab}))),qh=D.lazy(()=>Ve(()=>import("./serena-tab-CZ8Lp8yJ.js"),[]).then(m=>({default:m.SerenaTab}))),Yh=D.lazy(()=>Ve(()=>import("./insights-tab-OQnPT7h1.js"),__vite__mapDeps([7,2])).then(m=>({default:m.InsightsTab}))),Gh=D.lazy(()=>Ve(()=>import("./benchmark-tab-5r5wZQij.js"),[]).then(m=>({default:m.BenchmarkTab}))),Xh=D.lazy(()=>Ve(()=>import("./logs-tab-BCwPTvn9.js"),[]).then(m=>({default:m.LogsTab})));class Qh extends sh.Component{constructor(){super(...arguments);Ln(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(_){return{hasError:!0,error:_}}render(){var _;return this.state.hasError?b.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 text-[var(--color-text-muted)]",children:[b.jsx("p",{className:"text-sm",children:"Something went wrong."}),b.jsx("p",{className:"text-xs text-[var(--color-danger)]",children:(_=this.state.error)==null?void 0:_.message}),b.jsx("button",{onClick:()=>window.location.reload(),className:"text-xs px-3 py-1.5 rounded-lg bg-[var(--color-accent)] text-white hover:opacity-90 transition-opacity",children:"Reload"})]}):this.props.children}}function Dd(){return b.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading..."})}function Zh(){const[m,A]=D.useState("graph"),[_,s]=D.useState(!1),[M,C]=D.useState(!1),[G,Y]=D.useState(!1),{graph:N,loading:g,error:H,refresh:O}=Oh(),{stats:V,refresh:yl}=Nh(),fl=D.useCallback(async()=>{await Promise.all([O(),yl()])},[O,yl]);return Dh(D.useCallback(()=>{fl()},[fl])),b.jsx(xh,{onProjectChange:fl,children:b.jsxs("div",{className:"h-screen flex flex-col",children:[b.jsx(zh,{stats:V,onImport:()=>s(!0),onCapture:()=>C(!0),onOpenFolder:()=>Y(!0)}),b.jsx(_h,{activeTab:m,onTabChange:A}),b.jsx("main",{className:"flex-1 min-h-0 overflow-hidden",children:g?b.jsx(Dd,{}):H?b.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:H}):b.jsx(Qh,{children:b.jsxs(D.Suspense,{fallback:b.jsx(Dd,{}),children:[b.jsx("div",{style:{display:m==="graph"?"contents":"none"},children:N&&b.jsx(Rh,{graph:N})}),b.jsx("div",{style:{display:m==="prd-backlog"?"contents":"none"},children:N&&b.jsx(Hh,{graph:N})}),m==="gitnexus"&&b.jsx(Bh,{}),m==="serena"&&b.jsx(qh,{}),m==="insights"&&b.jsx(Yh,{}),m==="benchmark"&&b.jsx(Gh,{}),m==="logs"&&b.jsx(Xh,{})]})})}),b.jsx(Mh,{open:_,onClose:()=>s(!1),onImported:fl}),b.jsx(Uh,{open:M,onClose:()=>C(!1),onImported:fl}),b.jsx(Ch,{open:G,onClose:()=>Y(!1),onFolderChanged:fl})]})})}function Lh(){return b.jsx(Sh,{children:b.jsx(Zh,{})})}yh.createRoot(document.getElementById("root")).render(b.jsx(D.StrictMode,{children:b.jsx(Lh,{})}));export{jt as a,hf as b,mh as c,nh as g,b as j,D as r,sh as t};
53
+ ... (truncated)`]}),b.jsxs("div",{className:"flex gap-2 mt-2",children:[b.jsx("button",{onClick:W,className:"px-3 py-1 text-xs bg-[var(--color-accent)] text-white rounded hover:bg-[var(--color-accent-light)]",children:"Import as PRD"}),b.jsx("button",{onClick:El,className:"px-3 py-1 text-xs border border-[var(--color-border)] rounded hover:bg-[var(--color-bg-tertiary)]",children:"Copy Text"})]})]}),b.jsx("div",{className:"flex justify-end",children:b.jsx("button",{onClick:Tl,disabled:yl,className:"px-3 py-1.5 text-sm bg-[var(--color-accent)] text-white rounded hover:bg-[var(--color-accent-light)] disabled:opacity-50",children:yl?"Capturing...":"Capture"})})]})}):null}function Ch({open:m,onClose:A,onFolderChanged:_}){const[s,M]=D.useState(""),[C,G]=D.useState(""),[Y,N]=D.useState([]),[g,H]=D.useState(null),[O,V]=D.useState(!1),[yl,fl]=D.useState(""),[Tl,W]=D.useState([]),[El,ul]=D.useState(""),[_l,Gl]=D.useState(!1),[Fl,Xl]=D.useState(""),[$,Ql]=D.useState(!1);D.useEffect(()=>{m&&(H(null),M(""),Ql(!1),W([]),jt.getFolder().then(Q=>{G(Q.currentPath),N(Q.recentFolders)}).catch(()=>{}))},[m]);const wl=D.useCallback(async Q=>{Gl(!0),Xl("");try{const Ol=await jt.browseFolder(Q);fl(Ol.path),ul(Ol.parent),W(Ol.entries),Ql(!0)}catch(Ol){Xl(Ol instanceof Error?Ol.message:"Failed to browse")}finally{Gl(!1)}},[]),Ot=D.useCallback(async Q=>{const Ol=Q??s.trim();if(Ol){V(!0),H({type:"info",message:"Opening folder..."});try{const Nl=await jt.openFolder(Ol);if(!Nl.ok){H({type:"error",message:Nl.error??"Failed to open folder"});return}H({type:"success",message:`Opened: ${Nl.basePath}`}),G(Nl.basePath??Ol),Nl.recentFolders&&N(Nl.recentFolders),setTimeout(()=>{A(),_()},800)}catch(Nl){H({type:"error",message:Nl instanceof Error?Nl.message:"Failed to open folder"})}finally{V(!1)}}},[s,A,_]),yt=D.useCallback(()=>{const Q=C&&C.split("/").slice(0,-1).join("/")||"/";wl(Q)},[C,wl]);return m?b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:Q=>{Q.target===Q.currentTarget&&A()},children:b.jsxs("div",{className:"bg-[var(--color-bg)] rounded-lg shadow-xl w-full max-w-lg p-6 max-h-[80vh] flex flex-col",children:[b.jsxs("div",{className:"flex items-center justify-between mb-4",children:[b.jsx("h2",{className:"text-lg font-semibold",children:"Open Folder"}),b.jsx("button",{onClick:A,className:"text-[var(--color-text-muted)] hover:text-[var(--color-text)] text-xl",children:"×"})]}),b.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] mb-3",children:["Current: ",b.jsx("span",{className:"font-mono",children:C||"..."})]}),b.jsxs("div",{className:"mb-3",children:[b.jsx("label",{className:"block text-sm mb-1",children:"Project folder path"}),b.jsxs("div",{className:"flex gap-2",children:[b.jsx("input",{type:"text",value:s,onChange:Q=>M(Q.target.value),onKeyDown:Q=>{Q.key==="Enter"&&Ot()},placeholder:"/path/to/project",className:"flex-1 px-3 py-2 text-sm bg-[var(--color-bg-secondary)] border border-[var(--color-border)] rounded font-mono focus:outline-none focus:border-[var(--color-accent)]",autoFocus:!0}),b.jsx("button",{onClick:()=>void Ot(),disabled:!s.trim()||O,className:"px-4 py-2 text-sm bg-[var(--color-accent)] text-white rounded hover:bg-[var(--color-accent-light)] disabled:opacity-50",children:O?"...":"Open"})]}),b.jsx("button",{onClick:yt,className:"mt-1 text-xs text-[var(--color-accent)] hover:underline",children:"Browse directories..."})]}),g&&b.jsx("div",{className:`text-sm p-2 rounded mb-3 ${g.type==="success"?"bg-green-500/10 text-green-500":g.type==="error"?"bg-red-500/10 text-red-500":"bg-blue-500/10 text-blue-500"}`,children:g.message}),$&&b.jsxs("div",{className:"mb-3 border border-[var(--color-border)] rounded overflow-hidden",children:[b.jsx("div",{className:"flex items-center gap-1 px-3 py-2 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] text-xs font-mono overflow-x-auto whitespace-nowrap",children:yl.split("/").filter(Boolean).map((Q,Ol,Nl)=>{const Il="/"+Nl.slice(0,Ol+1).join("/");return b.jsxs("span",{className:"flex items-center gap-1",children:[Ol>0&&b.jsx("span",{className:"text-[var(--color-text-muted)]",children:"/"}),b.jsx("button",{onClick:()=>void wl(Il),className:"hover:text-[var(--color-accent)] hover:underline",children:Q})]},Il)})}),_l&&b.jsx("div",{className:"px-3 py-4 text-sm text-[var(--color-text-muted)] text-center",children:"Loading..."}),Fl&&b.jsx("div",{className:"px-3 py-2 text-sm text-red-500",children:Fl}),!_l&&!Fl&&b.jsxs("ul",{className:"max-h-48 overflow-y-auto",children:[El&&El!==yl&&b.jsx("li",{children:b.jsxs("button",{onClick:()=>void wl(El),className:"w-full text-left px-3 py-1.5 text-sm hover:bg-[var(--color-bg-tertiary)] flex items-center gap-2",children:[b.jsx("span",{className:"text-[var(--color-text-muted)]",children:".."}),b.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"(parent)"})]})}),Tl.length===0&&b.jsx("li",{className:"px-3 py-2 text-sm text-[var(--color-text-muted)]",children:"No subdirectories"}),Tl.map(Q=>b.jsxs("li",{className:"flex items-center",children:[b.jsxs("button",{onClick:()=>void wl(Q.path),className:"flex-1 text-left px-3 py-1.5 text-sm hover:bg-[var(--color-bg-tertiary)] flex items-center gap-2 min-w-0",children:[b.jsx("span",{className:"shrink-0",children:Q.hasGraph?"📂":"📁"}),b.jsx("span",{className:`truncate ${Q.hasGraph?"font-medium text-[var(--color-accent)]":""}`,children:Q.name}),Q.hasGraph&&b.jsx("span",{className:"shrink-0 text-xs bg-[var(--color-accent)]/20 text-[var(--color-accent)] px-1.5 py-0.5 rounded",children:"graph"})]}),Q.hasGraph&&b.jsx("button",{onClick:()=>void Ot(Q.path),disabled:O||Q.path===C,className:"shrink-0 mr-2 px-2 py-1 text-xs bg-[var(--color-accent)] text-white rounded hover:bg-[var(--color-accent-light)] disabled:opacity-50",children:Q.path===C?"current":"Open"})]},Q.path))]})]}),b.jsx("div",{className:"flex-1 min-h-0 overflow-hidden flex flex-col",children:Y.length>0&&b.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[b.jsx("h3",{className:"text-sm font-medium mb-2 text-[var(--color-text-muted)] shrink-0",children:"Recent folders"}),b.jsx("ul",{className:"space-y-1 overflow-y-auto min-h-0",children:Y.map(Q=>b.jsx("li",{children:b.jsxs("button",{onClick:()=>void Ot(Q),disabled:O||Q===C,className:`w-full text-left px-3 py-1.5 text-sm font-mono rounded transition-colors ${Q===C?"bg-[var(--color-accent)]/10 text-[var(--color-accent)] cursor-default":"hover:bg-[var(--color-bg-tertiary)] text-[var(--color-text)]"}`,title:Q,children:[b.jsx("span",{className:"truncate block",children:Q}),Q===C&&b.jsx("span",{className:"text-xs text-[var(--color-accent)]",children:" (current)"})]})},Q))})]})}),b.jsx("div",{className:"flex justify-end mt-4 shrink-0",children:b.jsx("button",{onClick:A,className:"px-3 py-1.5 text-sm border border-[var(--color-border)] rounded hover:bg-[var(--color-bg-tertiary)]",children:"Cancel"})})]})}):null}const Rh=D.lazy(()=>Ve(()=>import("./graph-tab-Dp7PfUEJ.js"),__vite__mapDeps([0,1,2,3])).then(m=>({default:m.GraphTab}))),Hh=D.lazy(()=>Ve(()=>import("./prd-backlog-tab-BBLpErTk.js"),__vite__mapDeps([4,1,2,3])).then(m=>({default:m.PrdBacklogTab}))),Bh=D.lazy(()=>Ve(()=>import("./gitnexus-tab-D7If6lxT.js"),__vite__mapDeps([5,2,6])).then(m=>({default:m.GitNexusTab}))),qh=D.lazy(()=>Ve(()=>import("./serena-tab-BxYP8nU5.js"),[]).then(m=>({default:m.SerenaTab}))),Yh=D.lazy(()=>Ve(()=>import("./insights-tab-CLA0OIxd.js"),__vite__mapDeps([7,2])).then(m=>({default:m.InsightsTab}))),Gh=D.lazy(()=>Ve(()=>import("./benchmark-tab-CuZsNkbP.js"),[]).then(m=>({default:m.BenchmarkTab}))),Xh=D.lazy(()=>Ve(()=>import("./logs-tab-CSYlvuCu.js"),[]).then(m=>({default:m.LogsTab})));class Qh extends sh.Component{constructor(){super(...arguments);Ln(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(_){return{hasError:!0,error:_}}render(){var _;return this.state.hasError?b.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 text-[var(--color-text-muted)]",children:[b.jsx("p",{className:"text-sm",children:"Something went wrong."}),b.jsx("p",{className:"text-xs text-[var(--color-danger)]",children:(_=this.state.error)==null?void 0:_.message}),b.jsx("button",{onClick:()=>window.location.reload(),className:"text-xs px-3 py-1.5 rounded-lg bg-[var(--color-accent)] text-white hover:opacity-90 transition-opacity",children:"Reload"})]}):this.props.children}}function Dd(){return b.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading..."})}function Zh(){const[m,A]=D.useState("graph"),[_,s]=D.useState(!1),[M,C]=D.useState(!1),[G,Y]=D.useState(!1),{graph:N,loading:g,error:H,refresh:O}=Oh(),{stats:V,refresh:yl}=Nh(),fl=D.useCallback(async()=>{await Promise.all([O(),yl()])},[O,yl]);return Dh(D.useCallback(()=>{fl()},[fl])),b.jsx(xh,{onProjectChange:fl,children:b.jsxs("div",{className:"h-screen flex flex-col",children:[b.jsx(zh,{stats:V,onImport:()=>s(!0),onCapture:()=>C(!0),onOpenFolder:()=>Y(!0)}),b.jsx(_h,{activeTab:m,onTabChange:A}),b.jsx("main",{className:"flex-1 min-h-0 overflow-hidden",children:g?b.jsx(Dd,{}):H?b.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:H}):b.jsx(Qh,{children:b.jsxs(D.Suspense,{fallback:b.jsx(Dd,{}),children:[b.jsx("div",{style:{display:m==="graph"?"contents":"none"},children:N&&b.jsx(Rh,{graph:N})}),b.jsx("div",{style:{display:m==="prd-backlog"?"contents":"none"},children:N&&b.jsx(Hh,{graph:N})}),m==="gitnexus"&&b.jsx(Bh,{}),m==="serena"&&b.jsx(qh,{}),m==="insights"&&b.jsx(Yh,{}),m==="benchmark"&&b.jsx(Gh,{}),m==="logs"&&b.jsx(Xh,{})]})})}),b.jsx(Mh,{open:_,onClose:()=>s(!1),onImported:fl}),b.jsx(Uh,{open:M,onClose:()=>C(!1),onImported:fl}),b.jsx(Ch,{open:G,onClose:()=>Y(!1),onFolderChanged:fl})]})})}function Lh(){return b.jsx(Sh,{children:b.jsx(Zh,{})})}yh.createRoot(document.getElementById("root")).render(b.jsx(D.StrictMode,{children:b.jsx(Lh,{})}));export{jt as a,hf as b,mh as c,nh as g,b as j,D as r,sh as t};
@@ -1 +1 @@
1
- import{r as c,j as e,a as o}from"./index-BBlpGofr.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
1
+ import{r as c,j as e,a as o}from"./index-CN9Wi5mu.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
@@ -1,2 +1,2 @@
1
- import{r,a as f,j as t}from"./index-BBlpGofr.js";function w(){const[l,o]=r.useState([]),[n,v]=r.useState(!0),d=r.useRef(0),p=r.useCallback(async()=>{try{const{logs:c}=await f.getLogs();o(c),c.length>0&&(d.current=c[c.length-1].id)}finally{v(!1)}},[]),u=r.useCallback(async()=>{await f.clearLogs(),o([]),d.current=0},[]);return r.useEffect(()=>{p()},[p]),r.useEffect(()=>{const c=new EventSource("/api/v1/events"),i=b=>{try{const s=JSON.parse(b.data),a={id:s.payload.id,level:s.payload.level,message:s.payload.message,context:s.payload.context,timestamp:s.timestamp};a.id>d.current&&(d.current=a.id,o(h=>[...h,a]))}catch{}};return c.addEventListener("log:entry",i),c.onerror=()=>{c.close(),setTimeout(()=>{},5e3)},()=>c.close()},[]),{logs:l,loading:n,clearLogs:u,refresh:p}}const k={info:"bg-blue-500/20 text-blue-400",warn:"bg-yellow-500/20 text-yellow-400",error:"bg-red-500/20 text-red-400",success:"bg-green-500/20 text-green-400",debug:"bg-gray-500/20 text-gray-400"},E=["info","warn","error","success","debug"];function y(l){return new Date(l).toLocaleTimeString("en-US",{hour12:!1})}function L(l){return!l||Object.keys(l).length===0?"":Object.entries(l).map(([o,n])=>`${o}="${String(n)}"`).join(" ")}function j(l){return l.map(o=>{const n=L(o.context);return`[${y(o.timestamp)}] [${o.level.toUpperCase()}] ${o.message}${n?" "+n:""}`}).join(`
1
+ import{r,a as f,j as t}from"./index-CN9Wi5mu.js";function w(){const[l,o]=r.useState([]),[n,v]=r.useState(!0),d=r.useRef(0),p=r.useCallback(async()=>{try{const{logs:c}=await f.getLogs();o(c),c.length>0&&(d.current=c[c.length-1].id)}finally{v(!1)}},[]),u=r.useCallback(async()=>{await f.clearLogs(),o([]),d.current=0},[]);return r.useEffect(()=>{p()},[p]),r.useEffect(()=>{const c=new EventSource("/api/v1/events"),i=b=>{try{const s=JSON.parse(b.data),a={id:s.payload.id,level:s.payload.level,message:s.payload.message,context:s.payload.context,timestamp:s.timestamp};a.id>d.current&&(d.current=a.id,o(h=>[...h,a]))}catch{}};return c.addEventListener("log:entry",i),c.onerror=()=>{c.close(),setTimeout(()=>{},5e3)},()=>c.close()},[]),{logs:l,loading:n,clearLogs:u,refresh:p}}const k={info:"bg-blue-500/20 text-blue-400",warn:"bg-yellow-500/20 text-yellow-400",error:"bg-red-500/20 text-red-400",success:"bg-green-500/20 text-green-400",debug:"bg-gray-500/20 text-gray-400"},E=["info","warn","error","success","debug"];function y(l){return new Date(l).toLocaleTimeString("en-US",{hour12:!1})}function L(l){return!l||Object.keys(l).length===0?"":Object.entries(l).map(([o,n])=>`${o}="${String(n)}"`).join(" ")}function j(l){return l.map(o=>{const n=L(o.context);return`[${y(o.timestamp)}] [${o.level.toUpperCase()}] ${o.message}${n?" "+n:""}`}).join(`
2
2
  `)}function O(){const{logs:l,loading:o,clearLogs:n,refresh:v}=w(),[d,p]=r.useState("all"),[u,c]=r.useState(""),[i,b]=r.useState(!0),s=r.useRef(null),a=r.useMemo(()=>{let e=l;if(d!=="all"&&(e=e.filter(x=>x.level===d)),u.trim()){const x=u.toLowerCase();e=e.filter(g=>g.message.toLowerCase().includes(x))}return e},[l,d,u]);r.useEffect(()=>{i&&s.current&&(s.current.scrollTop=s.current.scrollHeight)},[a,i]);const h=r.useCallback(()=>{if(!s.current)return;const{scrollTop:e,scrollHeight:x,clientHeight:g}=s.current,m=x-e-g<40;b(m)},[]),C=r.useCallback(async()=>{const e=j(a);await navigator.clipboard.writeText(e)},[a]),N=r.useCallback(()=>{const e=j(a),x=new Blob([e],{type:"text/plain"}),g=URL.createObjectURL(x),m=document.createElement("a");m.href=g,m.download=`mcp-graph-logs-${new Date().toISOString().slice(0,19).replace(/:/g,"-")}.txt`,m.click(),URL.revokeObjectURL(g)},[a]),S=r.useCallback(async()=>{await n()},[n]);return o?t.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading logs..."}):t.jsxs("div",{className:"flex flex-col h-full","data-testid":"logs-tab",children:[t.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[t.jsxs("select",{value:d,onChange:e=>p(e.target.value),className:"px-2 py-1 text-sm rounded border border-[var(--color-border)] bg-[var(--color-bg)] text-[var(--color-text)]","data-testid":"log-level-filter",children:[t.jsx("option",{value:"all",children:"All Levels"}),E.map(e=>t.jsx("option",{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))]}),t.jsx("input",{type:"text",value:u,onChange:e=>c(e.target.value),placeholder:"Search logs...",className:"flex-1 px-2 py-1 text-sm rounded border border-[var(--color-border)] bg-[var(--color-bg)] text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","data-testid":"log-search"}),t.jsx("button",{onClick:()=>b(!i),className:`px-2 py-1 text-xs rounded border ${i?"border-[var(--color-accent)] text-[var(--color-accent)]":"border-[var(--color-border)] text-[var(--color-text-muted)]"}`,title:i?"Auto-scroll enabled":"Auto-scroll paused",children:i?"Auto-scroll ON":"Auto-scroll OFF"}),t.jsx("button",{onClick:C,className:"px-2 py-1 text-xs rounded border border-[var(--color-border)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Copy all visible logs",children:"Copy"}),t.jsx("button",{onClick:N,className:"px-2 py-1 text-xs rounded border border-[var(--color-border)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Download logs as .txt",children:"Download"}),t.jsx("button",{onClick:S,className:"px-2 py-1 text-xs rounded border border-red-500/30 text-red-400 hover:bg-red-500/10",title:"Clear all logs",children:"Clear"}),t.jsx("button",{onClick:()=>void v(),className:"px-2 py-1 text-xs rounded border border-[var(--color-border)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Refresh logs",children:"Refresh"}),t.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[a.length," entries"]})]}),t.jsx("div",{ref:s,onScroll:h,className:"flex-1 overflow-y-auto font-mono text-xs p-2","data-testid":"log-list",children:a.length===0?t.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"No logs to display"}):a.map(e=>t.jsxs("div",{className:"flex items-start gap-2 py-0.5 hover:bg-[var(--color-bg-secondary)]",children:[t.jsx("span",{className:"text-[var(--color-text-muted)] shrink-0",children:y(e.timestamp)}),t.jsx("span",{className:`px-1.5 py-0 rounded text-[10px] font-semibold uppercase shrink-0 ${k[e.level]}`,children:e.level}),t.jsx("span",{className:"text-[var(--color-text)]",children:e.message}),e.context&&Object.keys(e.context).length>0&&t.jsx("span",{className:"text-[var(--color-text-muted)]",children:L(e.context)})]},e.id))})]})}export{O as LogsTab};
@@ -1 +1 @@
1
- import{r as f,j as e}from"./index-BBlpGofr.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-qelY_PVT.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
1
+ import{r as f,j as e}from"./index-CN9Wi5mu.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-D5iPoiPD.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
@@ -1 +1 @@
1
- import{r as i,a as b,j as e}from"./index-BBlpGofr.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
1
+ import{r as i,a as b,j as e}from"./index-CN9Wi5mu.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
7
7
  <title>mcp-graph Workstation</title>
8
- <script type="module" crossorigin src="/assets/index-BBlpGofr.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-CN9Wi5mu.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-BUl7yWBP.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-graph-workflow/mcp-graph",
3
- "version": "5.0.4",
3
+ "version": "5.0.5",
4
4
  "description": "MCP local-first PRD to task graph — transforms text into executable structure",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -78,7 +78,7 @@
78
78
  "vitest": "^4.0.18"
79
79
  },
80
80
  "dependencies": {
81
- "@mcp-graph-workflow/mcp-graph": "^5.0.1",
81
+ "@mcp-graph-workflow/mcp-graph": "^5.0.4",
82
82
  "@modelcontextprotocol/sdk": "^1.27.1",
83
83
  "better-sqlite3": "^12.6.2",
84
84
  "cheerio": "^1.2.0",
@@ -1 +0,0 @@
1
- import{r as i,a as x,j as e}from"./index-BBlpGofr.js";function m(){const[r,n]=i.useState(null),[c,s]=i.useState(!0),[o,d]=i.useState(null);return i.useEffect(()=>{async function t(){try{const l=await x.request("/benchmark");n(l)}catch(l){d(l instanceof Error?l.message:"Failed to load benchmark data")}finally{s(!1)}}t()},[]),{data:r,loading:c,error:o}}function h(){const{data:r,loading:n,error:c}=m();if(n)return e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading benchmark data..."});if(c)return e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",c]});if(!r)return e.jsx("div",{});const{tokenEconomy:s,dependencyIntelligence:o,formulas:d}=r;return e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Token Economy"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(a,{value:`${s.avgCompressionPercent}%`,label:"Avg Compress"}),e.jsx(a,{value:s.avgTokensPerTask.toLocaleString(),label:"Tokens Saved/Task"}),e.jsx(a,{value:s.totalNodes,label:"Nodes"}),e.jsx(a,{value:s.totalEdges,label:"Edges"})]}),s.perTaskMetrics.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Context Compression per Task"}),e.jsx("div",{className:"space-y-1.5","data-testid":"compression-bars",children:s.perTaskMetrics.slice(0,15).map(t=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-32 truncate",title:t.title,children:t.title}),e.jsx("div",{className:"flex-1 h-3 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full bg-[var(--color-accent)]",style:{width:`${Math.min(t.compressionPercent,100)}%`}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-24 text-right",children:[t.compressionPercent,"% (",t.estimatedTokens," tok)"]})]},t.id))})]})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Dependency Intelligence"}),e.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[e.jsx(a,{value:o.inferredDeps,label:"Auto Inferred"}),e.jsx(a,{value:`${o.blockedTasks}/${s.totalNodes}`,label:"Blocked Detected"}),e.jsx(a,{value:o.cycles,label:"Cycles Detected"})]})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Formulas & Justification"}),e.jsx("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-xs space-y-1","data-testid":"formulas-section",children:Object.entries(d).map(([t,l])=>e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("span",{className:"text-[var(--color-text-muted)] font-mono w-40 shrink-0",children:[t,":"]}),e.jsx("span",{children:l})]},t))})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Cost Savings per Task"}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(a,{value:`$${s.costSavings.opusPerTask.toFixed(3)}`,label:"Opus Input"}),e.jsx(a,{value:`$${s.costSavings.sonnetPerTask.toFixed(3)}`,label:"Sonnet Input"})]})]})]})}function a({value:r,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center","data-testid":"metric-card",children:[e.jsx("div",{className:"text-xl font-bold",children:r}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{h as BenchmarkTab};