@jait/gateway 0.1.526 → 0.1.527
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.
- package/dist/surfaces/remote-terminal.js +1 -1
- package/dist/surfaces/remote-terminal.js.map +1 -1
- package/package.json +1 -1
- package/web-dist/assets/{_basePickBy-D7fZfAVs.js → _basePickBy-Bz6NInKy.js} +1 -1
- package/web-dist/assets/{_baseUniq-D8HUAZnN.js → _baseUniq-7sGDZAgH.js} +1 -1
- package/web-dist/assets/{arc-D0qN6Nx5.js → arc-BYg6cNDk.js} +1 -1
- package/web-dist/assets/{architectureDiagram-2XIMDMQ5-CjARAaU-.js → architectureDiagram-2XIMDMQ5-BAw4-GwQ.js} +1 -1
- package/web-dist/assets/{blockDiagram-WCTKOSBZ-OmJkXh--.js → blockDiagram-WCTKOSBZ-D1nwTSpK.js} +1 -1
- package/web-dist/assets/{c4Diagram-IC4MRINW-CPzvTiHN.js → c4Diagram-IC4MRINW-CI9T2EeW.js} +1 -1
- package/web-dist/assets/channel-Cd0OuPmu.js +1 -0
- package/web-dist/assets/{chunk-4BX2VUAB-jAsNZ8lA.js → chunk-4BX2VUAB-CDAS83b1.js} +1 -1
- package/web-dist/assets/{chunk-55IACEB6-Dd-w43p5.js → chunk-55IACEB6-Bq9R2hFV.js} +1 -1
- package/web-dist/assets/{chunk-FMBD7UC4-L-do-Euw.js → chunk-FMBD7UC4-C0sEH_Mg.js} +1 -1
- package/web-dist/assets/{chunk-JSJVCQXG-Dw7gtHAg.js → chunk-JSJVCQXG-DuqiXkc-.js} +1 -1
- package/web-dist/assets/{chunk-KX2RTZJC-DthNHnaE.js → chunk-KX2RTZJC-DYotOaPc.js} +1 -1
- package/web-dist/assets/{chunk-NQ4KR5QH-4qE1QsVA.js → chunk-NQ4KR5QH-gL_pnS6s.js} +1 -1
- package/web-dist/assets/{chunk-QZHKN3VN-DQ1MAaFK.js → chunk-QZHKN3VN-DI_IUxbT.js} +1 -1
- package/web-dist/assets/{chunk-WL4C6EOR-DD-SqRIu.js → chunk-WL4C6EOR-BM7Gi40w.js} +1 -1
- package/web-dist/assets/classDiagram-VBA2DB6C-B2XcOk5K.js +1 -0
- package/web-dist/assets/classDiagram-v2-RAHNMMFH-B2XcOk5K.js +1 -0
- package/web-dist/assets/clone-Bv5eALLF.js +1 -0
- package/web-dist/assets/{cose-bilkent-S5V4N54A-mv5d-5vF.js → cose-bilkent-S5V4N54A-B7A448gM.js} +1 -1
- package/web-dist/assets/{dagre-KLK3FWXG-Cy5rU9Jl.js → dagre-KLK3FWXG-DAeX9_0G.js} +1 -1
- package/web-dist/assets/{diagram-E7M64L7V-DzddIFIc.js → diagram-E7M64L7V-DEi2HRqP.js} +1 -1
- package/web-dist/assets/{diagram-IFDJBPK2-DJdphepv.js → diagram-IFDJBPK2-BxjoOI5W.js} +1 -1
- package/web-dist/assets/{diagram-P4PSJMXO-ltg-H2WN.js → diagram-P4PSJMXO-CXDcHg8U.js} +1 -1
- package/web-dist/assets/{erDiagram-INFDFZHY-CbqBlAhf.js → erDiagram-INFDFZHY-BBExxWyU.js} +1 -1
- package/web-dist/assets/{flowDiagram-PKNHOUZH-C050qvm1.js → flowDiagram-PKNHOUZH-DdQwNFMC.js} +1 -1
- package/web-dist/assets/{ganttDiagram-A5KZAMGK-Cy-4M5XA.js → ganttDiagram-A5KZAMGK-ClhLvrG_.js} +1 -1
- package/web-dist/assets/{gitGraphDiagram-K3NZZRJ6-bBL-QJUs.js → gitGraphDiagram-K3NZZRJ6-DLeSQsQO.js} +1 -1
- package/web-dist/assets/{graph--8qI82nX.js → graph-yZHgcFde.js} +1 -1
- package/web-dist/assets/{index-1X0AEzQ2.js → index-BMb1mbcX.js} +6 -6
- package/web-dist/assets/{index-BFMMVI_j.js → index-C9NrKQqH.js} +1 -1
- package/web-dist/assets/{index-DRARWPTZ.js → index-zefKYqXF.js} +1 -1
- package/web-dist/assets/{infoDiagram-LFFYTUFH-CODqFWwH.js → infoDiagram-LFFYTUFH-BxKwSt6Y.js} +1 -1
- package/web-dist/assets/{ishikawaDiagram-PHBUUO56-BW4DdDcW.js → ishikawaDiagram-PHBUUO56-Cl45ax04.js} +1 -1
- package/web-dist/assets/{journeyDiagram-4ABVD52K-BsyF9GMx.js → journeyDiagram-4ABVD52K-DYx9UBcq.js} +1 -1
- package/web-dist/assets/{kanban-definition-K7BYSVSG-BfF8hiCs.js → kanban-definition-K7BYSVSG-C12HKqkT.js} +1 -1
- package/web-dist/assets/{layout-B6n89LDA.js → layout-DcZ_f46G.js} +1 -1
- package/web-dist/assets/{linear-CqeQ9-w5.js → linear-BCAGS6k-.js} +1 -1
- package/web-dist/assets/{mindmap-definition-YRQLILUH-Z6r4FJAG.js → mindmap-definition-YRQLILUH-CT90jJmn.js} +1 -1
- package/web-dist/assets/{pieDiagram-SKSYHLDU-C1UO2Lcb.js → pieDiagram-SKSYHLDU-f8Kl9KRZ.js} +1 -1
- package/web-dist/assets/{quadrantDiagram-337W2JSQ-oYLlpcrl.js → quadrantDiagram-337W2JSQ-CwAWNw-G.js} +1 -1
- package/web-dist/assets/{requirementDiagram-Z7DCOOCP-CSuL7npd.js → requirementDiagram-Z7DCOOCP-Dq9avBBg.js} +1 -1
- package/web-dist/assets/{sankeyDiagram-WA2Y5GQK-9I2h-SRj.js → sankeyDiagram-WA2Y5GQK-CZC4QgzZ.js} +1 -1
- package/web-dist/assets/{sequenceDiagram-2WXFIKYE-B8Ea9r5x.js → sequenceDiagram-2WXFIKYE-X9yDHxES.js} +1 -1
- package/web-dist/assets/{stateDiagram-RAJIS63D-BpYtTjWT.js → stateDiagram-RAJIS63D-DoUaG8bp.js} +1 -1
- package/web-dist/assets/stateDiagram-v2-FVOUBMTO-bfQPMNg7.js +1 -0
- package/web-dist/assets/{timeline-definition-YZTLITO2-Cw3Qh356.js → timeline-definition-YZTLITO2-CE1XVV9S.js} +1 -1
- package/web-dist/assets/{treemap-KZPCXAKY-BdRv7Xlk.js → treemap-KZPCXAKY-BneffFhA.js} +1 -1
- package/web-dist/assets/{vennDiagram-LZ73GAT5-Cx2EJNfY.js → vennDiagram-LZ73GAT5-C6jQs3g-.js} +1 -1
- package/web-dist/assets/{xychartDiagram-JWTSCODW-eNhK_FNE.js → xychartDiagram-JWTSCODW-CLf2Ayf0.js} +1 -1
- package/web-dist/index.html +1 -1
- package/web-dist/assets/channel-DuQ2YcL0.js +0 -1
- package/web-dist/assets/classDiagram-VBA2DB6C-LgVl-pgq.js +0 -1
- package/web-dist/assets/classDiagram-v2-RAHNMMFH-LgVl-pgq.js +0 -1
- package/web-dist/assets/clone-BwdBbOH3.js +0 -1
- package/web-dist/assets/stateDiagram-v2-FVOUBMTO-ZfMYyZ3S.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-KLK3FWXG-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-KLK3FWXG-DAeX9_0G.js","./graph-yZHgcFde.js","./_baseUniq-7sGDZAgH.js","./layout-DcZ_f46G.js","./_basePickBy-Bz6NInKy.js","./clone-Bv5eALLF.js","./cose-bilkent-S5V4N54A-B7A448gM.js","./cytoscape.esm-BQaXIfA_.js","./c4Diagram-IC4MRINW-CI9T2EeW.js","./chunk-JSJVCQXG-DuqiXkc-.js","./flowDiagram-PKNHOUZH-DdQwNFMC.js","./chunk-FMBD7UC4-C0sEH_Mg.js","./chunk-55IACEB6-Bq9R2hFV.js","./chunk-KX2RTZJC-DYotOaPc.js","./channel-Cd0OuPmu.js","./erDiagram-INFDFZHY-BBExxWyU.js","./gitGraphDiagram-K3NZZRJ6-DLeSQsQO.js","./chunk-4BX2VUAB-CDAS83b1.js","./chunk-QZHKN3VN-DI_IUxbT.js","./treemap-KZPCXAKY-BneffFhA.js","./ganttDiagram-A5KZAMGK-ClhLvrG_.js","./linear-BCAGS6k-.js","./defaultLocale-DX6XiGOO.js","./infoDiagram-LFFYTUFH-BxKwSt6Y.js","./pieDiagram-SKSYHLDU-f8Kl9KRZ.js","./arc-BYg6cNDk.js","./quadrantDiagram-337W2JSQ-CwAWNw-G.js","./xychartDiagram-JWTSCODW-CLf2Ayf0.js","./requirementDiagram-Z7DCOOCP-Dq9avBBg.js","./sequenceDiagram-2WXFIKYE-X9yDHxES.js","./classDiagram-VBA2DB6C-B2XcOk5K.js","./chunk-WL4C6EOR-BM7Gi40w.js","./classDiagram-v2-RAHNMMFH-B2XcOk5K.js","./stateDiagram-RAJIS63D-DoUaG8bp.js","./chunk-NQ4KR5QH-gL_pnS6s.js","./stateDiagram-v2-FVOUBMTO-bfQPMNg7.js","./journeyDiagram-4ABVD52K-DYx9UBcq.js","./timeline-definition-YZTLITO2-CE1XVV9S.js","./mindmap-definition-YRQLILUH-CT90jJmn.js","./kanban-definition-K7BYSVSG-C12HKqkT.js","./diagram-P4PSJMXO-CXDcHg8U.js","./diagram-IFDJBPK2-BxjoOI5W.js","./blockDiagram-WCTKOSBZ-D1nwTSpK.js","./architectureDiagram-2XIMDMQ5-BAw4-GwQ.js","./diagram-E7M64L7V-DEi2HRqP.js","./angular-html-DA-rfuFy.js","./html-pp8916En.js","./javascript-wDzz0qaB.js","./css-CLj8gQPS.js","./angular-ts-BrjP3tb8.js","./scss-D5BDwBP9.js","./astro-HNnZUWAn.js","./json-Cp-IABpG.js","./typescript-BPQ3VLAy.js","./postcss-CXtECtnM.js","./tsx-COt5Ahok.js","./blade-BjGOyj-B.js","./html-derivative-DlHx6ybY.js","./xml-sdJ4AIDG.js","./java-CylS5w8V.js","./sql-BLtJtn59.js","./coffee-Ch7k5sss.js","./cpp-CofmeUqb.js","./regexp-CDVJQ6XC.js","./glsl-DplSGwfg.js","./c-BIGW1oBm.js","./graphql-ChdNCCLP.js","./jsx-g9-lgVsj.js","./haml-D5jkg6IW.js","./handlebars-BpdQsYii.js","./yaml-Buea-lGh.js","./http-jrhK8wxY.js","./shellscript-Yzrsuije.js","./hurl-irOxFIW8.js","./csv-fuZLfV_i.js","./jinja-f2NsQr07.js","./jison-wvAkD_A8.js","./julia-CxzCAyBv.js","./python-B6aJPvgy.js","./r-Dspwwk_N.js","./marko-DjSrsDqO.js","./less-B1dDrJ26.js","./mdc-DTYItulj.js","./markdown-Cvjx9yec.js","./php-R6g_5hLQ.js","./pug-DKIMFp6K.js","./svelte-Cy7k_4gC.js","./ts-tags-DQrlYJgV.js","./vue-D2xRrEX4.js","./vue-html-AaS7Mt5G.js","./vue-vine-BoDAl6tE.js","./stylus-BEDo0Tqx.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var cpe=Object.defineProperty;var upe=(e,n,r)=>n in e?cpe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;var et=(e,n,r)=>upe(e,typeof n!="symbol"?n+"":n,r);function dpe(e,n){for(var r=0;r<n.length;r++){const i=n[r];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const a=Object.getOwnPropertyDescriptor(i,s);a&&Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(s){if(s.ep)return;s.ep=!0;const a=r(s);fetch(s.href,a)}})();function I0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function e_t(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var n=e.default;if(typeof n=="function"){var r=function i(){return this instanceof i?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};r.prototype=n.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,s.get?s:{enumerable:!0,get:function(){return e[i]}})}),r}var T6={exports:{}},$v={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.js
|
|
@@ -1112,8 +1112,8 @@ Please report this to https://github.com/markedjs/marked.`,n){let s="<p>An error
|
|
|
1112
1112
|
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),o=e.width/2;let l=r.x<n.x?o-a:o+a;const u=e.height/2,d=Math.abs(n.y-r.y),h=Math.abs(n.x-r.x);if(Math.abs(s-n.y)*o>Math.abs(i-n.x)*u){let f=r.y<n.y?n.y-u-s:s-u-n.y;l=h*f/d;const m={x:r.x<n.x?r.x+l:r.x-h+l,y:r.y<n.y?r.y+d-f:r.y-d+f};return l===0&&(m.x=n.x,m.y=n.y),h===0&&(m.x=n.x),d===0&&(m.y=n.y),Ot.debug(`abc89 top/bottom calc, Q ${d}, q ${f}, R ${h}, r ${l}`,m),m}else{r.x<n.x?l=n.x-o-i:l=i-o-n.x;let f=d*l/h,m=r.x<n.x?r.x+h-l:r.x-h+l,x=r.y<n.y?r.y+f:r.y-f;return Ot.debug(`sides calc abc89, Q ${d}, q ${f}, R ${h}, r ${l}`,{_x:m,_y:x}),l===0&&(m=n.x,x=n.y),h===0&&(m=n.x),d===0&&(x=n.y),{x:m,y:x}}},"intersection"),dz=Y((e,n)=>{Ot.warn("abc88 cutPathAtIntersect",e,n);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(Ot.info("abc88 checking point",a,n),!gOe(n,a)&&!s){const o=yOe(n,i,a);Ot.debug("abc88 inside",a,i,o),Ot.debug("abc88 intersection",o,n);let l=!1;r.forEach(u=>{l=l||u.x===o.x&&u.y===o.y}),r.some(u=>u.x===o.x&&u.y===o.y)?Ot.warn("abc88 no intersect",o,r):r.push(o),s=!0}else Ot.warn("abc88 outside",a,i),i=a,s||r.push(a)}),Ot.debug("returning points",r),r},"cutPathAtIntersect");function sre(e){const n=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],o=e[i+1];(s.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===o.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5)&&(n.push(a),r.push(i))}return{cornerPoints:n,cornerPointPositions:r}}Y(sre,"extractCornerPoints");var hz=Y(function(e,n,r){const i=n.x-e.x,s=n.y-e.y,a=Math.sqrt(i*i+s*s),o=r/a;return{x:n.x-o*i,y:n.y-o*s}},"findAdjacentPoint"),xOe=Y(function(e){const{cornerPointPositions:n}=sre(e),r=[];for(let i=0;i<e.length;i++)if(n.includes(i)){const s=e[i-1],a=e[i+1],o=e[i],l=hz(s,o,5),u=hz(a,o,5),d=u.x-l.x,h=u.y-l.y;r.push(l);const f=Math.sqrt(2)*2;let m={x:o.x,y:o.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){Ot.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const x=5;o.x===l.x?m={x:d<0?l.x-x+f:l.x+x-f,y:h<0?l.y-f:l.y+f}:m={x:d<0?l.x-f:l.x+f,y:h<0?l.y-x+f:l.y+x-f}}else Ot.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(m,u)}else r.push(e[i]);return r},"fixCorners"),vOe=Y((e,n,r)=>{const i=e-n-r,s=2,a=2,o=s+a,l=Math.floor(i/o),u=Array(l).fill(`${s} ${a}`).join(" ");return`0 ${n} ${u} ${r}`},"generateDashArray"),bOe=Y(function(e,n,r,i,s,a,o,l=!1){var M;const{handDrawnSeed:u}=ui();let d=n.points,h=!1;const f=s;var m=a;const x=[];for(const L in n.cssCompiledStyles)ste(L)||x.push(n.cssCompiledStyles[L]);Ot.debug("UIO intersect check",n.points,m.x,f.x),m.intersect&&f.intersect&&!l&&(d=d.slice(1,n.points.length-1),d.unshift(f.intersect(d[0])),Ot.debug("Last point UIO",n.start,"-->",n.end,d[d.length-1],m,m.intersect(d[d.length-1])),d.push(m.intersect(d[d.length-1])));const v=btoa(JSON.stringify(d));n.toCluster&&(Ot.info("to cluster abc88",r.get(n.toCluster)),d=dz(n.points,r.get(n.toCluster).node),h=!0),n.fromCluster&&(Ot.debug("from cluster abc88",r.get(n.fromCluster),JSON.stringify(d,null,2)),d=dz(d.reverse(),r.get(n.fromCluster).node).reverse(),h=!0);let _=d.filter(L=>!Number.isNaN(L.y));const w=fOe(n.curve);w!=="rounded"&&(_=xOe(_));let S=b_;switch(w){case"linear":S=b_;break;case"basis":S=NA;break;case"cardinal":S=BZ;break;case"bumpX":S=PZ;break;case"bumpY":S=LZ;break;case"catmullRom":S=FZ;break;case"monotoneX":S=GZ;break;case"monotoneY":S=KZ;break;case"natural":S=XZ;break;case"step":S=JZ;break;case"stepAfter":S=QZ;break;case"stepBefore":S=ZZ;break;case"rounded":S=b_;break;default:S=NA}const{x:C,y:j}=g6e(n),T=q4e().x(C).y(j).curve(S);let E;switch(n.thickness){case"normal":E="edge-thickness-normal";break;case"thick":E="edge-thickness-thick";break;case"invisible":E="edge-thickness-invisible";break;default:E="edge-thickness-normal"}switch(n.pattern){case"solid":E+=" edge-pattern-solid";break;case"dotted":E+=" edge-pattern-dotted";break;case"dashed":E+=" edge-pattern-dashed";break;default:E+=" edge-pattern-solid"}let N,R=w==="rounded"?are(ore(_,n),5):T(_);const D=Array.isArray(n.style)?n.style:[n.style];let U=D.find(L=>L==null?void 0:L.startsWith("stroke:")),H="";n.animate&&(H="edge-animation-fast"),n.animation&&(H="edge-animation-"+n.animation);let I=!1;if(n.look==="handDrawn"){const L=An.svg(e);Object.assign([],_);const z=L.path(R,{roughness:.3,seed:u});E+=" transition",N=er(z).select("path").attr("id",n.id).attr("class"," "+E+(n.classes?" "+n.classes:"")+(H?" "+H:"")).attr("style",D?D.reduce((V,F)=>V+";"+F,""):"");let G=N.attr("d");N.attr("d",G),e.node().appendChild(N.node())}else{const L=x.join(";"),z=D?D.reduce((ee,J)=>ee+J+";",""):"",G=(L?L+";"+z+";":z)+";"+(D?D.reduce((ee,J)=>ee+";"+J,""):"");N=e.append("path").attr("d",R).attr("id",n.id).attr("class"," "+E+(n.classes?" "+n.classes:"")+(H?" "+H:"")).attr("style",G),U=(M=G.match(/stroke:([^;]+)/))==null?void 0:M[1],I=n.animate===!0||!!n.animation||L.includes("animation");const V=N.node(),F=typeof V.getTotalLength=="function"?V.getTotalLength():0,X=NB[n.arrowTypeStart]||0,q=NB[n.arrowTypeEnd]||0;if(n.look==="neo"&&!I){const J=`stroke-dasharray: ${n.pattern==="dotted"||n.pattern==="dashed"?vOe(F,X,q):`0 ${X} ${F-X-q} ${q}`}; stroke-dashoffset: 0;`;N.attr("style",J+N.attr("style"))}}N.attr("data-edge",!0),N.attr("data-et","edge"),N.attr("data-id",n.id),N.attr("data-points",v),n.showPoints&&_.forEach(L=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",L.x).attr("cy",L.y)});let W="";(ui().flowchart.arrowMarkerAbsolute||ui().state.arrowMarkerAbsolute)&&(W=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,W=W.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),Ot.info("arrowTypeStart",n.arrowTypeStart),Ot.info("arrowTypeEnd",n.arrowTypeEnd),dOe(N,n,W,o,i,U);const $=Math.floor(d.length/2),O=d[$];dd.isLabelCoordinateInPath(O,N.attr("d"))||(h=!0);let B={};return h&&(B.updatedPath=d),B.originalPath=n.points,B},"insertEdge");function are(e,n){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const o=e[a],l=e[a-1],u=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const d=o.x-l.x,h=o.y-l.y,f=u.x-o.x,m=u.y-o.y,x=Math.hypot(d,h),v=Math.hypot(f,m);if(x<s||v<s){r+=`L${o.x},${o.y}`;continue}const _=d/x,w=h/x,S=f/v,C=m/v,j=_*S+w*C,T=Math.max(-1,Math.min(1,j)),E=Math.acos(T);if(E<s||Math.abs(Math.PI-E)<s){r+=`L${o.x},${o.y}`;continue}const N=Math.min(n/Math.sin(E/2),x/2,v/2),R=o.x-_*N,D=o.y-w*N,U=o.x+S*N,H=o.y+C*N;r+=`L${R},${D}`,r+=`Q${o.x},${o.y} ${U},${H}`}}return r}Y(are,"generateRoundedPath");function tO(e,n){if(!e||!n)return{angle:0,deltaX:0,deltaY:0};const r=n.x-e.x,i=n.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}Y(tO,"calculateDeltaAndAngle");function ore(e,n){const r=e.map(s=>({...s}));if(e.length>=2&&Ao[n.arrowTypeStart]){const s=Ao[n.arrowTypeStart],a=e[0],o=e[1],{angle:l}=tO(a,o),u=s*Math.cos(l),d=s*Math.sin(l);r[0].x=a.x+u,r[0].y=a.y+d}const i=e.length;if(i>=2&&Ao[n.arrowTypeEnd]){const s=Ao[n.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:l}=tO(o,a),u=s*Math.cos(l),d=s*Math.sin(l);r[i-1].x=a.x-u,r[i-1].y=a.y-d}return r}Y(ore,"applyMarkerOffsetsToPoints");var _Oe=Y((e,n,r,i)=>{n.forEach(s=>{DOe[s](e,r,i)})},"insertMarkers"),wOe=Y((e,n,r)=>{Ot.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+n+"-extensionStart").attr("class","marker extension "+n).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+n+"-extensionEnd").attr("class","marker extension "+n).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),SOe=Y((e,n,r)=>{e.append("defs").append("marker").attr("id",r+"_"+n+"-compositionStart").attr("class","marker composition "+n).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+n+"-compositionEnd").attr("class","marker composition "+n).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),kOe=Y((e,n,r)=>{e.append("defs").append("marker").attr("id",r+"_"+n+"-aggregationStart").attr("class","marker aggregation "+n).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+n+"-aggregationEnd").attr("class","marker aggregation "+n).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),COe=Y((e,n,r)=>{e.append("defs").append("marker").attr("id",r+"_"+n+"-dependencyStart").attr("class","marker dependency "+n).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+n+"-dependencyEnd").attr("class","marker dependency "+n).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),jOe=Y((e,n,r)=>{e.append("defs").append("marker").attr("id",r+"_"+n+"-lollipopStart").attr("class","marker lollipop "+n).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+n+"-lollipopEnd").attr("class","marker lollipop "+n).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),NOe=Y((e,n,r)=>{e.append("marker").attr("id",r+"_"+n+"-pointEnd").attr("class","marker "+n).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+n+"-pointStart").attr("class","marker "+n).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),TOe=Y((e,n,r)=>{e.append("marker").attr("id",r+"_"+n+"-circleEnd").attr("class","marker "+n).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+n+"-circleStart").attr("class","marker "+n).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),EOe=Y((e,n,r)=>{e.append("marker").attr("id",r+"_"+n+"-crossEnd").attr("class","marker cross "+n).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+n+"-crossStart").attr("class","marker cross "+n).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),AOe=Y((e,n,r)=>{e.append("defs").append("marker").attr("id",r+"_"+n+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),OOe=Y((e,n,r)=>{e.append("defs").append("marker").attr("id",r+"_"+n+"-onlyOneStart").attr("class","marker onlyOne "+n).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+n+"-onlyOneEnd").attr("class","marker onlyOne "+n).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),ROe=Y((e,n,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+n+"-zeroOrOneStart").attr("class","marker zeroOrOne "+n).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+n+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+n).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),MOe=Y((e,n,r)=>{e.append("defs").append("marker").attr("id",r+"_"+n+"-oneOrMoreStart").attr("class","marker oneOrMore "+n).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+n+"-oneOrMoreEnd").attr("class","marker oneOrMore "+n).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),POe=Y((e,n,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+n+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+n).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+n+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+n).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),LOe=Y((e,n,r)=>{e.append("defs").append("marker").attr("id",r+"_"+n+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
1113
1113
|
L20,10
|
|
1114
1114
|
M20,10
|
|
1115
|
-
L0,20`)},"requirement_arrow"),$Oe=Y((e,n,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+n+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),DOe={extension:wOe,composition:SOe,aggregation:kOe,dependency:COe,lollipop:jOe,point:NOe,circle:TOe,cross:EOe,barb:AOe,only_one:OOe,zero_or_one:ROe,one_or_more:MOe,zero_or_more:POe,requirement_arrow:LOe,requirement_contains:$Oe},IOe=_Oe,BOe={common:dS,getConfig:Lo,insertCluster:VAe,insertEdge:bOe,insertEdgeLabel:pOe,insertMarkers:IOe,insertNode:ire,interpolateToCurve:h9,labelHelper:sr,log:Ot,positionEdgeLabel:mOe},lw={},lre=Y(e=>{for(const n of e)lw[n.name]=n},"registerLayoutLoaders"),zOe=Y(()=>{lre([{name:"dagre",loader:Y(async()=>await st(()=>import("./dagre-KLK3FWXG-Cy5rU9Jl.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"loader")},{name:"cose-bilkent",loader:Y(async()=>await st(()=>import("./cose-bilkent-S5V4N54A-mv5d-5vF.js"),__vite__mapDeps([6,7]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");zOe();var I_t=Y(async(e,n)=>{if(!(e.layoutAlgorithm in lw))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=lw[e.layoutAlgorithm];return(await r.loader()).render(e,n,BOe,{algorithm:r.algorithm})},"render"),B_t=Y((e="",{fallback:n="dagre"}={})=>{if(e in lw)return e;if(n in lw)return Ot.warn(`Layout algorithm ${e} is not registered. Using ${n} as fallback.`),n;throw new Error(`Both layout algorithms ${e} and ${n} are not registered.`)},"getRegisteredLayoutAlgorithm"),cre="comm",ure="rule",dre="decl",FOe="@import",HOe="@namespace",WOe="@keyframes",UOe="@layer",hre=Math.abs,M9=String.fromCharCode;function fre(e){return e.trim()}function N3(e,n,r){return e.replace(n,r)}function VOe(e,n,r){return e.indexOf(n,r)}function Sx(e,n){return e.charCodeAt(n)|0}function Jx(e,n,r){return e.slice(n,r)}function bh(e){return e.length}function qOe(e){return e.length}function vC(e,n){return n.push(e),e}var H4=1,Zx=1,pre=0,ju=0,Js=0,k1="";function P9(e,n,r,i,s,a,o,l){return{value:e,root:n,parent:r,type:i,props:s,children:a,line:H4,column:Zx,length:o,return:"",siblings:l}}function GOe(){return Js}function KOe(){return Js=ju>0?Sx(k1,--ju):0,Zx--,Js===10&&(Zx=1,H4--),Js}function _d(){return Js=ju<pre?Sx(k1,ju++):0,Zx++,Js===10&&(Zx=1,H4++),Js}function _m(){return Sx(k1,ju)}function T3(){return ju}function W4(e,n){return Jx(k1,e,n)}function cw(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function YOe(e){return H4=Zx=1,pre=bh(k1=e),ju=0,[]}function XOe(e){return k1="",e}function kT(e){return fre(W4(ju-1,nO(e===91?e+2:e===40?e+1:e)))}function JOe(e){for(;(Js=_m())&&Js<33;)_d();return cw(e)>2||cw(Js)>3?"":" "}function ZOe(e,n){for(;--n&&_d()&&!(Js<48||Js>102||Js>57&&Js<65||Js>70&&Js<97););return W4(e,T3()+(n<6&&_m()==32&&_d()==32))}function nO(e){for(;_d();)switch(Js){case e:return ju;case 34:case 39:e!==34&&e!==39&&nO(Js);break;case 40:e===41&&nO(e);break;case 92:_d();break}return ju}function QOe(e,n){for(;_d()&&e+Js!==57;)if(e+Js===84&&_m()===47)break;return"/*"+W4(n,ju-1)+"*"+M9(e===47?e:_d())}function e7e(e){for(;!cw(_m());)_d();return W4(e,ju)}function t7e(e){return XOe(E3("",null,null,null,[""],e=YOe(e),0,[0],e))}function E3(e,n,r,i,s,a,o,l,u){for(var d=0,h=0,f=o,m=0,x=0,v=0,_=1,w=1,S=1,C=0,j="",T=s,E=a,N=i,R=j;w;)switch(v=C,C=_d()){case 40:if(v!=108&&Sx(R,f-1)==58){VOe(R+=N3(kT(C),"&","&\f"),"&\f",hre(d?l[d-1]:0))!=-1&&(S=-1);break}case 34:case 39:case 91:R+=kT(C);break;case 9:case 10:case 13:case 32:R+=JOe(v);break;case 92:R+=ZOe(T3()-1,7);continue;case 47:switch(_m()){case 42:case 47:vC(n7e(QOe(_d(),T3()),n,r,u),u),(cw(v||1)==5||cw(_m()||1)==5)&&bh(R)&&Jx(R,-1,void 0)!==" "&&(R+=" ");break;default:R+="/"}break;case 123*_:l[d++]=bh(R)*S;case 125*_:case 59:case 0:switch(C){case 0:case 125:w=0;case 59+h:S==-1&&(R=N3(R,/\f/g,"")),x>0&&(bh(R)-f||_===0&&v===47)&&vC(x>32?pz(R+";",i,r,f-1,u):pz(N3(R," ","")+";",i,r,f-2,u),u);break;case 59:R+=";";default:if(vC(N=fz(R,n,r,d,h,s,l,j,T=[],E=[],f,a),a),C===123)if(h===0)E3(R,n,N,N,T,a,f,l,E);else{switch(m){case 99:if(Sx(R,3)===110)break;case 108:if(Sx(R,2)===97)break;default:h=0;case 100:case 109:case 115:}h?E3(e,N,N,i&&vC(fz(e,N,N,0,0,s,l,j,s,T=[],f,E),E),s,E,f,l,i?T:E):E3(R,N,N,N,[""],E,0,l,E)}}d=h=x=0,_=S=1,j=R="",f=o;break;case 58:f=1+bh(R),x=v;default:if(_<1){if(C==123)--_;else if(C==125&&_++==0&&KOe()==125)continue}switch(R+=M9(C),C*_){case 38:S=h>0?1:(R+="\f",-1);break;case 44:l[d++]=(bh(R)-1)*S,S=1;break;case 64:_m()===45&&(R+=kT(_d())),m=_m(),h=f=bh(j=R+=e7e(T3())),C++;break;case 45:v===45&&bh(R)==2&&(_=0)}}return a}function fz(e,n,r,i,s,a,o,l,u,d,h,f){for(var m=s-1,x=s===0?a:[""],v=qOe(x),_=0,w=0,S=0;_<i;++_)for(var C=0,j=Jx(e,m+1,m=hre(w=o[_])),T=e;C<v;++C)(T=fre(w>0?x[C]+" "+j:N3(j,/&\f/g,x[C])))&&(u[S++]=T);return P9(e,n,r,s===0?ure:l,u,d,h,f)}function n7e(e,n,r,i){return P9(e,n,r,cre,M9(GOe()),Jx(e,2,-2),0,i)}function pz(e,n,r,i,s){return P9(e,n,r,dre,Jx(e,0,i),Jx(e,i+1,-1),i,s)}function rO(e,n){for(var r="",i=0;i<e.length;i++)r+=n(e[i],i,e,n)||"";return r}function r7e(e,n,r,i){switch(e.type){case UOe:if(e.children.length)break;case FOe:case HOe:case dre:return e.return=e.return||e.value;case cre:return"";case WOe:return e.return=e.value+"{"+rO(e.children,i)+"}";case ure:if(!bh(e.value=e.props.join(",")))return""}return bh(r=rO(e.children,i))?e.return=e.value+"{"+r+"}":""}var i7e=Iee(Object.keys,Object),s7e=Object.prototype,a7e=s7e.hasOwnProperty;function o7e(e){if(!M4(e))return i7e(e);var n=[];for(var r in Object(e))a7e.call(e,r)&&r!="constructor"&&n.push(r);return n}var iO=K0(Ld,"DataView"),sO=K0(Ld,"Promise"),aO=K0(Ld,"Set"),oO=K0(Ld,"WeakMap"),mz="[object Map]",l7e="[object Object]",gz="[object Promise]",yz="[object Set]",xz="[object WeakMap]",vz="[object DataView]",c7e=G0(iO),u7e=G0(aw),d7e=G0(sO),h7e=G0(aO),f7e=G0(oO),Ug=q0;(iO&&Ug(new iO(new ArrayBuffer(1)))!=vz||aw&&Ug(new aw)!=mz||sO&&Ug(sO.resolve())!=gz||aO&&Ug(new aO)!=yz||oO&&Ug(new oO)!=xz)&&(Ug=function(e){var n=q0(e),r=n==l7e?e.constructor:void 0,i=r?G0(r):"";if(i)switch(i){case c7e:return vz;case u7e:return mz;case d7e:return gz;case h7e:return yz;case f7e:return xz}return n});var p7e="[object Map]",m7e="[object Set]",g7e=Object.prototype,y7e=g7e.hasOwnProperty;function bz(e){if(e==null)return!0;if(P4(e)&&(I5(e)||typeof e=="string"||typeof e.splice=="function"||u9(e)||d9(e)||D5(e)))return!e.length;var n=Ug(e);if(n==p7e||n==m7e)return!e.size;if(M4(e))return!o7e(e).length;for(var r in e)if(y7e.call(e,r))return!1;return!0}var mre="c4",x7e=Y(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),v7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./c4Diagram-IC4MRINW-CPzvTiHN.js");return{diagram:n}},__vite__mapDeps([8,9]),import.meta.url);return{id:mre,diagram:e}},"loader"),b7e={id:mre,detector:x7e,loader:v7e},_7e=b7e,gre="flowchart",w7e=Y((e,n)=>{var r,i;return((r=n==null?void 0:n.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=n==null?void 0:n.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),S7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./flowDiagram-PKNHOUZH-C050qvm1.js");return{diagram:n}},__vite__mapDeps([10,11,9,12,13,14]),import.meta.url);return{id:gre,diagram:e}},"loader"),k7e={id:gre,detector:w7e,loader:S7e},C7e=k7e,yre="flowchart-v2",j7e=Y((e,n)=>{var r,i,s;return((r=n==null?void 0:n.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=n==null?void 0:n.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(n.layout="elk"),/^\s*graph/.test(e)&&((s=n==null?void 0:n.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),N7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./flowDiagram-PKNHOUZH-C050qvm1.js");return{diagram:n}},__vite__mapDeps([10,11,9,12,13,14]),import.meta.url);return{id:yre,diagram:e}},"loader"),T7e={id:yre,detector:j7e,loader:N7e},E7e=T7e,xre="er",A7e=Y(e=>/^\s*erDiagram/.test(e),"detector"),O7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./erDiagram-INFDFZHY-CbqBlAhf.js");return{diagram:n}},__vite__mapDeps([15,12,13,14]),import.meta.url);return{id:xre,diagram:e}},"loader"),R7e={id:xre,detector:A7e,loader:O7e},M7e=R7e,vre="gitGraph",P7e=Y(e=>/^\s*gitGraph/.test(e),"detector"),L7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./gitGraphDiagram-K3NZZRJ6-bBL-QJUs.js");return{diagram:n}},__vite__mapDeps([16,17,18,19,2,4,5]),import.meta.url);return{id:vre,diagram:e}},"loader"),$7e={id:vre,detector:P7e,loader:L7e},D7e=$7e,bre="gantt",I7e=Y(e=>/^\s*gantt/.test(e),"detector"),B7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./ganttDiagram-A5KZAMGK-Cy-4M5XA.js");return{diagram:n}},__vite__mapDeps([20,21,22]),import.meta.url);return{id:bre,diagram:e}},"loader"),z7e={id:bre,detector:I7e,loader:B7e},F7e=z7e,_re="info",H7e=Y(e=>/^\s*info/.test(e),"detector"),W7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./infoDiagram-LFFYTUFH-CODqFWwH.js");return{diagram:n}},__vite__mapDeps([23,19,2,4,5]),import.meta.url);return{id:_re,diagram:e}},"loader"),U7e={id:_re,detector:H7e,loader:W7e},wre="pie",V7e=Y(e=>/^\s*pie/.test(e),"detector"),q7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./pieDiagram-SKSYHLDU-C1UO2Lcb.js");return{diagram:n}},__vite__mapDeps([24,17,19,2,4,5,25]),import.meta.url);return{id:wre,diagram:e}},"loader"),G7e={id:wre,detector:V7e,loader:q7e},Sre="quadrantChart",K7e=Y(e=>/^\s*quadrantChart/.test(e),"detector"),Y7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./quadrantDiagram-337W2JSQ-oYLlpcrl.js");return{diagram:n}},__vite__mapDeps([26,21,22]),import.meta.url);return{id:Sre,diagram:e}},"loader"),X7e={id:Sre,detector:K7e,loader:Y7e},J7e=X7e,kre="xychart",Z7e=Y(e=>/^\s*xychart(-beta)?/.test(e),"detector"),Q7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./xychartDiagram-JWTSCODW-eNhK_FNE.js");return{diagram:n}},__vite__mapDeps([27,21,22]),import.meta.url);return{id:kre,diagram:e}},"loader"),eRe={id:kre,detector:Z7e,loader:Q7e},tRe=eRe,Cre="requirement",nRe=Y(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),rRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./requirementDiagram-Z7DCOOCP-CSuL7npd.js");return{diagram:n}},__vite__mapDeps([28,12,13]),import.meta.url);return{id:Cre,diagram:e}},"loader"),iRe={id:Cre,detector:nRe,loader:rRe},sRe=iRe,jre="sequence",aRe=Y(e=>/^\s*sequenceDiagram/.test(e),"detector"),oRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./sequenceDiagram-2WXFIKYE-B8Ea9r5x.js");return{diagram:n}},__vite__mapDeps([29,9,18]),import.meta.url);return{id:jre,diagram:e}},"loader"),lRe={id:jre,detector:aRe,loader:oRe},cRe=lRe,Nre="class",uRe=Y((e,n)=>{var r;return((r=n==null?void 0:n.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),dRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./classDiagram-VBA2DB6C-LgVl-pgq.js");return{diagram:n}},__vite__mapDeps([30,31,11,9,12,13]),import.meta.url);return{id:Nre,diagram:e}},"loader"),hRe={id:Nre,detector:uRe,loader:dRe},fRe=hRe,Tre="classDiagram",pRe=Y((e,n)=>{var r;return/^\s*classDiagram/.test(e)&&((r=n==null?void 0:n.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),mRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./classDiagram-v2-RAHNMMFH-LgVl-pgq.js");return{diagram:n}},__vite__mapDeps([32,31,11,9,12,13]),import.meta.url);return{id:Tre,diagram:e}},"loader"),gRe={id:Tre,detector:pRe,loader:mRe},yRe=gRe,Ere="state",xRe=Y((e,n)=>{var r;return((r=n==null?void 0:n.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),vRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./stateDiagram-RAJIS63D-BpYtTjWT.js");return{diagram:n}},__vite__mapDeps([33,34,12,13,1,2,3,4]),import.meta.url);return{id:Ere,diagram:e}},"loader"),bRe={id:Ere,detector:xRe,loader:vRe},_Re=bRe,Are="stateDiagram",wRe=Y((e,n)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=n==null?void 0:n.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),SRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./stateDiagram-v2-FVOUBMTO-ZfMYyZ3S.js");return{diagram:n}},__vite__mapDeps([35,34,12,13]),import.meta.url);return{id:Are,diagram:e}},"loader"),kRe={id:Are,detector:wRe,loader:SRe},CRe=kRe,Ore="journey",jRe=Y(e=>/^\s*journey/.test(e),"detector"),NRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./journeyDiagram-4ABVD52K-BsyF9GMx.js");return{diagram:n}},__vite__mapDeps([36,11,9,25]),import.meta.url);return{id:Ore,diagram:e}},"loader"),TRe={id:Ore,detector:jRe,loader:NRe},ERe=TRe,ARe=Y((e,n,r)=>{Ot.debug(`rendering svg for syntax error
|
|
1116
|
-
`);const i=lNe(n),s=i.append("g");i.attr("viewBox","0 0 2412 512"),eZ(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Rre={draw:ARe},ORe=Rre,RRe={db:{},renderer:Rre,parser:{parse:Y(()=>{},"parse")}},MRe=RRe,Mre="flowchart-elk",PRe=Y((e,n={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=n==null?void 0:n.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(n.layout="elk",!0):!1},"detector"),LRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./flowDiagram-PKNHOUZH-
|
|
1115
|
+
L0,20`)},"requirement_arrow"),$Oe=Y((e,n,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+n+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),DOe={extension:wOe,composition:SOe,aggregation:kOe,dependency:COe,lollipop:jOe,point:NOe,circle:TOe,cross:EOe,barb:AOe,only_one:OOe,zero_or_one:ROe,one_or_more:MOe,zero_or_more:POe,requirement_arrow:LOe,requirement_contains:$Oe},IOe=_Oe,BOe={common:dS,getConfig:Lo,insertCluster:VAe,insertEdge:bOe,insertEdgeLabel:pOe,insertMarkers:IOe,insertNode:ire,interpolateToCurve:h9,labelHelper:sr,log:Ot,positionEdgeLabel:mOe},lw={},lre=Y(e=>{for(const n of e)lw[n.name]=n},"registerLayoutLoaders"),zOe=Y(()=>{lre([{name:"dagre",loader:Y(async()=>await st(()=>import("./dagre-KLK3FWXG-DAeX9_0G.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"loader")},{name:"cose-bilkent",loader:Y(async()=>await st(()=>import("./cose-bilkent-S5V4N54A-B7A448gM.js"),__vite__mapDeps([6,7]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");zOe();var I_t=Y(async(e,n)=>{if(!(e.layoutAlgorithm in lw))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=lw[e.layoutAlgorithm];return(await r.loader()).render(e,n,BOe,{algorithm:r.algorithm})},"render"),B_t=Y((e="",{fallback:n="dagre"}={})=>{if(e in lw)return e;if(n in lw)return Ot.warn(`Layout algorithm ${e} is not registered. Using ${n} as fallback.`),n;throw new Error(`Both layout algorithms ${e} and ${n} are not registered.`)},"getRegisteredLayoutAlgorithm"),cre="comm",ure="rule",dre="decl",FOe="@import",HOe="@namespace",WOe="@keyframes",UOe="@layer",hre=Math.abs,M9=String.fromCharCode;function fre(e){return e.trim()}function N3(e,n,r){return e.replace(n,r)}function VOe(e,n,r){return e.indexOf(n,r)}function Sx(e,n){return e.charCodeAt(n)|0}function Jx(e,n,r){return e.slice(n,r)}function bh(e){return e.length}function qOe(e){return e.length}function vC(e,n){return n.push(e),e}var H4=1,Zx=1,pre=0,ju=0,Js=0,k1="";function P9(e,n,r,i,s,a,o,l){return{value:e,root:n,parent:r,type:i,props:s,children:a,line:H4,column:Zx,length:o,return:"",siblings:l}}function GOe(){return Js}function KOe(){return Js=ju>0?Sx(k1,--ju):0,Zx--,Js===10&&(Zx=1,H4--),Js}function _d(){return Js=ju<pre?Sx(k1,ju++):0,Zx++,Js===10&&(Zx=1,H4++),Js}function _m(){return Sx(k1,ju)}function T3(){return ju}function W4(e,n){return Jx(k1,e,n)}function cw(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function YOe(e){return H4=Zx=1,pre=bh(k1=e),ju=0,[]}function XOe(e){return k1="",e}function kT(e){return fre(W4(ju-1,nO(e===91?e+2:e===40?e+1:e)))}function JOe(e){for(;(Js=_m())&&Js<33;)_d();return cw(e)>2||cw(Js)>3?"":" "}function ZOe(e,n){for(;--n&&_d()&&!(Js<48||Js>102||Js>57&&Js<65||Js>70&&Js<97););return W4(e,T3()+(n<6&&_m()==32&&_d()==32))}function nO(e){for(;_d();)switch(Js){case e:return ju;case 34:case 39:e!==34&&e!==39&&nO(Js);break;case 40:e===41&&nO(e);break;case 92:_d();break}return ju}function QOe(e,n){for(;_d()&&e+Js!==57;)if(e+Js===84&&_m()===47)break;return"/*"+W4(n,ju-1)+"*"+M9(e===47?e:_d())}function e7e(e){for(;!cw(_m());)_d();return W4(e,ju)}function t7e(e){return XOe(E3("",null,null,null,[""],e=YOe(e),0,[0],e))}function E3(e,n,r,i,s,a,o,l,u){for(var d=0,h=0,f=o,m=0,x=0,v=0,_=1,w=1,S=1,C=0,j="",T=s,E=a,N=i,R=j;w;)switch(v=C,C=_d()){case 40:if(v!=108&&Sx(R,f-1)==58){VOe(R+=N3(kT(C),"&","&\f"),"&\f",hre(d?l[d-1]:0))!=-1&&(S=-1);break}case 34:case 39:case 91:R+=kT(C);break;case 9:case 10:case 13:case 32:R+=JOe(v);break;case 92:R+=ZOe(T3()-1,7);continue;case 47:switch(_m()){case 42:case 47:vC(n7e(QOe(_d(),T3()),n,r,u),u),(cw(v||1)==5||cw(_m()||1)==5)&&bh(R)&&Jx(R,-1,void 0)!==" "&&(R+=" ");break;default:R+="/"}break;case 123*_:l[d++]=bh(R)*S;case 125*_:case 59:case 0:switch(C){case 0:case 125:w=0;case 59+h:S==-1&&(R=N3(R,/\f/g,"")),x>0&&(bh(R)-f||_===0&&v===47)&&vC(x>32?pz(R+";",i,r,f-1,u):pz(N3(R," ","")+";",i,r,f-2,u),u);break;case 59:R+=";";default:if(vC(N=fz(R,n,r,d,h,s,l,j,T=[],E=[],f,a),a),C===123)if(h===0)E3(R,n,N,N,T,a,f,l,E);else{switch(m){case 99:if(Sx(R,3)===110)break;case 108:if(Sx(R,2)===97)break;default:h=0;case 100:case 109:case 115:}h?E3(e,N,N,i&&vC(fz(e,N,N,0,0,s,l,j,s,T=[],f,E),E),s,E,f,l,i?T:E):E3(R,N,N,N,[""],E,0,l,E)}}d=h=x=0,_=S=1,j=R="",f=o;break;case 58:f=1+bh(R),x=v;default:if(_<1){if(C==123)--_;else if(C==125&&_++==0&&KOe()==125)continue}switch(R+=M9(C),C*_){case 38:S=h>0?1:(R+="\f",-1);break;case 44:l[d++]=(bh(R)-1)*S,S=1;break;case 64:_m()===45&&(R+=kT(_d())),m=_m(),h=f=bh(j=R+=e7e(T3())),C++;break;case 45:v===45&&bh(R)==2&&(_=0)}}return a}function fz(e,n,r,i,s,a,o,l,u,d,h,f){for(var m=s-1,x=s===0?a:[""],v=qOe(x),_=0,w=0,S=0;_<i;++_)for(var C=0,j=Jx(e,m+1,m=hre(w=o[_])),T=e;C<v;++C)(T=fre(w>0?x[C]+" "+j:N3(j,/&\f/g,x[C])))&&(u[S++]=T);return P9(e,n,r,s===0?ure:l,u,d,h,f)}function n7e(e,n,r,i){return P9(e,n,r,cre,M9(GOe()),Jx(e,2,-2),0,i)}function pz(e,n,r,i,s){return P9(e,n,r,dre,Jx(e,0,i),Jx(e,i+1,-1),i,s)}function rO(e,n){for(var r="",i=0;i<e.length;i++)r+=n(e[i],i,e,n)||"";return r}function r7e(e,n,r,i){switch(e.type){case UOe:if(e.children.length)break;case FOe:case HOe:case dre:return e.return=e.return||e.value;case cre:return"";case WOe:return e.return=e.value+"{"+rO(e.children,i)+"}";case ure:if(!bh(e.value=e.props.join(",")))return""}return bh(r=rO(e.children,i))?e.return=e.value+"{"+r+"}":""}var i7e=Iee(Object.keys,Object),s7e=Object.prototype,a7e=s7e.hasOwnProperty;function o7e(e){if(!M4(e))return i7e(e);var n=[];for(var r in Object(e))a7e.call(e,r)&&r!="constructor"&&n.push(r);return n}var iO=K0(Ld,"DataView"),sO=K0(Ld,"Promise"),aO=K0(Ld,"Set"),oO=K0(Ld,"WeakMap"),mz="[object Map]",l7e="[object Object]",gz="[object Promise]",yz="[object Set]",xz="[object WeakMap]",vz="[object DataView]",c7e=G0(iO),u7e=G0(aw),d7e=G0(sO),h7e=G0(aO),f7e=G0(oO),Ug=q0;(iO&&Ug(new iO(new ArrayBuffer(1)))!=vz||aw&&Ug(new aw)!=mz||sO&&Ug(sO.resolve())!=gz||aO&&Ug(new aO)!=yz||oO&&Ug(new oO)!=xz)&&(Ug=function(e){var n=q0(e),r=n==l7e?e.constructor:void 0,i=r?G0(r):"";if(i)switch(i){case c7e:return vz;case u7e:return mz;case d7e:return gz;case h7e:return yz;case f7e:return xz}return n});var p7e="[object Map]",m7e="[object Set]",g7e=Object.prototype,y7e=g7e.hasOwnProperty;function bz(e){if(e==null)return!0;if(P4(e)&&(I5(e)||typeof e=="string"||typeof e.splice=="function"||u9(e)||d9(e)||D5(e)))return!e.length;var n=Ug(e);if(n==p7e||n==m7e)return!e.size;if(M4(e))return!o7e(e).length;for(var r in e)if(y7e.call(e,r))return!1;return!0}var mre="c4",x7e=Y(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),v7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./c4Diagram-IC4MRINW-CI9T2EeW.js");return{diagram:n}},__vite__mapDeps([8,9]),import.meta.url);return{id:mre,diagram:e}},"loader"),b7e={id:mre,detector:x7e,loader:v7e},_7e=b7e,gre="flowchart",w7e=Y((e,n)=>{var r,i;return((r=n==null?void 0:n.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=n==null?void 0:n.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),S7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./flowDiagram-PKNHOUZH-DdQwNFMC.js");return{diagram:n}},__vite__mapDeps([10,11,9,12,13,14]),import.meta.url);return{id:gre,diagram:e}},"loader"),k7e={id:gre,detector:w7e,loader:S7e},C7e=k7e,yre="flowchart-v2",j7e=Y((e,n)=>{var r,i,s;return((r=n==null?void 0:n.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=n==null?void 0:n.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(n.layout="elk"),/^\s*graph/.test(e)&&((s=n==null?void 0:n.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),N7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./flowDiagram-PKNHOUZH-DdQwNFMC.js");return{diagram:n}},__vite__mapDeps([10,11,9,12,13,14]),import.meta.url);return{id:yre,diagram:e}},"loader"),T7e={id:yre,detector:j7e,loader:N7e},E7e=T7e,xre="er",A7e=Y(e=>/^\s*erDiagram/.test(e),"detector"),O7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./erDiagram-INFDFZHY-BBExxWyU.js");return{diagram:n}},__vite__mapDeps([15,12,13,14]),import.meta.url);return{id:xre,diagram:e}},"loader"),R7e={id:xre,detector:A7e,loader:O7e},M7e=R7e,vre="gitGraph",P7e=Y(e=>/^\s*gitGraph/.test(e),"detector"),L7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./gitGraphDiagram-K3NZZRJ6-DLeSQsQO.js");return{diagram:n}},__vite__mapDeps([16,17,18,19,2,4,5]),import.meta.url);return{id:vre,diagram:e}},"loader"),$7e={id:vre,detector:P7e,loader:L7e},D7e=$7e,bre="gantt",I7e=Y(e=>/^\s*gantt/.test(e),"detector"),B7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./ganttDiagram-A5KZAMGK-ClhLvrG_.js");return{diagram:n}},__vite__mapDeps([20,21,22]),import.meta.url);return{id:bre,diagram:e}},"loader"),z7e={id:bre,detector:I7e,loader:B7e},F7e=z7e,_re="info",H7e=Y(e=>/^\s*info/.test(e),"detector"),W7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./infoDiagram-LFFYTUFH-BxKwSt6Y.js");return{diagram:n}},__vite__mapDeps([23,19,2,4,5]),import.meta.url);return{id:_re,diagram:e}},"loader"),U7e={id:_re,detector:H7e,loader:W7e},wre="pie",V7e=Y(e=>/^\s*pie/.test(e),"detector"),q7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./pieDiagram-SKSYHLDU-f8Kl9KRZ.js");return{diagram:n}},__vite__mapDeps([24,17,19,2,4,5,25]),import.meta.url);return{id:wre,diagram:e}},"loader"),G7e={id:wre,detector:V7e,loader:q7e},Sre="quadrantChart",K7e=Y(e=>/^\s*quadrantChart/.test(e),"detector"),Y7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./quadrantDiagram-337W2JSQ-CwAWNw-G.js");return{diagram:n}},__vite__mapDeps([26,21,22]),import.meta.url);return{id:Sre,diagram:e}},"loader"),X7e={id:Sre,detector:K7e,loader:Y7e},J7e=X7e,kre="xychart",Z7e=Y(e=>/^\s*xychart(-beta)?/.test(e),"detector"),Q7e=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./xychartDiagram-JWTSCODW-CLf2Ayf0.js");return{diagram:n}},__vite__mapDeps([27,21,22]),import.meta.url);return{id:kre,diagram:e}},"loader"),eRe={id:kre,detector:Z7e,loader:Q7e},tRe=eRe,Cre="requirement",nRe=Y(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),rRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./requirementDiagram-Z7DCOOCP-Dq9avBBg.js");return{diagram:n}},__vite__mapDeps([28,12,13]),import.meta.url);return{id:Cre,diagram:e}},"loader"),iRe={id:Cre,detector:nRe,loader:rRe},sRe=iRe,jre="sequence",aRe=Y(e=>/^\s*sequenceDiagram/.test(e),"detector"),oRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./sequenceDiagram-2WXFIKYE-X9yDHxES.js");return{diagram:n}},__vite__mapDeps([29,9,18]),import.meta.url);return{id:jre,diagram:e}},"loader"),lRe={id:jre,detector:aRe,loader:oRe},cRe=lRe,Nre="class",uRe=Y((e,n)=>{var r;return((r=n==null?void 0:n.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),dRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./classDiagram-VBA2DB6C-B2XcOk5K.js");return{diagram:n}},__vite__mapDeps([30,31,11,9,12,13]),import.meta.url);return{id:Nre,diagram:e}},"loader"),hRe={id:Nre,detector:uRe,loader:dRe},fRe=hRe,Tre="classDiagram",pRe=Y((e,n)=>{var r;return/^\s*classDiagram/.test(e)&&((r=n==null?void 0:n.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),mRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./classDiagram-v2-RAHNMMFH-B2XcOk5K.js");return{diagram:n}},__vite__mapDeps([32,31,11,9,12,13]),import.meta.url);return{id:Tre,diagram:e}},"loader"),gRe={id:Tre,detector:pRe,loader:mRe},yRe=gRe,Ere="state",xRe=Y((e,n)=>{var r;return((r=n==null?void 0:n.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),vRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./stateDiagram-RAJIS63D-DoUaG8bp.js");return{diagram:n}},__vite__mapDeps([33,34,12,13,1,2,3,4]),import.meta.url);return{id:Ere,diagram:e}},"loader"),bRe={id:Ere,detector:xRe,loader:vRe},_Re=bRe,Are="stateDiagram",wRe=Y((e,n)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=n==null?void 0:n.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),SRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./stateDiagram-v2-FVOUBMTO-bfQPMNg7.js");return{diagram:n}},__vite__mapDeps([35,34,12,13]),import.meta.url);return{id:Are,diagram:e}},"loader"),kRe={id:Are,detector:wRe,loader:SRe},CRe=kRe,Ore="journey",jRe=Y(e=>/^\s*journey/.test(e),"detector"),NRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./journeyDiagram-4ABVD52K-DYx9UBcq.js");return{diagram:n}},__vite__mapDeps([36,11,9,25]),import.meta.url);return{id:Ore,diagram:e}},"loader"),TRe={id:Ore,detector:jRe,loader:NRe},ERe=TRe,ARe=Y((e,n,r)=>{Ot.debug(`rendering svg for syntax error
|
|
1116
|
+
`);const i=lNe(n),s=i.append("g");i.attr("viewBox","0 0 2412 512"),eZ(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Rre={draw:ARe},ORe=Rre,RRe={db:{},renderer:Rre,parser:{parse:Y(()=>{},"parse")}},MRe=RRe,Mre="flowchart-elk",PRe=Y((e,n={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=n==null?void 0:n.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(n.layout="elk",!0):!1},"detector"),LRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./flowDiagram-PKNHOUZH-DdQwNFMC.js");return{diagram:n}},__vite__mapDeps([10,11,9,12,13,14]),import.meta.url);return{id:Mre,diagram:e}},"loader"),$Re={id:Mre,detector:PRe,loader:LRe},DRe=$Re,Pre="timeline",IRe=Y(e=>/^\s*timeline/.test(e),"detector"),BRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./timeline-definition-YZTLITO2-CE1XVV9S.js");return{diagram:n}},__vite__mapDeps([37,25]),import.meta.url);return{id:Pre,diagram:e}},"loader"),zRe={id:Pre,detector:IRe,loader:BRe},FRe=zRe,Lre="mindmap",HRe=Y(e=>/^\s*mindmap/.test(e),"detector"),WRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./mindmap-definition-YRQLILUH-CT90jJmn.js");return{diagram:n}},__vite__mapDeps([38,12,13]),import.meta.url);return{id:Lre,diagram:e}},"loader"),URe={id:Lre,detector:HRe,loader:WRe},VRe=URe,$re="kanban",qRe=Y(e=>/^\s*kanban/.test(e),"detector"),GRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./kanban-definition-K7BYSVSG-C12HKqkT.js");return{diagram:n}},__vite__mapDeps([39,11]),import.meta.url);return{id:$re,diagram:e}},"loader"),KRe={id:$re,detector:qRe,loader:GRe},YRe=KRe,Dre="sankey",XRe=Y(e=>/^\s*sankey(-beta)?/.test(e),"detector"),JRe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./sankeyDiagram-WA2Y5GQK-CZC4QgzZ.js");return{diagram:n}},[],import.meta.url);return{id:Dre,diagram:e}},"loader"),ZRe={id:Dre,detector:XRe,loader:JRe},QRe=ZRe,Ire="packet",eMe=Y(e=>/^\s*packet(-beta)?/.test(e),"detector"),tMe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./diagram-P4PSJMXO-CXDcHg8U.js");return{diagram:n}},__vite__mapDeps([40,17,19,2,4,5]),import.meta.url);return{id:Ire,diagram:e}},"loader"),nMe={id:Ire,detector:eMe,loader:tMe},Bre="radar",rMe=Y(e=>/^\s*radar-beta/.test(e),"detector"),iMe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./diagram-IFDJBPK2-BxjoOI5W.js");return{diagram:n}},__vite__mapDeps([41,17,19,2,4,5]),import.meta.url);return{id:Bre,diagram:e}},"loader"),sMe={id:Bre,detector:rMe,loader:iMe},zre="block",aMe=Y(e=>/^\s*block(-beta)?/.test(e),"detector"),oMe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./blockDiagram-WCTKOSBZ-D1nwTSpK.js");return{diagram:n}},__vite__mapDeps([42,11,5,2,1,14]),import.meta.url);return{id:zre,diagram:e}},"loader"),lMe={id:zre,detector:aMe,loader:oMe},cMe=lMe,Fre="architecture",uMe=Y(e=>/^\s*architecture/.test(e),"detector"),dMe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./architectureDiagram-2XIMDMQ5-BAw4-GwQ.js");return{diagram:n}},__vite__mapDeps([43,17,19,2,4,5,7]),import.meta.url);return{id:Fre,diagram:e}},"loader"),hMe={id:Fre,detector:uMe,loader:dMe},fMe=hMe,Hre="ishikawa",pMe=Y(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),mMe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./ishikawaDiagram-PHBUUO56-Cl45ax04.js");return{diagram:n}},[],import.meta.url);return{id:Hre,diagram:e}},"loader"),gMe={id:Hre,detector:pMe,loader:mMe},Wre="venn",yMe=Y(e=>/^\s*venn-beta/.test(e),"detector"),xMe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./vennDiagram-LZ73GAT5-C6jQs3g-.js");return{diagram:n}},[],import.meta.url);return{id:Wre,diagram:e}},"loader"),vMe={id:Wre,detector:yMe,loader:xMe},bMe=vMe,Ure="treemap",_Me=Y(e=>/^\s*treemap/.test(e),"detector"),wMe=Y(async()=>{const{diagram:e}=await st(async()=>{const{diagram:n}=await import("./diagram-E7M64L7V-DEi2HRqP.js");return{diagram:n}},__vite__mapDeps([44,13,17,19,2,4,5,22]),import.meta.url);return{id:Ure,diagram:e}},"loader"),SMe={id:Ure,detector:_Me,loader:wMe},_z=!1,U4=Y(()=>{_z||(_z=!0,v5("error",MRe,e=>e.toLowerCase().trim()==="error"),v5("---",{db:{clear:Y(()=>{},"clear")},styles:{},renderer:{draw:Y(()=>{},"draw")},parser:{parse:Y(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:Y(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),hA(DRe,VRe,fMe),hA(_7e,YRe,yRe,fRe,M7e,F7e,U7e,G7e,sRe,cRe,E7e,C7e,FRe,D7e,CRe,_Re,ERe,J7e,QRe,nMe,tRe,cMe,sMe,gMe,SMe,bMe))},"addDiagrams"),kMe=Y(async()=>{Ot.debug("Loading registered diagrams");const n=(await Promise.allSettled(Object.entries(v0).map(async([r,{detector:i,loader:s}])=>{if(s)try{gA(r)}catch{try{const{diagram:a,id:o}=await s();v5(o,a,i)}catch(a){throw Ot.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete v0[r],a}}}))).filter(r=>r.status==="rejected");if(n.length>0){Ot.error(`Failed to load ${n.length} external diagrams`);for(const r of n)Ot.error(r);throw new Error(`Failed to load ${n.length} external diagrams`)}},"loadRegisteredDiagrams"),CMe="graphics-document document";function Vre(e,n){e.attr("role",CMe),n!==""&&e.attr("aria-roledescription",n)}Y(Vre,"setA11yDiagramInfo");function qre(e,n,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(n){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(n)}}}Y(qre,"addSVGa11yTitleDescription");var p0,lO=(p0=class{constructor(n,r,i,s,a){this.type=n,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(n,r={}){var d,h;const i=Lo(),s=MM(n,i);n=d8e(n)+`
|
|
1117
1117
|
`;try{gA(s)}catch{const f=Qke(s);if(!f)throw new zJ(`Diagram ${s} not found.`);const{id:m,diagram:x}=await f();v5(m,x)}const{db:a,parser:o,renderer:l,init:u}=gA(s);return o.parser&&(o.parser.yy=a),(d=a.clear)==null||d.call(a),u==null||u(i),r.title&&((h=a.setDiagramTitle)==null||h.call(a,r.title)),await o.parse(n),new p0(s,n,a,o,l)}async render(n,r){await this.renderer.draw(this.text,n,r,this)}getParser(){return this.parser}getType(){return this.type}},Y(p0,"Diagram"),p0),wz=[],jMe=Y(()=>{wz.forEach(e=>{e()}),wz=[]},"attachFunctions"),NMe=Y(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Gre(e){const n=e.match(BJ);if(!n)return{text:e,metadata:{}};let r=m6e(n[1],{schema:p6e})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(n[0].length),metadata:i}}Y(Gre,"extractFrontMatter");var TMe=Y(e=>e.replace(/\r\n?/g,`
|
|
1118
1118
|
`).replace(/<(\w+)([^>]*)>/g,(n,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),EMe=Y(e=>{const{text:n,metadata:r}=Gre(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:n}},"processFrontmatter"),AMe=Y(e=>{const n=dd.detectInit(e)??{},r=dd.detectDirective(e,"wrap");return Array.isArray(r)?n.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(n.wrap=!0),{text:ZEe(e),directive:n}},"processDirectives");function L9(e){const n=TMe(e),r=EMe(n),i=AMe(r.text),s=y9(r.config,i.directive);return e=NMe(i.text),{code:e,title:r.title,config:s}}Y(L9,"preprocessDiagram");function Kre(e){const n=new TextEncoder().encode(e),r=Array.from(n,i=>String.fromCodePoint(i)).join("");return btoa(r)}Y(Kre,"toBase64");var OMe=5e4,RMe="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",MMe="sandbox",PMe="loose",LMe="http://www.w3.org/2000/svg",$Me="http://www.w3.org/1999/xlink",DMe="http://www.w3.org/1999/xhtml",IMe="100%",BMe="100%",zMe="border:0;margin:0;",FMe="margin:0",HMe="allow-top-navigation-by-user-activation allow-popups",WMe='The "iframe" tag is not supported by your browser.',UMe=["foreignobject"],VMe=["dominant-baseline"];function $9(e){const n=L9(e);return y5(),mCe(n.config??{}),n}Y($9,"processAndSetConfigs");async function Yre(e,n){U4();try{const{code:r,config:i}=$9(e);return{diagramType:(await Jre(r)).type,config:i}}catch(r){if(n!=null&&n.suppressErrors)return!1;throw r}}Y(Yre,"parse");var Sz=Y((e,n,r=[])=>`
|
|
1119
1119
|
.${e} ${n} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),qMe=Y((e,n=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
|
|
@@ -1123,7 +1123,7 @@ ${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
|
|
|
1123
1123
|
${WMe}
|
|
1124
1124
|
</iframe>`},"putIntoIFrame"),kz=Y((e,n,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",n).attr("width","100%").attr("xmlns",LMe);return s&&o.attr("xmlns:xlink",s),o.append("g"),e},"appendDivSvgG");function cO(e,n){return e.append("iframe").attr("id",n).attr("style","width: 100%; height: 100%;").attr("sandbox","")}Y(cO,"sandboxedIframe");var XMe=Y((e,n,r,i)=>{var s,a,o;(s=e.getElementById(n))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),JMe=Y(async function(e,n,r){var W,$,O,B,M,L;U4();const i=$9(n);n=i.code;const s=Lo();Ot.debug(s),n.length>((s==null?void 0:s.maxTextSize)??OMe)&&(n=RMe);const a="#"+e,o="i"+e,l="#"+o,u="d"+e,d="#"+u,h=Y(()=>{const G=er(m?l:d).node();G&&"remove"in G&&G.remove()},"removeTempElements");let f=er("body");const m=s.securityLevel===MMe,x=s.securityLevel===PMe,v=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),m){const z=cO(er(r),o);f=er(z.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=er(r);kz(f,e,u,`font-family: ${v}`,$Me)}else{if(XMe(document,e,u,o),m){const z=cO(er("body"),o);f=er(z.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=er("body");kz(f,e,u)}let _,w;try{_=await lO.fromText(n,{title:i.title})}catch(z){if(s.suppressErrorRendering)throw h(),z;_=await lO.fromText("error"),w=z}const S=f.select(d).node(),C=_.type,j=S.firstChild,T=j.firstChild,E=($=(W=_.renderer).getClasses)==null?void 0:$.call(W,n,_),N=GMe(s,C,E,a),R=document.createElement("style");R.innerHTML=N,j.insertBefore(R,T);try{await _.renderer.draw(n,e,"11.13.0",_)}catch(z){throw s.suppressErrorRendering?h():ORe.draw(n,e,"11.13.0"),z}const D=f.select(`${d} svg`),U=(B=(O=_.db).getAccTitle)==null?void 0:B.call(O),H=(L=(M=_.db).getAccDescription)==null?void 0:L.call(M);Zre(C,D,U,H),f.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",DMe);let I=f.select(d).node().innerHTML;if(Ot.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),I=KMe(I,m,Ym(s.arrowMarkerAbsolute)),m){const z=f.select(d+" svg").node();I=YMe(I,z)}else x||(I=Vx.sanitize(I,{ADD_TAGS:UMe,ADD_ATTR:VMe,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(jMe(),w)throw w;return h(),{diagramType:C,svg:I,bindFunctions:_.db.bindFunctions}},"render");function Xre(e={}){var i;const n=ya({},e);n!=null&&n.fontFamily&&!((i=n.themeVariables)!=null&&i.fontFamily)&&(n.themeVariables||(n.themeVariables={}),n.themeVariables.fontFamily=n.fontFamily),fCe(n),n!=null&&n.theme&&n.theme in Hf?n.themeVariables=Hf[n.theme].getThemeVariables(n.themeVariables):n&&(n.themeVariables=Hf.default.getThemeVariables(n.themeVariables));const r=typeof n=="object"?hCe(n):VJ();RM(r.logLevel),U4()}Y(Xre,"initialize");var Jre=Y((e,n={})=>{const{code:r}=L9(e);return lO.fromText(r,n)},"getDiagramFromText");function Zre(e,n,r,i){Vre(n,e),qre(n,r,i,n.attr("id"))}Y(Zre,"addA11yInfo");var C0=Object.freeze({render:JMe,parse:Yre,getDiagramFromText:Jre,initialize:Xre,getConfig:Lo,setConfig:qJ,getSiteConfig:VJ,updateSiteConfig:pCe,reset:Y(()=>{y5()},"reset"),globalReset:Y(()=>{y5(qx)},"globalReset"),defaultConfig:qx});RM(Lo().logLevel);y5(Lo());var ZMe=Y((e,n,r)=>{Ot.warn(e),g9(e)?(r&&r(e.str,e.hash),n.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&n.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Qre=Y(async function(e={querySelector:".mermaid"}){try{await QMe(e)}catch(n){if(g9(n)&&Ot.error(n.str),Mc.parseError&&Mc.parseError(n),!e.suppressErrors)throw Ot.error("Use the suppressErrors option to suppress these errors"),n}},"run"),QMe=Y(async function({postRenderCallback:e,querySelector:n,nodes:r}={querySelector:".mermaid"}){const i=C0.getConfig();Ot.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(n)s=document.querySelectorAll(n);else throw new Error("Nodes and querySelector are both undefined");Ot.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(Ot.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),C0.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new dd.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const l=[];for(const u of Array.from(s)){if(Ot.info("Rendering diagram: "+u.id),u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");const d=`mermaid-${a.next()}`;o=u.innerHTML,o=xte(dd.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=dd.detectInit(o);h&&Ot.debug("Detected early reinit: ",h);try{const{svg:f,bindFunctions:m}=await rie(d,o,u);u.innerHTML=f,e&&await e(d),m&&m(u)}catch(f){ZMe(f,l,Mc.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),eie=Y(function(e){C0.initialize(e)},"initialize"),e9e=Y(async function(e,n,r){Ot.warn("mermaid.init is deprecated. Please use run instead."),e&&eie(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof n=="string"?i.querySelector=n:n&&(n instanceof HTMLElement?i.nodes=[n]:i.nodes=n),await Qre(i)},"init"),t9e=Y(async(e,{lazyLoad:n=!0}={})=>{U4(),hA(...e),n===!1&&await kMe()},"registerExternalDiagrams"),tie=Y(function(){if(Mc.startOnLoad){const{startOnLoad:e}=C0.getConfig();e&&Mc.run().catch(n=>Ot.error("Mermaid failed to initialize",n))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",tie,!1);var n9e=Y(function(e){Mc.parseError=e},"setParseErrorHandler"),Y5=[],CT=!1,nie=Y(async()=>{if(!CT){for(CT=!0;Y5.length>0;){const e=Y5.shift();if(e)try{await e()}catch(n){Ot.error("Error executing queue",n)}}CT=!1}},"executeQueue"),r9e=Y(async(e,n)=>new Promise((r,i)=>{const s=Y(()=>new Promise((a,o)=>{C0.parse(e,n).then(l=>{a(l),r(l)},l=>{var u;Ot.error("Error parsing",l),(u=Mc.parseError)==null||u.call(Mc,l),o(l),i(l)})}),"performCall");Y5.push(s),nie().catch(i)}),"parse"),rie=Y((e,n,r)=>new Promise((i,s)=>{const a=Y(()=>new Promise((o,l)=>{C0.render(e,n,r).then(u=>{o(u),i(u)},u=>{var d;Ot.error("Error parsing",u),(d=Mc.parseError)==null||d.call(Mc,u),l(u),s(u)})}),"performCall");Y5.push(a),nie().catch(s)}),"render"),i9e=Y(()=>Object.keys(v0).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Mc={startOnLoad:!0,mermaidAPI:C0,parse:r9e,render:rie,init:e9e,run:Qre,registerExternalDiagrams:t9e,registerLayoutLoaders:lre,initialize:eie,parseError:void 0,contentLoaded:tie,setParseErrorHandler:n9e,detectType:MM,registerIconPacks:xAe,getRegisteredDiagramsMetadata:i9e},uO=Mc;/*! Check if previously processed *//*!
|
|
1125
1125
|
* Wait for document loaded before starting the execution
|
|
1126
|
-
*/let dO=!1;const s9e=.1,a9e=20;function jT(e){return Math.min(a9e,Math.max(s9e,e))}function Cz(e,n,r,i){if(e===n)return r;const s=n/e;return{x:i.x-(i.x-r.x)*s,y:i.y-(i.y-r.y)*s}}function jz(e){uO.initialize({startOnLoad:!1,theme:e==="dark"?"dark":"default",securityLevel:"strict",fontFamily:"ui-sans-serif, system-ui, -apple-system, sans-serif",flowchart:{htmlLabels:!0,curve:"basis"},themeVariables:e==="dark"?{primaryColor:"#1e293b",primaryTextColor:"#e2e8f0",primaryBorderColor:"#475569",lineColor:"#64748b",secondaryColor:"#334155",tertiaryColor:"#1e293b",background:"#0f172a",mainBkg:"#1e293b",nodeBorder:"#475569",clusterBkg:"#1e293b",clusterBorder:"#334155",titleColor:"#e2e8f0",edgeLabelBackground:"#1e293b"}:{}}),dO=!0}function hO({diagram:e,isGenerating:n,onRegenerate:r,onGenerate:i,theme:s="dark",onRenderResult:a}){const o=y.useRef(null),l=y.useRef(null),[u,d]=y.useState(null),[h,f]=y.useState(!1),[m,x]=y.useState(1),[v,_]=y.useState({x:0,y:0}),w=y.useRef(0),S=y.useRef(new Map),C=y.useRef(null),j=y.useRef(null),T=y.useCallback(async $=>{if(!o.current)return;const O=++w.current;try{if(dO||jz(s),!await uO.parse($)||O!==w.current)return;const{svg:M}=await uO.render(`arch-${O}`,$);if(O!==w.current)return;o.current.innerHTML=M;const L=o.current.querySelector("svg"),z=l.current;if(L&&z){const G=z.clientWidth,V=z.clientHeight,F=L.width.baseVal.value||L.getBoundingClientRect().width,X=L.height.baseVal.value||L.getBoundingClientRect().height;if(F>0&&X>0&&G>0&&V>0){const ee=Math.min((G-32)/F,(V-32)/X);x(jT(ee))}else x(1)}else x(1);_({x:0,y:0}),d(null),a==null||a({ok:!0})}catch(B){if(O!==w.current)return;const M=B instanceof Error?B.message:"Failed to render diagram";d(M),a==null||a({ok:!1,error:M})}},[a,s]);y.useEffect(()=>{jz(s),dO=!0,e&&T(e)},[s,e,T]),y.useEffect(()=>{e&&T(e)},[e,T]);const E=y.useCallback(()=>{e&&navigator.clipboard.writeText(e).then(()=>{f(!0),setTimeout(()=>f(!1),2e3)})},[e]),N=y.useCallback(()=>{if(!o.current)return;const $=o.current.querySelector("svg");if(!$)return;const O=new XMLSerializer().serializeToString($),B=new Blob([O],{type:"image/svg+xml"}),M=URL.createObjectURL(B),L=document.createElement("a");L.href=M,L.download="architecture.svg",L.click(),URL.revokeObjectURL(M)},[]),R=y.useCallback(($,O)=>{var M;const B=(M=l.current)==null?void 0:M.getBoundingClientRect();return B?{x:$-B.left-B.width/2,y:O-B.top-B.height/2}:null},[]),D=y.useCallback(($,O)=>{x(B=>{const M=jT($);return M===B?B:(_(L=>O?Cz(B,M,L,O):L),M)})},[]),U=y.useCallback($=>{const O=R($.clientX,$.clientY);if(!O)return;$.preventDefault();const B=$.deltaY<0?1.1:.9;D(m*B,O)},[R,D,m]),H=y.useCallback($=>{const O={x:$.clientX,y:$.clientY};if(S.current.set($.pointerId,O),$.currentTarget.setPointerCapture($.pointerId),S.current.size===1){C.current={pointerId:$.pointerId,x:$.clientX,y:$.clientY},j.current=null;return}if(S.current.size===2){const[B,M]=[...S.current.values()],L=Math.hypot(M.x-B.x,M.y-B.y);j.current={distance:L,scale:m,pan:v},C.current=null}},[v,m]),I=y.useCallback($=>{var B;if(!S.current.has($.pointerId))return;const O=S.current.get($.pointerId);if(S.current.set($.pointerId,{x:$.clientX,y:$.clientY}),S.current.size===1&&((B=C.current)==null?void 0:B.pointerId)===$.pointerId){const M=$.clientX-O.x,L=$.clientY-O.y;_(z=>({x:z.x+M,y:z.y+L})),C.current={pointerId:$.pointerId,x:$.clientX,y:$.clientY};return}if(S.current.size===2&&j.current){const[M,L]=[...S.current.values()],z={x:(M.x+L.x)/2,y:(M.y+L.y)/2},G=R(z.x,z.y),V=Math.hypot(L.x-M.x,L.y-M.y);if(!G||j.current.distance<=0)return;const F=jT(j.current.scale*(V/j.current.distance)),X=Cz(j.current.scale,F,j.current.pan,G);x(F),_(X)}},[R]),W=y.useCallback($=>{var O;if(S.current.delete($.pointerId),((O=C.current)==null?void 0:O.pointerId)===$.pointerId&&(C.current=null),S.current.size<2&&(j.current=null),S.current.size===1){const[B,M]=[...S.current.entries()][0]??[];typeof B=="number"&&M&&(C.current={pointerId:B,x:M.x,y:M.y})}},[]);return!e&&!n?c.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-muted-foreground gap-4 px-8",children:[c.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[c.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Software Architecture"}),c.jsx("p",{className:"text-xs max-w-sm",children:"Generate a visual architecture diagram of your project. The AI will analyze your project structure, dependencies, and code organization to create a Mermaid diagram."})]}),i&&c.jsxs("button",{onClick:i,className:"flex items-center gap-2 px-4 py-2 text-sm rounded-lg border bg-background hover:bg-accent hover:text-accent-foreground transition-colors",children:[c.jsx(U_,{className:"h-3.5 w-3.5"}),"Generate Architecture Diagram"]})]}):c.jsxs("div",{className:"h-full flex flex-col",children:[c.jsxs("div",{className:"flex items-center gap-1 px-2 h-8 border-b bg-muted/20 shrink-0",children:[c.jsx("span",{className:"text-xs font-medium text-muted-foreground mr-auto",children:"Architecture"}),c.jsx("button",{onClick:()=>D(m-.25),className:"p-1 rounded hover:bg-muted transition-colors",title:"Zoom out",children:c.jsx(Cve,{className:"h-3 w-3"})}),c.jsxs("span",{className:"text-2xs text-muted-foreground min-w-[3ch] text-center",children:[Math.round(m*100),"%"]}),c.jsx("button",{onClick:()=>D(m+.25),className:"p-1 rounded hover:bg-muted transition-colors",title:"Zoom in",children:c.jsx(Sve,{className:"h-3 w-3"})}),c.jsx("button",{onClick:()=>{x(1),_({x:0,y:0})},className:"p-1 rounded hover:bg-muted transition-colors",title:"Reset zoom",children:c.jsx(iM,{className:"h-3 w-3"})}),c.jsx("div",{className:"w-px h-4 bg-border mx-1"}),e&&c.jsxs(c.Fragment,{children:[c.jsx("button",{onClick:E,className:"p-1 rounded hover:bg-muted transition-colors",title:"Copy Mermaid source",children:h?c.jsx(Li,{className:"h-3 w-3 text-green-500"}):c.jsx(tl,{className:"h-3 w-3"})}),c.jsx("button",{onClick:N,className:"p-1 rounded hover:bg-muted transition-colors",title:"Download SVG",children:c.jsx(Bf,{className:"h-3 w-3"})})]}),r&&c.jsx("button",{onClick:r,className:"p-1 rounded hover:bg-muted transition-colors",title:"Regenerate diagram",disabled:n,children:c.jsx(ks,{className:`h-3 w-3 ${n?"animate-spin":""}`})})]}),c.jsxs("div",{ref:l,className:"flex-1 overflow-hidden relative touch-none",onWheel:U,onPointerDown:H,onPointerMove:I,onPointerUp:W,onPointerCancel:W,onPointerLeave:W,style:{cursor:S.current.size>0?"grabbing":"grab"},children:[n&&!e&&c.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-muted-foreground gap-3",children:[c.jsx(Lt,{className:"h-6 w-6 animate-spin"}),c.jsx("span",{className:"text-xs",children:"Analyzing project architecture…"})]}),n&&e&&c.jsxs("div",{className:"absolute top-2 right-2 z-10 flex items-center gap-1.5 px-2 py-1 rounded bg-background/80 border text-xs text-muted-foreground",children:[c.jsx(Lt,{className:"h-3 w-3 animate-spin"}),"Regenerating…"]}),u&&c.jsxs("div",{className:"p-4 text-xs text-destructive bg-destructive/10 rounded m-2",children:[c.jsx("p",{className:"font-medium mb-1",children:"Render error"}),c.jsx("pre",{className:"whitespace-pre-wrap",children:u}),e&&c.jsxs("details",{className:"mt-2",children:[c.jsx("summary",{className:"cursor-pointer text-muted-foreground hover:text-foreground",children:"View source"}),c.jsx("pre",{className:"mt-1 p-2 bg-muted rounded text-2xs whitespace-pre-wrap",children:e})]})]}),c.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-4",style:{transform:`translate(${v.x}px, ${v.y}px) scale(${m})`,transformOrigin:"center center"},children:c.jsx("div",{ref:o,className:"flex items-center justify-center"})})]})]})}const Cc=y.forwardRef(({className:e,children:n,...r},i)=>c.jsx("div",{ref:i,className:ke("relative overflow-auto",e),...r,children:n}));Cc.displayName="ScrollArea";const o9e=y.forwardRef(({className:e,orientation:n="vertical",...r},i)=>c.jsx("div",{ref:i,"data-orientation":n,className:ke("hidden",e),...r}));o9e.displayName="ScrollBar";const Ph=y.forwardRef(({className:e,...n},r)=>c.jsx("textarea",{className:ke("flex min-h-[72px] w-full rounded-lg border border-input bg-background/90 px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));Ph.displayName="Textarea";var NT={},Qv={},Nz;function l9e(){return Nz||(Nz=1,Object.defineProperty(Qv,"__esModule",{value:!0}),Qv.FileExtensions1ToIcon=void 0,Qv.FileExtensions1ToIcon={accdb:"file_type_access.svg",accdt:"file_type_access.svg",mdb:"file_type_access.svg",accda:"file_type_access.svg",accdc:"file_type_access.svg",accde:"file_type_access.svg",accdp:"file_type_access.svg",accdr:"file_type_access.svg",accdu:"file_type_access.svg",ade:"file_type_access.svg",adp:"file_type_access.svg",laccdb:"file_type_access.svg",ldb:"file_type_access.svg",mam:"file_type_access.svg",maq:"file_type_access.svg",mdw:"file_type_access.svg",afdesign:"file_type_affinitydesigner.svg",affinitydesigner:"file_type_affinitydesigner.svg",afphoto:"file_type_affinityphoto.svg",affinityphoto:"file_type_affinityphoto.svg",afpub:"file_type_affinitypublisher.svg",affinitypublisher:"file_type_affinitypublisher.svg",ai:"file_type_ai.svg",ino:"file_type_arduino.svg",pde:"file_type_arduino.svg",aspx:"file_type_aspx.svg",ascx:"file_type_aspx.svg",astro:"file_type_astro.svg",aac:"file_type_audio.svg",act:"file_type_audio.svg",aiff:"file_type_audio.svg",amr:"file_type_audio.svg",ape:"file_type_audio.svg",au:"file_type_audio.svg",dct:"file_type_audio.svg",dss:"file_type_audio.svg",dvf:"file_type_audio.svg",flac:"file_type_audio.svg",gsm:"file_type_audio.svg",iklax:"file_type_audio.svg",ivs:"file_type_audio.svg",m4a:"file_type_audio.svg",m4b:"file_type_audio.svg",m4p:"file_type_audio.svg",mmf:"file_type_audio.svg",mogg:"file_type_audio.svg",mp3:"file_type_audio.svg",mpc:"file_type_audio.svg",msv:"file_type_audio.svg",oga:"file_type_audio.svg",ogg:"file_type_audio.svg",opus:"file_type_audio.svg",ra:"file_type_audio.svg",raw:"file_type_audio.svg",tta:"file_type_audio.svg",vox:"file_type_audio.svg",wav:"file_type_audio.svg",wma:"file_type_audio.svg",avif:"file_type_avif.svg",awk:"file_type_awk.svg",a:"file_type_binary.svg",app:"file_type_binary.svg",bin:"file_type_binary.svg",cmo:"file_type_binary.svg",cmx:"file_type_binary.svg",cma:"file_type_binary.svg",cmxa:"file_type_binary.svg",cmi:"file_type_binary.svg",dll:"file_type_binary.svg",exe:"file_type_binary.svg",hl:"file_type_binary.svg",ilk:"file_type_binary.svg",lib:"file_type_binary.svg",n:"file_type_binary.svg",ndll:"file_type_binary.svg",o:"file_type_binary.svg",obj:"file_type_binary.svg",pyc:"file_type_binary.svg",pyd:"file_type_binary.svg",pyo:"file_type_binary.svg",pdb:"file_type_binary.svg",scpt:"file_type_binary.svg",scptd:"file_type_binary.svg",so:"file_type_binary.svg",bb:"file_type_blitzbasic.svg",gemfile:"file_type_bundler.svg",cake:"file_type_cake.svg",csr:"file_type_cert.svg",crt:"file_type_cert.svg",cer:"file_type_cert.svg",der:"file_type_cert.svg",pfx:"file_type_cert.svg",p12:"file_type_cert.svg",p7b:"file_type_cert.svg",p7r:"file_type_cert.svg",src:"file_type_cert.svg",crl:"file_type_cert.svg",sst:"file_type_cert.svg",stl:"file_type_cert.svg",lucee:"file_type_cf.svg",h:"file_type_cheader.svg",class:"file_type_class.svg",cjm:"file_type_clojure.svg",cljc:"file_type_clojure.svg",cljs:"file_type_clojurescript.svg",kit:"file_type_codekit.svg",plist:"file_type_light_config.svg",hpp:"file_type_cppheader.svg",hh:"file_type_cppheader.svg",hxx:"file_type_cppheader.svg","h++":"file_type_cppheader.svg",csx:"file_type_csharp.svg",csproj:"file_type_csproj.svg",db:"file_type_light_db.svg",djt:"file_type_django.svg",eco:"file_type_light_docpad.svg",drawio:"file_type_drawio.svg",dio:"file_type_drawio.svg",ejs:"file_type_ejs.svg",el:"file_type_emacs.svg",elc:"file_type_emacs.svg",ensime:"file_type_ensime.svg",eps:"file_type_eps.svg",xls:"file_type_excel.svg",xlsx:"file_type_excel.svg",xlsm:"file_type_excel.svg",ods:"file_type_excel.svg",fods:"file_type_excel.svg",xlsb:"file_type_excel.svg",fbx:"file_type_fbx.svg",fla:"file_type_light_fla.svg",swf:"file_type_flash.svg",swc:"file_type_flash.svg",woff:"file_type_light_font.svg",woff2:"file_type_light_font.svg",ttf:"file_type_light_font.svg",otf:"file_type_light_font.svg",eot:"file_type_light_font.svg",pfa:"file_type_light_font.svg",pfb:"file_type_light_font.svg",sfd:"file_type_light_font.svg",fsproj:"file_type_fsproj.svg",gmx:"file_type_gamemaker.svg",yy:"file_type_light_gamemaker2.svg",yyp:"file_type_light_gamemaker2.svg",gradle:"file_type_light_gradle.svg",hxproj:"file_type_haxedevelop.svg",idr:"file_type_idris.svg",lidr:"file_type_idris.svg",ibc:"file_type_idrisbin.svg",ipkg:"file_type_idrispkg.svg",jpeg:"file_type_image.svg",jpg:"file_type_image.svg",gif:"file_type_image.svg",png:"file_type_image.svg",bmp:"file_type_image.svg",tiff:"file_type_image.svg",ico:"file_type_image.svg",imba:"file_type_imba.svg",imba2:"file_type_imba.svg",inc:"file_type_inc.svg",include:"file_type_inc.svg",infopathxml:"file_type_infopath.svg",xsn:"file_type_infopath.svg",xsf:"file_type_infopath.svg",xtp2:"file_type_infopath.svg",jar:"file_type_jar.svg",jbuilder:"file_type_jbuilder.svg",json5:"file_type_light_json5.svg",jsonld:"file_type_light_jsonld.svg","json-ld":"file_type_light_jsonld.svg",jsp:"file_type_jsp.svg",jss:"file_type_jss.svg",ipynb:"file_type_jupyter.svg",key:"file_type_key.svg",pem:"file_type_key.svg",master:"file_type_layout.svg",enc:"file_type_license.svg",hxp:"file_type_lime.svg",liquid:"file_type_liquid.svg",ls:"file_type_livescript.svg",lnk:"file_type_lnk.svg",log:"file_type_log.svg",tlg:"file_type_log.svg",crec:"file_type_lync.svg",ocrec:"file_type_lync.svg",makefile:"file_type_makefile.svg",map:"file_type_map.svg",mdown:"file_type_markdown.svg",markdown:"file_type_markdown.svg",fig:"file_type_matlab.svg",mex:"file_type_matlab.svg",mexn:"file_type_matlab.svg",mexrs6:"file_type_matlab.svg",mn:"file_type_matlab.svg",mum:"file_type_matlab.svg",mx:"file_type_matlab.svg",mx3:"file_type_matlab.svg",rwd:"file_type_matlab.svg",slx:"file_type_matlab.svg",slddc:"file_type_matlab.svg",smv:"file_type_matlab.svg",xvc:"file_type_matlab.svg",mustache:"file_type_light_mustache.svg",mst:"file_type_light_mustache.svg",njsproj:"file_type_njsproj.svg",nupkg:"file_type_nuget.svg",snupkg:"file_type_nuget.svg",nuspec:"file_type_nuget.svg",psmdcp:"file_type_nuget.svg",npy:"file_type_numpy.svg",npz:"file_type_numpy.svg",nunj:"file_type_nunjucks.svg",njs:"file_type_nunjucks.svg",one:"file_type_onenote.svg",onepkg:"file_type_onenote.svg",onetoc:"file_type_onenote.svg",onetoc2:"file_type_onenote.svg",sig:"file_type_onenote.svg",cl:"file_type_opencl.svg",opencl:"file_type_opencl.svg",org:"file_type_org.svg",pst:"file_type_outlook.svg",bcmx:"file_type_outlook.svg",otm:"file_type_outlook.svg",msg:"file_type_outlook.svg",oft:"file_type_outlook.svg",ovpn:"file_type_ovpn.svg",pkg:"file_type_package.svg",patch:"file_type_patch.svg",pcd:"file_type_light_pcl.svg",pdf:"file_type_pdf.svg",psd:"file_type_photoshop.svg",php1:"file_type_php.svg",php2:"file_type_php.svg",php3:"file_type_php.svg",php4:"file_type_php.svg",php5:"file_type_php.svg",php6:"file_type_php.svg",phps:"file_type_php.svg",phpsa:"file_type_php.svg",phpt:"file_type_php.svg",phtml:"file_type_php.svg",phar:"file_type_php.svg",pipeline:"file_type_pipeline.svg",pu:"file_type_plantuml.svg",plantuml:"file_type_plantuml.svg",iuml:"file_type_plantuml.svg",puml:"file_type_plantuml.svg",pck:"file_type_plsql_package.svg",pkb:"file_type_plsql_package_body.svg",pkh:"file_type_plsql_package_header.svg",pks:"file_type_plsql_package_spec.svg",po:"file_type_poedit.svg",mo:"file_type_poedit.svg",pot:"file_type_powerpoint.svg",potx:"file_type_powerpoint.svg",potm:"file_type_powerpoint.svg",pps:"file_type_powerpoint.svg",ppsx:"file_type_powerpoint.svg",ppsm:"file_type_powerpoint.svg",ppt:"file_type_powerpoint.svg",pptx:"file_type_powerpoint.svg",pptm:"file_type_powerpoint.svg",pa:"file_type_powerpoint.svg",ppa:"file_type_powerpoint.svg",ppam:"file_type_powerpoint.svg",sldm:"file_type_powerpoint.svg",sldx:"file_type_powerpoint.svg",psd1:"file_type_powershell_psd.svg",psm1:"file_type_powershell_psm.svg",pro:"file_type_prolog.svg",P:"file_type_prolog.svg",pub:"file_type_publisher.svg",puz:"file_type_publisher.svg",q:"file_type_q.svg",qbs:"file_type_qbs.svg",qvd:"file_type_qlikview.svg",qvw:"file_type_qlikview.svg",rake:"file_type_rake.svg",rt:"file_type_reacttemplate.svg",reg:"file_type_registry.svg",rego:"file_type_rego.svg",rproj:"file_type_rproj.svg",sls:"file_type_saltstack.svg",sass:"file_type_sass.svg",scssm:"file_type_scss.svg",unity:"file_type_light_shaderlab.svg",fish:"file_type_shell.svg",sketch:"file_type_sketch.svg",eskip:"file_type_skipper.svg",sln:"file_type_sln.svg",spe:"file_type_spacengine.svg",sqlite:"file_type_sqlite.svg",sqlite3:"file_type_sqlite.svg",db3:"file_type_sqlite.svg",sss:"file_type_sss.svg",dta:"file_type_stata.svg",storyboard:"file_type_storyboard.svg",svg:"file_type_svg.svg",tcl:"file_type_tcl.svg",exp:"file_type_tcl.svg",tfstate:"file_type_terraform.svg",tst:"file_type_test.svg",texi:"file_type_light_tex.svg",tikz:"file_type_light_tex.svg",csv:"file_type_text.svg",tsv:"file_type_text.svg",todo:"file_type_light_todo.svg",tt2:"file_type_tt.svg",vala:"file_type_vala.svg",vapi:"file_type_vapi.svg",vash:"file_type_light_vash.svg",vbhtml:"file_type_vbhtml.svg",vbproj:"file_type_vbproj.svg",vcxproj:"file_type_vcxproj.svg","3g2":"file_type_video.svg","3gp":"file_type_video.svg",asf:"file_type_video.svg",amv:"file_type_video.svg",avi:"file_type_video.svg",divx:"file_type_video.svg",qt:"file_type_video.svg",f4a:"file_type_video.svg",f4b:"file_type_video.svg",f4p:"file_type_video.svg",f4v:"file_type_video.svg",flv:"file_type_video.svg",m2v:"file_type_video.svg",m4v:"file_type_video.svg",mkv:"file_type_video.svg",mk3d:"file_type_video.svg",mov:"file_type_video.svg",mp2:"file_type_video.svg",mp4:"file_type_video.svg",mpe:"file_type_video.svg",mpeg:"file_type_video.svg",mpeg2:"file_type_video.svg",mpg:"file_type_video.svg",mpv:"file_type_video.svg",nsv:"file_type_video.svg",ogv:"file_type_video.svg",rm:"file_type_video.svg",rmvb:"file_type_video.svg",svi:"file_type_video.svg",vob:"file_type_video.svg",webm:"file_type_video.svg",wmv:"file_type_video.svg",vsix:"file_type_light_vsix.svg",vsixmanifest:"file_type_light_vsixmanifest.svg",wasm:"file_type_wasm.svg",webp:"file_type_webp.svg",doc:"file_type_word.svg",docx:"file_type_word.svg",docm:"file_type_word.svg",dot:"file_type_word.svg",dotx:"file_type_word.svg",dotm:"file_type_word.svg",wll:"file_type_word.svg",wxml:"file_type_wxml.svg",wxss:"file_type_wxss.svg",xcodeproj:"file_type_xcode.svg",xfl:"file_type_light_xfl.svg",xib:"file_type_xib.svg",xliff:"file_type_xliff.svg",xlf:"file_type_xliff.svg",pex:"file_type_xml.svg",tmlanguage:"file_type_xml.svg",zip:"file_type_zip.svg",rar:"file_type_zip.svg","7z":"file_type_zip.svg",tar:"file_type_zip.svg",tgz:"file_type_zip.svg",bz:"file_type_zip.svg",gz:"file_type_zip.svg",bzip2:"file_type_zip.svg",xz:"file_type_zip.svg",bz2:"file_type_zip.svg",zipx:"file_type_zip.svg"}),Qv}var eb={},Tz;function c9e(){return Tz||(Tz=1,Object.defineProperty(eb,"__esModule",{value:!0}),eb.FileExtensions2ToIcon=void 0,eb.FileExtensions2ToIcon={"gemfile.lock":"file_type_bundler.svg","css.map":"file_type_cssmap.svg","drawio.png":"file_type_drawio.svg","drawio.svg":"file_type_drawio.svg","js.flow":"file_type_flow.svg","ejs.t":"file_type_hygen.svg","js.snap":"file_type_jest_snapshot.svg","jsx.snap":"file_type_jest_snapshot.svg","ts.snap":"file_type_jest_snapshot.svg","tsx.snap":"file_type_jest_snapshot.svg","js.map":"file_type_light_jsmap.svg","layout.html":"file_type_layout.svg","layout.htm":"file_type_layout.svg","marko.js":"file_type_markojs.svg","format.ps1xml":"file_type_powershell_format.svg","types.ps1xml":"file_type_powershell_types.svg","story.js":"file_type_storybook.svg","story.jsx":"file_type_storybook.svg","story.ts":"file_type_storybook.svg","story.tsx":"file_type_storybook.svg","story.mdx":"file_type_storybook.svg","stories.js":"file_type_storybook.svg","stories.jsx":"file_type_storybook.svg","stories.ts":"file_type_storybook.svg","stories.tsx":"file_type_storybook.svg","stories.mdx":"file_type_storybook.svg","test.js":"file_type_light_testjs.svg","test.jsx":"file_type_light_testjs.svg","test.mjs":"file_type_light_testjs.svg","spec.js":"file_type_light_testjs.svg","spec.jsx":"file_type_light_testjs.svg","spec.mjs":"file_type_light_testjs.svg","test.ts":"file_type_testts.svg","test.tsx":"file_type_testts.svg","spec.ts":"file_type_testts.svg","spec.tsx":"file_type_testts.svg","e2e-test.ts":"file_type_testts.svg","e2e-test.tsx":"file_type_testts.svg","e2e-spec.ts":"file_type_testts.svg","e2e-spec.tsx":"file_type_testts.svg","d.ts":"file_type_typescriptdef.svg"}),eb}var tb={},Ez;function u9e(){return Ez||(Ez=1,Object.defineProperty(tb,"__esModule",{value:!0}),tb.FileNamesToIcon=void 0,tb.FileNamesToIcon={".angular-cli.json":"file_type_angular.svg","angular-cli.json":"file_type_angular.svg","angular.json":"file_type_angular.svg",".angular.json":"file_type_angular.svg","api-extractor.json":"file_type_api_extractor.svg","api-extractor-base.json":"file_type_api_extractor.svg",".appsemblerc.yaml":"file_type_appsemble.svg","app-definition.yaml":"file_type_appsemble.svg","appveyor.yml":"file_type_appveyor.svg",".appveyor.yml":"file_type_appveyor.svg","astro.config.js":"file_type_astroconfig.svg","astro.config.cjs":"file_type_astroconfig.svg","astro.config.mjs":"file_type_astroconfig.svg","aurelia.json":"file_type_aurelia.svg","azure-pipelines.yml":"file_type_azurepipelines.svg",".vsts-ci.yml":"file_type_azurepipelines.svg",".babelrc":"file_type_light_babel.svg",".babelignore":"file_type_light_babel.svg",".babelrc.js":"file_type_light_babel.svg",".babelrc.cjs":"file_type_light_babel.svg",".babelrc.mjs":"file_type_light_babel.svg",".babelrc.json":"file_type_light_babel.svg","babel.config.js":"file_type_light_babel.svg","babel.config.cjs":"file_type_light_babel.svg","babel.config.mjs":"file_type_light_babel.svg","babel.config.json":"file_type_light_babel.svg",".bzrignore":"file_type_bazaar.svg","BUILD.bazel":"file_type_bazel.svg",".bazelrc":"file_type_bazel.svg","bazel.rc":"file_type_bazel.svg","bazel.bazelrc":"file_type_bazel.svg","bitbucket-pipelines.yml":"file_type_bitbucketpipeline.svg",".bithoundrc":"file_type_bithound.svg",".bowerrc":"file_type_bower.svg","bower.json":"file_type_bower.svg",".browserslistrc":"file_type_browserslist.svg",browserslist:"file_type_browserslist.svg",".buckconfig":"file_type_buckbuild.svg",gemfile:"file_type_bundler.svg","gemfile.lock":"file_type_bundler.svg","capacitor.config.json":"file_type_capacitor.svg","cargo.toml":"file_type_cargo.svg","cargo.lock":"file_type_cargo.svg",chefignore:"file_type_chef.svg",berksfile:"file_type_chef.svg","berksfile.lock":"file_type_chef.svg","policyfile.rb":"file_type_chef.svg","policyfile.lock.json":"file_type_chef.svg","circle.yml":"file_type_light_circleci.svg",".cfignore":"file_type_light_cloudfoundry.svg",".codacy.yml":"file_type_light_codacy.svg",".codacy.yaml":"file_type_light_codacy.svg",".codeclimate.yml":"file_type_light_codeclimate.svg","codecov.yml":"file_type_codecov.svg",".codecov.yml":"file_type_codecov.svg","config.codekit":"file_type_codekit.svg","config.codekit2":"file_type_codekit.svg","config.codekit3":"file_type_codekit.svg",".config.codekit":"file_type_codekit.svg",".config.codekit2":"file_type_codekit.svg",".config.codekit3":"file_type_codekit.svg","coffeelint.json":"file_type_coffeelint.svg",".coffeelintignore":"file_type_coffeelint.svg","commitlint.config.js":"file_type_commitlint.svg",".commitlintrc.js":"file_type_commitlint.svg",".commitlintrc.json":"file_type_commitlint.svg",".commitlintrc.yml":"file_type_commitlint.svg","composer.json":"file_type_composer.svg","composer.lock":"file_type_composer.svg","conanfile.txt":"file_type_conan.svg","conanfile.py":"file_type_conan.svg",".condarc":"file_type_conda.svg",".coveralls.yml":"file_type_coveralls.svg","crowdin.yml":"file_type_crowdin.svg",".csscomb.json":"file_type_csscomb.svg",".csslintrc":"file_type_csslint.svg",".cvsignore":"file_type_cvs.svg","cypress.json":"file_type_cypress.svg","cypress.env.json":"file_type_cypress.svg",".boringignore":"file_type_darcs.svg","dependabot.yml":"file_type_dependabot.svg","dependencies.yml":"file_type_dependencies.svg","devcontainer.json":"file_type_devcontainer.svg",".devcontainer.json":"file_type_devcontainer.svg","compose.yaml":"file_type_docker.svg","compose.yml":"file_type_docker.svg","docker-compose.yaml":"file_type_docker.svg","docker-compose.yml":"file_type_docker.svg","docker-compose.ci-build.yaml":"file_type_docker.svg","docker-compose.ci-build.yml":"file_type_docker.svg","docker-compose.override.yaml":"file_type_docker.svg","docker-compose.override.yml":"file_type_docker.svg","docker-compose.vs.debug.yaml":"file_type_docker.svg","docker-compose.vs.debug.yml":"file_type_docker.svg","docker-compose.vs.release.yaml":"file_type_docker.svg","docker-compose.vs.release.yml":"file_type_docker.svg","docker-cloud.yaml":"file_type_docker.svg","docker-cloud.yml":"file_type_docker.svg","docker-compose.test.yml":"file_type_dockertest.svg",".doczrc":"file_type_docz.svg","docz.js":"file_type_docz.svg","docz.json":"file_type_docz.svg",".docz.js":"file_type_docz.svg",".docz.json":"file_type_docz.svg","doczrc.js":"file_type_docz.svg","doczrc.json":"file_type_docz.svg","docz.config.js":"file_type_docz.svg","docz.config.json":"file_type_docz.svg",".dojorc":"file_type_dojo.svg",".drone.yml":"file_type_light_drone.svg",".drone.yml.sig":"file_type_light_drone.svg",".dvc":"file_type_dvc.svg",".editorconfig":"file_type_editorconfig.svg","elm-package.json":"file_type_elm.svg",".ember-cli":"file_type_ember.svg",emakefile:"file_type_erlang.svg",".emakerfile":"file_type_erlang.svg",".eslintrc":"file_type_eslint.svg",".eslintignore":"file_type_eslint.svg",".eslintcache":"file_type_eslint.svg",".eslintrc.js":"file_type_eslint.svg",".eslintrc.mjs":"file_type_eslint.svg",".eslintrc.cjs":"file_type_eslint.svg",".eslintrc.json":"file_type_eslint.svg",".eslintrc.yaml":"file_type_eslint.svg",".eslintrc.yml":"file_type_eslint.svg","app.json":"file_type_light_expo.svg","app.config.js":"file_type_light_expo.svg","app.config.json":"file_type_light_expo.svg","app.config.json5":"file_type_light_expo.svg",".faunarc":"file_type_fauna.svg","favicon.ico":"file_type_favicon.svg",".firebaserc":"file_type_firebase.svg","firebase.json":"file_type_light_firebasehosting.svg","firestore.rules":"file_type_firestore.svg","firestore.indexes.json":"file_type_firestore.svg",".flooignore":"file_type_floobits.svg",".flowconfig":"file_type_flow.svg",".flutter-plugins":"file_type_flutter.svg",".metadata":"file_type_flutter.svg","pubspec.lock":"file_type_flutter_package.svg","pubspec.yaml":"file_type_flutter_package.svg",".packages":"file_type_flutter_package.svg",".fossaignore":"file_type_fossa.svg","ignore-glob":"file_type_fossil.svg","fuse.js":"file_type_fusebox.svg","gatsby-config.js":"file_type_gatsby.svg","gatsby-config.ts":"file_type_gatsby.svg","gatsby-node.js":"file_type_gatsby.svg","gatsby-node.ts":"file_type_gatsby.svg","gatsby-browser.js":"file_type_gatsby.svg","gatsby-browser.ts":"file_type_gatsby.svg","gatsby-ssr.js":"file_type_gatsby.svg","gatsby-ssr.ts":"file_type_gatsby.svg",".gitattributes":"file_type_git.svg",".gitconfig":"file_type_git.svg",".gitignore":"file_type_git.svg",".gitmodules":"file_type_git.svg",".gitkeep":"file_type_git.svg",".mailmap":"file_type_git.svg",".gitlab-ci.yml":"file_type_gitlab.svg",".gitpod.yaml":"file_type_gitpod.svg",".gitpod.yml":"file_type_gitpod.svg","gitpod.yaml":"file_type_gitpod.svg","gitpod.yml":"file_type_gitpod.svg","glide.yml":"file_type_glide.svg",".glitterrc":"file_type_glitter.svg","go.sum":"file_type_go_package.svg","go.mod":"file_type_go_package.svg",".gqlconfig":"file_type_graphql.svg",".graphqlconfig":"file_type_graphql_config.svg",".graphqlconfig.yml":"file_type_graphql_config.svg",".graphqlconfig.yaml":"file_type_graphql_config.svg","greenkeeper.json":"file_type_greenkeeper.svg","gridsome.config.js":"file_type_gridsome.svg","gridsome.config.ts":"file_type_gridsome.svg","gridsome.server.js":"file_type_gridsome.svg","gridsome.server.ts":"file_type_gridsome.svg","gridsome.client.js":"file_type_gridsome.svg","gridsome.client.ts":"file_type_gridsome.svg","gruntfile.js":"file_type_grunt.svg","gruntfile.coffee":"file_type_grunt.svg","gruntfile.ts":"file_type_grunt.svg","gruntfile.babel.js":"file_type_grunt.svg","gruntfile.babel.coffee":"file_type_grunt.svg","gruntfile.babel.ts":"file_type_grunt.svg","gulpfile.js":"file_type_gulp.svg","gulpfile.coffee":"file_type_gulp.svg","gulpfile.ts":"file_type_gulp.svg","gulpfile.mjs":"file_type_gulp.svg","gulpfile.esm.js":"file_type_gulp.svg","gulpfile.esm.coffee":"file_type_gulp.svg","gulpfile.esm.ts":"file_type_gulp.svg","gulpfile.esm.mjs":"file_type_gulp.svg","gulpfile.babel.js":"file_type_gulp.svg","gulpfile.babel.coffee":"file_type_gulp.svg","gulpfile.babel.ts":"file_type_gulp.svg","gulpfile.babel.mjs":"file_type_gulp.svg","haxelib.json":"file_type_haxe.svg","checkstyle.json":"file_type_haxecheckstyle.svg",".p4ignore":"file_type_helix.svg","chart.lock":"file_type_helm.svg","chart.yaml":"file_type_helm.svg","horusec-config.json":"file_type_horusec.svg",".htmlhintrc":"file_type_htmlhint.svg",".huskyrc":"file_type_husky.svg","husky.config.js":"file_type_husky.svg",".huskyrc.js":"file_type_husky.svg",".huskyrc.json":"file_type_husky.svg",".huskyrc.yaml":"file_type_husky.svg",".huskyrc.yml":"file_type_husky.svg","ionic.project":"file_type_ionic.svg","ionic.config.json":"file_type_ionic.svg",jakefile:"file_type_jake.svg","jakefile.js":"file_type_jake.svg","jasmine.json":"file_type_jasmine.svg","jest.config.json":"file_type_jest.svg","jest.config.base.json":"file_type_jest.svg","jest.config.common.json":"file_type_jest.svg","jest.config.ts":"file_type_jest.svg","jest.config.base.ts":"file_type_jest.svg","jest.config.common.ts":"file_type_jest.svg","jest.json":"file_type_jest.svg",".jestrc":"file_type_jest.svg",".jestrc.js":"file_type_jest.svg",".jestrc.json":"file_type_jest.svg","jest.config.js":"file_type_jest.svg","jest.config.cjs":"file_type_jest.svg","jest.config.mjs":"file_type_jest.svg","jest.config.base.js":"file_type_jest.svg","jest.config.base.cjs":"file_type_jest.svg","jest.config.base.mjs":"file_type_jest.svg","jest.config.common.js":"file_type_jest.svg","jest.config.common.cjs":"file_type_jest.svg","jest.config.common.mjs":"file_type_jest.svg","jest.config.babel.js":"file_type_jest.svg","jest.config.babel.cjs":"file_type_jest.svg","jest.config.babel.mjs":"file_type_jest.svg",".jpmignore":"file_type_jpm.svg",".jsbeautifyrc":"file_type_jsbeautify.svg",jsbeautifyrc:"file_type_jsbeautify.svg",".jsbeautify":"file_type_jsbeautify.svg",jsbeautify:"file_type_jsbeautify.svg","jsconfig.json":"file_type_light_jsconfig.svg",".jscpd.json":"file_type_jscpd.svg","jscpd-report.xml":"file_type_jscpd.svg","jscpd-report.json":"file_type_jscpd.svg","jscpd-report.html":"file_type_jscpd.svg",".jshintrc":"file_type_jshint.svg",".jshintignore":"file_type_jshint.svg","karma.conf.js":"file_type_karma.svg","karma.conf.coffee":"file_type_karma.svg","karma.conf.ts":"file_type_karma.svg",".kitchen.yml":"file_type_kitchenci.svg","kitchen.yml":"file_type_kitchenci.svg",".kiteignore":"file_type_light_kite.svg","layout.html":"file_type_layout.svg","layout.htm":"file_type_layout.svg","lerna.json":"file_type_light_lerna.svg",license:"file_type_license.svg",licence:"file_type_license.svg",copying:"file_type_license.svg","copying.lesser":"file_type_license.svg","license.md":"file_type_license.svg","license.txt":"file_type_license.svg","licence.md":"file_type_license.svg","licence.txt":"file_type_license.svg","copying.md":"file_type_license.svg","copying.txt":"file_type_license.svg","copying.lesser.md":"file_type_license.svg","copying.lesser.txt":"file_type_license.svg",".licrc":"file_type_licensebat.svg",".lighthouserc.js":"file_type_lighthouse.svg",".lighthouserc.json":"file_type_lighthouse.svg",".lighthouserc.yaml":"file_type_lighthouse.svg",".lighthouserc.yml":"file_type_lighthouse.svg","include.xml":"file_type_lime.svg",".lintstagedrc":"file_type_lintstagedrc.svg","lint-staged.config.js":"file_type_lintstagedrc.svg",".lintstagedrc.js":"file_type_lintstagedrc.svg",".lintstagedrc.json":"file_type_lintstagedrc.svg",".lintstagedrc.yaml":"file_type_lintstagedrc.svg",".lintstagedrc.yml":"file_type_lintstagedrc.svg",manifest:"file_type_manifest.svg","manifest.bak":"file_type_manifest_bak.svg","manifest.skip":"file_type_manifest_skip.svg",".markdownlint.json":"file_type_markdownlint.svg","maven.config":"file_type_maven.svg","pom.xml":"file_type_maven.svg","extensions.xml":"file_type_maven.svg","settings.xml":"file_type_maven.svg",".hgignore":"file_type_mercurial.svg","mocha.opts":"file_type_mocha.svg",".mocharc.js":"file_type_mocha.svg",".mocharc.json":"file_type_mocha.svg",".mocharc.jsonc":"file_type_mocha.svg",".mocharc.yaml":"file_type_mocha.svg",".mocharc.yml":"file_type_mocha.svg",modernizr:"file_type_modernizr.svg","modernizr.js":"file_type_modernizr.svg","modernizrrc.js":"file_type_modernizr.svg",".modernizr.js":"file_type_modernizr.svg",".modernizrrc.js":"file_type_modernizr.svg","moleculer.config.js":"file_type_moleculer.svg","moleculer.config.json":"file_type_moleculer.svg","moleculer.config.ts":"file_type_moleculer.svg",".mtn-ignore":"file_type_monotone.svg",".nest-cli.json":"file_type_nestjs.svg","nest-cli.json":"file_type_nestjs.svg","nestconfig.json":"file_type_nestjs.svg",".nestconfig.json":"file_type_nestjs.svg","netlify.toml":"file_type_netlify.svg","next.config.js":"file_type_light_next.svg","ng-tailwind.js":"file_type_ng_tailwind.svg","nginx.conf":"file_type_nginx.svg","build.ninja":"file_type_ninja.svg",".node-version":"file_type_node.svg",".nvmrc":"file_type_node.svg","nodemon.json":"file_type_nodemon.svg",".npmignore":"file_type_npm.svg",".npmrc":"file_type_npm.svg","package.json":"file_type_npm.svg","package-lock.json":"file_type_npm.svg","npm-shrinkwrap.json":"file_type_npm.svg",".nsrirc":"file_type_nsri.svg",".nsriignore":"file_type_nsri.svg","nsri.config.js":"file_type_nsri.svg",".nsrirc.js":"file_type_nsri.svg",".nsrirc.json":"file_type_nsri.svg",".nsrirc.yaml":"file_type_nsri.svg",".nsrirc.yml":"file_type_nsri.svg",".integrity.json":"file_type_nsri-integrity.svg","nuxt.config.js":"file_type_nuxt.svg","nuxt.config.ts":"file_type_nuxt.svg",".nycrc":"file_type_nyc.svg",".nycrc.json":"file_type_nyc.svg",".merlin":"file_type_ocaml.svg","paket.dependencies":"file_type_paket.svg","paket.lock":"file_type_paket.svg","paket.references":"file_type_paket.svg","paket.template":"file_type_paket.svg","paket.local":"file_type_paket.svg",".php_cs":"file_type_phpcsfixer.svg",".php_cs.dist":"file_type_phpcsfixer.svg",phpunit:"file_type_phpunit.svg","phpunit.xml":"file_type_phpunit.svg","phpunit.xml.dist":"file_type_phpunit.svg",".phraseapp.yml":"file_type_phraseapp.svg",pipfile:"file_type_pip.svg","pipfile.lock":"file_type_pip.svg","platformio.ini":"file_type_platformio.svg","pnpmfile.js":"file_type_light_pnpm.svg","pnpm-lock.yaml":"file_type_light_pnpm.svg","pnpm-workspace.yaml":"file_type_light_pnpm.svg",".postcssrc":"file_type_postcssconfig.svg",".postcssrc.json":"file_type_postcssconfig.svg",".postcssrc.yaml":"file_type_postcssconfig.svg",".postcssrc.yml":"file_type_postcssconfig.svg",".postcssrc.ts":"file_type_postcssconfig.svg",".postcssrc.js":"file_type_postcssconfig.svg",".postcssrc.cjs":"file_type_postcssconfig.svg","postcss.config.ts":"file_type_postcssconfig.svg","postcss.config.js":"file_type_postcssconfig.svg","postcss.config.cjs":"file_type_postcssconfig.svg","preact.config.js":"file_type_preact.svg",".pre-commit-config.yaml":"file_type_precommit.svg",".prettierrc":"file_type_light_prettier.svg",".prettierignore":"file_type_light_prettier.svg","prettier.config.js":"file_type_light_prettier.svg","prettier.config.cjs":"file_type_light_prettier.svg","prettier.config.ts":"file_type_light_prettier.svg","prettier.config.coffee":"file_type_light_prettier.svg",".prettierrc.js":"file_type_light_prettier.svg",".prettierrc.cjs":"file_type_light_prettier.svg",".prettierrc.json":"file_type_light_prettier.svg",".prettierrc.json5":"file_type_light_prettier.svg",".prettierrc.yml":"file_type_light_prettier.svg",".prettierrc.yaml":"file_type_light_prettier.svg",procfile:"file_type_procfile.svg","protractor.conf.js":"file_type_protractor.svg","protractor.conf.coffee":"file_type_protractor.svg","protractor.conf.ts":"file_type_protractor.svg",".jade-lintrc":"file_type_pug.svg",".pug-lintrc":"file_type_pug.svg",".jade-lint.json":"file_type_pug.svg",".pug-lintrc.js":"file_type_pug.svg",".pug-lintrc.json":"file_type_pug.svg","py.typed":"file_type_pytyped.svg",".pyup":"file_type_pyup.svg",".pyup.yml":"file_type_pyup.svg",qmldir:"file_type_qmldir.svg","quasar.conf.js":"file_type_quasar.svg",rakefile:"file_type_rake.svg","razzle.config.js":"file_type_light_razzle.svg",".rehyperc":"file_type_light_rehype.svg",".rehypeignore":"file_type_light_rehype.svg",".rehyperc.cjs":"file_type_light_rehype.svg",".rehyperc.js":"file_type_light_rehype.svg",".rehyperc.json":"file_type_light_rehype.svg",".rehyperc.mjs":"file_type_light_rehype.svg",".rehyperc.yml":"file_type_light_rehype.svg",".rehyperc.yaml":"file_type_light_rehype.svg",".remarkrc":"file_type_light_remark.svg",".remarkignore":"file_type_light_remark.svg",".remarkrc.cjs":"file_type_light_remark.svg",".remarkrc.js":"file_type_light_remark.svg",".remarkrc.json":"file_type_light_remark.svg",".remarkrc.mjs":"file_type_light_remark.svg",".remarkrc.yml":"file_type_light_remark.svg",".remarkrc.yaml":"file_type_light_remark.svg",".renovaterc":"file_type_renovate.svg","renovate.json":"file_type_renovate.svg",".renovaterc.json":"file_type_renovate.svg",".retextrc":"file_type_light_retext.svg",".retextignore":"file_type_light_retext.svg",".retextrc.cjs":"file_type_light_retext.svg",".retextrc.js":"file_type_light_retext.svg",".retextrc.json":"file_type_light_retext.svg",".retextrc.mjs":"file_type_light_retext.svg",".retextrc.yml":"file_type_light_retext.svg",".retextrc.yaml":"file_type_light_retext.svg","robots.txt":"file_type_robots.svg","rollup.config.js":"file_type_rollup.svg","rollup.config.cjs":"file_type_rollup.svg","rollup.config.mjs":"file_type_rollup.svg","rollup.config.coffee":"file_type_rollup.svg","rollup.config.ts":"file_type_rollup.svg","rollup.config.common.js":"file_type_rollup.svg","rollup.config.common.cjs":"file_type_rollup.svg","rollup.config.common.mjs":"file_type_rollup.svg","rollup.config.common.coffee":"file_type_rollup.svg","rollup.config.common.ts":"file_type_rollup.svg","rollup.config.dev.js":"file_type_rollup.svg","rollup.config.dev.cjs":"file_type_rollup.svg","rollup.config.dev.mjs":"file_type_rollup.svg","rollup.config.dev.coffee":"file_type_rollup.svg","rollup.config.dev.ts":"file_type_rollup.svg","rollup.config.prod.js":"file_type_rollup.svg","rollup.config.prod.cjs":"file_type_rollup.svg","rollup.config.prod.mjs":"file_type_rollup.svg","rollup.config.prod.coffee":"file_type_rollup.svg","rollup.config.prod.ts":"file_type_rollup.svg",".rspec":"file_type_rspec.svg",".rubocop.yml":"file_type_light_rubocop.svg",".rubocop_todo.yml":"file_type_light_rubocop.svg","rust-toolchain":"file_type_light_rust_toolchain.svg",".sailsrc":"file_type_sails.svg",".sentryclirc":"file_type_sentry.svg",".sequelizerc":"file_type_sequelize.svg",".sequelizerc.js":"file_type_sequelize.svg",".sequelizerc.json":"file_type_sequelize.svg","serverless.yml":"file_type_serverless.svg","serverless.json":"file_type_serverless.svg","serverless.js":"file_type_serverless.svg","serverless.ts":"file_type_serverless.svg","snapcraft.yaml":"file_type_snapcraft.svg",".snyk":"file_type_snyk.svg",".solidarity":"file_type_solidarity.svg",".solidarity.json":"file_type_solidarity.svg",".stylelintrc":"file_type_light_stylelint.svg",".stylelintignore":"file_type_light_stylelint.svg",".stylelintcache":"file_type_light_stylelint.svg","stylelint.config.js":"file_type_light_stylelint.svg","stylelint.config.json":"file_type_light_stylelint.svg","stylelint.config.yaml":"file_type_light_stylelint.svg","stylelint.config.yml":"file_type_light_stylelint.svg","stylelint.config.ts":"file_type_light_stylelint.svg","stylelint.config.cjs":"file_type_light_stylelint.svg",".stylelintrc.js":"file_type_light_stylelint.svg",".stylelintrc.json":"file_type_light_stylelint.svg",".stylelintrc.yaml":"file_type_light_stylelint.svg",".stylelintrc.yml":"file_type_light_stylelint.svg",".stylelintrc.ts":"file_type_light_stylelint.svg",".stylelintrc.cjs":"file_type_light_stylelint.svg",".stylish-haskell.yaml":"file_type_stylish_haskell.svg",".svnignore":"file_type_subversion.svg","package.pins":"file_type_swift.svg","symfony.lock":"file_type_light_symfony.svg","tailwind.js":"file_type_tailwind.svg","tailwind.cjs":"file_type_tailwind.svg","tailwind.coffee":"file_type_tailwind.svg","tailwind.ts":"file_type_tailwind.svg","tailwind.json":"file_type_tailwind.svg","tailwind.config.js":"file_type_tailwind.svg","tailwind.config.cjs":"file_type_tailwind.svg","tailwind.config.coffee":"file_type_tailwind.svg","tailwind.config.ts":"file_type_tailwind.svg","tailwind.config.json":"file_type_tailwind.svg",".testcaferc.json":"file_type_light_testcafe.svg",".tfignore":"file_type_tfs.svg","tox.ini":"file_type_tox.svg",".travis.yml":"file_type_travis.svg","tsconfig.json":"file_type_tsconfig.svg","tsconfig.app.json":"file_type_tsconfig.svg","tsconfig.base.json":"file_type_tsconfig.svg","tsconfig.common.json":"file_type_tsconfig.svg","tsconfig.dev.json":"file_type_tsconfig.svg","tsconfig.development.json":"file_type_tsconfig.svg","tsconfig.e2e.json":"file_type_tsconfig.svg","tsconfig.prod.json":"file_type_tsconfig.svg","tsconfig.production.json":"file_type_tsconfig.svg","tsconfig.server.json":"file_type_tsconfig.svg","tsconfig.spec.json":"file_type_tsconfig.svg","tsconfig.staging.json":"file_type_tsconfig.svg","tsconfig.test.json":"file_type_tsconfig.svg","tsconfig.lib.json":"file_type_tsconfig.svg","tsconfig.lib.prod.json":"file_type_tsconfig.svg","tslint.json":"file_type_tslint.svg","tslint.yaml":"file_type_tslint.svg","tslint.yml":"file_type_tslint.svg","typedoc.js":"file_type_typedoc.svg","typedoc.json":"file_type_typedoc.svg",".unibeautifyrc":"file_type_light_unibeautify.svg","unibeautify.config.js":"file_type_light_unibeautify.svg",".unibeautifyrc.js":"file_type_light_unibeautify.svg",".unibeautifyrc.json":"file_type_light_unibeautify.svg",".unibeautifyrc.yaml":"file_type_light_unibeautify.svg",".unibeautifyrc.yml":"file_type_light_unibeautify.svg",unlicense:"file_type_unlicense.svg",unlicence:"file_type_unlicense.svg","unlicense.md":"file_type_unlicense.svg","unlicense.txt":"file_type_unlicense.svg","unlicence.md":"file_type_unlicense.svg","unlicence.txt":"file_type_unlicense.svg",vagrantfile:"file_type_vagrant.svg","vapor.yml":"file_type_vapor.svg",".vimrc":"file_type_vim.svg",".gvimrc":"file_type_vim.svg","vite.config.js":"file_type_vite.svg","vite.config.ts":"file_type_vite.svg",".vscodeignore":"file_type_vscode.svg","launch.json":"file_type_vscode.svg","tasks.json":"file_type_vscode.svg","vscodeignore.json":"file_type_vscode.svg",".vuerc":"file_type_vueconfig.svg","vue.config.js":"file_type_vueconfig.svg","wallaby.json":"file_type_wallaby.svg","wallaby.js":"file_type_wallaby.svg","wallaby.ts":"file_type_wallaby.svg","wallaby.coffee":"file_type_wallaby.svg","wallaby.conf.json":"file_type_wallaby.svg","wallaby.conf.js":"file_type_wallaby.svg","wallaby.conf.ts":"file_type_wallaby.svg","wallaby.conf.coffee":"file_type_wallaby.svg",".wallaby.json":"file_type_wallaby.svg",".wallaby.js":"file_type_wallaby.svg",".wallaby.ts":"file_type_wallaby.svg",".wallaby.coffee":"file_type_wallaby.svg",".wallaby.conf.json":"file_type_wallaby.svg",".wallaby.conf.js":"file_type_wallaby.svg",".wallaby.conf.ts":"file_type_wallaby.svg",".wallaby.conf.coffee":"file_type_wallaby.svg",".watchmanconfig":"file_type_watchmanconfig.svg","webpack.base.conf.js":"file_type_webpack.svg","webpack.base.conf.coffee":"file_type_webpack.svg","webpack.base.conf.ts":"file_type_webpack.svg","webpack.common.js":"file_type_webpack.svg","webpack.common.coffee":"file_type_webpack.svg","webpack.common.ts":"file_type_webpack.svg","webpack.config.js":"file_type_webpack.svg","webpack.config.coffee":"file_type_webpack.svg","webpack.config.ts":"file_type_webpack.svg","webpack.config.base.js":"file_type_webpack.svg","webpack.config.base.coffee":"file_type_webpack.svg","webpack.config.base.ts":"file_type_webpack.svg","webpack.config.common.js":"file_type_webpack.svg","webpack.config.common.coffee":"file_type_webpack.svg","webpack.config.common.ts":"file_type_webpack.svg","webpack.config.dev.js":"file_type_webpack.svg","webpack.config.dev.coffee":"file_type_webpack.svg","webpack.config.dev.ts":"file_type_webpack.svg","webpack.config.development.js":"file_type_webpack.svg","webpack.config.development.coffee":"file_type_webpack.svg","webpack.config.development.ts":"file_type_webpack.svg","webpack.config.staging.js":"file_type_webpack.svg","webpack.config.staging.coffee":"file_type_webpack.svg","webpack.config.staging.ts":"file_type_webpack.svg","webpack.config.test.js":"file_type_webpack.svg","webpack.config.test.coffee":"file_type_webpack.svg","webpack.config.test.ts":"file_type_webpack.svg","webpack.config.prod.js":"file_type_webpack.svg","webpack.config.prod.coffee":"file_type_webpack.svg","webpack.config.prod.ts":"file_type_webpack.svg","webpack.config.production.js":"file_type_webpack.svg","webpack.config.production.coffee":"file_type_webpack.svg","webpack.config.production.ts":"file_type_webpack.svg","webpack.config.babel.js":"file_type_webpack.svg","webpack.config.babel.coffee":"file_type_webpack.svg","webpack.config.babel.ts":"file_type_webpack.svg","webpack.config.base.babel.js":"file_type_webpack.svg","webpack.config.base.babel.coffee":"file_type_webpack.svg","webpack.config.base.babel.ts":"file_type_webpack.svg","webpack.config.common.babel.js":"file_type_webpack.svg","webpack.config.common.babel.coffee":"file_type_webpack.svg","webpack.config.common.babel.ts":"file_type_webpack.svg","webpack.config.dev.babel.js":"file_type_webpack.svg","webpack.config.dev.babel.coffee":"file_type_webpack.svg","webpack.config.dev.babel.ts":"file_type_webpack.svg","webpack.config.development.babel.js":"file_type_webpack.svg","webpack.config.development.babel.coffee":"file_type_webpack.svg","webpack.config.development.babel.ts":"file_type_webpack.svg","webpack.config.staging.babel.js":"file_type_webpack.svg","webpack.config.staging.babel.coffee":"file_type_webpack.svg","webpack.config.staging.babel.ts":"file_type_webpack.svg","webpack.config.test.babel.js":"file_type_webpack.svg","webpack.config.test.babel.coffee":"file_type_webpack.svg","webpack.config.test.babel.ts":"file_type_webpack.svg","webpack.config.prod.babel.js":"file_type_webpack.svg","webpack.config.prod.babel.coffee":"file_type_webpack.svg","webpack.config.prod.babel.ts":"file_type_webpack.svg","webpack.config.production.babel.js":"file_type_webpack.svg","webpack.config.production.babel.coffee":"file_type_webpack.svg","webpack.config.production.babel.ts":"file_type_webpack.svg","webpack.dev.js":"file_type_webpack.svg","webpack.dev.coffee":"file_type_webpack.svg","webpack.dev.ts":"file_type_webpack.svg","webpack.dev.conf.js":"file_type_webpack.svg","webpack.dev.conf.coffee":"file_type_webpack.svg","webpack.dev.conf.ts":"file_type_webpack.svg","webpack.prod.js":"file_type_webpack.svg","webpack.prod.coffee":"file_type_webpack.svg","webpack.prod.ts":"file_type_webpack.svg","webpack.prod.conf.js":"file_type_webpack.svg","webpack.prod.conf.coffee":"file_type_webpack.svg","webpack.prod.conf.ts":"file_type_webpack.svg","webpack.main.config.js":"file_type_webpack.svg","webpack.main.config.coffee":"file_type_webpack.svg","webpack.main.config.ts":"file_type_webpack.svg","webpack.mix.js":"file_type_webpack.svg","webpack.mix.coffee":"file_type_webpack.svg","webpack.mix.ts":"file_type_webpack.svg","webpack.plugins.js":"file_type_webpack.svg","webpack.plugins.coffee":"file_type_webpack.svg","webpack.plugins.ts":"file_type_webpack.svg","webpack.renderer.config.js":"file_type_webpack.svg","webpack.renderer.config.coffee":"file_type_webpack.svg","webpack.renderer.config.ts":"file_type_webpack.svg","webpack.rules.js":"file_type_webpack.svg","webpack.rules.coffee":"file_type_webpack.svg","webpack.rules.ts":"file_type_webpack.svg","webpack.test.conf.js":"file_type_webpack.svg","webpack.test.conf.coffee":"file_type_webpack.svg","webpack.test.conf.ts":"file_type_webpack.svg","wercker.yml":"file_type_wercker.svg","wpml-config.xml":"file_type_wpml.svg",".yamllint":"file_type_yamllint.svg",".yaspellerrc":"file_type_yandex.svg",".yaspeller.json":"file_type_yandex.svg","yarn.lock":"file_type_yarn.svg",".yarnrc":"file_type_yarn.svg",".yarnrc.yml":"file_type_yarn.svg",".yarnclean":"file_type_yarn.svg",".yarn-integrity":"file_type_yarn.svg",".yarn-metadata.json":"file_type_yarn.svg",".yarnignore":"file_type_yarn.svg",".yo-rc.json":"file_type_yeoman.svg","now.json":"file_type_light_zeit.svg",".nowignore":"file_type_light_zeit.svg","vercel.json":"file_type_light_zeit.svg",".vercelignore":"file_type_light_zeit.svg",Jenkinsfile:"file_type_groovy.svg",config:"file_type_ini.svg",gitconfig:"file_type_ini.svg",guardfile:"file_type_ruby.svg",podfile:"file_type_ruby.svg",capfile:"file_type_ruby.svg"}),tb}var nb={},Az;function d9e(){return Az||(Az=1,Object.defineProperty(nb,"__esModule",{value:!0}),nb.FolderNamesToIcon=void 0,nb.FolderNamesToIcon={android:"folder_type_android.svg",api:"folder_type_api.svg",".api":"folder_type_api.svg",apis:"folder_type_api.svg",".apis":"folder_type_api.svg",app:"folder_type_app.svg",".app":"folder_type_app.svg",arangodb:"folder_type_arangodb.svg",arango:"folder_type_arangodb.svg",assets:"folder_type_asset.svg",".assets":"folder_type_asset.svg",audio:"folder_type_audio.svg",".audio":"folder_type_audio.svg",audios:"folder_type_audio.svg",".audios":"folder_type_audio.svg",sound:"folder_type_audio.svg",".sound":"folder_type_audio.svg",sounds:"folder_type_audio.svg",".sounds":"folder_type_audio.svg",aurelia_project:"folder_type_aurelia.svg",aws:"folder_type_aws.svg",".aws":"folder_type_aws.svg",azure:"folder_type_azure.svg",".azure":"folder_type_azure.svg","azure-pipelines":"folder_type_azurepipelines.svg",".azure-pipelines":"folder_type_azurepipelines.svg",bin:"folder_type_binary.svg",".bin":"folder_type_binary.svg",blocs:"folder_type_bloc.svg",bloc:"folder_type_bloc.svg",blueprint:"folder_type_blueprint.svg",".blueprint":"folder_type_blueprint.svg",blueprints:"folder_type_blueprint.svg",".blueprints":"folder_type_blueprint.svg",bower_components:"folder_type_bower.svg",".buildkite":"folder_type_buildkite.svg",cake:"folder_type_cake.svg",".cake":"folder_type_cake.svg",certificates:"folder_type_certificate.svg",".certificates":"folder_type_certificate.svg",certs:"folder_type_certificate.svg","certs.":"folder_type_certificate.svg",chef:"folder_type_chef.svg",".chef":"folder_type_chef.svg",".circleci":"folder_type_circleci.svg",cli:"folder_type_cli.svg",cmd:"folder_type_cli.svg",command:"folder_type_cli.svg",commands:"folder_type_cli.svg",commandline:"folder_type_cli.svg",console:"folder_type_cli.svg",client:"folder_type_client.svg",clients:"folder_type_client.svg",".cmake":"folder_type_cmake.svg",cmake:"folder_type_cmake.svg",component:"folder_type_component.svg",components:"folder_type_component.svg",".components":"folder_type_component.svg",widgets:"folder_type_component.svg",composer:"folder_type_composer.svg",".composer":"folder_type_composer.svg",conf:"folder_type_config.svg",".conf":"folder_type_config.svg",config:"folder_type_config.svg",".config":"folder_type_config.svg",configs:"folder_type_config.svg",".configs":"folder_type_config.svg",configuration:"folder_type_config.svg",".configuration":"folder_type_config.svg",configurations:"folder_type_config.svg",".configurations":"folder_type_config.svg",setting:"folder_type_config.svg",".setting":"folder_type_config.svg",settings:"folder_type_config.svg",".settings":"folder_type_config.svg",ini:"folder_type_config.svg",".ini":"folder_type_config.svg",initializers:"folder_type_config.svg",".initializers":"folder_type_config.svg",controller:"folder_type_controller.svg",controllers:"folder_type_controller.svg",".controllers":"folder_type_controller.svg",handlers:"folder_type_controller.svg",".handlers":"folder_type_controller.svg",coverage:"folder_type_coverage.svg",css:"folder_type_css.svg",_css:"folder_type_css.svg",cubits:"folder_type_cubit.svg",cubit:"folder_type_cubit.svg",cypress:"folder_type_cypress.svg",".dapr":"folder_type_dapr.svg",dapr:"folder_type_dapr.svg",db:"folder_type_db.svg",database:"folder_type_db.svg",sql:"folder_type_db.svg",data:"folder_type_db.svg",repo:"folder_type_db.svg",repository:"folder_type_db.svg",repositories:"folder_type_db.svg",debian:"folder_type_debian.svg",deb:"folder_type_debian.svg",".dependabot":"folder_type_dependabot.svg",".devcontainer":"folder_type_devcontainer.svg",dist:"folder_type_dist.svg",".dist":"folder_type_dist.svg",dists:"folder_type_dist.svg",out:"folder_type_dist.svg",outs:"folder_type_dist.svg",export:"folder_type_dist.svg",exports:"folder_type_dist.svg",build:"folder_type_dist.svg",".build":"folder_type_dist.svg",builds:"folder_type_dist.svg",release:"folder_type_dist.svg",releases:"folder_type_dist.svg",target:"folder_type_dist.svg",targets:"folder_type_dist.svg",docker:"folder_type_docker.svg",".docker":"folder_type_docker.svg",docs:"folder_type_docs.svg",doc:"folder_type_docs.svg",e2e:"folder_type_e2e.svg",".elasticbeanstalk":"folder_type_elasticbeanstalk.svg",".ebextensions":"folder_type_elasticbeanstalk.svg",electron:"folder_type_light_electron.svg",".expo":"folder_type_light_expo.svg",".expo-shared":"folder_type_light_expo.svg",favicon:"folder_type_favicon.svg",favicons:"folder_type_favicon.svg",flow:"folder_type_flow.svg","flow-typed":"folder_type_flow.svg",fonts:"folder_type_light_fonts.svg",font:"folder_type_light_fonts.svg",fnt:"folder_type_light_fonts.svg",gcp:"folder_type_gcp.svg",".gcp":"folder_type_gcp.svg",".git":"folder_type_git.svg",submodules:"folder_type_git.svg",".submodules":"folder_type_git.svg",".github":"folder_type_github.svg",".gitlab":"folder_type_gitlab.svg",gradle:"folder_type_light_gradle.svg",".gradle":"folder_type_light_gradle.svg",graphql:"folder_type_graphql.svg",grunt:"folder_type_grunt.svg",gulp:"folder_type_gulp.svg","gulpfile.js":"folder_type_gulp.svg","gulpfile.coffee":"folder_type_gulp.svg","gulpfile.ts":"folder_type_gulp.svg","gulpfile.babel.js":"folder_type_gulp.svg","gulpfile.babel.coffee":"folder_type_gulp.svg","gulpfile.babel.ts":"folder_type_gulp.svg",".haxelib":"folder_type_haxelib.svg",haxe_libraries:"folder_type_haxelib.svg",helper:"folder_type_helper.svg",".helper":"folder_type_helper.svg",helpers:"folder_type_helper.svg",".helpers":"folder_type_helper.svg",hook:"folder_type_hook.svg",".hook":"folder_type_hook.svg",hooks:"folder_type_hook.svg",".hooks":"folder_type_hook.svg",".husky":"folder_type_husky.svg",".idea":"folder_type_idea.svg",images:"folder_type_images.svg",image:"folder_type_images.svg",img:"folder_type_images.svg",icons:"folder_type_images.svg",icon:"folder_type_images.svg",ico:"folder_type_images.svg",screenshot:"folder_type_images.svg",screenshots:"folder_type_images.svg",svg:"folder_type_images.svg",include:"folder_type_include.svg",includes:"folder_type_include.svg",incl:"folder_type_include.svg",inc:"folder_type_include.svg",".include":"folder_type_include.svg",".includes":"folder_type_include.svg",".incl":"folder_type_include.svg",".inc":"folder_type_include.svg",_include:"folder_type_include.svg",_includes:"folder_type_include.svg",_incl:"folder_type_include.svg",_inc:"folder_type_include.svg",interface:"folder_type_interfaces.svg",interfaces:"folder_type_interfaces.svg",ios:"folder_type_ios.svg",js:"folder_type_js.svg",json:"folder_type_json.svg",kubernetes:"folder_type_kubernetes.svg",k8s:"folder_type_kubernetes.svg",kube:"folder_type_kubernetes.svg",kuber:"folder_type_kubernetes.svg",".kubernetes":"folder_type_kubernetes.svg",".k8s":"folder_type_kubernetes.svg",".kube":"folder_type_kubernetes.svg",".kuber":"folder_type_kubernetes.svg",less:"folder_type_less.svg",_less:"folder_type_less.svg",lib:"folder_type_library.svg",libs:"folder_type_library.svg",".lib":"folder_type_library.svg",".libs":"folder_type_library.svg",library:"folder_type_library.svg",libraries:"folder_type_library.svg",linux:"folder_type_linux.svg",lang:"folder_type_locale.svg",language:"folder_type_locale.svg",languages:"folder_type_locale.svg",locale:"folder_type_locale.svg",locales:"folder_type_locale.svg",_locale:"folder_type_locale.svg",_locales:"folder_type_locale.svg",internationalization:"folder_type_locale.svg",globalization:"folder_type_locale.svg",localization:"folder_type_locale.svg",i18n:"folder_type_locale.svg",g11n:"folder_type_locale.svg",l10n:"folder_type_locale.svg",log:"folder_type_log.svg",logs:"folder_type_log.svg",macos:"folder_type_macos.svg",darwin:"folder_type_macos.svg",mariadb:"folder_type_mariadb.svg",maria:"folder_type_mariadb.svg",".mvn":"folder_type_maven.svg",memcached:"folder_type_memcached.svg",".memcached":"folder_type_memcached.svg",".meteor":"folder_type_light_meteor.svg",middleware:"folder_type_middleware.svg",middlewares:"folder_type_middleware.svg",minikube:"folder_type_minikube.svg",minik8s:"folder_type_minikube.svg",minikuber:"folder_type_minikube.svg",mjml:"folder_type_mjml.svg",".mjml":"folder_type_mjml.svg",mocks:"folder_type_mock.svg",".mocks":"folder_type_mock.svg",__mocks__:"folder_type_mock.svg",model:"folder_type_model.svg",".model":"folder_type_model.svg",models:"folder_type_model.svg",".models":"folder_type_model.svg",entities:"folder_type_model.svg",".entities":"folder_type_model.svg",modules:"folder_type_module.svg",mongodb:"folder_type_mongodb.svg",mongo:"folder_type_mongodb.svg",mysqldb:"folder_type_light_mysql.svg",mysql:"folder_type_light_mysql.svg",".next":"folder_type_next.svg",nginx:"folder_type_nginx.svg","conf.d":"folder_type_nginx.svg",node_modules:"folder_type_light_node.svg",notification:"folder_type_notification.svg",notifications:"folder_type_notification.svg",event:"folder_type_notification.svg",events:"folder_type_notification.svg",".nuget":"folder_type_nuget.svg",".nuxt":"folder_type_nuxt.svg",package:"folder_type_package.svg",packages:"folder_type_package.svg",".package":"folder_type_package.svg",".packages":"folder_type_package.svg",pkg:"folder_type_package.svg",".paket":"folder_type_paket.svg",php:"folder_type_php.svg",".pio":"folder_type_platformio.svg",".pioenvs":"folder_type_platformio.svg",plugin:"folder_type_plugin.svg",".plugin":"folder_type_plugin.svg",plugins:"folder_type_plugin.svg",".plugins":"folder_type_plugin.svg",extension:"folder_type_plugin.svg",".extension":"folder_type_plugin.svg",extensions:"folder_type_plugin.svg",".extensions":"folder_type_plugin.svg",private:"folder_type_private.svg",".private":"folder_type_private.svg",public:"folder_type_public.svg",".public":"folder_type_public.svg",".venv":"folder_type_python.svg",".virtualenv":"folder_type_python.svg",ravendb:"folder_type_ravendb.svg",redis:"folder_type_redis.svg",redux:"folder_type_light_redux.svg",route:"folder_type_route.svg",routes:"folder_type_route.svg",_route:"folder_type_route.svg",_routes:"folder_type_route.svg",routers:"folder_type_route.svg",sass:"folder_type_light_sass.svg",scss:"folder_type_light_sass.svg",_sass:"folder_type_light_sass.svg",_scss:"folder_type_light_sass.svg",script:"folder_type_script.svg",scripts:"folder_type_script.svg",server:"folder_type_server.svg",service:"folder_type_services.svg",services:"folder_type_services.svg",src:"folder_type_src.svg",source:"folder_type_src.svg",sources:"folder_type_src.svg",sso:"folder_type_sso.svg",story:"folder_type_story.svg",stories:"folder_type_story.svg",__stories__:"folder_type_story.svg",".storybook":"folder_type_story.svg",style:"folder_type_style.svg",styles:"folder_type_style.svg",temp:"folder_type_temp.svg",".temp":"folder_type_temp.svg",tmp:"folder_type_temp.svg",".tmp":"folder_type_temp.svg",template:"folder_type_template.svg",".template":"folder_type_template.svg",templates:"folder_type_template.svg",".templates":"folder_type_template.svg",tests:"folder_type_test.svg",".tests":"folder_type_test.svg",test:"folder_type_test.svg",".test":"folder_type_test.svg",__tests__:"folder_type_test.svg",__test__:"folder_type_test.svg",spec:"folder_type_test.svg",".spec":"folder_type_test.svg",specs:"folder_type_test.svg",".specs":"folder_type_test.svg",integration:"folder_type_test.svg",theme:"folder_type_theme.svg",themes:"folder_type_theme.svg",tool:"folder_type_tools.svg",tools:"folder_type_tools.svg",".tools":"folder_type_tools.svg",util:"folder_type_tools.svg",utils:"folder_type_tools.svg",".travis":"folder_type_travis.svg",typescript:"folder_type_typescript.svg",ts:"folder_type_typescript.svg",typings:"folder_type_typings.svg","@types":"folder_type_typings.svg",vagrant:"folder_type_vagrant.svg",".vagrant":"folder_type_vagrant.svg",video:"folder_type_video.svg",".video":"folder_type_video.svg",videos:"folder_type_video.svg",".videos":"folder_type_video.svg",html:"folder_type_view.svg",view:"folder_type_view.svg",views:"folder_type_view.svg",layout:"folder_type_view.svg",layouts:"folder_type_view.svg",page:"folder_type_view.svg",pages:"folder_type_view.svg",_view:"folder_type_view.svg",_views:"folder_type_view.svg",_layout:"folder_type_view.svg",_layouts:"folder_type_view.svg",_page:"folder_type_view.svg",_pages:"folder_type_view.svg",".vs":"folder_type_vs.svg",".vscode":"folder_type_vscode.svg",vscode:"folder_type_vscode.svg",".vscode-test":"folder_type_vscode_test.svg",webpack:"folder_type_webpack.svg",windows:"folder_type_windows.svg",win32:"folder_type_windows.svg",www:"folder_type_www.svg",wwwroot:"folder_type_www.svg"}),nb}var rb={},Oz;function h9e(){return Oz||(Oz=1,Object.defineProperty(rb,"__esModule",{value:!0}),rb.LanguagesToIcon=void 0,rb.LanguagesToIcon={as:"file_type_actionscript.svg",ada:"file_type_light_ada.svg",prw:"file_type_advpl.svg",affect:"file_type_affectscript.svg",al:"file_type_al.svg",ansible:"file_type_ansible.svg",g4:"file_type_antlr.svg",any:"file_type_anyscript.svg",cls:"file_type_apex.svg",apl:"file_type_light_apl.svg",applescript:"file_type_applescript.svg",adoc:"file_type_asciidoc.svg",asp:"file_type_asp.svg",ats:"file_type_ats.svg",au3:"file_type_autoit.svg",avcs:"file_type_avro.svg",azcli:"file_type_azure.svg",bal:"file_type_ballerina.svg",bat:"file_type_bat.svg",cmd:"file_type_bat.svg",bats:"file_type_bats.svg",bzl:"file_type_bazel.svg",bf:"file_type_befunge.svg",bicep:"file_type_bicep.svg",bib:"file_type_light_tex.svg",biml:"file_type_biml.svg","blade.php":"file_type_blade.svg",blitzbasic:"file_type_blitzbasic.svg",bolt:"file_type_bolt.svg",bsq:"file_type_bosque.svg",c:"file_type_c.svg",cabal:"file_type_cabal.svg",Caddyfile:"file_type_caddy.svg",casc:"file_type_casc.svg",cddl:"file_type_cddl.svg",ceylon:"file_type_ceylon.svg",cfc:"file_type_cfc.svg",clj:"file_type_clojure.svg",cljs:"file_type_clojure.svg",cljc:"file_type_clojure.svg",cljx:"file_type_clojure.svg",clojure:"file_type_clojure.svg",edn:"file_type_clojure.svg",clojurescript:"file_type_clojurescript.svg",cmake:"file_type_cmake.svg",cbl:"file_type_cobol.svg",coffee:"file_type_coffeescript.svg",cson:"file_type_coffeescript.svg",confluence:"file_type_confluence.svg",ckbk:"file_type_chef_cookbook.svg",cpp:"file_type_cpp.svg",cc:"file_type_cpp.svg",cxx:"file_type_cpp.svg",hpp:"file_type_cpp.svg",hh:"file_type_cpp.svg",hxx:"file_type_cpp.svg",h:"file_type_cpp.svg",ino:"file_type_cpp.svg",inl:"file_type_cpp.svg",ipp:"file_type_cpp.svg",cr:"file_type_light_crystal.svg",cs:"file_type_csharp.svg",csx:"file_type_csharp.svg",cake:"file_type_csharp.svg",css:"file_type_css.svg",cu:"file_type_cuda.svg",pyx:"file_type_cython.svg",dal:"file_type_dal.svg",dart:"file_type_dartlang.svg",diff:"file_type_diff.svg",patch:"file_type_diff.svg",rej:"file_type_diff.svg",dockerfile:"file_type_docker.svg",dtx:"file_type_light_tex.svg",env:"file_type_light_config.svg",dot:"file_type_dotjs.svg",dox:"file_type_doxygen.svg",drl:"file_type_drools.svg",dust:"file_type_dustjs.svg",edge:"file_type_edge.svg",eex:"file_type_eex.svg",ex:"file_type_elixir.svg",elm:"file_type_elm.svg",erb:"file_type_erb.svg",erl:"file_type_erlang.svg",falcon:"file_type_falcon.svg",fs:"file_type_fsharp.svg",fsi:"file_type_fsharp.svg",fsx:"file_type_fsharp.svg",fsscript:"file_type_fsharp.svg",fthtml:"file_type_fthtml.svg",gspec:"file_type_galen.svg",gcode:"file_type_gcode.svg",gen:"file_type_genstat.svg",glsl:"file_type_glsl.svg",glyphs:"file_type_glyphs.svg",gp:"file_type_gnuplot.svg",go:"file_type_go.svg",gql:"file_type_graphql.svg",groovy:"file_type_groovy.svg",gvy:"file_type_groovy.svg",gradle:"file_type_groovy.svg",haml:"file_type_haml.svg",handlebars:"file_type_handlebars.svg",hbs:"file_type_handlebars.svg",hjs:"file_type_handlebars.svg",prg:"file_type_harbour.svg",hs:"file_type_haskell.svg",haxe:"file_type_haxe.svg","helm.tpl":"file_type_helm.svg",hjson:"file_type_light_hjson.svg",hlsl:"file_type_hlsl.svg",hlsli:"file_type_hlsl.svg",fx:"file_type_hlsl.svg",fxh:"file_type_hlsl.svg",vsh:"file_type_hlsl.svg",psh:"file_type_hlsl.svg",cginc:"file_type_hlsl.svg",compute:"file_type_hlsl.svg",hosts:"file_type_host.svg",html:"file_type_html.svg",htm:"file_type_html.svg",shtml:"file_type_html.svg",xhtml:"file_type_html.svg",mdoc:"file_type_html.svg",jsp:"file_type_html.svg",aspx:"file_type_html.svg",jshtm:"file_type_html.svg",volt:"file_type_html.svg",ejs:"file_type_html.svg",rhtml:"file_type_html.svg",http:"file_type_http.svg",hy:"file_type_hy.svg",hypr:"file_type_hypr.svg",icl:"file_type_icl.svg",imba:"file_type_imba.svg",properties:"file_type_light_ini.svg",gitconfig:"file_type_light_ini.svg",cfg:"file_type_light_ini.svg",conf:"file_type_light_ini.svg",ink:"file_type_ink.svg",iss:"file_type_innosetup.svg",io:"file_type_light_io.svg",janet:"file_type_janet.svg",java:"file_type_java.svg",jav:"file_type_java.svg",js:"file_type_light_js.svg",es6:"file_type_light_js.svg",mjs:"file_type_light_js.svg",pac:"file_type_light_js.svg",jsx:"file_type_reactjs.svg",jekyll:"file_type_jekyll.svg",json:"file_type_light_json.svg",bowerrc:"file_type_light_json.svg",jshintrc:"file_type_light_json.svg",jscsrc:"file_type_light_json.svg",eslintrc:"file_type_light_json.svg",babelrc:"file_type_light_json.svg",webmanifest:"file_type_light_json.svg",jsonc:"file_type_light_json.svg",jsonnet:"file_type_jsonnet.svg",json5:"file_type_light_json5.svg",jl:"file_type_julia.svg",id:"file_type_iodine.svg",kv:"file_type_kivy.svg",ks:"file_type_kos.svg",kt:"file_type_kotlin.svg",".kusto":"file_type_kusto.svg",tex:"file_type_light_tex.svg",lat:"file_type_latino.svg",less:"file_type_less.svg",flex:"file_type_lex.svg",lisp:"file_type_lisp.svg",log:"file_type_log.svg",lol:"file_type_lolcode.svg",lsl:"file_type_lsl.svg",lua:"file_type_lua.svg",mk:"file_type_makefile.svg",md:"file_type_markdown.svg",mdown:"file_type_markdown.svg",markdown:"file_type_markdown.svg",markdn:"file_type_markdown.svg",marko:"file_type_marko.svg",mat:"file_type_matlab.svg",ms:"file_type_maxscript.svg",mdx:"file_type_light_mdx.svg",mediawiki:"file_type_mediawiki.svg",mel:"file_type_maya.svg","meson.build":"file_type_meson.svg",mjml:"file_type_mjml.svg",ep:"file_type_mojolicious.svg",mongo:"file_type_mongo.svg",mson:"file_type_mson.svg",ne:"file_type_nearly.svg",nim:"file_type_nim.svg",nimble:"file_type_nimble.svg",nix:"file_type_nix.svg",nsi:"file_type_nsi.svg",nunjucks:"file_type_nunjucks.svg",ml:"file_type_ocaml.svg",o3:"file_type_ogone.svg",pas:"file_type_delphi.svg",pddl:"file_type_pddl.svg",pl:"file_type_perl.svg",pm:"file_type_perl.svg",pod:"file_type_perl.svg",t:"file_type_perl.svg",PL:"file_type_perl.svg",psgi:"file_type_perl.svg",p6:"file_type_perl.svg",pl6:"file_type_perl.svg",pm6:"file_type_perl.svg",nqp:"file_type_perl.svg",pgsql:"file_type_pgsql.svg",php:"file_type_php.svg",php4:"file_type_php.svg",php5:"file_type_php.svg",phtml:"file_type_php.svg",ctp:"file_type_php.svg",pine:"file_type_pine.svg",txt:"file_type_text.svg",ddl:"file_type_plsql.svg",polymer:"file_type_polymer.svg",pony:"file_type_pony.svg",pcss:"file_type_postcss.svg",ps1:"file_type_powershell.svg",psm1:"file_type_powershell.svg",psd1:"file_type_powershell.svg",pssc:"file_type_powershell.svg",psrc:"file_type_powershell.svg",prisma:"file_type_light_prisma.svg",pro:"file_type_prolog.svg",rules:"file_type_prometheus.svg",pp:"file_type_puppet.svg",purs:"file_type_light_purescript.svg",arr:"file_type_pyret.svg",py:"file_type_python.svg",rpy:"file_type_python.svg",pyw:"file_type_python.svg",cpy:"file_type_python.svg",gyp:"file_type_python.svg",gypi:"file_type_python.svg",qvs:"file_type_qlikview.svg",qml:"file_type_qml.svg",qs:"file_type_qsharp.svg",r:"file_type_r.svg",rhistory:"file_type_r.svg",rprofile:"file_type_r.svg",rt:"file_type_r.svg",rkt:"file_type_racket.svg",cshtml:"file_type_razor.svg",raml:"file_type_raml.svg",re:"file_type_reason.svg",red:"file_type_red.svg",res:"file_type_rescript.svg",rst:"file_type_rest.svg",rex:"file_type_rexx.svg",tag:"file_type_riot.svg",rmd:"file_type_rmd.svg",robot:"file_type_robotframework.svg",rb:"file_type_ruby.svg",rbx:"file_type_ruby.svg",rjs:"file_type_ruby.svg",gemspec:"file_type_ruby.svg",rake:"file_type_ruby.svg",ru:"file_type_ruby.svg",rs:"file_type_light_rust.svg",san:"file_type_san.svg",sbt:"file_type_sbt.svg",scad:"file_type_openscad.svg",scala:"file_type_scala.svg",sce:"file_type_scilab.svg",scss:"file_type_scss.svg",shader:"file_type_light_shaderlab.svg",sh:"file_type_shell.svg",bash:"file_type_shell.svg",bashrc:"file_type_shell.svg",bash_aliases:"file_type_shell.svg",bash_profile:"file_type_shell.svg",bash_login:"file_type_shell.svg",ebuild:"file_type_shell.svg",install:"file_type_shell.svg",profile:"file_type_shell.svg",bash_logout:"file_type_shell.svg",zsh:"file_type_shell.svg",zshrc:"file_type_shell.svg",zprofile:"file_type_shell.svg",zlogin:"file_type_shell.svg",zlogout:"file_type_shell.svg",zshenv:"file_type_shell.svg","zsh-theme":"file_type_shell.svg",slang:"file_type_slang.svg",ice:"file_type_slice.svg",slim:"file_type_slim.svg",ss:"file_type_silverstripe.svg",tpl:"file_type_smarty.svg",snort:"file_type_snort.svg",sol:"file_type_light_solidity.svg",rq:"file_type_sparql.svg",sqf:"file_type_sqf.svg",sql:"file_type_sql.svg",dsql:"file_type_sql.svg",nut:"file_type_squirrel.svg",stan:"file_type_stan.svg",bazel:"file_type_bazel.svg",do:"file_type_stata.svg",stencil:"file_type_stencil.svg","st.css":"file_type_stylable.svg",styl:"file_type_light_stylus.svg",svelte:"file_type_svelte.svg",swagger:"file_type_swagger.svg",swift:"file_type_swift.svg",swig:"file_type_swig.svg",sv:"file_type_light_systemverilog.svg",tt:"file_type_t4tt.svg",teal:"file_type_teal.svg",tera:"file_type_tera.svg",tf:"file_type_terraform.svg",sty:"file_type_light_tex.svg",textile:"file_type_textile.svg",Tiltfile:"file_type_tiltfile.svg",toml:"file_type_light_toml.svg",ttcn3:"file_type_ttcn.svg",tuc:"file_type_tuc.svg",twig:"file_type_twig.svg",ts:"file_type_typescript.svg",tsx:"file_type_reactts.svg",vb:"file_type_vb.svg",brs:"file_type_vb.svg",vbs:"file_type_vb.svg",bas:"file_type_vb.svg",wsf:"file_type_script.svg",vm:"file_type_velocity.svg",v:"file_type_verilog.svg",vhdl:"file_type_vhdl.svg",vim:"file_type_vim.svg",vue:"file_type_vue.svg",wasm:"file_type_wasm.svg",wy:"file_type_wenyan.svg",wl:"file_type_wolfram.svg",wurst:"file_type_wurst.svg","xmake.lua":"file_type_xmake.svg",xml:"file_type_xml.svg",xsd:"file_type_xml.svg",ascx:"file_type_xml.svg",atom:"file_type_xml.svg",axml:"file_type_xml.svg",bpmn:"file_type_xml.svg",config:"file_type_xml.svg",cpt:"file_type_xml.svg",csl:"file_type_xml.svg",csproj:"file_type_xml.svg","csproj.user":"file_type_xml.svg",dita:"file_type_xml.svg",ditamap:"file_type_xml.svg",dtd:"file_type_xml.svg",dtml:"file_type_xml.svg",fsproj:"file_type_xml.svg",fxml:"file_type_xml.svg",iml:"file_type_xml.svg",isml:"file_type_xml.svg",jmx:"file_type_xml.svg",launch:"file_type_xml.svg",menu:"file_type_xml.svg",mxml:"file_type_xml.svg",nuspec:"file_type_xml.svg",opml:"file_type_xml.svg",owl:"file_type_xml.svg",proj:"file_type_xml.svg",props:"file_type_xml.svg",pt:"file_type_xml.svg",publishsettings:"file_type_xml.svg",pubxml:"file_type_xml.svg","pubxml.user":"file_type_xml.svg",rdf:"file_type_xml.svg",rng:"file_type_xml.svg",rss:"file_type_xml.svg",shproj:"file_type_xml.svg",storyboard:"file_type_xml.svg",svg:"file_type_xml.svg",targets:"file_type_xml.svg",tld:"file_type_xml.svg",tmx:"file_type_xml.svg",vbproj:"file_type_xml.svg","vbproj.user":"file_type_xml.svg",vcxproj:"file_type_xml.svg","vcxproj.filters":"file_type_xml.svg",wsdl:"file_type_xml.svg",wxi:"file_type_xml.svg",wxl:"file_type_xml.svg",wxs:"file_type_xml.svg",xaml:"file_type_xml.svg",xbl:"file_type_xml.svg",xib:"file_type_xml.svg",xlf:"file_type_xml.svg",xliff:"file_type_xml.svg",xpdl:"file_type_xml.svg",xul:"file_type_xml.svg",xoml:"file_type_xml.svg",xquery:"file_type_xquery.svg",xsl:"file_type_xsl.svg",xslt:"file_type_xsl.svg",bison:"file_type_yacc.svg",eyaml:"file_type_light_yaml.svg",eyml:"file_type_light_yaml.svg",yaml:"file_type_light_yaml.svg",yml:"file_type_light_yaml.svg",yang:"file_type_yang.svg",zig:"file_type_zig.svg"}),rb}var Rz;function f9e(){return Rz||(Rz=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getIconForOpenFolder=e.getIconForFile=e.getIconForFolder=e.DEFAULT_FILE=e.DEFAULT_ROOT_OPENED=e.DEFAULT_ROOT=e.DEFAULT_FOLDER_OPENED=e.DEFAULT_FOLDER=void 0;var n=l9e(),r=c9e(),i=u9e(),s=d9e(),a=h9e();e.DEFAULT_FOLDER="default_folder.svg",e.DEFAULT_FOLDER_OPENED="default_folder_opened.svg",e.DEFAULT_ROOT="default_root_folder.svg",e.DEFAULT_ROOT_OPENED="default_root_folder_opened.svg",e.DEFAULT_FILE="default_file.svg";function o(f){var m=s.FolderNamesToIcon[f];return m||e.DEFAULT_FOLDER}e.getIconForFolder=o;var l=void 0,u=void 0;function d(f){var m=i.FileNamesToIcon[f];if(m!==void 0)return m;var x=f.split(".");if(x.length>2){var v=x.pop(),_=x.pop(),w=r.FileExtensions2ToIcon[_+"."+v];if(w!==void 0)return w;if(!v)return e.DEFAULT_FILE;if(v===l)return u;var S=n.FileExtensions1ToIcon[v];if(S!==void 0)return l=v,u=S,S}else{var C=x.pop();if(!C)return e.DEFAULT_FILE;if(C===l)return u;var j=n.FileExtensions1ToIcon[C];if(j!==void 0)return l=C,u=j,j}var T=f.split(".").pop();if(T!==void 0){var E=a.LanguagesToIcon[T];if(E)return E}return e.DEFAULT_FILE}e.getIconForFile=d;function h(f){return o(f).split(".").shift()+"_opened.svg"}e.getIconForOpenFolder=h})(NT)),NT}var md=f9e();const iie="https://cdn.jsdelivr.net/gh/vscode-icons/vscode-icons@12.9.0/icons/";function pa({filename:e,className:n}){const r=md.getIconForFile(e)??md.DEFAULT_FILE;return c.jsx("img",{src:`${iie}${r}`,alt:"",className:n,loading:"lazy",decoding:"async",draggable:!1})}function V4({name:e,open:n=!1,className:r}){const i=n?md.getIconForOpenFolder(e)??md.DEFAULT_FOLDER_OPENED:md.getIconForFolder(e)??md.DEFAULT_FOLDER;return c.jsx("img",{src:`${iie}${i}`,alt:"",className:r,loading:"lazy",decoding:"async",draggable:!1})}function sie(){const[e,n]=y.useState(()=>typeof document<"u"&&document.documentElement.classList.contains("dark")?"dark":"light");return y.useEffect(()=>{const r=document.documentElement,i=()=>n(r.classList.contains("dark")?"dark":"light");i();const s=new MutationObserver(i);return s.observe(r,{attributes:!0,attributeFilter:["class"]}),()=>s.disconnect()},[]),e}const aie=Object.freeze(JSON.parse('{"colors":{"actionBar.toggledBackground":"#383a49","activityBarBadge.background":"#007ACC","checkbox.border":"#6B6B6B","editor.background":"#1E1E1E","editor.foreground":"#D4D4D4","editor.inactiveSelectionBackground":"#3A3D41","editor.selectionHighlightBackground":"#ADD6FF26","editorIndentGuide.activeBackground1":"#707070","editorIndentGuide.background1":"#404040","input.placeholderForeground":"#A6A6A6","list.activeSelectionIconForeground":"#FFF","list.dropBackground":"#383B3D","menu.background":"#252526","menu.border":"#454545","menu.foreground":"#CCCCCC","menu.selectionBackground":"#0078d4","menu.separatorBackground":"#454545","ports.iconRunningProcessForeground":"#369432","sideBarSectionHeader.background":"#0000","sideBarSectionHeader.border":"#ccc3","sideBarTitle.foreground":"#BBBBBB","statusBarItem.remoteBackground":"#16825D","statusBarItem.remoteForeground":"#FFF","tab.lastPinnedBorder":"#ccc3","tab.selectedBackground":"#222222","tab.selectedForeground":"#ffffffa0","terminal.inactiveSelectionBackground":"#3A3D41","widget.border":"#303031"},"displayName":"Dark Plus","name":"dark-plus","semanticHighlighting":true,"semanticTokenColors":{"customLiteral":"#DCDCAA","newOperator":"#C586C0","numberLiteral":"#b5cea8","stringLiteral":"#ce9178"},"tokenColors":[{"scope":["meta.embedded","source.groovy.embedded","string meta.image.inline.markdown","variable.legacy.builtin.python"],"settings":{"foreground":"#D4D4D4"}},{"scope":"emphasis","settings":{"fontStyle":"italic"}},{"scope":"strong","settings":{"fontStyle":"bold"}},{"scope":"header","settings":{"foreground":"#000080"}},{"scope":"comment","settings":{"foreground":"#6A9955"}},{"scope":"constant.language","settings":{"foreground":"#569cd6"}},{"scope":["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],"settings":{"foreground":"#b5cea8"}},{"scope":"constant.regexp","settings":{"foreground":"#646695"}},{"scope":"entity.name.tag","settings":{"foreground":"#569cd6"}},{"scope":["entity.name.tag.css","entity.name.tag.less"],"settings":{"foreground":"#d7ba7d"}},{"scope":"entity.other.attribute-name","settings":{"foreground":"#9cdcfe"}},{"scope":["entity.other.attribute-name.class.css","source.css entity.other.attribute-name.class","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.parent.less","source.css entity.other.attribute-name.pseudo-class","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],"settings":{"foreground":"#d7ba7d"}},{"scope":"invalid","settings":{"foreground":"#f44747"}},{"scope":"markup.underline","settings":{"fontStyle":"underline"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#569cd6"}},{"scope":"markup.heading","settings":{"fontStyle":"bold","foreground":"#569cd6"}},{"scope":"markup.italic","settings":{"fontStyle":"italic"}},{"scope":"markup.strikethrough","settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inserted","settings":{"foreground":"#b5cea8"}},{"scope":"markup.deleted","settings":{"foreground":"#ce9178"}},{"scope":"markup.changed","settings":{"foreground":"#569cd6"}},{"scope":"punctuation.definition.quote.begin.markdown","settings":{"foreground":"#6A9955"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#6796e6"}},{"scope":"markup.inline.raw","settings":{"foreground":"#ce9178"}},{"scope":"punctuation.definition.tag","settings":{"foreground":"#808080"}},{"scope":["meta.preprocessor","entity.name.function.preprocessor"],"settings":{"foreground":"#569cd6"}},{"scope":"meta.preprocessor.string","settings":{"foreground":"#ce9178"}},{"scope":"meta.preprocessor.numeric","settings":{"foreground":"#b5cea8"}},{"scope":"meta.structure.dictionary.key.python","settings":{"foreground":"#9cdcfe"}},{"scope":"meta.diff.header","settings":{"foreground":"#569cd6"}},{"scope":"storage","settings":{"foreground":"#569cd6"}},{"scope":"storage.type","settings":{"foreground":"#569cd6"}},{"scope":["storage.modifier","keyword.operator.noexcept"],"settings":{"foreground":"#569cd6"}},{"scope":["string","meta.embedded.assembly"],"settings":{"foreground":"#ce9178"}},{"scope":"string.tag","settings":{"foreground":"#ce9178"}},{"scope":"string.value","settings":{"foreground":"#ce9178"}},{"scope":"string.regexp","settings":{"foreground":"#d16969"}},{"scope":["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],"settings":{"foreground":"#569cd6"}},{"scope":["meta.template.expression"],"settings":{"foreground":"#d4d4d4"}},{"scope":["support.type.vendored.property-name","support.type.property-name","source.css variable","source.coffee.embedded"],"settings":{"foreground":"#9cdcfe"}},{"scope":"keyword","settings":{"foreground":"#569cd6"}},{"scope":"keyword.control","settings":{"foreground":"#569cd6"}},{"scope":"keyword.operator","settings":{"foreground":"#d4d4d4"}},{"scope":["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],"settings":{"foreground":"#569cd6"}},{"scope":"keyword.other.unit","settings":{"foreground":"#b5cea8"}},{"scope":["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],"settings":{"foreground":"#569cd6"}},{"scope":"support.function.git-rebase","settings":{"foreground":"#9cdcfe"}},{"scope":"constant.sha.git-rebase","settings":{"foreground":"#b5cea8"}},{"scope":["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],"settings":{"foreground":"#d4d4d4"}},{"scope":"variable.language","settings":{"foreground":"#569cd6"}},{"scope":["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],"settings":{"foreground":"#DCDCAA"}},{"scope":["support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],"settings":{"foreground":"#4EC9B0"}},{"scope":["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class","punctuation.separator.namespace.ruby"],"settings":{"foreground":"#4EC9B0"}},{"scope":["keyword.control","source.cpp keyword.operator.new","keyword.operator.delete","keyword.other.using","keyword.other.directive.using","keyword.other.operator","entity.name.operator"],"settings":{"foreground":"#C586C0"}},{"scope":["variable","meta.definition.variable.name","support.variable","entity.name.variable","constant.other.placeholder"],"settings":{"foreground":"#9CDCFE"}},{"scope":["variable.other.constant","variable.other.enummember"],"settings":{"foreground":"#4FC1FF"}},{"scope":["meta.object-literal.key"],"settings":{"foreground":"#9CDCFE"}},{"scope":["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],"settings":{"foreground":"#CE9178"}},{"scope":["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],"settings":{"foreground":"#CE9178"}},{"scope":["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],"settings":{"foreground":"#d16969"}},{"scope":["keyword.operator.or.regexp","keyword.control.anchor.regexp"],"settings":{"foreground":"#DCDCAA"}},{"scope":"keyword.operator.quantifier.regexp","settings":{"foreground":"#d7ba7d"}},{"scope":["constant.character","constant.other.option"],"settings":{"foreground":"#569cd6"}},{"scope":"constant.character.escape","settings":{"foreground":"#d7ba7d"}},{"scope":"entity.name.label","settings":{"foreground":"#C8C8C8"}}],"type":"dark"}')),p9e=Object.freeze(Object.defineProperty({__proto__:null,default:aie},Symbol.toStringTag,{value:"Module"})),m9e=["editor theme","vscode theme","monaco theme","workbench colors"],TT=new Set,uw="dark-plus",Mz=new WeakSet,Pz=aie,g9e={"editor.background":"#0B0C0E","editorGutter.background":"#0B0C0E","editorStickyScroll.background":"#0B0C0E","editorStickyScrollGutter.background":"#0B0C0E","minimap.background":"#0B0C0E","editor.lineHighlightBackground":"#151922","editorWidget.background":"#16181D","editorHoverWidget.background":"#16181D","editorWidget.border":"#363B44","editorHoverWidget.border":"#363B44","editorGroupHeader.tabsBackground":"#0B0C0E"},y9e={base:"vs-dark",inherit:!1,rules:[...lie(Pz.tokenColors??[]),...k9e()],colors:{...cie(Pz.colors??{}),...g9e}};function x9e(){return m9e}function oie(e){var n,r;(r=(n=e==null?void 0:e.editor)==null?void 0:n.defineTheme)==null||r.call(n,uw,y9e)}function v9e(e){!e||typeof e!="object"||Mz.has(e)||(Mz.add(e),Promise.all([st(()=>import("./index-DRARWPTZ.js"),[],import.meta.url),st(()=>import("./index-BFMMVI_j.js"),[],import.meta.url)]).then(async([{shikiToMonaco:n},{createHighlighter:r}])=>{var l,u,d;const i=e.languages,s=new Set(((l=i==null?void 0:i.getLanguages)==null?void 0:l.call(i).map(h=>h.id))??[]);for(const h of["javascript","typescript","json","css","html","markdown","python","yaml","diff"])s.has(h)||((u=i==null?void 0:i.register)==null||u.call(i,{id:h}),s.add(h));const a=await r({themes:["dark-plus"],langs:["javascript","typescript","jsx","tsx","json","css","html","markdown","python","yaml","diff"]});n(a,e),oie(e);const o=e.editor;typeof document<"u"&&document.documentElement.dataset.monacoTheme===uw&&((d=o==null?void 0:o.setTheme)==null||d.call(o,uw))}).catch(n=>{console.error("Failed to initialize Shiki Monaco Dark Plus theme:",n)}))}function b9e(e){var o;const n=_9e(e.text),r=cie(n.colors??{}),i=j9e(n,r),s=((o=n.name)==null?void 0:o.trim())||e.sourceLabel.trim()||"Imported Theme",a=`jait-vscode-${M9e(s)}-${e.id}`;return{id:e.id,name:s,sourceLabel:e.sourceLabel,importedAt:e.importedAt??new Date().toISOString(),colorMode:i,monacoThemeName:a,monacoThemeData:{base:i==="dark"?"vs-dark":"vs",inherit:!0,rules:lie(n.tokenColors??[]),colors:r},cssVariables:C9e(r),rawColors:r,hasInclude:typeof n.include=="string"&&n.include.trim().length>0}}function _9e(e){const n=R9e(O9e(e)),r=JSON.parse(n);if(!r||typeof r!="object"||Array.isArray(r))throw new Error("Theme file must contain a JSON object.");return r}function w9e(e,n){var r;!n||!((r=e==null?void 0:e.editor)!=null&&r.defineTheme)||e.editor.defineTheme(n.monacoThemeName,n.monacoThemeData)}function S9e(e){if(typeof document>"u")return;const n=document.documentElement;n.classList.toggle("dark",e.colorMode==="dark"),n.dataset.monacoTheme=e.monacoThemeName;for(const r of TT)n.style.removeProperty(r);if(TT.clear(),!!e.theme)for(const[r,i]of Object.entries(e.theme.cssVariables))n.style.setProperty(r,i),TT.add(r)}function lie(e){var r;const n=[];for(const i of e){const s=i.settings??{},a=N9e(i.scope);if(a.length===0)continue;const o=$z(s.foreground),l=$z(s.background),u=((r=s.fontStyle)==null?void 0:r.trim())||void 0;for(const d of a)n.push({token:d,foreground:o,background:l,fontStyle:u})}return n}function k9e(){return[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"F44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"comment",foreground:"6A9955"},{token:"constant",foreground:"569CD6"},{token:"number",foreground:"B5CEA8"},{token:"regexp",foreground:"D16969"},{token:"string",foreground:"CE9178"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.operator",foreground:"D4D4D4"},{token:"keyword.operator.new",foreground:"C586C0"},{token:"operator",foreground:"D4D4D4"},{token:"type",foreground:"4EC9B0"},{token:"type.identifier",foreground:"4EC9B0"},{token:"class",foreground:"4EC9B0"},{token:"interface",foreground:"4EC9B0"},{token:"enum",foreground:"4EC9B0"},{token:"namespace",foreground:"4EC9B0"},{token:"identifier",foreground:"9CDCFE"},{token:"identifier.function",foreground:"DCDCAA"},{token:"function",foreground:"DCDCAA"},{token:"member",foreground:"DCDCAA"},{token:"method",foreground:"DCDCAA"},{token:"property",foreground:"9CDCFE"},{token:"variable",foreground:"9CDCFE"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"parameter",foreground:"9CDCFE"},{token:"delimiter",foreground:"D4D4D4"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"}]}function C9e(e){const n={},r=ri(e,["editor.background","sideBar.background","panel.background"]),i=ri(e,["editor.foreground","foreground"]),s=ri(e,["sideBar.background","panel.background","editorWidget.background"]),a=ri(e,["panel.background","tab.inactiveBackground","editorGroupHeader.tabsBackground"]),o=ri(e,["list.hoverBackground","tab.activeBackground","editor.lineHighlightBackground"]),l=ri(e,["button.background","focusBorder","textLink.foreground"]),u=ri(e,["widget.border","panel.border","sideBar.border","contrastBorder"]);Ni(n,"--background",r),Ni(n,"--foreground",i),Ni(n,"--card",s),Ni(n,"--card-foreground",ri(e,["sideBar.foreground","foreground"])??i),Ni(n,"--popover",ri(e,["editorWidget.background","panel.background"])??s),Ni(n,"--popover-foreground",ri(e,["editorWidget.foreground","foreground"])??i),Ni(n,"--primary",l),Ni(n,"--primary-foreground",Lz(l)),Ni(n,"--secondary",ri(e,["tab.inactiveBackground","panel.background"])??a),Ni(n,"--secondary-foreground",ri(e,["tab.inactiveForeground","foreground"])??i),Ni(n,"--muted",a),Ni(n,"--muted-foreground",ri(e,["descriptionForeground","input.placeholderForeground","disabledForeground"])),Ni(n,"--accent",o),Ni(n,"--accent-foreground",ri(e,["list.activeSelectionForeground","foreground"])??i),Ni(n,"--destructive",ri(e,["inputValidation.errorBackground","errorForeground","list.errorForeground"])),Ni(n,"--destructive-foreground",Lz(ri(e,["inputValidation.errorBackground","errorForeground"]))),Ni(n,"--border",u),Ni(n,"--input",ri(e,["input.background","editorWidget.background","dropdown.background"])??u),Ni(n,"--ring",ri(e,["focusBorder","button.background","textLink.foreground"])??l),Ni(n,"--scrollbar-track",ri(e,["editor.background","sideBar.background","panel.background"])??r),Ni(n,"--scrollbar-thumb",ri(e,["scrollbarSlider.background","scrollbar.shadow"])),Ni(n,"--scrollbar-thumb-hover",ri(e,["scrollbarSlider.hoverBackground","scrollbarSlider.activeBackground","scrollbarSlider.background"])),Ni(n,"--toast-bg",ri(e,["notifications.background","editorWidget.background","panel.background"])??s,!0),Ni(n,"--toast-border",ri(e,["notifications.border","widget.border","panel.border"])??u,!0),Ni(n,"--toast-success-accent",ri(e,["testing.iconPassed","terminal.ansiGreen"])),Ni(n,"--toast-info-accent",ri(e,["textLink.foreground","focusBorder"])??l),Ni(n,"--toast-warning-accent",ri(e,["editorWarning.foreground","terminal.ansiYellow"])),Ni(n,"--toast-error-accent",ri(e,["editorError.foreground","terminal.ansiRed"]));const d=ri(e,["editorGroupHeader.tabsBackground","tab.inactiveBackground","sideBar.background"]);d&&(n["--tab-bg"]=d);const h=ri(e,["activityBarBadge.background","button.background","focusBorder"]),f=ri(e,["textLink.foreground","terminal.ansiBlue"]),m=ri(e,["editorWarning.foreground","terminal.ansiYellow"]),x=ri(e,["terminal.ansiMagenta","badge.background"]);return h&&(n["--ctx-system"]=h),f&&(n["--ctx-history"]=f),m&&(n["--ctx-tool-results"]=m),x&&(n["--ctx-tools"]=x),n}function Ni(e,n,r,i=!1){if(!r)return;const s=T9e(r,i);s&&(e[n]=s)}function Lz(e){const n=D9(e);return n?(.2126*n.r+.7152*n.g+.0722*n.b)/255>.55?"0 0% 7%":"0 0% 100%":null}function j9e(e,n){if(e.type==="light"||e.type==="hc-light")return"light";if(e.type==="dark"||e.type==="hc-dark")return"dark";const r=D9(n["editor.background"]??n["sideBar.background"]??"");return r&&(.2126*r.r+.7152*r.g+.0722*r.b)/255>.55?"light":"dark"}function cie(e){const n={};for(const[r,i]of Object.entries(e))typeof i=="string"&&i.trim()&&(n[r]=i.trim());return n}function N9e(e){return Array.isArray(e)?e.flatMap(n=>n.split(",")).map(n=>n.trim()).filter(Boolean):typeof e!="string"?[]:e.split(",").map(n=>n.trim()).filter(Boolean)}function $z(e){if(!e)return;const n=e.trim();if(n.startsWith("#"))return uie(n).slice(1)}function ri(e,n){for(const r of n){const i=e[r];if(typeof i=="string"&&i.trim())return i.trim()}return null}function T9e(e,n=!1){const r=D9(e);if(!r)return null;const i=r.r/255,s=r.g/255,a=r.b/255,o=Math.max(i,s,a),l=Math.min(i,s,a),u=o-l,d=(o+l)/2;let h=0;u!==0&&(o===i?h=(s-a)/u%6:o===s?h=(a-i)/u+2:h=(i-s)/u+4,h*=60),h<0&&(h+=360);const f=u===0?0:u/(1-Math.abs(2*d-1)),m=`${Math.round(h)} ${Math.round(f*100)}% ${Math.round(d*100)}%`;return n&&r.a<1?`${m} / ${Number(r.a.toFixed(3))}`:m}function D9(e){if(!e)return null;const n=e.trim();if(!n)return null;if(n.startsWith("#"))return E9e(n);const r=n.match(/^rgba?\(([^)]+)\)$/i);if(!r)return null;const i=r[1].split(",").map(u=>u.trim());if(i.length<3)return null;const s=ET(i[0]),a=ET(i[1]),o=ET(i[2]),l=i[3]==null?1:A9e(i[3]);return s==null||a==null||o==null||l==null?null:{r:s,g:a,b:o,a:l}}function E9e(e){const n=uie(e).slice(1);return n.length===6?{r:Number.parseInt(n.slice(0,2),16),g:Number.parseInt(n.slice(2,4),16),b:Number.parseInt(n.slice(4,6),16),a:1}:n.length===8?{r:Number.parseInt(n.slice(0,2),16),g:Number.parseInt(n.slice(2,4),16),b:Number.parseInt(n.slice(4,6),16),a:Number.parseInt(n.slice(6,8),16)/255}:null}function ET(e){if(e.endsWith("%")){const r=Number.parseFloat(e.slice(0,-1));return Number.isFinite(r)?Dz(Math.round(r/100*255)):null}const n=Number.parseFloat(e);return Number.isFinite(n)?Dz(Math.round(n)):null}function A9e(e){const n=Number.parseFloat(e);return Number.isFinite(n)?Math.max(0,Math.min(1,n)):null}function Dz(e){return Math.max(0,Math.min(255,e))}function uie(e){const n=e.trim().slice(1);return n.length===3||n.length===4?`#${n.split("").map(r=>`${r}${r}`).join("").toLowerCase()}`:`#${n.toLowerCase()}`}function O9e(e){let n="",r=!1,i=!1,s=!1,a=!1;for(let o=0;o<e.length;o+=1){const l=e[o],u=e[o+1];if(i){l===`
|
|
1126
|
+
*/let dO=!1;const s9e=.1,a9e=20;function jT(e){return Math.min(a9e,Math.max(s9e,e))}function Cz(e,n,r,i){if(e===n)return r;const s=n/e;return{x:i.x-(i.x-r.x)*s,y:i.y-(i.y-r.y)*s}}function jz(e){uO.initialize({startOnLoad:!1,theme:e==="dark"?"dark":"default",securityLevel:"strict",fontFamily:"ui-sans-serif, system-ui, -apple-system, sans-serif",flowchart:{htmlLabels:!0,curve:"basis"},themeVariables:e==="dark"?{primaryColor:"#1e293b",primaryTextColor:"#e2e8f0",primaryBorderColor:"#475569",lineColor:"#64748b",secondaryColor:"#334155",tertiaryColor:"#1e293b",background:"#0f172a",mainBkg:"#1e293b",nodeBorder:"#475569",clusterBkg:"#1e293b",clusterBorder:"#334155",titleColor:"#e2e8f0",edgeLabelBackground:"#1e293b"}:{}}),dO=!0}function hO({diagram:e,isGenerating:n,onRegenerate:r,onGenerate:i,theme:s="dark",onRenderResult:a}){const o=y.useRef(null),l=y.useRef(null),[u,d]=y.useState(null),[h,f]=y.useState(!1),[m,x]=y.useState(1),[v,_]=y.useState({x:0,y:0}),w=y.useRef(0),S=y.useRef(new Map),C=y.useRef(null),j=y.useRef(null),T=y.useCallback(async $=>{if(!o.current)return;const O=++w.current;try{if(dO||jz(s),!await uO.parse($)||O!==w.current)return;const{svg:M}=await uO.render(`arch-${O}`,$);if(O!==w.current)return;o.current.innerHTML=M;const L=o.current.querySelector("svg"),z=l.current;if(L&&z){const G=z.clientWidth,V=z.clientHeight,F=L.width.baseVal.value||L.getBoundingClientRect().width,X=L.height.baseVal.value||L.getBoundingClientRect().height;if(F>0&&X>0&&G>0&&V>0){const ee=Math.min((G-32)/F,(V-32)/X);x(jT(ee))}else x(1)}else x(1);_({x:0,y:0}),d(null),a==null||a({ok:!0})}catch(B){if(O!==w.current)return;const M=B instanceof Error?B.message:"Failed to render diagram";d(M),a==null||a({ok:!1,error:M})}},[a,s]);y.useEffect(()=>{jz(s),dO=!0,e&&T(e)},[s,e,T]),y.useEffect(()=>{e&&T(e)},[e,T]);const E=y.useCallback(()=>{e&&navigator.clipboard.writeText(e).then(()=>{f(!0),setTimeout(()=>f(!1),2e3)})},[e]),N=y.useCallback(()=>{if(!o.current)return;const $=o.current.querySelector("svg");if(!$)return;const O=new XMLSerializer().serializeToString($),B=new Blob([O],{type:"image/svg+xml"}),M=URL.createObjectURL(B),L=document.createElement("a");L.href=M,L.download="architecture.svg",L.click(),URL.revokeObjectURL(M)},[]),R=y.useCallback(($,O)=>{var M;const B=(M=l.current)==null?void 0:M.getBoundingClientRect();return B?{x:$-B.left-B.width/2,y:O-B.top-B.height/2}:null},[]),D=y.useCallback(($,O)=>{x(B=>{const M=jT($);return M===B?B:(_(L=>O?Cz(B,M,L,O):L),M)})},[]),U=y.useCallback($=>{const O=R($.clientX,$.clientY);if(!O)return;$.preventDefault();const B=$.deltaY<0?1.1:.9;D(m*B,O)},[R,D,m]),H=y.useCallback($=>{const O={x:$.clientX,y:$.clientY};if(S.current.set($.pointerId,O),$.currentTarget.setPointerCapture($.pointerId),S.current.size===1){C.current={pointerId:$.pointerId,x:$.clientX,y:$.clientY},j.current=null;return}if(S.current.size===2){const[B,M]=[...S.current.values()],L=Math.hypot(M.x-B.x,M.y-B.y);j.current={distance:L,scale:m,pan:v},C.current=null}},[v,m]),I=y.useCallback($=>{var B;if(!S.current.has($.pointerId))return;const O=S.current.get($.pointerId);if(S.current.set($.pointerId,{x:$.clientX,y:$.clientY}),S.current.size===1&&((B=C.current)==null?void 0:B.pointerId)===$.pointerId){const M=$.clientX-O.x,L=$.clientY-O.y;_(z=>({x:z.x+M,y:z.y+L})),C.current={pointerId:$.pointerId,x:$.clientX,y:$.clientY};return}if(S.current.size===2&&j.current){const[M,L]=[...S.current.values()],z={x:(M.x+L.x)/2,y:(M.y+L.y)/2},G=R(z.x,z.y),V=Math.hypot(L.x-M.x,L.y-M.y);if(!G||j.current.distance<=0)return;const F=jT(j.current.scale*(V/j.current.distance)),X=Cz(j.current.scale,F,j.current.pan,G);x(F),_(X)}},[R]),W=y.useCallback($=>{var O;if(S.current.delete($.pointerId),((O=C.current)==null?void 0:O.pointerId)===$.pointerId&&(C.current=null),S.current.size<2&&(j.current=null),S.current.size===1){const[B,M]=[...S.current.entries()][0]??[];typeof B=="number"&&M&&(C.current={pointerId:B,x:M.x,y:M.y})}},[]);return!e&&!n?c.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-muted-foreground gap-4 px-8",children:[c.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[c.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Software Architecture"}),c.jsx("p",{className:"text-xs max-w-sm",children:"Generate a visual architecture diagram of your project. The AI will analyze your project structure, dependencies, and code organization to create a Mermaid diagram."})]}),i&&c.jsxs("button",{onClick:i,className:"flex items-center gap-2 px-4 py-2 text-sm rounded-lg border bg-background hover:bg-accent hover:text-accent-foreground transition-colors",children:[c.jsx(U_,{className:"h-3.5 w-3.5"}),"Generate Architecture Diagram"]})]}):c.jsxs("div",{className:"h-full flex flex-col",children:[c.jsxs("div",{className:"flex items-center gap-1 px-2 h-8 border-b bg-muted/20 shrink-0",children:[c.jsx("span",{className:"text-xs font-medium text-muted-foreground mr-auto",children:"Architecture"}),c.jsx("button",{onClick:()=>D(m-.25),className:"p-1 rounded hover:bg-muted transition-colors",title:"Zoom out",children:c.jsx(Cve,{className:"h-3 w-3"})}),c.jsxs("span",{className:"text-2xs text-muted-foreground min-w-[3ch] text-center",children:[Math.round(m*100),"%"]}),c.jsx("button",{onClick:()=>D(m+.25),className:"p-1 rounded hover:bg-muted transition-colors",title:"Zoom in",children:c.jsx(Sve,{className:"h-3 w-3"})}),c.jsx("button",{onClick:()=>{x(1),_({x:0,y:0})},className:"p-1 rounded hover:bg-muted transition-colors",title:"Reset zoom",children:c.jsx(iM,{className:"h-3 w-3"})}),c.jsx("div",{className:"w-px h-4 bg-border mx-1"}),e&&c.jsxs(c.Fragment,{children:[c.jsx("button",{onClick:E,className:"p-1 rounded hover:bg-muted transition-colors",title:"Copy Mermaid source",children:h?c.jsx(Li,{className:"h-3 w-3 text-green-500"}):c.jsx(tl,{className:"h-3 w-3"})}),c.jsx("button",{onClick:N,className:"p-1 rounded hover:bg-muted transition-colors",title:"Download SVG",children:c.jsx(Bf,{className:"h-3 w-3"})})]}),r&&c.jsx("button",{onClick:r,className:"p-1 rounded hover:bg-muted transition-colors",title:"Regenerate diagram",disabled:n,children:c.jsx(ks,{className:`h-3 w-3 ${n?"animate-spin":""}`})})]}),c.jsxs("div",{ref:l,className:"flex-1 overflow-hidden relative touch-none",onWheel:U,onPointerDown:H,onPointerMove:I,onPointerUp:W,onPointerCancel:W,onPointerLeave:W,style:{cursor:S.current.size>0?"grabbing":"grab"},children:[n&&!e&&c.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-muted-foreground gap-3",children:[c.jsx(Lt,{className:"h-6 w-6 animate-spin"}),c.jsx("span",{className:"text-xs",children:"Analyzing project architecture…"})]}),n&&e&&c.jsxs("div",{className:"absolute top-2 right-2 z-10 flex items-center gap-1.5 px-2 py-1 rounded bg-background/80 border text-xs text-muted-foreground",children:[c.jsx(Lt,{className:"h-3 w-3 animate-spin"}),"Regenerating…"]}),u&&c.jsxs("div",{className:"p-4 text-xs text-destructive bg-destructive/10 rounded m-2",children:[c.jsx("p",{className:"font-medium mb-1",children:"Render error"}),c.jsx("pre",{className:"whitespace-pre-wrap",children:u}),e&&c.jsxs("details",{className:"mt-2",children:[c.jsx("summary",{className:"cursor-pointer text-muted-foreground hover:text-foreground",children:"View source"}),c.jsx("pre",{className:"mt-1 p-2 bg-muted rounded text-2xs whitespace-pre-wrap",children:e})]})]}),c.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-4",style:{transform:`translate(${v.x}px, ${v.y}px) scale(${m})`,transformOrigin:"center center"},children:c.jsx("div",{ref:o,className:"flex items-center justify-center"})})]})]})}const Cc=y.forwardRef(({className:e,children:n,...r},i)=>c.jsx("div",{ref:i,className:ke("relative overflow-auto",e),...r,children:n}));Cc.displayName="ScrollArea";const o9e=y.forwardRef(({className:e,orientation:n="vertical",...r},i)=>c.jsx("div",{ref:i,"data-orientation":n,className:ke("hidden",e),...r}));o9e.displayName="ScrollBar";const Ph=y.forwardRef(({className:e,...n},r)=>c.jsx("textarea",{className:ke("flex min-h-[72px] w-full rounded-lg border border-input bg-background/90 px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));Ph.displayName="Textarea";var NT={},Qv={},Nz;function l9e(){return Nz||(Nz=1,Object.defineProperty(Qv,"__esModule",{value:!0}),Qv.FileExtensions1ToIcon=void 0,Qv.FileExtensions1ToIcon={accdb:"file_type_access.svg",accdt:"file_type_access.svg",mdb:"file_type_access.svg",accda:"file_type_access.svg",accdc:"file_type_access.svg",accde:"file_type_access.svg",accdp:"file_type_access.svg",accdr:"file_type_access.svg",accdu:"file_type_access.svg",ade:"file_type_access.svg",adp:"file_type_access.svg",laccdb:"file_type_access.svg",ldb:"file_type_access.svg",mam:"file_type_access.svg",maq:"file_type_access.svg",mdw:"file_type_access.svg",afdesign:"file_type_affinitydesigner.svg",affinitydesigner:"file_type_affinitydesigner.svg",afphoto:"file_type_affinityphoto.svg",affinityphoto:"file_type_affinityphoto.svg",afpub:"file_type_affinitypublisher.svg",affinitypublisher:"file_type_affinitypublisher.svg",ai:"file_type_ai.svg",ino:"file_type_arduino.svg",pde:"file_type_arduino.svg",aspx:"file_type_aspx.svg",ascx:"file_type_aspx.svg",astro:"file_type_astro.svg",aac:"file_type_audio.svg",act:"file_type_audio.svg",aiff:"file_type_audio.svg",amr:"file_type_audio.svg",ape:"file_type_audio.svg",au:"file_type_audio.svg",dct:"file_type_audio.svg",dss:"file_type_audio.svg",dvf:"file_type_audio.svg",flac:"file_type_audio.svg",gsm:"file_type_audio.svg",iklax:"file_type_audio.svg",ivs:"file_type_audio.svg",m4a:"file_type_audio.svg",m4b:"file_type_audio.svg",m4p:"file_type_audio.svg",mmf:"file_type_audio.svg",mogg:"file_type_audio.svg",mp3:"file_type_audio.svg",mpc:"file_type_audio.svg",msv:"file_type_audio.svg",oga:"file_type_audio.svg",ogg:"file_type_audio.svg",opus:"file_type_audio.svg",ra:"file_type_audio.svg",raw:"file_type_audio.svg",tta:"file_type_audio.svg",vox:"file_type_audio.svg",wav:"file_type_audio.svg",wma:"file_type_audio.svg",avif:"file_type_avif.svg",awk:"file_type_awk.svg",a:"file_type_binary.svg",app:"file_type_binary.svg",bin:"file_type_binary.svg",cmo:"file_type_binary.svg",cmx:"file_type_binary.svg",cma:"file_type_binary.svg",cmxa:"file_type_binary.svg",cmi:"file_type_binary.svg",dll:"file_type_binary.svg",exe:"file_type_binary.svg",hl:"file_type_binary.svg",ilk:"file_type_binary.svg",lib:"file_type_binary.svg",n:"file_type_binary.svg",ndll:"file_type_binary.svg",o:"file_type_binary.svg",obj:"file_type_binary.svg",pyc:"file_type_binary.svg",pyd:"file_type_binary.svg",pyo:"file_type_binary.svg",pdb:"file_type_binary.svg",scpt:"file_type_binary.svg",scptd:"file_type_binary.svg",so:"file_type_binary.svg",bb:"file_type_blitzbasic.svg",gemfile:"file_type_bundler.svg",cake:"file_type_cake.svg",csr:"file_type_cert.svg",crt:"file_type_cert.svg",cer:"file_type_cert.svg",der:"file_type_cert.svg",pfx:"file_type_cert.svg",p12:"file_type_cert.svg",p7b:"file_type_cert.svg",p7r:"file_type_cert.svg",src:"file_type_cert.svg",crl:"file_type_cert.svg",sst:"file_type_cert.svg",stl:"file_type_cert.svg",lucee:"file_type_cf.svg",h:"file_type_cheader.svg",class:"file_type_class.svg",cjm:"file_type_clojure.svg",cljc:"file_type_clojure.svg",cljs:"file_type_clojurescript.svg",kit:"file_type_codekit.svg",plist:"file_type_light_config.svg",hpp:"file_type_cppheader.svg",hh:"file_type_cppheader.svg",hxx:"file_type_cppheader.svg","h++":"file_type_cppheader.svg",csx:"file_type_csharp.svg",csproj:"file_type_csproj.svg",db:"file_type_light_db.svg",djt:"file_type_django.svg",eco:"file_type_light_docpad.svg",drawio:"file_type_drawio.svg",dio:"file_type_drawio.svg",ejs:"file_type_ejs.svg",el:"file_type_emacs.svg",elc:"file_type_emacs.svg",ensime:"file_type_ensime.svg",eps:"file_type_eps.svg",xls:"file_type_excel.svg",xlsx:"file_type_excel.svg",xlsm:"file_type_excel.svg",ods:"file_type_excel.svg",fods:"file_type_excel.svg",xlsb:"file_type_excel.svg",fbx:"file_type_fbx.svg",fla:"file_type_light_fla.svg",swf:"file_type_flash.svg",swc:"file_type_flash.svg",woff:"file_type_light_font.svg",woff2:"file_type_light_font.svg",ttf:"file_type_light_font.svg",otf:"file_type_light_font.svg",eot:"file_type_light_font.svg",pfa:"file_type_light_font.svg",pfb:"file_type_light_font.svg",sfd:"file_type_light_font.svg",fsproj:"file_type_fsproj.svg",gmx:"file_type_gamemaker.svg",yy:"file_type_light_gamemaker2.svg",yyp:"file_type_light_gamemaker2.svg",gradle:"file_type_light_gradle.svg",hxproj:"file_type_haxedevelop.svg",idr:"file_type_idris.svg",lidr:"file_type_idris.svg",ibc:"file_type_idrisbin.svg",ipkg:"file_type_idrispkg.svg",jpeg:"file_type_image.svg",jpg:"file_type_image.svg",gif:"file_type_image.svg",png:"file_type_image.svg",bmp:"file_type_image.svg",tiff:"file_type_image.svg",ico:"file_type_image.svg",imba:"file_type_imba.svg",imba2:"file_type_imba.svg",inc:"file_type_inc.svg",include:"file_type_inc.svg",infopathxml:"file_type_infopath.svg",xsn:"file_type_infopath.svg",xsf:"file_type_infopath.svg",xtp2:"file_type_infopath.svg",jar:"file_type_jar.svg",jbuilder:"file_type_jbuilder.svg",json5:"file_type_light_json5.svg",jsonld:"file_type_light_jsonld.svg","json-ld":"file_type_light_jsonld.svg",jsp:"file_type_jsp.svg",jss:"file_type_jss.svg",ipynb:"file_type_jupyter.svg",key:"file_type_key.svg",pem:"file_type_key.svg",master:"file_type_layout.svg",enc:"file_type_license.svg",hxp:"file_type_lime.svg",liquid:"file_type_liquid.svg",ls:"file_type_livescript.svg",lnk:"file_type_lnk.svg",log:"file_type_log.svg",tlg:"file_type_log.svg",crec:"file_type_lync.svg",ocrec:"file_type_lync.svg",makefile:"file_type_makefile.svg",map:"file_type_map.svg",mdown:"file_type_markdown.svg",markdown:"file_type_markdown.svg",fig:"file_type_matlab.svg",mex:"file_type_matlab.svg",mexn:"file_type_matlab.svg",mexrs6:"file_type_matlab.svg",mn:"file_type_matlab.svg",mum:"file_type_matlab.svg",mx:"file_type_matlab.svg",mx3:"file_type_matlab.svg",rwd:"file_type_matlab.svg",slx:"file_type_matlab.svg",slddc:"file_type_matlab.svg",smv:"file_type_matlab.svg",xvc:"file_type_matlab.svg",mustache:"file_type_light_mustache.svg",mst:"file_type_light_mustache.svg",njsproj:"file_type_njsproj.svg",nupkg:"file_type_nuget.svg",snupkg:"file_type_nuget.svg",nuspec:"file_type_nuget.svg",psmdcp:"file_type_nuget.svg",npy:"file_type_numpy.svg",npz:"file_type_numpy.svg",nunj:"file_type_nunjucks.svg",njs:"file_type_nunjucks.svg",one:"file_type_onenote.svg",onepkg:"file_type_onenote.svg",onetoc:"file_type_onenote.svg",onetoc2:"file_type_onenote.svg",sig:"file_type_onenote.svg",cl:"file_type_opencl.svg",opencl:"file_type_opencl.svg",org:"file_type_org.svg",pst:"file_type_outlook.svg",bcmx:"file_type_outlook.svg",otm:"file_type_outlook.svg",msg:"file_type_outlook.svg",oft:"file_type_outlook.svg",ovpn:"file_type_ovpn.svg",pkg:"file_type_package.svg",patch:"file_type_patch.svg",pcd:"file_type_light_pcl.svg",pdf:"file_type_pdf.svg",psd:"file_type_photoshop.svg",php1:"file_type_php.svg",php2:"file_type_php.svg",php3:"file_type_php.svg",php4:"file_type_php.svg",php5:"file_type_php.svg",php6:"file_type_php.svg",phps:"file_type_php.svg",phpsa:"file_type_php.svg",phpt:"file_type_php.svg",phtml:"file_type_php.svg",phar:"file_type_php.svg",pipeline:"file_type_pipeline.svg",pu:"file_type_plantuml.svg",plantuml:"file_type_plantuml.svg",iuml:"file_type_plantuml.svg",puml:"file_type_plantuml.svg",pck:"file_type_plsql_package.svg",pkb:"file_type_plsql_package_body.svg",pkh:"file_type_plsql_package_header.svg",pks:"file_type_plsql_package_spec.svg",po:"file_type_poedit.svg",mo:"file_type_poedit.svg",pot:"file_type_powerpoint.svg",potx:"file_type_powerpoint.svg",potm:"file_type_powerpoint.svg",pps:"file_type_powerpoint.svg",ppsx:"file_type_powerpoint.svg",ppsm:"file_type_powerpoint.svg",ppt:"file_type_powerpoint.svg",pptx:"file_type_powerpoint.svg",pptm:"file_type_powerpoint.svg",pa:"file_type_powerpoint.svg",ppa:"file_type_powerpoint.svg",ppam:"file_type_powerpoint.svg",sldm:"file_type_powerpoint.svg",sldx:"file_type_powerpoint.svg",psd1:"file_type_powershell_psd.svg",psm1:"file_type_powershell_psm.svg",pro:"file_type_prolog.svg",P:"file_type_prolog.svg",pub:"file_type_publisher.svg",puz:"file_type_publisher.svg",q:"file_type_q.svg",qbs:"file_type_qbs.svg",qvd:"file_type_qlikview.svg",qvw:"file_type_qlikview.svg",rake:"file_type_rake.svg",rt:"file_type_reacttemplate.svg",reg:"file_type_registry.svg",rego:"file_type_rego.svg",rproj:"file_type_rproj.svg",sls:"file_type_saltstack.svg",sass:"file_type_sass.svg",scssm:"file_type_scss.svg",unity:"file_type_light_shaderlab.svg",fish:"file_type_shell.svg",sketch:"file_type_sketch.svg",eskip:"file_type_skipper.svg",sln:"file_type_sln.svg",spe:"file_type_spacengine.svg",sqlite:"file_type_sqlite.svg",sqlite3:"file_type_sqlite.svg",db3:"file_type_sqlite.svg",sss:"file_type_sss.svg",dta:"file_type_stata.svg",storyboard:"file_type_storyboard.svg",svg:"file_type_svg.svg",tcl:"file_type_tcl.svg",exp:"file_type_tcl.svg",tfstate:"file_type_terraform.svg",tst:"file_type_test.svg",texi:"file_type_light_tex.svg",tikz:"file_type_light_tex.svg",csv:"file_type_text.svg",tsv:"file_type_text.svg",todo:"file_type_light_todo.svg",tt2:"file_type_tt.svg",vala:"file_type_vala.svg",vapi:"file_type_vapi.svg",vash:"file_type_light_vash.svg",vbhtml:"file_type_vbhtml.svg",vbproj:"file_type_vbproj.svg",vcxproj:"file_type_vcxproj.svg","3g2":"file_type_video.svg","3gp":"file_type_video.svg",asf:"file_type_video.svg",amv:"file_type_video.svg",avi:"file_type_video.svg",divx:"file_type_video.svg",qt:"file_type_video.svg",f4a:"file_type_video.svg",f4b:"file_type_video.svg",f4p:"file_type_video.svg",f4v:"file_type_video.svg",flv:"file_type_video.svg",m2v:"file_type_video.svg",m4v:"file_type_video.svg",mkv:"file_type_video.svg",mk3d:"file_type_video.svg",mov:"file_type_video.svg",mp2:"file_type_video.svg",mp4:"file_type_video.svg",mpe:"file_type_video.svg",mpeg:"file_type_video.svg",mpeg2:"file_type_video.svg",mpg:"file_type_video.svg",mpv:"file_type_video.svg",nsv:"file_type_video.svg",ogv:"file_type_video.svg",rm:"file_type_video.svg",rmvb:"file_type_video.svg",svi:"file_type_video.svg",vob:"file_type_video.svg",webm:"file_type_video.svg",wmv:"file_type_video.svg",vsix:"file_type_light_vsix.svg",vsixmanifest:"file_type_light_vsixmanifest.svg",wasm:"file_type_wasm.svg",webp:"file_type_webp.svg",doc:"file_type_word.svg",docx:"file_type_word.svg",docm:"file_type_word.svg",dot:"file_type_word.svg",dotx:"file_type_word.svg",dotm:"file_type_word.svg",wll:"file_type_word.svg",wxml:"file_type_wxml.svg",wxss:"file_type_wxss.svg",xcodeproj:"file_type_xcode.svg",xfl:"file_type_light_xfl.svg",xib:"file_type_xib.svg",xliff:"file_type_xliff.svg",xlf:"file_type_xliff.svg",pex:"file_type_xml.svg",tmlanguage:"file_type_xml.svg",zip:"file_type_zip.svg",rar:"file_type_zip.svg","7z":"file_type_zip.svg",tar:"file_type_zip.svg",tgz:"file_type_zip.svg",bz:"file_type_zip.svg",gz:"file_type_zip.svg",bzip2:"file_type_zip.svg",xz:"file_type_zip.svg",bz2:"file_type_zip.svg",zipx:"file_type_zip.svg"}),Qv}var eb={},Tz;function c9e(){return Tz||(Tz=1,Object.defineProperty(eb,"__esModule",{value:!0}),eb.FileExtensions2ToIcon=void 0,eb.FileExtensions2ToIcon={"gemfile.lock":"file_type_bundler.svg","css.map":"file_type_cssmap.svg","drawio.png":"file_type_drawio.svg","drawio.svg":"file_type_drawio.svg","js.flow":"file_type_flow.svg","ejs.t":"file_type_hygen.svg","js.snap":"file_type_jest_snapshot.svg","jsx.snap":"file_type_jest_snapshot.svg","ts.snap":"file_type_jest_snapshot.svg","tsx.snap":"file_type_jest_snapshot.svg","js.map":"file_type_light_jsmap.svg","layout.html":"file_type_layout.svg","layout.htm":"file_type_layout.svg","marko.js":"file_type_markojs.svg","format.ps1xml":"file_type_powershell_format.svg","types.ps1xml":"file_type_powershell_types.svg","story.js":"file_type_storybook.svg","story.jsx":"file_type_storybook.svg","story.ts":"file_type_storybook.svg","story.tsx":"file_type_storybook.svg","story.mdx":"file_type_storybook.svg","stories.js":"file_type_storybook.svg","stories.jsx":"file_type_storybook.svg","stories.ts":"file_type_storybook.svg","stories.tsx":"file_type_storybook.svg","stories.mdx":"file_type_storybook.svg","test.js":"file_type_light_testjs.svg","test.jsx":"file_type_light_testjs.svg","test.mjs":"file_type_light_testjs.svg","spec.js":"file_type_light_testjs.svg","spec.jsx":"file_type_light_testjs.svg","spec.mjs":"file_type_light_testjs.svg","test.ts":"file_type_testts.svg","test.tsx":"file_type_testts.svg","spec.ts":"file_type_testts.svg","spec.tsx":"file_type_testts.svg","e2e-test.ts":"file_type_testts.svg","e2e-test.tsx":"file_type_testts.svg","e2e-spec.ts":"file_type_testts.svg","e2e-spec.tsx":"file_type_testts.svg","d.ts":"file_type_typescriptdef.svg"}),eb}var tb={},Ez;function u9e(){return Ez||(Ez=1,Object.defineProperty(tb,"__esModule",{value:!0}),tb.FileNamesToIcon=void 0,tb.FileNamesToIcon={".angular-cli.json":"file_type_angular.svg","angular-cli.json":"file_type_angular.svg","angular.json":"file_type_angular.svg",".angular.json":"file_type_angular.svg","api-extractor.json":"file_type_api_extractor.svg","api-extractor-base.json":"file_type_api_extractor.svg",".appsemblerc.yaml":"file_type_appsemble.svg","app-definition.yaml":"file_type_appsemble.svg","appveyor.yml":"file_type_appveyor.svg",".appveyor.yml":"file_type_appveyor.svg","astro.config.js":"file_type_astroconfig.svg","astro.config.cjs":"file_type_astroconfig.svg","astro.config.mjs":"file_type_astroconfig.svg","aurelia.json":"file_type_aurelia.svg","azure-pipelines.yml":"file_type_azurepipelines.svg",".vsts-ci.yml":"file_type_azurepipelines.svg",".babelrc":"file_type_light_babel.svg",".babelignore":"file_type_light_babel.svg",".babelrc.js":"file_type_light_babel.svg",".babelrc.cjs":"file_type_light_babel.svg",".babelrc.mjs":"file_type_light_babel.svg",".babelrc.json":"file_type_light_babel.svg","babel.config.js":"file_type_light_babel.svg","babel.config.cjs":"file_type_light_babel.svg","babel.config.mjs":"file_type_light_babel.svg","babel.config.json":"file_type_light_babel.svg",".bzrignore":"file_type_bazaar.svg","BUILD.bazel":"file_type_bazel.svg",".bazelrc":"file_type_bazel.svg","bazel.rc":"file_type_bazel.svg","bazel.bazelrc":"file_type_bazel.svg","bitbucket-pipelines.yml":"file_type_bitbucketpipeline.svg",".bithoundrc":"file_type_bithound.svg",".bowerrc":"file_type_bower.svg","bower.json":"file_type_bower.svg",".browserslistrc":"file_type_browserslist.svg",browserslist:"file_type_browserslist.svg",".buckconfig":"file_type_buckbuild.svg",gemfile:"file_type_bundler.svg","gemfile.lock":"file_type_bundler.svg","capacitor.config.json":"file_type_capacitor.svg","cargo.toml":"file_type_cargo.svg","cargo.lock":"file_type_cargo.svg",chefignore:"file_type_chef.svg",berksfile:"file_type_chef.svg","berksfile.lock":"file_type_chef.svg","policyfile.rb":"file_type_chef.svg","policyfile.lock.json":"file_type_chef.svg","circle.yml":"file_type_light_circleci.svg",".cfignore":"file_type_light_cloudfoundry.svg",".codacy.yml":"file_type_light_codacy.svg",".codacy.yaml":"file_type_light_codacy.svg",".codeclimate.yml":"file_type_light_codeclimate.svg","codecov.yml":"file_type_codecov.svg",".codecov.yml":"file_type_codecov.svg","config.codekit":"file_type_codekit.svg","config.codekit2":"file_type_codekit.svg","config.codekit3":"file_type_codekit.svg",".config.codekit":"file_type_codekit.svg",".config.codekit2":"file_type_codekit.svg",".config.codekit3":"file_type_codekit.svg","coffeelint.json":"file_type_coffeelint.svg",".coffeelintignore":"file_type_coffeelint.svg","commitlint.config.js":"file_type_commitlint.svg",".commitlintrc.js":"file_type_commitlint.svg",".commitlintrc.json":"file_type_commitlint.svg",".commitlintrc.yml":"file_type_commitlint.svg","composer.json":"file_type_composer.svg","composer.lock":"file_type_composer.svg","conanfile.txt":"file_type_conan.svg","conanfile.py":"file_type_conan.svg",".condarc":"file_type_conda.svg",".coveralls.yml":"file_type_coveralls.svg","crowdin.yml":"file_type_crowdin.svg",".csscomb.json":"file_type_csscomb.svg",".csslintrc":"file_type_csslint.svg",".cvsignore":"file_type_cvs.svg","cypress.json":"file_type_cypress.svg","cypress.env.json":"file_type_cypress.svg",".boringignore":"file_type_darcs.svg","dependabot.yml":"file_type_dependabot.svg","dependencies.yml":"file_type_dependencies.svg","devcontainer.json":"file_type_devcontainer.svg",".devcontainer.json":"file_type_devcontainer.svg","compose.yaml":"file_type_docker.svg","compose.yml":"file_type_docker.svg","docker-compose.yaml":"file_type_docker.svg","docker-compose.yml":"file_type_docker.svg","docker-compose.ci-build.yaml":"file_type_docker.svg","docker-compose.ci-build.yml":"file_type_docker.svg","docker-compose.override.yaml":"file_type_docker.svg","docker-compose.override.yml":"file_type_docker.svg","docker-compose.vs.debug.yaml":"file_type_docker.svg","docker-compose.vs.debug.yml":"file_type_docker.svg","docker-compose.vs.release.yaml":"file_type_docker.svg","docker-compose.vs.release.yml":"file_type_docker.svg","docker-cloud.yaml":"file_type_docker.svg","docker-cloud.yml":"file_type_docker.svg","docker-compose.test.yml":"file_type_dockertest.svg",".doczrc":"file_type_docz.svg","docz.js":"file_type_docz.svg","docz.json":"file_type_docz.svg",".docz.js":"file_type_docz.svg",".docz.json":"file_type_docz.svg","doczrc.js":"file_type_docz.svg","doczrc.json":"file_type_docz.svg","docz.config.js":"file_type_docz.svg","docz.config.json":"file_type_docz.svg",".dojorc":"file_type_dojo.svg",".drone.yml":"file_type_light_drone.svg",".drone.yml.sig":"file_type_light_drone.svg",".dvc":"file_type_dvc.svg",".editorconfig":"file_type_editorconfig.svg","elm-package.json":"file_type_elm.svg",".ember-cli":"file_type_ember.svg",emakefile:"file_type_erlang.svg",".emakerfile":"file_type_erlang.svg",".eslintrc":"file_type_eslint.svg",".eslintignore":"file_type_eslint.svg",".eslintcache":"file_type_eslint.svg",".eslintrc.js":"file_type_eslint.svg",".eslintrc.mjs":"file_type_eslint.svg",".eslintrc.cjs":"file_type_eslint.svg",".eslintrc.json":"file_type_eslint.svg",".eslintrc.yaml":"file_type_eslint.svg",".eslintrc.yml":"file_type_eslint.svg","app.json":"file_type_light_expo.svg","app.config.js":"file_type_light_expo.svg","app.config.json":"file_type_light_expo.svg","app.config.json5":"file_type_light_expo.svg",".faunarc":"file_type_fauna.svg","favicon.ico":"file_type_favicon.svg",".firebaserc":"file_type_firebase.svg","firebase.json":"file_type_light_firebasehosting.svg","firestore.rules":"file_type_firestore.svg","firestore.indexes.json":"file_type_firestore.svg",".flooignore":"file_type_floobits.svg",".flowconfig":"file_type_flow.svg",".flutter-plugins":"file_type_flutter.svg",".metadata":"file_type_flutter.svg","pubspec.lock":"file_type_flutter_package.svg","pubspec.yaml":"file_type_flutter_package.svg",".packages":"file_type_flutter_package.svg",".fossaignore":"file_type_fossa.svg","ignore-glob":"file_type_fossil.svg","fuse.js":"file_type_fusebox.svg","gatsby-config.js":"file_type_gatsby.svg","gatsby-config.ts":"file_type_gatsby.svg","gatsby-node.js":"file_type_gatsby.svg","gatsby-node.ts":"file_type_gatsby.svg","gatsby-browser.js":"file_type_gatsby.svg","gatsby-browser.ts":"file_type_gatsby.svg","gatsby-ssr.js":"file_type_gatsby.svg","gatsby-ssr.ts":"file_type_gatsby.svg",".gitattributes":"file_type_git.svg",".gitconfig":"file_type_git.svg",".gitignore":"file_type_git.svg",".gitmodules":"file_type_git.svg",".gitkeep":"file_type_git.svg",".mailmap":"file_type_git.svg",".gitlab-ci.yml":"file_type_gitlab.svg",".gitpod.yaml":"file_type_gitpod.svg",".gitpod.yml":"file_type_gitpod.svg","gitpod.yaml":"file_type_gitpod.svg","gitpod.yml":"file_type_gitpod.svg","glide.yml":"file_type_glide.svg",".glitterrc":"file_type_glitter.svg","go.sum":"file_type_go_package.svg","go.mod":"file_type_go_package.svg",".gqlconfig":"file_type_graphql.svg",".graphqlconfig":"file_type_graphql_config.svg",".graphqlconfig.yml":"file_type_graphql_config.svg",".graphqlconfig.yaml":"file_type_graphql_config.svg","greenkeeper.json":"file_type_greenkeeper.svg","gridsome.config.js":"file_type_gridsome.svg","gridsome.config.ts":"file_type_gridsome.svg","gridsome.server.js":"file_type_gridsome.svg","gridsome.server.ts":"file_type_gridsome.svg","gridsome.client.js":"file_type_gridsome.svg","gridsome.client.ts":"file_type_gridsome.svg","gruntfile.js":"file_type_grunt.svg","gruntfile.coffee":"file_type_grunt.svg","gruntfile.ts":"file_type_grunt.svg","gruntfile.babel.js":"file_type_grunt.svg","gruntfile.babel.coffee":"file_type_grunt.svg","gruntfile.babel.ts":"file_type_grunt.svg","gulpfile.js":"file_type_gulp.svg","gulpfile.coffee":"file_type_gulp.svg","gulpfile.ts":"file_type_gulp.svg","gulpfile.mjs":"file_type_gulp.svg","gulpfile.esm.js":"file_type_gulp.svg","gulpfile.esm.coffee":"file_type_gulp.svg","gulpfile.esm.ts":"file_type_gulp.svg","gulpfile.esm.mjs":"file_type_gulp.svg","gulpfile.babel.js":"file_type_gulp.svg","gulpfile.babel.coffee":"file_type_gulp.svg","gulpfile.babel.ts":"file_type_gulp.svg","gulpfile.babel.mjs":"file_type_gulp.svg","haxelib.json":"file_type_haxe.svg","checkstyle.json":"file_type_haxecheckstyle.svg",".p4ignore":"file_type_helix.svg","chart.lock":"file_type_helm.svg","chart.yaml":"file_type_helm.svg","horusec-config.json":"file_type_horusec.svg",".htmlhintrc":"file_type_htmlhint.svg",".huskyrc":"file_type_husky.svg","husky.config.js":"file_type_husky.svg",".huskyrc.js":"file_type_husky.svg",".huskyrc.json":"file_type_husky.svg",".huskyrc.yaml":"file_type_husky.svg",".huskyrc.yml":"file_type_husky.svg","ionic.project":"file_type_ionic.svg","ionic.config.json":"file_type_ionic.svg",jakefile:"file_type_jake.svg","jakefile.js":"file_type_jake.svg","jasmine.json":"file_type_jasmine.svg","jest.config.json":"file_type_jest.svg","jest.config.base.json":"file_type_jest.svg","jest.config.common.json":"file_type_jest.svg","jest.config.ts":"file_type_jest.svg","jest.config.base.ts":"file_type_jest.svg","jest.config.common.ts":"file_type_jest.svg","jest.json":"file_type_jest.svg",".jestrc":"file_type_jest.svg",".jestrc.js":"file_type_jest.svg",".jestrc.json":"file_type_jest.svg","jest.config.js":"file_type_jest.svg","jest.config.cjs":"file_type_jest.svg","jest.config.mjs":"file_type_jest.svg","jest.config.base.js":"file_type_jest.svg","jest.config.base.cjs":"file_type_jest.svg","jest.config.base.mjs":"file_type_jest.svg","jest.config.common.js":"file_type_jest.svg","jest.config.common.cjs":"file_type_jest.svg","jest.config.common.mjs":"file_type_jest.svg","jest.config.babel.js":"file_type_jest.svg","jest.config.babel.cjs":"file_type_jest.svg","jest.config.babel.mjs":"file_type_jest.svg",".jpmignore":"file_type_jpm.svg",".jsbeautifyrc":"file_type_jsbeautify.svg",jsbeautifyrc:"file_type_jsbeautify.svg",".jsbeautify":"file_type_jsbeautify.svg",jsbeautify:"file_type_jsbeautify.svg","jsconfig.json":"file_type_light_jsconfig.svg",".jscpd.json":"file_type_jscpd.svg","jscpd-report.xml":"file_type_jscpd.svg","jscpd-report.json":"file_type_jscpd.svg","jscpd-report.html":"file_type_jscpd.svg",".jshintrc":"file_type_jshint.svg",".jshintignore":"file_type_jshint.svg","karma.conf.js":"file_type_karma.svg","karma.conf.coffee":"file_type_karma.svg","karma.conf.ts":"file_type_karma.svg",".kitchen.yml":"file_type_kitchenci.svg","kitchen.yml":"file_type_kitchenci.svg",".kiteignore":"file_type_light_kite.svg","layout.html":"file_type_layout.svg","layout.htm":"file_type_layout.svg","lerna.json":"file_type_light_lerna.svg",license:"file_type_license.svg",licence:"file_type_license.svg",copying:"file_type_license.svg","copying.lesser":"file_type_license.svg","license.md":"file_type_license.svg","license.txt":"file_type_license.svg","licence.md":"file_type_license.svg","licence.txt":"file_type_license.svg","copying.md":"file_type_license.svg","copying.txt":"file_type_license.svg","copying.lesser.md":"file_type_license.svg","copying.lesser.txt":"file_type_license.svg",".licrc":"file_type_licensebat.svg",".lighthouserc.js":"file_type_lighthouse.svg",".lighthouserc.json":"file_type_lighthouse.svg",".lighthouserc.yaml":"file_type_lighthouse.svg",".lighthouserc.yml":"file_type_lighthouse.svg","include.xml":"file_type_lime.svg",".lintstagedrc":"file_type_lintstagedrc.svg","lint-staged.config.js":"file_type_lintstagedrc.svg",".lintstagedrc.js":"file_type_lintstagedrc.svg",".lintstagedrc.json":"file_type_lintstagedrc.svg",".lintstagedrc.yaml":"file_type_lintstagedrc.svg",".lintstagedrc.yml":"file_type_lintstagedrc.svg",manifest:"file_type_manifest.svg","manifest.bak":"file_type_manifest_bak.svg","manifest.skip":"file_type_manifest_skip.svg",".markdownlint.json":"file_type_markdownlint.svg","maven.config":"file_type_maven.svg","pom.xml":"file_type_maven.svg","extensions.xml":"file_type_maven.svg","settings.xml":"file_type_maven.svg",".hgignore":"file_type_mercurial.svg","mocha.opts":"file_type_mocha.svg",".mocharc.js":"file_type_mocha.svg",".mocharc.json":"file_type_mocha.svg",".mocharc.jsonc":"file_type_mocha.svg",".mocharc.yaml":"file_type_mocha.svg",".mocharc.yml":"file_type_mocha.svg",modernizr:"file_type_modernizr.svg","modernizr.js":"file_type_modernizr.svg","modernizrrc.js":"file_type_modernizr.svg",".modernizr.js":"file_type_modernizr.svg",".modernizrrc.js":"file_type_modernizr.svg","moleculer.config.js":"file_type_moleculer.svg","moleculer.config.json":"file_type_moleculer.svg","moleculer.config.ts":"file_type_moleculer.svg",".mtn-ignore":"file_type_monotone.svg",".nest-cli.json":"file_type_nestjs.svg","nest-cli.json":"file_type_nestjs.svg","nestconfig.json":"file_type_nestjs.svg",".nestconfig.json":"file_type_nestjs.svg","netlify.toml":"file_type_netlify.svg","next.config.js":"file_type_light_next.svg","ng-tailwind.js":"file_type_ng_tailwind.svg","nginx.conf":"file_type_nginx.svg","build.ninja":"file_type_ninja.svg",".node-version":"file_type_node.svg",".nvmrc":"file_type_node.svg","nodemon.json":"file_type_nodemon.svg",".npmignore":"file_type_npm.svg",".npmrc":"file_type_npm.svg","package.json":"file_type_npm.svg","package-lock.json":"file_type_npm.svg","npm-shrinkwrap.json":"file_type_npm.svg",".nsrirc":"file_type_nsri.svg",".nsriignore":"file_type_nsri.svg","nsri.config.js":"file_type_nsri.svg",".nsrirc.js":"file_type_nsri.svg",".nsrirc.json":"file_type_nsri.svg",".nsrirc.yaml":"file_type_nsri.svg",".nsrirc.yml":"file_type_nsri.svg",".integrity.json":"file_type_nsri-integrity.svg","nuxt.config.js":"file_type_nuxt.svg","nuxt.config.ts":"file_type_nuxt.svg",".nycrc":"file_type_nyc.svg",".nycrc.json":"file_type_nyc.svg",".merlin":"file_type_ocaml.svg","paket.dependencies":"file_type_paket.svg","paket.lock":"file_type_paket.svg","paket.references":"file_type_paket.svg","paket.template":"file_type_paket.svg","paket.local":"file_type_paket.svg",".php_cs":"file_type_phpcsfixer.svg",".php_cs.dist":"file_type_phpcsfixer.svg",phpunit:"file_type_phpunit.svg","phpunit.xml":"file_type_phpunit.svg","phpunit.xml.dist":"file_type_phpunit.svg",".phraseapp.yml":"file_type_phraseapp.svg",pipfile:"file_type_pip.svg","pipfile.lock":"file_type_pip.svg","platformio.ini":"file_type_platformio.svg","pnpmfile.js":"file_type_light_pnpm.svg","pnpm-lock.yaml":"file_type_light_pnpm.svg","pnpm-workspace.yaml":"file_type_light_pnpm.svg",".postcssrc":"file_type_postcssconfig.svg",".postcssrc.json":"file_type_postcssconfig.svg",".postcssrc.yaml":"file_type_postcssconfig.svg",".postcssrc.yml":"file_type_postcssconfig.svg",".postcssrc.ts":"file_type_postcssconfig.svg",".postcssrc.js":"file_type_postcssconfig.svg",".postcssrc.cjs":"file_type_postcssconfig.svg","postcss.config.ts":"file_type_postcssconfig.svg","postcss.config.js":"file_type_postcssconfig.svg","postcss.config.cjs":"file_type_postcssconfig.svg","preact.config.js":"file_type_preact.svg",".pre-commit-config.yaml":"file_type_precommit.svg",".prettierrc":"file_type_light_prettier.svg",".prettierignore":"file_type_light_prettier.svg","prettier.config.js":"file_type_light_prettier.svg","prettier.config.cjs":"file_type_light_prettier.svg","prettier.config.ts":"file_type_light_prettier.svg","prettier.config.coffee":"file_type_light_prettier.svg",".prettierrc.js":"file_type_light_prettier.svg",".prettierrc.cjs":"file_type_light_prettier.svg",".prettierrc.json":"file_type_light_prettier.svg",".prettierrc.json5":"file_type_light_prettier.svg",".prettierrc.yml":"file_type_light_prettier.svg",".prettierrc.yaml":"file_type_light_prettier.svg",procfile:"file_type_procfile.svg","protractor.conf.js":"file_type_protractor.svg","protractor.conf.coffee":"file_type_protractor.svg","protractor.conf.ts":"file_type_protractor.svg",".jade-lintrc":"file_type_pug.svg",".pug-lintrc":"file_type_pug.svg",".jade-lint.json":"file_type_pug.svg",".pug-lintrc.js":"file_type_pug.svg",".pug-lintrc.json":"file_type_pug.svg","py.typed":"file_type_pytyped.svg",".pyup":"file_type_pyup.svg",".pyup.yml":"file_type_pyup.svg",qmldir:"file_type_qmldir.svg","quasar.conf.js":"file_type_quasar.svg",rakefile:"file_type_rake.svg","razzle.config.js":"file_type_light_razzle.svg",".rehyperc":"file_type_light_rehype.svg",".rehypeignore":"file_type_light_rehype.svg",".rehyperc.cjs":"file_type_light_rehype.svg",".rehyperc.js":"file_type_light_rehype.svg",".rehyperc.json":"file_type_light_rehype.svg",".rehyperc.mjs":"file_type_light_rehype.svg",".rehyperc.yml":"file_type_light_rehype.svg",".rehyperc.yaml":"file_type_light_rehype.svg",".remarkrc":"file_type_light_remark.svg",".remarkignore":"file_type_light_remark.svg",".remarkrc.cjs":"file_type_light_remark.svg",".remarkrc.js":"file_type_light_remark.svg",".remarkrc.json":"file_type_light_remark.svg",".remarkrc.mjs":"file_type_light_remark.svg",".remarkrc.yml":"file_type_light_remark.svg",".remarkrc.yaml":"file_type_light_remark.svg",".renovaterc":"file_type_renovate.svg","renovate.json":"file_type_renovate.svg",".renovaterc.json":"file_type_renovate.svg",".retextrc":"file_type_light_retext.svg",".retextignore":"file_type_light_retext.svg",".retextrc.cjs":"file_type_light_retext.svg",".retextrc.js":"file_type_light_retext.svg",".retextrc.json":"file_type_light_retext.svg",".retextrc.mjs":"file_type_light_retext.svg",".retextrc.yml":"file_type_light_retext.svg",".retextrc.yaml":"file_type_light_retext.svg","robots.txt":"file_type_robots.svg","rollup.config.js":"file_type_rollup.svg","rollup.config.cjs":"file_type_rollup.svg","rollup.config.mjs":"file_type_rollup.svg","rollup.config.coffee":"file_type_rollup.svg","rollup.config.ts":"file_type_rollup.svg","rollup.config.common.js":"file_type_rollup.svg","rollup.config.common.cjs":"file_type_rollup.svg","rollup.config.common.mjs":"file_type_rollup.svg","rollup.config.common.coffee":"file_type_rollup.svg","rollup.config.common.ts":"file_type_rollup.svg","rollup.config.dev.js":"file_type_rollup.svg","rollup.config.dev.cjs":"file_type_rollup.svg","rollup.config.dev.mjs":"file_type_rollup.svg","rollup.config.dev.coffee":"file_type_rollup.svg","rollup.config.dev.ts":"file_type_rollup.svg","rollup.config.prod.js":"file_type_rollup.svg","rollup.config.prod.cjs":"file_type_rollup.svg","rollup.config.prod.mjs":"file_type_rollup.svg","rollup.config.prod.coffee":"file_type_rollup.svg","rollup.config.prod.ts":"file_type_rollup.svg",".rspec":"file_type_rspec.svg",".rubocop.yml":"file_type_light_rubocop.svg",".rubocop_todo.yml":"file_type_light_rubocop.svg","rust-toolchain":"file_type_light_rust_toolchain.svg",".sailsrc":"file_type_sails.svg",".sentryclirc":"file_type_sentry.svg",".sequelizerc":"file_type_sequelize.svg",".sequelizerc.js":"file_type_sequelize.svg",".sequelizerc.json":"file_type_sequelize.svg","serverless.yml":"file_type_serverless.svg","serverless.json":"file_type_serverless.svg","serverless.js":"file_type_serverless.svg","serverless.ts":"file_type_serverless.svg","snapcraft.yaml":"file_type_snapcraft.svg",".snyk":"file_type_snyk.svg",".solidarity":"file_type_solidarity.svg",".solidarity.json":"file_type_solidarity.svg",".stylelintrc":"file_type_light_stylelint.svg",".stylelintignore":"file_type_light_stylelint.svg",".stylelintcache":"file_type_light_stylelint.svg","stylelint.config.js":"file_type_light_stylelint.svg","stylelint.config.json":"file_type_light_stylelint.svg","stylelint.config.yaml":"file_type_light_stylelint.svg","stylelint.config.yml":"file_type_light_stylelint.svg","stylelint.config.ts":"file_type_light_stylelint.svg","stylelint.config.cjs":"file_type_light_stylelint.svg",".stylelintrc.js":"file_type_light_stylelint.svg",".stylelintrc.json":"file_type_light_stylelint.svg",".stylelintrc.yaml":"file_type_light_stylelint.svg",".stylelintrc.yml":"file_type_light_stylelint.svg",".stylelintrc.ts":"file_type_light_stylelint.svg",".stylelintrc.cjs":"file_type_light_stylelint.svg",".stylish-haskell.yaml":"file_type_stylish_haskell.svg",".svnignore":"file_type_subversion.svg","package.pins":"file_type_swift.svg","symfony.lock":"file_type_light_symfony.svg","tailwind.js":"file_type_tailwind.svg","tailwind.cjs":"file_type_tailwind.svg","tailwind.coffee":"file_type_tailwind.svg","tailwind.ts":"file_type_tailwind.svg","tailwind.json":"file_type_tailwind.svg","tailwind.config.js":"file_type_tailwind.svg","tailwind.config.cjs":"file_type_tailwind.svg","tailwind.config.coffee":"file_type_tailwind.svg","tailwind.config.ts":"file_type_tailwind.svg","tailwind.config.json":"file_type_tailwind.svg",".testcaferc.json":"file_type_light_testcafe.svg",".tfignore":"file_type_tfs.svg","tox.ini":"file_type_tox.svg",".travis.yml":"file_type_travis.svg","tsconfig.json":"file_type_tsconfig.svg","tsconfig.app.json":"file_type_tsconfig.svg","tsconfig.base.json":"file_type_tsconfig.svg","tsconfig.common.json":"file_type_tsconfig.svg","tsconfig.dev.json":"file_type_tsconfig.svg","tsconfig.development.json":"file_type_tsconfig.svg","tsconfig.e2e.json":"file_type_tsconfig.svg","tsconfig.prod.json":"file_type_tsconfig.svg","tsconfig.production.json":"file_type_tsconfig.svg","tsconfig.server.json":"file_type_tsconfig.svg","tsconfig.spec.json":"file_type_tsconfig.svg","tsconfig.staging.json":"file_type_tsconfig.svg","tsconfig.test.json":"file_type_tsconfig.svg","tsconfig.lib.json":"file_type_tsconfig.svg","tsconfig.lib.prod.json":"file_type_tsconfig.svg","tslint.json":"file_type_tslint.svg","tslint.yaml":"file_type_tslint.svg","tslint.yml":"file_type_tslint.svg","typedoc.js":"file_type_typedoc.svg","typedoc.json":"file_type_typedoc.svg",".unibeautifyrc":"file_type_light_unibeautify.svg","unibeautify.config.js":"file_type_light_unibeautify.svg",".unibeautifyrc.js":"file_type_light_unibeautify.svg",".unibeautifyrc.json":"file_type_light_unibeautify.svg",".unibeautifyrc.yaml":"file_type_light_unibeautify.svg",".unibeautifyrc.yml":"file_type_light_unibeautify.svg",unlicense:"file_type_unlicense.svg",unlicence:"file_type_unlicense.svg","unlicense.md":"file_type_unlicense.svg","unlicense.txt":"file_type_unlicense.svg","unlicence.md":"file_type_unlicense.svg","unlicence.txt":"file_type_unlicense.svg",vagrantfile:"file_type_vagrant.svg","vapor.yml":"file_type_vapor.svg",".vimrc":"file_type_vim.svg",".gvimrc":"file_type_vim.svg","vite.config.js":"file_type_vite.svg","vite.config.ts":"file_type_vite.svg",".vscodeignore":"file_type_vscode.svg","launch.json":"file_type_vscode.svg","tasks.json":"file_type_vscode.svg","vscodeignore.json":"file_type_vscode.svg",".vuerc":"file_type_vueconfig.svg","vue.config.js":"file_type_vueconfig.svg","wallaby.json":"file_type_wallaby.svg","wallaby.js":"file_type_wallaby.svg","wallaby.ts":"file_type_wallaby.svg","wallaby.coffee":"file_type_wallaby.svg","wallaby.conf.json":"file_type_wallaby.svg","wallaby.conf.js":"file_type_wallaby.svg","wallaby.conf.ts":"file_type_wallaby.svg","wallaby.conf.coffee":"file_type_wallaby.svg",".wallaby.json":"file_type_wallaby.svg",".wallaby.js":"file_type_wallaby.svg",".wallaby.ts":"file_type_wallaby.svg",".wallaby.coffee":"file_type_wallaby.svg",".wallaby.conf.json":"file_type_wallaby.svg",".wallaby.conf.js":"file_type_wallaby.svg",".wallaby.conf.ts":"file_type_wallaby.svg",".wallaby.conf.coffee":"file_type_wallaby.svg",".watchmanconfig":"file_type_watchmanconfig.svg","webpack.base.conf.js":"file_type_webpack.svg","webpack.base.conf.coffee":"file_type_webpack.svg","webpack.base.conf.ts":"file_type_webpack.svg","webpack.common.js":"file_type_webpack.svg","webpack.common.coffee":"file_type_webpack.svg","webpack.common.ts":"file_type_webpack.svg","webpack.config.js":"file_type_webpack.svg","webpack.config.coffee":"file_type_webpack.svg","webpack.config.ts":"file_type_webpack.svg","webpack.config.base.js":"file_type_webpack.svg","webpack.config.base.coffee":"file_type_webpack.svg","webpack.config.base.ts":"file_type_webpack.svg","webpack.config.common.js":"file_type_webpack.svg","webpack.config.common.coffee":"file_type_webpack.svg","webpack.config.common.ts":"file_type_webpack.svg","webpack.config.dev.js":"file_type_webpack.svg","webpack.config.dev.coffee":"file_type_webpack.svg","webpack.config.dev.ts":"file_type_webpack.svg","webpack.config.development.js":"file_type_webpack.svg","webpack.config.development.coffee":"file_type_webpack.svg","webpack.config.development.ts":"file_type_webpack.svg","webpack.config.staging.js":"file_type_webpack.svg","webpack.config.staging.coffee":"file_type_webpack.svg","webpack.config.staging.ts":"file_type_webpack.svg","webpack.config.test.js":"file_type_webpack.svg","webpack.config.test.coffee":"file_type_webpack.svg","webpack.config.test.ts":"file_type_webpack.svg","webpack.config.prod.js":"file_type_webpack.svg","webpack.config.prod.coffee":"file_type_webpack.svg","webpack.config.prod.ts":"file_type_webpack.svg","webpack.config.production.js":"file_type_webpack.svg","webpack.config.production.coffee":"file_type_webpack.svg","webpack.config.production.ts":"file_type_webpack.svg","webpack.config.babel.js":"file_type_webpack.svg","webpack.config.babel.coffee":"file_type_webpack.svg","webpack.config.babel.ts":"file_type_webpack.svg","webpack.config.base.babel.js":"file_type_webpack.svg","webpack.config.base.babel.coffee":"file_type_webpack.svg","webpack.config.base.babel.ts":"file_type_webpack.svg","webpack.config.common.babel.js":"file_type_webpack.svg","webpack.config.common.babel.coffee":"file_type_webpack.svg","webpack.config.common.babel.ts":"file_type_webpack.svg","webpack.config.dev.babel.js":"file_type_webpack.svg","webpack.config.dev.babel.coffee":"file_type_webpack.svg","webpack.config.dev.babel.ts":"file_type_webpack.svg","webpack.config.development.babel.js":"file_type_webpack.svg","webpack.config.development.babel.coffee":"file_type_webpack.svg","webpack.config.development.babel.ts":"file_type_webpack.svg","webpack.config.staging.babel.js":"file_type_webpack.svg","webpack.config.staging.babel.coffee":"file_type_webpack.svg","webpack.config.staging.babel.ts":"file_type_webpack.svg","webpack.config.test.babel.js":"file_type_webpack.svg","webpack.config.test.babel.coffee":"file_type_webpack.svg","webpack.config.test.babel.ts":"file_type_webpack.svg","webpack.config.prod.babel.js":"file_type_webpack.svg","webpack.config.prod.babel.coffee":"file_type_webpack.svg","webpack.config.prod.babel.ts":"file_type_webpack.svg","webpack.config.production.babel.js":"file_type_webpack.svg","webpack.config.production.babel.coffee":"file_type_webpack.svg","webpack.config.production.babel.ts":"file_type_webpack.svg","webpack.dev.js":"file_type_webpack.svg","webpack.dev.coffee":"file_type_webpack.svg","webpack.dev.ts":"file_type_webpack.svg","webpack.dev.conf.js":"file_type_webpack.svg","webpack.dev.conf.coffee":"file_type_webpack.svg","webpack.dev.conf.ts":"file_type_webpack.svg","webpack.prod.js":"file_type_webpack.svg","webpack.prod.coffee":"file_type_webpack.svg","webpack.prod.ts":"file_type_webpack.svg","webpack.prod.conf.js":"file_type_webpack.svg","webpack.prod.conf.coffee":"file_type_webpack.svg","webpack.prod.conf.ts":"file_type_webpack.svg","webpack.main.config.js":"file_type_webpack.svg","webpack.main.config.coffee":"file_type_webpack.svg","webpack.main.config.ts":"file_type_webpack.svg","webpack.mix.js":"file_type_webpack.svg","webpack.mix.coffee":"file_type_webpack.svg","webpack.mix.ts":"file_type_webpack.svg","webpack.plugins.js":"file_type_webpack.svg","webpack.plugins.coffee":"file_type_webpack.svg","webpack.plugins.ts":"file_type_webpack.svg","webpack.renderer.config.js":"file_type_webpack.svg","webpack.renderer.config.coffee":"file_type_webpack.svg","webpack.renderer.config.ts":"file_type_webpack.svg","webpack.rules.js":"file_type_webpack.svg","webpack.rules.coffee":"file_type_webpack.svg","webpack.rules.ts":"file_type_webpack.svg","webpack.test.conf.js":"file_type_webpack.svg","webpack.test.conf.coffee":"file_type_webpack.svg","webpack.test.conf.ts":"file_type_webpack.svg","wercker.yml":"file_type_wercker.svg","wpml-config.xml":"file_type_wpml.svg",".yamllint":"file_type_yamllint.svg",".yaspellerrc":"file_type_yandex.svg",".yaspeller.json":"file_type_yandex.svg","yarn.lock":"file_type_yarn.svg",".yarnrc":"file_type_yarn.svg",".yarnrc.yml":"file_type_yarn.svg",".yarnclean":"file_type_yarn.svg",".yarn-integrity":"file_type_yarn.svg",".yarn-metadata.json":"file_type_yarn.svg",".yarnignore":"file_type_yarn.svg",".yo-rc.json":"file_type_yeoman.svg","now.json":"file_type_light_zeit.svg",".nowignore":"file_type_light_zeit.svg","vercel.json":"file_type_light_zeit.svg",".vercelignore":"file_type_light_zeit.svg",Jenkinsfile:"file_type_groovy.svg",config:"file_type_ini.svg",gitconfig:"file_type_ini.svg",guardfile:"file_type_ruby.svg",podfile:"file_type_ruby.svg",capfile:"file_type_ruby.svg"}),tb}var nb={},Az;function d9e(){return Az||(Az=1,Object.defineProperty(nb,"__esModule",{value:!0}),nb.FolderNamesToIcon=void 0,nb.FolderNamesToIcon={android:"folder_type_android.svg",api:"folder_type_api.svg",".api":"folder_type_api.svg",apis:"folder_type_api.svg",".apis":"folder_type_api.svg",app:"folder_type_app.svg",".app":"folder_type_app.svg",arangodb:"folder_type_arangodb.svg",arango:"folder_type_arangodb.svg",assets:"folder_type_asset.svg",".assets":"folder_type_asset.svg",audio:"folder_type_audio.svg",".audio":"folder_type_audio.svg",audios:"folder_type_audio.svg",".audios":"folder_type_audio.svg",sound:"folder_type_audio.svg",".sound":"folder_type_audio.svg",sounds:"folder_type_audio.svg",".sounds":"folder_type_audio.svg",aurelia_project:"folder_type_aurelia.svg",aws:"folder_type_aws.svg",".aws":"folder_type_aws.svg",azure:"folder_type_azure.svg",".azure":"folder_type_azure.svg","azure-pipelines":"folder_type_azurepipelines.svg",".azure-pipelines":"folder_type_azurepipelines.svg",bin:"folder_type_binary.svg",".bin":"folder_type_binary.svg",blocs:"folder_type_bloc.svg",bloc:"folder_type_bloc.svg",blueprint:"folder_type_blueprint.svg",".blueprint":"folder_type_blueprint.svg",blueprints:"folder_type_blueprint.svg",".blueprints":"folder_type_blueprint.svg",bower_components:"folder_type_bower.svg",".buildkite":"folder_type_buildkite.svg",cake:"folder_type_cake.svg",".cake":"folder_type_cake.svg",certificates:"folder_type_certificate.svg",".certificates":"folder_type_certificate.svg",certs:"folder_type_certificate.svg","certs.":"folder_type_certificate.svg",chef:"folder_type_chef.svg",".chef":"folder_type_chef.svg",".circleci":"folder_type_circleci.svg",cli:"folder_type_cli.svg",cmd:"folder_type_cli.svg",command:"folder_type_cli.svg",commands:"folder_type_cli.svg",commandline:"folder_type_cli.svg",console:"folder_type_cli.svg",client:"folder_type_client.svg",clients:"folder_type_client.svg",".cmake":"folder_type_cmake.svg",cmake:"folder_type_cmake.svg",component:"folder_type_component.svg",components:"folder_type_component.svg",".components":"folder_type_component.svg",widgets:"folder_type_component.svg",composer:"folder_type_composer.svg",".composer":"folder_type_composer.svg",conf:"folder_type_config.svg",".conf":"folder_type_config.svg",config:"folder_type_config.svg",".config":"folder_type_config.svg",configs:"folder_type_config.svg",".configs":"folder_type_config.svg",configuration:"folder_type_config.svg",".configuration":"folder_type_config.svg",configurations:"folder_type_config.svg",".configurations":"folder_type_config.svg",setting:"folder_type_config.svg",".setting":"folder_type_config.svg",settings:"folder_type_config.svg",".settings":"folder_type_config.svg",ini:"folder_type_config.svg",".ini":"folder_type_config.svg",initializers:"folder_type_config.svg",".initializers":"folder_type_config.svg",controller:"folder_type_controller.svg",controllers:"folder_type_controller.svg",".controllers":"folder_type_controller.svg",handlers:"folder_type_controller.svg",".handlers":"folder_type_controller.svg",coverage:"folder_type_coverage.svg",css:"folder_type_css.svg",_css:"folder_type_css.svg",cubits:"folder_type_cubit.svg",cubit:"folder_type_cubit.svg",cypress:"folder_type_cypress.svg",".dapr":"folder_type_dapr.svg",dapr:"folder_type_dapr.svg",db:"folder_type_db.svg",database:"folder_type_db.svg",sql:"folder_type_db.svg",data:"folder_type_db.svg",repo:"folder_type_db.svg",repository:"folder_type_db.svg",repositories:"folder_type_db.svg",debian:"folder_type_debian.svg",deb:"folder_type_debian.svg",".dependabot":"folder_type_dependabot.svg",".devcontainer":"folder_type_devcontainer.svg",dist:"folder_type_dist.svg",".dist":"folder_type_dist.svg",dists:"folder_type_dist.svg",out:"folder_type_dist.svg",outs:"folder_type_dist.svg",export:"folder_type_dist.svg",exports:"folder_type_dist.svg",build:"folder_type_dist.svg",".build":"folder_type_dist.svg",builds:"folder_type_dist.svg",release:"folder_type_dist.svg",releases:"folder_type_dist.svg",target:"folder_type_dist.svg",targets:"folder_type_dist.svg",docker:"folder_type_docker.svg",".docker":"folder_type_docker.svg",docs:"folder_type_docs.svg",doc:"folder_type_docs.svg",e2e:"folder_type_e2e.svg",".elasticbeanstalk":"folder_type_elasticbeanstalk.svg",".ebextensions":"folder_type_elasticbeanstalk.svg",electron:"folder_type_light_electron.svg",".expo":"folder_type_light_expo.svg",".expo-shared":"folder_type_light_expo.svg",favicon:"folder_type_favicon.svg",favicons:"folder_type_favicon.svg",flow:"folder_type_flow.svg","flow-typed":"folder_type_flow.svg",fonts:"folder_type_light_fonts.svg",font:"folder_type_light_fonts.svg",fnt:"folder_type_light_fonts.svg",gcp:"folder_type_gcp.svg",".gcp":"folder_type_gcp.svg",".git":"folder_type_git.svg",submodules:"folder_type_git.svg",".submodules":"folder_type_git.svg",".github":"folder_type_github.svg",".gitlab":"folder_type_gitlab.svg",gradle:"folder_type_light_gradle.svg",".gradle":"folder_type_light_gradle.svg",graphql:"folder_type_graphql.svg",grunt:"folder_type_grunt.svg",gulp:"folder_type_gulp.svg","gulpfile.js":"folder_type_gulp.svg","gulpfile.coffee":"folder_type_gulp.svg","gulpfile.ts":"folder_type_gulp.svg","gulpfile.babel.js":"folder_type_gulp.svg","gulpfile.babel.coffee":"folder_type_gulp.svg","gulpfile.babel.ts":"folder_type_gulp.svg",".haxelib":"folder_type_haxelib.svg",haxe_libraries:"folder_type_haxelib.svg",helper:"folder_type_helper.svg",".helper":"folder_type_helper.svg",helpers:"folder_type_helper.svg",".helpers":"folder_type_helper.svg",hook:"folder_type_hook.svg",".hook":"folder_type_hook.svg",hooks:"folder_type_hook.svg",".hooks":"folder_type_hook.svg",".husky":"folder_type_husky.svg",".idea":"folder_type_idea.svg",images:"folder_type_images.svg",image:"folder_type_images.svg",img:"folder_type_images.svg",icons:"folder_type_images.svg",icon:"folder_type_images.svg",ico:"folder_type_images.svg",screenshot:"folder_type_images.svg",screenshots:"folder_type_images.svg",svg:"folder_type_images.svg",include:"folder_type_include.svg",includes:"folder_type_include.svg",incl:"folder_type_include.svg",inc:"folder_type_include.svg",".include":"folder_type_include.svg",".includes":"folder_type_include.svg",".incl":"folder_type_include.svg",".inc":"folder_type_include.svg",_include:"folder_type_include.svg",_includes:"folder_type_include.svg",_incl:"folder_type_include.svg",_inc:"folder_type_include.svg",interface:"folder_type_interfaces.svg",interfaces:"folder_type_interfaces.svg",ios:"folder_type_ios.svg",js:"folder_type_js.svg",json:"folder_type_json.svg",kubernetes:"folder_type_kubernetes.svg",k8s:"folder_type_kubernetes.svg",kube:"folder_type_kubernetes.svg",kuber:"folder_type_kubernetes.svg",".kubernetes":"folder_type_kubernetes.svg",".k8s":"folder_type_kubernetes.svg",".kube":"folder_type_kubernetes.svg",".kuber":"folder_type_kubernetes.svg",less:"folder_type_less.svg",_less:"folder_type_less.svg",lib:"folder_type_library.svg",libs:"folder_type_library.svg",".lib":"folder_type_library.svg",".libs":"folder_type_library.svg",library:"folder_type_library.svg",libraries:"folder_type_library.svg",linux:"folder_type_linux.svg",lang:"folder_type_locale.svg",language:"folder_type_locale.svg",languages:"folder_type_locale.svg",locale:"folder_type_locale.svg",locales:"folder_type_locale.svg",_locale:"folder_type_locale.svg",_locales:"folder_type_locale.svg",internationalization:"folder_type_locale.svg",globalization:"folder_type_locale.svg",localization:"folder_type_locale.svg",i18n:"folder_type_locale.svg",g11n:"folder_type_locale.svg",l10n:"folder_type_locale.svg",log:"folder_type_log.svg",logs:"folder_type_log.svg",macos:"folder_type_macos.svg",darwin:"folder_type_macos.svg",mariadb:"folder_type_mariadb.svg",maria:"folder_type_mariadb.svg",".mvn":"folder_type_maven.svg",memcached:"folder_type_memcached.svg",".memcached":"folder_type_memcached.svg",".meteor":"folder_type_light_meteor.svg",middleware:"folder_type_middleware.svg",middlewares:"folder_type_middleware.svg",minikube:"folder_type_minikube.svg",minik8s:"folder_type_minikube.svg",minikuber:"folder_type_minikube.svg",mjml:"folder_type_mjml.svg",".mjml":"folder_type_mjml.svg",mocks:"folder_type_mock.svg",".mocks":"folder_type_mock.svg",__mocks__:"folder_type_mock.svg",model:"folder_type_model.svg",".model":"folder_type_model.svg",models:"folder_type_model.svg",".models":"folder_type_model.svg",entities:"folder_type_model.svg",".entities":"folder_type_model.svg",modules:"folder_type_module.svg",mongodb:"folder_type_mongodb.svg",mongo:"folder_type_mongodb.svg",mysqldb:"folder_type_light_mysql.svg",mysql:"folder_type_light_mysql.svg",".next":"folder_type_next.svg",nginx:"folder_type_nginx.svg","conf.d":"folder_type_nginx.svg",node_modules:"folder_type_light_node.svg",notification:"folder_type_notification.svg",notifications:"folder_type_notification.svg",event:"folder_type_notification.svg",events:"folder_type_notification.svg",".nuget":"folder_type_nuget.svg",".nuxt":"folder_type_nuxt.svg",package:"folder_type_package.svg",packages:"folder_type_package.svg",".package":"folder_type_package.svg",".packages":"folder_type_package.svg",pkg:"folder_type_package.svg",".paket":"folder_type_paket.svg",php:"folder_type_php.svg",".pio":"folder_type_platformio.svg",".pioenvs":"folder_type_platformio.svg",plugin:"folder_type_plugin.svg",".plugin":"folder_type_plugin.svg",plugins:"folder_type_plugin.svg",".plugins":"folder_type_plugin.svg",extension:"folder_type_plugin.svg",".extension":"folder_type_plugin.svg",extensions:"folder_type_plugin.svg",".extensions":"folder_type_plugin.svg",private:"folder_type_private.svg",".private":"folder_type_private.svg",public:"folder_type_public.svg",".public":"folder_type_public.svg",".venv":"folder_type_python.svg",".virtualenv":"folder_type_python.svg",ravendb:"folder_type_ravendb.svg",redis:"folder_type_redis.svg",redux:"folder_type_light_redux.svg",route:"folder_type_route.svg",routes:"folder_type_route.svg",_route:"folder_type_route.svg",_routes:"folder_type_route.svg",routers:"folder_type_route.svg",sass:"folder_type_light_sass.svg",scss:"folder_type_light_sass.svg",_sass:"folder_type_light_sass.svg",_scss:"folder_type_light_sass.svg",script:"folder_type_script.svg",scripts:"folder_type_script.svg",server:"folder_type_server.svg",service:"folder_type_services.svg",services:"folder_type_services.svg",src:"folder_type_src.svg",source:"folder_type_src.svg",sources:"folder_type_src.svg",sso:"folder_type_sso.svg",story:"folder_type_story.svg",stories:"folder_type_story.svg",__stories__:"folder_type_story.svg",".storybook":"folder_type_story.svg",style:"folder_type_style.svg",styles:"folder_type_style.svg",temp:"folder_type_temp.svg",".temp":"folder_type_temp.svg",tmp:"folder_type_temp.svg",".tmp":"folder_type_temp.svg",template:"folder_type_template.svg",".template":"folder_type_template.svg",templates:"folder_type_template.svg",".templates":"folder_type_template.svg",tests:"folder_type_test.svg",".tests":"folder_type_test.svg",test:"folder_type_test.svg",".test":"folder_type_test.svg",__tests__:"folder_type_test.svg",__test__:"folder_type_test.svg",spec:"folder_type_test.svg",".spec":"folder_type_test.svg",specs:"folder_type_test.svg",".specs":"folder_type_test.svg",integration:"folder_type_test.svg",theme:"folder_type_theme.svg",themes:"folder_type_theme.svg",tool:"folder_type_tools.svg",tools:"folder_type_tools.svg",".tools":"folder_type_tools.svg",util:"folder_type_tools.svg",utils:"folder_type_tools.svg",".travis":"folder_type_travis.svg",typescript:"folder_type_typescript.svg",ts:"folder_type_typescript.svg",typings:"folder_type_typings.svg","@types":"folder_type_typings.svg",vagrant:"folder_type_vagrant.svg",".vagrant":"folder_type_vagrant.svg",video:"folder_type_video.svg",".video":"folder_type_video.svg",videos:"folder_type_video.svg",".videos":"folder_type_video.svg",html:"folder_type_view.svg",view:"folder_type_view.svg",views:"folder_type_view.svg",layout:"folder_type_view.svg",layouts:"folder_type_view.svg",page:"folder_type_view.svg",pages:"folder_type_view.svg",_view:"folder_type_view.svg",_views:"folder_type_view.svg",_layout:"folder_type_view.svg",_layouts:"folder_type_view.svg",_page:"folder_type_view.svg",_pages:"folder_type_view.svg",".vs":"folder_type_vs.svg",".vscode":"folder_type_vscode.svg",vscode:"folder_type_vscode.svg",".vscode-test":"folder_type_vscode_test.svg",webpack:"folder_type_webpack.svg",windows:"folder_type_windows.svg",win32:"folder_type_windows.svg",www:"folder_type_www.svg",wwwroot:"folder_type_www.svg"}),nb}var rb={},Oz;function h9e(){return Oz||(Oz=1,Object.defineProperty(rb,"__esModule",{value:!0}),rb.LanguagesToIcon=void 0,rb.LanguagesToIcon={as:"file_type_actionscript.svg",ada:"file_type_light_ada.svg",prw:"file_type_advpl.svg",affect:"file_type_affectscript.svg",al:"file_type_al.svg",ansible:"file_type_ansible.svg",g4:"file_type_antlr.svg",any:"file_type_anyscript.svg",cls:"file_type_apex.svg",apl:"file_type_light_apl.svg",applescript:"file_type_applescript.svg",adoc:"file_type_asciidoc.svg",asp:"file_type_asp.svg",ats:"file_type_ats.svg",au3:"file_type_autoit.svg",avcs:"file_type_avro.svg",azcli:"file_type_azure.svg",bal:"file_type_ballerina.svg",bat:"file_type_bat.svg",cmd:"file_type_bat.svg",bats:"file_type_bats.svg",bzl:"file_type_bazel.svg",bf:"file_type_befunge.svg",bicep:"file_type_bicep.svg",bib:"file_type_light_tex.svg",biml:"file_type_biml.svg","blade.php":"file_type_blade.svg",blitzbasic:"file_type_blitzbasic.svg",bolt:"file_type_bolt.svg",bsq:"file_type_bosque.svg",c:"file_type_c.svg",cabal:"file_type_cabal.svg",Caddyfile:"file_type_caddy.svg",casc:"file_type_casc.svg",cddl:"file_type_cddl.svg",ceylon:"file_type_ceylon.svg",cfc:"file_type_cfc.svg",clj:"file_type_clojure.svg",cljs:"file_type_clojure.svg",cljc:"file_type_clojure.svg",cljx:"file_type_clojure.svg",clojure:"file_type_clojure.svg",edn:"file_type_clojure.svg",clojurescript:"file_type_clojurescript.svg",cmake:"file_type_cmake.svg",cbl:"file_type_cobol.svg",coffee:"file_type_coffeescript.svg",cson:"file_type_coffeescript.svg",confluence:"file_type_confluence.svg",ckbk:"file_type_chef_cookbook.svg",cpp:"file_type_cpp.svg",cc:"file_type_cpp.svg",cxx:"file_type_cpp.svg",hpp:"file_type_cpp.svg",hh:"file_type_cpp.svg",hxx:"file_type_cpp.svg",h:"file_type_cpp.svg",ino:"file_type_cpp.svg",inl:"file_type_cpp.svg",ipp:"file_type_cpp.svg",cr:"file_type_light_crystal.svg",cs:"file_type_csharp.svg",csx:"file_type_csharp.svg",cake:"file_type_csharp.svg",css:"file_type_css.svg",cu:"file_type_cuda.svg",pyx:"file_type_cython.svg",dal:"file_type_dal.svg",dart:"file_type_dartlang.svg",diff:"file_type_diff.svg",patch:"file_type_diff.svg",rej:"file_type_diff.svg",dockerfile:"file_type_docker.svg",dtx:"file_type_light_tex.svg",env:"file_type_light_config.svg",dot:"file_type_dotjs.svg",dox:"file_type_doxygen.svg",drl:"file_type_drools.svg",dust:"file_type_dustjs.svg",edge:"file_type_edge.svg",eex:"file_type_eex.svg",ex:"file_type_elixir.svg",elm:"file_type_elm.svg",erb:"file_type_erb.svg",erl:"file_type_erlang.svg",falcon:"file_type_falcon.svg",fs:"file_type_fsharp.svg",fsi:"file_type_fsharp.svg",fsx:"file_type_fsharp.svg",fsscript:"file_type_fsharp.svg",fthtml:"file_type_fthtml.svg",gspec:"file_type_galen.svg",gcode:"file_type_gcode.svg",gen:"file_type_genstat.svg",glsl:"file_type_glsl.svg",glyphs:"file_type_glyphs.svg",gp:"file_type_gnuplot.svg",go:"file_type_go.svg",gql:"file_type_graphql.svg",groovy:"file_type_groovy.svg",gvy:"file_type_groovy.svg",gradle:"file_type_groovy.svg",haml:"file_type_haml.svg",handlebars:"file_type_handlebars.svg",hbs:"file_type_handlebars.svg",hjs:"file_type_handlebars.svg",prg:"file_type_harbour.svg",hs:"file_type_haskell.svg",haxe:"file_type_haxe.svg","helm.tpl":"file_type_helm.svg",hjson:"file_type_light_hjson.svg",hlsl:"file_type_hlsl.svg",hlsli:"file_type_hlsl.svg",fx:"file_type_hlsl.svg",fxh:"file_type_hlsl.svg",vsh:"file_type_hlsl.svg",psh:"file_type_hlsl.svg",cginc:"file_type_hlsl.svg",compute:"file_type_hlsl.svg",hosts:"file_type_host.svg",html:"file_type_html.svg",htm:"file_type_html.svg",shtml:"file_type_html.svg",xhtml:"file_type_html.svg",mdoc:"file_type_html.svg",jsp:"file_type_html.svg",aspx:"file_type_html.svg",jshtm:"file_type_html.svg",volt:"file_type_html.svg",ejs:"file_type_html.svg",rhtml:"file_type_html.svg",http:"file_type_http.svg",hy:"file_type_hy.svg",hypr:"file_type_hypr.svg",icl:"file_type_icl.svg",imba:"file_type_imba.svg",properties:"file_type_light_ini.svg",gitconfig:"file_type_light_ini.svg",cfg:"file_type_light_ini.svg",conf:"file_type_light_ini.svg",ink:"file_type_ink.svg",iss:"file_type_innosetup.svg",io:"file_type_light_io.svg",janet:"file_type_janet.svg",java:"file_type_java.svg",jav:"file_type_java.svg",js:"file_type_light_js.svg",es6:"file_type_light_js.svg",mjs:"file_type_light_js.svg",pac:"file_type_light_js.svg",jsx:"file_type_reactjs.svg",jekyll:"file_type_jekyll.svg",json:"file_type_light_json.svg",bowerrc:"file_type_light_json.svg",jshintrc:"file_type_light_json.svg",jscsrc:"file_type_light_json.svg",eslintrc:"file_type_light_json.svg",babelrc:"file_type_light_json.svg",webmanifest:"file_type_light_json.svg",jsonc:"file_type_light_json.svg",jsonnet:"file_type_jsonnet.svg",json5:"file_type_light_json5.svg",jl:"file_type_julia.svg",id:"file_type_iodine.svg",kv:"file_type_kivy.svg",ks:"file_type_kos.svg",kt:"file_type_kotlin.svg",".kusto":"file_type_kusto.svg",tex:"file_type_light_tex.svg",lat:"file_type_latino.svg",less:"file_type_less.svg",flex:"file_type_lex.svg",lisp:"file_type_lisp.svg",log:"file_type_log.svg",lol:"file_type_lolcode.svg",lsl:"file_type_lsl.svg",lua:"file_type_lua.svg",mk:"file_type_makefile.svg",md:"file_type_markdown.svg",mdown:"file_type_markdown.svg",markdown:"file_type_markdown.svg",markdn:"file_type_markdown.svg",marko:"file_type_marko.svg",mat:"file_type_matlab.svg",ms:"file_type_maxscript.svg",mdx:"file_type_light_mdx.svg",mediawiki:"file_type_mediawiki.svg",mel:"file_type_maya.svg","meson.build":"file_type_meson.svg",mjml:"file_type_mjml.svg",ep:"file_type_mojolicious.svg",mongo:"file_type_mongo.svg",mson:"file_type_mson.svg",ne:"file_type_nearly.svg",nim:"file_type_nim.svg",nimble:"file_type_nimble.svg",nix:"file_type_nix.svg",nsi:"file_type_nsi.svg",nunjucks:"file_type_nunjucks.svg",ml:"file_type_ocaml.svg",o3:"file_type_ogone.svg",pas:"file_type_delphi.svg",pddl:"file_type_pddl.svg",pl:"file_type_perl.svg",pm:"file_type_perl.svg",pod:"file_type_perl.svg",t:"file_type_perl.svg",PL:"file_type_perl.svg",psgi:"file_type_perl.svg",p6:"file_type_perl.svg",pl6:"file_type_perl.svg",pm6:"file_type_perl.svg",nqp:"file_type_perl.svg",pgsql:"file_type_pgsql.svg",php:"file_type_php.svg",php4:"file_type_php.svg",php5:"file_type_php.svg",phtml:"file_type_php.svg",ctp:"file_type_php.svg",pine:"file_type_pine.svg",txt:"file_type_text.svg",ddl:"file_type_plsql.svg",polymer:"file_type_polymer.svg",pony:"file_type_pony.svg",pcss:"file_type_postcss.svg",ps1:"file_type_powershell.svg",psm1:"file_type_powershell.svg",psd1:"file_type_powershell.svg",pssc:"file_type_powershell.svg",psrc:"file_type_powershell.svg",prisma:"file_type_light_prisma.svg",pro:"file_type_prolog.svg",rules:"file_type_prometheus.svg",pp:"file_type_puppet.svg",purs:"file_type_light_purescript.svg",arr:"file_type_pyret.svg",py:"file_type_python.svg",rpy:"file_type_python.svg",pyw:"file_type_python.svg",cpy:"file_type_python.svg",gyp:"file_type_python.svg",gypi:"file_type_python.svg",qvs:"file_type_qlikview.svg",qml:"file_type_qml.svg",qs:"file_type_qsharp.svg",r:"file_type_r.svg",rhistory:"file_type_r.svg",rprofile:"file_type_r.svg",rt:"file_type_r.svg",rkt:"file_type_racket.svg",cshtml:"file_type_razor.svg",raml:"file_type_raml.svg",re:"file_type_reason.svg",red:"file_type_red.svg",res:"file_type_rescript.svg",rst:"file_type_rest.svg",rex:"file_type_rexx.svg",tag:"file_type_riot.svg",rmd:"file_type_rmd.svg",robot:"file_type_robotframework.svg",rb:"file_type_ruby.svg",rbx:"file_type_ruby.svg",rjs:"file_type_ruby.svg",gemspec:"file_type_ruby.svg",rake:"file_type_ruby.svg",ru:"file_type_ruby.svg",rs:"file_type_light_rust.svg",san:"file_type_san.svg",sbt:"file_type_sbt.svg",scad:"file_type_openscad.svg",scala:"file_type_scala.svg",sce:"file_type_scilab.svg",scss:"file_type_scss.svg",shader:"file_type_light_shaderlab.svg",sh:"file_type_shell.svg",bash:"file_type_shell.svg",bashrc:"file_type_shell.svg",bash_aliases:"file_type_shell.svg",bash_profile:"file_type_shell.svg",bash_login:"file_type_shell.svg",ebuild:"file_type_shell.svg",install:"file_type_shell.svg",profile:"file_type_shell.svg",bash_logout:"file_type_shell.svg",zsh:"file_type_shell.svg",zshrc:"file_type_shell.svg",zprofile:"file_type_shell.svg",zlogin:"file_type_shell.svg",zlogout:"file_type_shell.svg",zshenv:"file_type_shell.svg","zsh-theme":"file_type_shell.svg",slang:"file_type_slang.svg",ice:"file_type_slice.svg",slim:"file_type_slim.svg",ss:"file_type_silverstripe.svg",tpl:"file_type_smarty.svg",snort:"file_type_snort.svg",sol:"file_type_light_solidity.svg",rq:"file_type_sparql.svg",sqf:"file_type_sqf.svg",sql:"file_type_sql.svg",dsql:"file_type_sql.svg",nut:"file_type_squirrel.svg",stan:"file_type_stan.svg",bazel:"file_type_bazel.svg",do:"file_type_stata.svg",stencil:"file_type_stencil.svg","st.css":"file_type_stylable.svg",styl:"file_type_light_stylus.svg",svelte:"file_type_svelte.svg",swagger:"file_type_swagger.svg",swift:"file_type_swift.svg",swig:"file_type_swig.svg",sv:"file_type_light_systemverilog.svg",tt:"file_type_t4tt.svg",teal:"file_type_teal.svg",tera:"file_type_tera.svg",tf:"file_type_terraform.svg",sty:"file_type_light_tex.svg",textile:"file_type_textile.svg",Tiltfile:"file_type_tiltfile.svg",toml:"file_type_light_toml.svg",ttcn3:"file_type_ttcn.svg",tuc:"file_type_tuc.svg",twig:"file_type_twig.svg",ts:"file_type_typescript.svg",tsx:"file_type_reactts.svg",vb:"file_type_vb.svg",brs:"file_type_vb.svg",vbs:"file_type_vb.svg",bas:"file_type_vb.svg",wsf:"file_type_script.svg",vm:"file_type_velocity.svg",v:"file_type_verilog.svg",vhdl:"file_type_vhdl.svg",vim:"file_type_vim.svg",vue:"file_type_vue.svg",wasm:"file_type_wasm.svg",wy:"file_type_wenyan.svg",wl:"file_type_wolfram.svg",wurst:"file_type_wurst.svg","xmake.lua":"file_type_xmake.svg",xml:"file_type_xml.svg",xsd:"file_type_xml.svg",ascx:"file_type_xml.svg",atom:"file_type_xml.svg",axml:"file_type_xml.svg",bpmn:"file_type_xml.svg",config:"file_type_xml.svg",cpt:"file_type_xml.svg",csl:"file_type_xml.svg",csproj:"file_type_xml.svg","csproj.user":"file_type_xml.svg",dita:"file_type_xml.svg",ditamap:"file_type_xml.svg",dtd:"file_type_xml.svg",dtml:"file_type_xml.svg",fsproj:"file_type_xml.svg",fxml:"file_type_xml.svg",iml:"file_type_xml.svg",isml:"file_type_xml.svg",jmx:"file_type_xml.svg",launch:"file_type_xml.svg",menu:"file_type_xml.svg",mxml:"file_type_xml.svg",nuspec:"file_type_xml.svg",opml:"file_type_xml.svg",owl:"file_type_xml.svg",proj:"file_type_xml.svg",props:"file_type_xml.svg",pt:"file_type_xml.svg",publishsettings:"file_type_xml.svg",pubxml:"file_type_xml.svg","pubxml.user":"file_type_xml.svg",rdf:"file_type_xml.svg",rng:"file_type_xml.svg",rss:"file_type_xml.svg",shproj:"file_type_xml.svg",storyboard:"file_type_xml.svg",svg:"file_type_xml.svg",targets:"file_type_xml.svg",tld:"file_type_xml.svg",tmx:"file_type_xml.svg",vbproj:"file_type_xml.svg","vbproj.user":"file_type_xml.svg",vcxproj:"file_type_xml.svg","vcxproj.filters":"file_type_xml.svg",wsdl:"file_type_xml.svg",wxi:"file_type_xml.svg",wxl:"file_type_xml.svg",wxs:"file_type_xml.svg",xaml:"file_type_xml.svg",xbl:"file_type_xml.svg",xib:"file_type_xml.svg",xlf:"file_type_xml.svg",xliff:"file_type_xml.svg",xpdl:"file_type_xml.svg",xul:"file_type_xml.svg",xoml:"file_type_xml.svg",xquery:"file_type_xquery.svg",xsl:"file_type_xsl.svg",xslt:"file_type_xsl.svg",bison:"file_type_yacc.svg",eyaml:"file_type_light_yaml.svg",eyml:"file_type_light_yaml.svg",yaml:"file_type_light_yaml.svg",yml:"file_type_light_yaml.svg",yang:"file_type_yang.svg",zig:"file_type_zig.svg"}),rb}var Rz;function f9e(){return Rz||(Rz=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getIconForOpenFolder=e.getIconForFile=e.getIconForFolder=e.DEFAULT_FILE=e.DEFAULT_ROOT_OPENED=e.DEFAULT_ROOT=e.DEFAULT_FOLDER_OPENED=e.DEFAULT_FOLDER=void 0;var n=l9e(),r=c9e(),i=u9e(),s=d9e(),a=h9e();e.DEFAULT_FOLDER="default_folder.svg",e.DEFAULT_FOLDER_OPENED="default_folder_opened.svg",e.DEFAULT_ROOT="default_root_folder.svg",e.DEFAULT_ROOT_OPENED="default_root_folder_opened.svg",e.DEFAULT_FILE="default_file.svg";function o(f){var m=s.FolderNamesToIcon[f];return m||e.DEFAULT_FOLDER}e.getIconForFolder=o;var l=void 0,u=void 0;function d(f){var m=i.FileNamesToIcon[f];if(m!==void 0)return m;var x=f.split(".");if(x.length>2){var v=x.pop(),_=x.pop(),w=r.FileExtensions2ToIcon[_+"."+v];if(w!==void 0)return w;if(!v)return e.DEFAULT_FILE;if(v===l)return u;var S=n.FileExtensions1ToIcon[v];if(S!==void 0)return l=v,u=S,S}else{var C=x.pop();if(!C)return e.DEFAULT_FILE;if(C===l)return u;var j=n.FileExtensions1ToIcon[C];if(j!==void 0)return l=C,u=j,j}var T=f.split(".").pop();if(T!==void 0){var E=a.LanguagesToIcon[T];if(E)return E}return e.DEFAULT_FILE}e.getIconForFile=d;function h(f){return o(f).split(".").shift()+"_opened.svg"}e.getIconForOpenFolder=h})(NT)),NT}var md=f9e();const iie="https://cdn.jsdelivr.net/gh/vscode-icons/vscode-icons@12.9.0/icons/";function pa({filename:e,className:n}){const r=md.getIconForFile(e)??md.DEFAULT_FILE;return c.jsx("img",{src:`${iie}${r}`,alt:"",className:n,loading:"lazy",decoding:"async",draggable:!1})}function V4({name:e,open:n=!1,className:r}){const i=n?md.getIconForOpenFolder(e)??md.DEFAULT_FOLDER_OPENED:md.getIconForFolder(e)??md.DEFAULT_FOLDER;return c.jsx("img",{src:`${iie}${i}`,alt:"",className:r,loading:"lazy",decoding:"async",draggable:!1})}function sie(){const[e,n]=y.useState(()=>typeof document<"u"&&document.documentElement.classList.contains("dark")?"dark":"light");return y.useEffect(()=>{const r=document.documentElement,i=()=>n(r.classList.contains("dark")?"dark":"light");i();const s=new MutationObserver(i);return s.observe(r,{attributes:!0,attributeFilter:["class"]}),()=>s.disconnect()},[]),e}const aie=Object.freeze(JSON.parse('{"colors":{"actionBar.toggledBackground":"#383a49","activityBarBadge.background":"#007ACC","checkbox.border":"#6B6B6B","editor.background":"#1E1E1E","editor.foreground":"#D4D4D4","editor.inactiveSelectionBackground":"#3A3D41","editor.selectionHighlightBackground":"#ADD6FF26","editorIndentGuide.activeBackground1":"#707070","editorIndentGuide.background1":"#404040","input.placeholderForeground":"#A6A6A6","list.activeSelectionIconForeground":"#FFF","list.dropBackground":"#383B3D","menu.background":"#252526","menu.border":"#454545","menu.foreground":"#CCCCCC","menu.selectionBackground":"#0078d4","menu.separatorBackground":"#454545","ports.iconRunningProcessForeground":"#369432","sideBarSectionHeader.background":"#0000","sideBarSectionHeader.border":"#ccc3","sideBarTitle.foreground":"#BBBBBB","statusBarItem.remoteBackground":"#16825D","statusBarItem.remoteForeground":"#FFF","tab.lastPinnedBorder":"#ccc3","tab.selectedBackground":"#222222","tab.selectedForeground":"#ffffffa0","terminal.inactiveSelectionBackground":"#3A3D41","widget.border":"#303031"},"displayName":"Dark Plus","name":"dark-plus","semanticHighlighting":true,"semanticTokenColors":{"customLiteral":"#DCDCAA","newOperator":"#C586C0","numberLiteral":"#b5cea8","stringLiteral":"#ce9178"},"tokenColors":[{"scope":["meta.embedded","source.groovy.embedded","string meta.image.inline.markdown","variable.legacy.builtin.python"],"settings":{"foreground":"#D4D4D4"}},{"scope":"emphasis","settings":{"fontStyle":"italic"}},{"scope":"strong","settings":{"fontStyle":"bold"}},{"scope":"header","settings":{"foreground":"#000080"}},{"scope":"comment","settings":{"foreground":"#6A9955"}},{"scope":"constant.language","settings":{"foreground":"#569cd6"}},{"scope":["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],"settings":{"foreground":"#b5cea8"}},{"scope":"constant.regexp","settings":{"foreground":"#646695"}},{"scope":"entity.name.tag","settings":{"foreground":"#569cd6"}},{"scope":["entity.name.tag.css","entity.name.tag.less"],"settings":{"foreground":"#d7ba7d"}},{"scope":"entity.other.attribute-name","settings":{"foreground":"#9cdcfe"}},{"scope":["entity.other.attribute-name.class.css","source.css entity.other.attribute-name.class","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.parent.less","source.css entity.other.attribute-name.pseudo-class","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],"settings":{"foreground":"#d7ba7d"}},{"scope":"invalid","settings":{"foreground":"#f44747"}},{"scope":"markup.underline","settings":{"fontStyle":"underline"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#569cd6"}},{"scope":"markup.heading","settings":{"fontStyle":"bold","foreground":"#569cd6"}},{"scope":"markup.italic","settings":{"fontStyle":"italic"}},{"scope":"markup.strikethrough","settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inserted","settings":{"foreground":"#b5cea8"}},{"scope":"markup.deleted","settings":{"foreground":"#ce9178"}},{"scope":"markup.changed","settings":{"foreground":"#569cd6"}},{"scope":"punctuation.definition.quote.begin.markdown","settings":{"foreground":"#6A9955"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#6796e6"}},{"scope":"markup.inline.raw","settings":{"foreground":"#ce9178"}},{"scope":"punctuation.definition.tag","settings":{"foreground":"#808080"}},{"scope":["meta.preprocessor","entity.name.function.preprocessor"],"settings":{"foreground":"#569cd6"}},{"scope":"meta.preprocessor.string","settings":{"foreground":"#ce9178"}},{"scope":"meta.preprocessor.numeric","settings":{"foreground":"#b5cea8"}},{"scope":"meta.structure.dictionary.key.python","settings":{"foreground":"#9cdcfe"}},{"scope":"meta.diff.header","settings":{"foreground":"#569cd6"}},{"scope":"storage","settings":{"foreground":"#569cd6"}},{"scope":"storage.type","settings":{"foreground":"#569cd6"}},{"scope":["storage.modifier","keyword.operator.noexcept"],"settings":{"foreground":"#569cd6"}},{"scope":["string","meta.embedded.assembly"],"settings":{"foreground":"#ce9178"}},{"scope":"string.tag","settings":{"foreground":"#ce9178"}},{"scope":"string.value","settings":{"foreground":"#ce9178"}},{"scope":"string.regexp","settings":{"foreground":"#d16969"}},{"scope":["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],"settings":{"foreground":"#569cd6"}},{"scope":["meta.template.expression"],"settings":{"foreground":"#d4d4d4"}},{"scope":["support.type.vendored.property-name","support.type.property-name","source.css variable","source.coffee.embedded"],"settings":{"foreground":"#9cdcfe"}},{"scope":"keyword","settings":{"foreground":"#569cd6"}},{"scope":"keyword.control","settings":{"foreground":"#569cd6"}},{"scope":"keyword.operator","settings":{"foreground":"#d4d4d4"}},{"scope":["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],"settings":{"foreground":"#569cd6"}},{"scope":"keyword.other.unit","settings":{"foreground":"#b5cea8"}},{"scope":["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],"settings":{"foreground":"#569cd6"}},{"scope":"support.function.git-rebase","settings":{"foreground":"#9cdcfe"}},{"scope":"constant.sha.git-rebase","settings":{"foreground":"#b5cea8"}},{"scope":["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],"settings":{"foreground":"#d4d4d4"}},{"scope":"variable.language","settings":{"foreground":"#569cd6"}},{"scope":["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],"settings":{"foreground":"#DCDCAA"}},{"scope":["support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],"settings":{"foreground":"#4EC9B0"}},{"scope":["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class","punctuation.separator.namespace.ruby"],"settings":{"foreground":"#4EC9B0"}},{"scope":["keyword.control","source.cpp keyword.operator.new","keyword.operator.delete","keyword.other.using","keyword.other.directive.using","keyword.other.operator","entity.name.operator"],"settings":{"foreground":"#C586C0"}},{"scope":["variable","meta.definition.variable.name","support.variable","entity.name.variable","constant.other.placeholder"],"settings":{"foreground":"#9CDCFE"}},{"scope":["variable.other.constant","variable.other.enummember"],"settings":{"foreground":"#4FC1FF"}},{"scope":["meta.object-literal.key"],"settings":{"foreground":"#9CDCFE"}},{"scope":["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],"settings":{"foreground":"#CE9178"}},{"scope":["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],"settings":{"foreground":"#CE9178"}},{"scope":["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],"settings":{"foreground":"#d16969"}},{"scope":["keyword.operator.or.regexp","keyword.control.anchor.regexp"],"settings":{"foreground":"#DCDCAA"}},{"scope":"keyword.operator.quantifier.regexp","settings":{"foreground":"#d7ba7d"}},{"scope":["constant.character","constant.other.option"],"settings":{"foreground":"#569cd6"}},{"scope":"constant.character.escape","settings":{"foreground":"#d7ba7d"}},{"scope":"entity.name.label","settings":{"foreground":"#C8C8C8"}}],"type":"dark"}')),p9e=Object.freeze(Object.defineProperty({__proto__:null,default:aie},Symbol.toStringTag,{value:"Module"})),m9e=["editor theme","vscode theme","monaco theme","workbench colors"],TT=new Set,uw="dark-plus",Mz=new WeakSet,Pz=aie,g9e={"editor.background":"#0B0C0E","editorGutter.background":"#0B0C0E","editorStickyScroll.background":"#0B0C0E","editorStickyScrollGutter.background":"#0B0C0E","minimap.background":"#0B0C0E","editor.lineHighlightBackground":"#151922","editorWidget.background":"#16181D","editorHoverWidget.background":"#16181D","editorWidget.border":"#363B44","editorHoverWidget.border":"#363B44","editorGroupHeader.tabsBackground":"#0B0C0E"},y9e={base:"vs-dark",inherit:!1,rules:[...lie(Pz.tokenColors??[]),...k9e()],colors:{...cie(Pz.colors??{}),...g9e}};function x9e(){return m9e}function oie(e){var n,r;(r=(n=e==null?void 0:e.editor)==null?void 0:n.defineTheme)==null||r.call(n,uw,y9e)}function v9e(e){!e||typeof e!="object"||Mz.has(e)||(Mz.add(e),Promise.all([st(()=>import("./index-zefKYqXF.js"),[],import.meta.url),st(()=>import("./index-C9NrKQqH.js"),[],import.meta.url)]).then(async([{shikiToMonaco:n},{createHighlighter:r}])=>{var l,u,d;const i=e.languages,s=new Set(((l=i==null?void 0:i.getLanguages)==null?void 0:l.call(i).map(h=>h.id))??[]);for(const h of["javascript","typescript","json","css","html","markdown","python","yaml","diff"])s.has(h)||((u=i==null?void 0:i.register)==null||u.call(i,{id:h}),s.add(h));const a=await r({themes:["dark-plus"],langs:["javascript","typescript","jsx","tsx","json","css","html","markdown","python","yaml","diff"]});n(a,e),oie(e);const o=e.editor;typeof document<"u"&&document.documentElement.dataset.monacoTheme===uw&&((d=o==null?void 0:o.setTheme)==null||d.call(o,uw))}).catch(n=>{console.error("Failed to initialize Shiki Monaco Dark Plus theme:",n)}))}function b9e(e){var o;const n=_9e(e.text),r=cie(n.colors??{}),i=j9e(n,r),s=((o=n.name)==null?void 0:o.trim())||e.sourceLabel.trim()||"Imported Theme",a=`jait-vscode-${M9e(s)}-${e.id}`;return{id:e.id,name:s,sourceLabel:e.sourceLabel,importedAt:e.importedAt??new Date().toISOString(),colorMode:i,monacoThemeName:a,monacoThemeData:{base:i==="dark"?"vs-dark":"vs",inherit:!0,rules:lie(n.tokenColors??[]),colors:r},cssVariables:C9e(r),rawColors:r,hasInclude:typeof n.include=="string"&&n.include.trim().length>0}}function _9e(e){const n=R9e(O9e(e)),r=JSON.parse(n);if(!r||typeof r!="object"||Array.isArray(r))throw new Error("Theme file must contain a JSON object.");return r}function w9e(e,n){var r;!n||!((r=e==null?void 0:e.editor)!=null&&r.defineTheme)||e.editor.defineTheme(n.monacoThemeName,n.monacoThemeData)}function S9e(e){if(typeof document>"u")return;const n=document.documentElement;n.classList.toggle("dark",e.colorMode==="dark"),n.dataset.monacoTheme=e.monacoThemeName;for(const r of TT)n.style.removeProperty(r);if(TT.clear(),!!e.theme)for(const[r,i]of Object.entries(e.theme.cssVariables))n.style.setProperty(r,i),TT.add(r)}function lie(e){var r;const n=[];for(const i of e){const s=i.settings??{},a=N9e(i.scope);if(a.length===0)continue;const o=$z(s.foreground),l=$z(s.background),u=((r=s.fontStyle)==null?void 0:r.trim())||void 0;for(const d of a)n.push({token:d,foreground:o,background:l,fontStyle:u})}return n}function k9e(){return[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"F44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"comment",foreground:"6A9955"},{token:"constant",foreground:"569CD6"},{token:"number",foreground:"B5CEA8"},{token:"regexp",foreground:"D16969"},{token:"string",foreground:"CE9178"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.operator",foreground:"D4D4D4"},{token:"keyword.operator.new",foreground:"C586C0"},{token:"operator",foreground:"D4D4D4"},{token:"type",foreground:"4EC9B0"},{token:"type.identifier",foreground:"4EC9B0"},{token:"class",foreground:"4EC9B0"},{token:"interface",foreground:"4EC9B0"},{token:"enum",foreground:"4EC9B0"},{token:"namespace",foreground:"4EC9B0"},{token:"identifier",foreground:"9CDCFE"},{token:"identifier.function",foreground:"DCDCAA"},{token:"function",foreground:"DCDCAA"},{token:"member",foreground:"DCDCAA"},{token:"method",foreground:"DCDCAA"},{token:"property",foreground:"9CDCFE"},{token:"variable",foreground:"9CDCFE"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"parameter",foreground:"9CDCFE"},{token:"delimiter",foreground:"D4D4D4"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"}]}function C9e(e){const n={},r=ri(e,["editor.background","sideBar.background","panel.background"]),i=ri(e,["editor.foreground","foreground"]),s=ri(e,["sideBar.background","panel.background","editorWidget.background"]),a=ri(e,["panel.background","tab.inactiveBackground","editorGroupHeader.tabsBackground"]),o=ri(e,["list.hoverBackground","tab.activeBackground","editor.lineHighlightBackground"]),l=ri(e,["button.background","focusBorder","textLink.foreground"]),u=ri(e,["widget.border","panel.border","sideBar.border","contrastBorder"]);Ni(n,"--background",r),Ni(n,"--foreground",i),Ni(n,"--card",s),Ni(n,"--card-foreground",ri(e,["sideBar.foreground","foreground"])??i),Ni(n,"--popover",ri(e,["editorWidget.background","panel.background"])??s),Ni(n,"--popover-foreground",ri(e,["editorWidget.foreground","foreground"])??i),Ni(n,"--primary",l),Ni(n,"--primary-foreground",Lz(l)),Ni(n,"--secondary",ri(e,["tab.inactiveBackground","panel.background"])??a),Ni(n,"--secondary-foreground",ri(e,["tab.inactiveForeground","foreground"])??i),Ni(n,"--muted",a),Ni(n,"--muted-foreground",ri(e,["descriptionForeground","input.placeholderForeground","disabledForeground"])),Ni(n,"--accent",o),Ni(n,"--accent-foreground",ri(e,["list.activeSelectionForeground","foreground"])??i),Ni(n,"--destructive",ri(e,["inputValidation.errorBackground","errorForeground","list.errorForeground"])),Ni(n,"--destructive-foreground",Lz(ri(e,["inputValidation.errorBackground","errorForeground"]))),Ni(n,"--border",u),Ni(n,"--input",ri(e,["input.background","editorWidget.background","dropdown.background"])??u),Ni(n,"--ring",ri(e,["focusBorder","button.background","textLink.foreground"])??l),Ni(n,"--scrollbar-track",ri(e,["editor.background","sideBar.background","panel.background"])??r),Ni(n,"--scrollbar-thumb",ri(e,["scrollbarSlider.background","scrollbar.shadow"])),Ni(n,"--scrollbar-thumb-hover",ri(e,["scrollbarSlider.hoverBackground","scrollbarSlider.activeBackground","scrollbarSlider.background"])),Ni(n,"--toast-bg",ri(e,["notifications.background","editorWidget.background","panel.background"])??s,!0),Ni(n,"--toast-border",ri(e,["notifications.border","widget.border","panel.border"])??u,!0),Ni(n,"--toast-success-accent",ri(e,["testing.iconPassed","terminal.ansiGreen"])),Ni(n,"--toast-info-accent",ri(e,["textLink.foreground","focusBorder"])??l),Ni(n,"--toast-warning-accent",ri(e,["editorWarning.foreground","terminal.ansiYellow"])),Ni(n,"--toast-error-accent",ri(e,["editorError.foreground","terminal.ansiRed"]));const d=ri(e,["editorGroupHeader.tabsBackground","tab.inactiveBackground","sideBar.background"]);d&&(n["--tab-bg"]=d);const h=ri(e,["activityBarBadge.background","button.background","focusBorder"]),f=ri(e,["textLink.foreground","terminal.ansiBlue"]),m=ri(e,["editorWarning.foreground","terminal.ansiYellow"]),x=ri(e,["terminal.ansiMagenta","badge.background"]);return h&&(n["--ctx-system"]=h),f&&(n["--ctx-history"]=f),m&&(n["--ctx-tool-results"]=m),x&&(n["--ctx-tools"]=x),n}function Ni(e,n,r,i=!1){if(!r)return;const s=T9e(r,i);s&&(e[n]=s)}function Lz(e){const n=D9(e);return n?(.2126*n.r+.7152*n.g+.0722*n.b)/255>.55?"0 0% 7%":"0 0% 100%":null}function j9e(e,n){if(e.type==="light"||e.type==="hc-light")return"light";if(e.type==="dark"||e.type==="hc-dark")return"dark";const r=D9(n["editor.background"]??n["sideBar.background"]??"");return r&&(.2126*r.r+.7152*r.g+.0722*r.b)/255>.55?"light":"dark"}function cie(e){const n={};for(const[r,i]of Object.entries(e))typeof i=="string"&&i.trim()&&(n[r]=i.trim());return n}function N9e(e){return Array.isArray(e)?e.flatMap(n=>n.split(",")).map(n=>n.trim()).filter(Boolean):typeof e!="string"?[]:e.split(",").map(n=>n.trim()).filter(Boolean)}function $z(e){if(!e)return;const n=e.trim();if(n.startsWith("#"))return uie(n).slice(1)}function ri(e,n){for(const r of n){const i=e[r];if(typeof i=="string"&&i.trim())return i.trim()}return null}function T9e(e,n=!1){const r=D9(e);if(!r)return null;const i=r.r/255,s=r.g/255,a=r.b/255,o=Math.max(i,s,a),l=Math.min(i,s,a),u=o-l,d=(o+l)/2;let h=0;u!==0&&(o===i?h=(s-a)/u%6:o===s?h=(a-i)/u+2:h=(i-s)/u+4,h*=60),h<0&&(h+=360);const f=u===0?0:u/(1-Math.abs(2*d-1)),m=`${Math.round(h)} ${Math.round(f*100)}% ${Math.round(d*100)}%`;return n&&r.a<1?`${m} / ${Number(r.a.toFixed(3))}`:m}function D9(e){if(!e)return null;const n=e.trim();if(!n)return null;if(n.startsWith("#"))return E9e(n);const r=n.match(/^rgba?\(([^)]+)\)$/i);if(!r)return null;const i=r[1].split(",").map(u=>u.trim());if(i.length<3)return null;const s=ET(i[0]),a=ET(i[1]),o=ET(i[2]),l=i[3]==null?1:A9e(i[3]);return s==null||a==null||o==null||l==null?null:{r:s,g:a,b:o,a:l}}function E9e(e){const n=uie(e).slice(1);return n.length===6?{r:Number.parseInt(n.slice(0,2),16),g:Number.parseInt(n.slice(2,4),16),b:Number.parseInt(n.slice(4,6),16),a:1}:n.length===8?{r:Number.parseInt(n.slice(0,2),16),g:Number.parseInt(n.slice(2,4),16),b:Number.parseInt(n.slice(4,6),16),a:Number.parseInt(n.slice(6,8),16)/255}:null}function ET(e){if(e.endsWith("%")){const r=Number.parseFloat(e.slice(0,-1));return Number.isFinite(r)?Dz(Math.round(r/100*255)):null}const n=Number.parseFloat(e);return Number.isFinite(n)?Dz(Math.round(n)):null}function A9e(e){const n=Number.parseFloat(e);return Number.isFinite(n)?Math.max(0,Math.min(1,n)):null}function Dz(e){return Math.max(0,Math.min(255,e))}function uie(e){const n=e.trim().slice(1);return n.length===3||n.length===4?`#${n.split("").map(r=>`${r}${r}`).join("").toLowerCase()}`:`#${n.toLowerCase()}`}function O9e(e){let n="",r=!1,i=!1,s=!1,a=!1;for(let o=0;o<e.length;o+=1){const l=e[o],u=e[o+1];if(i){l===`
|
|
1127
1127
|
`&&(i=!1,n+=l);continue}if(s){l==="*"&&u==="/"&&(s=!1,o+=1);continue}if(r){n+=l,a?a=!1:l==="\\"?a=!0:l==='"'&&(r=!1);continue}if(l==='"'){r=!0,n+=l;continue}if(l==="/"&&u==="/"){i=!0,o+=1;continue}if(l==="/"&&u==="*"){s=!0,o+=1;continue}n+=l}return n}function R9e(e){return e.replace(/,\s*([}\]])/g,"$1")}function M9e(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40)||"theme"}function Iz(){if(typeof document>"u")return"vs";const e=document.documentElement;return e.dataset.monacoTheme??(e.classList.contains("dark")?uw:"vs")}function _S(){const[e,n]=y.useState(Iz);return y.useEffect(()=>{if(typeof document>"u")return;const r=document.documentElement,i=()=>n(Iz());i();const s=new MutationObserver(i);return s.observe(r,{attributes:!0,attributeFilter:["class","data-monaco-theme"]}),()=>s.disconnect()},[]),e}const I9="jait:vscode-theme-store",A3=new Set;let wd=hie(),Bz=!1;function die(){if(typeof window>"u")return null;try{return window.localStorage}catch{return null}}function hie(){const e=die();if(!e)return{importedThemes:[],activeThemeId:null};let n=null;try{n=e.getItem(I9)}catch{return{importedThemes:[],activeThemeId:null}}if(!n)return{importedThemes:[],activeThemeId:null};try{const r=JSON.parse(n),i=Array.isArray(r.importedThemes)?r.importedThemes.filter(a=>!!(a&&typeof a.id=="string"&&typeof a.monacoThemeName=="string")):[],s=typeof r.activeThemeId=="string"?r.activeThemeId:null;return{importedThemes:i,activeThemeId:i.some(a=>a.id===s)?s:null}}catch{return{importedThemes:[],activeThemeId:null}}}function B9(e){wd=e;const n=die();if(n)try{n.setItem(I9,JSON.stringify(e))}catch{}for(const r of A3)r()}function P9e(e){return!Bz&&typeof window<"u"&&(Bz=!0,window.addEventListener("storage",n=>{if(n.key===I9){wd=hie();for(const r of A3)r()}})),A3.add(e),()=>A3.delete(e)}function zz(){return wd}function fie(){const e=y.useSyncExternalStore(P9e,zz,zz);return{...e,activeTheme:e.importedThemes.find(n=>n.id===e.activeThemeId)??null}}function pie(){return wd.importedThemes.find(e=>e.id===wd.activeThemeId)??null}function L9e(e,n){const r=`${Date.now().toString(36)}-${I9e(e+n)}`,i=b9e({id:r,sourceLabel:e,text:n});return B9({importedThemes:[...wd.importedThemes.filter(s=>s.id!==r),i],activeThemeId:r}),i}function X5(e){B9({...wd,activeThemeId:e&&wd.importedThemes.some(n=>n.id===e)?e:null})}function $9e(e){B9({importedThemes:wd.importedThemes.filter(n=>n.id!==e),activeThemeId:wd.activeThemeId===e?null:wd.activeThemeId})}function D9e(e){oie(e);const n=pie();n?w9e(e,n):v9e(e)}function Xl(e,n){var r,i;D9e(e),n&&((i=(r=e==null?void 0:e.editor)==null?void 0:r.setTheme)==null||i.call(r,n))}function I9e(e){let n=0;for(let r=0;r<e.length;r+=1)n=(n<<5)-n+e.charCodeAt(r)|0;return Math.abs(n).toString(36)}function Fz(e){return e.split(`
|
|
1128
1128
|
`)}function B9e(e,n){const r=e.length+1,i=n.length+1,s=Array.from({length:r},()=>Array(i).fill(0));for(let a=e.length-1;a>=0;a-=1)for(let o=n.length-1;o>=0;o-=1)e[a]===n[o]?s[a][o]=(s[a+1][o+1]??0)+1:s[a][o]=Math.max(s[a+1][o]??0,s[a][o+1]??0);return s}function mie(e,n){var u,d;const r=Fz(e),i=Fz(n),s=B9e(r,i),a=[];let o=0,l=0;for(;o<r.length||l<i.length;){if(o<r.length&&l<i.length&&r[o]===i[l]){o+=1,l+=1;continue}const h=o,f=l;for(;(o<r.length||l<i.length)&&!(o<r.length&&l<i.length&&r[o]===i[l]);){const m=o<r.length?((u=s[o+1])==null?void 0:u[l])??0:-1,x=l<i.length?((d=s[o])==null?void 0:d[l+1])??0:-1;l>=i.length||o<r.length&&m>=x?o+=1:l+=1}a.push({originalStartLineNumber:h<o?h+1:o,originalEndLineNumber:h<o?o:0,modifiedStartLineNumber:f<l?f+1:l,modifiedEndLineNumber:f<l?l:0})}return a.map((h,f)=>({...h,index:f,state:"undecided"}))}function gie(e,n,r){const i=[...e];for(let s=r.length-1;s>=0;s-=1){const a=r[s];if(!a||a.state==="rejected")continue;const o=a.modifiedEndLineNumber===0?[]:n.slice(a.modifiedStartLineNumber-1,a.modifiedEndLineNumber);if(a.originalEndLineNumber===0)i.splice(a.originalStartLineNumber,0,...o);else{const l=a.originalStartLineNumber-1,u=a.originalEndLineNumber-a.originalStartLineNumber+1;i.splice(l,u,...o)}}return i.join(`
|
|
1129
1129
|
`)}function J5(e){return e.modifiedStartLineNumber>0?e.modifiedStartLineNumber:e.modifiedEndLineNumber>0?e.modifiedEndLineNumber:Math.max(1,e.originalStartLineNumber)}function Hz({filePath:e,originalContent:n,modifiedContent:r,language:i,onClose:s,onApply:a}){const o=y.useRef(null),l=y.useRef(null),[u,d]=y.useState([]),[h,f]=y.useState([]),[m,x]=y.useState(0),[v,_]=y.useState(()=>typeof window<"u"&&window.innerWidth<768),w=_S(),S=e.split(/[/\\]/).pop()??e;y.useEffect(()=>{const L=()=>_(window.innerWidth<768);return L(),window.addEventListener("resize",L),()=>window.removeEventListener("resize",L)},[]),y.useEffect(()=>{f(L=>{const z=mie(n,r);return L.length===z.length?z.map((G,V)=>{var F;return{...G,state:((F=L[V])==null?void 0:F.state)??"undecided"}}):z}),x(0)},[n,r]);const C=y.useCallback(()=>{var X,q;const L=(q=(X=o.current)==null?void 0:X.getModifiedEditor)==null?void 0:q.call(X);if(!L||h.length===0){d([]);return}const z=L.getScrollTop(),G=L.getLayoutInfo(),V=L.getScrollHeight()>0?L.getScrollHeight():G.height,F=h.flatMap(ee=>{if(ee.state!=="undecided")return[];const J=J5(ee),Q=L.getTopForLineNumber(J)-z+2;return!Number.isFinite(Q)||Q<-28||Q>V?[]:[{hunkIndex:ee.index,top:Q}]});d(F)},[h]),j=y.useRef([]),T=y.useCallback((L,z)=>{o.current=L,l.current=z,Xl(z,w);const G=L.getModifiedEditor();j.current=[G.onDidScrollChange(()=>C()),G.onDidLayoutChange(()=>C()),G.onDidContentSizeChange(()=>C()),L.onDidUpdateDiff(()=>C())],window.setTimeout(C,0)},[w,C]);y.useEffect(()=>{Xl(l.current,w)},[w]),y.useEffect(()=>()=>{var z,G;for(const V of j.current)V.dispose();j.current=[];const L=o.current;if(L)try{const V=L.getModel();L.dispose(),(z=V==null?void 0:V.original)==null||z.dispose(),(G=V==null?void 0:V.modified)==null||G.dispose()}catch{}o.current=null,l.current=null},[]),y.useEffect(()=>{if(!o.current||h.length===0)return;const L=h[m];if(!L)return;const z=J5(L);try{o.current.getModifiedEditor().revealLineInCenter(z)}catch{}},[m,h]),y.useEffect(()=>{if(!o.current||!l.current||h.length===0)return;const L=l.current,z=o.current.getModifiedEditor(),G=[];for(const F of h){if(F.state==="undecided")continue;const X=F.modifiedEndLineNumber>0?F.modifiedStartLineNumber:F.originalStartLineNumber,q=F.modifiedEndLineNumber>0?F.modifiedEndLineNumber:F.originalStartLineNumber;G.push({range:new L.Range(X,1,q,1),options:{isWholeLine:!0,className:F.state==="accepted"?"diff-hunk-accepted":"diff-hunk-rejected",overviewRuler:{color:F.state==="accepted"?"#22c55e44":"#ef444444",position:L.editor.OverviewRulerLane.Full}}})}const V=z.deltaDecorations([],G);return()=>{try{z.deltaDecorations(V,[])}catch{}}},[h]),y.useEffect(()=>{C()},[C,m,h]),y.useEffect(()=>{if(!o.current||!l.current||h.length===0)return;const L=l.current,z=o.current.getModifiedEditor(),G=h[m];if(!G)return;const V=G.modifiedEndLineNumber>0?G.modifiedStartLineNumber:G.originalStartLineNumber,F=G.modifiedEndLineNumber>0?G.modifiedEndLineNumber:G.originalStartLineNumber,X=z.deltaDecorations([],[{range:new L.Range(V,1,F,1),options:{isWholeLine:!0,className:"diff-hunk-active"}}]);return()=>{try{z.deltaDecorations(X,[])}catch{}}},[m,h]);const E=y.useCallback((L,z)=>{f(G=>{const V=G.map((X,q)=>q===L?{...X,state:z}:X),F=V.findIndex((X,q)=>q>L&&X.state==="undecided");return F>=0&&x(F),V})},[]),N=y.useCallback(()=>E(m,"accepted"),[m,E]),R=y.useCallback(()=>E(m,"rejected"),[m,E]),D=y.useCallback(()=>{f(L=>L.map(z=>({...z,state:"accepted"})))},[]),U=y.useCallback(()=>{f(L=>L.map(z=>({...z,state:"rejected"})))},[]),H=y.useCallback(()=>{x(L=>Math.min(L+1,h.length-1))},[h.length]),I=y.useCallback(()=>{x(L=>Math.max(L-1,0))},[]),W=y.useCallback(()=>{const L=h.findIndex((G,V)=>V>m&&G.state==="undecided");if(L>=0){x(L);return}const z=h.findIndex(G=>G.state==="undecided");z>=0&&x(z)},[h,m]),$=y.useMemo(()=>h.filter(L=>L.state==="undecided").length,[h]),O=h.length>0&&$===0,B=h[m],M=y.useCallback(()=>{const L=n.split(`
|
|
@@ -1423,7 +1423,7 @@ Referenced files:
|
|
|
1423
1423
|
`).replace(/\\t/g," ").replace(/\\"/g,'"').replace(/\\\\/g,"\\"):null}function Ide(e){if(!e)return null;const n=hu(e,"url")??hu(e,"uri")??hu(e,"href")??hu(e,"query")??hu(e,"q");if(n)return qf(n)??n;const r=hu(e,"type"),i=hu(e,"action");return r==="webSearch"||i==="webSearch"?"web search":r==="fetch"||i==="fetch"?"website":null}function Jpt({tool:e,streamingArgs:n}){const r=uo(e),i=Tde[r],s=r.startsWith("terminal.")||r==="jait.terminal"||r==="execute",a=s?Dde(n):null,o=r==="web"||r==="web.search"||r==="web.fetch"||r==="browser.search"||r==="browser.fetch",l=o?Ide(n):null;return i&&s&&a?c.jsxs("span",{className:"inline-flex max-w-full min-w-0 items-center gap-1.5 text-foreground",children:[c.jsx("span",{className:"shrink-0 text-xs text-emerald-500 dark:text-emerald-400 font-mono",children:"$"}),c.jsx("code",{className:"min-w-0 truncate text-xs font-mono",children:a}),c.jsx("span",{className:"inline-block w-1 h-3.5 bg-blue-400 animate-pulse ml-0.5 align-text-bottom"})]}):i&&o&&l?c.jsxs("span",{className:"inline-flex max-w-full min-w-0 items-center gap-1.5 text-foreground",children:[c.jsxs("span",{children:[i.label,":"]}),c.jsx("code",{className:"min-w-0 truncate text-xs font-mono",children:l}),c.jsx("span",{className:"inline-block w-1 h-3.5 bg-blue-400 animate-pulse ml-0.5 align-text-bottom"})]}):i?c.jsxs("span",{className:"text-blue-400",children:[i.label,c.jsx("span",{className:"inline-block w-1 h-3 bg-blue-400 animate-pulse ml-1 align-text-bottom"})]}):e?c.jsxs("span",{className:"text-blue-400",children:[c.jsx("code",{className:"text-xs font-mono",children:e}),c.jsx("span",{className:"inline-block w-1 h-3 bg-blue-400 animate-pulse ml-0.5 align-text-bottom"})]}):c.jsx("span",{className:"text-muted-foreground",children:"Preparing..."})}function Zpt({tool:e,streamingArgs:n,scrollRef:r}){const i=uo(e),s=i.startsWith("terminal."),a=s?Dde(n):null,o=i==="web"||i==="web.search"||i==="web.fetch"||i==="browser.search"||i==="browser.fetch",l=o?Ide(n):null;if(s&&a)return c.jsxs("pre",{ref:r,className:ke("text-xs font-mono leading-5 rounded-md px-3 py-2 overflow-x-auto max-h-64 overflow-y-auto whitespace-pre-wrap break-all","bg-muted/40 text-foreground"),children:[c.jsx("span",{className:"text-emerald-400",children:"$ "}),a,c.jsx("span",{className:"inline-block w-1.5 h-3.5 bg-blue-400 animate-pulse ml-0.5 align-text-bottom"})]});if(o&&l){const u=i==="web.search"||i==="browser.search"?"Searching":"Fetching";return c.jsx("div",{className:ke("rounded-md border px-3 py-2 text-xs","bg-muted/40 text-foreground"),children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Lt,{className:"h-3 w-3 shrink-0 animate-spin text-blue-400"}),c.jsxs("span",{className:"break-all",children:[u," ",l,"..."]})]})})}if(i==="memory.save"){const u=hu(n,"scope")??"memory",d=hu(n,"content");return c.jsxs("div",{className:ke("rounded-md border px-3 py-2 text-xs","bg-muted/40 text-foreground"),children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Lt,{className:"h-3 w-3 shrink-0 animate-spin text-blue-400"}),c.jsxs("span",{children:["Saving memory (",u,")..."]})]}),d?c.jsxs("div",{className:"mt-1 opacity-80",children:['"',Tc(d,120),'"']}):null]})}if(i==="cron.add"){const u=hu(n,"name"),d=hu(n,"cron"),h=hu(n,"toolName");return c.jsxs("div",{className:ke("rounded-md border px-3 py-2 text-xs","bg-muted/40 text-foreground"),children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Lt,{className:"h-3 w-3 shrink-0 animate-spin text-blue-400"}),c.jsxs("span",{children:["Creating cron job",u?`: ${u}`:"..."]})]}),(d||h)&&c.jsxs("div",{className:"mt-1 opacity-80",children:[d?`schedule ${d}`:"",d&&h?" • ":"",h?`tool ${h}`:""]})]})}return n?c.jsxs("pre",{ref:r,className:ke("text-xs font-mono leading-5 rounded-md px-3 py-2 overflow-x-auto max-h-36 overflow-y-auto whitespace-pre-wrap break-all","bg-muted/40 text-muted-foreground"),children:[n,c.jsx("span",{className:"inline-block w-1.5 h-3.5 bg-blue-400 animate-pulse ml-0.5 align-text-bottom"})]}):c.jsx("div",{className:ke("rounded-md border px-3 py-2 text-xs","bg-muted/40 text-foreground"),children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Lt,{className:"h-3 w-3 shrink-0 animate-spin text-blue-400"}),c.jsx("span",{children:"Preparing..."})]})})}function Bde(e){const n=new Map,r=new Set,i=new Map(e.map(s=>[s.callId,s]));for(const s of e){if(!s.parentCallId||!i.has(s.parentCallId))continue;const a=n.get(s.parentCallId)??[];n.set(s.parentCallId,[...a,s]),r.add(s.callId)}for(let s=0;s<e.length;s++){const a=e[s];if(!ny(a.tool))continue;const o=[];for(let l=s+1;l<e.length;l++){const u=e[l];if(r.has(u.callId))continue;const d=a.status==="running"||a.status==="pending",h=a.completedAt!=null&&u.startedAt<=a.completedAt;if(d||h)o.push(u),r.add(u.callId);else break}if(o.length>0){const l=n.get(a.callId)??[];n.set(a.callId,[...l,...o])}}return{childMap:n,parentSet:r}}function zde(e){return e==="browserScreenshot"}function Fde(e){var a,o;const n=uo(e.tool),r=(a=e.result)!=null&&a.data&&typeof e.result.data=="object"?e.result.data:void 0,i=Oc(n,e.args,r),s=jde(n,i,r,(o=e.result)==null?void 0:o.message);return zde(Nde({tool:n,args:i,status:e.status,displayOutput:Lde(e.result,n)||e.streamingOutput||"",snapshotText:typeof(r==null?void 0:r.snapshot)=="string"?r.snapshot:null,screenshotPath:s}))}function Qpt({path:e,onOpenDiff:n,disabled:r}){const i=kN(e),s=!!n&&!r,a=c.jsxs(c.Fragment,{children:[c.jsx(pa,{filename:i,className:"h-3.5 w-3.5 shrink-0"}),c.jsx("span",{className:"whitespace-nowrap",children:i})]});return s?c.jsx("span",{role:"button",tabIndex:0,className:"inline-flex shrink-0 items-center gap-1.5 rounded-md border border-border/70 bg-muted/45 px-2 py-1 text-xs font-medium leading-none text-foreground transition-colors hover:bg-muted cursor-pointer",title:`Open diff for ${e}`,onClick:o=>{o.preventDefault(),o.stopPropagation(),n(e)},onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),o.stopPropagation(),n(e))},children:a}):c.jsx("span",{className:"inline-flex shrink-0 items-center gap-1.5 rounded-md border border-border/70 bg-muted/45 px-2 py-1 text-xs font-medium leading-none text-foreground",title:e,children:a})}function emt({status:e}){const n=e==="completed"?"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400":e==="error"||e==="interrupted"?"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400":e==="running"||e==="starting"?"border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400":"border-border/70 bg-muted/45 text-muted-foreground",r=e==="completed"?js:e==="error"||e==="interrupted"?Ah:e==="running"||e==="starting"?Lt:_c;return c.jsxs("span",{className:ke("inline-flex shrink-0 items-center gap-1 rounded border px-1.5 py-0.5 text-2xs font-medium capitalize",n),children:[c.jsx(r,{className:ke("h-3 w-3",(e==="running"||e==="starting")&&"animate-spin")}),e]})}function tmt({items:e,resultMessage:n}){return e.length===0?c.jsx("div",{className:"rounded-md border border-border/60 bg-muted/25 px-3 py-2 text-xs text-muted-foreground",children:"No thread details available."}):c.jsxs("div",{className:"rounded-md border border-purple-500/20 bg-purple-500/[0.025] text-xs",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-purple-500/15 px-3 py-2",children:[c.jsxs("span",{className:"font-medium text-foreground",children:[e.length," thread",e.length===1?"":"s"]}),c.jsxs("span",{className:"text-muted-foreground",children:[e.filter(r=>r.status==="completed").length," completed"]})]}),c.jsx("div",{className:"divide-y divide-border/35",children:e.map((r,i)=>{const s=r.id?r.id.slice(-8):null,a=r.branch??(r.workingDirectory?kN(r.workingDirectory):null);return c.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] gap-2 px-3 py-2",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"truncate font-medium text-foreground",title:r.title,children:r.title}),c.jsxs("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 text-2xs text-muted-foreground",children:[s&&c.jsx("code",{className:"rounded bg-background/70 px-1 py-0.5 font-mono",children:s}),r.providerId&&c.jsx("span",{children:r.providerId}),r.kind&&c.jsx("span",{children:r.kind}),a&&c.jsx("span",{className:"min-w-0 truncate",children:a})]}),r.error&&c.jsx("div",{className:"mt-1 truncate text-2xs text-red-500",title:r.error,children:r.error})]}),c.jsx(emt,{status:r.status})]},r.id??`${r.title}-${i}`)})}),n&&c.jsx("div",{className:"border-t border-purple-500/15 px-3 py-2 text-2xs text-muted-foreground",children:n})]})}function nmt({call:e,childCalls:n,threadControlThreads:r,onOpenTerminal:i,onOpenDiff:s,inlineSecretPrompt:a,renderInlineSecretPrompt:o,onApprovalResponse:l,hideTopConnector:u=!1,hideBottomConnector:d=!1}){var ve,we,De,xt,dt,ft,Dt,Wt,Ye,We,mt,at,Ue,Ne;const h=Fde(e),[f,m]=y.useState(e.status==="running"||e.status==="pending"||h),[x,v]=y.useState(()=>Date.now()),[_,w]=y.useState(null),S=y.useRef(e.status),C=uo(e.tool),j=(ve=e.result)!=null&&ve.data&&typeof e.result.data=="object"?e.result.data:void 0,T=Oc(C,e.args,j),E=ty(C)?SN({...C.startsWith("mcp.")&&!T.title?{title:C}:{},...T},j):null,N=E?_pt(E.title):null,R=vL(C),D=(N==null?void 0:N.icon)??R.icon,U=(N==null?void 0:N.color)??R.color,H=Apt(C,T,(we=e.result)==null?void 0:we.data,(De=e.result)==null?void 0:De.message),I=L7(C,T),$=Lde(e.result,C)||e.streamingOutput||"",O=typeof(j==null?void 0:j.snapshot)=="string"?j.snapshot:null,B=jde(C,T,j,(xt=e.result)==null?void 0:xt.message),M=C.startsWith("terminal.")||C==="jait.terminal"||C==="execute"||C.startsWith("ssh.")||C==="run.ssh"||C==="elevated.run",L=Hpt(e),z=Xpt(e),G=z?z3(e):null,V=zpt(C,T),F=a??(o==null?void 0:o(e))??null,X=F!=null,q=e.status==="pending",ee=!!e.approvalRequestId&&e.status==="pending",J=y.useCallback(async Ce=>{if(!(!e.approvalRequestId||!l||_)){w(Ce?"approve":"reject");try{await l(e.approvalRequestId,Ce)}finally{w(null)}}},[_,e.approvalRequestId,l]),Q=Cde(C,T,(dt=e.result)==null?void 0:dt.data,(ft=e.result)==null?void 0:ft.message).map(Ce=>Ce.trim()).filter(Boolean),re=Q[0]??((Wt=H2(C,T,j,(Dt=e.result)==null?void 0:Dt.message))==null?void 0:Wt.trim())??"",te=!!re&&(uq(C)||C==="read"||C==="file.read"),ce=aq($),me=aq(e.streamingArgs),se=Nde({tool:C,args:T,status:e.status,displayOutput:$,snapshotText:O,screenshotPath:B}),ae=zde(se),be=se==="terminal"?!0:se!=="none"&&!ae,_e=se==="threadList"?Ede(T,j,e.status,r):[],je=X?!0:f,Xe=y.useCallback(Ce=>{X&&!Ce||m(Ce)},[X]),yt=e.status==="pending"||e.status==="running"?Lt:e.status==="success"?js:Ah,Nt=e.status==="pending"?"text-blue-400":e.status==="running"?"text-muted-foreground":e.status==="success"?"text-green-500":"text-red-500",Rt=e.status==="error"?{row:"bg-red-500/[0.035] hover:bg-red-500/[0.06]",icon:"bg-red-500/10",connector:"bg-red-500/25",body:"bg-red-500/[0.025]"}:e.status==="success"?{row:"bg-card/58 hover:bg-muted/42",icon:"bg-emerald-500/[0.08]",connector:"bg-border/55",body:"bg-card/42"}:{row:"bg-primary/[0.045] hover:bg-primary/[0.075]",icon:"bg-primary/10",connector:"bg-primary/30",body:"bg-primary/[0.025]"};y.useEffect(()=>{const Ce=S.current;!ae&&se!=="threadList"&&(Ce==="running"||Ce==="pending")&&e.status!=="running"&&e.status!=="pending"&&m(!1),(e.status==="pending"||e.status==="running"||ae||X)&&m(!0),S.current=e.status},[se,e.status,X,ae]),y.useEffect(()=>{var Ce;C!=="web"&&C!=="web.search"&&C!=="web.fetch"&&C!=="browser.search"&&C!=="browser.fetch"||console.debug("[tool-call-card:web]",{tool:e.tool,normalizedTool:C,callId:e.callId,status:e.status,rawArgs:e.args,normalizedArgs:T,resultMessage:(Ce=e.result)==null?void 0:Ce.message,resultData:j,streamingArgs:e.streamingArgs})},[e.args,e.callId,(Ye=e.result)==null?void 0:Ye.message,e.status,e.streamingArgs,e.tool,T,C,j]),y.useEffect(()=>{if(e.status!=="running"&&e.status!=="pending")return;const Ce=window.setInterval(()=>v(Date.now()),250);return()=>window.clearInterval(Ce)},[e.status]);const nn=bpt(C,T,(We=e.result)==null?void 0:We.data,(mt=e.result)==null?void 0:mt.message),rn=e.status==="running"||e.status==="pending",Ft=rn?nn.running:nn.done,Zt=te?jpt(C,rn):Ft,Je=c.jsxs(c.Fragment,{children:[c.jsx(yt,{className:ke("h-4 w-4 shrink-0",Nt,(e.status==="running"||e.status==="pending")&&"animate-spin")}),c.jsx("span",{className:"flex-1 truncate text-[13px] font-medium text-muted-foreground",children:q?c.jsx(Jpt,{tool:e.tool,streamingArgs:e.streamingArgs}):M?c.jsxs("span",{className:"inline-flex max-w-full min-w-0 items-center gap-1.5 text-foreground",children:[c.jsx("span",{className:"shrink-0 text-xs text-emerald-500 dark:text-emerald-400 font-mono",children:"$"}),c.jsx("code",{className:"min-w-0 truncate text-xs font-mono",title:H,children:H})]}):te?c.jsxs("span",{className:"flex min-w-0 max-w-full items-center gap-2",children:[c.jsxs("span",{className:"shrink-0",children:[Zt,":"]}),c.jsx("span",{className:"flex min-w-0 items-center gap-1 overflow-x-auto [scrollbar-width:thin]",children:(Q.length>0?Q:[re]).filter(Boolean).map((Ce,Be)=>c.jsx(Qpt,{path:Ce,onOpenDiff:uq(C)?s:void 0,disabled:e.status!=="success"},`${Ce}-${Be}`))})]}):E&&(E.title||E.details)?c.jsx("span",{className:"inline-flex min-w-0 max-w-full items-center gap-2",children:E.title?c.jsxs("span",{className:"min-w-0 truncate",children:[c.jsx("code",{className:"text-[11px] font-mono",children:E.title}),E.details?c.jsx("span",{className:"text-muted-foreground",children:" • "}):null,E.details?c.jsx("span",{className:"text-xs text-muted-foreground",children:E.details}):null]}):c.jsxs("span",{children:[Ft,": ",c.jsx("span",{className:"text-xs text-muted-foreground",children:E.details})]})}):c.jsxs("span",{children:[Ft,": ",c.jsx("code",{className:"text-[11px] font-mono",children:H})]})}),c.jsx("span",{className:"text-xs text-muted-foreground/60 tabular-nums shrink-0",children:c.jsx(D7,{startedAt:e.startedAt,completedAt:e.completedAt,now:x})}),I&&(I.insertions>0||I.deletions>0)&&c.jsx(Npt,{counts:I}),L&&c.jsx("span",{className:ke("rounded border px-1.5 py-0.5 text-2xs font-semibold uppercase tracking-wide shrink-0",L.className),children:L.label})]}),Ze=se==="pending"?c.jsx(Zpt,{tool:e.tool,streamingArgs:e.streamingArgs,scrollRef:me}):se==="terminal"?c.jsxs("pre",{ref:ce,className:ke("text-xs font-mono leading-5 rounded-md px-3 py-2 overflow-x-auto max-h-72 overflow-y-auto whitespace-pre","bg-zinc-950 text-zinc-100 shadow-inner ring-1 ring-border/40",e.result&&!e.result.ok&&"text-red-200"),children:[!$&&e.status!=="running"&&c.jsxs("span",{className:"text-zinc-400",children:[c.jsx("span",{className:"text-emerald-400",children:"$ "}),H]}),$,e.status==="running"&&!$&&c.jsx("span",{className:"text-zinc-400",children:H?`Executing ${H}...`:"Running..."}),e.status==="running"&&c.jsx("span",{className:"inline-block w-1.5 h-3.5 bg-zinc-100 animate-pulse ml-0.5 align-text-bottom"})]}):se==="browserSnapshot"?c.jsx(Kpt,{snapshot:O}):se==="browserScreenshot"?c.jsx(Ypt,{path:B}):se==="subagent"?n&&n.length>0?c.jsxs("div",{className:"rounded-lg border border-purple-500/20 bg-purple-500/[0.03] text-xs",children:[(e.status==="running"||e.status==="pending")&&n.length>0&&c.jsxs("div",{className:"flex items-center justify-end gap-2 border-b border-purple-500/15 px-3 py-2 text-xs text-muted-foreground",children:[c.jsx(Lt,{className:"h-3 w-3 animate-spin text-purple-500"}),c.jsxs("span",{children:[n.length," tool",n.length!==1?"s":""]})]}),(e.status==="running"||e.status==="pending")&&n.length===0&&c.jsx("div",{className:"px-3 py-2 text-xs text-muted-foreground",children:"Agent is working..."}),c.jsx("div",{className:"divide-y divide-border/30",children:n.map(Ce=>c.jsx(Gf,{call:Ce,threadControlThreads:r,onOpenTerminal:i,onOpenDiff:s,renderInlineSecretPrompt:o,onApprovalResponse:l},Ce.callId))}),((at=e.result)==null?void 0:at.message)&&(e.status==="success"||e.status==="error")&&c.jsxs("div",{className:"border-t border-purple-500/15 px-3 py-2",children:[c.jsx("div",{className:"mb-1 text-xs font-medium text-muted-foreground",children:"Result"}),c.jsx("pre",{className:"max-h-48 overflow-auto whitespace-pre-wrap rounded bg-background/60 p-2 font-mono text-xs leading-5",children:e.result.message})]})]}):c.jsx(Gpt,{data:j??{},message:(Ue=e.result)==null?void 0:Ue.message,status:e.status}):se==="threadList"?c.jsx(tmt,{items:_e,resultMessage:(Ne=e.result)==null?void 0:Ne.message}):se==="editDiff"?c.jsx(upt,{filePath:String(T.path??""),oldText:C==="file.patch"||C==="edit"&&T.search!=null?String(T.search??""):void 0,newText:C==="file.patch"||C==="edit"&&T.replace!=null?String(T.replace??""):void 0,writtenContent:C==="file.write"||C==="edit"&&T.content!=null?String(T.content??""):void 0,isNewFile:C==="file.write"}):se==="output"?c.jsx(qpt,{output:$,tool:C,isError:!!e.result&&!e.result.ok,isRunning:e.status==="running"}):se==="runningHint"?c.jsxs("div",{className:ke("rounded-md border px-3 py-2 text-xs","bg-muted/40 text-foreground"),children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Lt,{className:"h-3 w-3 shrink-0 animate-spin"}),c.jsx("span",{className:"break-all",children:V})]}),c.jsxs("div",{className:"mt-1 text-xs opacity-75",children:["Elapsed: ",c.jsx(D7,{startedAt:e.startedAt,completedAt:e.completedAt,now:x})]})]}):null;return c.jsxs(MS,{open:be?je:!1,onOpenChange:Xe,children:[c.jsxs("div",{className:"relative pl-8",children:[!u&&c.jsx("span",{className:ke("absolute left-[12.5px] top-0 h-6 w-px",Rt.connector),style:{maskImage:"linear-gradient(to bottom, transparent 0 22px, #000 22px 100%)"},"aria-hidden":"true"}),!d&&c.jsx("span",{className:ke("absolute left-[12.5px] top-0 bottom-0 w-px",Rt.connector),style:{maskImage:"linear-gradient(to bottom, #000 0 5px, transparent 5px 23px, #000 23px 100%)"},"aria-hidden":"true"}),d&&!u&&c.jsx("span",{className:ke("absolute left-[12.5px] top-0 bottom-0 w-px",Rt.connector),style:{maskImage:"linear-gradient(to bottom, #000 0 5px, transparent 5px 100%)"},"aria-hidden":"true"}),c.jsx("div",{className:ke("absolute left-[3px] top-[6px] z-10 flex h-5 w-5 items-center justify-center rounded-md shadow-sm ring-2 ring-background",Rt.icon),children:c.jsx(D,{className:ke("h-3.5 w-3.5 shrink-0",U)})}),c.jsx("div",{className:"group pb-1",children:c.jsxs("div",{className:ke("flex min-h-8 items-center gap-2 rounded-md px-2 py-1 transition-colors",Rt.row),children:[be?c.jsxs(PS,{className:"flex min-w-0 flex-1 items-center gap-2 text-left",children:[c.jsx(xs,{className:ke("h-3 w-3 shrink-0 text-muted-foreground transition-transform duration-200",je&&"rotate-90")}),Je]}):c.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 text-left",children:[c.jsx("span",{className:"h-3 w-3 shrink-0"}),Je]}),z&&i&&c.jsxs(br,{children:[c.jsx(mr,{asChild:!0,children:c.jsx(ge,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 sm:h-6 sm:w-6 shrink-0",onClick:Ce=>{Ce.preventDefault(),Ce.stopPropagation(),i(G)},children:c.jsx(Xf,{className:"h-3.5 w-3.5"})})}),c.jsx(gr,{side:"top",children:"Open terminal"})]}),se==="editDiff"&&s&&e.status==="success"&&re&&c.jsxs(br,{children:[c.jsx(mr,{asChild:!0,children:c.jsx(ge,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 sm:h-6 sm:w-6 shrink-0",onClick:Ce=>{Ce.preventDefault(),Ce.stopPropagation(),s(re)},children:c.jsx(Xf,{className:"h-3.5 w-3.5"})})}),c.jsx(gr,{side:"top",children:"Open diff in editor"})]})]})})]}),be&&c.jsx(LS,{children:c.jsx("div",{className:ke("ml-8 mr-3 mb-2 rounded-md px-3 py-2",Rt.body),children:Ze})}),ae&&c.jsx("div",{className:ke("ml-8 mr-3 mb-2 rounded-md px-3 py-2",Rt.body),children:Ze}),ee&&c.jsx("div",{className:"ml-6 mr-1.5 mb-2 rounded-md bg-amber-500/[0.045] px-2.5 py-2 ring-1 ring-amber-500/20 sm:ml-8 sm:mr-3 sm:px-3",children:c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 rounded-md bg-background/35 px-2.5 py-2 sm:px-3",children:[c.jsx("span",{className:"text-xs text-muted-foreground",children:"Approval required to continue."}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(ge,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2 text-xs",disabled:!l||_!==null,onClick:Ce=>{Ce.preventDefault(),Ce.stopPropagation(),J(!1)},children:_==="reject"?"Rejecting...":"Reject"}),c.jsx(ge,{type:"button",size:"sm",className:"h-7 px-2 text-xs",disabled:!l||_!==null,onClick:Ce=>{Ce.preventDefault(),Ce.stopPropagation(),J(!0)},children:_==="approve"?"Approving...":"Approve"})]})]})}),X&&c.jsx("div",{className:"ml-6 mr-1.5 mb-2 rounded-md bg-yellow-500/[0.035] px-2.5 py-2 ring-1 ring-yellow-500/15 sm:ml-8 sm:mr-3 sm:px-3",children:c.jsx("div",{className:"rounded-md bg-background/35 px-2.5 py-2 sm:px-3",children:F})})]})}const Gf=y.memo(nmt);Gf.displayName="ToolCallCard";const Hde=3,Ex=6;function Wde(e,n){return!!n&&e.some(r=>n(r)!=null)}function rmt(e,n){if(!n||e.some(Fde))return!1;const r=e.filter(i=>i.status!=="running"&&i.status!=="pending");return r.length>=Hde&&r.length===e.length}function imt({calls:e,collapsible:n,threadControlThreads:r,onOpenTerminal:i,onOpenDiff:s,renderInlineSecretPrompt:a,onApprovalResponse:o}){const[l,u]=y.useState(!1),[d,h]=y.useState(()=>!rmt(e,n)),f=y.useRef(!1),{childMap:m,parentSet:x}=y.useMemo(()=>Bde(e),[e]),v=y.useMemo(()=>e.filter(W=>!x.has(W.callId)),[e,x]),_=v.filter(W=>W.status==="running"||W.status==="pending"),w=v.filter(W=>W.status!=="running"&&W.status!=="pending"),S=_.length===0&&w.length>0,C=Wde(e,a),j=n&&!C&&S&&w.length>=Hde;if(y.useEffect(()=>{if(C){h(!0);return}j&&!f.current&&h(!1),f.current=S},[S,C,j]),e.length===0)return null;const T=w.filter(W=>W.status==="success").length,E=w.filter(W=>W.status==="error").length,N=Ade(w);if(j&&!d)return c.jsx("div",{className:"my-2",children:c.jsxs("button",{type:"button",onClick:()=>h(!0),className:"flex w-full items-center gap-2 rounded-md px-2 py-2 text-xs text-muted-foreground transition-colors hover:bg-muted/35",children:[c.jsx(xs,{className:"h-3.5 w-3.5 shrink-0"}),c.jsx(N,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),c.jsx("span",{className:"font-medium",children:$7(w)}),T>0&&c.jsxs("span",{className:"inline-flex items-center gap-0.5 text-green-500",children:[c.jsx(js,{className:"h-3 w-3"})," ",T]}),E>0&&c.jsxs("span",{className:"inline-flex items-center gap-0.5 text-red-500",children:[c.jsx(Ah,{className:"h-3 w-3"})," ",E]})]})});const R=!l&&w.length>Ex,D=R?w.length-Ex:0,U=R?w.slice(-Ex):w,H=R?w.slice(0,D).filter(W=>W.status==="success").length:0,I=D-H;return c.jsxs("div",{className:"my-2",children:[j&&c.jsxs("button",{type:"button",onClick:()=>h(!1),className:"mb-1 flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-muted/35",children:[c.jsx(xs,{className:"h-3 w-3 rotate-90 transition-transform"}),c.jsxs("span",{children:["Collapse ",$7(w)]})]}),R&&c.jsxs("button",{type:"button",onClick:()=>u(!0),className:"mb-1 flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-muted/35",children:[c.jsx(xs,{className:"h-3 w-3"}),c.jsxs("span",{children:[D," earlier tool call",D!==1?"s":"",H>0&&c.jsxs("span",{className:"text-green-500 ml-1",children:["(",H," passed)"]}),I>0&&c.jsxs("span",{className:"text-red-500 ml-1",children:["(",I," failed)"]})]})]}),l&&w.slice(0,D).map((W,$,O)=>c.jsx(Gf,{call:W,childCalls:m.get(W.callId),threadControlThreads:r,onOpenTerminal:i,onOpenDiff:s,renderInlineSecretPrompt:a,onApprovalResponse:o,hideTopConnector:$===0,hideBottomConnector:$===O.length-1&&U.length===0&&_.length===0},W.callId)),U.map((W,$)=>c.jsx(Gf,{call:W,childCalls:m.get(W.callId),threadControlThreads:r,onOpenTerminal:i,onOpenDiff:s,renderInlineSecretPrompt:a,onApprovalResponse:o,hideTopConnector:l?!1:$===0,hideBottomConnector:$===U.length-1&&_.length===0},W.callId)),_.map((W,$)=>c.jsx(Gf,{call:W,childCalls:m.get(W.callId),threadControlThreads:r,onOpenTerminal:i,onOpenDiff:s,renderInlineSecretPrompt:a,onApprovalResponse:o,hideTopConnector:w.length===0&&$===0,hideBottomConnector:$===_.length-1},W.callId))]})}function Ude(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==n[r])return!1;return!0}const B7=y.memo(imt,(e,n)=>e.onOpenTerminal===n.onOpenTerminal&&e.onOpenDiff===n.onOpenDiff&&e.renderInlineSecretPrompt===n.renderInlineSecretPrompt&&e.onApprovalResponse===n.onApprovalResponse&&e.threadControlThreads===n.threadControlThreads&&e.collapsible===n.collapsible&&Ude(e.calls,n.calls));B7.displayName="ToolCallGroup";function mq(e,n){return n?!1:e.length>0&&e.every(r=>r.status!=="running"&&r.status!=="pending")}function smt({provider:e,calls:n,isStreaming:r,threadControlThreads:i,onOpenTerminal:s,onOpenDiff:a,renderInlineSecretPrompt:o,onApprovalResponse:l}){const[u,d]=y.useState(()=>!mq(n,r)),[h,f]=y.useState(!1),[m,x]=y.useState(()=>Date.now()),v=y.useRef(!mq(n,r)),_=!!r||n.some(z=>z.status==="running"||z.status==="pending"),w=Wde(n,o),S=w?!0:u,C=y.useCallback(z=>{w&&!z||d(z)},[w]),j=n.filter(z=>z.status==="success").length,T=n.filter(z=>z.status==="error").length,E=n.length>0?Math.min(...n.map(z=>z.startedAt)):Date.now(),N=!_&&n.length>0?Math.max(...n.map(z=>z.completedAt??z.startedAt)):void 0,R=Ade(n),{childMap:D,parentSet:U}=y.useMemo(()=>Bde(n),[n]),H=y.useMemo(()=>n.filter(z=>!U.has(z.callId)),[n,U]),I=H.filter(z=>z.status==="running"||z.status==="pending"),W=H.filter(z=>z.status!=="running"&&z.status!=="pending"),$=!h&&W.length>Ex,O=$?W.length-Ex:0,B=$?W.slice(-Ex):W,M=$?W.slice(0,O).filter(z=>z.status==="success").length:0,L=O-M;return y.useEffect(()=>{if(w){d(!0),v.current=_;return}v.current&&!_&&n.length>0&&d(!1),v.current=_},[w,_,n.length]),y.useEffect(()=>{if(!_)return;const z=window.setInterval(()=>x(Date.now()),250);return()=>window.clearInterval(z)},[_]),n.length===0?null:c.jsx(MS,{open:S,onOpenChange:C,children:c.jsxs("div",{className:"my-2",children:[c.jsxs(PS,{className:"flex w-full items-center gap-2 rounded-md px-2 py-2 text-left transition-colors hover:bg-muted/35",children:[c.jsx(xs,{className:ke("h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform duration-200",S&&"rotate-90")}),_?c.jsx(Lt,{className:"h-4 w-4 shrink-0 text-muted-foreground animate-spin"}):c.jsx(R,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),c.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:$7(n)}),c.jsxs("div",{className:"flex items-center gap-2 ml-auto text-xs text-muted-foreground tabular-nums shrink-0",children:[!_&&T>0&&c.jsxs("span",{className:"text-red-500",children:[T," failed"]}),c.jsx(D7,{startedAt:E,completedAt:N,now:m})]}),!_&&T===0&&j>0&&c.jsx(js,{className:"h-3.5 w-3.5 shrink-0 text-green-500"}),!_&&T>0&&c.jsx(Ah,{className:"h-3.5 w-3.5 shrink-0 text-red-500"})]}),c.jsx(LS,{children:c.jsxs("div",{className:"mt-1",children:[$&&c.jsxs("button",{type:"button",onClick:()=>f(!0),className:"mb-1 flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-muted/35",children:[c.jsx(xs,{className:"h-3 w-3"}),c.jsxs("span",{children:[O," earlier tool call",O!==1?"s":"",M>0&&c.jsxs("span",{className:"text-green-500 ml-1",children:["(",M," passed)"]}),L>0&&c.jsxs("span",{className:"text-red-500 ml-1",children:["(",L," failed)"]})]})]}),h&&W.slice(0,O).map((z,G,V)=>c.jsx(Gf,{call:z,childCalls:D.get(z.callId),threadControlThreads:i,onOpenTerminal:s,onOpenDiff:a,renderInlineSecretPrompt:o,onApprovalResponse:l,hideTopConnector:G===0,hideBottomConnector:G===V.length-1&&B.length===0&&I.length===0},z.callId)),B.map((z,G)=>c.jsx(Gf,{call:z,childCalls:D.get(z.callId),threadControlThreads:i,onOpenTerminal:s,onOpenDiff:a,renderInlineSecretPrompt:o,onApprovalResponse:l,hideTopConnector:h?!1:G===0,hideBottomConnector:G===B.length-1&&I.length===0},z.callId)),I.map((z,G)=>c.jsx(Gf,{call:z,childCalls:D.get(z.callId),threadControlThreads:i,onOpenTerminal:s,onOpenDiff:a,renderInlineSecretPrompt:o,onApprovalResponse:l,hideTopConnector:W.length===0&&G===0,hideBottomConnector:G===I.length-1},z.callId))]})})]})})}const z7=y.memo(smt,(e,n)=>e.provider===n.provider&&e.isStreaming===n.isStreaming&&e.onOpenTerminal===n.onOpenTerminal&&e.onOpenDiff===n.onOpenDiff&&e.renderInlineSecretPrompt===n.renderInlineSecretPrompt&&e.onApprovalResponse===n.onApprovalResponse&&e.threadControlThreads===n.threadControlThreads&&Ude(e.calls,n.calls));z7.displayName="AgentToolCallWrapper";function gq(e){switch(e){case"system":return"border-red-500/35 bg-red-500/10 text-red-700 dark:text-red-300";case"user":return"border-blue-500/35 bg-blue-500/10 text-blue-700 dark:text-blue-300";case"assistant":return"border-emerald-500/35 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300";case"tool":return"border-amber-500/35 bg-amber-500/10 text-amber-700 dark:text-amber-300";default:return"border-border bg-muted text-muted-foreground"}}function Kf(e){if(e==null)return"";if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e);try{return JSON.stringify(e,null,2)}catch{return String(e)}}function amt(e){return"content"in e?Kf(e.content):Kf(e)}function omt(e){return(Array.isArray(e.tool_calls)?e.tool_calls:Array.isArray(e.toolCalls)?e.toolCalls:[]).map((r,i)=>{const s=r&&typeof r=="object"?r:{},a=s.function&&typeof s.function=="object"?s.function:{};return{id:Kf(s.id||s.call_id||s.tool_call_id||`tool-call-${i+1}`),name:Kf(a.name||s.name||s.tool||"tool"),args:Kf(a.arguments||s.arguments||s.args||{})}})}function lmt(e,n){const r=e&&typeof e=="object"?e:{},i=r.function&&typeof r.function=="object"?r.function:{};return{name:Kf(i.name||r.name||`tool_${n+1}`),description:typeof i.description=="string"?i.description:typeof r.description=="string"?r.description:void 0,raw:e}}function Vde(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function mm(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function yq({badge:e,meta:n,preview:r,children:i,tone:s="default",defaultOpen:a=!1}){const[o,l]=y.useState(a);return c.jsx(MS,{open:o,onOpenChange:l,children:c.jsxs("div",{className:ke("rounded-md border p-3",s==="assistant"?"border-emerald-500/25 bg-emerald-500/10":"border-border/80 bg-background"),children:[c.jsxs("div",{className:"flex items-start gap-2",children:[c.jsxs(PS,{className:"mt-0.5 rounded-sm p-0.5 text-muted-foreground transition-colors hover:bg-background/70 hover:text-foreground",children:[c.jsx(xs,{className:ke("h-4 w-4 transition-transform",o&&"rotate-90")}),c.jsx("span",{className:"sr-only",children:o?"Collapse section":"Expand section"})]}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[e,n]}),r?c.jsx("div",{className:"mt-1 text-xs text-muted-foreground/70",children:r}):null]})]}),c.jsx(LS,{className:"pl-6",children:c.jsx("div",{className:"pt-3",children:i})})]})})}function cmt({flow:e}){const n=e.rounds;if(!n.some(f=>f.metrics))return null;let i=0,s=0,a=0,o=0,l,u=0,d=0;for(const f of n){const m=f.metrics;m&&(i+=m.durationMs,m.promptTokens&&(s+=m.promptTokens),m.completionTokens&&(a+=m.completionTokens),m.totalTokens&&(o+=m.totalTokens),m.tokensPerSecond&&m.completionTokens&&(u+=m.tokensPerSecond*m.completionTokens,d+=m.completionTokens),m.contextUsage&&(l=m.contextUsage))}const h=d>0?Math.round(u/d*10)/10:void 0;return c.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:[c.jsxs("div",{className:"rounded-md border border-border bg-muted/30 px-2.5 py-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[c.jsx(Gm,{className:"h-3 w-3"}),"Total Duration"]}),c.jsx("div",{className:"mt-0.5 text-sm font-semibold text-foreground",children:Vde(i)}),c.jsxs("div",{className:"text-xs text-muted-foreground",children:[n.length," round",n.length!==1?"s":""]})]}),c.jsxs("div",{className:"rounded-md border border-border bg-muted/30 px-2.5 py-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[c.jsx(Q8,{className:"h-3 w-3"}),"Tokens"]}),c.jsx("div",{className:"mt-0.5 text-sm font-semibold text-foreground",children:o>0?mm(o):s+a>0?mm(s+a):"—"}),c.jsxs("div",{className:"text-xs text-muted-foreground",children:[s>0?`${mm(s)} in`:"",s>0&&a>0?" · ":"",a>0?`${mm(a)} out`:"",s===0&&a===0?"estimated":""]})]}),c.jsxs("div",{className:"rounded-md border border-border bg-muted/30 px-2.5 py-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[c.jsx(BY,{className:"h-3 w-3"}),"Speed"]}),c.jsx("div",{className:"mt-0.5 text-sm font-semibold text-foreground",children:h?`${h} tok/s`:"—"}),c.jsx("div",{className:"text-xs text-muted-foreground",children:"completion tokens/sec"})]}),c.jsxs("div",{className:"rounded-md border border-border bg-muted/30 px-2.5 py-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[c.jsx(Wye,{className:"h-3 w-3"}),"Context Window"]}),l?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"mt-0.5 text-sm font-semibold text-foreground",children:[Math.round(l.ratio*100),"%"]}),c.jsxs("div",{className:"text-xs text-muted-foreground",children:[mm(l.total)," / ",mm(l.limit)," tokens",l.pruned?" (pruned)":""]})]}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mt-0.5 text-sm font-semibold text-foreground",children:"—"}),c.jsx("div",{className:"text-xs text-muted-foreground",children:"no data"})]})]})]})}function umt({metrics:e}){return e?c.jsxs("div",{className:"mt-2 flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[c.jsx("span",{title:"LLM request duration",children:Vde(e.durationMs)}),e.promptTokens!=null&&c.jsxs("span",{title:"Prompt tokens",children:[mm(e.promptTokens)," prompt"]}),e.completionTokens!=null&&c.jsxs("span",{title:"Completion tokens",children:[mm(e.completionTokens)," completion"]}),e.tokensPerSecond!=null&&c.jsxs("span",{title:"Completion tokens per second",className:"font-medium text-foreground/80",children:[e.tokensPerSecond," tok/s"]}),e.contextUsage&&c.jsxs("span",{title:"Context window utilisation",children:["ctx ",Math.round(e.contextUsage.ratio*100),"%",e.contextUsage.pruned?" (pruned)":""]})]}):null}function dmt(e,n){const r=[];if(!e)return n?[{id:"assistant-response",kind:"response",content:n}]:r;e.rounds.some(i=>i.metrics)&&r.push({id:"summary",kind:"summary",flow:e}),e.memory&&r.push({id:"memory",kind:"memory",flow:e.memory});for(const i of e.rounds){const s=Array.isArray(i.messages)?i.messages:[],a=Array.isArray(i.tools)?i.tools.map(lmt):[];r.push({id:`round-${i.round}`,kind:"round",round:i,messageCount:s.length,toolCount:a.length}),s.forEach((o,l)=>{const u=o&&typeof o=="object"?o:{content:o};r.push({id:`round-${i.round}-message-${l}`,kind:"message",roundNumber:i.round,index:l,role:Kf(u.role||"message"),content:amt(u),raw:o,toolCalls:omt(u)})}),a.length>0&&r.push({id:`round-${i.round}-tools`,kind:"tools",roundNumber:i.round,tools:a})}return n&&r.push({id:"assistant-response",kind:"response",content:n}),r}function hmt({row:e}){if(e.kind==="summary")return c.jsx(cmt,{flow:e.flow});if(e.kind==="memory")return c.jsxs("div",{className:"min-w-0 overflow-hidden rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2",children:[c.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[c.jsx(io,{className:"h-3.5 w-3.5 text-amber-600 dark:text-amber-300"}),c.jsx("span",{className:"text-xs font-semibold text-foreground",children:"Relevant memory"}),c.jsxs("span",{className:"text-xs text-muted-foreground",children:[e.flow.injectedIds.length," injected / ",e.flow.retrieved.length," retrieved"]})]}),c.jsx("div",{className:"mt-2 space-y-1",children:e.flow.retrieved.length>0?e.flow.retrieved.map(r=>c.jsxs("div",{className:"min-w-0 rounded border border-border/60 bg-background/65 px-2 py-1",children:[c.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2 text-[11px] text-muted-foreground",children:[c.jsx("span",{children:r.scope}),c.jsx("span",{className:"truncate",title:r.source,children:r.source}),r.sourceId?c.jsxs("span",{className:"truncate",title:r.sourceId,children:["source ",r.sourceId]}):null,c.jsx("span",{children:new Date(r.updatedAt).toLocaleDateString()})]}),c.jsx("div",{className:"mt-0.5 break-words text-xs text-foreground",children:r.content})]},r.id)):c.jsx("div",{className:"text-xs text-muted-foreground",children:"No memory injected for this turn."})})]});if(e.kind==="round")return c.jsxs("div",{className:"min-w-0 overflow-hidden rounded-md border border-border bg-background px-3 py-2",children:[c.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[c.jsxs("span",{className:"rounded-md bg-foreground px-2 py-1 text-xs font-semibold text-background",children:["Round ",e.round.round]}),c.jsx("span",{className:"min-w-0 break-words text-xs text-muted-foreground",children:e.round.model}),c.jsx("span",{className:"min-w-0 break-words text-xs text-muted-foreground",children:new Date(e.round.createdAt).toLocaleString()})]}),c.jsxs("div",{className:"mt-2 flex min-w-0 flex-wrap gap-2 text-xs text-muted-foreground",children:[c.jsxs("span",{children:[e.messageCount," messages sent"]}),c.jsxs("span",{children:[e.toolCount," tool schemas available"]}),e.round.tool_choice?c.jsxs("span",{className:"min-w-0 break-words",children:["tool_choice: ",e.round.tool_choice]}):null]}),c.jsx(umt,{metrics:e.round.metrics})]});if(e.kind==="tools")return c.jsxs("div",{className:"relative ml-2 sm:ml-4 border-l border-border pl-2 sm:pl-4",children:[c.jsx("div",{className:"absolute -left-1.5 top-3 h-3 w-3 rounded-full border border-border bg-background"}),c.jsxs("div",{className:"rounded-md border border-border/80 bg-muted/25 p-3",children:[c.jsxs("div",{className:"mb-2 flex items-center gap-2 text-xs font-medium text-foreground",children:[c.jsx(aM,{className:"h-3.5 w-3.5"}),"Tools offered to model in round ",e.roundNumber]}),c.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:e.tools.map(r=>c.jsxs("details",{className:"rounded-md border border-border/70 bg-background/70 p-2",children:[c.jsx("summary",{className:"cursor-pointer text-xs font-medium text-foreground",children:r.name}),r.description?c.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:r.description}):null,c.jsx("pre",{className:"mt-2 max-h-40 overflow-auto whitespace-pre-wrap break-words rounded bg-muted/40 p-2 font-mono text-xs leading-5",children:Kf(r.raw)})]},r.name))})]})]});if(e.kind==="response")return c.jsxs("div",{className:"relative ml-2 sm:ml-4 border-l border-border pl-2 sm:pl-4",children:[c.jsx("div",{className:"absolute -left-1.5 top-3 h-3 w-3 rounded-full border border-emerald-500/40 bg-background"}),c.jsx(yq,{tone:"assistant",defaultOpen:!1,badge:c.jsx("span",{className:ke("rounded-md border px-2 py-0.5 text-xs font-semibold",gq("assistant")),children:"assistant response"}),meta:c.jsx("span",{className:"text-xs text-muted-foreground",children:"rendered chat answer"}),preview:c.jsx("span",{className:"block truncate",children:e.content||"(empty response)"}),children:c.jsx("pre",{className:"max-h-72 overflow-auto whitespace-pre-wrap break-words rounded-md bg-background/70 p-3 font-mono text-xs leading-5 text-foreground [overflow-wrap:anywhere]",children:e.content||"(empty response)"})})]});const n=e.content?e.content.length>80?e.content.slice(0,80)+"...":e.content:"(empty content)";return c.jsxs("div",{className:"relative ml-2 sm:ml-4 border-l border-border pl-2 sm:pl-4",children:[c.jsx("div",{className:"absolute -left-1.5 top-3 h-3 w-3 rounded-full border border-border bg-background"}),c.jsxs(yq,{defaultOpen:!1,badge:c.jsx("span",{className:ke("rounded-md border px-2 py-0.5 text-xs font-semibold",gq(e.role)),children:e.role}),meta:c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"text-xs text-muted-foreground",children:["round ",e.roundNumber," / message ",e.index+1]}),e.toolCalls.length>0?c.jsxs("span",{className:"text-xs text-amber-600 dark:text-amber-400",children:[e.toolCalls.length," tool call",e.toolCalls.length!==1?"s":""]}):null]}),preview:c.jsx("span",{className:"block truncate",children:n}),children:[c.jsx("pre",{className:"max-h-72 overflow-auto whitespace-pre-wrap break-words rounded-md bg-muted/35 p-3 font-mono text-xs leading-5 text-foreground [overflow-wrap:anywhere]",children:e.content||"(empty content)"}),e.toolCalls.length>0?c.jsx("div",{className:"mt-3 space-y-2",children:e.toolCalls.map(r=>c.jsxs("details",{className:"rounded-md border border-amber-500/25 bg-amber-500/10 p-2",children:[c.jsxs("summary",{className:"cursor-pointer text-xs font-medium text-amber-800 dark:text-amber-200",children:["Tool call: ",r.name," ",c.jsxs("span",{className:"font-normal text-muted-foreground",children:["(",r.id,")"]})]}),c.jsx("pre",{className:"mt-2 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded bg-background/70 p-2 font-mono text-xs leading-5",children:r.args||"{}"})]},r.id))}):null,c.jsxs("details",{className:"mt-2",children:[c.jsx("summary",{className:"cursor-pointer text-xs text-muted-foreground",children:"Raw message JSON"}),c.jsx("pre",{className:"mt-2 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded bg-muted/35 p-2 font-mono text-xs leading-5",children:Kf(e.raw)})]})]})]})}function fmt({open:e,rows:n,contextFlow:r,loading:i}){const s=y.useRef(null),a=cM({count:n.length,getScrollElement:()=>s.current,estimateSize:o=>{const l=n[o];return l?l.kind==="summary"?110:l.kind==="memory"?Math.min(360,84+l.flow.retrieved.length*74):l.kind==="round"?120:l.kind==="tools"?Math.min(420,110+l.tools.length*72):l.kind==="response"?72:52:120},overscan:5,enabled:e});return y.useEffect(()=>{if(!e)return;const o=window.requestAnimationFrame(()=>{a.measure()});return()=>window.cancelAnimationFrame(o)},[e,n.length,a]),c.jsxs("div",{className:"flex h-full min-h-0 flex-col px-3 pb-3 pt-2",children:[r!=null&&r.note?c.jsx("p",{className:"mb-2 shrink-0 rounded-md border border-border/70 bg-muted/40 px-2.5 py-1.5 text-xs text-muted-foreground",children:r.note}):null,n.length>0?c.jsx("div",{ref:s,className:"min-h-0 flex-1 overflow-auto pr-2",children:c.jsx("div",{className:"relative w-full",style:{height:`${a.getTotalSize()}px`},children:a.getVirtualItems().map(o=>{const l=n[o.index];return l?c.jsx("div",{"data-index":o.index,ref:a.measureElement,className:"absolute left-0 top-0 w-full pb-3",style:{transform:`translateY(${o.start}px)`},children:c.jsx(hmt,{row:l})},l.id):null})})}):i?c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col items-center justify-center gap-2 rounded-md border border-dashed border-border text-sm text-muted-foreground",children:[c.jsx(Lt,{className:"h-5 w-5 animate-spin"}),c.jsx("span",{children:"Loading context trace…"})]}):c.jsxs("div",{className:"flex min-h-0 flex-1 items-center justify-center rounded-md border border-dashed border-border text-sm text-muted-foreground",children:[c.jsx(vd,{className:"mr-2 h-4 w-4"}),"No context snapshot is available for this message."]})]})}function pmt({rawText:e}){const n=_S(),r=e||"No context snapshot is available for this message.";return c.jsx("div",{className:"h-full min-h-0 p-3 pt-2",children:c.jsx("div",{className:"h-full min-h-0 overflow-hidden rounded-md border border-border/70 bg-background",children:c.jsx(lS,{height:"100%",language:e?"json":"plaintext",beforeMount:i=>Xl(i,n),theme:n,value:r,options:{readOnly:!0,domReadOnly:!0,minimap:{enabled:!1},"semanticHighlighting.enabled":!0,automaticLayout:!0,wordWrap:"on",fontSize:12,lineHeight:18,padding:{top:12,bottom:12},scrollBeyondLastLine:!1,renderLineHighlight:"none",overviewRulerLanes:0,tabSize:2}})})})}function mmt({open:e,onOpenChange:n,contextFlow:r,responseContent:i,loading:s}){const[a,o]=y.useState("trace"),[l,u]=y.useState(!1),d=y.useMemo(()=>dmt(r,i),[r,i]),h=y.useMemo(()=>r?JSON.stringify(r,null,2):"",[r]),f=!!(s&&!r),m=async()=>{h&&(await navigator.clipboard.writeText(h),u(!0),window.setTimeout(()=>u(!1),1200))};return c.jsx(Io,{open:e,onOpenChange:n,children:c.jsxs(oo,{showCloseButton:!1,className:"grid h-[95vh] w-[calc(100dvw-1rem)] max-w-[1200px] grid-rows-[auto_minmax(0,1fr)] overflow-hidden p-0 sm:h-[85vh] sm:w-[96vw]",children:[c.jsx(ul,{className:"border-b px-3 py-2",children:c.jsxs("div",{className:"grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-2",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx(lo,{className:"truncate text-sm font-semibold",children:"LLM Context Flow"}),c.jsx(ku,{className:"truncate text-xs",children:r?`${r.provider}${r.model?` / ${r.model}`:""} · ${r.rounds.length} round${r.rounds.length===1?"":"s"}`:f?"Loading context trace…":"No context snapshot available"})]}),c.jsxs("div",{className:"-my-1 flex shrink-0 items-center gap-1 p-1",children:[c.jsx(ge,{type:"button",variant:a==="trace"?"default":"outline",size:"sm",className:"h-7 px-2 text-xs",onClick:()=>o("trace"),children:"Trace"}),c.jsx(ge,{type:"button",variant:a==="raw"?"default":"outline",size:"sm",className:"h-7 px-2 text-xs",onClick:()=>o("raw"),children:"Raw"}),c.jsxs(ge,{type:"button",variant:"outline",size:"sm",className:"h-7 px-2 text-xs",onClick:m,disabled:!h,children:[l?c.jsx(Li,{className:"h-3 w-3 sm:mr-1"}):c.jsx(tl,{className:"h-3 w-3 sm:mr-1"}),c.jsx("span",{className:"hidden sm:inline",children:l?"Copied":"Copy"}),c.jsx("span",{className:"sr-only",children:l?"Copied":"Copy raw trace"})]}),c.jsxs(XR,{className:"ml-1 rounded-sm p-1 opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[c.jsx(Hr,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}),a==="trace"?c.jsx(fmt,{open:e,rows:d,contextFlow:r,loading:f},"trace-list"):c.jsx(pmt,{rawText:h})]})})}const F3=new Map,k8=new Map,gmt={current:0};function qde(e,n){return`${gmt.current}:${e}:${n}`}function ymt(e,n){const r=F3.get(qde(e,n));return r==null?void 0:r.flow}async function xmt(e,n,r){const i=qde(e,n),s=F3.get(i);if(s)return s.flow;const a=k8.get(i);if(a)return(await a).flow;const o=(async()=>{try{const u={};r&&(u.Authorization=`Bearer ${r}`);const d=await fetch(`${jr()}/api/sessions/${e}/messages/${n}/context-flow`,{headers:u});if(!d.ok){const x={flow:null,at:Date.now()};return F3.set(i,x),x}const m={flow:(await d.json()).contextFlow??null,at:Date.now()};return F3.set(i,m),m}catch{return{flow:null,at:Date.now()}}finally{k8.delete(i)}})();return k8.set(i,o),(await o).flow}const F7=/^[A-Za-z]:[\\/]/,vmt=/^\//;function xq(e){return e.replace(/\\/g,"/").replace(/\/+$/,"")||(e.startsWith("/")?"/":"")}function bmt(e){const n=e.pathname||"/",r=/^\/[A-Za-z]:\//.test(n)?n.slice(1):n;return!e.hostname||e.hostname==="localhost"?r:`//${e.hostname}${r}`}function Gde(e){return F7.test(e)||vmt.test(e)}function Kde(e,n){const r=e.replace(/\\/g,"/");if(!r||r==="/")return!1;if(/^L\d+(?:C\d+)?$/i.test(n))return!0;const i=r.split("/").pop()??"";return/\.[A-Za-z0-9]+(?::\d+(?::\d+)?)?$/.test(i)}function _mt(e,n){if(n)return null;const r=e.replace(/\\/g,"/"),i=r.lastIndexOf("/"),a=(i>=0?r.slice(i+1):r).match(/^(.*?):(\d+)(?::(\d+))?$/);if(!a)return null;const o=i>=0?`${e.slice(0,i+1)}${a[1]??""}`:a[1]??"";if(!Gde(o)||!Kde(o,`L${a[2]}`))return null;const l={path:o,line:Number.parseInt(a[2],10)};return a[3]&&(l.column=Number.parseInt(a[3],10)),l}function wmt(e){if(!e)return null;const n=e.trim();if(!n)return null;let r=n,i="";try{const u=new URL(n);if(u.protocol==="http:"||u.protocol==="https:"){if(r=u.pathname,i=u.hash.startsWith("#")?u.hash.slice(1):u.hash,!Kde(r,i))return null}else if(u.protocol==="file:")r=bmt(u),i=u.hash.startsWith("#")?u.hash.slice(1):u.hash;else{const d=n.indexOf("#");d>=0&&(r=n.slice(0,d),i=n.slice(d+1))}}catch{const u=n.indexOf("#");u>=0&&(r=n.slice(0,u),i=n.slice(u+1))}let s;try{s=decodeURIComponent(r)}catch{return null}const a=_mt(s,i);if(a)return a;if(!Gde(s))return null;const o={path:s},l=i.match(/^L(\d+)(?:C(\d+))?$/i);return l&&(o.line=Number.parseInt(l[1],10),l[2]&&(o.column=Number.parseInt(l[2],10))),o}function vq(e,n){if(!n)return!1;const r=xq(e),i=xq(n);if(!r||!i)return!1;const s=F7.test(r)?r.toLowerCase():r,a=F7.test(i)?i.toLowerCase():i;return s===a||(a==="/"?s.startsWith("/"):s.startsWith(`${a}/`))}function Smt(e){const n=e==null?void 0:e.memory;if(!n||n.injectedIds.length===0)return[];const r=new Set(n.injectedIds);return n.retrieved.filter(i=>r.has(i.id))}const kmt="memory_feedback",bq=500,_L={should_have_remembered:{label:"Memorize this",description:"The user wants this assistant answer reviewed as durable memory.",tag:"should-have-remembered"},wrong_memory_used:{label:"Wrong memory used",description:"The user says an incorrect or irrelevant memory influenced this answer.",tag:"wrong-memory-used"}};function Cmt(e){return _L[e].label}function jmt(e){return`${_L[e].label} feedback saved`}function Nmt(e){const n=(e??"").replace(/\s+/g," ").trim();return n?n.length<=bq?n:`${n.slice(0,bq-3).trimEnd()}...`:null}function Tmt({kind:e,messageId:n,sessionId:r,projectId:i,answerContent:s}){const a=_L[e],o=Nmt(s);return{content:[`Memory feedback: ${a.label}. ${a.description}`,o?`Assistant answer excerpt: ${o}`:null].filter(Boolean).join(`
|
|
1424
1424
|
`),projectId:i??null,sessionId:r??null,sourceType:kmt,sourceId:n,sourceSurface:"chat",tags:["memory-feedback","feedback",a.tag]}}function Emt(e){return e.content.length>0||e.userDisplayText.length>0||e.userDisplaySegments.length>0||e.attachmentCount>0}function Amt(){return["fixed left-1/2 bottom-[max(0.75rem,env(safe-area-inset-bottom))] z-50","w-[min(42rem,calc(100vw-1rem))] max-w-[calc(100vw-1rem)] -translate-x-1/2","rounded-2xl border border-border bg-background p-1.5 shadow-2xl shadow-black/30","md:static md:w-full md:max-w-3xl md:translate-x-0","md:rounded-none md:border-0 md:bg-transparent md:p-0 md:shadow-none"].join(" ")}function Omt(e){return["space-y-3 origin-bottom transition-opacity duration-150 ease-out",e?"opacity-100":"opacity-0"].join(" ")}const Rmt=3,Mmt=120,fx=new Map;function _q(e,n){return!!(e&&e!=="jait"&&n.length>=Rmt)}const wq=/<pre[^>]*><code>([\s\S]*)<\/code><\/pre>/;function Sq(){return c.jsx("span",{className:"inline-flex items-center gap-1",children:[0,1,2].map(e=>c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-pulse",style:{animationDelay:`${e*160}ms`}},e))})}function Yde(e){const n=e.toLowerCase();return!n||n==="text"||n==="plain"?"txt":n==="shell"||n==="sh"?"bash":n}function Pmt(e,n,r){return`${r}\0${Yde(n)}\0${e}`}function C8(e,n){if(fx.size>=Mmt){const r=fx.keys().next().value;r&&fx.delete(r)}fx.set(e,n)}function Lmt({code:e,language:n,className:r}){const[i,s]=y.useState(null);return y.useEffect(()=>{let a=!1;const o=setTimeout(()=>{(async()=>{var f,m;const u=document.documentElement.classList.contains("dark")?"github-dark":"github-light",d=Yde(n),h=Pmt(e,n,u);if(fx.has(h)){s(fx.get(h)??null);return}try{const x=await iq(e,{lang:d,theme:u});if(a)return;const v=((f=x.match(wq))==null?void 0:f[1])??null;C8(h,v),s(v)}catch{try{const x=await iq(e,{lang:"txt",theme:u});if(a)return;const v=((m=x.match(wq))==null?void 0:m[1])??null;C8(h,v),s(v)}catch{a||(C8(h,null),s(null))}}})()},150);return()=>{a=!0,clearTimeout(o)}},[e,n]),i?c.jsx("code",{className:ke(r,"whitespace-pre"),dangerouslySetInnerHTML:{__html:i}}):c.jsx("code",{className:ke(r,"whitespace-pre"),children:e})}function Xde(e){return"prose dark:prose-invert max-w-none break-words [overflow-wrap:anywhere] prose-pre:bg-muted prose-pre:border prose-pre:max-w-full prose-pre:overflow-x-auto prose-code:before:content-none prose-code:after:content-none prose-p:leading-relaxed [font-size:0.9rem]"}function $mt(e){const n=e.replace(/\\/g,"/"),r=n.split("/");return r[r.length-1]??n}function Dmt({href:e,target:n,onOpenPath:r}){const i=$mt(n.path),s=n.line?`L${n.line}${n.column?`:${n.column}`:""}`:null;return c.jsxs("a",{href:e,className:ke("not-prose inline-flex max-w-full items-center gap-1.5 rounded-md border border-border/70 bg-muted/45 px-2 py-1 align-middle text-xs font-medium leading-none text-foreground no-underline transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"),title:n.path,onClick:a=>{a.preventDefault(),r(n.path,n.line,n.column)},children:[c.jsx(pa,{filename:i,className:"h-3.5 w-3.5 shrink-0"}),c.jsx("span",{className:"max-w-[220px] truncate",children:i}),s?c.jsx("span",{className:"shrink-0 rounded bg-background/80 px-1 py-0.5 text-2xs text-muted-foreground",children:s}):null]})}function Jde(e){return{pre:({children:n})=>c.jsx(c.Fragment,{children:n}),code:({node:n,className:r,children:i,ref:s,...a})=>{var l,u;if(!(((l=n==null?void 0:n.position)==null?void 0:l.start.line)===((u=n==null?void 0:n.position)==null?void 0:u.end.line)&&!r)){const d=typeof r=="string"&&r.replace(/^language-/,"").split(" ")[0]||"text",h=String(i??"").replace(/\n$/,"");return c.jsxs(ept,{code:h,language:d,children:[c.jsxs(tpt,{children:[c.jsx(npt,{children:c.jsx(rpt,{children:d})}),c.jsx(ipt,{children:c.jsx(spt,{})})]}),c.jsx("div",{className:"overflow-x-auto px-3 py-2 text-sm",children:c.jsx(Lmt,{code:h,language:d,className:r})})]})}return c.jsx("code",{className:ke("not-prose inline-flex max-w-full items-baseline rounded-md border border-border/70 bg-muted/45 px-2 py-1 align-middle font-mono text-xs font-medium leading-[1.2] text-foreground","shadow-[inset_0_1px_0_hsl(var(--background)/0.55)]"),...a,children:c.jsx("span",{className:"max-w-[32rem] truncate sm:max-w-[40rem]",children:i})})},a:({href:n,ref:r,...i})=>{if(!e)return c.jsx("a",{href:n,...i,children:i.children});const s=wmt(n);return s?c.jsx(Dmt,{href:n,target:s,onOpenPath:e}):c.jsx("a",{href:n,...i,children:i.children})},img:({src:n,alt:r,ref:i,...s})=>{const a=typeof n=="string"?_de(n):null;return a?c.jsx("a",{href:a,target:"_blank",rel:"noreferrer",className:"not-prose block overflow-hidden rounded-xl border border-border/60 bg-muted/20 no-underline",children:c.jsx("img",{src:a,alt:r??"Chat image",loading:"lazy",className:"max-h-[28rem] w-full object-contain bg-background/80",...s})}):c.jsx("span",{className:"inline-flex rounded-md border border-dashed border-border/70 px-2 py-1 text-xs text-muted-foreground",children:"image unavailable"})}}}function Imt({content:e,compact:n,onOpenPath:r}){const i=y.useMemo(()=>Jde(r),[r]);return c.jsx("div",{className:Xde(),children:c.jsx(hae,{remarkPlugins:[eae],components:i,children:e})})}function Bmt({content:e,compact:n,onOpenPath:r}){const i=y.useMemo(()=>Jde(r),[r]),s=({blockMatch:o})=>c.jsx(hae,{remarkPlugins:[eae],components:i,children:o.output}),{blockMatches:a}=Dht({llmOutput:e,blocks:[],fallbackBlock:{component:s,lookBack:jht()},isStreamFinished:!1});return c.jsx("div",{className:Xde(),children:a.map((o,l)=>{const u=o.block.component;return c.jsx(u,{blockMatch:o},l)})})}const H7=y.memo(function({content:n,compact:r,isStreaming:i,preferLlmUi:s,onOpenPath:a}){return s&&i?c.jsx(Bmt,{content:n,compact:r,onOpenPath:a}):c.jsx(Imt,{content:n,compact:r,onOpenPath:a})});H7.displayName="AssistantMarkdown";function zmt({messageId:e,messageIndex:n,messageFromEnd:r,role:i,content:s,contextFlow:a,hasContextFlow:o,hasMemoryProvenance:l,sessionId:u,authToken:d,displayContent:h,referencedFiles:f,displaySegments:m,attachments:x,thinking:v,thinkingDuration:_,toolCalls:w,segments:S,isStreaming:C,compact:j,preferLlmUi:T,provider:E,threadControlThreads:N,onOpenTerminal:R,renderInlineSecretPrompt:D,onApprovalResponse:U,onEditMessage:H,editComposer:I,onOpenPath:W,onOpenDiff:$,onOpenMemorySource:O,onMemoryFeedback:B}){const M=i==="user",L=Km(),[z,G]=y.useState(()=>typeof n=="number"&&u?ymt(u,n)??null:null),[V,F]=y.useState(!1),X=a??z??void 0,q=!a&&(o===!0||l===!0),ee=y.useCallback(async()=>{if(!(z||V||a)&&!(typeof n!="number"||!u)){F(!0);try{const ye=await xmt(u,n,d??void 0);ye&&G(ye)}catch{}finally{F(!1)}}},[z,V,a,n,u,d]),{userDisplayText:J,userDisplaySegments:Q}=y.useMemo(()=>{if(!M)return{userDisplayText:s,userDisplaySegments:[]};if(m!=null&&m.length)return{userDisplayText:R0(m),userDisplaySegments:m};if(h){const Ie=Nj(h,f);return{userDisplayText:h,userDisplaySegments:Ie}}const ye=j7(s);return{userDisplayText:ye.text,userDisplaySegments:ye.displaySegments}},[M,s,h,f,m]),[re,te]=y.useState(!1),[ce,me]=y.useState(!1),[se,ae]=y.useState(!1),[be,_e]=y.useState(!1),[je,Xe]=y.useState(!1),[yt,Nt]=y.useState(!1),[Rt,nn]=y.useState(!1),[rn,Ft]=y.useState(null),[Zt,Je]=y.useState(""),[Ze,ve]=y.useState([]),[we,De]=y.useState(null),[xt,dt]=y.useState(null),ft=y.useMemo(()=>{if(!M)return[];const ye=Ls(xt??Q).flatMap(Ie=>Ie.type==="image"||Ie.type==="attachment"?[{name:Ie.name,mimeType:Ie.mimeType,data:Ie.data,...Ie.type==="image"?{preview:`data:${Ie.mimeType};base64,${Ie.data}`}:{}}]:[]);return ye.length>0?ye:x??[]},[x,M,xt,Q]),Dt=y.useMemo(()=>ft.filter(ye=>ye.mimeType.startsWith("image/")),[ft]),Wt=y.useMemo(()=>ft.filter(ye=>!ye.mimeType.startsWith("image/")),[ft]),Ye=M&&Emt({content:s,userDisplayText:we??J,userDisplaySegments:xt??Q,attachmentCount:ft.length}),We=y.useRef(null),mt=y.useRef(null),at=y.useRef(null),Ue=y.useRef(null);y.useEffect(()=>()=>{We.current!==null&&window.clearTimeout(We.current),mt.current!==null&&window.clearTimeout(mt.current)},[]),y.useEffect(()=>{se||(Je(J),ve(Q))},[se,Q,J]),y.useEffect(()=>{if(!xt&&we==null)return;const ye=we===J,Ie=xt===Q||JSON.stringify(xt??[])===JSON.stringify(Q);ye&&Ie&&(De(null),dt(null))},[xt,we,Q,J]),y.useEffect(()=>{var Ie;if(!se){_e(!1);return}const ye=window.requestAnimationFrame(()=>{_e(!0)});return(Ie=Ue.current)==null||Ie.focus(),()=>window.cancelAnimationFrame(ye)},[se]);const Ne=()=>{var Ie;const ye=[];if(w&&w.length>0)for(const He of w){const ct=He.tool.replace(/_/g,"."),he=Object.entries(He.args).filter(([,Ve])=>Ve!=null&&Ve!=="").map(([Ve,At])=>`${Ve}: ${typeof At=="string"?At:JSON.stringify(At)}`).join(", "),Ae=He.status==="success"?"✓":He.status==="error"?"✗":"…",pe=He.completedAt&&He.startedAt?$de(He.startedAt,He.completedAt):"";if(ye.push(`[${Ae} ${ct}] ${he}`),(Ie=He.result)!=null&&Ie.message){const Ve=He.result.message.length>500?He.result.message.slice(0,500)+"…":He.result.message;ye.push(Ve)}pe&&ye.push(`Duration: ${pe}`),ye.push("")}return s&&ye.push(M?jue(Q)||J:s),ye.join(`
|
|
1425
1425
|
`).trim()},Ce=async()=>{const ye=Ne();if(!ye)return;const Ie=M?Nue(Q):null;try{Ie&&typeof ClipboardItem<"u"&&navigator.clipboard.write?await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([ye],{type:"text/plain"}),[jj]:new Blob([Ie],{type:jj})})]):await navigator.clipboard.writeText(ye)}catch{const He=document.createElement("textarea");He.value=ye,He.style.position="fixed",He.style.opacity="0",document.body.appendChild(He),He.focus(),He.select(),document.execCommand("copy"),document.body.removeChild(He)}te(!0),We.current!==null&&window.clearTimeout(We.current),We.current=window.setTimeout(()=>te(!1),1200)},Be=U0(),rt=M&&!!e&&!!H,pt=rt,Qe=C&&!v&&!(typeof s=="string"?s:"").trim(),Tt=M||!C,Et=!M&&!!e&&!!B&&!C,jt=(rn==null?void 0:rn.status)==="saving",tt=y.useCallback(()=>{!rt||je||(Je(J),ve(Q),ae(!0))},[rt,je,Q,J]),ot=y.useCallback(()=>{Je(J),ve(Q),ae(!1)},[Q,J]),Mt=()=>{var Ie;!rt||se||typeof window<"u"&&(Ie=window.getSelection())!=null&&Ie.toString().trim()||tt()},Ut=y.useCallback(async(ye,Ie)=>{if(!rt||!e||!H||je)return;const He=cpt(ye??Zt,Ie??Ze,Q);if(He){De(He.text),dt(He.displaySegments),ae(!1),Xe(!0);try{await H(e,He.text,n,r,{referencedFiles:He.referencedFiles,displaySegments:He.displaySegments})}catch(ct){throw De(null),dt(null),ae(!0),ct}finally{Xe(!1)}}},[rt,Zt,Ze,je,e,r,n,H]),Re=async(ye,Ie)=>{if(!rt||!e||!H)return;const He=ye.trim();He&&await H(e,He,n,r,{referencedFiles:(Ie??Q).filter(ct=>ct.type==="file").map(ct=>({path:ct.path,name:ct.name})),displaySegments:Ie??Q})},St=async()=>{if(pt){me(!0);try{await Re(J,Q)}finally{me(!1)}}},Qt=async ye=>{if(!(!Et||!e||jt)&&await L({title:"Memorize this?",description:"This saves a memory feedback item with this assistant message as context. Future agents can use it when reviewing or updating memory for this chat and project.",confirmLabel:"Memorize",cancelLabel:"Cancel"})){Ft({kind:ye,status:"saving"});try{await(B==null?void 0:B({messageId:e,kind:ye,content:s})),Ft({kind:ye,status:"saved"}),mt.current!==null&&window.clearTimeout(mt.current),mt.current=window.setTimeout(()=>Ft(null),1200)}catch{Ft(null)}}},Ht=(ye,Ie)=>(rn==null?void 0:rn.kind)!==ye?Ie:rn.status==="saving"?c.jsx(Lt,{className:"h-3.5 w-3.5 animate-spin"}):c.jsx(Li,{className:"h-3.5 w-3.5"}),Bt=[...rt?[{key:"edit",label:"Edit message",icon:c.jsx(H_,{className:"h-3.5 w-3.5"}),onClick:()=>tt()}]:[],...pt?[{key:"retry",label:"Retry from this message",icon:c.jsx($Y,{className:ke("h-3.5 w-3.5",ce&&"animate-spin")}),onClick:()=>{St()},disabled:ce}]:[],...!M&&(X||q)?[{key:"context",label:"View LLM context",icon:V?c.jsx(Lt,{className:"h-3.5 w-3.5 animate-spin"}):c.jsx(jm,{className:"h-3.5 w-3.5"}),onClick:()=>{X||ee(),Nt(!0)}}]:[],...Et?[{key:"memory",label:Cmt("should_have_remembered"),icon:Ht("should_have_remembered",c.jsx(io,{className:"h-3.5 w-3.5"})),onClick:()=>{Qt("should_have_remembered")},disabled:jt}]:[],{key:"copy",label:re?"Copied":"Copy message",icon:re?c.jsx(Li,{className:"h-3.5 w-3.5"}):c.jsx(tl,{className:"h-3.5 w-3.5"}),onClick:()=>{Ce()}}],gn=ye=>se||!Tt||!s||Bt.length===0?null:Be?c.jsx("div",{className:ke("absolute z-10","right-0.5 bottom-0.5"),children:c.jsxs(Gl,{children:[c.jsx(Kl,{asChild:!0,children:c.jsx("button",{type:"button","aria-label":"Message actions",className:"flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:c.jsx(Fx,{className:"h-4 w-4"})})}),c.jsx(il,{align:"end",side:"top",className:"min-w-[10rem]",children:Bt.map(Ie=>c.jsxs(Vr,{disabled:Ie.disabled,onSelect:He=>{He.preventDefault(),Ie.onClick()},className:"gap-2",children:[Ie.icon,c.jsx("span",{children:Ie.label})]},Ie.key))})]})}):c.jsx("div",{className:ke("absolute z-10 rounded-md border border-border/60 bg-background/95 p-0.5 shadow-sm","right-1 bottom-[.25rem]","opacity-0 transition-opacity group-hover/message:opacity-100 focus-within:opacity-100",re&&"opacity-100"),children:c.jsx(opt,{children:Bt.map(Ie=>c.jsx(lpt,{onClick:He=>{He.preventDefault(),He.stopPropagation(),Ie.onClick()},disabled:Ie.disabled,"aria-label":Ie.label,tooltip:Ie.label,className:"h-5 w-5 rounded-md p-0 [&_svg]:h-3 [&_svg]:w-3",children:Ie.icon},Ie.key))})}),Vn=M?null:gn(),Hn=!M&&(S==null?void 0:S.some(ye=>ye.type==="thinking"&&ye.content.trim())),yn=M?[]:Smt(X),Oe=!M&&(yn.length>0||l&&!X)?c.jsxs("div",{className:"not-prose mt-2 flex min-w-0 flex-wrap items-center gap-1.5 text-xs text-muted-foreground",children:[c.jsxs("button",{type:"button",className:"inline-flex max-w-full items-center gap-1.5 rounded-md border border-amber-500/30 bg-amber-500/10 px-2 py-1 font-medium text-amber-700 transition-colors hover:bg-amber-500/15 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 dark:text-amber-200",onClick:ye=>{ye.preventDefault(),ye.stopPropagation(),!X&&l&&ee(),nn(Ie=>!Ie)},"aria-expanded":Rt,title:Rt?"Hide injected memories":"Show memories injected for this answer",children:[c.jsx(io,{className:"h-3.5 w-3.5 shrink-0"}),c.jsx("span",{children:"Memory"}),yn.length>0?c.jsx("span",{className:"rounded bg-background/75 px-1 text-2xs",children:yn.length}):V?c.jsx(Lt,{className:"h-3 w-3 animate-spin"}):c.jsx("span",{className:"rounded bg-background/75 px-1 text-2xs",children:"•"})]}),Rt&&yn.slice(0,3).map(ye=>{const Ie={memoryId:ye.id,sourceType:ye.sourceType,sourceId:ye.sourceId,sourceSurface:ye.sourceSurface},He=!!(O&&ye.sourceSurface==="chat"&&ye.sourceId);return c.jsxs("button",{type:"button",className:"inline-flex max-w-[220px] items-center gap-1.5 rounded-md border border-border/70 bg-muted/45 px-2 py-1 text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",onClick:ct=>{ct.preventDefault(),ct.stopPropagation(),He?O==null||O(Ie):Nt(!0)},title:He?`Open source chat for injected memory: ${ye.source||ye.id}`:`View injected memory source: ${ye.source||ye.id}`,children:[He?c.jsx(vd,{className:"h-3.5 w-3.5 shrink-0"}):c.jsx(io,{className:"h-3.5 w-3.5 shrink-0"}),c.jsx("span",{className:"truncate",children:ye.source||ye.id})]},ye.id)})]}):null;return c.jsxs(c.Fragment,{children:[c.jsx(apt,{from:i,className:ke(j?"py-2":"py-4"),children:c.jsxs("div",{className:ke("min-w-0 max-w-[85%] space-y-2",M&&"order-1"),children:[!M&&v&&!Hn&&c.jsx(sq,{content:v,isStreaming:!!C&&!s,duration:_}),!M&&S&&S.length>0?c.jsxs("div",{className:"relative min-w-0 max-w-full select-text break-words [overflow-wrap:anywhere]",children:[S.map((ye,Ie)=>{if(ye.type==="toolGroup"){const He=Array.isArray(ye.callIds)?ye.callIds:[],ct=(w??[]).filter(Ae=>He.includes(Ae.callId)),he=S.slice(Ie+1).some(Ae=>Ae.type==="text"&&typeof Ae.content=="string"&&Ae.content.trim());return ct.length>0?_q(E,ct)?c.jsx(z7,{provider:E,calls:ct,isStreaming:!!C&&Ie===S.length-1,threadControlThreads:N,onOpenTerminal:R,onOpenDiff:$,renderInlineSecretPrompt:D,onApprovalResponse:U},`tg-${Ie}`):c.jsx(B7,{calls:ct,collapsible:he,threadControlThreads:N,onOpenTerminal:R,onOpenDiff:$,renderInlineSecretPrompt:D,onApprovalResponse:U},`tg-${Ie}`):null}return ye.type==="thinking"?ye.content.trim()?c.jsx(sq,{content:ye.content,isStreaming:!!C&&Ie===S.length-1,duration:_},`th-${Ie}`):null:ye.type==="error"?c.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg border border-red-500/40 bg-red-500/10 px-3 py-2.5 text-sm text-red-600 dark:text-red-400",children:[c.jsx(Hx,{className:"mt-0.5 h-4 w-4 shrink-0"}),c.jsx("span",{className:"min-w-0 break-words",children:ye.content})]},`err-${Ie}`):typeof ye.content=="string"&&ye.content.trim()?c.jsx(v8,{"data-message-from":"assistant",className:"max-w-full bg-card/78",children:c.jsx(H7,{content:ye.content,compact:j,isStreaming:!!C&&Ie===S.length-1,preferLlmUi:T,onOpenPath:W})},`ts-${Ie}`):null}),C&&!s&&!S.some(ye=>ye.type==="text"&&typeof ye.content=="string"&&ye.content.trim())&&c.jsx("div",{className:"flex items-center gap-3 px-1 py-1 text-sm text-muted-foreground",children:c.jsx(Sq,{})}),Vn,Oe]}):c.jsxs(c.Fragment,{children:[w&&w.length>0&&(_q(E,w)?c.jsx(z7,{provider:E,calls:w,isStreaming:C,threadControlThreads:N,onOpenTerminal:R,onOpenDiff:$,renderInlineSecretPrompt:D,onApprovalResponse:U}):c.jsx(B7,{calls:w,collapsible:E!=="jait",threadControlThreads:N,onOpenTerminal:R,onOpenDiff:$,renderInlineSecretPrompt:D,onApprovalResponse:U})),Ye||s?M?se?c.jsx("div",{className:Amt(),onClick:ye=>ye.stopPropagation(),children:c.jsx("div",{className:Omt(be),children:c.jsx($2,{ref:Ue,draftStateKey:`edit:${e??"user-message"}`,value:Zt,segments:Ze,onChange:ye=>{var Ie;Je(ye),ve(((Ie=Ue.current)==null?void 0:Ie.getSegments())??[])},onSubmit:(ye,Ie,He)=>{const ct=He??[],he=R0(ct)||Zt;ve(ct),Ut(he,ct)},disabled:je,controlsDisabled:je,placeholder:"Edit message...",onVoiceInput:I==null?void 0:I.onVoiceInput,voiceRecording:I==null?void 0:I.voiceRecording,voiceLevels:I==null?void 0:I.voiceLevels,voiceTranscribing:I==null?void 0:I.voiceTranscribing,onVoiceStop:I==null?void 0:I.onVoiceStop,mode:I==null?void 0:I.mode,onModeChange:I==null?void 0:I.onModeChange,provider:I==null?void 0:I.provider,onProviderChange:I==null?void 0:I.onProviderChange,responseStyle:I==null?void 0:I.responseStyle,onResponseStyleChange:I==null?void 0:I.onResponseStyleChange,providerRuntimeMode:I==null?void 0:I.providerRuntimeMode,onProviderRuntimeModeChange:I==null?void 0:I.onProviderRuntimeModeChange,cliModel:I==null?void 0:I.cliModel,onCliModelChange:I==null?void 0:I.onCliModelChange,sessionInfo:I==null?void 0:I.sessionInfo,projectNodeId:I==null?void 0:I.projectNodeId,availableFiles:(I==null?void 0:I.availableFiles)??M0(Q),onSearchFiles:I==null?void 0:I.onSearchFiles,projectOpen:(I==null?void 0:I.projectOpen)??M0(Q).length>0,footerTrailingContent:c.jsx(ge,{type:"button",variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0 rounded-lg",onClick:ot,disabled:je,"aria-label":"Cancel editing message",title:"Cancel editing",children:c.jsx(Hr,{className:"h-3.5 w-3.5"})}),className:"rounded-lg border-primary/20 bg-primary/[0.08] dark:!bg-primary/[0.08] shadow-none [&_.text-muted-foreground]:text-muted-foreground [&>div]:!bg-transparent [&_[contenteditable='true']]:!bg-transparent"},`edit-${e??"user-message"}`)})}):c.jsxs("div",{className:"relative w-fit max-w-full",children:[c.jsx(v8,{ref:at,"data-message-from":"user",className:ke("min-w-0 rounded-lg bg-muted px-4 py-3 break-words [overflow-wrap:anywhere]",rt&&!se&&"cursor-text transition-colors hover:bg-muted/80","leading-relaxed [font-size:0.9rem]"),onClick:Mt,title:rt&&!se?"Click to edit message":void 0,children:c.jsxs("div",{className:"min-w-0 space-y-3",children:[c.jsx("div",{className:"min-w-0 whitespace-pre-wrap break-words [overflow-wrap:anywhere]",children:(xt??Q).length>0?(xt??Q).map((ye,Ie)=>ye.type==="text"?c.jsx("span",{children:ye.text},`text-${Ie}`):ye.type==="file"?c.jsxs("span",{className:"mx-[2px] inline-flex items-center gap-1.5 rounded-md border border-border/70 bg-muted/45 px-2 py-1 text-xs font-medium leading-none text-foreground align-middle select-none",title:ye.path,children:[c.jsx(pa,{filename:ye.name,className:"h-3.5 w-3.5 shrink-0"}),c.jsx("span",{className:"max-w-[180px] truncate",children:ye.lineRange?`${ye.name}:${P2(ye.lineRange).replace(/^lines? /,"")}`:ye.name})]},`${ye.path}-${Ie}`):ye.type==="project"?c.jsxs("span",{className:"mx-[2px] inline-flex items-center gap-1.5 rounded-md border border-border/70 bg-muted/45 px-2 py-1 text-xs font-medium leading-none text-foreground align-middle select-none",title:ye.path,children:[c.jsx(V4,{name:ye.name,className:"h-3.5 w-3.5 shrink-0"}),c.jsx("span",{className:"max-w-[180px] truncate",children:ye.name})]},`${ye.path}-${Ie}`):ye.type==="terminal"?c.jsxs("span",{className:"mx-[2px] inline-flex items-center gap-1.5 rounded-md border border-border/70 bg-muted/45 px-2 py-1 text-xs font-medium leading-none text-foreground align-middle select-none",title:ye.projectRoot?`${ye.terminalId} · ${ye.projectRoot}`:ye.terminalId,children:[c.jsx("span",{className:"inline-flex h-3.5 w-3.5 items-center justify-center rounded-sm bg-muted-foreground/15 text-2xs font-bold uppercase text-muted-foreground",children:"T"}),c.jsx("span",{className:"max-w-[180px] truncate",children:ye.lineRange?`${ye.name}:${P2(ye.lineRange).replace(/^lines? /,"")}`:ye.name})]},`${ye.terminalId}-${Ie}`):null):we??J}),Dt.length>0&&c.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:Dt.map((ye,Ie)=>{const He=ye.preview??`data:${ye.mimeType};base64,${ye.data}`;return c.jsxs(Io,{children:[c.jsx(jve,{asChild:!0,children:c.jsxs("button",{type:"button",className:"group block overflow-hidden rounded-lg border border-primary/10 bg-background/65 text-left transition-colors hover:border-primary/25 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background","aria-label":`Expand image ${ye.name}`,children:[c.jsxs("span",{className:"relative block",children:[c.jsx("img",{src:He,alt:ye.name,className:"max-h-72 w-full object-cover transition-opacity group-hover:opacity-85"}),c.jsx("span",{className:"pointer-events-none absolute inset-0 flex items-center justify-center opacity-0 transition-opacity group-hover:opacity-100",children:c.jsx("span",{className:"rounded-full bg-black/65 px-3 py-1.5 text-xs font-medium text-white",children:"Click to expand"})})]}),c.jsx("span",{className:"block truncate border-t border-border/60 px-2 py-1 text-xs text-muted-foreground",children:ye.name})]})}),c.jsxs(oo,{className:"max-h-[92vh] max-w-[96vw] gap-2 overflow-hidden p-2",showCloseButton:!0,children:[c.jsx(lo,{className:"mr-8 truncate px-1 text-sm font-medium",children:ye.name}),c.jsx("img",{src:He,alt:ye.name,className:"max-h-[82vh] w-full object-contain"})]})]},`${ye.name}-${Ie}`)})}),Wt.length>0&&c.jsx("div",{className:"flex flex-wrap gap-2",children:Wt.map((ye,Ie)=>c.jsxs("span",{className:"inline-flex max-w-full items-center gap-1.5 rounded-md border border-border/70 bg-muted/45 px-2 py-1 text-xs font-medium leading-none text-foreground",title:ye.mimeType,children:[c.jsx(pa,{filename:ye.name,className:"h-3.5 w-3.5 shrink-0"}),c.jsx("span",{className:"max-w-[180px] truncate",children:ye.name})]},`${ye.name}-${Ie}`))})]})}),gn()]}):c.jsxs("div",{className:"relative min-w-0 max-w-full break-words [overflow-wrap:anywhere]",children:[c.jsx(v8,{"data-message-from":"assistant",className:"min-w-0 max-w-full break-words [overflow-wrap:anywhere]",children:c.jsx(H7,{content:s,compact:j,isStreaming:C,preferLlmUi:T,onOpenPath:W})}),Vn,Oe]}):Qe?c.jsx("div",{className:"flex items-center gap-3 px-1 py-1 text-sm text-muted-foreground",children:c.jsx(Sq,{})}):null]})]})}),c.jsx(mmt,{open:yt,onOpenChange:Nt,contextFlow:X,responseContent:s,loading:V})]})}const wL=y.memo(zmt,(e,n)=>{const{messageFromEnd:r,messageIndex:i,...s}=e,{messageFromEnd:a,messageIndex:o,...l}=n,u=Object.keys(l);return u.length===Object.keys(s).length&&u.every(d=>Object.is(s[d],l[d]))});wL.displayName="Message";function Fmt(e){if(!(e!=null&&e.metadata))return{};try{const n=JSON.parse(e.metadata);return n&&typeof n=="object"&&!Array.isArray(n)?n:{}}catch{return{}}}function Zde(e){const n=Fmt(e),r=n.repositoryId??n.repoId;return typeof r=="string"&&r.trim()?r.trim():null}function kq(e,n){const r=Zde(e);return r?n.find(i=>i.id===r)??null:null}function Hmt(e,n){return!e||e==="gateway"?!1:!n.has(e)}function Cq(e){const n=new Date(e),i=new Date().getTime()-n.getTime();return i<6e4?"just now":i<36e5?`${Math.floor(i/6e4)}m ago`:i<864e5?`${Math.floor(i/36e5)}h ago`:n.toLocaleDateString()}function Wmt({platform:e}){switch(e){case"windows":case"macos":case"linux":return c.jsx(Po,{className:"h-2.5 w-2.5"});case"android":case"ios":return c.jsx(i4,{className:"h-2.5 w-2.5"});default:return c.jsx(_i,{className:"h-2.5 w-2.5"})}}function Umt({projects:e,personalSessions:n=[],activeProjectId:r,activeSessionId:i,loading:s=!1,hasMoreProjects:a=!1,showFewerProjects:o=!1,onSelectProject:l,onSelectPersonalSession:u,onNewPersonalSession:d,onCreateProject:h,onRemoveProject:f,onChangeDirectory:m,onAssignRepository:x,onShowMore:v,onShowFewer:_,sessionInfo:w,nodes:S=[],repositories:C=[]}){const j=y.useMemo(()=>new Set(S.filter(U=>!U.isGateway).map(U=>U.id)),[S]),[T,E]=y.useState(""),N=T.trim().toLowerCase(),R=y.useMemo(()=>N?e.filter(U=>{const H=kq(U,C),I=U.nodeId&&U.nodeId!=="gateway"?S.find($=>$.id===U.nodeId):null;return[U.title,U.rootPath,H==null?void 0:H.name,I==null?void 0:I.name,...U.sessions.flatMap($=>[$.name,$.projectPath])].some($=>$==null?void 0:$.toLowerCase().includes(N))}):e,[S,N,C,e]),D=y.useMemo(()=>N?n.filter(U=>[U.name,U.projectPath].some(H=>H==null?void 0:H.toLowerCase().includes(N))):n,[N,n]);return c.jsxs("div",{className:"flex flex-col h-full",children:[c.jsxs("div",{className:"flex h-[35px] shrink-0 items-center gap-2 px-2.5 border-b",children:[c.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-1.5 rounded-md bg-muted/60 px-2 py-1",children:[c.jsx(ao,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),c.jsx("input",{type:"search",value:T,onChange:U=>E(U.target.value),placeholder:"Search chats and projects","aria-label":"Search chats and projects",className:"min-w-0 flex-1 bg-transparent text-xs outline-none placeholder:text-muted-foreground"})]}),c.jsxs(br,{children:[c.jsx(mr,{asChild:!0,children:c.jsx(ge,{variant:"ghost",size:"icon",className:"h-6 w-6 shrink-0",onClick:h,children:c.jsx(Ms,{className:"h-3.5 w-3.5"})})}),c.jsx(gr,{side:"right",children:"New project"})]})]}),s?c.jsx("div",{className:"flex flex-1 items-center justify-center",children:c.jsx(Lt,{className:"h-4 w-4 animate-spin text-muted-foreground"})}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex max-h-[50%] min-h-0 shrink-0 flex-col border-b",children:[c.jsx("div",{className:"flex h-7 shrink-0 items-center justify-between px-3",children:c.jsx("span",{className:"text-2xs font-medium text-muted-foreground",children:"Projects"})}),c.jsx(Cc,{className:"min-h-0 flex-1",children:c.jsxs("div",{className:"space-y-0.5 px-1.5 pb-1.5",children:[e.length===0&&c.jsxs("p",{className:"text-xs text-muted-foreground text-center py-4",children:["No projects yet.",c.jsx("br",{}),c.jsx("button",{onClick:h,className:"underline underline-offset-2 hover:text-foreground mt-1 inline-block",children:"Choose project folder"})]}),e.length>0&&R.length===0&&c.jsx("p",{className:"text-xs text-muted-foreground text-center py-4",children:"No matching projects."}),R.map(U=>{const H=U.id===r,I=U.nodeId&&U.nodeId!=="gateway"?S.find(O=>O.id===U.nodeId):null,W=Hmt(U.nodeId,j),$=kq(U,C);return c.jsxs("div",{className:`group grid w-full grid-cols-[auto,minmax(0,1fr),auto] items-start gap-1.5 px-1.5 py-1.5 text-sm transition-colors ${W||H?"cursor-default":"cursor-pointer"} ${H?"rounded-md bg-secondary/70":W?"opacity-50":"hover:rounded-md hover:bg-muted/40"}`,draggable:!!U.rootPath,onDragStart:O=>{if(!U.rootPath){O.preventDefault();return}O.dataTransfer.effectAllowed="copy",O.dataTransfer.setData(kue,JSON.stringify(Fct(U.rootPath,U.title||void 0)))},onClick:()=>{!W&&!H&&l(U.id)},children:[H?c.jsx(Oh,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-primary"}):c.jsx(nM,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground"}),c.jsxs("div",{className:"min-w-0 overflow-hidden",children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[c.jsx("span",{className:"min-w-0 truncate text-xs font-medium",children:U.title||"Untitled Project"}),$&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"shrink-0 text-2xs text-muted-foreground",children:"·"}),c.jsxs("span",{className:"flex min-w-0 items-center gap-1 text-2xs text-muted-foreground",children:[c.jsx(Ff,{className:"h-2.5 w-2.5 shrink-0"}),c.jsx("span",{className:"truncate",children:$.name})]})]})]}),c.jsxs("div",{className:"flex min-w-0 items-center gap-1 overflow-hidden text-2xs text-muted-foreground",children:[c.jsx("span",{className:"min-w-0 truncate",children:U.rootPath||"No folder linked"}),c.jsx("span",{className:"shrink-0",children:"·"}),c.jsx("span",{className:"shrink-0",children:Cq(U.lastActiveAt)})]}),W&&c.jsxs("div",{className:"mt-0.5 flex items-center gap-1 text-2xs text-orange-500",children:[c.jsx(mve,{className:"h-2.5 w-2.5 shrink-0"}),c.jsx("span",{className:"truncate",children:"Node offline"})]}),I&&!W&&c.jsx("div",{className:"mt-0.5 flex min-w-0 items-center gap-1 text-2xs",children:c.jsxs("span",{className:"inline-flex max-w-full items-center gap-0.5 rounded bg-muted px-1 py-0.5 text-muted-foreground",children:[c.jsx(Wmt,{platform:I.platform}),c.jsx("span",{className:"truncate max-w-[80px]",children:I.name})]})}),H&&w&&c.jsxs("div",{className:"mt-0.5 flex min-w-0 items-center gap-1 text-2xs text-blue-500",children:[c.jsx("span",{className:"truncate",children:w.provider}),c.jsx("span",{className:"shrink-0 text-muted-foreground",children:"·"}),c.jsx(Po,{className:"h-2.5 w-2.5 shrink-0"}),c.jsx("span",{className:"truncate",children:w.isRemote&&w.remoteNode?w.remoteNode.nodeName:"Gateway"})]})]}),c.jsx("div",{className:"flex shrink-0 self-start",children:c.jsxs(Gl,{children:[c.jsx(Kl,{asChild:!0,children:c.jsx(ge,{variant:"ghost",size:"icon","aria-label":"Project actions",className:"h-5.5 w-5.5 shrink-0 text-muted-foreground transition-opacity hover:text-foreground data-[state=open]:opacity-100 sm:opacity-0 sm:group-hover:opacity-100",onClick:O=>O.stopPropagation(),children:c.jsx(Fx,{className:"h-3 w-3"})})}),c.jsxs(il,{align:"end",side:"right",className:"min-w-[10rem]",children:[x&&c.jsxs(Vr,{disabled:!U.rootPath,className:`gap-2 ${$?"text-primary focus:text-primary":""}`,onSelect:O=>{O.preventDefault(),x(U.id)},children:[c.jsx(Ff,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:$?`Repository: ${$.name}`:"Assign repository"})]}),c.jsxs(Vr,{className:"gap-2",onSelect:O=>{O.preventDefault(),m(U.id)},children:[c.jsx(cxe,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:"Change directory"})]}),c.jsxs(Vr,{className:"gap-2 text-destructive focus:text-destructive",onSelect:O=>{O.preventDefault(),f(U.id)},children:[c.jsx(JR,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:"Archive project"})]})]})]})})]},U.id)}),!N&&a&&v&&c.jsx("button",{className:"w-full px-2 py-2 text-left text-xs text-muted-foreground transition-colors hover:text-foreground",onClick:v,children:"Show more projects"}),!N&&o&&_&&c.jsx("button",{className:"w-full px-2 py-2 text-left text-xs text-muted-foreground transition-colors hover:text-foreground",onClick:_,children:"Show fewer projects"})]})})]}),c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[c.jsxs("div",{className:"flex h-7 shrink-0 items-center justify-between px-3",children:[c.jsx("span",{className:"text-2xs font-medium text-muted-foreground",children:"Personal chats"}),d&&c.jsxs(br,{children:[c.jsx(mr,{asChild:!0,children:c.jsx(ge,{variant:"ghost",size:"icon",className:"h-5 w-5",onClick:d,children:c.jsx(Ms,{className:"h-3 w-3"})})}),c.jsx(gr,{side:"right",children:"New personal chat"})]})]}),c.jsx(Cc,{className:"min-h-0 flex-1",children:c.jsxs("div",{className:"space-y-0.5 px-1.5 pb-1.5",children:[n.length===0&&c.jsxs("p",{className:"text-xs text-muted-foreground text-center py-4",children:["No personal chats yet.",d&&c.jsxs(c.Fragment,{children:[c.jsx("br",{}),c.jsx("button",{onClick:d,className:"underline underline-offset-2 hover:text-foreground mt-1 inline-block",children:"Start a chat"})]})]}),n.length>0&&D.length===0&&c.jsx("p",{className:"text-xs text-muted-foreground text-center py-4",children:"No matching personal chats."}),D.map(U=>{const H=r===null&&U.id===i;return c.jsxs("div",{className:`group flex items-center gap-1.5 rounded-md px-1.5 py-1 transition-colors text-sm ${H?"bg-secondary/70 cursor-default":"cursor-pointer hover:bg-muted/40"}`,onClick:()=>{!H&&u&&u(U.id)},children:[c.jsx(vd,{className:`h-3.5 w-3.5 shrink-0 ${H?"text-primary":"text-muted-foreground"}`}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("div",{className:"truncate text-xs font-medium",children:U.name||"Personal chat"}),c.jsx("div",{className:"text-2xs text-muted-foreground",children:Cq(U.lastActiveAt??U.createdAt)})]})]},U.id)})]})})]})]})]})}function Vmt({suggestions:e,onSelect:n,className:r}){return c.jsx("div",{className:ke("flex flex-wrap gap-2 justify-center",r),children:e.map(i=>c.jsx("button",{onClick:()=>n(i),className:"px-4 py-2 text-sm rounded-full border bg-background text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors",children:i},i))})}const qmt={pending:{icon:Gm,label:"Pending",color:"text-muted-foreground"},approved:{icon:Lt,label:"Running",color:"text-blue-500"},rejected:{icon:Hr,label:"Rejected",color:"text-destructive"},executed:{icon:js,label:"Done",color:"text-green-500"},failed:{icon:Ds,label:"Failed",color:"text-destructive"}};function Gmt({action:e,expanded:n,onToggle:r}){const i=qmt[e.status],s=i.icon;return c.jsxs("div",{className:"border rounded-md",children:[c.jsxs("button",{type:"button",className:"flex items-center gap-3 w-full px-3 py-2.5 text-left hover:bg-muted/50 transition-colors",onClick:r,children:[c.jsx(s,{className:ke("h-4 w-4 shrink-0",i.color,e.status==="approved"&&"animate-spin")}),c.jsxs("span",{className:"flex-1 min-w-0",children:[c.jsx("span",{className:"font-mono text-sm font-medium",children:e.tool}),c.jsxs("span",{className:"text-xs text-muted-foreground ml-2",children:["Step ",e.order+1]})]}),c.jsx(Fn,{variant:"outline",className:"text-2xs px-1.5 py-0",children:i.label}),n?c.jsx(fl,{className:"h-4 w-4 text-muted-foreground"}):c.jsx(xs,{className:"h-4 w-4 text-muted-foreground"})]}),n&&c.jsxs("div",{className:"px-3 pb-3 pt-1 border-t bg-muted/30",children:[c.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),c.jsx("pre",{className:"text-xs bg-background rounded p-2 overflow-x-auto max-h-48",children:JSON.stringify(e.args,null,2)}),e.result&&c.jsx("div",{className:ke("mt-2 text-xs rounded p-2",e.result.ok?"bg-green-500/10 text-green-700 dark:text-green-400":"bg-destructive/10 text-destructive"),children:e.result.message})]})]})}function Kmt({plan:e,onApprove:n,onReject:r,isExecuting:i,className:s}){const[a,o]=y.useState(new Set),l=m=>{o(x=>{const v=new Set(x);return v.has(m)?v.delete(m):v.add(m),v})},u=e.actions.filter(m=>m.status==="pending").length,d=e.actions.filter(m=>m.status==="executed").length,h=e.actions.filter(m=>m.status==="failed").length,f=u===0;return c.jsxs(Yn,{className:ke("p-4 space-y-3",s),children:[c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{children:[c.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2",children:[c.jsx(Ymt,{className:"h-4 w-4"}),"Plan",c.jsxs(Fn,{variant:"secondary",className:"text-2xs px-1.5 py-0",children:[e.actions.length," step",e.actions.length!==1?"s":""]})]}),c.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.summary})]}),f&&c.jsx(Fn,{variant:h>0?"destructive":"success",className:"shrink-0",children:h>0?`${h} failed`:"Complete"})]}),c.jsx("div",{className:"space-y-1.5",children:e.actions.map(m=>c.jsx(Gmt,{action:m,expanded:a.has(m.id),onToggle:()=>l(m.id)},m.id))}),u>0&&c.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[c.jsx(ge,{size:"sm",onClick:()=>n(),disabled:i,children:i?c.jsxs(c.Fragment,{children:[c.jsx(Lt,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}),"Executing..."]}):c.jsxs(c.Fragment,{children:[c.jsx(eS,{className:"h-3.5 w-3.5 mr-1.5"}),"Execute all (",u,")"]})}),c.jsxs(ge,{size:"sm",variant:"outline",onClick:r,disabled:i,children:[c.jsx(Hr,{className:"h-3.5 w-3.5 mr-1.5"}),"Reject"]})]}),f&&!i&&c.jsxs("p",{className:"text-xs text-muted-foreground",children:[d>0&&`${d} action${d!==1?"s":""} executed.`,h>0&&` ${h} failed.`]})]})}function Ymt({className:e}){return c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[c.jsx("rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1"}),c.jsx("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}),c.jsx("path",{d:"M12 11h4"}),c.jsx("path",{d:"M12 16h4"}),c.jsx("path",{d:"M8 11h.01"}),c.jsx("path",{d:"M8 16h.01"})]})}function Xmt(e){return e.find(n=>n.status==="in-progress")??null}function Qde(e){return e.length>0&&e.every(n=>n.status==="completed")}function Jmt(e){const n=Xmt(e),r=Qde(e);return{headerLabel:n?n.title:r?"All tasks completed":"Tasks",showHeaderSpinner:!!n,showHeaderCompleted:!n&&r}}function W7({items:e,className:n,onClear:r}){const[i,s]=y.useState(!1),a=y.useMemo(()=>Qde(e),[e]),o=y.useMemo(()=>Jmt(e),[e]);if(e.length===0)return null;const l=e.filter(m=>m.status==="completed").length,u=e.length,d=u>0?Math.round(l/u*100):0,h=i?"Tasks":o.headerLabel,f=a?"bg-green-500":"bg-primary";return c.jsxs("div",{className:ke("rounded-lg border bg-muted/30 p-3 space-y-2",n),children:[c.jsxs("button",{type:"button",onClick:()=>s(m=>!m),className:"flex items-center gap-2 w-full text-left",children:[c.jsx(fl,{className:ke("h-3 w-3 shrink-0 text-muted-foreground transition-transform duration-200",!i&&"-rotate-90")}),!i&&o.showHeaderSpinner&&c.jsx(Lt,{className:"h-3.5 w-3.5 shrink-0 text-primary animate-spin"}),!i&&o.showHeaderCompleted&&c.jsx(js,{className:"h-3.5 w-3.5 shrink-0 text-green-500"}),c.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-foreground",children:h}),c.jsx("div",{className:"flex-1 h-1.5 rounded-full bg-muted overflow-hidden",children:c.jsx("div",{className:ke("h-full rounded-full transition-all duration-300",f),style:{width:`${d}%`}})}),c.jsxs("span",{className:"text-2xs text-muted-foreground tabular-nums",children:[l,"/",u]}),r&&c.jsx("button",{type:"button",onClick:m=>{m.stopPropagation(),r()},className:"shrink-0 p-0.5 rounded hover:bg-muted text-muted-foreground hover:text-foreground transition-colors",title:"Clear todo list",children:c.jsx(Hr,{className:"h-3 w-3"})})]}),i&&c.jsx("div",{className:"space-y-1",children:e.map(m=>c.jsxs("div",{className:ke("flex items-start gap-2 text-xs py-0.5",m.status==="completed"&&"text-muted-foreground"),children:[m.status==="completed"?c.jsx(js,{className:"h-3.5 w-3.5 shrink-0 mt-0.5 text-green-500"}):m.status==="in-progress"?c.jsx(Lt,{className:"h-3.5 w-3.5 shrink-0 mt-0.5 text-primary animate-spin"}):c.jsx(tM,{className:"h-3.5 w-3.5 shrink-0 mt-0.5 text-muted-foreground/50"}),c.jsx("span",{className:ke("flex-1 min-w-0",m.status==="completed"&&"line-through"),children:m.title})]},m.id))})]})}function Zmt({files:e,onAccept:n,onReject:r,onAcceptAll:i,onRejectAll:s,onFileClick:a,className:o}){const l=y.useRef(null),[u,d]=y.useState(!1),[h,f]=y.useState(!1);if(y.useEffect(()=>{const C=l.current;if(!C||typeof ResizeObserver>"u")return;const j=()=>{d(C.clientWidth<560)};j();const T=new ResizeObserver(()=>j());return T.observe(C),()=>T.disconnect()},[]),e.length===0)return null;const m=e.filter(C=>C.state==="undecided").length,x=e.reduce((C,j)=>C+(j.insertions??0),0),v=e.reduce((C,j)=>C+(j.deletions??0),0),_=e.some(C=>C.insertions!==void 0||C.deletions!==void 0),w=_?null:`${e.length} ${e.length===1?"file":"files"}`,S=({insertions:C,deletions:j})=>c.jsxs("span",{className:"shrink-0 whitespace-nowrap text-2xs tabular-nums",children:[c.jsxs("span",{className:"text-green-600 dark:text-green-400",children:["+",C]}),c.jsxs("span",{className:"ml-1 text-red-600 dark:text-red-400",children:["-",j]})]});return c.jsxs("div",{ref:l,className:ke("overflow-hidden rounded-lg border bg-muted/30",o),children:[c.jsxs("div",{className:ke("flex items-center justify-between gap-2 bg-muted/20 px-3 py-2",h&&"border-b"),children:[c.jsxs("button",{type:"button",className:"flex min-w-0 items-center gap-1.5 text-left",onClick:()=>f(C=>!C),"aria-expanded":h,children:[c.jsx(xs,{className:ke("h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform",h&&"rotate-90")}),c.jsx(xh,{className:"h-3.5 w-3.5 text-muted-foreground"}),c.jsx("span",{className:"truncate text-xs font-medium",children:"Files changed"}),_&&c.jsx(S,{insertions:x,deletions:v}),w&&c.jsx("span",{className:"shrink-0 whitespace-nowrap text-2xs tabular-nums text-muted-foreground",children:w}),h&&m>0&&c.jsxs("span",{className:"shrink-0 text-2xs text-amber-500 dark:text-amber-400",children:[m," pending"]})]}),m>0&&c.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[c.jsxs(ge,{size:u?"icon":"sm",variant:"ghost",className:ke("h-6 shrink-0 text-xs",u?"w-6 p-0":"px-2"),onClick:i,title:"Keep all","aria-label":"Keep all",children:[c.jsx(Li,{className:ke("h-3 w-3 shrink-0",!u&&"mr-1")}),!u&&"Keep all"]}),c.jsxs(ge,{size:u?"icon":"sm",variant:"ghost",className:ke("h-6 shrink-0 text-xs",u?"w-6 p-0":"px-2"),onClick:s,title:"Undo all","aria-label":"Undo all",children:[c.jsx(pu,{className:ke("h-3 w-3 shrink-0",!u&&"mr-1")}),!u&&"Undo all"]})]})]}),h&&c.jsx("div",{className:"divide-y",children:e.map(C=>c.jsxs("div",{className:ke("flex items-center gap-2 px-3 py-1.5 text-xs",C.state==="accepted"&&"bg-green-500/5",C.state==="rejected"&&"bg-red-500/5 text-muted-foreground"),children:[c.jsx(pa,{filename:C.name,className:"h-3.5 w-3.5 shrink-0"}),c.jsx("button",{type:"button",className:ke("min-w-0 flex-1 truncate text-left hover:underline cursor-pointer",C.state==="rejected"&&"line-through"),title:`Review diff for ${C.path}`,onClick:()=>a==null?void 0:a(C.path),children:C.path}),_&&c.jsx(S,{insertions:C.insertions??0,deletions:C.deletions??0}),C.state==="undecided"&&c.jsxs("div",{className:"ml-auto flex items-center gap-0.5 shrink-0",children:[c.jsx("button",{type:"button",className:"p-1 rounded hover:bg-primary/10 text-primary transition-colors",onClick:()=>a==null?void 0:a(C.path),title:"Review changes",children:c.jsx(Xf,{className:"h-3 w-3"})}),c.jsx("button",{type:"button",className:"p-1 rounded hover:bg-green-500/20 text-green-600 dark:text-green-400 transition-colors",onClick:()=>n==null?void 0:n(C.path),title:"Keep all changes",children:c.jsx(Li,{className:"h-3 w-3"})}),c.jsx("button",{type:"button",className:"p-1 rounded hover:bg-red-500/20 text-red-600 dark:text-red-400 transition-colors",onClick:()=>r==null?void 0:r(C.path),title:"Undo all changes",children:c.jsx(pu,{className:"h-3 w-3"})})]}),C.state==="accepted"&&c.jsx("span",{className:"text-2xs text-green-600 dark:text-green-400 shrink-0",children:"Kept"}),C.state==="rejected"&&c.jsx("span",{className:"text-2xs text-red-500 shrink-0",children:"Undone"})]},C.path))})]})}function Qmt(e,n,r,i){const s=e.findIndex(u=>u.id===n);if(s<0)return e;const a=[...e],[o]=a.splice(s,1);if(!o)return e;if(r==null)return a.push(o),a;const l=a.findIndex(u=>u.id===r);return l<0?e:(a.splice(l+(i==="after"?1:0),0,o),a)}function egt({item:e,index:n}){return c.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border/40 bg-background px-3 py-2 text-sm shadow-2xl ring-1 ring-primary/10",children:[c.jsx("div",{className:"mt-0.5 shrink-0 rounded p-0.5 text-muted-foreground",children:n===0?c.jsx(rM,{className:"h-3.5 w-3.5 text-primary"}):c.jsx(xs,{className:"h-3.5 w-3.5 text-muted-foreground"})}),c.jsx("div",{className:"mt-0.5 shrink-0 rounded p-0.5 text-muted-foreground",children:c.jsx(n4,{className:"h-3.5 w-3.5"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[n===0?c.jsx("span",{className:"mb-0.5 block text-2xs font-medium uppercase tracking-wider text-primary/70",children:"Next"}):c.jsxs("span",{className:"mb-0.5 block text-2xs font-medium uppercase tracking-wider text-muted-foreground",children:["Queued #",n+1]}),c.jsx("span",{className:"whitespace-pre-wrap break-words text-foreground",children:e.displayContent??e.content})]})]})}function tgt({item:e,index:n,onRemove:r,onEdit:i,onReorder:s,onSteer:a,onSendToParallelThread:o,dragActive:l,dropBefore:u,dropAfter:d,onDragStart:h}){const[f,m]=y.useState(!1),[x,v]=y.useState(!0),[_,w]=y.useState(e.displayContent??e.content),S=y.useRef(null),C=f||!l;y.useEffect(()=>{if(f){const N=S.current;N&&(N.focus(),N.setSelectionRange(N.value.length,N.value.length))}},[f]),y.useEffect(()=>{f||w(e.displayContent??e.content)},[e.content,e.displayContent,f]);const j=y.useCallback(()=>{const N=_.trim(),R=e.displayContent??e.content;N&&N!==R&&(i==null||i(e.id,N)),m(!1)},[_,e.content,e.displayContent,e.id,i]),T=y.useCallback(()=>{w(e.displayContent??e.content),m(!1)},[e.content,e.displayContent]),E=y.useCallback(N=>{N.key==="Enter"&&!N.shiftKey?(N.preventDefault(),j()):N.key==="Escape"&&T()},[j,T]);return c.jsxs(c.Fragment,{children:[u&&c.jsx("div",{className:"relative h-0",children:c.jsx("div",{className:"absolute inset-x-2 -top-px h-0.5 rounded-full bg-primary shadow-[0_0_0_1px_hsl(var(--background))]"})}),c.jsxs("div",{"data-queue-id":e.id,className:ke("group flex cursor-grab touch-none items-start gap-2 rounded-lg border border-border/40 bg-muted/50 px-3 py-2 text-sm transition-all duration-150 ease-out hover:bg-muted/70 active:cursor-grabbing",l&&"border-dashed border-primary/35 bg-primary/5 opacity-0"),onPointerDown:N=>{f||!s||N.target.closest('button, textarea, input, a, [data-no-drag="true"]')||h==null||h(e.id,N)},children:[c.jsx("button",{type:"button","data-no-drag":"true",className:"mt-0.5 shrink-0 rounded p-0.5 text-muted-foreground hover:bg-foreground/10 hover:text-foreground transition-colors",onClick:()=>v(N=>!N),"aria-label":x?"Expand queued message":"Collapse queued message",title:x?"Expand queued message":"Collapse queued message",children:x?c.jsx(xs,{className:"h-3.5 w-3.5"}):n===0?c.jsx(rM,{className:"h-3.5 w-3.5 text-primary"}):c.jsx(fl,{className:"h-3.5 w-3.5 text-muted-foreground"})}),s&&!f&&c.jsx("div",{className:"mt-0.5 shrink-0 rounded p-0.5 text-muted-foreground cursor-grab active:cursor-grabbing touch-none",title:"Drag to reorder","aria-label":"Drag to reorder",children:c.jsx(n4,{className:"h-3.5 w-3.5"})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[n===0&&!f&&c.jsx("span",{className:"text-2xs font-medium uppercase tracking-wider text-primary/70 block mb-0.5",children:"Next"}),n>0&&!f&&c.jsxs("span",{className:"text-2xs font-medium uppercase tracking-wider text-muted-foreground block mb-0.5",children:["Queued #",n+1]}),f?c.jsx("textarea",{ref:S,value:_,onChange:N=>w(N.target.value),onKeyDown:E,onBlur:j,rows:Math.min(_.split(`
|
|
1426
|
-
`).length,5),className:"w-full resize-none rounded border border-primary/30 bg-background px-2 py-1 text-sm outline-none focus:border-primary focus:ring-1 focus:ring-primary/20"}):x?c.jsx("span",{className:"block truncate text-foreground",children:e.displayContent??e.content}):c.jsx("span",{className:"whitespace-pre-wrap break-words text-foreground",children:e.displayContent??e.content})]}),c.jsx("div",{className:ke("mt-0.5 flex shrink-0 items-center gap-0.5 transition-opacity",a?"opacity-100":C?"opacity-0 group-hover:opacity-100":"opacity-0"),children:f?c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button","data-no-drag":"true",className:"p-1 rounded hover:bg-primary/10 text-primary transition-colors",onClick:j,title:"Save",children:c.jsx(Li,{className:"h-3.5 w-3.5"})}),c.jsx("button",{type:"button","data-no-drag":"true",className:"p-1 rounded hover:bg-foreground/10 text-muted-foreground transition-colors",onClick:T,title:"Cancel",children:c.jsx(Hr,{className:"h-3.5 w-3.5"})})]}):c.jsxs(c.Fragment,{children:[i&&c.jsx("button",{type:"button","data-no-drag":"true",className:"p-1 rounded hover:bg-foreground/10 text-muted-foreground transition-colors",onClick:()=>m(!0),title:"Edit message",children:c.jsx(H_,{className:"h-3 w-3"})}),a&&c.jsxs("button",{type:"button","data-no-drag":"true",className:"inline-flex h-6 items-center gap-1 rounded border border-primary/25 bg-primary/5 px-1.5 text-2xs font-medium text-primary transition-colors hover:bg-primary/10",onClick:()=>a(e.id),title:"Steer with message",children:[c.jsx("span",{children:"Steer"}),c.jsx(oye,{className:"h-3 w-3"})]}),o&&c.jsx("button",{type:"button","data-no-drag":"true",className:"p-1 rounded hover:bg-primary/10 text-muted-foreground hover:text-primary transition-colors",onClick:()=>o(e.id),title:"Send to parallel thread",children:c.jsx(Ff,{className:"h-3 w-3"})}),c.jsx("button",{type:"button","data-no-drag":"true",className:"p-1 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive transition-colors",onClick:()=>r==null?void 0:r(e.id),title:"Remove from queue",children:c.jsx(Hr,{className:"h-3.5 w-3.5"})})]})})]}),d&&c.jsx("div",{className:"relative h-0",children:c.jsx("div",{className:"absolute inset-x-2 -top-px h-0.5 rounded-full bg-primary shadow-[0_0_0_1px_hsl(var(--background))]"})})]})}function ehe({items:e,onRemove:n,onEdit:r,onReorder:i,onSteer:s,onSendToParallelThread:a,className:o}){const l=y.useRef(null),u=y.useRef(null),[d,h]=y.useState(null),[f,m]=y.useState(null),[x,v]=y.useState(null);y.useEffect(()=>{if(d&&!e.some(j=>j.id===d)){h(null),m(null),v(null);return}f!=null&&f.targetId&&!e.some(j=>j.id===f.targetId)&&m(d?{targetId:d,placement:"before"}:null)},[d,f,e]),y.useEffect(()=>{var D;if(!d||!x)return;document.body.style.cursor="grabbing",document.body.style.userSelect="none",document.body.style.touchAction="none";const j=(U,H)=>{var O,B;const I=Array.from(((O=l.current)==null?void 0:O.querySelectorAll("[data-queue-id]"))??[]);if(I.length===0){m(null);return}const W=I.filter(M=>M.dataset.queueId&&M.dataset.queueId!==d);if(W.length===0){m({targetId:null,placement:"after"});return}for(const M of W){const L=M.dataset.queueId;if(!L)continue;const z=M.getBoundingClientRect(),G=z.top+z.height/2;if(H<G){m({targetId:L,placement:"before"});return}}const $=((B=W[W.length-1])==null?void 0:B.dataset.queueId)??null;m($?{targetId:$,placement:"after"}:{targetId:null,placement:"after"})},T=U=>{U.pointerId===x.pointerId&&(v(H=>H&&{...H,x:U.clientX,y:U.clientY}),j(U.clientX,U.clientY))},E=U=>{var I,W;if(U&&U.pointerId!==x.pointerId)return;d&&f&&f.targetId!==d&&(i==null||i(d,f.targetId,f.placement));const H=u.current;(I=H==null?void 0:H.hasPointerCapture)!=null&&I.call(H,x.pointerId)&&((W=H.releasePointerCapture)==null||W.call(H,x.pointerId)),u.current=null,h(null),m(null),v(null)},N=()=>{E()},R=()=>{E()};return window.addEventListener("pointermove",T),window.addEventListener("pointerup",E),window.addEventListener("pointercancel",E),window.addEventListener("blur",R),(D=u.current)==null||D.addEventListener("lostpointercapture",N),()=>{var U;document.body.style.cursor="",document.body.style.userSelect="",document.body.style.touchAction="",window.removeEventListener("pointermove",T),window.removeEventListener("pointerup",E),window.removeEventListener("pointercancel",E),window.removeEventListener("blur",R),(U=u.current)==null||U.removeEventListener("lostpointercapture",N)}},[x,d,f,i]);const _=y.useCallback((j,T)=>{var R;if(!i||T.button!==0&&T.pointerType!=="touch"&&T.pointerType!=="pen")return;T.preventDefault();const E=T.currentTarget.closest("[data-queue-id]");if(!E)return;u.current=E,(R=E.setPointerCapture)==null||R.call(E,T.pointerId);const N=E.getBoundingClientRect();h(j),m({targetId:j,placement:"before"}),v({id:j,pointerId:T.pointerId,x:T.clientX,y:T.clientY,offsetX:T.clientX-N.left,offsetY:T.clientY-N.top,width:N.width,height:N.height})},[i]);if(e.length===0)return null;const w=d&&f&&(f.targetId!==d||f.placement==="after")?Qmt(e,d,f.targetId,f.placement):e,S=x?w.findIndex(j=>j.id===x.id):-1,C=S>=0?w[S]:null;return c.jsxs("div",{ref:l,className:ke("space-y-1.5",o),children:[c.jsx("div",{className:"flex items-center gap-1.5 px-0.5",children:c.jsxs("span",{className:"text-xs font-medium text-muted-foreground",children:[e.length," queued message",e.length!==1?"s":""]})}),w.map((j,T)=>c.jsx(tgt,{item:j,index:T,onRemove:n,onEdit:r,onReorder:i,onSteer:s,onSendToParallelThread:a,dragActive:d===j.id,dropBefore:!!(d&&(f==null?void 0:f.targetId)===j.id&&f.placement==="before"&&d!==j.id),dropAfter:!!(d&&(f==null?void 0:f.targetId)===j.id&&f.placement==="after"&&d!==j.id),onDragStart:_},j.id)),x&&C&&c.jsx("div",{className:"pointer-events-none fixed z-50",style:{left:`${x.x-x.offsetX}px`,top:`${x.y-x.offsetY}px`,width:`${x.width}px`,minHeight:`${x.height}px`},children:c.jsx("div",{className:"scale-[1.01] opacity-95",children:c.jsx(egt,{item:C,index:S})})})]})}function ngt({activeProject:e,activeProjectId:n,activeSessionId:r,authLoading:i,fsNodes:s,hasMoreProjects:a,isMobile:o,personalSessions:l,previewOpen:u,projectListLimit:d,projects:h,projectsLoading:f,repositories:m,sessionInfo:x,showArchitecture:v,showDebugPanel:_,showProject:w,showSidebar:S,showTerminal:C,sidebarRef:j,onAssignRepository:T,onBlur:E,onChangeDirectory:N,onCreateProject:R,onCreatePersonalSession:D,onRemoveProject:U,onSelectPersonalSession:H,onSelectProject:I,onShowFewer:W,onShowMore:$,onToggleArchitecture:O,onToggleDebug:B,onToggleEditor:M,onTogglePreview:L,onToggleSidebar:z,onToggleTerminal:G}){return c.jsxs(c.Fragment,{children:[S&&o&&c.jsx("div",{className:"fixed inset-0 z-20",onClick:z}),!o&&c.jsxs("aside",{className:"flex w-12 shrink-0 flex-col items-center gap-2 border-r bg-background px-1 py-2",children:[c.jsxs(br,{children:[c.jsx(mr,{asChild:!0,children:c.jsx(ge,{variant:S?"secondary":"ghost",size:"sm",className:"h-9 w-9 rounded-md p-0",onClick:z,"aria-label":"Toggle projects panel",children:S?c.jsx(n5,{className:"h-4 w-4"}):c.jsx(r5,{className:"h-4 w-4"})})}),c.jsx(gr,{side:"right",children:"Projects"})]}),c.jsxs(br,{children:[c.jsx(mr,{asChild:!0,children:c.jsx(ge,{variant:C?"secondary":"ghost",size:"sm",className:"h-9 w-9 rounded-md p-0",onClick:G,"aria-label":"Terminal",children:c.jsx(Rs,{className:"h-4 w-4"})})}),c.jsx(gr,{side:"right",children:"Terminal"})]}),c.jsxs(br,{children:[c.jsx(mr,{asChild:!0,children:c.jsx(ge,{variant:w?"secondary":"ghost",size:"sm",className:"h-9 w-9 rounded-md p-0",onClick:M,"aria-label":"Editor",children:c.jsx(F_,{className:"h-4 w-4"})})}),c.jsx(gr,{side:"right",children:"Editor"})]}),c.jsxs(br,{children:[c.jsx(mr,{asChild:!0,children:c.jsx(ge,{variant:u?"secondary":"ghost",size:"sm",className:"h-9 w-9 rounded-md p-0","aria-label":"Preview",disabled:i||f,onClick:L,children:c.jsx(_i,{className:"h-4 w-4"})})}),c.jsx(gr,{side:"right",children:"Preview"})]}),c.jsxs(br,{children:[c.jsx(mr,{asChild:!0,children:c.jsx(ge,{variant:v?"secondary":"ghost",size:"sm",className:"h-9 w-9 rounded-md p-0",disabled:i||f,"aria-label":"Architecture",onClick:O,children:c.jsx(z_,{className:"h-4 w-4"})})}),c.jsx(gr,{side:"right",children:"Architecture"})]}),c.jsx("div",{className:"flex-1"}),c.jsxs(br,{children:[c.jsx(mr,{asChild:!0,children:c.jsx(ge,{variant:_?"secondary":"ghost",size:"sm",className:"h-9 w-9 rounded-md p-0",disabled:!w||!e,"aria-label":"Debug",onClick:B,children:c.jsx(ZR,{className:"h-4 w-4"})})}),c.jsx(gr,{side:"right",children:"Debug"})]})]}),S&&c.jsx("aside",{ref:j,tabIndex:-1,onBlur:E,className:`overflow-hidden outline-none ${o?"fixed right-[3.25rem] top-1/2 z-50 h-[min(28rem,80vh)] w-[min(20rem,calc(100vw-5rem))] -translate-y-1/2 rounded-xl border bg-background shadow-2xl":"w-64 border-r shrink-0"}`,children:c.jsx(Ba,{name:"Project sidebar",variant:"section",className:"h-full",resetKeys:[n,r,h.length,l.length],children:c.jsx(Umt,{projects:h,personalSessions:l,activeProjectId:n,activeSessionId:r,loading:f,hasMoreProjects:a,showFewerProjects:h.length>d,onSelectProject:I,onSelectPersonalSession:H,onNewPersonalSession:D,onCreateProject:R,onRemoveProject:U,onChangeDirectory:N,onAssignRepository:T,onShowMore:$,onShowFewer:W,sessionInfo:x,nodes:s,repositories:m})})})]})}const ax=jr(),rgt=V0();function igt(e){const[n,r]=y.useState([]),i=y.useRef(async()=>{}),s=y.useRef(e);s.current=e;const a=y.useCallback(async()=>{try{const d=e?`${ax}/api/consent/pending/${e}`:`${ax}/api/consent/pending`,f=await(await fetch(d)).json();r(f.requests)}catch{}},[e]);i.current=a,y.useEffect(()=>{a()},[a]),y.useEffect(()=>{let d=!1;const h=new WebSocket(rgt);return h.onmessage=f=>{if(!d)try{const m=JSON.parse(f.data);if(m.type==="consent.required"){const x=m.payload,v=s.current;(!v||x.sessionId===v)&&r(_=>[..._,x])}if(m.type==="consent.resolved"){const x=m.payload;r(v=>v.filter(_=>_.id!==x.requestId))}}catch{}},h.onopen=()=>{d||i.current()},()=>{if(d=!0,h.onopen=()=>{try{h.close()}catch{}},h.onmessage=null,h.onerror=null,h.onclose=null,h.readyState===WebSocket.OPEN)try{h.close()}catch{}}},[]);const o=y.useCallback(async d=>{try{await fetch(`${ax}/api/consent/${d}/approve`,{method:"POST"}),r(h=>h.filter(f=>f.id!==d))}catch{}},[]),l=y.useCallback(async(d,h)=>{try{await fetch(`${ax}/api/consent/${d}/reject`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:h})}),r(f=>f.filter(m=>m.id!==d))}catch{}},[]),u=y.useCallback(async(d,h)=>{try{const m=await(await fetch(`${ax}/api/consent/pending/${d}/approve-all`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:h})})).json(),x=new Set(m.requestIds??[]);return x.size>0?r(v=>v.filter(_=>!x.has(_.id))):r(v=>v.filter(_=>_.sessionId!==d)),!0}catch{return!1}},[]);return{queue:n,approve:o,reject:l,approveAllForSession:u,refresh:a}}function sgt(){const[e,n]=y.useState(null),r=y.useCallback(async()=>{try{const s=await(await fetch(`${ax}/api/consent/policy`)).json();n(s)}catch{n(null)}},[]);return y.useEffect(()=>{r()},[r]),{policy:e,refresh:r}}function jq({risk:e}){const n={low:"bg-green-500/10 text-green-600 dark:text-green-400",medium:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",high:"bg-red-500/10 text-red-600 dark:text-red-400"},i={low:r4,medium:IY,high:nA}[e];return c.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium ${n[e]}`,children:[c.jsx(i,{className:"h-3 w-3"}),e]})}function Nq({level:e}){const n={none:"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",once:"bg-blue-500/10 text-blue-600 dark:text-blue-400",always:"bg-amber-500/10 text-amber-700 dark:text-amber-300",dangerous:"bg-red-500/10 text-red-600 dark:text-red-400"};return c.jsx("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium ${n[e]}`,children:e})}function Tq({expiresAt:e}){const[n,r]=y.useState("");return y.useEffect(()=>{const i=()=>{const a=new Date(e).getTime()-Date.now();if(a<=0){r("expired");return}const o=Math.ceil(a/1e3);o>60?r(`${Math.ceil(o/60)}m`):r(`${o}s`)};i();const s=setInterval(i,1e3);return()=>clearInterval(s)},[e]),c.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[c.jsx(Gm,{className:"h-3 w-3"}),n]})}function Eq({toolName:e}){return e.startsWith("terminal.")?c.jsx(Rs,{className:"h-4 w-4"}):e.startsWith("file.")?c.jsx(xh,{className:"h-4 w-4"}):c.jsx(RY,{className:"h-4 w-4"})}function agt({preview:e,toolName:n}){const r=e.command,i=e.path,s=e.content;return r?c.jsxs("div",{className:"rounded-md bg-muted p-3 font-mono text-xs leading-relaxed overflow-x-auto",children:[c.jsx("span",{className:"text-muted-foreground",children:"$ "}),r]}):i?c.jsxs("div",{className:"rounded-md bg-muted p-3 text-xs leading-relaxed overflow-x-auto",children:[c.jsxs("div",{className:"text-muted-foreground mb-1",children:[n,": ",i]}),s&&c.jsx("pre",{className:"font-mono whitespace-pre-wrap",children:s.length>500?s.slice(0,500)+"...":s})]}):c.jsx("div",{className:"rounded-md bg-muted p-3 font-mono text-xs leading-relaxed overflow-x-auto",children:JSON.stringify(e,null,2)})}function ogt({request:e,onApprove:n,onReject:r,compact:i=!1}){const[s,a]=y.useState(!1),o=async()=>{a(!0),n(e.id)},l=async()=>{a(!0),r(e.id)};return i?c.jsxs("div",{className:"flex items-center gap-3 px-3 py-2 rounded-lg border bg-card",children:[c.jsx(Eq,{toolName:e.toolName}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-xs font-medium truncate",children:e.toolName}),c.jsx(jq,{risk:e.risk}),c.jsx(Nq,{level:e.policy.consentLevel}),c.jsx(Tq,{expiresAt:e.expiresAt})]}),c.jsx("p",{className:"text-xs text-muted-foreground truncate",children:e.summary})]}),c.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[c.jsxs("button",{onClick:o,disabled:s,className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-md text-xs font-medium bg-green-500/10 text-green-600 dark:text-green-400 hover:bg-green-500/20 disabled:opacity-50 transition-colors",children:[c.jsx(iI,{className:"h-3 w-3"}),"Approve"]}),c.jsxs("button",{onClick:l,disabled:s,className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-md text-xs font-medium bg-red-500/10 text-red-600 dark:text-red-400 hover:bg-red-500/20 disabled:opacity-50 transition-colors",children:[c.jsx(nA,{className:"h-3 w-3"}),"Reject"]})]})]}):c.jsxs("div",{className:"rounded-lg border bg-card shadow-sm overflow-hidden",children:[c.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b bg-muted/30",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Eq,{toolName:e.toolName}),c.jsx("span",{className:"text-sm font-medium",children:e.toolName}),c.jsx(jq,{risk:e.risk}),c.jsx(Nq,{level:e.policy.consentLevel})]}),c.jsx(Tq,{expiresAt:e.expiresAt})]}),c.jsxs("div",{className:"p-4 space-y-3",children:[c.jsx("p",{className:"text-sm text-foreground",children:e.summary}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("p",{className:"text-xs text-muted-foreground",children:e.policy.description}),!e.policy.knownTool&&c.jsx("p",{className:"text-xs text-red-600 dark:text-red-400",children:"Unknown tool: blocked behind dangerous consent until added to the active profile."})]}),c.jsx(agt,{preview:e.preview,toolName:e.toolName})]}),c.jsxs("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t bg-muted/20",children:[c.jsxs("button",{onClick:l,disabled:s,className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-md text-xs font-medium bg-red-500/10 text-red-600 dark:text-red-400 hover:bg-red-500/20 disabled:opacity-50 transition-colors",children:[c.jsx(nA,{className:"h-3.5 w-3.5"}),"Reject"]}),c.jsxs("button",{onClick:o,disabled:s,className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-md text-xs font-medium bg-green-500/10 text-green-600 dark:text-green-400 hover:bg-green-500/20 disabled:opacity-50 transition-colors",children:[c.jsx(iI,{className:"h-3.5 w-3.5"}),"Approve"]})]})]})}function lgt({status:e}){const n={running:{icon:Lt,label:"Running",color:"bg-blue-500/10 text-blue-600 dark:text-blue-400"},"awaiting-approval":{icon:IY,label:"Awaiting Approval",color:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"},"needs-input":{icon:Gm,label:"Needs Input",color:"bg-orange-500/10 text-orange-600 dark:text-orange-400"},completed:{icon:js,label:"Completed",color:"bg-green-500/10 text-green-600 dark:text-green-400"},failed:{icon:Ah,label:"Failed",color:"bg-red-500/10 text-red-600 dark:text-red-400"}},{icon:r,label:i,color:s}=n[e];return c.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium ${s}`,children:[c.jsx(r,{className:`h-3 w-3 ${e==="running"?"animate-spin":""}`}),i]})}function cgt({className:e="",compact:n=!1,sessionId:r,onApproveAllEnabled:i}){const{queue:s,approve:a,reject:o,approveAllForSession:l}=igt(r),{policy:u}=sgt(),[d,h]=y.useState(!1),f=y.useMemo(()=>r?s.filter(x=>x.sessionId===r):s,[s,r]),m=async()=>{if(!r||d)return;h(!0),await l(r)&&(i==null||i()),h(!1)};return f.length===0?null:c.jsxs("div",{className:`space-y-2 ${e}`,children:[c.jsxs("div",{className:"flex items-center justify-between px-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(lgt,{status:"awaiting-approval"}),c.jsxs("div",{className:"flex flex-col",children:[c.jsxs("span",{className:"text-xs text-muted-foreground",children:[f.length," pending ",f.length===1?"request":"requests"]}),u&&c.jsxs("span",{className:"text-xs text-muted-foreground",children:["Profile: ",c.jsx("span",{className:"font-medium text-foreground",children:u.activeProfileName??"custom"})," ","• ",u.toolCount," configured tools • unknown tools require dangerous consent"]})]})]}),r&&f.length>0&&c.jsx("button",{onClick:m,disabled:d,className:"text-xs text-green-600 hover:text-green-500 dark:text-green-400 dark:hover:text-green-300 disabled:opacity-50 disabled:cursor-not-allowed",children:d?"Approving...":"Approve all in this session"})]}),c.jsx("div",{className:"space-y-2",children:f.map(x=>c.jsx(ogt,{request:x,onApprove:a,onReject:o,compact:n},x.id))})]})}function ugt({activeProject:e,activeProjectDisplayName:n,activeProjectRoot:r,activeSessionId:i,availableFilesForMention:s,availableSkills:a,changedFiles:o,changedFilesForComposer:l,chatCollapsed:u,chatMode:d,chatProvider:h,chatProviderRuntimeMode:f,chatResponseStyle:m,cliModel:x,developerChatPanelStyle:v,developerChatSubmitLoading:_,developerChatUiState:w,developerComposerControlRow:S,developerPlaceholder:C,editComposerBag:j,error:T,hasMessages:E,hasMoreMessages:N,hitMaxRounds:R,inputSegments:D,inputValueRef:U,inputVersion:H,isLoading:I,isLoadingHistory:W,isMobile:$,loadOlderMessages:O,limitReached:B,managerThreads:M,messageContents:L,messageQueue:z,messages:G,pendingPlan:V,previewOpen:F,projectNodeId:X,projectSuggestions:q,projects:ee,projectsLoading:J,promptInputRef:Q,sendTarget:re,sessionInfo:te,setChatPanelElement:ce,showDesktopProject:me,showProject:se,showScreenShare:ae,suggestions:be,threadTargetRepoRuntime:_e,token:je,todoList:Xe,voiceLevels:yt,voiceRecording:Nt,voiceTranscribing:Rt,onAcceptAllFiles:nn,onAcceptFile:rn,onCancelRequest:Ft,onChangedFileClick:Zt,onChatModeChange:Je,onClearTodoList:Ze,onCliModelChange:ve,onContinueChat:we,onDequeueMessage:De,onEditPreviousMessage:xt,onExecutePlan:dt,onHandleInputChange:ft,onHandleMemoryFeedback:Dt,onHandleSuggestion:Wt,onMemorySourceOpen:Ye,onMoveRepoToGateway:We,onOpenAddProject:mt,onOpenMessagePath:at,onOpenTerminalFromToolCall:Ue,onApprovalResponse:Ne,onProviderChange:Ce,onProviderRuntimeModeChange:Be,onQueue:rt,onRejectAllFiles:pt,onRejectFile:Qe,onRejectPlan:Tt,onReorderQueueItem:Et,onResponseStyleChange:jt,onSearchFiles:tt,onSendTargetChange:ot,onSetApproveAllInSession:Mt,onSteerQueuedMessage:Ut,onStopRecording:Re,onSubmit:St,onUpdateQueueItem:Qt,onVoiceInput:Ht,renderInlineSecretPrompt:Bt}){if(!E)return c.jsx("div",{ref:ce,className:`relative flex-1 min-w-0 flex flex-col items-center justify-center overflow-hidden ${u?"":"px-4"} ${$?"pt-12":""}`,style:v,children:c.jsxs("div",{className:"w-full max-w-3xl space-y-8",children:[c.jsxs("div",{className:"text-center",children:[c.jsx("h1",{className:"text-3xl font-semibold tracking-tight",children:"Jait"}),c.jsx("p",{className:"text-base text-muted-foreground mt-1",children:"Just Another Intelligent Tool"})]}),!J&&ee.length===0?c.jsxs("div",{className:"text-center space-y-3",children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Add a project folder to start chatting with your code."}),c.jsxs(ge,{variant:"default",size:"lg",onClick:mt,children:[c.jsx(Oh,{className:"h-4 w-4 mr-2"}),"Add Project"]})]}):c.jsx(Vmt,{suggestions:se&&e?q:be,onSelect:Wt}),w.showTodoList&&c.jsx(W7,{items:Xe,onClear:Ze}),c.jsx(Ba,{name:"Chat composer",variant:"section",resetKeys:[i,H,re],children:c.jsx($2,{ref:Q,availableSkills:a,draftStateKey:`developer:${i??"new-chat"}`,value:U.current,syncKey:H,segments:D,onChange:ft,onSubmit:St,onStop:Ft,onQueue:rt,isLoading:I,submitLoading:_,placeholder:C,onVoiceInput:Ht,voiceRecording:Nt,voiceLevels:yt,voiceTranscribing:Rt,onVoiceStop:Re,mode:d,onModeChange:Je,responseStyle:m,onResponseStyleChange:jt,sendTarget:re,onSendTargetChange:ot,showSendTargetSelector:!1,provider:h,onProviderChange:Ce,providerRuntimeMode:f,onProviderRuntimeModeChange:Be,cliModel:x,onCliModelChange:ve,repoRuntime:re==="thread"?_e:null,onMoveToGateway:re==="thread"?We:void 0,availableFiles:s,onSearchFiles:tt,projectOpen:se,projectName:n??void 0,projectPath:r??void 0,chatId:i??void 0,sessionInfo:te,projectNodeId:X??void 0})}),S]})});const gn=[h,se||ae||F,M,Ue,Bt,Ne,xt,j,at,Zt,Ye,Dt],Vn=y.useRef(new Map),Hn=y.useRef(null);Hn.current!==i&&(Vn.current.clear(),Hn.current=i);const yn=G.length>0?G[G.length-1].id:null,di=JSON.stringify(gn),Oe=[];{const ye=Vn.current;for(let Ie=0;Ie<G.length;Ie++){const He=G[Ie],ct=I&&He.id===yn,he=ye.get(He.id),Ae=di+"|"+(He===(he==null?void 0:he.msg)?"s":"d")+"|"+(He.contextFlow===(he==null?void 0:he.contextFlow)?"s":"d")+"|"+(He.hasContextFlow===(he==null?void 0:he.hasContextFlow)?"s":"d")+"|"+(He.hasMemoryProvenance===(he==null?void 0:he.hasMemoryProvenance)?"s":"d")+"|"+(He.displayContent===(he==null?void 0:he.displayContent)?"s":"d")+"|"+(He.referencedFiles===(he==null?void 0:he.referencedFiles)?"s":"d")+"|"+(He.displaySegments===(he==null?void 0:he.displaySegments)?"s":"d")+"|"+(He.attachments===(he==null?void 0:he.attachments)?"s":"d")+"|"+(He.thinking===(he==null?void 0:he.thinking)?"s":"d")+"|"+(He.thinkingDuration===(he==null?void 0:he.thinkingDuration)?"s":"d")+"|"+(He.toolCalls===(he==null?void 0:he.toolCalls)?"s":"d")+"|"+(He.segments===(he==null?void 0:he.segments)?"s":"d")+"|"+(ct===(he==null?void 0:he.isStreaming)?"s":"d")+"|"+He.role;if(he&&he.key===Ae){Oe.push(he.element);continue}const pe=c.jsx(wL,{messageId:He.id,messageIndex:Ie,messageFromEnd:G.length-1-Ie,role:He.role,content:He.content,contextFlow:He.contextFlow,hasContextFlow:He.hasContextFlow,hasMemoryProvenance:He.hasMemoryProvenance,sessionId:i,authToken:je,displayContent:He.displayContent,referencedFiles:He.referencedFiles,displaySegments:He.displaySegments,attachments:He.attachments,thinking:He.thinking,thinkingDuration:He.thinkingDuration,toolCalls:He.toolCalls,segments:He.segments,isStreaming:ct,compact:se||ae||F,preferLlmUi:!0,provider:h,threadControlThreads:M,onOpenTerminal:Ue,renderInlineSecretPrompt:Bt,onApprovalResponse:Ne,onEditMessage:xt,editComposer:j,onOpenPath:at,onOpenDiff:Zt,onOpenMemorySource:Ye,onMemoryFeedback:Dt},He.id);ye.set(He.id,{key:Ae,element:pe,msg:He,contextFlow:He.contextFlow,hasContextFlow:He.hasContextFlow,hasMemoryProvenance:He.hasMemoryProvenance,displayContent:He.displayContent,referencedFiles:He.referencedFiles,displaySegments:He.displaySegments,attachments:He.attachments,thinking:He.thinking,thinkingDuration:He.thinkingDuration,toolCalls:He.toolCalls,segments:He.segments,isStreaming:ct}),Oe.push(pe)}if(ye.size>G.length){const Ie=new Set(G.map(He=>He.id));for(const He of ye.keys())Ie.has(He)||ye.delete(He)}}return c.jsx("div",{ref:ce,className:"relative flex flex-col min-h-0 min-w-0 overflow-hidden",style:v,children:!u&&c.jsxs(c.Fragment,{children:[c.jsx(Ba,{name:"Chat transcript",variant:"section",className:"min-h-0 flex-1 border-b",resetKeys:[i,G.length,z.length,me],children:c.jsxs(que,{className:"min-h-0 flex-1 border-b",compact:me,loading:W,loadingLabel:"Loading chat",messageContents:L,hasMore:N,onLoadMore:O,children:[Oe,z.length>0&&c.jsx(ehe,{items:z,onRemove:De,onEdit:Qt,onReorder:Et,onSteer:I&&i?Ut:void 0})]},i??"developer-empty")}),c.jsx("div",{className:`shrink-0 ${$?"px-2 py-2":`py-3 ${me?"px-3":"px-4"}`}`,children:c.jsxs("div",{className:"mx-auto w-full max-w-3xl space-y-1.5",children:[c.jsxs("div",{className:"space-y-1.5 max-h-[40vh] overflow-y-auto",children:[w.showTodoList&&c.jsx(W7,{items:Xe,onClear:Ze}),T&&T!=="login_required"&&T!=="limit_reached"&&!I&&c.jsxs("div",{className:"flex items-center gap-2.5 rounded-lg border border-red-500/40 bg-red-500/10 px-3.5 py-2.5 text-sm text-red-400 dark:text-red-400 dark:border-red-400/40 dark:bg-red-400/10",children:[c.jsx(Hx,{className:"h-4 w-4 shrink-0"}),c.jsx("span",{className:"min-w-0 break-words",children:T})]}),R&&!I&&c.jsxs("div",{className:"flex items-center justify-center gap-2 py-1.5",children:[c.jsxs("button",{onClick:()=>we({token:je,sessionId:i}),className:"inline-flex items-center gap-1.5 rounded-md border bg-background px-3 py-1.5 text-xs font-medium text-foreground shadow-sm hover:bg-accent transition-colors",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})}),"Continue"]}),c.jsx("span",{className:"text-xs text-muted-foreground",children:"Agent stopped - continue to resume"})]}),c.jsx(cgt,{compact:!0,sessionId:i,onApproveAllEnabled:()=>Mt(!0)}),V&&c.jsx(Kmt,{plan:V,onApprove:dt,onReject:Tt,isExecuting:I}),B&&c.jsx("p",{className:"text-center text-sm text-destructive",children:"Daily limit reached. Come back tomorrow."}),o.length>0&&c.jsx(Zmt,{files:l,onAccept:rn,onReject:Qe,onAcceptAll:nn,onRejectAll:pt,onFileClick:Zt})]}),c.jsx(Ba,{name:"Chat composer",variant:"section",resetKeys:[i,H,re],children:c.jsx($2,{ref:Q,availableSkills:a,draftStateKey:`developer:${i??"new-chat"}`,value:U.current,syncKey:H,segments:D,onChange:ft,onSubmit:St,onStop:Ft,onQueue:rt,isLoading:I,submitLoading:_,disabled:B,placeholder:C,onVoiceInput:Ht,voiceRecording:Nt,voiceLevels:yt,voiceTranscribing:Rt,onVoiceStop:Re,mode:d,onModeChange:Je,responseStyle:m,onResponseStyleChange:jt,sendTarget:re,onSendTargetChange:ot,showSendTargetSelector:!1,provider:h,onProviderChange:Ce,providerRuntimeMode:f,onProviderRuntimeModeChange:Be,cliModel:x,onCliModelChange:ve,repoRuntime:re==="thread"?_e:null,onMoveToGateway:re==="thread"?We:void 0,availableFiles:s,onSearchFiles:tt,projectOpen:se,projectName:n??void 0,projectPath:r??void 0,chatId:i??void 0,sessionInfo:te,projectNodeId:X??void 0})}),S]})})]})})}/**
|
|
1426
|
+
`).length,5),className:"w-full resize-none rounded border border-primary/30 bg-background px-2 py-1 text-sm outline-none focus:border-primary focus:ring-1 focus:ring-primary/20"}):x?c.jsx("span",{className:"block truncate text-foreground",children:e.displayContent??e.content}):c.jsx("span",{className:"whitespace-pre-wrap break-words text-foreground",children:e.displayContent??e.content})]}),c.jsx("div",{className:ke("mt-0.5 flex shrink-0 items-center gap-0.5 transition-opacity",a?"opacity-100":C?"opacity-0 group-hover:opacity-100":"opacity-0"),children:f?c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button","data-no-drag":"true",className:"p-1 rounded hover:bg-primary/10 text-primary transition-colors",onClick:j,title:"Save",children:c.jsx(Li,{className:"h-3.5 w-3.5"})}),c.jsx("button",{type:"button","data-no-drag":"true",className:"p-1 rounded hover:bg-foreground/10 text-muted-foreground transition-colors",onClick:T,title:"Cancel",children:c.jsx(Hr,{className:"h-3.5 w-3.5"})})]}):c.jsxs(c.Fragment,{children:[i&&c.jsx("button",{type:"button","data-no-drag":"true",className:"p-1 rounded hover:bg-foreground/10 text-muted-foreground transition-colors",onClick:()=>m(!0),title:"Edit message",children:c.jsx(H_,{className:"h-3 w-3"})}),a&&c.jsxs("button",{type:"button","data-no-drag":"true",className:"inline-flex h-6 items-center gap-1 rounded border border-primary/25 bg-primary/5 px-1.5 text-2xs font-medium text-primary transition-colors hover:bg-primary/10",onClick:()=>a(e.id),title:"Steer with message",children:[c.jsx("span",{children:"Steer"}),c.jsx(oye,{className:"h-3 w-3"})]}),o&&c.jsx("button",{type:"button","data-no-drag":"true",className:"p-1 rounded hover:bg-primary/10 text-muted-foreground hover:text-primary transition-colors",onClick:()=>o(e.id),title:"Send to parallel thread",children:c.jsx(Ff,{className:"h-3 w-3"})}),c.jsx("button",{type:"button","data-no-drag":"true",className:"p-1 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive transition-colors",onClick:()=>r==null?void 0:r(e.id),title:"Remove from queue",children:c.jsx(Hr,{className:"h-3.5 w-3.5"})})]})})]}),d&&c.jsx("div",{className:"relative h-0",children:c.jsx("div",{className:"absolute inset-x-2 -top-px h-0.5 rounded-full bg-primary shadow-[0_0_0_1px_hsl(var(--background))]"})})]})}function ehe({items:e,onRemove:n,onEdit:r,onReorder:i,onSteer:s,onSendToParallelThread:a,className:o}){const l=y.useRef(null),u=y.useRef(null),[d,h]=y.useState(null),[f,m]=y.useState(null),[x,v]=y.useState(null);y.useEffect(()=>{if(d&&!e.some(j=>j.id===d)){h(null),m(null),v(null);return}f!=null&&f.targetId&&!e.some(j=>j.id===f.targetId)&&m(d?{targetId:d,placement:"before"}:null)},[d,f,e]),y.useEffect(()=>{var D;if(!d||!x)return;document.body.style.cursor="grabbing",document.body.style.userSelect="none",document.body.style.touchAction="none";const j=(U,H)=>{var O,B;const I=Array.from(((O=l.current)==null?void 0:O.querySelectorAll("[data-queue-id]"))??[]);if(I.length===0){m(null);return}const W=I.filter(M=>M.dataset.queueId&&M.dataset.queueId!==d);if(W.length===0){m({targetId:null,placement:"after"});return}for(const M of W){const L=M.dataset.queueId;if(!L)continue;const z=M.getBoundingClientRect(),G=z.top+z.height/2;if(H<G){m({targetId:L,placement:"before"});return}}const $=((B=W[W.length-1])==null?void 0:B.dataset.queueId)??null;m($?{targetId:$,placement:"after"}:{targetId:null,placement:"after"})},T=U=>{U.pointerId===x.pointerId&&(v(H=>H&&{...H,x:U.clientX,y:U.clientY}),j(U.clientX,U.clientY))},E=U=>{var I,W;if(U&&U.pointerId!==x.pointerId)return;d&&f&&f.targetId!==d&&(i==null||i(d,f.targetId,f.placement));const H=u.current;(I=H==null?void 0:H.hasPointerCapture)!=null&&I.call(H,x.pointerId)&&((W=H.releasePointerCapture)==null||W.call(H,x.pointerId)),u.current=null,h(null),m(null),v(null)},N=()=>{E()},R=()=>{E()};return window.addEventListener("pointermove",T),window.addEventListener("pointerup",E),window.addEventListener("pointercancel",E),window.addEventListener("blur",R),(D=u.current)==null||D.addEventListener("lostpointercapture",N),()=>{var U;document.body.style.cursor="",document.body.style.userSelect="",document.body.style.touchAction="",window.removeEventListener("pointermove",T),window.removeEventListener("pointerup",E),window.removeEventListener("pointercancel",E),window.removeEventListener("blur",R),(U=u.current)==null||U.removeEventListener("lostpointercapture",N)}},[x,d,f,i]);const _=y.useCallback((j,T)=>{var R;if(!i||T.button!==0&&T.pointerType!=="touch"&&T.pointerType!=="pen")return;T.preventDefault();const E=T.currentTarget.closest("[data-queue-id]");if(!E)return;u.current=E,(R=E.setPointerCapture)==null||R.call(E,T.pointerId);const N=E.getBoundingClientRect();h(j),m({targetId:j,placement:"before"}),v({id:j,pointerId:T.pointerId,x:T.clientX,y:T.clientY,offsetX:T.clientX-N.left,offsetY:T.clientY-N.top,width:N.width,height:N.height})},[i]);if(e.length===0)return null;const w=d&&f&&(f.targetId!==d||f.placement==="after")?Qmt(e,d,f.targetId,f.placement):e,S=x?w.findIndex(j=>j.id===x.id):-1,C=S>=0?w[S]:null;return c.jsxs("div",{ref:l,className:ke("space-y-1.5",o),children:[c.jsx("div",{className:"flex items-center gap-1.5 px-0.5",children:c.jsxs("span",{className:"text-xs font-medium text-muted-foreground",children:[e.length," queued message",e.length!==1?"s":""]})}),w.map((j,T)=>c.jsx(tgt,{item:j,index:T,onRemove:n,onEdit:r,onReorder:i,onSteer:s,onSendToParallelThread:a,dragActive:d===j.id,dropBefore:!!(d&&(f==null?void 0:f.targetId)===j.id&&f.placement==="before"&&d!==j.id),dropAfter:!!(d&&(f==null?void 0:f.targetId)===j.id&&f.placement==="after"&&d!==j.id),onDragStart:_},j.id)),x&&C&&c.jsx("div",{className:"pointer-events-none fixed z-50",style:{left:`${x.x-x.offsetX}px`,top:`${x.y-x.offsetY}px`,width:`${x.width}px`,minHeight:`${x.height}px`},children:c.jsx("div",{className:"scale-[1.01] opacity-95",children:c.jsx(egt,{item:C,index:S})})})]})}function ngt({activeProject:e,activeProjectId:n,activeSessionId:r,authLoading:i,fsNodes:s,hasMoreProjects:a,isMobile:o,personalSessions:l,previewOpen:u,projectListLimit:d,projects:h,projectsLoading:f,repositories:m,sessionInfo:x,showArchitecture:v,showDebugPanel:_,showProject:w,showSidebar:S,showTerminal:C,sidebarRef:j,onAssignRepository:T,onBlur:E,onChangeDirectory:N,onCreateProject:R,onCreatePersonalSession:D,onRemoveProject:U,onSelectPersonalSession:H,onSelectProject:I,onShowFewer:W,onShowMore:$,onToggleArchitecture:O,onToggleDebug:B,onToggleEditor:M,onTogglePreview:L,onToggleSidebar:z,onToggleTerminal:G}){return c.jsxs(c.Fragment,{children:[S&&o&&c.jsx("div",{className:"fixed inset-0 z-20",onClick:z}),!o&&c.jsxs("aside",{className:"flex w-12 shrink-0 flex-col items-center gap-2 border-r bg-background px-1 py-2",children:[c.jsxs(br,{children:[c.jsx(mr,{asChild:!0,children:c.jsx(ge,{variant:S?"secondary":"ghost",size:"sm",className:"h-9 w-9 rounded-md p-0",onClick:z,"aria-label":"Toggle projects panel",children:S?c.jsx(n5,{className:"h-4 w-4"}):c.jsx(r5,{className:"h-4 w-4"})})}),c.jsx(gr,{side:"right",children:"Projects"})]}),c.jsxs(br,{children:[c.jsx(mr,{asChild:!0,children:c.jsx(ge,{variant:C?"secondary":"ghost",size:"sm",className:"h-9 w-9 rounded-md p-0",onClick:G,"aria-label":"Terminal",children:c.jsx(Rs,{className:"h-4 w-4"})})}),c.jsx(gr,{side:"right",children:"Terminal"})]}),e&&c.jsxs(c.Fragment,{children:[c.jsxs(br,{children:[c.jsx(mr,{asChild:!0,children:c.jsx(ge,{variant:w?"secondary":"ghost",size:"sm",className:"h-9 w-9 rounded-md p-0",onClick:M,"aria-label":"Editor",children:c.jsx(F_,{className:"h-4 w-4"})})}),c.jsx(gr,{side:"right",children:"Editor"})]}),c.jsxs(br,{children:[c.jsx(mr,{asChild:!0,children:c.jsx(ge,{variant:u?"secondary":"ghost",size:"sm",className:"h-9 w-9 rounded-md p-0","aria-label":"Preview",disabled:i||f,onClick:L,children:c.jsx(_i,{className:"h-4 w-4"})})}),c.jsx(gr,{side:"right",children:"Preview"})]}),c.jsxs(br,{children:[c.jsx(mr,{asChild:!0,children:c.jsx(ge,{variant:v?"secondary":"ghost",size:"sm",className:"h-9 w-9 rounded-md p-0",disabled:i||f,"aria-label":"Architecture",onClick:O,children:c.jsx(z_,{className:"h-4 w-4"})})}),c.jsx(gr,{side:"right",children:"Architecture"})]})]}),c.jsx("div",{className:"flex-1"}),c.jsxs(br,{children:[c.jsx(mr,{asChild:!0,children:c.jsx(ge,{variant:_?"secondary":"ghost",size:"sm",className:"h-9 w-9 rounded-md p-0",disabled:!w||!e,"aria-label":"Debug",onClick:B,children:c.jsx(ZR,{className:"h-4 w-4"})})}),c.jsx(gr,{side:"right",children:"Debug"})]})]}),S&&c.jsx("aside",{ref:j,tabIndex:-1,onBlur:E,className:`overflow-hidden outline-none ${o?"fixed right-[3.25rem] top-1/2 z-50 h-[min(28rem,80vh)] w-[min(20rem,calc(100vw-5rem))] -translate-y-1/2 rounded-xl border bg-background shadow-2xl":"w-64 border-r shrink-0"}`,children:c.jsx(Ba,{name:"Project sidebar",variant:"section",className:"h-full",resetKeys:[n,r,h.length,l.length],children:c.jsx(Umt,{projects:h,personalSessions:l,activeProjectId:n,activeSessionId:r,loading:f,hasMoreProjects:a,showFewerProjects:h.length>d,onSelectProject:I,onSelectPersonalSession:H,onNewPersonalSession:D,onCreateProject:R,onRemoveProject:U,onChangeDirectory:N,onAssignRepository:T,onShowMore:$,onShowFewer:W,sessionInfo:x,nodes:s,repositories:m})})})]})}const ax=jr(),rgt=V0();function igt(e){const[n,r]=y.useState([]),i=y.useRef(async()=>{}),s=y.useRef(e);s.current=e;const a=y.useCallback(async()=>{try{const d=e?`${ax}/api/consent/pending/${e}`:`${ax}/api/consent/pending`,f=await(await fetch(d)).json();r(f.requests)}catch{}},[e]);i.current=a,y.useEffect(()=>{a()},[a]),y.useEffect(()=>{let d=!1;const h=new WebSocket(rgt);return h.onmessage=f=>{if(!d)try{const m=JSON.parse(f.data);if(m.type==="consent.required"){const x=m.payload,v=s.current;(!v||x.sessionId===v)&&r(_=>[..._,x])}if(m.type==="consent.resolved"){const x=m.payload;r(v=>v.filter(_=>_.id!==x.requestId))}}catch{}},h.onopen=()=>{d||i.current()},()=>{if(d=!0,h.onopen=()=>{try{h.close()}catch{}},h.onmessage=null,h.onerror=null,h.onclose=null,h.readyState===WebSocket.OPEN)try{h.close()}catch{}}},[]);const o=y.useCallback(async d=>{try{await fetch(`${ax}/api/consent/${d}/approve`,{method:"POST"}),r(h=>h.filter(f=>f.id!==d))}catch{}},[]),l=y.useCallback(async(d,h)=>{try{await fetch(`${ax}/api/consent/${d}/reject`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:h})}),r(f=>f.filter(m=>m.id!==d))}catch{}},[]),u=y.useCallback(async(d,h)=>{try{const m=await(await fetch(`${ax}/api/consent/pending/${d}/approve-all`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:h})})).json(),x=new Set(m.requestIds??[]);return x.size>0?r(v=>v.filter(_=>!x.has(_.id))):r(v=>v.filter(_=>_.sessionId!==d)),!0}catch{return!1}},[]);return{queue:n,approve:o,reject:l,approveAllForSession:u,refresh:a}}function sgt(){const[e,n]=y.useState(null),r=y.useCallback(async()=>{try{const s=await(await fetch(`${ax}/api/consent/policy`)).json();n(s)}catch{n(null)}},[]);return y.useEffect(()=>{r()},[r]),{policy:e,refresh:r}}function jq({risk:e}){const n={low:"bg-green-500/10 text-green-600 dark:text-green-400",medium:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",high:"bg-red-500/10 text-red-600 dark:text-red-400"},i={low:r4,medium:IY,high:nA}[e];return c.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium ${n[e]}`,children:[c.jsx(i,{className:"h-3 w-3"}),e]})}function Nq({level:e}){const n={none:"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",once:"bg-blue-500/10 text-blue-600 dark:text-blue-400",always:"bg-amber-500/10 text-amber-700 dark:text-amber-300",dangerous:"bg-red-500/10 text-red-600 dark:text-red-400"};return c.jsx("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium ${n[e]}`,children:e})}function Tq({expiresAt:e}){const[n,r]=y.useState("");return y.useEffect(()=>{const i=()=>{const a=new Date(e).getTime()-Date.now();if(a<=0){r("expired");return}const o=Math.ceil(a/1e3);o>60?r(`${Math.ceil(o/60)}m`):r(`${o}s`)};i();const s=setInterval(i,1e3);return()=>clearInterval(s)},[e]),c.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[c.jsx(Gm,{className:"h-3 w-3"}),n]})}function Eq({toolName:e}){return e.startsWith("terminal.")?c.jsx(Rs,{className:"h-4 w-4"}):e.startsWith("file.")?c.jsx(xh,{className:"h-4 w-4"}):c.jsx(RY,{className:"h-4 w-4"})}function agt({preview:e,toolName:n}){const r=e.command,i=e.path,s=e.content;return r?c.jsxs("div",{className:"rounded-md bg-muted p-3 font-mono text-xs leading-relaxed overflow-x-auto",children:[c.jsx("span",{className:"text-muted-foreground",children:"$ "}),r]}):i?c.jsxs("div",{className:"rounded-md bg-muted p-3 text-xs leading-relaxed overflow-x-auto",children:[c.jsxs("div",{className:"text-muted-foreground mb-1",children:[n,": ",i]}),s&&c.jsx("pre",{className:"font-mono whitespace-pre-wrap",children:s.length>500?s.slice(0,500)+"...":s})]}):c.jsx("div",{className:"rounded-md bg-muted p-3 font-mono text-xs leading-relaxed overflow-x-auto",children:JSON.stringify(e,null,2)})}function ogt({request:e,onApprove:n,onReject:r,compact:i=!1}){const[s,a]=y.useState(!1),o=async()=>{a(!0),n(e.id)},l=async()=>{a(!0),r(e.id)};return i?c.jsxs("div",{className:"flex items-center gap-3 px-3 py-2 rounded-lg border bg-card",children:[c.jsx(Eq,{toolName:e.toolName}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-xs font-medium truncate",children:e.toolName}),c.jsx(jq,{risk:e.risk}),c.jsx(Nq,{level:e.policy.consentLevel}),c.jsx(Tq,{expiresAt:e.expiresAt})]}),c.jsx("p",{className:"text-xs text-muted-foreground truncate",children:e.summary})]}),c.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[c.jsxs("button",{onClick:o,disabled:s,className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-md text-xs font-medium bg-green-500/10 text-green-600 dark:text-green-400 hover:bg-green-500/20 disabled:opacity-50 transition-colors",children:[c.jsx(iI,{className:"h-3 w-3"}),"Approve"]}),c.jsxs("button",{onClick:l,disabled:s,className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-md text-xs font-medium bg-red-500/10 text-red-600 dark:text-red-400 hover:bg-red-500/20 disabled:opacity-50 transition-colors",children:[c.jsx(nA,{className:"h-3 w-3"}),"Reject"]})]})]}):c.jsxs("div",{className:"rounded-lg border bg-card shadow-sm overflow-hidden",children:[c.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b bg-muted/30",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Eq,{toolName:e.toolName}),c.jsx("span",{className:"text-sm font-medium",children:e.toolName}),c.jsx(jq,{risk:e.risk}),c.jsx(Nq,{level:e.policy.consentLevel})]}),c.jsx(Tq,{expiresAt:e.expiresAt})]}),c.jsxs("div",{className:"p-4 space-y-3",children:[c.jsx("p",{className:"text-sm text-foreground",children:e.summary}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("p",{className:"text-xs text-muted-foreground",children:e.policy.description}),!e.policy.knownTool&&c.jsx("p",{className:"text-xs text-red-600 dark:text-red-400",children:"Unknown tool: blocked behind dangerous consent until added to the active profile."})]}),c.jsx(agt,{preview:e.preview,toolName:e.toolName})]}),c.jsxs("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t bg-muted/20",children:[c.jsxs("button",{onClick:l,disabled:s,className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-md text-xs font-medium bg-red-500/10 text-red-600 dark:text-red-400 hover:bg-red-500/20 disabled:opacity-50 transition-colors",children:[c.jsx(nA,{className:"h-3.5 w-3.5"}),"Reject"]}),c.jsxs("button",{onClick:o,disabled:s,className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-md text-xs font-medium bg-green-500/10 text-green-600 dark:text-green-400 hover:bg-green-500/20 disabled:opacity-50 transition-colors",children:[c.jsx(iI,{className:"h-3.5 w-3.5"}),"Approve"]})]})]})}function lgt({status:e}){const n={running:{icon:Lt,label:"Running",color:"bg-blue-500/10 text-blue-600 dark:text-blue-400"},"awaiting-approval":{icon:IY,label:"Awaiting Approval",color:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"},"needs-input":{icon:Gm,label:"Needs Input",color:"bg-orange-500/10 text-orange-600 dark:text-orange-400"},completed:{icon:js,label:"Completed",color:"bg-green-500/10 text-green-600 dark:text-green-400"},failed:{icon:Ah,label:"Failed",color:"bg-red-500/10 text-red-600 dark:text-red-400"}},{icon:r,label:i,color:s}=n[e];return c.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium ${s}`,children:[c.jsx(r,{className:`h-3 w-3 ${e==="running"?"animate-spin":""}`}),i]})}function cgt({className:e="",compact:n=!1,sessionId:r,onApproveAllEnabled:i}){const{queue:s,approve:a,reject:o,approveAllForSession:l}=igt(r),{policy:u}=sgt(),[d,h]=y.useState(!1),f=y.useMemo(()=>r?s.filter(x=>x.sessionId===r):s,[s,r]),m=async()=>{if(!r||d)return;h(!0),await l(r)&&(i==null||i()),h(!1)};return f.length===0?null:c.jsxs("div",{className:`space-y-2 ${e}`,children:[c.jsxs("div",{className:"flex items-center justify-between px-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(lgt,{status:"awaiting-approval"}),c.jsxs("div",{className:"flex flex-col",children:[c.jsxs("span",{className:"text-xs text-muted-foreground",children:[f.length," pending ",f.length===1?"request":"requests"]}),u&&c.jsxs("span",{className:"text-xs text-muted-foreground",children:["Profile: ",c.jsx("span",{className:"font-medium text-foreground",children:u.activeProfileName??"custom"})," ","• ",u.toolCount," configured tools • unknown tools require dangerous consent"]})]})]}),r&&f.length>0&&c.jsx("button",{onClick:m,disabled:d,className:"text-xs text-green-600 hover:text-green-500 dark:text-green-400 dark:hover:text-green-300 disabled:opacity-50 disabled:cursor-not-allowed",children:d?"Approving...":"Approve all in this session"})]}),c.jsx("div",{className:"space-y-2",children:f.map(x=>c.jsx(ogt,{request:x,onApprove:a,onReject:o,compact:n},x.id))})]})}function ugt({activeProject:e,activeProjectDisplayName:n,activeProjectRoot:r,activeSessionId:i,availableFilesForMention:s,availableSkills:a,changedFiles:o,changedFilesForComposer:l,chatCollapsed:u,chatMode:d,chatProvider:h,chatProviderRuntimeMode:f,chatResponseStyle:m,cliModel:x,developerChatPanelStyle:v,developerChatSubmitLoading:_,developerChatUiState:w,developerComposerControlRow:S,developerPlaceholder:C,editComposerBag:j,error:T,hasMessages:E,hasMoreMessages:N,hitMaxRounds:R,inputSegments:D,inputValueRef:U,inputVersion:H,isLoading:I,isLoadingHistory:W,isMobile:$,loadOlderMessages:O,limitReached:B,managerThreads:M,messageContents:L,messageQueue:z,messages:G,pendingPlan:V,previewOpen:F,projectNodeId:X,projectSuggestions:q,projects:ee,projectsLoading:J,promptInputRef:Q,sendTarget:re,sessionInfo:te,setChatPanelElement:ce,showDesktopProject:me,showProject:se,showScreenShare:ae,suggestions:be,threadTargetRepoRuntime:_e,token:je,todoList:Xe,voiceLevels:yt,voiceRecording:Nt,voiceTranscribing:Rt,onAcceptAllFiles:nn,onAcceptFile:rn,onCancelRequest:Ft,onChangedFileClick:Zt,onChatModeChange:Je,onClearTodoList:Ze,onCliModelChange:ve,onContinueChat:we,onDequeueMessage:De,onEditPreviousMessage:xt,onExecutePlan:dt,onHandleInputChange:ft,onHandleMemoryFeedback:Dt,onHandleSuggestion:Wt,onMemorySourceOpen:Ye,onMoveRepoToGateway:We,onOpenAddProject:mt,onOpenMessagePath:at,onOpenTerminalFromToolCall:Ue,onApprovalResponse:Ne,onProviderChange:Ce,onProviderRuntimeModeChange:Be,onQueue:rt,onRejectAllFiles:pt,onRejectFile:Qe,onRejectPlan:Tt,onReorderQueueItem:Et,onResponseStyleChange:jt,onSearchFiles:tt,onSendTargetChange:ot,onSetApproveAllInSession:Mt,onSteerQueuedMessage:Ut,onStopRecording:Re,onSubmit:St,onUpdateQueueItem:Qt,onVoiceInput:Ht,renderInlineSecretPrompt:Bt}){if(!E)return c.jsx("div",{ref:ce,className:`relative flex-1 min-w-0 flex flex-col items-center justify-center overflow-hidden ${u?"":"px-4"} ${$?"pt-12":""}`,style:v,children:c.jsxs("div",{className:"w-full max-w-3xl space-y-8",children:[c.jsxs("div",{className:"text-center",children:[c.jsx("h1",{className:"text-3xl font-semibold tracking-tight",children:"Jait"}),c.jsx("p",{className:"text-base text-muted-foreground mt-1",children:"Just Another Intelligent Tool"})]}),!J&&ee.length===0?c.jsxs("div",{className:"text-center space-y-3",children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Add a project folder to start chatting with your code."}),c.jsxs(ge,{variant:"default",size:"lg",onClick:mt,children:[c.jsx(Oh,{className:"h-4 w-4 mr-2"}),"Add Project"]})]}):c.jsx(Vmt,{suggestions:se&&e?q:be,onSelect:Wt}),w.showTodoList&&c.jsx(W7,{items:Xe,onClear:Ze}),c.jsx(Ba,{name:"Chat composer",variant:"section",resetKeys:[i,H,re],children:c.jsx($2,{ref:Q,availableSkills:a,draftStateKey:`developer:${i??"new-chat"}`,value:U.current,syncKey:H,segments:D,onChange:ft,onSubmit:St,onStop:Ft,onQueue:rt,isLoading:I,submitLoading:_,placeholder:C,onVoiceInput:Ht,voiceRecording:Nt,voiceLevels:yt,voiceTranscribing:Rt,onVoiceStop:Re,mode:d,onModeChange:Je,responseStyle:m,onResponseStyleChange:jt,sendTarget:re,onSendTargetChange:ot,showSendTargetSelector:!1,provider:h,onProviderChange:Ce,providerRuntimeMode:f,onProviderRuntimeModeChange:Be,cliModel:x,onCliModelChange:ve,repoRuntime:re==="thread"?_e:null,onMoveToGateway:re==="thread"?We:void 0,availableFiles:s,onSearchFiles:tt,projectOpen:se,projectName:n??void 0,projectPath:r??void 0,chatId:i??void 0,sessionInfo:te,projectNodeId:X??void 0})}),S]})});const gn=[h,se||ae||F,M,Ue,Bt,Ne,xt,j,at,Zt,Ye,Dt],Vn=y.useRef(new Map),Hn=y.useRef(null);Hn.current!==i&&(Vn.current.clear(),Hn.current=i);const yn=G.length>0?G[G.length-1].id:null,di=JSON.stringify(gn),Oe=[];{const ye=Vn.current;for(let Ie=0;Ie<G.length;Ie++){const He=G[Ie],ct=I&&He.id===yn,he=ye.get(He.id),Ae=di+"|"+(He===(he==null?void 0:he.msg)?"s":"d")+"|"+(He.contextFlow===(he==null?void 0:he.contextFlow)?"s":"d")+"|"+(He.hasContextFlow===(he==null?void 0:he.hasContextFlow)?"s":"d")+"|"+(He.hasMemoryProvenance===(he==null?void 0:he.hasMemoryProvenance)?"s":"d")+"|"+(He.displayContent===(he==null?void 0:he.displayContent)?"s":"d")+"|"+(He.referencedFiles===(he==null?void 0:he.referencedFiles)?"s":"d")+"|"+(He.displaySegments===(he==null?void 0:he.displaySegments)?"s":"d")+"|"+(He.attachments===(he==null?void 0:he.attachments)?"s":"d")+"|"+(He.thinking===(he==null?void 0:he.thinking)?"s":"d")+"|"+(He.thinkingDuration===(he==null?void 0:he.thinkingDuration)?"s":"d")+"|"+(He.toolCalls===(he==null?void 0:he.toolCalls)?"s":"d")+"|"+(He.segments===(he==null?void 0:he.segments)?"s":"d")+"|"+(ct===(he==null?void 0:he.isStreaming)?"s":"d")+"|"+He.role;if(he&&he.key===Ae){Oe.push(he.element);continue}const pe=c.jsx(wL,{messageId:He.id,messageIndex:Ie,messageFromEnd:G.length-1-Ie,role:He.role,content:He.content,contextFlow:He.contextFlow,hasContextFlow:He.hasContextFlow,hasMemoryProvenance:He.hasMemoryProvenance,sessionId:i,authToken:je,displayContent:He.displayContent,referencedFiles:He.referencedFiles,displaySegments:He.displaySegments,attachments:He.attachments,thinking:He.thinking,thinkingDuration:He.thinkingDuration,toolCalls:He.toolCalls,segments:He.segments,isStreaming:ct,compact:se||ae||F,preferLlmUi:!0,provider:h,threadControlThreads:M,onOpenTerminal:Ue,renderInlineSecretPrompt:Bt,onApprovalResponse:Ne,onEditMessage:xt,editComposer:j,onOpenPath:at,onOpenDiff:Zt,onOpenMemorySource:Ye,onMemoryFeedback:Dt},He.id);ye.set(He.id,{key:Ae,element:pe,msg:He,contextFlow:He.contextFlow,hasContextFlow:He.hasContextFlow,hasMemoryProvenance:He.hasMemoryProvenance,displayContent:He.displayContent,referencedFiles:He.referencedFiles,displaySegments:He.displaySegments,attachments:He.attachments,thinking:He.thinking,thinkingDuration:He.thinkingDuration,toolCalls:He.toolCalls,segments:He.segments,isStreaming:ct}),Oe.push(pe)}if(ye.size>G.length){const Ie=new Set(G.map(He=>He.id));for(const He of ye.keys())Ie.has(He)||ye.delete(He)}}return c.jsx("div",{ref:ce,className:"relative flex flex-col min-h-0 min-w-0 overflow-hidden",style:v,children:!u&&c.jsxs(c.Fragment,{children:[c.jsx(Ba,{name:"Chat transcript",variant:"section",className:"min-h-0 flex-1 border-b",resetKeys:[i,G.length,z.length,me],children:c.jsxs(que,{className:"min-h-0 flex-1 border-b",compact:me,loading:W,loadingLabel:"Loading chat",messageContents:L,hasMore:N,onLoadMore:O,children:[Oe,z.length>0&&c.jsx(ehe,{items:z,onRemove:De,onEdit:Qt,onReorder:Et,onSteer:I&&i?Ut:void 0})]},i??"developer-empty")}),c.jsx("div",{className:`shrink-0 ${$?"px-2 py-2":`py-3 ${me?"px-3":"px-4"}`}`,children:c.jsxs("div",{className:"mx-auto w-full max-w-3xl space-y-1.5",children:[c.jsxs("div",{className:"space-y-1.5 max-h-[40vh] overflow-y-auto",children:[w.showTodoList&&c.jsx(W7,{items:Xe,onClear:Ze}),T&&T!=="login_required"&&T!=="limit_reached"&&!I&&c.jsxs("div",{className:"flex items-center gap-2.5 rounded-lg border border-red-500/40 bg-red-500/10 px-3.5 py-2.5 text-sm text-red-400 dark:text-red-400 dark:border-red-400/40 dark:bg-red-400/10",children:[c.jsx(Hx,{className:"h-4 w-4 shrink-0"}),c.jsx("span",{className:"min-w-0 break-words",children:T})]}),R&&!I&&c.jsxs("div",{className:"flex items-center justify-center gap-2 py-1.5",children:[c.jsxs("button",{onClick:()=>we({token:je,sessionId:i}),className:"inline-flex items-center gap-1.5 rounded-md border bg-background px-3 py-1.5 text-xs font-medium text-foreground shadow-sm hover:bg-accent transition-colors",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})}),"Continue"]}),c.jsx("span",{className:"text-xs text-muted-foreground",children:"Agent stopped - continue to resume"})]}),c.jsx(cgt,{compact:!0,sessionId:i,onApproveAllEnabled:()=>Mt(!0)}),V&&c.jsx(Kmt,{plan:V,onApprove:dt,onReject:Tt,isExecuting:I}),B&&c.jsx("p",{className:"text-center text-sm text-destructive",children:"Daily limit reached. Come back tomorrow."}),o.length>0&&c.jsx(Zmt,{files:l,onAccept:rn,onReject:Qe,onAcceptAll:nn,onRejectAll:pt,onFileClick:Zt})]}),c.jsx(Ba,{name:"Chat composer",variant:"section",resetKeys:[i,H,re],children:c.jsx($2,{ref:Q,availableSkills:a,draftStateKey:`developer:${i??"new-chat"}`,value:U.current,syncKey:H,segments:D,onChange:ft,onSubmit:St,onStop:Ft,onQueue:rt,isLoading:I,submitLoading:_,disabled:B,placeholder:C,onVoiceInput:Ht,voiceRecording:Nt,voiceLevels:yt,voiceTranscribing:Rt,onVoiceStop:Re,mode:d,onModeChange:Je,responseStyle:m,onResponseStyleChange:jt,sendTarget:re,onSendTargetChange:ot,showSendTargetSelector:!1,provider:h,onProviderChange:Ce,providerRuntimeMode:f,onProviderRuntimeModeChange:Be,cliModel:x,onCliModelChange:ve,repoRuntime:re==="thread"?_e:null,onMoveToGateway:re==="thread"?We:void 0,availableFiles:s,onSearchFiles:tt,projectOpen:se,projectName:n??void 0,projectPath:r??void 0,chatId:i??void 0,sessionInfo:te,projectNodeId:X??void 0})}),S]})})]})})}/**
|
|
1427
1427
|
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
1428
1428
|
* @license MIT
|
|
1429
1429
|
*
|
|
@@ -1478,7 +1478,7 @@ WARNING: This link could potentially be dangerous`)){let r=window.open();if(r){t
|
|
|
1478
1478
|
`)}
|
|
1479
1479
|
`}]}function L1t({activeProjectRoot:e,activeProjectNodeId:n,activeSessionId:r,activeTerminalId:i,appliedThemeMode:s,closeProjectPanel:a,closeTerminalPanel:o,createTerminal:l,handleToggleEditor:u,killTerminal:d,openTerminalPanel:h,projectTerminals:f,promptInputRef:m,refresh:x,setActiveTerminalId:v,setCurrentView:_,setShowSidebar:w,showMobileProjectEditorTab:S,showMobileProjectTreeTab:C,showProject:j,showSidebar:T,showTerminal:E,token:N}){const R=y.useCallback(async(L=null)=>{const z=await x(),G=e,V=G?z.filter(F=>Vhe(F,G,n)):z;if(L&&V.some(X=>X.id===L))return v(L),L;if(i&&V.some(F=>F.id===i))return i;if(V.length>0){const F=V[V.length-1].id;return v(F),F}try{return(await l(r??"default",e??void 0,void 0,n)).id}catch(F){const X=F instanceof Error?F.message:"Failed to create terminal",q=n&&n!=="gateway";return Zn.error(q?"Terminal unavailable on this node":"Failed to open terminal",{description:q?`${X}. Make sure the node is connected and the project path exists on it.`:X,duration:8e3}),null}},[x,v,i,l,r,e,n]),D=y.useCallback(async L=>{_("chat"),h(),await R(L)||o()},[R,h,o,_]),U=y.useCallback(async L=>{if(T&&w(!1),L==="terminal"){_("chat"),a(),h(),await R()||o();return}if(E&&o(),L==="editor"){j||await u(),S();return}j||await u(),C(L)},[o,a,R,u,h,_,w,S,C,T,E,j]),H=y.useCallback(L=>{var z,G;(z=m.current)==null||z.insertChip(L),(G=m.current)==null||G.focus()},[m]),I=y.useCallback((L,z,G,V)=>{var X,q;z.trim()&&((X=m.current)==null||X.insertSegments(R1t(L,G,V)),(q=m.current)==null||q.focus())},[m]),W=y.useCallback((L,z,G,V,F)=>{var ee,J;const X=z.trim();if(!X)return;const q=L.replace(/^term-/,"").slice(0,8)||L;(ee=m.current)==null||ee.insertSegments(M1t({terminalId:L,name:q,...G?{projectRoot:G}:{}},X,V,F)),(J=m.current)==null||J.focus()},[m]),$=y.useCallback(L=>{var z,G;L.selector&&((z=m.current)==null||z.insertSegments(P1t(L)),(G=m.current)==null||G.focus(),_("chat"))},[m,_]),O=y.useCallback(async()=>{if(E){o();return}_("chat"),h(),await R()||o()},[E,R,h,o,_]),B=y.useCallback(async L=>{var G;const z=f.length===1&&((G=f[0])==null?void 0:G.id)===L;await d(L),z&&o()},[f,d,o]),M=y.useCallback(L=>{var F,X,q;const z=f.find(ee=>ee.id===L),G=`detached-terminal-${L}-${Date.now()}`;t1t({id:G,terminalId:L,token:N??null,label:((F=z==null?void 0:z.metadata)==null?void 0:F.cwd)??`Terminal ${L.slice(0,6)}`,theme:s==="dark"?"dark":"light",projectRoot:(z==null?void 0:z.projectRoot)??e??null});const V=`${window.location.origin}${window.location.pathname}?detachedTerminal=${encodeURIComponent(G)}`;if((X=window.jaitDesktop)!=null&&X.openProjectWindow)window.jaitDesktop.openProjectWindow({url:V,title:"Terminal"});else{const ee=window.open(V,`jait-detached-terminal-${L}`,"popup=yes,width=800,height=600,resizable=yes,scrollbars=yes");(q=ee==null?void 0:ee.focus)==null||q.call(ee)}},[f,N,s,e]);return{ensureActiveTerminal:R,handleDetachTerminal:M,handleKillTerminal:B,handleMobileProjectTargetAction:U,handleOpenTerminalFromToolCall:D,handleReferenceFile:H,handleReferenceFileSelection:I,handleReferencePreviewElement:$,handleReferenceTerminalSelection:W,handleToggleTerminal:O}}function $1t({platform:e,className:n}){switch(e){case"electron":return c.jsx(Po,{className:n??"h-4 w-4"});case"react-native":return c.jsx(i4,{className:n??"h-4 w-4"});default:return c.jsx(_i,{className:n??"h-4 w-4"})}}function LG({device:e,isLocal:n,isConnected:r,isLoading:i,onConnect:s}){const a=!n&&e.capabilities.includes("screen-share");return c.jsxs("div",{className:`flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors
|
|
1480
1480
|
${r?"bg-green-500/10 border border-green-500/30":"bg-muted/50 hover:bg-muted/80"}`,children:[c.jsx("div",{className:`h-9 w-9 rounded-lg flex items-center justify-center shrink-0
|
|
1481
|
-
${r?"bg-green-500/15 text-green-500":n?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:c.jsx($1t,{platform:e.platform,className:"h-4.5 w-4.5"})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"font-medium truncate text-sm",children:[e.name,n&&c.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:"(you)"})]}),c.jsxs("div",{className:"text-xs text-muted-foreground mt-0.5",children:[e.platform,r&&c.jsx("span",{className:"text-green-500 ml-1",children:"· connected"})]})]}),a&&!r&&c.jsx(ge,{size:"sm",variant:"outline",className:"h-7 text-xs px-2.5 shrink-0",onClick:s,disabled:i,children:i?c.jsx(Lt,{className:"h-3 w-3 animate-spin"}):c.jsxs(c.Fragment,{children:[c.jsx(LY,{className:"h-3 w-3 mr-1"}),"Connect"]})}),r&&c.jsxs(Fn,{className:"bg-green-500/15 text-green-500 border-green-500/30 shrink-0 text-2xs",children:[c.jsx(_1e,{className:"h-2.5 w-2.5 mr-0.5"})," live"]})]})}function D1t({stream:e}){const n=y.useRef(null),r=y.useRef(null),[i,s]=y.useState(!1);y.useEffect(()=>{console.log(`[screen-share] RemoteScreen: stream=${!!e} tracks=${e==null?void 0:e.getTracks().map(o=>`${o.kind}:${o.readyState}`).join(",")} videoRef=${!!n.current}`),n.current&&e&&(n.current.srcObject=e)},[e]);const a=y.useCallback(()=>{const o=r.current;o&&(document.fullscreenElement?(document.exitFullscreen(),s(!1)):(o.requestFullscreen(),s(!0)))},[]);return y.useEffect(()=>{const o=()=>s(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",o),()=>document.removeEventListener("fullscreenchange",o)},[]),e?c.jsxs("div",{ref:r,className:"relative flex-1 group bg-black rounded-lg overflow-hidden",children:[c.jsx("video",{ref:n,autoPlay:!0,playsInline:!0,muted:!0,className:"w-full h-full object-contain bg-black"}),c.jsx("button",{onClick:a,className:"absolute top-2 right-2 p-1.5 rounded bg-black/60 text-white opacity-0 group-hover:opacity-100 transition-opacity",children:i?c.jsx(sM,{className:"h-3.5 w-3.5"}):c.jsx(iM,{className:"h-3.5 w-3.5"})})]}):c.jsx("div",{className:"flex-1 bg-black/20 rounded-lg flex items-center justify-center text-muted-foreground",children:c.jsxs("div",{className:"text-center",children:[c.jsx(o1e,{className:"h-10 w-10 mx-auto mb-3 opacity-40"}),c.jsx("p",{className:"text-sm font-medium",children:"Waiting for remote screen…"}),c.jsx("p",{className:"text-xs mt-1 opacity-60",children:"The remote device is preparing to share"})]})})}function I1t({screenShare:e}){var a;const n=e.session,r=e.isViewer||e.isHost;console.log(`[screen-share] Panel render: isHost=${e.isHost} isViewer=${e.isViewer} isConnected=${r} remoteStream=${!!e.remoteStream} localStream=${!!e.localStream}`);const i=e.devices.filter(o=>o.id!==e.localDeviceId),s=e.devices.find(o=>o.id===e.localDeviceId);return c.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[e.pendingShareRequest&&!r&&c.jsx("div",{className:"p-3 border-b bg-amber-500/5",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx("div",{className:"h-9 w-9 rounded-lg bg-amber-500/15 text-amber-500 flex items-center justify-center shrink-0 mt-0.5",children:c.jsx(rI,{className:"h-4.5 w-4.5"})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:"text-sm font-medium",children:"Screen share requested"}),c.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"A remote device wants to view your screen."}),c.jsxs("div",{className:"flex gap-2 mt-2",children:[c.jsxs(ge,{size:"sm",className:"h-7 text-xs px-3",onClick:()=>e.acceptPendingShare(),children:[c.jsx(rI,{className:"h-3 w-3 mr-1"}),"Share Screen"]}),c.jsx(ge,{size:"sm",variant:"ghost",className:"h-7 text-xs px-2 text-muted-foreground",onClick:()=>e.rejectPendingShare(),children:"Decline"})]})]})]})}),r?c.jsxs("div",{className:"flex flex-col flex-1 min-h-0",children:[c.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b bg-muted/20 shrink-0",children:[c.jsxs(Fn,{className:"bg-green-500/15 text-green-500 border-green-500/30 text-2xs",children:[c.jsx(xx,{className:"h-2.5 w-2.5 mr-1"})," Live"]}),c.jsx("span",{className:"text-xs text-muted-foreground truncate flex-1",children:e.connectedDeviceId?((a=e.devices.find(o=>o.id===e.connectedDeviceId))==null?void 0:a.name)??e.connectedDeviceId:"Connected"}),n&&c.jsxs("span",{className:"text-2xs text-muted-foreground",children:[n.transport.routeMode.toUpperCase()," · ",n.transport.avgLatencyMs,"ms"]}),c.jsxs(ge,{variant:"ghost",size:"sm",className:"h-6 text-xs px-2 text-destructive hover:text-destructive",onClick:()=>e.disconnect(),children:[c.jsx(Hr,{className:"h-3 w-3 mr-1"}),"Disconnect"]})]}),e.error&&c.jsx("div",{className:"mx-2 p-2 rounded-md bg-red-500/10 text-red-500 text-xs border border-red-500/20",children:e.error}),e.isHost?c.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:c.jsxs("div",{className:"text-center",children:[c.jsx(Xg,{className:"h-10 w-10 mx-auto mb-3 opacity-40"}),c.jsx("p",{className:"text-sm font-medium",children:"Sharing your screen"}),c.jsx("p",{className:"text-xs mt-1 opacity-60",children:"A remote device is viewing this screen"}),n&&c.jsxs("p",{className:"text-xs mt-2 opacity-50",children:[c.jsx(iA,{className:"h-3 w-3 inline mr-0.5"}),n.viewers.length," viewer",n.viewers.length!==1?"s":""]})]})}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"flex-1 min-h-0 p-2",children:c.jsx(D1t,{stream:e.remoteStream})}),n&&c.jsxs("div",{className:"flex items-center gap-3 px-3 py-1.5 border-t text-2xs text-muted-foreground shrink-0",children:[c.jsxs("span",{children:["Session ",n.id.slice(0,8)]}),c.jsx("span",{children:"·"}),c.jsxs("span",{children:["ICE: ",n.transport.iceConnectionState]}),c.jsx("span",{children:"·"}),c.jsxs("span",{children:[c.jsx(iA,{className:"h-2.5 w-2.5 inline mr-0.5"}),n.viewers.length," viewer",n.viewers.length!==1?"s":""]})]})]})]}):c.jsxs("div",{className:"flex flex-col gap-3 p-3 overflow-y-auto",children:[e.error&&c.jsx("div",{className:"p-2.5 rounded-md bg-red-500/10 text-red-500 text-xs border border-red-500/20",children:e.error}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Remote Devices"}),c.jsx(ge,{variant:"ghost",size:"sm",className:"h-5 w-5 p-0",onClick:()=>e.refreshState(),children:c.jsx(ks,{className:"h-3 w-3"})})]}),i.length===0?c.jsxs("div",{className:"py-6 text-center",children:[c.jsx(Xg,{className:"h-8 w-8 mx-auto mb-2 text-muted-foreground/40"}),c.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"No remote devices found"}),c.jsx("p",{className:"text-xs text-muted-foreground/60 mt-1 max-w-[200px] mx-auto",children:"Open Jait on another device (desktop app or mobile) to connect to it"})]}):c.jsx("div",{className:"space-y-1.5",children:i.map(o=>c.jsx(LG,{device:o,isLocal:!1,isConnected:!1,isLoading:e.loading&&e.connectedDeviceId===o.id,onConnect:()=>e.requestRemoteShare(o.id)},o.id))})]}),s&&c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"This Device"}),c.jsx(LG,{device:s,isLocal:!0,isConnected:!1,isLoading:!1,onConnect:()=>{}})]}),c.jsxs("div",{className:"px-2 py-2 rounded-md bg-muted/30 text-xs text-muted-foreground",children:[c.jsx("strong",{children:"Tip:"})," Ask your agent to connect to a device — e.g. “Show me my desktop screen”"]})]})]})}function B1t({screenShare:e,floatingSSPos:n,floatingSSSize:r,onFloatingDragStart:i,onFloatingResizeStart:s,onClose:a}){return c.jsxs("div",{className:"fixed z-50 bg-background border rounded-lg shadow-2xl overflow-hidden flex flex-col",style:{left:n.x<0?void 0:n.x,top:n.y<0?void 0:n.y,right:n.x<0?16:void 0,bottom:n.y<0?16:void 0,width:r.w,height:r.h},children:[c.jsxs("div",{className:"flex items-center justify-between h-8 px-3 border-b bg-muted/30 shrink-0 cursor-move select-none",onPointerDown:i,style:{touchAction:"none"},children:[c.jsxs("span",{className:"text-xs font-medium flex items-center gap-1.5",children:[c.jsx(Xg,{className:"h-3 w-3"})," Screen Share"]}),c.jsx(ge,{variant:"ghost",size:"sm",className:"h-5 w-5 p-0",onPointerDown:o=>o.stopPropagation(),onClick:a,children:c.jsx(Hr,{className:"h-3 w-3"})})]}),c.jsx(Ba,{name:"Screen share",variant:"section",className:"flex-1 min-h-0",resetKeys:[!0],children:c.jsx(I1t,{screenShare:e})}),c.jsx("div",{className:"absolute bottom-0 right-0 w-3 h-3 cursor-nwse-resize opacity-50 hover:opacity-100",onPointerDown:s,style:{touchAction:"none"},children:c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",className:"text-muted-foreground",children:c.jsx("path",{d:"M10 2L2 10M10 6L6 10M10 10L10 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]})}function z1t({open:e,children:n,onOpenChange:r}){return c.jsxs(c.Fragment,{children:[e&&c.jsx("div",{className:"fixed inset-0 z-[39]",onClick:()=>r(!1),"aria-hidden":"true"}),c.jsxs("div",{className:"fixed right-0 top-1/2 z-40 flex -translate-y-1/2 items-center gap-1",draggable:!1,onDragStart:i=>i.preventDefault(),children:[e&&c.jsx("div",{className:"transition-all duration-200 translate-x-0 opacity-100",children:n}),c.jsx(ge,{type:"button",variant:"secondary",size:"icon",className:"h-14 w-7 rounded-l-lg rounded-r-none border-y border-l border-r-0 bg-background/90 shadow-lg backdrop-blur-lg",onClick:()=>r(!e),"aria-expanded":e,"aria-label":e?"Hide mobile toolbar":"Show mobile toolbar",title:e?"Hide mobile toolbar":"Show mobile toolbar",children:e?c.jsx(xs,{className:"h-4 w-4"}):c.jsx(zx,{className:"h-4 w-4"})})]})]})}function $G(e){if(e.role!=="user")return null;const n=Array.isArray(e.displaySegments)&&e.displaySegments.length>0,r=(typeof e.content=="string"?e.content:"").trim(),i=typeof e.displayContent=="string"?e.displayContent.trim():"";return JSON.stringify({role:"user",content:r,displayContent:i===r?"":i,displaySegments:n?e.displaySegments:null})}function F1t(e,n){const r=new Map;for(const a of e){const o=$G(a);o&&r.set(o,(r.get(o)??0)+1)}const i=[];let s=!1;for(const a of n){if(!a.optimistic){s=!1;continue}if(a.role==="assistant"){s&&i.push(a),s=!1;continue}if(a.role!=="user"){s=!1;continue}const o=$G(a);if(!o){i.push(a),s=!0;continue}const l=r.get(o)??0;if(l>0){r.set(o,l-1),s=!1;continue}i.push(a),s=!0}return i.length===0?e:[...e,...i]}function H1t(e,n){const r=e?[...e]:[],i=r[r.length-1];return(i==null?void 0:i.type)==="text"?r[r.length-1]={type:"text",content:i.content+n}:r.push({type:"text",content:n}),r}function W1t(e,n){const r=e?[...e]:[],i=r[r.length-1];return(i==null?void 0:i.type)==="thinking"?r[r.length-1]={type:"thinking",content:i.content+n}:r.push({type:"thinking",content:n}),r}function H8(e,n){const r=e?[...e]:[],i=r[r.length-1];return(i==null?void 0:i.type)==="toolGroup"?i.callIds.includes(n)||(r[r.length-1]={type:"toolGroup",callIds:[...i.callIds,n]}):r.push({type:"toolGroup",callIds:[n]}),r}function DG(e){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(!r||typeof r!="object")continue;const i=r.type;if(i==="text"||i==="thinking"||i==="error"){const s=r.content;n.push({type:i,content:typeof s=="string"?s:String(s??"")})}else if(i==="toolGroup"){const s=r.callIds,a=Array.isArray(s)?s.filter(o=>typeof o=="string"&&o.length>0):[];a.length>0&&n.push({type:"toolGroup",callIds:a})}}return n}function U1t(e){const n=new Set;for(const r of e??[])if(r.type==="toolGroup")for(const i of r.callIds)n.add(i);return n}const gc=jr(),V1t=10,q1t=20,OR="Connection interrupted. Attempting to reconnect...";function Lb(e){return e?{Authorization:`Bearer ${e}`}:{}}function IG(e){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`${e}-${crypto.randomUUID()}`:`${e}-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}function G1t(e,n){return n?[]:e}function BG(e){if(!(e instanceof Error)||e.name==="AbortError")return!1;const n=e.message.toLowerCase();return n.includes("network error")||n.includes("failed to fetch")||n.includes("fetch failed")||n.includes("load failed")||n.includes("network connection was lost")||n.includes("the internet connection appears to be offline")}function zG(e){return!e.sessionId||e.isLoadingHistory?!1:e.isLoading||e.messageCount===0||e.error===OR}function FG(e){return e.hit_max_rounds===!0}function K1t(e,n,r){if(typeof r.seq!="number"||!Number.isFinite(r.seq))return!0;const i=e.get(n)??0;return r.seq<=i?!1:(e.set(n,r.seq),!0)}function Y1t(e){return!(!e.sessionId||e.hasActiveDirectStream&&e.directStreamSessionId===e.sessionId||e.hasActiveResumeStream&&e.activeResumeSessionId===e.sessionId)}function $b(e){if(!(e!=null&&e.length))return;const n=e.flatMap(r=>r.type==="image"||r.type==="attachment"?[{name:r.name,mimeType:r.mimeType,data:r.data,...r.type==="image"?{preview:`data:${r.mimeType};base64,${r.data}`}:{}}]:[]);return n.length>0?n:void 0}function X1t(e,n){const r=[],i=new Set;for(const s of[...e??[],...n??[]]){const a=`${s.name}:${s.mimeType}:${s.data}`;i.has(a)||(i.add(a),r.push(s))}return r.length>0?r:void 0}function HG(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0}function WG(e){var n,r;return((n=e.attachments)==null?void 0:n.some(i=>i.mimeType.toLowerCase().startsWith("image/")))||((r=e.displaySegments)==null?void 0:r.some(i=>i.type==="image"))||!1}function J1t(e,n={}){return e===413?n.provider==="codex"&&WG(n)?"Codex cannot use image uploads in Jait yet, and this image is too large for the gateway to accept. Remove the image or reference it as a project file path instead.":WG(n)?"That image is too large for this chat request. Use a smaller image or reference it as a project file path instead.":"That chat request is too large for the gateway. Remove large attachments or reference files from the project instead.":`HTTP ${e}`}function Z1t(e,n,r,i){const[s,a]=y.useState({messages:[],isLoading:!1,isLoadingHistory:!1,promptCount:0,remainingPrompts:null,error:null,hitMaxRounds:!1,hasMore:!1,totalMessages:0}),[o,l]=y.useState(null),[u,d]=y.useState([]),[h,f]=y.useState([]),[m,x]=y.useState([]),[v,_]=y.useState(0),[w,S]=y.useState(null),[C,j]=y.useState(null),T=y.useCallback(()=>{d(Je=>Je.some(Ze=>Ze.status!=="completed")?[]:Je)},[]),E=y.useRef(null),N=y.useRef(null),R=y.useRef(null),D=y.useRef(null),U=y.useRef(null),H=y.useRef(0),I=y.useRef(new Map),W=y.useRef(0),$=y.useRef(!1),O=y.useRef(!1),[B,M]=y.useState(0),L=y.useCallback(()=>{Y1t({sessionId:e,activeResumeSessionId:D.current,hasActiveResumeStream:!!R.current,directStreamSessionId:U.current,hasActiveDirectStream:!!E.current})&&(O.current=!0,N.current=null,M(Je=>Je+1))},[e]);y.useEffect(()=>{if(e===N.current)return;const Je=O.current;if(O.current=!1,W.current+=1,N.current=e,R.current&&(R.current.abort(),R.current=null,D.current=null),!e){a({messages:[],isLoading:!1,isLoadingHistory:!1,promptCount:0,remainingPrompts:null,hitMaxRounds:!1,error:null,hasMore:!1,totalMessages:0}),d([]),f([]),x([]),S(null);return}let Ze=!1;a(xt=>({...xt,messages:Je?xt.messages:[],isLoading:!1,isLoadingHistory:!0,error:null})),Je||f([]),S(null);const ve=new AbortController;R.current=ve,D.current=e;const we=++H.current,De=()=>!Ze&&H.current===we;return(async()=>{var xt,dt;try{const ft=await fetch(`${gc}/api/sessions/${e}/stream?limit=${V1t}`,{signal:ve.signal,headers:Lb(n)});if(ft.status===401){r==null||r(),a(Qe=>({...Qe,isLoadingHistory:!1}));return}if(!ft.ok||!De())return;const Dt=(xt=ft.body)==null?void 0:xt.getReader();if(!Dt)return;const Wt=new TextDecoder;let Ye="",We=null,mt=null,at=null;const Ue=()=>{if(at!==null&&(window.cancelAnimationFrame(at),at=null),!De()||!mt||!We)return;const Qe=mt,Tt=We;mt=null,a(Et=>({...Et,messages:Et.messages.map(jt=>jt.id===Tt?{...jt,...Qe}:jt)}))},Ne=Qe=>{mt={...mt,...Qe},at===null&&(at=window.requestAnimationFrame(()=>{at=null,Ue()}))};let Ce="",Be,rt="";const pt=new Set;for(;;){const{done:Qe,value:Tt}=await Dt.read();if(Qe)break;if(!De()){Dt.cancel();break}Ye+=Wt.decode(Tt,{stream:!0});const Et=Ye.split(`
|
|
1481
|
+
${r?"bg-green-500/15 text-green-500":n?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:c.jsx($1t,{platform:e.platform,className:"h-4.5 w-4.5"})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"font-medium truncate text-sm",children:[e.name,n&&c.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:"(you)"})]}),c.jsxs("div",{className:"text-xs text-muted-foreground mt-0.5",children:[e.platform,r&&c.jsx("span",{className:"text-green-500 ml-1",children:"· connected"})]})]}),a&&!r&&c.jsx(ge,{size:"sm",variant:"outline",className:"h-7 text-xs px-2.5 shrink-0",onClick:s,disabled:i,children:i?c.jsx(Lt,{className:"h-3 w-3 animate-spin"}):c.jsxs(c.Fragment,{children:[c.jsx(LY,{className:"h-3 w-3 mr-1"}),"Connect"]})}),r&&c.jsxs(Fn,{className:"bg-green-500/15 text-green-500 border-green-500/30 shrink-0 text-2xs",children:[c.jsx(_1e,{className:"h-2.5 w-2.5 mr-0.5"})," live"]})]})}function D1t({stream:e}){const n=y.useRef(null),r=y.useRef(null),[i,s]=y.useState(!1);y.useEffect(()=>{console.log(`[screen-share] RemoteScreen: stream=${!!e} tracks=${e==null?void 0:e.getTracks().map(o=>`${o.kind}:${o.readyState}`).join(",")} videoRef=${!!n.current}`),n.current&&e&&(n.current.srcObject=e)},[e]);const a=y.useCallback(()=>{const o=r.current;o&&(document.fullscreenElement?(document.exitFullscreen(),s(!1)):(o.requestFullscreen(),s(!0)))},[]);return y.useEffect(()=>{const o=()=>s(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",o),()=>document.removeEventListener("fullscreenchange",o)},[]),e?c.jsxs("div",{ref:r,className:"relative flex-1 group bg-black rounded-lg overflow-hidden",children:[c.jsx("video",{ref:n,autoPlay:!0,playsInline:!0,muted:!0,className:"w-full h-full object-contain bg-black"}),c.jsx("button",{onClick:a,className:"absolute top-2 right-2 p-1.5 rounded bg-black/60 text-white opacity-0 group-hover:opacity-100 transition-opacity",children:i?c.jsx(sM,{className:"h-3.5 w-3.5"}):c.jsx(iM,{className:"h-3.5 w-3.5"})})]}):c.jsx("div",{className:"flex-1 bg-black/20 rounded-lg flex items-center justify-center text-muted-foreground",children:c.jsxs("div",{className:"text-center",children:[c.jsx(o1e,{className:"h-10 w-10 mx-auto mb-3 opacity-40"}),c.jsx("p",{className:"text-sm font-medium",children:"Waiting for remote screen…"}),c.jsx("p",{className:"text-xs mt-1 opacity-60",children:"The remote device is preparing to share"})]})})}function I1t({screenShare:e}){var a;const n=e.session,r=e.isViewer||e.isHost;console.log(`[screen-share] Panel render: isHost=${e.isHost} isViewer=${e.isViewer} isConnected=${r} remoteStream=${!!e.remoteStream} localStream=${!!e.localStream}`);const i=e.devices.filter(o=>o.id!==e.localDeviceId),s=e.devices.find(o=>o.id===e.localDeviceId);return c.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[e.pendingShareRequest&&!r&&c.jsx("div",{className:"p-3 border-b bg-amber-500/5",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx("div",{className:"h-9 w-9 rounded-lg bg-amber-500/15 text-amber-500 flex items-center justify-center shrink-0 mt-0.5",children:c.jsx(rI,{className:"h-4.5 w-4.5"})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:"text-sm font-medium",children:"Screen share requested"}),c.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"A remote device wants to view your screen."}),c.jsxs("div",{className:"flex gap-2 mt-2",children:[c.jsxs(ge,{size:"sm",className:"h-7 text-xs px-3",onClick:()=>e.acceptPendingShare(),children:[c.jsx(rI,{className:"h-3 w-3 mr-1"}),"Share Screen"]}),c.jsx(ge,{size:"sm",variant:"ghost",className:"h-7 text-xs px-2 text-muted-foreground",onClick:()=>e.rejectPendingShare(),children:"Decline"})]})]})]})}),r?c.jsxs("div",{className:"flex flex-col flex-1 min-h-0",children:[c.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b bg-muted/20 shrink-0",children:[c.jsxs(Fn,{className:"bg-green-500/15 text-green-500 border-green-500/30 text-2xs",children:[c.jsx(xx,{className:"h-2.5 w-2.5 mr-1"})," Live"]}),c.jsx("span",{className:"text-xs text-muted-foreground truncate flex-1",children:e.connectedDeviceId?((a=e.devices.find(o=>o.id===e.connectedDeviceId))==null?void 0:a.name)??e.connectedDeviceId:"Connected"}),n&&c.jsxs("span",{className:"text-2xs text-muted-foreground",children:[n.transport.routeMode.toUpperCase()," · ",n.transport.avgLatencyMs,"ms"]}),c.jsxs(ge,{variant:"ghost",size:"sm",className:"h-6 text-xs px-2 text-destructive hover:text-destructive",onClick:()=>e.disconnect(),children:[c.jsx(Hr,{className:"h-3 w-3 mr-1"}),"Disconnect"]})]}),e.error&&c.jsx("div",{className:"mx-2 p-2 rounded-md bg-red-500/10 text-red-500 text-xs border border-red-500/20",children:e.error}),e.isHost?c.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:c.jsxs("div",{className:"text-center",children:[c.jsx(Xg,{className:"h-10 w-10 mx-auto mb-3 opacity-40"}),c.jsx("p",{className:"text-sm font-medium",children:"Sharing your screen"}),c.jsx("p",{className:"text-xs mt-1 opacity-60",children:"A remote device is viewing this screen"}),n&&c.jsxs("p",{className:"text-xs mt-2 opacity-50",children:[c.jsx(iA,{className:"h-3 w-3 inline mr-0.5"}),n.viewers.length," viewer",n.viewers.length!==1?"s":""]})]})}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"flex-1 min-h-0 p-2",children:c.jsx(D1t,{stream:e.remoteStream})}),n&&c.jsxs("div",{className:"flex items-center gap-3 px-3 py-1.5 border-t text-2xs text-muted-foreground shrink-0",children:[c.jsxs("span",{children:["Session ",n.id.slice(0,8)]}),c.jsx("span",{children:"·"}),c.jsxs("span",{children:["ICE: ",n.transport.iceConnectionState]}),c.jsx("span",{children:"·"}),c.jsxs("span",{children:[c.jsx(iA,{className:"h-2.5 w-2.5 inline mr-0.5"}),n.viewers.length," viewer",n.viewers.length!==1?"s":""]})]})]})]}):c.jsxs("div",{className:"flex flex-col gap-3 p-3 overflow-y-auto",children:[e.error&&c.jsx("div",{className:"p-2.5 rounded-md bg-red-500/10 text-red-500 text-xs border border-red-500/20",children:e.error}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Remote Devices"}),c.jsx(ge,{variant:"ghost",size:"sm",className:"h-5 w-5 p-0",onClick:()=>e.refreshState(),children:c.jsx(ks,{className:"h-3 w-3"})})]}),i.length===0?c.jsxs("div",{className:"py-6 text-center",children:[c.jsx(Xg,{className:"h-8 w-8 mx-auto mb-2 text-muted-foreground/40"}),c.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"No remote devices found"}),c.jsx("p",{className:"text-xs text-muted-foreground/60 mt-1 max-w-[200px] mx-auto",children:"Open Jait on another device (desktop app or mobile) to connect to it"})]}):c.jsx("div",{className:"space-y-1.5",children:i.map(o=>c.jsx(LG,{device:o,isLocal:!1,isConnected:!1,isLoading:e.loading&&e.connectedDeviceId===o.id,onConnect:()=>e.requestRemoteShare(o.id)},o.id))})]}),s&&c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"This Device"}),c.jsx(LG,{device:s,isLocal:!0,isConnected:!1,isLoading:!1,onConnect:()=>{}})]}),c.jsxs("div",{className:"px-2 py-2 rounded-md bg-muted/30 text-xs text-muted-foreground",children:[c.jsx("strong",{children:"Tip:"})," Ask your agent to connect to a device — e.g. “Show me my desktop screen”"]})]})]})}function B1t({screenShare:e,floatingSSPos:n,floatingSSSize:r,onFloatingDragStart:i,onFloatingResizeStart:s,onClose:a}){return c.jsxs("div",{className:"fixed z-50 bg-background border rounded-lg shadow-2xl overflow-hidden flex flex-col",style:{left:n.x<0?void 0:n.x,top:n.y<0?void 0:n.y,right:n.x<0?16:void 0,bottom:n.y<0?16:void 0,width:r.w,height:r.h},children:[c.jsxs("div",{className:"flex items-center justify-between h-8 px-3 border-b bg-muted/30 shrink-0 cursor-move select-none",onPointerDown:i,style:{touchAction:"none"},children:[c.jsxs("span",{className:"text-xs font-medium flex items-center gap-1.5",children:[c.jsx(Xg,{className:"h-3 w-3"})," Screen Share"]}),c.jsx(ge,{variant:"ghost",size:"sm",className:"h-5 w-5 p-0",onPointerDown:o=>o.stopPropagation(),onClick:a,children:c.jsx(Hr,{className:"h-3 w-3"})})]}),c.jsx(Ba,{name:"Screen share",variant:"section",className:"flex-1 min-h-0",resetKeys:[!0],children:c.jsx(I1t,{screenShare:e})}),c.jsx("div",{className:"absolute bottom-0 right-0 w-3 h-3 cursor-nwse-resize opacity-50 hover:opacity-100",onPointerDown:s,style:{touchAction:"none"},children:c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",className:"text-muted-foreground",children:c.jsx("path",{d:"M10 2L2 10M10 6L6 10M10 10L10 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]})}function z1t({open:e,children:n,onOpenChange:r}){return c.jsxs(c.Fragment,{children:[e&&c.jsx("div",{className:"fixed inset-0 z-[39]",onClick:()=>r(!1),"aria-hidden":"true"}),c.jsxs("div",{className:"fixed right-0 top-1/2 z-40 flex -translate-y-1/2 items-center gap-1",draggable:!1,onDragStart:i=>i.preventDefault(),children:[e&&c.jsx("div",{className:"transition-all duration-200 translate-x-0 opacity-100",children:n}),c.jsx(ge,{type:"button",variant:"secondary",size:"icon",className:"h-14 w-7 rounded-l-lg rounded-r-none border-y border-l border-r-0 bg-background/90 shadow-lg backdrop-blur-lg",onClick:()=>r(!e),"aria-expanded":e,"aria-label":e?"Hide mobile toolbar":"Show mobile toolbar",title:e?"Hide mobile toolbar":"Show mobile toolbar",children:e?c.jsx(xs,{className:"h-4 w-4"}):c.jsx(zx,{className:"h-4 w-4"})})]})]})}function $G(e){if(e.role!=="user")return null;const n=Array.isArray(e.displaySegments)&&e.displaySegments.length>0,r=(typeof e.content=="string"?e.content:"").trim(),i=typeof e.displayContent=="string"?e.displayContent.trim():"";return JSON.stringify({role:"user",content:r,displayContent:i===r?"":i,displaySegments:n?e.displaySegments:null})}function F1t(e,n){const r=new Map;for(const a of e){const o=$G(a);o&&r.set(o,(r.get(o)??0)+1)}const i=[];let s=!1;for(const a of n){if(!a.optimistic){s=!1;continue}if(a.role==="assistant"){s&&i.push(a),s=!1;continue}if(a.role!=="user"){s=!1;continue}const o=$G(a);if(!o){i.push(a),s=!0;continue}const l=r.get(o)??0;if(l>0){r.set(o,l-1),s=!1;continue}i.push(a),s=!0}return i.length===0?e:[...e,...i]}function H1t(e,n){const r=e?[...e]:[],i=r[r.length-1];return(i==null?void 0:i.type)==="text"?r[r.length-1]={type:"text",content:i.content+n}:r.push({type:"text",content:n}),r}function W1t(e,n){const r=e?[...e]:[],i=r[r.length-1];return(i==null?void 0:i.type)==="thinking"?r[r.length-1]={type:"thinking",content:i.content+n}:r.push({type:"thinking",content:n}),r}function H8(e,n){const r=e?[...e]:[],i=r[r.length-1];return(i==null?void 0:i.type)==="toolGroup"?i.callIds.includes(n)||(r[r.length-1]={type:"toolGroup",callIds:[...i.callIds,n]}):r.push({type:"toolGroup",callIds:[n]}),r}function DG(e){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(!r||typeof r!="object")continue;const i=r.type;if(i==="text"||i==="thinking"||i==="error"){const s=r.content;n.push({type:i,content:typeof s=="string"?s:String(s??"")})}else if(i==="toolGroup"){const s=r.callIds,a=Array.isArray(s)?s.filter(o=>typeof o=="string"&&o.length>0):[];a.length>0&&n.push({type:"toolGroup",callIds:a})}}return n}function U1t(e){const n=new Set;for(const r of e??[])if(r.type==="toolGroup")for(const i of r.callIds)n.add(i);return n}const gc=jr(),V1t=10,q1t=20,OR="Connection interrupted. Attempting to reconnect...";function Lb(e){return e?{Authorization:`Bearer ${e}`}:{}}function IG(e){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`${e}-${crypto.randomUUID()}`:`${e}-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}function G1t(e,n){return n?[]:e}function BG(e){if(!(e instanceof Error)||e.name==="AbortError")return!1;const n=e.message.toLowerCase();return n.includes("network error")||n.includes("failed to fetch")||n.includes("fetch failed")||n.includes("load failed")||n.includes("network connection was lost")||n.includes("the internet connection appears to be offline")}function zG(e){return!e.sessionId||e.isLoadingHistory?!1:e.isLoading||e.messageCount===0||e.error===OR}function FG(e){return e.hit_max_rounds===!0}function K1t(e,n,r){if(typeof r.seq!="number"||!Number.isFinite(r.seq))return!0;const i=e.get(n)??0;return r.seq<=i?!1:(e.set(n,r.seq),!0)}function Y1t(e){return!(!e.sessionId||e.hasActiveDirectStream&&e.directStreamSessionId===e.sessionId||e.hasActiveResumeStream&&e.activeResumeSessionId===e.sessionId)}function $b(e){if(!(e!=null&&e.length))return;const n=e.flatMap(r=>r.type==="image"||r.type==="attachment"?[{name:r.name,mimeType:r.mimeType,data:r.data,...r.type==="image"?{preview:`data:${r.mimeType};base64,${r.data}`}:{}}]:[]);return n.length>0?n:void 0}function X1t(e,n){const r=[],i=new Set;for(const s of[...e??[],...n??[]]){const a=`${s.name}:${s.mimeType}:${s.data}`;i.has(a)||(i.add(a),r.push(s))}return r.length>0?r:void 0}function HG(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0}function WG(e){var n,r;return((n=e.attachments)==null?void 0:n.some(i=>i.mimeType.toLowerCase().startsWith("image/")))||((r=e.displaySegments)==null?void 0:r.some(i=>i.type==="image"))||!1}function J1t(e,n={}){return e===413?n.provider==="codex"&&WG(n)?"Codex cannot use image uploads in Jait yet, and this image is too large for the gateway to accept. Remove the image or reference it as a project file path instead.":WG(n)?"That image is too large for this chat request. Use a smaller image or reference it as a project file path instead.":"That chat request is too large for the gateway. Remove large attachments or reference files from the project instead.":`HTTP ${e}`}function Z1t(e,n,r,i){const[s,a]=y.useState({messages:[],isLoading:!1,isLoadingHistory:!1,promptCount:0,remainingPrompts:null,error:null,hitMaxRounds:!1,hasMore:!1,totalMessages:0}),[o,l]=y.useState(null),[u,d]=y.useState([]),[h,f]=y.useState([]),[m,x]=y.useState([]),[v,_]=y.useState(0),[w,S]=y.useState(null),[C,j]=y.useState(null),T=y.useCallback(()=>{d(Je=>Je.some(Ze=>Ze.status!=="completed")?[]:Je)},[]),E=y.useRef(null),N=y.useRef(null),R=y.useRef(null),D=y.useRef(null),U=y.useRef(null),H=y.useRef(0),I=y.useRef(new Map),W=y.useRef(0),$=y.useRef(!1),O=y.useRef(!1),[B,M]=y.useState(0),L=y.useCallback(()=>{Y1t({sessionId:e,activeResumeSessionId:D.current,hasActiveResumeStream:!!R.current,directStreamSessionId:U.current,hasActiveDirectStream:!!E.current})&&(O.current=!0,N.current=null,M(Je=>Je+1))},[e]);y.useEffect(()=>{if(e===N.current)return;const Je=O.current;if(O.current=!1,W.current+=1,N.current=e,R.current&&(R.current.abort(),R.current=null,D.current=null),!e){a({messages:[],isLoading:!1,isLoadingHistory:!1,promptCount:0,remainingPrompts:null,hitMaxRounds:!1,error:null,hasMore:!1,totalMessages:0}),d([]),f([]),x([]),S(null);return}d([]);let Ze=!1;a(xt=>({...xt,messages:Je?xt.messages:[],isLoading:!1,isLoadingHistory:!0,error:null})),Je||f([]),S(null);const ve=new AbortController;R.current=ve,D.current=e;const we=++H.current,De=()=>!Ze&&H.current===we;return(async()=>{var xt,dt;try{const ft=await fetch(`${gc}/api/sessions/${e}/stream?limit=${V1t}`,{signal:ve.signal,headers:Lb(n)});if(ft.status===401){r==null||r(),a(Qe=>({...Qe,isLoadingHistory:!1}));return}if(!ft.ok||!De())return;const Dt=(xt=ft.body)==null?void 0:xt.getReader();if(!Dt)return;const Wt=new TextDecoder;let Ye="",We=null,mt=null,at=null;const Ue=()=>{if(at!==null&&(window.cancelAnimationFrame(at),at=null),!De()||!mt||!We)return;const Qe=mt,Tt=We;mt=null,a(Et=>({...Et,messages:Et.messages.map(jt=>jt.id===Tt?{...jt,...Qe}:jt)}))},Ne=Qe=>{mt={...mt,...Qe},at===null&&(at=window.requestAnimationFrame(()=>{at=null,Ue()}))};let Ce="",Be,rt="";const pt=new Set;for(;;){const{done:Qe,value:Tt}=await Dt.read();if(Qe)break;if(!De()){Dt.cancel();break}Ye+=Wt.decode(Tt,{stream:!0});const Et=Ye.split(`
|
|
1482
1482
|
`);Ye=Et.pop()||"";for(const jt of Et)if(jt.startsWith("data: "))try{const tt=JSON.parse(jt.slice(6));if(!De())break;if(tt.type!=="snapshot"&&!K1t(I.current,e,tt))continue;if(G6(String(tt.type??"unknown"),jt.slice(6)),tt.type==="snapshot"){const ot=tt.messages,Mt=tt.streaming;if(typeof tt.seq=="number"&&Number.isFinite(tt.seq)){const St=I.current.get(e)??0;tt.seq>St&&I.current.set(e,tt.seq)}const Ut=ot.map(St=>{const Qt=typeof St.content=="string"?St.content:Array.isArray(St.content)?St.content.filter(Bt=>Bt.type==="text").map(Bt=>Bt.text??"").join(""):String(St.content??""),Ht={id:St.id,role:St.role,content:Qt,thinking:St.thinking};if(St.hasContextFlow&&(Ht.hasContextFlow=!0),St.hasMemoryProvenance&&(Ht.hasMemoryProvenance=!0),St.role==="user"&&Array.isArray(St.segments)&&St.segments.length>0)Ht.displaySegments=Tj(St.segments),Ht.displayContent=R0(Ht.displaySegments),Ht.referencedFiles=M0(Ht.displaySegments),Ht.attachments=$b(Ht.displaySegments);else if(St.role==="user"){const Bt=j7(St.content);Bt.files.length>0&&(Ht.displayContent=Bt.text,Ht.referencedFiles=Bt.files,Ht.displaySegments=Bt.displaySegments,Ht.attachments=$b(Ht.displaySegments))}else Array.isArray(St.segments)&&St.segments.length>0&&(Ht.segments=DG(St.segments));return St.toolCalls&&St.toolCalls.length>0&&(Ht.toolCalls=St.toolCalls.map(Bt=>{let gn=Bt.status??(Bt.ok?"success":"error");(gn==="running"||gn==="pending")&&!Mt&&(gn="error");const Vn=HG(Bt.completedAt),Hn=HG(Bt.startedAt)??Vn??Date.now(),yn=gn==="running"||gn==="pending"?void 0:Vn!=null&&Vn>=Hn?Vn:Hn;return{callId:Bt.callId,approvalRequestId:Bt.approvalRequestId,approvalState:Bt.approvalState,tool:Bt.tool,args:Bt.args??{},status:gn,result:gn==="running"||gn==="pending"?void 0:{ok:!!Bt.ok,message:Bt.message??"Cancelled",data:Bt.data??(Bt.output!=null?{output:Bt.output}:void 0)},streamingOutput:Bt.streamingOutput,startedAt:Hn,completedAt:yn}})),Ht}),Re=Ut[Ut.length-1];if((Re==null?void 0:Re.role)==="assistant"){We=Re.id,Ce=Re.content,Be=Re.segments,rt=Re.thinking??"",pt.clear();for(const St of U1t(Be))pt.add(St)}a(St=>({...St,messages:F1t(Ut,St.messages),isLoadingHistory:!1,isLoading:Mt,error:null,hasMore:!!tt.hasMore,totalMessages:typeof tt.total=="number"?tt.total:St.totalMessages}))}else if(tt.type==="token"&&We){const ot=tt.content;Ce+=ot,Be=H1t(Be,ot),Ne({content:Ce,segments:Be?[...Be]:void 0})}else if(tt.type==="thinking"&&We){const ot=tt.content;rt+=ot,Be=W1t(Be,ot),Ne({thinking:rt,segments:Be?[...Be]:void 0})}else if(tt.type==="tool_call_delta"&&We){Ue();const ot=tt.call_id,Mt=tt.name_delta||"",Ut=tt.args_delta||"";!pt.has(ot)&&(pt.add(ot),Be=H8(Be,ot));const St=Be?[...Be]:void 0;a(Qt=>({...Qt,messages:Qt.messages.map(Ht=>{var Vn,Hn;if(Ht.id!==We)return Ht;if((Vn=Ht.toolCalls)==null?void 0:Vn.find(yn=>yn.callId===ot))return{...Ht,toolCalls:(Hn=Ht.toolCalls)==null?void 0:Hn.map(yn=>yn.callId===ot?{...yn,tool:yn.tool+Mt,streamingArgs:(yn.streamingArgs??"")+Ut}:yn)};const gn={callId:ot,parentCallId:tt.parent_call_id,tool:Mt,args:{},status:"pending",streamingArgs:Ut,startedAt:Date.now()};return{...Ht,toolCalls:[...Ht.toolCalls??[],gn],segments:St??Ht.segments}})}))}else if(tt.type==="tool_start"&&We){Ue();const ot=tt.call_id;!pt.has(ot)&&(pt.add(ot),Be=H8(Be,ot));const Ut=Be?[...Be]:void 0;a(Re=>({...Re,messages:Re.messages.map(St=>{var Bt,gn;if(St.id!==We)return St;if((Bt=St.toolCalls)==null?void 0:Bt.find(Vn=>Vn.callId===ot))return{...St,toolCalls:(gn=St.toolCalls)==null?void 0:gn.map(Vn=>Vn.callId===ot?{...Vn,tool:tt.tool,args:tt.args??{},parentCallId:tt.parent_call_id,status:"running",streamingArgs:void 0}:Vn)};const Ht={callId:ot,parentCallId:tt.parent_call_id,tool:tt.tool,args:tt.args??{},status:"running",startedAt:Date.now()};return{...St,toolCalls:[...St.toolCalls??[],Ht],segments:Ut??St.segments}})}))}else if(tt.type==="approval_required"&&We){Ue();const ot=tt.request_id,Mt=tt.call_id||`approval-${ot}`,Ut=tt.tool||"approval";!pt.has(Mt)&&(pt.add(Mt),Be=H8(Be,Mt));const St=Be?[...Be]:void 0;a(Qt=>({...Qt,messages:Qt.messages.map(Ht=>{var gn;if(Ht.id!==We||(gn=Ht.toolCalls)!=null&&gn.some(Vn=>Vn.callId===Mt))return Ht;const Bt={callId:Mt,approvalRequestId:ot,approvalState:"pending",tool:Ut,args:tt.args??{},status:"pending",startedAt:Date.now()};return{...Ht,toolCalls:[...Ht.toolCalls??[],Bt],segments:St??Ht.segments}})}))}else if(tt.type==="tool_output"&&We)a(ot=>({...ot,messages:ot.messages.map(Mt=>{var Ut;return Mt.id!==We?Mt:{...Mt,toolCalls:(Ut=Mt.toolCalls)==null?void 0:Ut.map(Re=>Re.callId===tt.call_id?{...Re,streamingOutput:(Re.streamingOutput??"")+tt.content}:Re)}})}));else if(tt.type==="tool_result"&&We){if(a(ot=>({...ot,messages:ot.messages.map(Mt=>{var Ut;return Mt.id!==We?Mt:{...Mt,toolCalls:(Ut=Mt.toolCalls)==null?void 0:Ut.map(Re=>Re.callId===tt.call_id?{...Re,parentCallId:Re.parentCallId??tt.parent_call_id,status:tt.ok?"success":"error",result:{ok:tt.ok,message:tt.message,data:tt.data},completedAt:Date.now()}:Re)}})})),tt.ok){const ot=s.messages.find(Ut=>Ut.id===We),Mt=(dt=ot==null?void 0:ot.toolCalls)==null?void 0:dt.find(Ut=>Ut.callId===tt.call_id);if(Mt){const Ut=Mt.tool.replace("_",".");if(Ut==="file.write"||Ut==="file.patch"||Ut==="edit"){const Re=tt.data&&typeof tt.data=="object"?tt.data:void 0,St=H2(Ut,Mt.args??{},Re,tt.message)??"";if(St){const Qt=St.split("/").pop()??St;f(Ht=>Ht.some(Bt=>Bt.path===St)?Ht:[...Ht,{path:St,name:Qt,state:"undecided"}])}}}}}else if(tt.type==="todo_list"){const ot=tt.items;d(ot)}else if(tt.type==="context_usage")S(tt);else if(tt.type==="context_flow"&&We){const ot=ER(tt);a(Mt=>({...Mt,messages:Mt.messages.map(Ut=>Ut.id===We?{...Ut,contextFlow:ot}:Ut)}))}else if(tt.type==="provider_fallback")j({provider:"jait",projectPath:"",isRemote:!1});else if(tt.type==="session_info")j({provider:tt.provider,projectPath:tt.projectPath,isRemote:tt.isRemote,remoteNode:tt.remoteNode});else if(tt.type==="file_changed"){const ot=tt.path,Mt=tt.name;f(Ut=>Ut.find(St=>St.path===ot)?Ut:[...Ut,{path:ot,name:Mt,state:"undecided"}])}else if(tt.type==="done")Ue(),a(ot=>(ot.isLoading&&(_(Mt=>Mt+1),T()),{...ot,isLoading:!1,promptCount:tt.prompt_count??ot.promptCount,remainingPrompts:tt.remaining_prompts??ot.remainingPrompts,hitMaxRounds:FG(tt),messages:ot.messages.map(Mt=>{var Ut;return(Ut=Mt.toolCalls)!=null&&Ut.some(Re=>Re.status==="running")?{...Mt,toolCalls:Mt.toolCalls.map(Re=>Re.status==="running"?{...Re,status:"error",result:{ok:!1,message:"Cancelled"},completedAt:Date.now()}:Re)}:Mt})}));else if(tt.type==="error"){const ot=tt.message;a(Mt=>({...Mt,isLoading:!1,error:ot,messages:[...Mt.messages,{id:crypto.randomUUID(),role:"assistant",content:ot,segments:[{type:"error",content:ot}]}]}))}}catch(tt){if(!(tt instanceof SyntaxError))throw tt}}Ue()}catch(ft){if(ft instanceof Error&&ft.name==="AbortError")return;Ze||a(Dt=>({...Dt,isLoadingHistory:!1,error:Je&&BG(ft)?OR:Dt.error}))}finally{R.current===ve&&(R.current=null),D.current===e&&(D.current=null)}})(),()=>{Ze=!0,ve.abort(),R.current===ve&&(R.current=null),D.current===e&&(D.current=null),N.current=null}},[n,T,r,e,B]);const z=y.useCallback(()=>{!e||s.isLoading||L()},[L,e,s.isLoading]),G=y.useRef(!1),V=y.useCallback(async()=>{if(!(!e||!s.hasMore||G.current)){G.current=!0;try{const Je=s.totalMessages-s.messages.length;if(Je<=0){a(De=>({...De,hasMore:!1}));return}const Ze=await fetch(`${gc}/api/sessions/${e}/messages?limit=${q1t}&before=${Je}`,{headers:Lb(n)});if(!Ze.ok)return;const ve=await Ze.json(),we=ve.messages.map(De=>{const xt=typeof De.content=="string"?De.content:String(De.content??""),dt={id:De.id,role:De.role,content:xt,thinking:De.thinking};if(De.hasContextFlow&&(dt.hasContextFlow=!0),De.hasMemoryProvenance&&(dt.hasMemoryProvenance=!0),De.role==="user"&&Array.isArray(De.segments)&&De.segments.length>0)dt.displaySegments=Tj(De.segments),dt.displayContent=R0(dt.displaySegments),dt.referencedFiles=M0(dt.displaySegments),dt.attachments=$b(dt.displaySegments);else if(De.role==="user"){const ft=j7(De.content);ft.files.length>0&&(dt.displayContent=ft.text,dt.referencedFiles=ft.files,dt.displaySegments=ft.displaySegments,dt.attachments=$b(dt.displaySegments))}else Array.isArray(De.segments)&&De.segments.length>0&&(dt.segments=DG(De.segments));return De.toolCalls&&De.toolCalls.length>0&&(dt.toolCalls=De.toolCalls.map(ft=>({callId:ft.callId,approvalRequestId:ft.approvalRequestId,approvalState:ft.approvalState,tool:ft.tool,args:ft.args??{},status:ft.status??(ft.ok?"success":"error"),result:{ok:!!ft.ok,message:ft.message??"",data:ft.data??(ft.output!=null?{output:ft.output}:void 0)},startedAt:ft.startedAt??0,completedAt:ft.completedAt??0}))),dt});a(De=>({...De,messages:[...we,...De.messages],hasMore:ve.hasMore,totalMessages:ve.total}))}finally{G.current=!1}}},[n,e,s.hasMore,s.messages.length,s.totalMessages]),F=y.useCallback(async(Je,Ze={})=>{var pt,Qe,Tt,Et;const{token:ve,sessionId:we,onLoginRequired:De}=Ze,xt=ve??n,dt=De??r,ft=we??e,Dt=X1t(Ze.attachments,$b(Ze.displaySegments)),Wt=IG("assistant");ft&&N.current!==ft&&(N.current=ft);const Ye={id:IG("user"),role:"user",content:Je,optimistic:!0,...Ze.displayContent?{displayContent:Ze.displayContent}:{},...(pt=Ze.referencedFiles)!=null&&pt.length?{referencedFiles:Ze.referencedFiles}:{},...(Qe=Ze.displaySegments)!=null&&Qe.length?{displaySegments:Ze.displaySegments}:{},...Dt!=null&&Dt.length?{attachments:Dt}:{}};a(jt=>({...jt,messages:[...jt.messages,Ye,{id:Wt,role:"assistant",content:""}],isLoading:!0,error:null,hitMaxRounds:!1})),d([]);const We=new AbortController;E.current=We,U.current=ft,R.current&&(R.current.abort(),R.current=null);const mt=++W.current,at=()=>N.current!==ft||W.current!==mt;let Ue=null,Ne=null,Ce=null,Be=0;const rt=50;try{const jt={"Content-Type":"application/json"};xt&&(jt.Authorization=`Bearer ${xt}`);const tt={content:Je,sessionId:ft,...Ze.mode&&Ze.mode!=="agent"?{mode:Ze.mode}:{},...Ze.provider&&Ze.provider!=="jait"?{provider:Ze.provider}:{},...Ze.provider&&Ze.provider!=="jait"&&Ze.runtimeMode?{runtimeMode:Ze.runtimeMode}:{},...Ze.responseStyle&&Ze.responseStyle!=="normal"?{responseStyle:Ze.responseStyle}:{},...Ze.model?{model:Ze.model}:{},...(Tt=Ze.displaySegments)!=null&&Tt.length?{displaySegments:Ze.displaySegments}:{},...Dt!=null&&Dt.length?{attachments:Dt.map(Ie=>({name:Ie.name,mimeType:Ie.mimeType,data:Ie.data}))}:{}};G6("request",JSON.stringify(tt));const ot=await fetch(`${gc}/api/chat`,{method:"POST",headers:jt,body:JSON.stringify(tt),signal:We.signal});if(ot.status===401){const Ie=await ot.json();if(Ie.detail==="login_required"||Ie.detail==="limit_reached")return a(He=>({...He,isLoading:!1,error:Ie.detail,messages:He.messages.filter(ct=>Ze.queued?ct.id!==Wt&&ct.id!==Ye.id:!(ct.id===Wt&&!ct.content&&!ct.thinking&&(!ct.toolCalls||ct.toolCalls.length===0)))})),Ie.detail==="login_required"&&(dt==null||dt()),"retry"}if(!ot.ok)throw new Error(J1t(ot.status,{provider:Ze.provider,attachments:Dt,displaySegments:Ze.displaySegments}));const Mt=(Et=ot.body)==null?void 0:Et.getReader();if(!Mt)throw new Error("No response body");const Ut=new TextDecoder;let Re="",St="",Qt=null,Ht;const Bt=[],gn=[];let Vn="",Hn=!1;const yn=Ie=>{const He=gn[gn.length-1];(He==null?void 0:He.type)==="text"?He.content+=Ie:gn.push({type:"text",content:Ie})},di=Ie=>{const He=gn[gn.length-1];(He==null?void 0:He.type)==="toolGroup"?He.callIds.includes(Ie)||He.callIds.push(Ie):gn.push({type:"toolGroup",callIds:[Ie]})},Oe=()=>{if(Ne!==null&&(window.cancelAnimationFrame(Ne),Ne=null),Ce!==null&&(clearTimeout(Ce),Ce=null),at()||!Ue)return;const Ie=Ue;Ue=null,Be=Date.now(),a(He=>({...He,messages:He.messages.map(ct=>ct.id===Wt?{...ct,...Ie}:ct)}))},ye=(Ie,He)=>{if(at())return;if(Ue={...Ue,...Ie},He!=null&&He.immediate){Oe();return}const ct=Date.now(),he=Math.max(0,rt-(ct-Be));if(he>0){if(Ce!==null)return;Ce=setTimeout(()=>{Ce=null,Oe()},he);return}Ne===null&&(Ne=window.requestAnimationFrame(()=>{Ne=null,Oe()}))};for(;;){const{done:Ie,value:He}=await Mt.read();if(Ie)break;Vn+=Ut.decode(He,{stream:!0});const ct=Vn.split(`
|
|
1483
1483
|
`);Vn=ct.pop()||"";for(const he of ct)if(he.startsWith("data: "))try{const Ae=JSON.parse(he.slice(6));if(G6(String(Ae.type??"unknown"),he.slice(6)),Ae.type==="thinking"){Qt||(Qt=Date.now()),St+=Ae.content;const pe=gn[gn.length-1];(pe==null?void 0:pe.type)==="thinking"?pe.content+=Ae.content:gn.push({type:"thinking",content:Ae.content}),ye({thinking:St,segments:[...gn]})}else if(Ae.type==="token")Qt&&!Ht&&(Ht=Math.round((Date.now()-Qt)/1e3)),Re+=Ae.content,yn(Ae.content),ye({content:Re,thinkingDuration:Ht,segments:[...gn]});else if(Ae.type==="tool_call_delta"){const pe=Ae.call_id,Ve=Ae.name_delta||"",At=Ae.args_delta||"",It=Bt.findIndex(Xn=>Xn.callId===pe);It!==-1?Bt[It]={...Bt[It],tool:Bt[It].tool+Ve,streamingArgs:(Bt[It].streamingArgs??"")+At}:(Bt.push({callId:pe,parentCallId:Ae.parent_call_id,tool:Ve,args:{},status:"pending",streamingArgs:At,startedAt:Date.now()}),di(pe)),ye({toolCalls:[...Bt],segments:[...gn]},{immediate:!0})}else if(Ae.type==="tool_start"){const pe=Ae.call_id,Ve=Bt.findIndex(At=>At.callId===pe);Ve!==-1?Bt[Ve]={...Bt[Ve],tool:Ae.tool,args:Ae.args??{},parentCallId:Ae.parent_call_id,status:"running",streamingArgs:void 0}:(Bt.push({callId:pe,parentCallId:Ae.parent_call_id,tool:Ae.tool,args:Ae.args??{},status:"running",startedAt:Date.now()}),di(pe)),ye({toolCalls:[...Bt],segments:[...gn]},{immediate:!0})}else if(Ae.type==="approval_required"){const pe=Ae.request_id,Ve=Ae.call_id||`approval-${pe}`;Bt.some(At=>At.callId===Ve)||(Bt.push({callId:Ve,approvalRequestId:pe,approvalState:"pending",tool:Ae.tool||"approval",args:Ae.args??{},status:"pending",startedAt:Date.now()}),di(Ve),ye({toolCalls:[...Bt],segments:[...gn]},{immediate:!0}))}else if(Ae.type==="tool_output"){const pe=Bt.findIndex(Ve=>Ve.callId===Ae.call_id);pe!==-1&&(Bt[pe]={...Bt[pe],streamingOutput:(Bt[pe].streamingOutput??"")+Ae.content},ye({toolCalls:[...Bt]}))}else if(Ae.type==="tool_result"){const pe=Bt.findIndex(Ve=>Ve.callId===Ae.call_id);if(pe!==-1&&(Bt[pe]={...Bt[pe],parentCallId:Bt[pe].parentCallId??Ae.parent_call_id,status:Ae.ok?"success":"error",result:{ok:Ae.ok,message:Ae.message,data:Ae.data},completedAt:Date.now()},ye({toolCalls:[...Bt]},{immediate:!0}),Ae.ok)){const Ve=Bt[pe],At=Ve.tool.replace("_",".");if(At==="file.write"||At==="file.patch"||At==="edit"){const It=Ae.data&&typeof Ae.data=="object"?Ae.data:void 0,Xn=H2(At,Ve.args??{},It,Ae.message)??"";if(Xn&&!at()){const Wr=Xn.split("/").pop()??Xn;f(Dn=>Dn.some(Ar=>Ar.path===Xn)?Dn:[...Dn,{path:Xn,name:Wr,state:"undecided"}])}}}}else if(Ae.type==="plan_complete"){const pe={plan_id:Ae.plan_id,summary:Ae.summary,actions:Ae.actions??[]};l(pe)}else if(Ae.type==="mode_notice"){const pe=`
|
|
1484
1484
|
|