cc-viewer 1.6.49 → 1.6.50

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.
@@ -0,0 +1,39 @@
1
+ var ks=Object.defineProperty;var ws=(n,s,t)=>s in n?ks(n,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[s]=t;var O=(n,s,t)=>ws(n,typeof s!="symbol"?s+"":s,t);import{r as y,R as U,j as e,a as Ts}from"./index-CufJzNhf.js";import{J as Es,L as Ms,_ as le,c as ne,M as nt,N as Rs,P as lt,d as ft,Q as ge,U as xt,V as Ze,W as vt,X as Is,Y as ut,Z as Ls,$ as jt,a0 as As,g as Os,m as Bs,u as Ae,a1 as Ps,a2 as Ds,a3 as Hs,a4 as Fs,a5 as $s,a6 as zs,a7 as Vs,a8 as yt,C as mt,I as xe,a9 as Us,aa as $t,ab as qs,ac as zt,ad as Ws,ae as Ks,af as Gs,e as de,t as p,p as Fe,q as Js,v as be,f as Qs,h as Ys,j as Xs,s as h,o as q,n as je,ag as Vt,ah as Pe,ai as Q,aj as Ut,ak as Be,k as Zs,l as $e,al as ea,am as Ce,S as qt,B as W,an as ta,ao as sa,ap as De,aq as aa,ar as fe,as as bt,at as Ct,x as na,H as la,au as Wt,G as Oe,av as et,D as Kt,aw as oa,E as ot,ax as ia,ay as we,az as _t,aA as ra,aB as Nt,aC as Gt,aD as Jt,aE as Te,aF as Ee,aG as Qt,aH as tt,aI as St,aJ as kt,aK as wt,aL as ca,aM as da,A as ha,aN as ze,aO as Tt,aP as ua,y as ma,w as M,z as pa,aQ as ga,O as fa}from"./AppHeader.module-FqEQQoEK.js";var Et=y.createContext(null),Yt=y.createContext({}),xa=["prefixCls","className","containerRef"],va=function(s){var t=s.prefixCls,a=s.className,c=s.containerRef,l=Es(s,xa),m=y.useContext(Yt),f=m.panel,o=Ms(f,c);return y.createElement("div",le({className:ne("".concat(t,"-content"),a),role:"dialog",ref:o},nt(s,{aria:!0}),{"aria-modal":"true"},l))};function Mt(n){return typeof n=="string"&&String(Number(n))===n?(Rs(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(n)):n}var Rt={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function ja(n,s){var t,a,c,l=n.prefixCls,m=n.open,f=n.placement,o=n.inline,d=n.push,i=n.forceRender,r=n.autoFocus,u=n.keyboard,j=n.classNames,x=n.rootClassName,g=n.rootStyle,v=n.zIndex,b=n.className,S=n.id,_=n.style,C=n.motion,T=n.width,R=n.height,B=n.children,L=n.mask,E=n.maskClosable,I=n.maskMotion,P=n.maskClassName,ee=n.maskStyle,te=n.afterOpenChange,F=n.onClose,K=n.onMouseEnter,he=n.onMouseOver,w=n.onMouseLeave,V=n.onClick,oe=n.onKeyDown,ue=n.onKeyUp,G=n.styles,me=n.drawerRender,ie=y.useRef(),pe=y.useRef(),ve=y.useRef();y.useImperativeHandle(s,function(){return ie.current});var se=function(re){var Re=re.keyCode,Ie=re.shiftKey;switch(Re){case Ze.TAB:{if(Re===Ze.TAB){if(!Ie&&document.activeElement===ve.current){var Le;(Le=pe.current)===null||Le===void 0||Le.focus({preventScroll:!0})}else if(Ie&&document.activeElement===pe.current){var Xe;(Xe=ve.current)===null||Xe===void 0||Xe.focus({preventScroll:!0})}}break}case Ze.ESC:{F&&u&&(re.stopPropagation(),F(re));break}}};y.useEffect(function(){if(m&&r){var Z;(Z=ie.current)===null||Z===void 0||Z.focus({preventScroll:!0})}},[m]);var Y=y.useState(!1),D=lt(Y,2),X=D[0],ae=D[1],$=y.useContext(Et),Ne;typeof d=="boolean"?Ne=d?{}:{distance:0}:Ne=d||{};var ye=(t=(a=(c=Ne)===null||c===void 0?void 0:c.distance)!==null&&a!==void 0?a:$==null?void 0:$.pushDistance)!==null&&t!==void 0?t:180,bs=y.useMemo(function(){return{pushDistance:ye,push:function(){ae(!0)},pull:function(){ae(!1)}}},[ye]);y.useEffect(function(){if(m){var Z;$==null||(Z=$.push)===null||Z===void 0||Z.call($)}else{var re;$==null||(re=$.pull)===null||re===void 0||re.call($)}},[m]),y.useEffect(function(){return function(){var Z;$==null||(Z=$.pull)===null||Z===void 0||Z.call($)}},[]);var Cs=y.createElement(ft,le({key:"mask"},I,{visible:L&&m}),function(Z,re){var Re=Z.className,Ie=Z.style;return y.createElement("div",{className:ne("".concat(l,"-mask"),Re,j==null?void 0:j.mask,P),style:ge(ge(ge({},Ie),ee),G==null?void 0:G.mask),onClick:E&&m?F:void 0,ref:re})}),_s=typeof C=="function"?C(f):C,Se={};if(X&&ye)switch(f){case"top":Se.transform="translateY(".concat(ye,"px)");break;case"bottom":Se.transform="translateY(".concat(-ye,"px)");break;case"left":Se.transform="translateX(".concat(ye,"px)");break;default:Se.transform="translateX(".concat(-ye,"px)");break}f==="left"||f==="right"?Se.width=Mt(T):Se.height=Mt(R);var Ns={onMouseEnter:K,onMouseOver:he,onMouseLeave:w,onClick:V,onKeyDown:oe,onKeyUp:ue},Ss=y.createElement(ft,le({key:"panel"},_s,{visible:m,forceRender:i,onVisibleChanged:function(re){te==null||te(re)},removeOnLeave:!1,leavedClassName:"".concat(l,"-content-wrapper-hidden")}),function(Z,re){var Re=Z.className,Ie=Z.style,Le=y.createElement(va,le({id:S,containerRef:re,prefixCls:l,className:ne(b,j==null?void 0:j.content),style:ge(ge({},_),G==null?void 0:G.content)},nt(n,{aria:!0}),Ns),B);return y.createElement("div",le({className:ne("".concat(l,"-content-wrapper"),j==null?void 0:j.wrapper,Re),style:ge(ge(ge({},Se),Ie),G==null?void 0:G.wrapper)},nt(n,{data:!0})),me?me(Le):Le)}),gt=ge({},g);return v&&(gt.zIndex=v),y.createElement(Et.Provider,{value:bs},y.createElement("div",{className:ne(l,"".concat(l,"-").concat(f),x,xt(xt({},"".concat(l,"-open"),m),"".concat(l,"-inline"),o)),style:gt,tabIndex:-1,ref:ie,onKeyDown:se},Cs,y.createElement("div",{tabIndex:0,ref:pe,style:Rt,"aria-hidden":"true","data-sentinel":"start"}),Ss,y.createElement("div",{tabIndex:0,ref:ve,style:Rt,"aria-hidden":"true","data-sentinel":"end"})))}var ya=y.forwardRef(ja),ba=function(s){var t=s.open,a=t===void 0?!1:t,c=s.prefixCls,l=c===void 0?"rc-drawer":c,m=s.placement,f=m===void 0?"right":m,o=s.autoFocus,d=o===void 0?!0:o,i=s.keyboard,r=i===void 0?!0:i,u=s.width,j=u===void 0?378:u,x=s.mask,g=x===void 0?!0:x,v=s.maskClosable,b=v===void 0?!0:v,S=s.getContainer,_=s.forceRender,C=s.afterOpenChange,T=s.destroyOnClose,R=s.onMouseEnter,B=s.onMouseOver,L=s.onMouseLeave,E=s.onClick,I=s.onKeyDown,P=s.onKeyUp,ee=s.panelRef,te=y.useState(!1),F=lt(te,2),K=F[0],he=F[1],w=y.useState(!1),V=lt(w,2),oe=V[0],ue=V[1];vt(function(){ue(!0)},[]);var G=oe?a:!1,me=y.useRef(),ie=y.useRef();vt(function(){G&&(ie.current=document.activeElement)},[G]);var pe=function(X){var ae;if(he(X),C==null||C(X),!X&&ie.current&&!((ae=me.current)!==null&&ae!==void 0&&ae.contains(ie.current))){var $;($=ie.current)===null||$===void 0||$.focus({preventScroll:!0})}},ve=y.useMemo(function(){return{panel:ee}},[ee]);if(!_&&!K&&!G&&T)return null;var se={onMouseEnter:R,onMouseOver:B,onMouseLeave:L,onClick:E,onKeyDown:I,onKeyUp:P},Y=ge(ge({},s),{},{open:G,prefixCls:l,placement:f,autoFocus:d,keyboard:r,width:j,mask:g,maskClosable:b,inline:S===!1,afterOpenChange:pe,ref:me},se);return y.createElement(Yt.Provider,{value:ve},y.createElement(Is,{open:G||_||K,autoDestroy:!1,getContainer:S,autoLock:g&&(G||K)},y.createElement(ya,Y)))};const Xt=n=>{var s,t;const{prefixCls:a,ariaId:c,title:l,footer:m,extra:f,closable:o,loading:d,onClose:i,headerStyle:r,bodyStyle:u,footerStyle:j,children:x,classNames:g,styles:v}=n,b=ut("drawer");let S;o===!1?S=void 0:o===void 0||o===!0?S="start":S=(o==null?void 0:o.placement)==="end"?"end":"start";const _=y.useCallback(L=>y.createElement("button",{type:"button",onClick:i,className:ne(`${a}-close`,{[`${a}-close-${S}`]:S==="end"})},L),[i,a,S]),[C,T]=Ls(jt(n),jt(b),{closable:!0,closeIconRender:_}),R=()=>{var L,E;return!l&&!C?null:y.createElement("div",{style:Object.assign(Object.assign(Object.assign({},(L=b.styles)===null||L===void 0?void 0:L.header),r),v==null?void 0:v.header),className:ne(`${a}-header`,{[`${a}-header-close-only`]:C&&!l&&!f},(E=b.classNames)===null||E===void 0?void 0:E.header,g==null?void 0:g.header)},y.createElement("div",{className:`${a}-header-title`},S==="start"&&T,l&&y.createElement("div",{className:`${a}-title`,id:c},l)),f&&y.createElement("div",{className:`${a}-extra`},f),S==="end"&&T)},B=()=>{var L,E;if(!m)return null;const I=`${a}-footer`;return y.createElement("div",{className:ne(I,(L=b.classNames)===null||L===void 0?void 0:L.footer,g==null?void 0:g.footer),style:Object.assign(Object.assign(Object.assign({},(E=b.styles)===null||E===void 0?void 0:E.footer),j),v==null?void 0:v.footer)},m)};return y.createElement(y.Fragment,null,R(),y.createElement("div",{className:ne(`${a}-body`,g==null?void 0:g.body,(s=b.classNames)===null||s===void 0?void 0:s.body),style:Object.assign(Object.assign(Object.assign({},(t=b.styles)===null||t===void 0?void 0:t.body),u),v==null?void 0:v.body)},d?y.createElement(As,{active:!0,title:!1,paragraph:{rows:5},className:`${a}-body-skeleton`}):x),B())},Ca=n=>{const s="100%";return{left:`translateX(-${s})`,right:`translateX(${s})`,top:`translateY(-${s})`,bottom:`translateY(${s})`}[n]},Zt=(n,s)=>({"&-enter, &-appear":Object.assign(Object.assign({},n),{"&-active":s}),"&-leave":Object.assign(Object.assign({},s),{"&-active":n})}),es=(n,s)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${s}`}}},Zt({opacity:n},{opacity:1})),_a=(n,s)=>[es(.7,s),Zt({transform:Ca(n)},{transform:"none"})],Na=n=>{const{componentCls:s,motionDurationSlow:t}=n;return{[s]:{[`${s}-mask-motion`]:es(0,t),[`${s}-panel-motion`]:["left","right","top","bottom"].reduce((a,c)=>Object.assign(Object.assign({},a),{[`&-${c}`]:_a(c,t)}),{})}}},Sa=n=>{const{borderRadiusSM:s,componentCls:t,zIndexPopup:a,colorBgMask:c,colorBgElevated:l,motionDurationSlow:m,motionDurationMid:f,paddingXS:o,padding:d,paddingLG:i,fontSizeLG:r,lineHeightLG:u,lineWidth:j,lineType:x,colorSplit:g,marginXS:v,colorIcon:b,colorIconHover:S,colorBgTextHover:_,colorBgTextActive:C,colorText:T,fontWeightStrong:R,footerPaddingBlock:B,footerPaddingInline:L,calc:E}=n,I=`${t}-content-wrapper`;return{[t]:{position:"fixed",inset:0,zIndex:a,pointerEvents:"none",color:T,"&-pure":{position:"relative",background:l,display:"flex",flexDirection:"column",[`&${t}-left`]:{boxShadow:n.boxShadowDrawerLeft},[`&${t}-right`]:{boxShadow:n.boxShadowDrawerRight},[`&${t}-top`]:{boxShadow:n.boxShadowDrawerUp},[`&${t}-bottom`]:{boxShadow:n.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${t}-mask`]:{position:"absolute",inset:0,zIndex:a,background:c,pointerEvents:"auto"},[I]:{position:"absolute",zIndex:a,maxWidth:"100vw",transition:`all ${m}`,"&-hidden":{display:"none"}},[`&-left > ${I}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:n.boxShadowDrawerLeft},[`&-right > ${I}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:n.boxShadowDrawerRight},[`&-top > ${I}`]:{top:0,insetInline:0,boxShadow:n.boxShadowDrawerUp},[`&-bottom > ${I}`]:{bottom:0,insetInline:0,boxShadow:n.boxShadowDrawerDown},[`${t}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:l,pointerEvents:"auto"},[`${t}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${Ae(d)} ${Ae(i)}`,fontSize:r,lineHeight:u,borderBottom:`${Ae(j)} ${x} ${g}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${t}-extra`]:{flex:"none"},[`${t}-close`]:Object.assign({display:"inline-flex",width:E(r).add(o).equal(),height:E(r).add(o).equal(),borderRadius:s,justifyContent:"center",alignItems:"center",color:b,fontWeight:R,fontSize:r,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${f}`,textRendering:"auto",[`&${t}-close-end`]:{marginInlineStart:v},[`&:not(${t}-close-end)`]:{marginInlineEnd:v},"&:hover":{color:S,backgroundColor:_,textDecoration:"none"},"&:active":{backgroundColor:C}},Ps(n)),[`${t}-title`]:{flex:1,margin:0,fontWeight:n.fontWeightStrong,fontSize:r,lineHeight:u},[`${t}-body`]:{flex:1,minWidth:0,minHeight:0,padding:i,overflow:"auto",[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${t}-footer`]:{flexShrink:0,padding:`${Ae(B)} ${Ae(L)}`,borderTop:`${Ae(j)} ${x} ${g}`},"&-rtl":{direction:"rtl"}}}},ka=n=>({zIndexPopup:n.zIndexPopupBase,footerPaddingBlock:n.paddingXS,footerPaddingInline:n.padding}),ts=Os("Drawer",n=>{const s=Bs(n,{});return[Sa(s),Na(s)]},ka);var ss=function(n,s){var t={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&s.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,a=Object.getOwnPropertySymbols(n);c<a.length;c++)s.indexOf(a[c])<0&&Object.prototype.propertyIsEnumerable.call(n,a[c])&&(t[a[c]]=n[a[c]]);return t};const wa={distance:180},Ve=n=>{const{rootClassName:s,width:t,height:a,size:c="default",mask:l=!0,push:m=wa,open:f,afterOpenChange:o,onClose:d,prefixCls:i,getContainer:r,panelRef:u=null,style:j,className:x,"aria-labelledby":g,visible:v,afterVisibleChange:b,maskStyle:S,drawerStyle:_,contentWrapperStyle:C,destroyOnClose:T,destroyOnHidden:R}=n,B=ss(n,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","aria-labelledby","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),L=Ds(),E=B.title?L:void 0,{getPopupContainer:I,getPrefixCls:P,direction:ee,className:te,style:F,classNames:K,styles:he}=ut("drawer"),w=P("drawer",i),[V,oe,ue]=ts(w),G=r===void 0&&I?()=>I(document.body):r,me=ne({"no-mask":!l,[`${w}-rtl`]:ee==="rtl"},s,oe,ue),ie=y.useMemo(()=>t??(c==="large"?736:378),[t,c]),pe=y.useMemo(()=>a??(c==="large"?736:378),[a,c]),ve={motionName:yt(w,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},se=ye=>({motionName:yt(w,`panel-motion-${ye}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),Y=Hs(),D=Fs(u,Y),[X,ae]=$s("Drawer",B.zIndex),{classNames:$={},styles:Ne={}}=B;return V(y.createElement(zs,{form:!0,space:!0},y.createElement(Vs.Provider,{value:ae},y.createElement(ba,Object.assign({prefixCls:w,onClose:d,maskMotion:ve,motion:se},B,{classNames:{mask:ne($.mask,K.mask),content:ne($.content,K.content),wrapper:ne($.wrapper,K.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},Ne.mask),S),he.mask),content:Object.assign(Object.assign(Object.assign({},Ne.content),_),he.content),wrapper:Object.assign(Object.assign(Object.assign({},Ne.wrapper),C),he.wrapper)},open:f??v,mask:l,push:m,width:ie,height:pe,style:Object.assign(Object.assign({},F),j),className:ne(te,x),rootClassName:me,getContainer:G,afterOpenChange:o??b,panelRef:D,zIndex:X,"aria-labelledby":g??E,destroyOnClose:R??T}),y.createElement(Xt,Object.assign({prefixCls:w},B,{ariaId:E,onClose:d}))))))},Ta=n=>{const{prefixCls:s,style:t,className:a,placement:c="right"}=n,l=ss(n,["prefixCls","style","className","placement"]),{getPrefixCls:m}=y.useContext(mt),f=m("drawer",s),[o,d,i]=ts(f),r=ne(f,`${f}-pure`,`${f}-${c}`,d,i,a);return o(y.createElement("div",{className:r,style:t},y.createElement(Xt,Object.assign({prefixCls:f},l))))};Ve._InternalPanelDoNotUseOrYouWillBeFired=Ta;var Ea={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},Ma=function(s,t){return y.createElement(xe,le({},s,{ref:t,icon:Ea}))},Ue=y.forwardRef(Ma);function Ra(n,s,t){return typeof t=="boolean"?t:n.length?!0:Us(s).some(c=>c.type===$t)}var as=function(n,s){var t={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&s.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,a=Object.getOwnPropertySymbols(n);c<a.length;c++)s.indexOf(a[c])<0&&Object.prototype.propertyIsEnumerable.call(n,a[c])&&(t[a[c]]=n[a[c]]);return t};function Ye({suffixCls:n,tagName:s,displayName:t}){return a=>y.forwardRef((l,m)=>y.createElement(a,Object.assign({ref:m,suffixCls:n,tagName:s},l)))}const pt=y.forwardRef((n,s)=>{const{prefixCls:t,suffixCls:a,className:c,tagName:l}=n,m=as(n,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:f}=y.useContext(mt),o=f("layout",t),[d,i,r]=zt(o),u=a?`${o}-${a}`:o;return d(y.createElement(l,Object.assign({className:ne(t||u,c,i,r),ref:s},m)))}),Ia=y.forwardRef((n,s)=>{const{direction:t}=y.useContext(mt),[a,c]=y.useState([]),{prefixCls:l,className:m,rootClassName:f,children:o,hasSider:d,tagName:i,style:r}=n,u=as(n,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),j=qs(u,["suffixCls"]),{getPrefixCls:x,className:g,style:v}=ut("layout"),b=x("layout",l),S=Ra(a,o,d),[_,C,T]=zt(b),R=ne(b,{[`${b}-has-sider`]:S,[`${b}-rtl`]:t==="rtl"},g,m,f,C,T),B=y.useMemo(()=>({siderHook:{addSider:L=>{c(E=>[].concat(Ws(E),[L]))},removeSider:L=>{c(E=>E.filter(I=>I!==L))}}}),[]);return _(y.createElement(Ks.Provider,{value:B},y.createElement(i,Object.assign({ref:s,className:R,style:Object.assign(Object.assign({},v),r)},j),o)))}),La=Ye({tagName:"div",displayName:"Layout"})(Ia),Aa=Ye({suffixCls:"header",tagName:"header",displayName:"Header"})(pt),Oa=Ye({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(pt),Ba=Ye({suffixCls:"content",tagName:"main",displayName:"Content"})(pt),_e=La;_e.Header=Aa;_e.Footer=Oa;_e.Content=Ba;_e.Sider=$t;_e._InternalSiderContext=Gs;var Pa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z"}}]},name:"api",theme:"outlined"},Da=function(s,t){return y.createElement(xe,le({},s,{ref:t,icon:Pa}))},It=y.forwardRef(Da),Ha={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"},Fa=function(s,t){return y.createElement(xe,le({},s,{ref:t,icon:Ha}))},Lt=y.forwardRef(Fa),$a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M624 706.3h-74.1V464c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v242.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.7a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9z"}},{tag:"path",attrs:{d:"M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z"}}]},name:"cloud-download",theme:"outlined"},za=function(s,t){return y.createElement(xe,le({},s,{ref:t,icon:$a}))},At=y.forwardRef(za),Va={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},Ua=function(s,t){return y.createElement(xe,le({},s,{ref:t,icon:Va}))},qe=y.forwardRef(Ua),qa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z"}}]},name:"dashboard",theme:"outlined"},Wa=function(s,t){return y.createElement(xe,le({},s,{ref:t,icon:qa}))},st=y.forwardRef(Wa),Ka={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"},Ga=function(s,t){return y.createElement(xe,le({},s,{ref:t,icon:Ka}))},Ja=y.forwardRef(Ga),Qa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"},Ya=function(s,t){return y.createElement(xe,le({},s,{ref:t,icon:Qa}))},Xa=y.forwardRef(Ya),Za={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z"}}]},name:"import",theme:"outlined"},en=function(s,t){return y.createElement(xe,le({},s,{ref:t,icon:Za}))},Ot=y.forwardRef(en),tn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},sn=function(s,t){return y.createElement(xe,le({},s,{ref:t,icon:tn}))},Bt=y.forwardRef(sn),an={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},nn=function(s,t){return y.createElement(xe,le({},s,{ref:t,icon:an}))},Pt=y.forwardRef(nn),ln=Object.defineProperty,We=Object.getOwnPropertySymbols,ns=Object.prototype.hasOwnProperty,ls=Object.prototype.propertyIsEnumerable,Dt=(n,s,t)=>s in n?ln(n,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[s]=t,it=(n,s)=>{for(var t in s||(s={}))ns.call(s,t)&&Dt(n,t,s[t]);if(We)for(var t of We(s))ls.call(s,t)&&Dt(n,t,s[t]);return n},rt=(n,s)=>{var t={};for(var a in n)ns.call(n,a)&&s.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&We)for(var a of We(n))s.indexOf(a)<0&&ls.call(n,a)&&(t[a]=n[a]);return t};/**
2
+ * @license QR Code generator library (TypeScript)
3
+ * Copyright (c) Project Nayuki.
4
+ * SPDX-License-Identifier: MIT
5
+ */var Me;(n=>{const s=class A{constructor(o,d,i,r){if(this.version=o,this.errorCorrectionLevel=d,this.modules=[],this.isFunction=[],o<A.MIN_VERSION||o>A.MAX_VERSION)throw new RangeError("Version value out of range");if(r<-1||r>7)throw new RangeError("Mask value out of range");this.size=o*4+17;let u=[];for(let x=0;x<this.size;x++)u.push(!1);for(let x=0;x<this.size;x++)this.modules.push(u.slice()),this.isFunction.push(u.slice());this.drawFunctionPatterns();const j=this.addEccAndInterleave(i);if(this.drawCodewords(j),r==-1){let x=1e9;for(let g=0;g<8;g++){this.applyMask(g),this.drawFormatBits(g);const v=this.getPenaltyScore();v<x&&(r=g,x=v),this.applyMask(g)}}c(0<=r&&r<=7),this.mask=r,this.applyMask(r),this.drawFormatBits(r),this.isFunction=[]}static encodeText(o,d){const i=n.QrSegment.makeSegments(o);return A.encodeSegments(i,d)}static encodeBinary(o,d){const i=n.QrSegment.makeBytes(o);return A.encodeSegments([i],d)}static encodeSegments(o,d,i=1,r=40,u=-1,j=!0){if(!(A.MIN_VERSION<=i&&i<=r&&r<=A.MAX_VERSION)||u<-1||u>7)throw new RangeError("Invalid value");let x,g;for(x=i;;x++){const _=A.getNumDataCodewords(x,d)*8,C=m.getTotalBits(o,x);if(C<=_){g=C;break}if(x>=r)throw new RangeError("Data too long")}for(const _ of[A.Ecc.MEDIUM,A.Ecc.QUARTILE,A.Ecc.HIGH])j&&g<=A.getNumDataCodewords(x,_)*8&&(d=_);let v=[];for(const _ of o){t(_.mode.modeBits,4,v),t(_.numChars,_.mode.numCharCountBits(x),v);for(const C of _.getData())v.push(C)}c(v.length==g);const b=A.getNumDataCodewords(x,d)*8;c(v.length<=b),t(0,Math.min(4,b-v.length),v),t(0,(8-v.length%8)%8,v),c(v.length%8==0);for(let _=236;v.length<b;_^=253)t(_,8,v);let S=[];for(;S.length*8<v.length;)S.push(0);return v.forEach((_,C)=>S[C>>>3]|=_<<7-(C&7)),new A(x,d,S,u)}getModule(o,d){return 0<=o&&o<this.size&&0<=d&&d<this.size&&this.modules[d][o]}getModules(){return this.modules}drawFunctionPatterns(){for(let i=0;i<this.size;i++)this.setFunctionModule(6,i,i%2==0),this.setFunctionModule(i,6,i%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const o=this.getAlignmentPatternPositions(),d=o.length;for(let i=0;i<d;i++)for(let r=0;r<d;r++)i==0&&r==0||i==0&&r==d-1||i==d-1&&r==0||this.drawAlignmentPattern(o[i],o[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(o){const d=this.errorCorrectionLevel.formatBits<<3|o;let i=d;for(let u=0;u<10;u++)i=i<<1^(i>>>9)*1335;const r=(d<<10|i)^21522;c(r>>>15==0);for(let u=0;u<=5;u++)this.setFunctionModule(8,u,a(r,u));this.setFunctionModule(8,7,a(r,6)),this.setFunctionModule(8,8,a(r,7)),this.setFunctionModule(7,8,a(r,8));for(let u=9;u<15;u++)this.setFunctionModule(14-u,8,a(r,u));for(let u=0;u<8;u++)this.setFunctionModule(this.size-1-u,8,a(r,u));for(let u=8;u<15;u++)this.setFunctionModule(8,this.size-15+u,a(r,u));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let o=this.version;for(let i=0;i<12;i++)o=o<<1^(o>>>11)*7973;const d=this.version<<12|o;c(d>>>18==0);for(let i=0;i<18;i++){const r=a(d,i),u=this.size-11+i%3,j=Math.floor(i/3);this.setFunctionModule(u,j,r),this.setFunctionModule(j,u,r)}}drawFinderPattern(o,d){for(let i=-4;i<=4;i++)for(let r=-4;r<=4;r++){const u=Math.max(Math.abs(r),Math.abs(i)),j=o+r,x=d+i;0<=j&&j<this.size&&0<=x&&x<this.size&&this.setFunctionModule(j,x,u!=2&&u!=4)}}drawAlignmentPattern(o,d){for(let i=-2;i<=2;i++)for(let r=-2;r<=2;r++)this.setFunctionModule(o+r,d+i,Math.max(Math.abs(r),Math.abs(i))!=1)}setFunctionModule(o,d,i){this.modules[d][o]=i,this.isFunction[d][o]=!0}addEccAndInterleave(o){const d=this.version,i=this.errorCorrectionLevel;if(o.length!=A.getNumDataCodewords(d,i))throw new RangeError("Invalid argument");const r=A.NUM_ERROR_CORRECTION_BLOCKS[i.ordinal][d],u=A.ECC_CODEWORDS_PER_BLOCK[i.ordinal][d],j=Math.floor(A.getNumRawDataModules(d)/8),x=r-j%r,g=Math.floor(j/r);let v=[];const b=A.reedSolomonComputeDivisor(u);for(let _=0,C=0;_<r;_++){let T=o.slice(C,C+g-u+(_<x?0:1));C+=T.length;const R=A.reedSolomonComputeRemainder(T,b);_<x&&T.push(0),v.push(T.concat(R))}let S=[];for(let _=0;_<v[0].length;_++)v.forEach((C,T)=>{(_!=g-u||T>=x)&&S.push(C[_])});return c(S.length==j),S}drawCodewords(o){if(o.length!=Math.floor(A.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let d=0;for(let i=this.size-1;i>=1;i-=2){i==6&&(i=5);for(let r=0;r<this.size;r++)for(let u=0;u<2;u++){const j=i-u,g=(i+1&2)==0?this.size-1-r:r;!this.isFunction[g][j]&&d<o.length*8&&(this.modules[g][j]=a(o[d>>>3],7-(d&7)),d++)}}c(d==o.length*8)}applyMask(o){if(o<0||o>7)throw new RangeError("Mask value out of range");for(let d=0;d<this.size;d++)for(let i=0;i<this.size;i++){let r;switch(o){case 0:r=(i+d)%2==0;break;case 1:r=d%2==0;break;case 2:r=i%3==0;break;case 3:r=(i+d)%3==0;break;case 4:r=(Math.floor(i/3)+Math.floor(d/2))%2==0;break;case 5:r=i*d%2+i*d%3==0;break;case 6:r=(i*d%2+i*d%3)%2==0;break;case 7:r=((i+d)%2+i*d%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[d][i]&&r&&(this.modules[d][i]=!this.modules[d][i])}}getPenaltyScore(){let o=0;for(let u=0;u<this.size;u++){let j=!1,x=0,g=[0,0,0,0,0,0,0];for(let v=0;v<this.size;v++)this.modules[u][v]==j?(x++,x==5?o+=A.PENALTY_N1:x>5&&o++):(this.finderPenaltyAddHistory(x,g),j||(o+=this.finderPenaltyCountPatterns(g)*A.PENALTY_N3),j=this.modules[u][v],x=1);o+=this.finderPenaltyTerminateAndCount(j,x,g)*A.PENALTY_N3}for(let u=0;u<this.size;u++){let j=!1,x=0,g=[0,0,0,0,0,0,0];for(let v=0;v<this.size;v++)this.modules[v][u]==j?(x++,x==5?o+=A.PENALTY_N1:x>5&&o++):(this.finderPenaltyAddHistory(x,g),j||(o+=this.finderPenaltyCountPatterns(g)*A.PENALTY_N3),j=this.modules[v][u],x=1);o+=this.finderPenaltyTerminateAndCount(j,x,g)*A.PENALTY_N3}for(let u=0;u<this.size-1;u++)for(let j=0;j<this.size-1;j++){const x=this.modules[u][j];x==this.modules[u][j+1]&&x==this.modules[u+1][j]&&x==this.modules[u+1][j+1]&&(o+=A.PENALTY_N2)}let d=0;for(const u of this.modules)d=u.reduce((j,x)=>j+(x?1:0),d);const i=this.size*this.size,r=Math.ceil(Math.abs(d*20-i*10)/i)-1;return c(0<=r&&r<=9),o+=r*A.PENALTY_N4,c(0<=o&&o<=2568888),o}getAlignmentPatternPositions(){if(this.version==1)return[];{const o=Math.floor(this.version/7)+2,d=this.version==32?26:Math.ceil((this.version*4+4)/(o*2-2))*2;let i=[6];for(let r=this.size-7;i.length<o;r-=d)i.splice(1,0,r);return i}}static getNumRawDataModules(o){if(o<A.MIN_VERSION||o>A.MAX_VERSION)throw new RangeError("Version number out of range");let d=(16*o+128)*o+64;if(o>=2){const i=Math.floor(o/7)+2;d-=(25*i-10)*i-55,o>=7&&(d-=36)}return c(208<=d&&d<=29648),d}static getNumDataCodewords(o,d){return Math.floor(A.getNumRawDataModules(o)/8)-A.ECC_CODEWORDS_PER_BLOCK[d.ordinal][o]*A.NUM_ERROR_CORRECTION_BLOCKS[d.ordinal][o]}static reedSolomonComputeDivisor(o){if(o<1||o>255)throw new RangeError("Degree out of range");let d=[];for(let r=0;r<o-1;r++)d.push(0);d.push(1);let i=1;for(let r=0;r<o;r++){for(let u=0;u<d.length;u++)d[u]=A.reedSolomonMultiply(d[u],i),u+1<d.length&&(d[u]^=d[u+1]);i=A.reedSolomonMultiply(i,2)}return d}static reedSolomonComputeRemainder(o,d){let i=d.map(r=>0);for(const r of o){const u=r^i.shift();i.push(0),d.forEach((j,x)=>i[x]^=A.reedSolomonMultiply(j,u))}return i}static reedSolomonMultiply(o,d){if(o>>>8||d>>>8)throw new RangeError("Byte out of range");let i=0;for(let r=7;r>=0;r--)i=i<<1^(i>>>7)*285,i^=(d>>>r&1)*o;return c(i>>>8==0),i}finderPenaltyCountPatterns(o){const d=o[1];c(d<=this.size*3);const i=d>0&&o[2]==d&&o[3]==d*3&&o[4]==d&&o[5]==d;return(i&&o[0]>=d*4&&o[6]>=d?1:0)+(i&&o[6]>=d*4&&o[0]>=d?1:0)}finderPenaltyTerminateAndCount(o,d,i){return o&&(this.finderPenaltyAddHistory(d,i),d=0),d+=this.size,this.finderPenaltyAddHistory(d,i),this.finderPenaltyCountPatterns(i)}finderPenaltyAddHistory(o,d){d[0]==0&&(o+=this.size),d.pop(),d.unshift(o)}};s.MIN_VERSION=1,s.MAX_VERSION=40,s.PENALTY_N1=3,s.PENALTY_N2=3,s.PENALTY_N3=40,s.PENALTY_N4=10,s.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],s.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],n.QrCode=s;function t(f,o,d){if(o<0||o>31||f>>>o)throw new RangeError("Value out of range");for(let i=o-1;i>=0;i--)d.push(f>>>i&1)}function a(f,o){return(f>>>o&1)!=0}function c(f){if(!f)throw new Error("Assertion error")}const l=class J{constructor(o,d,i){if(this.mode=o,this.numChars=d,this.bitData=i,d<0)throw new RangeError("Invalid argument");this.bitData=i.slice()}static makeBytes(o){let d=[];for(const i of o)t(i,8,d);return new J(J.Mode.BYTE,o.length,d)}static makeNumeric(o){if(!J.isNumeric(o))throw new RangeError("String contains non-numeric characters");let d=[];for(let i=0;i<o.length;){const r=Math.min(o.length-i,3);t(parseInt(o.substring(i,i+r),10),r*3+1,d),i+=r}return new J(J.Mode.NUMERIC,o.length,d)}static makeAlphanumeric(o){if(!J.isAlphanumeric(o))throw new RangeError("String contains unencodable characters in alphanumeric mode");let d=[],i;for(i=0;i+2<=o.length;i+=2){let r=J.ALPHANUMERIC_CHARSET.indexOf(o.charAt(i))*45;r+=J.ALPHANUMERIC_CHARSET.indexOf(o.charAt(i+1)),t(r,11,d)}return i<o.length&&t(J.ALPHANUMERIC_CHARSET.indexOf(o.charAt(i)),6,d),new J(J.Mode.ALPHANUMERIC,o.length,d)}static makeSegments(o){return o==""?[]:J.isNumeric(o)?[J.makeNumeric(o)]:J.isAlphanumeric(o)?[J.makeAlphanumeric(o)]:[J.makeBytes(J.toUtf8ByteArray(o))]}static makeEci(o){let d=[];if(o<0)throw new RangeError("ECI assignment value out of range");if(o<128)t(o,8,d);else if(o<16384)t(2,2,d),t(o,14,d);else if(o<1e6)t(6,3,d),t(o,21,d);else throw new RangeError("ECI assignment value out of range");return new J(J.Mode.ECI,0,d)}static isNumeric(o){return J.NUMERIC_REGEX.test(o)}static isAlphanumeric(o){return J.ALPHANUMERIC_REGEX.test(o)}getData(){return this.bitData.slice()}static getTotalBits(o,d){let i=0;for(const r of o){const u=r.mode.numCharCountBits(d);if(r.numChars>=1<<u)return 1/0;i+=4+u+r.bitData.length}return i}static toUtf8ByteArray(o){o=encodeURI(o);let d=[];for(let i=0;i<o.length;i++)o.charAt(i)!="%"?d.push(o.charCodeAt(i)):(d.push(parseInt(o.substring(i+1,i+3),16)),i+=2);return d}};l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let m=l;n.QrSegment=l})(Me||(Me={}));(n=>{(s=>{const t=class{constructor(c,l){this.ordinal=c,this.formatBits=l}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),s.Ecc=t})(n.QrCode||(n.QrCode={}))})(Me||(Me={}));(n=>{(s=>{const t=class{constructor(c,l){this.modeBits=c,this.numBitsCharCount=l}numCharCountBits(c){return this.numBitsCharCount[Math.floor((c+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]),s.Mode=t})(n.QrSegment||(n.QrSegment={}))})(Me||(Me={}));var He=Me;/**
6
+ * @license qrcode.react
7
+ * Copyright (c) Paul O'Shannessy
8
+ * SPDX-License-Identifier: ISC
9
+ */var on={L:He.QrCode.Ecc.LOW,M:He.QrCode.Ecc.MEDIUM,Q:He.QrCode.Ecc.QUARTILE,H:He.QrCode.Ecc.HIGH},os=128,is="L",rs="#FFFFFF",cs="#000000",ds=!1,hs=1,rn=4,cn=0,dn=.1;function us(n,s=0){const t=[];return n.forEach(function(a,c){let l=null;a.forEach(function(m,f){if(!m&&l!==null){t.push(`M${l+s} ${c+s}h${f-l}v1H${l+s}z`),l=null;return}if(f===a.length-1){if(!m)return;l===null?t.push(`M${f+s},${c+s} h1v1H${f+s}z`):t.push(`M${l+s},${c+s} h${f+1-l}v1H${l+s}z`);return}m&&l===null&&(l=f)})}),t.join("")}function ms(n,s){return n.slice().map((t,a)=>a<s.y||a>=s.y+s.h?t:t.map((c,l)=>l<s.x||l>=s.x+s.w?c:!1))}function hn(n,s,t,a){if(a==null)return null;const c=n.length+t*2,l=Math.floor(s*dn),m=c/s,f=(a.width||l)*m,o=(a.height||l)*m,d=a.x==null?n.length/2-f/2:a.x*m,i=a.y==null?n.length/2-o/2:a.y*m,r=a.opacity==null?1:a.opacity;let u=null;if(a.excavate){let x=Math.floor(d),g=Math.floor(i),v=Math.ceil(f+d-x),b=Math.ceil(o+i-g);u={x,y:g,w:v,h:b}}const j=a.crossOrigin;return{x:d,y:i,h:o,w:f,excavation:u,opacity:r,crossOrigin:j}}function un(n,s){return s!=null?Math.max(Math.floor(s),0):n?rn:cn}function ps({value:n,level:s,minVersion:t,includeMargin:a,marginSize:c,imageSettings:l,size:m,boostLevel:f}){let o=U.useMemo(()=>{const x=(Array.isArray(n)?n:[n]).reduce((g,v)=>(g.push(...He.QrSegment.makeSegments(v)),g),[]);return He.QrCode.encodeSegments(x,on[s],t,void 0,void 0,f)},[n,s,t,f]);const{cells:d,margin:i,numCells:r,calculatedImageSettings:u}=U.useMemo(()=>{let j=o.getModules();const x=un(a,c),g=j.length+x*2,v=hn(j,m,x,l);return{cells:j,margin:x,numCells:g,calculatedImageSettings:v}},[o,m,l,a,c]);return{qrcode:o,margin:i,cells:d,numCells:r,calculatedImageSettings:u}}var mn=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),gs=U.forwardRef(function(s,t){const a=s,{value:c,size:l=os,level:m=is,bgColor:f=rs,fgColor:o=cs,includeMargin:d=ds,minVersion:i=hs,boostLevel:r,marginSize:u,imageSettings:j}=a,g=rt(a,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:v}=g,b=rt(g,["style"]),S=j==null?void 0:j.src,_=U.useRef(null),C=U.useRef(null),T=U.useCallback(F=>{_.current=F,typeof t=="function"?t(F):t&&(t.current=F)},[t]),[R,B]=U.useState(!1),{margin:L,cells:E,numCells:I,calculatedImageSettings:P}=ps({value:c,level:m,minVersion:i,boostLevel:r,includeMargin:d,marginSize:u,imageSettings:j,size:l});U.useEffect(()=>{if(_.current!=null){const F=_.current,K=F.getContext("2d");if(!K)return;let he=E;const w=C.current,V=P!=null&&w!==null&&w.complete&&w.naturalHeight!==0&&w.naturalWidth!==0;V&&P.excavation!=null&&(he=ms(E,P.excavation));const oe=window.devicePixelRatio||1;F.height=F.width=l*oe;const ue=l/I*oe;K.scale(ue,ue),K.fillStyle=f,K.fillRect(0,0,I,I),K.fillStyle=o,mn?K.fill(new Path2D(us(he,L))):E.forEach(function(G,me){G.forEach(function(ie,pe){ie&&K.fillRect(pe+L,me+L,1,1)})}),P&&(K.globalAlpha=P.opacity),V&&K.drawImage(w,P.x+L,P.y+L,P.w,P.h)}}),U.useEffect(()=>{B(!1)},[S]);const ee=it({height:l,width:l},v);let te=null;return S!=null&&(te=U.createElement("img",{src:S,key:S,style:{display:"none"},onLoad:()=>{B(!0)},ref:C,crossOrigin:P==null?void 0:P.crossOrigin})),U.createElement(U.Fragment,null,U.createElement("canvas",it({style:ee,height:l,width:l,ref:T,role:"img"},b)),te)});gs.displayName="QRCodeCanvas";var pn=U.forwardRef(function(s,t){const a=s,{value:c,size:l=os,level:m=is,bgColor:f=rs,fgColor:o=cs,includeMargin:d=ds,minVersion:i=hs,boostLevel:r,title:u,marginSize:j,imageSettings:x}=a,g=rt(a,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:v,cells:b,numCells:S,calculatedImageSettings:_}=ps({value:c,level:m,minVersion:i,boostLevel:r,includeMargin:d,marginSize:j,imageSettings:x,size:l});let C=b,T=null;x!=null&&_!=null&&(_.excavation!=null&&(C=ms(b,_.excavation)),T=U.createElement("image",{href:x.src,height:_.h,width:_.w,x:_.x+v,y:_.y+v,preserveAspectRatio:"none",opacity:_.opacity,crossOrigin:_.crossOrigin}));const R=us(C,v);return U.createElement("svg",it({height:l,width:l,viewBox:`0 0 ${S} ${S}`,ref:t,role:"img"},g),!!u&&U.createElement("title",null,u),U.createElement("path",{fill:f,d:`M0,0 h${S}v${S}H0z`,shapeRendering:"crispEdges"}),U.createElement("path",{fill:o,d:R,shapeRendering:"crispEdges"}),T)});pn.displayName="QRCodeSVG";const gn=[{label:"Auto",value:"auto"},{label:"Opus 4.6",value:"opus-4.6",tokens:2e5},{label:"Opus 4.6 (1M)",value:"opus-4.6-1m",tokens:1e6},{label:"Sonnet 4.6",value:"sonnet-4.6",tokens:2e5},{label:"Sonnet 4.6 (1M)",value:"sonnet-4.6-1m",tokens:1e6},{label:"GLM5",value:"glm5",tokens:2e5},{label:"Kimi K2.5",value:"kimi-k2.5",tokens:2e5},{label:"MiniMax 2.1",value:"minimax-2.1",tokens:2e5},{label:"Qwen 3.5",value:"Qwen 3.5",tokens:2e5}],fn={calibrationModels:gn},Ht=fn.calibrationModels,xn=[{value:"zh",short:"zh",label:"简体中文"},{value:"en",short:"en",label:"English"},{value:"zh-TW",short:"zh-TW",label:"繁體中文"},{value:"ko",short:"ko",label:"한국어"},{value:"ja",short:"ja",label:"日本語"},{value:"de",short:"de",label:"Deutsch"},{value:"es",short:"es",label:"Español"},{value:"fr",short:"fr",label:"Français"},{value:"it",short:"it",label:"Italiano"},{value:"da",short:"da",label:"Dansk"},{value:"pl",short:"pl",label:"Polski"},{value:"ru",short:"ru",label:"Русский"},{value:"ar",short:"ar",label:"العربية"},{value:"no",short:"no",label:"Norsk"},{value:"pt-BR",short:"pt-BR",label:"Português (Brasil)"},{value:"th",short:"th",label:"ไทย"},{value:"tr",short:"tr",label:"Türkçe"},{value:"uk",short:"uk",label:"Українська"}],Ft=n=>{const s=t=>t.toUpperCase().split("").map(a=>String.fromCodePoint(127462+a.charCodeAt(0)-65)).join("");return!n||n.length!==2?s("CN"):s(n)},ke=class ke extends U.Component{constructor(t){super(t);O(this,"handleShowPrompts",()=>{this.setState({promptModalVisible:!0,promptData:this.extractUserPrompts()})});O(this,"handleExportPromptsTxt",()=>{const t=this.state.promptData;if(!t||t.length===0)return;const a=[];for(const f of t){const o=[],d=f.timestamp?new Date(f.timestamp).toLocaleString():"";d&&o.push(`${d}:
10
+ `);const i=(f.segments||[]).filter(r=>r.type==="text").map(r=>r.content);i.length>0&&o.push(i.join(`
11
+ `)),a.push(o.join(`
12
+ `))}if(a.length===0)return;const c=new Blob([a.join(`
13
+
14
+
15
+
16
+ `)],{type:"text/plain;charset=utf-8"}),l=URL.createObjectURL(c),m=document.createElement("a");m.href=l,m.download=`user-prompts-${new Date().toISOString().slice(0,10)}.txt`,m.click(),URL.revokeObjectURL(l)});O(this,"handleCalibrationModelChange",t=>{this.setState({calibrationModel:t}),localStorage.setItem("ccv_calibrationModel",t)});O(this,"handleShowProjectStats",()=>{this.setState({projectStatsVisible:!0,projectStatsLoading:!0}),fetch(de("/api/project-stats")).then(t=>{if(!t.ok)throw new Error("not found");return t.json()}).then(t=>this.setState({projectStats:t,projectStatsLoading:!1})).catch(()=>this.setState({projectStats:null,projectStatsLoading:!1}))});O(this,"fetchPlugins",()=>fetch(de("/api/plugins")).then(t=>{if(!t.ok)throw new Error(t.status);return t.json()}).then(t=>{this.setState({pluginsList:t.plugins||[],pluginsDir:t.pluginsDir||""})}).catch(()=>{}));O(this,"handleShowPlugins",()=>{this.setState({pluginModalVisible:!0}),this.fetchPlugins()});O(this,"handleTogglePlugin",(t,a)=>{fetch(de("/api/preferences")).then(c=>c.json()).then(c=>{let l=Array.isArray(c.disabledPlugins)?[...c.disabledPlugins]:[];return a?l=l.filter(m=>m!==t):l.includes(t)||l.push(t),fetch(de("/api/preferences"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({disabledPlugins:l})})}).then(()=>fetch(de("/api/plugins/reload"),{method:"POST"})).then(c=>{if(!c.ok)throw new Error(c.status);return c.json()}).then(c=>{this.setState({pluginsList:c.plugins||[],pluginsDir:c.pluginsDir||""})}).catch(()=>{})});O(this,"handleDeletePlugin",(t,a)=>{this.setState({deleteConfirmVisible:!0,deleteTarget:{file:t,name:a}})});O(this,"handleDeletePluginConfirm",()=>{const{file:t}=this.state.deleteTarget||{};t&&(this.setState({deleteConfirmVisible:!1,deleteTarget:null}),fetch(de(`/api/plugins?file=${encodeURIComponent(t)}`),{method:"DELETE"}).then(a=>{if(!a.ok)throw new Error(a.status);return a.json()}).then(a=>{a.plugins&&this.setState({pluginsList:a.plugins,pluginsDir:a.pluginsDir||""})}).catch(()=>{}))});O(this,"handleReloadPlugins",()=>{fetch(de("/api/plugins/reload"),{method:"POST"}).then(t=>{if(!t.ok)throw new Error(t.status);return t.json()}).then(t=>{this.setState({pluginsList:t.plugins||[],pluginsDir:t.pluginsDir||""})}).catch(()=>{})});O(this,"handleAddPlugin",()=>{const t=document.createElement("input");t.type="file",t.accept=".js,.mjs",t.multiple=!0,t.onchange=()=>{const a=t.files;if(!a||a.length===0)return;for(const l of a)if(!l.name.endsWith(".js")&&!l.name.endsWith(".mjs")){Q.error(p("ui.plugins.invalidFile"));return}const c=Array.from(a).map(l=>new Promise((m,f)=>{const o=new FileReader;o.onload=()=>m({name:l.name,content:o.result}),o.onerror=()=>f(new Error(`Failed to read ${l.name}`)),o.readAsText(l)}));Promise.all(c).then(l=>fetch(de("/api/plugins/upload"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:l})})).then(l=>l.ok?l.json():l.text().then(m=>{try{return JSON.parse(m)}catch{throw new Error(p("ui.plugins.serverError",{status:l.status}))}})).then(l=>{l.error?Q.error(p("ui.plugins.addFailed",{reason:l.error})):l.plugins&&(this.setState({pluginsList:l.plugins,pluginsDir:l.pluginsDir||""}),Q.success(p("ui.plugins.addSuccess")))}).catch(l=>{Q.error(l.message)})},t.click()});O(this,"handleShowCdnModal",()=>{this.setState({cdnModalVisible:!0,cdnUrl:"",cdnLoading:!1})});O(this,"handleCdnUrlChange",t=>{this.setState({cdnUrl:t.target.value})});O(this,"handleCdnInstall",()=>{const{cdnUrl:t}=this.state;if(!t.trim()){Q.error(p("ui.plugins.cdnUrlRequired"));return}try{new URL(t)}catch{Q.error(p("ui.plugins.cdnInvalidUrl"));return}this.setState({cdnLoading:!0}),fetch(de("/api/plugins/install-from-url"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:t.trim()})}).then(a=>a.json()).then(a=>{a.error?Q.error(p("ui.plugins.cdnInstallFailed",{reason:a.error})):(Q.success(p("ui.plugins.cdnInstallSuccess")),a.plugins&&this.setState({pluginsList:a.plugins,pluginsDir:a.pluginsDir||""}),this.setState({cdnModalVisible:!1,cdnUrl:""}))}).catch(a=>{Q.error(p("ui.plugins.cdnInstallFailed",{reason:a.message||"Network error"}))}).finally(()=>{this.setState({cdnLoading:!1})})});O(this,"handleCdnCancel",()=>{this.setState({cdnModalVisible:!1,cdnUrl:"",cdnLoading:!1})});O(this,"fetchProcesses",()=>{this.setState({processLoading:!0}),fetch(de("/api/ccv-processes")).then(t=>t.json()).then(t=>{this.setState({processList:t.processes||[],processLoading:!1})}).catch(()=>{this.setState({processList:[],processLoading:!1})})});O(this,"handleShowProcesses",()=>{this.setState({processModalVisible:!0}),this.fetchProcesses()});O(this,"handleKillProcess",t=>{Ce.confirm({title:p("ui.processManagement.killConfirm"),onOk:()=>{fetch(de("/api/ccv-processes/kill"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pid:t})}).then(a=>a.json()).then(a=>{a.ok?(Q.success(p("ui.processManagement.killed")),this.fetchProcesses()):Q.error(a.error||p("ui.processManagement.killFailed"))}).catch(()=>{Q.error(p("ui.processManagement.killFailed"))})}})});this.state={countdownText:"",countryFlag:null,countryInfo:null,promptModalVisible:!1,promptData:[],promptViewMode:"original",settingsDrawerVisible:!1,globalSettingsVisible:!1,projectStatsVisible:!1,projectStats:null,projectStatsLoading:!1,localUrl:"",pluginModalVisible:!1,pluginsList:[],pluginsDir:"",deleteConfirmVisible:!1,deleteTarget:null,processModalVisible:!1,processList:[],processLoading:!1,logoDropdownOpen:!1,cacheHighlightIdx:null,cacheHighlightFading:!1,cdnModalVisible:!1,cdnUrl:"",cdnLoading:!1,calibrationModel:localStorage.getItem("ccv_calibrationModel")||"auto"},this._rafId=null,this._expiredTimer=null,this.updateCountdown=this.updateCountdown.bind(this)}componentDidMount(){this.startCountdown(),fetch(de("/api/local-url")).then(t=>t.json()).then(t=>{t.url&&this.setState({localUrl:t.url})}).catch(()=>{}),fetch(de("/api/claude-settings")).then(t=>t.json()).then(t=>{t.model&&this.setState({settingsModel:t.model})}).catch(()=>{}),fetch("https://ipinfo.io/json").then(t=>t.json()).then(t=>{t.country&&this.setState({countryFlag:Ft(t.country),countryInfo:t})}).catch(()=>{this.setState({countryFlag:Ft("CN")})})}componentDidUpdate(t){t.cacheExpireAt!==this.props.cacheExpireAt&&this.startCountdown()}shouldComponentUpdate(t,a){return t.requests!==this.props.requests||t.requestCount!==this.props.requestCount||t.viewMode!==this.props.viewMode||t.cacheExpireAt!==this.props.cacheExpireAt||t.cacheType!==this.props.cacheType||t.isLocalLog!==this.props.isLocalLog||t.projectName!==this.props.projectName||t.collapseToolResults!==this.props.collapseToolResults||t.expandThinking!==this.props.expandThinking||t.expandDiff!==this.props.expandDiff||t.filterIrrelevant!==this.props.filterIrrelevant||t.cliMode!==this.props.cliMode||t.contextWindow!==this.props.contextWindow||t.serverCachedContent!==this.props.serverCachedContent||t.resumeAutoChoice!==this.props.resumeAutoChoice||a!==this.state}componentWillUnmount(){this._rafId&&cancelAnimationFrame(this._rafId),this._expiredTimer&&clearTimeout(this._expiredTimer),this._cacheFadeClearTimer&&clearTimeout(this._cacheFadeClearTimer),this._cacheUnbindScrollFade()}startCountdown(){if(this._rafId&&cancelAnimationFrame(this._rafId),this._expiredTimer&&clearTimeout(this._expiredTimer),!this.props.cacheExpireAt){this.state.countdownText!==""&&this.setState({countdownText:""});return}this._rafId=requestAnimationFrame(this.updateCountdown)}updateCountdown(){const{cacheExpireAt:t}=this.props;if(!t){this.state.countdownText!==""&&this.setState({countdownText:""});return}const a=Math.max(0,t-Date.now());if(a<=0){const m=p("ui.cacheExpired");this.state.countdownText!==m&&this.setState({countdownText:m}),this._expiredTimer=setTimeout(()=>{this.state.countdownText!==""&&this.setState({countdownText:""})},5e3);return}const c=Math.ceil(a/1e3);let l;if(c>=60){const m=Math.floor(c/60),f=c%60;l=p("ui.minuteSecond",{m,s:String(f).padStart(2,"0")})}else l=p("ui.second",{s:c});l!==this.state.countdownText&&this.setState({countdownText:l}),this._rafId=requestAnimationFrame(this.updateCountdown)}static parseSegments(t){const a=[],c=/<([a-zA-Z_][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>/g;let l=0,m;for(;(m=c.exec(t))!==null;){const o=t.slice(l,m.index).trim();o&&a.push({type:"text",content:o});const d=m[1];if(l=m.index+m[0].length,ke.COMMAND_TAGS.has(d))continue;const i=new RegExp(`^<${d}(?:\\s[^>]*)?>([\\s\\S]*)<\\/${d}>$`),r=m[0].match(i),u=r?r[1].trim():m[0].trim();a.push({type:"system",content:u,label:d})}const f=t.slice(l).trim();return f&&a.push({type:"text",content:f}),a}static extractUserTexts(t){const a=[],c=[];let l=null;for(const m of t)if(m.role==="user"){if(typeof m.content=="string"){const f=m.content.trim();if(!f)continue;if(!Fe(f)){if(/Implement the following plan:/i.test(f))continue;a.push(f),c.push(f)}}else if(Array.isArray(m.content)){const{commands:f,textBlocks:o}=Js(m.content);f.length>0&&(l=f[f.length-1]);const d=[];for(const r of o)/Implement the following plan:/i.test((r.text||"").trim())||d.push(r.text.trim());const i=m.content.filter(r=>{var u;return r.type==="text"&&((u=r.text)==null?void 0:u.trim())}).map(r=>r.text.trim());d.length>0&&(a.push(d.join(`
17
+ `)),c.push(i.join(`
18
+ `)))}}return{userMsgs:a,fullTexts:c,slashCmd:l}}extractUserPrompts(){var f;const{requests:t=[]}=this.props,a=[],c=new Set;let l=null;const m=t.filter(o=>be(o));for(let o=0;o<m.length;o++){const d=m[o],i=((f=d.body)==null?void 0:f.messages)||[],r=d.timestamp||"",{userMsgs:u,fullTexts:j,slashCmd:x}=ke.extractUserTexts(i);x&&x!=="/compact"&&x!==l&&a.push({type:"prompt",segments:[{type:"text",content:x}],timestamp:r}),l=x;for(let g=0;g<u.length;g++){const v=u[g];if(c.has(v))continue;c.add(v);const b=j[g]||v;a.push({type:"prompt",segments:ke.parseSegments(b),timestamp:r})}}return a}renderTokenStats(){const{requests:t=[]}=this.props,a=Qs(t),c=Object.keys(a),l=Ys(t),m=Xs(t);if(c.length===0&&l.length===0)return e.jsx("div",{className:h.tokenStatsEmpty,children:"暂无 token 数据"});const f=e.jsx("div",{className:h.tokenStatsColumn,children:c.map(r=>{const u=a[r],j=u.input+u.cacheCreation+u.cacheRead,x=j>0?(u.cacheRead/j*100).toFixed(1):"0.0";return e.jsxs("div",{className:c.length>1?h.modelCardSpaced:h.modelCard,children:[e.jsx("div",{className:h.modelName,children:r}),e.jsx("table",{className:h.statsTable,children:e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{className:h.label,children:"Token"}),e.jsx("td",{className:h.th,children:"input"}),e.jsx("td",{className:h.th,children:"output"})]}),e.jsxs("tr",{className:h.rowBorder,children:[e.jsx("td",{className:h.label}),e.jsx("td",{className:h.td,children:q(j)}),e.jsx("td",{className:h.td,children:q(u.output)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:h.label,children:"Cache"}),e.jsx("td",{className:h.th,children:"create"}),e.jsx("td",{className:h.th,children:"read"})]}),e.jsxs("tr",{className:h.rowBorder,children:[e.jsx("td",{className:h.label}),e.jsx("td",{className:h.td,children:q(u.cacheCreation)}),e.jsx("td",{className:h.td,children:q(u.cacheRead)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:h.label,children:p("ui.hitRate")}),e.jsxs("td",{colSpan:2,className:h.td,children:[x,"%"]})]})]})})]},r)})}),o=this.renderCacheRebuildStats(),d=l.length>0?e.jsx("div",{className:h.toolStatsColumn,children:e.jsxs("div",{className:h.modelCard,children:[e.jsx("div",{className:h.modelName,children:p("ui.toolUsageStats")}),e.jsxs("table",{className:h.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${h.th} ${h.thLeft}`,children:"Tool"}),e.jsx("td",{className:h.th,children:p("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[l.map(([r,u])=>e.jsxs("tr",{className:h.rowBorder,children:[e.jsxs("td",{className:h.label,children:[r," ",e.jsx(je,{doc:`Tool-${r}`})]}),e.jsx("td",{className:h.td,children:u})]},r)),l.length>1&&e.jsxs("tr",{className:h.rebuildTotalRow,children:[e.jsx("td",{className:h.label,children:"Total"}),e.jsx("td",{className:h.td,children:l.reduce((r,u)=>r+u[1],0)})]})]})]})]})}):null,i=m.length>0?e.jsx("div",{className:h.toolStatsColumn,children:e.jsxs("div",{className:h.modelCard,children:[e.jsx("div",{className:h.modelName,children:p("ui.skillUsageStats")}),e.jsxs("table",{className:h.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${h.th} ${h.thLeft}`,children:"Skill"}),e.jsx("td",{className:h.th,children:p("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[m.map(([r,u])=>e.jsxs("tr",{className:h.rowBorder,children:[e.jsx("td",{className:h.label,children:r}),e.jsx("td",{className:h.td,children:u})]},r)),m.length>1&&e.jsxs("tr",{className:h.rebuildTotalRow,children:[e.jsx("td",{className:h.label,children:"Total"}),e.jsx("td",{className:h.td,children:m.reduce((r,u)=>r+u[1],0)})]})]})]})]})}):null;return e.jsxs("div",{className:h.tokenStatsContainer,children:[f,o,d,i]})}_cacheUnbindScrollFade(){this._cacheOnScrollFade&&this._cacheScrollEl&&(this._cacheScrollEl.removeEventListener("scroll",this._cacheOnScrollFade),this._cacheOnScrollFade=null)}_cacheBindScrollFade(){this._cacheUnbindScrollFade();const t=this._cacheScrollEl;t&&(this._cacheOnScrollFade=()=>{clearTimeout(this._cacheAutoFadeTimer),this.setState({cacheHighlightFading:!0}),this._cacheFadeClearTimer=setTimeout(()=>{this.setState({cacheHighlightIdx:null,cacheHighlightFading:!1})},3e3),this._cacheUnbindScrollFade()},t.addEventListener("scroll",this._cacheOnScrollFade,{passive:!0}))}scrollToCacheMsg(t){if(this.props.viewMode==="raw"&&this.props.onNavigateCacheMsg&&this.props.onNavigateCacheMsg(t),(this.state._cacheSectionCollapsed||{}).messages){this.setState(o=>({_cacheSectionCollapsed:{...o._cacheSectionCollapsed||{},messages:!1}}),()=>this.scrollToCacheMsg(t));return}const a=this._cacheScrollEl;if(!a)return;const c=a.querySelector(`[data-msg-idx="${t}"]`);if(!c)return;clearTimeout(this._cacheScrollSettleTimer),clearTimeout(this._cacheFadeClearTimer),clearTimeout(this._cacheAutoFadeTimer),clearTimeout(this._cacheHighlightDelayTimer),this._cacheUnbindScrollFade(),this._cacheScrollEndHandler&&a.removeEventListener("scrollend",this._cacheScrollEndHandler),this.setState({cacheHighlightIdx:null,cacheHighlightFading:!1});let l=!1,m=!1;const f=()=>{!l||!m||(this.setState({cacheHighlightIdx:t,cacheHighlightFading:!1}),this._cacheScrollSettleTimer=setTimeout(()=>this._cacheBindScrollFade(),200),this._cacheAutoFadeTimer=setTimeout(()=>{this.state.cacheHighlightIdx===t&&!this.state.cacheHighlightFading&&(this.setState({cacheHighlightFading:!0}),this._cacheFadeClearTimer=setTimeout(()=>{this.setState({cacheHighlightIdx:null,cacheHighlightFading:!1})},3e3),this._cacheUnbindScrollFade())},3e3))};this._cacheScrollEndHandler=()=>{a.removeEventListener("scrollend",this._cacheScrollEndHandler),l=!0,f()},a.addEventListener("scrollend",this._cacheScrollEndHandler,{once:!0}),this._cacheScrollSettleTimer=setTimeout(()=>{a.removeEventListener("scrollend",this._cacheScrollEndHandler),l=!0,f()},800),this._cacheHighlightDelayTimer=setTimeout(()=>{m=!0,f()},500),c.scrollIntoView({behavior:"smooth",block:"center"})}renderCacheContentPopover(t){const{requests:a=[],serverCachedContent:c}=this.props,l=c||Vt(a);if(l&&(l.cacheCreateTokens>0||l.cacheReadTokens>0)&&(this._lastCachedTokens={cacheCreateTokens:l.cacheCreateTokens,cacheReadTokens:l.cacheReadTokens}),t>0&&(this._lastContextPercent=t),!l||l.system.length===0&&l.messages.length===0&&l.tools.length===0)return e.jsx("div",{className:h.cachePopoverEmpty,children:p("ui.noCachedContent")});const m=(i,r,u,j)=>{if(r.length===0)return null;const x=i===p("ui.messages"),g=(this.state._cacheSectionCollapsed||{})[j],v=g!==void 0?!!g:j==="tools",b=()=>this.setState(S=>({_cacheSectionCollapsed:{...S._cacheSectionCollapsed||{},[j]:!v}}));return e.jsxs("div",{className:h.cacheSection,children:[e.jsxs("button",{type:"button",className:h.cacheSectionTitle,onClick:b,"aria-expanded":!v,children:[e.jsx("span",{className:h.cacheSectionArrow,children:v?"▶":"▼"}),i," (",r.length,")"]}),!v&&r.map((S,_)=>{const C=x?{"data-msg-idx":_}:{};let T=u||h.cacheCodeBlock;const R=x&&_===this.state.cacheHighlightIdx;return R&&(T+=" "+(this.state.cacheHighlightFading?h.cacheBlockHighlightFading:h.cacheBlockHighlight)),e.jsxs("pre",{className:T,...C,style:R?{position:"relative"}:void 0,children:[R&&e.jsx("svg",{className:`${h.cacheBorderSvg}${this.state.cacheHighlightFading?" "+h.cacheBorderSvgFading:""}`,preserveAspectRatio:"none",children:e.jsx("rect",{x:"0.5",y:"0.5",width:"calc(100% - 1px)",height:"calc(100% - 1px)",rx:"4",ry:"4",fill:"none",stroke:"#1668dc",strokeWidth:"1",strokeDasharray:"6 4",className:h.cacheBorderRect})}),S]},_)})]})},f=()=>{const i=[];return l.tools.length>0&&(i.push(`=== ${p("ui.tools")} (${l.tools.length}) ===`),l.tools.forEach(r=>i.push(r))),l.system.length>0&&(i.push(`
19
+ === ${p("ui.systemPrompt")} (${l.system.length}) ===`),l.system.forEach(r=>i.push(r))),l.messages.length>0&&(i.push(`
20
+ === ${p("ui.messages")} (${l.messages.length}) ===`),l.messages.forEach(r=>i.push(r))),i.join(`
21
+
22
+ `)},o=l.messages.map((i,r)=>({text:i,msgIdx:r})).filter(({text:i})=>i.startsWith("[user]")).map(({text:i,msgIdx:r})=>{const u=i.replace(/^\[user\]\s*/,"").trim();return!u||Fe(u)?{cleaned:"",msgIdx:r}:{cleaned:ke.parseSegments(u).filter(g=>g.type==="text").map(g=>g.content.trim()).filter(g=>g&&!Fe(g)).join(" ").trim(),msgIdx:r}}).filter(({cleaned:i})=>!(!i||/Implement the following plan:/i.test(i))),d=o.length>0?e.jsx("div",{className:h.cacheNavList,children:o.map(({cleaned:i,msgIdx:r})=>e.jsx("div",{className:h.cacheNavItem,onClick:()=>this.scrollToCacheMsg(r),children:i},r))}):null;return e.jsxs("div",{className:h.cachePopover,children:[e.jsx("div",{className:h.cachePopoverHeader,children:e.jsxs("div",{className:h.cachePopoverTitle,children:[p("ui.cachedContentTitle"),e.jsx(je,{doc:"KVCacheContent"}),e.jsx(Pe,{className:h.cacheCopyBtn,onClick:()=>{navigator.clipboard.writeText(f()).then(()=>{Q.success(p("ui.copied"))}).catch(()=>{})}}),e.jsx("span",{className:h.cacheCalibrationLabel,children:p("ui.calibrationModelLabel")}),e.jsx(Ut,{size:"small",value:this.state.calibrationModel,onChange:this.handleCalibrationModelChange,options:Ht,className:h.calibrationSelect,popupMatchSelectWidth:!1})]})}),(()=>{const r=l.cacheCreateTokens>0||l.cacheReadTokens>0?l:this._lastCachedTokens,u=t>0?t:this._lastContextPercent||0;return r||d?e.jsxs("div",{className:h.cacheTokenInfo,children:[r&&e.jsxs(e.Fragment,{children:[p("ui.tokens"),": ",e.jsxs("span",{className:h.cacheWriteToken,children:["write ",q(r.cacheCreateTokens)]})," / ",e.jsxs("span",{className:h.cacheReadToken,children:["read ",q(r.cacheReadTokens)]}),u>0&&e.jsxs("span",{className:h.cacheCtxPercent,children:["(ctx:",u,"%)"]})]}),d&&e.jsx(Be,{content:d,trigger:"hover",placement:"left",children:e.jsx("span",{className:h.cacheNavBtn,children:p("ui.userPromptNav")})})]}):null})(),e.jsxs("div",{className:h.cacheScrollArea,ref:i=>{this._cacheScrollEl=i,i&&!this._cacheScrollInited&&(this._cacheScrollInited=!0,requestAnimationFrame(()=>{i.scrollTop=i.scrollHeight}))},children:[m(p("ui.tools"),l.tools,void 0,"tools"),m(p("ui.systemPrompt"),l.system,h.cacheCodeBlockSystem,"system"),m(p("ui.messages"),l.messages,void 0,"messages")]})]})}renderCacheRebuildStats(){const{requests:t=[]}=this.props,a=Zs(t),c=["ttl","system_change","tools_change","model_change","msg_truncated","msg_modified","key_change"],l={ttl:"cacheLoss.ttl",system_change:"cacheLoss.systemChange",tools_change:"cacheLoss.toolsChange",model_change:"cacheLoss.modelChange",msg_truncated:"cacheLoss.msgTruncated",msg_modified:"cacheLoss.msgModified",key_change:"cacheLoss.keyChange"},m=c.filter(v=>a[v].count>0),f=m.reduce((v,b)=>v+a[b].count,0),o=m.reduce((v,b)=>v+a[b].cacheCreate,0),d={},i={};for(let v=0;v<t.length;v++){const b=$e(t[v],t[v+1]);if(b.type==="SubAgent"){const S=b.subType||"Other";d[S]=(d[S]||0)+1}else if(b.type==="Teammate"){const S=b.subType||"Teammate";i[S]=(i[S]||0)+1}}const r=Object.entries(d).sort((v,b)=>b[1]-v[1]),u=Object.entries(i).sort((v,b)=>b[1]-v[1]),j=m.length>0,x=r.length>0,g=u.length>0;return!j&&!x&&!g?null:e.jsxs("div",{className:h.toolStatsColumn,children:[j&&e.jsxs("div",{className:x?h.modelCardSpaced:h.modelCard,children:[e.jsxs("div",{className:h.modelName,children:["MainAgent",e.jsx(je,{doc:"MainAgent"})," ",p("ui.cacheRebuildStats"),e.jsx(je,{doc:"CacheRebuild"})]}),e.jsxs("table",{className:h.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${h.th} ${h.thLeft}`,children:p("ui.cacheRebuild.reason")}),e.jsx("td",{className:h.th,children:p("ui.cacheRebuild.count")}),e.jsx("td",{className:h.th,children:p("ui.cacheRebuild.cacheCreate")})]})}),e.jsxs("tbody",{children:[m.map(v=>e.jsxs("tr",{className:h.rowBorder,children:[e.jsx("td",{className:h.label,children:p(`ui.${l[v]}`)}),e.jsx("td",{className:h.td,children:a[v].count}),e.jsx("td",{className:h.td,children:q(a[v].cacheCreate)})]},v)),m.length>1&&e.jsxs("tr",{className:h.rebuildTotalRow,children:[e.jsx("td",{className:h.label,children:"Total"}),e.jsx("td",{className:h.td,children:f}),e.jsx("td",{className:h.td,children:q(o)})]})]})]})]}),x&&e.jsxs("div",{className:h.modelCard,children:[e.jsx("div",{className:h.modelName,children:p("ui.subAgentStats")}),e.jsxs("table",{className:h.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${h.th} ${h.thLeft}`,children:"SubAgent"}),e.jsx("td",{className:h.th,children:p("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[r.map(([v,b])=>e.jsxs("tr",{className:h.rowBorder,children:[e.jsxs("td",{className:h.label,children:[v," ",e.jsx(je,{doc:`SubAgent-${v}`})]}),e.jsx("td",{className:h.td,children:b})]},v)),r.length>1&&e.jsxs("tr",{className:h.rebuildTotalRow,children:[e.jsx("td",{className:h.label,children:"Total"}),e.jsx("td",{className:h.td,children:r.reduce((v,b)=>v+b[1],0)})]})]})]})]}),g&&e.jsxs("div",{className:h.modelCard,children:[e.jsx("div",{className:h.modelName,children:"Teammate"}),e.jsxs("table",{className:h.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${h.th} ${h.thLeft}`,children:"Name"}),e.jsx("td",{className:h.th,children:p("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[u.map(([v,b])=>e.jsxs("tr",{className:h.rowBorder,children:[e.jsx("td",{className:h.label,children:v}),e.jsx("td",{className:h.td,children:b})]},v)),u.length>1&&e.jsxs("tr",{className:h.rebuildTotalRow,children:[e.jsx("td",{className:h.label,children:"Total"}),e.jsx("td",{className:h.td,children:u.reduce((v,b)=>v+b[1],0)})]})]})]})]})]})}renderTextPrompt(t){return e.jsx("div",{className:h.textPromptCard,children:t.segments.map((a,c)=>a.type==="text"?e.jsx("pre",{className:h.preText,children:a.content},c):e.jsx(ea,{size:"small",className:h.systemCollapse,items:[{key:`sys-${c}`,label:e.jsx("span",{className:h.systemLabel,children:a.label}),children:e.jsx("pre",{className:h.preSys,children:a.content})}]},c))})}renderOriginalPrompt(t){const a=t.segments.filter(c=>c.type==="text");return a.length===0?null:e.jsx("div",{className:h.textPromptCard,children:a.map((c,l)=>e.jsx("pre",{className:h.preText,children:c.content},l))})}buildTextModeContent(){const{promptData:t}=this.state,a=[];for(const c of t){const l=(c.segments||[]).filter(m=>m.type==="text").map(m=>m.content);l.length>0&&a.push(l.join(`
23
+ `))}return a.join(`
24
+
25
+
26
+ `)}renderProjectStatsContent(){const{projectStats:t,projectStatsLoading:a}=this.state;if(a)return e.jsx("div",{className:h.projectStatsCenter,children:e.jsx(qt,{})});if(!t)return e.jsx("div",{className:h.projectStatsEmpty,children:p("ui.projectStats.noData")});const{summary:c,models:l,updatedAt:m}=t;l&&Object.entries(l).sort((d,i)=>i[1]-d[1]);const f={};if(t.files){for(const d of Object.values(t.files))if(d.models)for(const[i,r]of Object.entries(d.models))f[i]||(f[i]={input:0,output:0,cacheRead:0,cacheCreation:0,count:0}),f[i].input+=r.input_tokens||0,f[i].output+=r.output_tokens||0,f[i].cacheRead+=r.cache_read_input_tokens||0,f[i].cacheCreation+=r.cache_creation_input_tokens||0,f[i].count+=r.count||0}const o=Object.entries(f).sort((d,i)=>i[1].count-d[1].count);return e.jsxs("div",{className:h.projectStatsContent,children:[m&&e.jsx("div",{className:h.projectStatsUpdated,children:p("ui.projectStats.updatedAt",{time:new Date(m).toLocaleString()})}),e.jsxs("div",{className:h.projectStatsSummary,children:[e.jsxs("div",{className:h.projectStatCard,children:[e.jsx("div",{className:h.projectStatValue,children:(c==null?void 0:c.requestCount)??0}),e.jsx("div",{className:h.projectStatLabel,children:p("ui.projectStats.totalRequests")})]}),e.jsxs("div",{className:h.projectStatCard,children:[e.jsx("div",{className:h.projectStatValue,children:(c==null?void 0:c.turnCount)??(c==null?void 0:c.sessionCount)??0}),e.jsx("div",{className:h.projectStatLabel,children:p("ui.projectStats.turnCount")})]}),e.jsxs("div",{className:h.projectStatCard,children:[e.jsx("div",{className:h.projectStatValue,children:(c==null?void 0:c.fileCount)??0}),e.jsx("div",{className:h.projectStatLabel,children:p("ui.projectStats.totalFiles")})]}),e.jsxs("div",{className:h.projectStatCard,children:[e.jsx("div",{className:h.projectStatValue,children:q(c==null?void 0:c.input_tokens)}),e.jsx("div",{className:h.projectStatLabel,children:"Input Tokens"})]}),e.jsxs("div",{className:h.projectStatCard,children:[e.jsx("div",{className:h.projectStatValue,children:q(c==null?void 0:c.output_tokens)}),e.jsx("div",{className:h.projectStatLabel,children:"Output Tokens"})]})]}),o.length>0&&e.jsxs("div",{className:h.projectStatsSection,children:[e.jsx("div",{className:h.projectStatsSectionTitle,children:p("ui.projectStats.modelUsage")}),o.map(([d,i])=>{const r=i.input+i.cacheRead+i.cacheCreation,u=r>0?(i.cacheRead/r*100).toFixed(1):"0.0";return e.jsxs("div",{className:h.projectStatsModelCard,children:[e.jsxs("div",{className:h.projectStatsModelHeader,children:[e.jsx("span",{className:h.projectStatsModelName,children:d}),e.jsxs("span",{className:h.projectStatsModelCount,children:[i.count," reqs"]})]}),e.jsx("table",{className:h.statsTable,children:e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{className:h.label,children:"Token"}),e.jsx("td",{className:h.th,children:"input"}),e.jsx("td",{className:h.th,children:"output"})]}),e.jsxs("tr",{className:h.rowBorder,children:[e.jsx("td",{className:h.label}),e.jsx("td",{className:h.td,children:q(r)}),e.jsx("td",{className:h.td,children:q(i.output)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:h.label,children:"Cache"}),e.jsx("td",{className:h.th,children:"create"}),e.jsx("td",{className:h.th,children:"read"})]}),e.jsxs("tr",{className:h.rowBorder,children:[e.jsx("td",{className:h.label}),e.jsx("td",{className:h.td,children:q(i.cacheCreation)}),e.jsx("td",{className:h.td,children:q(i.cacheRead)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:h.label,children:p("ui.hitRate")}),e.jsxs("td",{colSpan:2,className:h.td,children:[u,"%"]})]})]})})]},d)})]})]})}render(){const{requestCount:t,requests:a=[],viewMode:c,cacheType:l,onToggleViewMode:m,onImportLocalLogs:f,onLangChange:o,isLocalLog:d,localLogFile:i,projectName:r,collapseToolResults:u,onCollapseToolResultsChange:j,expandThinking:x,onExpandThinkingChange:g,expandDiff:v,onExpandDiffChange:b,filterIrrelevant:S,onFilterIrrelevantChange:_,updateInfo:C,onDismissUpdate:T,cliMode:R,terminalVisible:B,onToggleTerminal:L,onReturnToWorkspaces:E,contextWindow:I,serverCachedContent:P,resumeAutoChoice:ee,onResumeAutoChoiceToggle:te,onResumeAutoChoiceChange:F}=this.props,{countdownText:K}=this.state,he=[{key:"import-local",icon:e.jsx(Ot,{}),label:p("ui.importLocalLogs"),onClick:f},{key:"export-prompts",icon:e.jsx(Ja,{}),label:p("ui.exportPrompts"),onClick:this.handleShowPrompts},{key:"plugin-management",icon:e.jsx(It,{}),label:p("ui.pluginManagement"),onClick:this.handleShowPlugins},...R&&E?[{key:"switch-workspace",icon:e.jsx(Ot,{className:h.iconMirror}),label:p("ui.switchWorkspace"),onClick:E}]:[],{key:"process-management",icon:e.jsx(st,{}),label:p("ui.processManagement"),onClick:this.handleShowProcesses},{type:"divider"},{key:"project-stats",icon:e.jsx(Lt,{}),label:p("ui.projectStats"),onClick:this.handleShowProjectStats},...c==="raw"?[{key:"global-settings",icon:e.jsx(Bt,{}),label:p("ui.globalSettings"),onClick:()=>this.setState({globalSettingsVisible:!0})}]:[],...c==="chat"?[{key:"display-settings",icon:e.jsx(Bt,{}),label:p("ui.settings"),onClick:()=>this.setState({settingsDrawerVisible:!0})}]:[],{key:"language",icon:e.jsx(Xa,{}),label:p("ui.languageSettings"),children:[{key:"lang-grid-container",type:"group",label:e.jsx("div",{className:h.langGrid,children:xn.map(w=>e.jsx(W,{size:"small",type:w.value===sa()?"primary":"default",onClick:V=>{V.stopPropagation(),ta(w.value),o&&o()},className:h.langBtn,children:w.label},w.value))})}]}];return e.jsxs("div",{className:h.headerBar,children:[e.jsxs(De,{size:"middle",children:[e.jsx(aa,{menu:{items:he,className:"logo-dropdown-menu"},trigger:["hover"],onOpenChange:w=>this.setState({logoDropdownOpen:w}),align:{offset:[-4,0]},children:e.jsx("span",{className:`${h.logoWrap}${this.state.logoDropdownOpen?` ${h.logoWrapActive}`:""}`,children:e.jsx("img",{src:"/favicon.ico",alt:"Logo",className:`${h.logoImage}${this.state.logoDropdownOpen?` ${h.logoImageActive}`:""}`})})}),e.jsx(Be,{content:this.renderTokenStats(),trigger:"hover",placement:"bottomLeft",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 8px",maxHeight:"80vh",overflowY:"auto"},children:e.jsxs(fe,{className:h.tokenStatsTag,children:[e.jsx(st,{className:h.tokenStatsIcon}),p("ui.tokenStats")]})}),(()=>{var G,me,ie,pe,ve;let w=0;const V=Ht.find(se=>se.value===this.state.calibrationModel),oe=V==null?void 0:V.tokens;if(!d){if(oe&&(I==null?void 0:I.used_percentage)!=null){const se=D=>{var ae,$;const X=($=(ae=D.response)==null?void 0:ae.body)==null?void 0:$.usage;return((X==null?void 0:X.input_tokens)||0)+((X==null?void 0:X.cache_creation_input_tokens)||0)+((X==null?void 0:X.cache_read_input_tokens)||0)};let Y=0;for(let D=a.length-1;D>=0;D--)if(be(a[D])&&((me=(G=a[D].response)==null?void 0:G.body)!=null&&me.usage)){Y=se(a[D]);break}if(Y>0){const D=oe*.835;w=Math.min(100,Math.max(0,Math.round(Y/D*100)))}else{const D=I.context_window_size||2e5;w=Math.min(100,Math.max(0,Math.round(I.used_percentage*D/oe/83.5*100)))}}else if((I==null?void 0:I.used_percentage)!=null){const se=this.state.settingsModel?bt(this.state.settingsModel):0,Y=I.context_window_size||2e5;se&&se!==Y?w=Math.min(100,Math.max(0,Math.round(I.used_percentage*Y/se/83.5*100))):w=Math.min(100,Math.max(0,Math.round(I.used_percentage/83.5*100)))}else if(a.length>0){const se=Y=>{var X,ae;const D=(ae=(X=Y.response)==null?void 0:X.body)==null?void 0:ae.usage;return((D==null?void 0:D.input_tokens)||0)+((D==null?void 0:D.cache_creation_input_tokens)||0)+((D==null?void 0:D.cache_read_input_tokens)||0)};for(let Y=a.length-1;Y>=0;Y--)if(be(a[Y])&&((pe=(ie=a[Y].response)==null?void 0:ie.body)!=null&&pe.usage)){const D=se(a[Y]),ae=(oe||(I==null?void 0:I.context_window_size)||bt(((ve=a[Y].body)==null?void 0:ve.model)||this.state.settingsModel))*.835;ae>0&&D>0&&(w=Math.min(100,Math.max(0,Math.round(D/ae*100))));break}}}w===0&&this._lastContextPercent>0&&(w=this._lastContextPercent);const ue=w>=80?"#ff4d4f":w>=60?"#faad14":"#52c41a";return d?e.jsx(fe,{className:`${h.liveTag} ${h.liveTagHistory}`,children:e.jsx("span",{className:h.liveTagText,children:p("ui.historyLog",{file:i})})}):e.jsx(Be,{content:this.state._cachePopoverOpen?this.renderCacheContentPopover(w):e.jsx("div",{className:h.cachePopoverPlaceholder}),trigger:"hover",placement:"bottomLeft",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 8px"},onOpenChange:se=>{this.setState({_cachePopoverOpen:se}),se||(this._cacheScrollInited=!1)},children:e.jsxs("span",{className:h.liveTag,style:{borderColor:ue,color:ue},children:[e.jsx("span",{className:h.liveTagFill,style:{width:`${w}%`,backgroundColor:ue}}),e.jsx("span",{className:h.liveTagContent,children:e.jsxs("span",{className:h.liveTagText,children:[p("ui.liveMonitoring"),r?`:${r}`:""]})})]})})})(),C&&e.jsx(fe,{color:C.type==="completed"?"green":"orange",closable:!0,onClose:()=>T&&T(),children:C.type==="completed"?p("ui.update.completed",{version:C.version}):p("ui.update.majorAvailable",{version:C.version})})]}),e.jsxs(De,{size:"middle",children:[K&&e.jsxs(fe,{style:{background:"#2a2a2a",border:"1px solid #3a3a3a",color:K===p("ui.cacheExpired")?"#ff6b6b":"#ccc"},children:[p("ui.cacheCountdown",{type:l?`(${l})`:""}),e.jsx("strong",{className:h.countdownStrong,children:K})]}),c==="chat"&&R&&!d&&this.state.localUrl&&e.jsxs(e.Fragment,{children:[this.state.countryFlag&&e.jsx(Be,{content:this.state.countryInfo?e.jsxs("div",{className:h.countryInfoPopover,children:[e.jsxs("div",{children:[this.state.countryFlag," ",this.state.countryInfo.country]}),this.state.countryInfo.region&&e.jsx("div",{children:this.state.countryInfo.region}),this.state.countryInfo.city&&e.jsx("div",{children:this.state.countryInfo.city}),this.state.countryInfo.org&&e.jsx("div",{className:h.countryInfoMeta,children:this.state.countryInfo.org}),this.state.countryInfo.ip&&e.jsx("div",{className:h.countryInfoMeta,children:this.state.countryInfo.ip})]}):null,trigger:"hover",placement:"bottomRight",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 12px"},children:e.jsx(W,{className:h.compactBtnNoBorder,icon:e.jsx("span",{className:h.countryFlagIcon,children:this.state.countryFlag})})}),e.jsx(Be,{content:e.jsxs("div",{className:h.qrcodePopover,children:[e.jsx("div",{className:h.qrcodeTitle,children:p("ui.scanToCoding")}),e.jsx(gs,{value:this.state.localUrl,size:200,bgColor:"#141414",fgColor:"#d9d9d9",level:"M"}),e.jsx(Ct,{readOnly:!0,value:this.state.localUrl,className:h.qrcodeUrlInput,suffix:e.jsx(Pe,{className:h.qrcodeUrlCopy,onClick:()=>{navigator.clipboard.writeText(this.state.localUrl).then(()=>{Q.success(p("ui.copied"))}).catch(()=>{})}})})]}),trigger:"hover",placement:"bottomRight",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 8px"},children:e.jsx(W,{className:h.compactBtnNoBorder,icon:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:h.svgIcon,children:[e.jsx("rect",{x:"5",y:"2",width:"14",height:"20",rx:"2",ry:"2"}),e.jsx("line",{x1:"12",y1:"18",x2:"12.01",y2:"18"})]})})})]}),R&&c==="chat"&&!d&&e.jsx(W,{className:h.compactBtn,type:B?"primary":"default",ghost:B,icon:e.jsx(qe,{}),onClick:L,children:p("ui.terminal")}),e.jsx(W,{className:h.compactBtn,type:c==="raw"?"primary":"default",icon:c==="raw"?e.jsx(na,{}):e.jsx(Ue,{}),onClick:m,children:c==="raw"?p("ui.chatMode"):p("ui.rawMode")})]}),e.jsxs(Ce,{title:`${p("ui.userPrompt")} (${this.state.promptData.length}${p("ui.promptCountUnit")})`,open:this.state.promptModalVisible,onCancel:()=>this.setState({promptModalVisible:!1}),footer:null,width:700,children:[e.jsx("div",{className:h.promptExportBar,children:e.jsx(W,{icon:e.jsx(la,{}),onClick:this.handleExportPromptsTxt,children:p("ui.exportPromptsTxt")})}),e.jsx(Wt,{activeKey:this.state.promptViewMode,onChange:w=>this.setState({promptViewMode:w}),size:"small",items:[{key:"original",label:p("ui.promptModeOriginal")},{key:"context",label:p("ui.promptModeContext")},{key:"text",label:p("ui.promptModeText")}]}),this.state.promptViewMode==="text"?e.jsx("textarea",{readOnly:!0,className:h.promptTextarea,value:this.buildTextModeContent()}):e.jsxs("div",{className:h.promptScrollArea,children:[this.state.promptData.length===0&&e.jsx("div",{className:h.promptEmpty,children:p("ui.noPrompt")}),this.state.promptData.map((w,V)=>{const oe=w.timestamp?new Date(w.timestamp).toLocaleString():p("ui.unknownTime");return e.jsxs("div",{children:[e.jsxs("div",{className:h.promptTimestamp,children:[oe,":"]}),this.state.promptViewMode==="original"?this.renderOriginalPrompt(w):this.renderTextPrompt(w)]},V)})]})]}),e.jsxs(Ve,{title:p("ui.settings"),placement:"left",width:360,open:this.state.settingsDrawerVisible,onClose:()=>this.setState({settingsDrawerVisible:!1}),children:[e.jsxs("div",{className:h.settingsGroupBox,children:[e.jsx("div",{className:h.settingsGroupTitle,children:p("ui.chatDisplaySwitches")}),e.jsxs("div",{className:h.settingsItem,children:[e.jsx("span",{className:h.settingsLabel,children:p("ui.collapseToolResults")}),e.jsx(Oe,{checked:!!u,onChange:w=>j&&j(w)})]}),e.jsxs("div",{className:h.settingsItem,children:[e.jsx("span",{className:h.settingsLabel,children:p("ui.expandThinking")}),e.jsx(Oe,{checked:!!x,onChange:w=>g&&g(w)})]})]}),e.jsxs("div",{className:h.settingsGroupBox,children:[e.jsx("div",{className:h.settingsGroupTitle,children:p("ui.userPreferences")}),e.jsxs("div",{className:h.settingsItem,children:[e.jsx("span",{className:h.settingsLabel,children:p("ui.resumeAutoChoice")}),e.jsx(Oe,{checked:!!ee,onChange:w=>te&&te(w)})]}),ee&&e.jsx("div",{className:h.settingsItem,children:e.jsxs(et.Group,{value:ee,onChange:w=>F&&F(w.target.value),size:"small",children:[e.jsx(et,{value:"continue",children:p("ui.resumeAutoChoice.continue")}),e.jsx(et,{value:"new",children:p("ui.resumeAutoChoice.new")})]})})]})]}),e.jsxs(Ve,{title:p("ui.globalSettings"),placement:"left",width:400,open:this.state.globalSettingsVisible,onClose:()=>this.setState({globalSettingsVisible:!1}),children:[e.jsxs("div",{className:h.settingsItem,children:[e.jsx("span",{className:h.settingsLabel,children:p("ui.filterIrrelevant")}),e.jsx(Oe,{checked:!!S,onChange:w=>_&&_(w)})]}),e.jsxs("div",{className:h.settingsItem,children:[e.jsx("span",{className:h.settingsLabel,children:p("ui.expandDiff")}),e.jsx(Oe,{checked:!!v,onChange:w=>b&&b(w)})]})]}),e.jsx(Ve,{title:e.jsxs("span",{children:[e.jsx(Lt,{className:h.titleIcon}),p("ui.projectStats")]}),placement:"left",width:400,open:this.state.projectStatsVisible,onClose:()=>this.setState({projectStatsVisible:!1}),children:this.renderProjectStatsContent()}),e.jsxs(Ce,{title:e.jsxs("span",{children:[e.jsx(It,{className:h.titleIcon}),p("ui.pluginManagement")]}),open:this.state.pluginModalVisible,onCancel:()=>this.setState({pluginModalVisible:!1}),footer:e.jsxs("div",{className:h.pluginModalFooter,children:[e.jsxs("div",{className:h.pluginModalFooterLeft,children:[e.jsx(W,{icon:e.jsx(oa,{}),onClick:this.handleAddPlugin,children:p("ui.plugins.add")}),e.jsx(W,{icon:e.jsx(At,{}),onClick:this.handleShowCdnModal,children:p("ui.plugins.cdnInstall")})]}),e.jsx(W,{icon:e.jsx(ot,{}),onClick:this.handleReloadPlugins,children:p("ui.plugins.reload")})]}),width:560,children:[this.state.pluginsDir&&e.jsxs("div",{className:h.pluginDirHint,children:[e.jsxs("span",{className:h.pluginDirLabel,children:[p("ui.plugins.pluginsDir"),":"]})," ",e.jsx("code",{className:h.pluginDirPath,onClick:()=>{navigator.clipboard.writeText(this.state.pluginsDir).then(()=>{Q.success(p("ui.copied"))}).catch(()=>{})},children:this.state.pluginsDir})]}),this.state.pluginsList.length===0?e.jsxs("div",{className:h.pluginEmpty,children:[e.jsx("div",{className:h.pluginEmptyTitle,children:p("ui.plugins.empty")}),e.jsx("div",{className:h.pluginEmptyHint,children:p("ui.plugins.emptyHint")})]}):e.jsx("div",{className:h.pluginList,children:this.state.pluginsList.map(w=>e.jsxs("div",{className:h.pluginItem,children:[e.jsxs("div",{className:h.pluginInfo,children:[e.jsx("span",{className:h.pluginName,children:w.name}),e.jsx("span",{className:h.pluginFile,children:w.file}),w.hooks.length>0&&e.jsx("span",{className:h.pluginHooks,children:w.hooks.map(V=>e.jsx("span",{className:h.pluginHookTag,children:V},V))})]}),e.jsxs("div",{className:h.pluginActions,children:[e.jsx(Oe,{size:"small",checked:w.enabled,onChange:V=>this.handleTogglePlugin(w.name,V)}),e.jsx(W,{type:"text",size:"small",danger:!0,icon:e.jsx(Kt,{}),onClick:()=>this.handleDeletePlugin(w.file,w.name)})]})]},w.file))})]}),e.jsx(Ce,{title:p("ui.plugins.delete"),open:this.state.deleteConfirmVisible,onCancel:()=>this.setState({deleteConfirmVisible:!1,deleteTarget:null}),onOk:this.handleDeletePluginConfirm,okType:"danger",okText:"OK",cancelText:"Cancel",children:e.jsx("p",{children:this.state.deleteTarget?p("ui.plugins.deleteConfirm",{name:this.state.deleteTarget.name}):""})}),e.jsx(Ce,{title:e.jsxs("span",{children:[e.jsx(At,{className:h.titleIcon}),p("ui.plugins.cdnInstall")]}),open:this.state.cdnModalVisible,onCancel:this.handleCdnCancel,onOk:this.handleCdnInstall,confirmLoading:this.state.cdnLoading,okText:p("ui.plugins.cdnInstallBtn"),cancelText:p("ui.cancel"),width:480,children:e.jsxs("div",{children:[e.jsx("div",{className:h.cdnUrlLabel,children:p("ui.plugins.cdnUrl")}),e.jsx(Ct,{placeholder:p("ui.plugins.cdnUrlPlaceholder"),value:this.state.cdnUrl,onChange:this.handleCdnUrlChange,onPressEnter:this.handleCdnInstall,className:h.cdnInput})]})}),e.jsx(Ce,{title:e.jsxs("span",{children:[e.jsx(st,{className:h.titleIcon}),p("ui.processManagement")]}),open:this.state.processModalVisible,onCancel:()=>this.setState({processModalVisible:!1}),footer:e.jsx(W,{icon:e.jsx(ot,{}),onClick:this.fetchProcesses,loading:this.state.processLoading,children:p("ui.processManagement.refresh")}),width:780,children:e.jsx(ia,{dataSource:this.state.processList,rowKey:"pid",loading:this.state.processLoading,size:"middle",pagination:!1,columns:[{title:p("ui.processManagement.port"),dataIndex:"port",width:80,render:w=>w?e.jsx("a",{href:`${window.location.protocol}//127.0.0.1:${w}`,target:"_blank",rel:"noopener noreferrer",children:w}):""},{title:"PID",dataIndex:"pid",width:80},{title:p("ui.processManagement.command"),dataIndex:"command",ellipsis:!0},{title:p("ui.processManagement.startTime"),dataIndex:"startTime",width:200},{title:p("ui.processManagement.action"),width:100,render:(w,V)=>V.isCurrent?e.jsx(fe,{color:"green",children:p("ui.processManagement.current")}):e.jsx(W,{size:"small",danger:!0,onClick:()=>this.handleKillProcess(V.pid),children:p("ui.processManagement.kill")})}]})})]})}};O(ke,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let Ke=ke;const vn="_centerEmpty_1x9ij_1",jn="_scrollContainer_1x9ij_8",yn="_listItem_1x9ij_15",bn="_listItemActive_1x9ij_27",Cn="_itemContent_1x9ij_36",_n="_itemHeader_1x9ij_41",Nn="_tagNoMargin_1x9ij_49",Sn="_modelName_1x9ij_54",kn="_time_1x9ij_58",wn="_detailRow_1x9ij_64",Tn="_urlText_1x9ij_71",En="_duration_1x9ij_80",Mn="_statusOk_1x9ij_85",Rn="_statusErr_1x9ij_91",In="_statusDefault_1x9ij_96",Ln="_usageBox_1x9ij_101",An="_cacheDot_1x9ij_111",On="_cacheDotLoss_1x9ij_120",Bn="_cacheDotNormal_1x9ij_125",Pn="_tagPlan_1x9ij_129",Dn="_tagMuted_1x9ij_135",Hn="_tooltipPreLine_1x9ij_141",z={centerEmpty:vn,scrollContainer:jn,listItem:yn,listItemActive:bn,itemContent:Cn,itemHeader:_n,tagNoMargin:Nn,modelName:Sn,time:kn,detailRow:wn,urlText:Tn,duration:En,statusOk:Mn,statusErr:Rn,statusDefault:In,usageBox:Ln,cacheDot:An,cacheDotLoss:On,cacheDotNormal:Bn,tagPlan:Pn,tagMuted:Dn,tooltipPreLine:Hn};class Fn extends U.Component{constructor(t){super(t);O(this,"handleKeyDown",t=>{if(t.key!=="ArrowUp"&&t.key!=="ArrowDown")return;const{requests:a,selectedIndex:c,onSelect:l}=this.props;if(!a.length)return;t.preventDefault();const m=c??0,f=t.key==="ArrowUp"?Math.max(0,m-1):Math.min(a.length-1,m+1);f!==m&&l(f)});this.activeItemRef=U.createRef()}componentDidMount(){this.scrollToSelected(!0)}shouldComponentUpdate(t){return t.requests!==this.props.requests||t.selectedIndex!==this.props.selectedIndex||t.scrollCenter!==this.props.scrollCenter||t.cacheLossMap!==this.props.cacheLossMap}componentDidUpdate(t){this.props.scrollCenter&&t.selectedIndex!==this.props.selectedIndex?this.scrollToSelected(!0):t.selectedIndex!==this.props.selectedIndex&&(this.scrollToSelected(!1),this.activeItemRef.current&&this.activeItemRef.current.focus({preventScroll:!0}))}scrollToSelected(t){this.activeItemRef.current&&(this.activeItemRef.current.scrollIntoView({block:t?"center":"nearest",behavior:"instant"}),t&&this.props.onScrollDone&&this.props.onScrollDone())}render(){const{requests:t,selectedIndex:a,onSelect:c}=this.props;return t.length===0?e.jsx("div",{className:z.centerEmpty,children:e.jsx(we,{description:p("ui.waitingRequests")})}):e.jsx("div",{className:z.scrollContainer,onKeyDown:this.handleKeyDown,children:e.jsx(_t,{dataSource:t,size:"small",split:!1,renderItem:(l,m)=>{var T,R,B;const f=new Date(l.timestamp).toLocaleTimeString("zh-CN"),o=m===a,d=l.response&&l.response.status<400,i=l.response&&l.response.status>=400,r=ra((T=l.body)==null?void 0:T.model),u=m+1<t.length?t[m+1]:null,{type:j,subType:x}=$e(l,u),g=(B=(R=l.response)==null?void 0:R.body)==null?void 0:B.usage,v=g?(g.input_tokens||0)+(g.cache_read_input_tokens||0)+(g.cache_creation_input_tokens||0):null,b=(g==null?void 0:g.output_tokens)||null,S=(g==null?void 0:g.cache_read_input_tokens)||0,_=(g==null?void 0:g.cache_creation_input_tokens)||0;let C=l.url;try{const L=new URL(l.url);C=L.host+L.pathname}catch{}return e.jsx(_t.Item,{ref:o?this.activeItemRef:void 0,tabIndex:0,onClick:()=>c(m),className:`${z.listItem} ${o?z.listItemActive:""}`,children:e.jsxs("div",{className:z.itemContent,children:[e.jsxs("div",{className:z.itemHeader,children:[j==="MainAgent"?e.jsx(fe,{color:"orange",className:z.tagNoMargin,children:"MainAgent"}):j==="Plan"?e.jsx(fe,{className:`${z.tagNoMargin} ${z.tagPlan}`,children:Nt(j,x)}):j==="Count"||j==="Preflight"?e.jsx(fe,{className:`${z.tagNoMargin} ${z.tagMuted}`,children:j}):e.jsx(fe,{className:z.tagNoMargin,children:Nt(j,x)}),r&&e.jsx("span",{className:z.modelName,style:{color:j==="MainAgent"?"#d4822d":"#8c8c8c"},children:r}),e.jsx("span",{className:z.time,children:f})]}),e.jsxs("div",{className:z.detailRow,children:[e.jsx("span",{className:z.urlText,title:l.url,children:C}),l.duration&&e.jsxs("span",{className:z.duration,children:[l.duration,"ms"]}),l.response&&e.jsx("span",{className:d?z.statusOk:i?z.statusErr:z.statusDefault,children:l.response.status})]}),g&&e.jsxs("div",{className:z.usageBox,children:[e.jsxs("div",{children:["token: output:",q(b)||0,", input: ",q(v)||0]}),(S>0||_>0)&&e.jsx("div",{children:(()=>{var P;const L=(P=this.props.cacheLossMap)==null?void 0:P.get(m),E={ttl:"ui.cacheLoss.ttl",system_change:"ui.cacheLoss.systemChange",tools_change:"ui.cacheLoss.toolsChange",model_change:"ui.cacheLoss.modelChange",msg_truncated:"ui.cacheLoss.msgTruncated",msg_modified:"ui.cacheLoss.msgModified",key_change:"ui.cacheLoss.keyChange"};let I;if(L){const te=(L.reasons||[L.reason]).map(F=>p(E[F]||E.key_change)).join(`
27
+ `);I=e.jsx(Gt,{title:e.jsx("span",{className:z.tooltipPreLine,children:te}),children:e.jsx("span",{className:`${z.cacheDot} ${z.cacheDotLoss}`})})}else I=e.jsx("span",{className:`${z.cacheDot} ${z.cacheDotNormal}`});return e.jsxs(e.Fragment,{children:["cache",I,": ",S>0?`read:${q(S)}`:"",S>0&&_>0?", ":"",_>0?`create:${q(_)}`:""]})})()})]})]})})}})})}}const $n=n=>typeof n=="boolean"||n instanceof Boolean,zn=n=>typeof n=="number"||n instanceof Number,Vn=n=>typeof n=="bigint"||n instanceof BigInt,fs=n=>!!n&&n instanceof Date,Un=n=>typeof n=="string"||n instanceof String,qn=n=>Array.isArray(n),xs=n=>typeof n=="object"&&n!==null,vs=n=>!!n&&n instanceof Object&&typeof n=="function";function Ge(n,s){return s===void 0&&(s=!1),!n||s?`"${n}"`:n}function Wn(n,s,t){return t?JSON.stringify(n):s?`"${n}"`:n}function js(n){let{field:s,value:t,data:a,lastElement:c,openBracket:l,closeBracket:m,level:f,style:o,shouldExpandNode:d,clickToExpandNode:i,outerRef:r,beforeExpandChange:u}=n;const j=y.useRef(!1),[x,g]=y.useState(()=>d(f,t,s)),v=y.useRef(null);y.useEffect(()=>{j.current?g(d(f,t,s)):j.current=!0},[d]);const b=y.useId();if(a.length===0)return Kn({field:s,openBracket:l,closeBracket:m,lastElement:c,style:o});const S=x?o.collapseIcon:o.expandIcon,_=x?o.ariaLables.collapseJson:o.ariaLables.expandJson,C=f+1,T=a.length-1,R=E=>{x!==E&&(!u||u({level:f,value:t,field:s,newExpandValue:E}))&&g(E)},B=E=>{if(E.key==="ArrowRight"||E.key==="ArrowLeft")E.preventDefault(),R(E.key==="ArrowRight");else if(E.key==="ArrowUp"||E.key==="ArrowDown"){E.preventDefault();const I=E.key==="ArrowUp"?-1:1;if(!r.current)return;const P=r.current.querySelectorAll("[role=button]");let ee=-1;for(let F=0;F<P.length;F++)if(P[F].tabIndex===0){ee=F;break}if(ee<0)return;const te=(ee+I+P.length)%P.length;P[ee].tabIndex=-1,P[te].tabIndex=0,P[te].focus()}},L=()=>{var E;R(!x);const I=v.current;if(!I)return;const P=(E=r.current)===null||E===void 0?void 0:E.querySelector('[role=button][tabindex="0"]');P&&(P.tabIndex=-1),I.tabIndex=0,I.focus()};return y.createElement("div",{className:o.basicChildStyle,role:"treeitem","aria-expanded":x,"aria-selected":void 0},y.createElement("span",{className:S,onClick:L,onKeyDown:B,role:"button","aria-label":_,"aria-expanded":x,"aria-controls":x?b:void 0,ref:v,tabIndex:f===0?0:-1}),(s||s==="")&&(i?y.createElement("span",{className:o.clickableLabel,onClick:L,onKeyDown:B},Ge(s,o.quotesForFieldNames),":"):y.createElement("span",{className:o.label},Ge(s,o.quotesForFieldNames),":")),y.createElement("span",{className:o.punctuation},l),x?y.createElement("ul",{id:b,role:"group",className:o.childFieldsContainer},a.map((E,I)=>y.createElement(ct,{key:E[0]||I,field:E[0],value:E[1],style:o,lastElement:I===T,level:C,shouldExpandNode:d,clickToExpandNode:i,beforeExpandChange:u,outerRef:r}))):y.createElement("span",{className:o.collapsedContent,onClick:L,onKeyDown:B}),y.createElement("span",{className:o.punctuation},m),!c&&y.createElement("span",{className:o.punctuation},","))}function Kn(n){let{field:s,openBracket:t,closeBracket:a,lastElement:c,style:l}=n;return y.createElement("div",{className:l.basicChildStyle,role:"treeitem","aria-selected":void 0},(s||s==="")&&y.createElement("span",{className:l.label},Ge(s,l.quotesForFieldNames),":"),y.createElement("span",{className:l.punctuation},t),y.createElement("span",{className:l.punctuation},a),!c&&y.createElement("span",{className:l.punctuation},","))}function Gn(n){let{field:s,value:t,style:a,lastElement:c,shouldExpandNode:l,clickToExpandNode:m,level:f,outerRef:o,beforeExpandChange:d}=n;return js({field:s,value:t,lastElement:c||!1,level:f,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:l,clickToExpandNode:m,data:Object.keys(t).map(i=>[i,t[i]]),outerRef:o,beforeExpandChange:d})}function Jn(n){let{field:s,value:t,style:a,lastElement:c,level:l,shouldExpandNode:m,clickToExpandNode:f,outerRef:o,beforeExpandChange:d}=n;return js({field:s,value:t,lastElement:c||!1,level:l,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:m,clickToExpandNode:f,data:t.map(i=>[void 0,i]),outerRef:o,beforeExpandChange:d})}function Qn(n){let{field:s,value:t,style:a,lastElement:c}=n,l,m=a.otherValue;return t===null?(l="null",m=a.nullValue):t===void 0?(l="undefined",m=a.undefinedValue):Un(t)?(l=Wn(t,!a.noQuotesForStringValues,a.stringifyStringValues),m=a.stringValue):$n(t)?(l=t?"true":"false",m=a.booleanValue):zn(t)?(l=t.toString(),m=a.numberValue):Vn(t)?(l=`${t.toString()}n`,m=a.numberValue):fs(t)?l=t.toISOString():vs(t)?l="function() { }":l=t.toString(),y.createElement("div",{className:a.basicChildStyle,role:"treeitem","aria-selected":void 0},(s||s==="")&&y.createElement("span",{className:a.label},Ge(s,a.quotesForFieldNames),":"),y.createElement("span",{className:m},l),!c&&y.createElement("span",{className:a.punctuation},","))}function ct(n){const s=n.value;return qn(s)?y.createElement(Jn,Object.assign({},n)):xs(s)&&!fs(s)&&!vs(s)?y.createElement(Gn,Object.assign({},n)):y.createElement(Qn,Object.assign({},n))}var H={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti","container-dark":"_11RoI _GzYRV","expand-icon-dark":"_17H2C _f10Tu _1MFti _1UmXx","collapse-icon-dark":"_3QHg2 _f10Tu _1MFti _1LId0","collapsed-content-dark":"_3fDAz _1pNG9 _1MFti","label-dark":"_2bSDX","clickable-label-dark":"_1RQEj _2bSDX _1MFti","punctuation-dark":"_gsbQL _3eOF8","value-null-dark":"_LaAZe","value-undefined-dark":"_GTKgm","value-string-dark":"_Chy1W","value-number-dark":"_2bveF","value-boolean-dark":"_2vRm-","value-other-dark":"_1prJR"};const ys={collapseJson:"collapse JSON",expandJson:"expand JSON"},at={container:H["container-light"],basicChildStyle:H["basic-element-style"],childFieldsContainer:H["child-fields-container"],label:H["label-light"],clickableLabel:H["clickable-label-light"],nullValue:H["value-null-light"],undefinedValue:H["value-undefined-light"],stringValue:H["value-string-light"],booleanValue:H["value-boolean-light"],numberValue:H["value-number-light"],otherValue:H["value-other-light"],punctuation:H["punctuation-light"],collapseIcon:H["collapse-icon-light"],expandIcon:H["expand-icon-light"],collapsedContent:H["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:ys,stringifyStringValues:!1},Yn={container:H["container-dark"],basicChildStyle:H["basic-element-style"],childFieldsContainer:H["child-fields-container"],label:H["label-dark"],clickableLabel:H["clickable-label-dark"],nullValue:H["value-null-dark"],undefinedValue:H["value-undefined-dark"],stringValue:H["value-string-dark"],booleanValue:H["value-boolean-dark"],numberValue:H["value-number-dark"],otherValue:H["value-other-dark"],punctuation:H["punctuation-dark"],collapseIcon:H["collapse-icon-dark"],expandIcon:H["expand-icon-dark"],collapsedContent:H["collapsed-content-dark"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:ys,stringifyStringValues:!1},Xn=()=>!0,Zn=n=>{let{data:s,style:t=at,shouldExpandNode:a=Xn,clickToExpandNode:c=!1,beforeExpandChange:l,compactTopLevel:m,...f}=n;const o=y.useRef(null);return y.createElement("div",Object.assign({"aria-label":"JSON view"},f,{className:t.container,ref:o,role:"tree"}),m&&xs(s)?Object.entries(s).map(d=>{let[i,r]=d;return y.createElement(ct,{key:i,field:i,value:r,style:{...at,...t},lastElement:!0,level:1,shouldExpandNode:a,clickToExpandNode:c,beforeExpandChange:l,outerRef:o})}):y.createElement(ct,{value:s,style:{...at,...t},lastElement:!0,level:0,shouldExpandNode:a,clickToExpandNode:c,outerRef:o,beforeExpandChange:l}))},el="_container_1h2lr_1",tl={container:el},sl={...Yn,container:"rjv-container"};class Je extends U.Component{shouldComponentUpdate(s){return s.data!==this.props.data||s.defaultExpand!==this.props.defaultExpand||s.expandNode!==this.props.expandNode}render(){const{data:s,defaultExpand:t,expandNode:a}=this.props;if(s==null)return null;const c=typeof a=="function"?a:t==="all"?()=>!0:t==="root"?l=>l<2:l=>l<1;return e.jsx("div",{className:tl.container,children:e.jsx(Zn,{data:s,shouldExpandNode:c,style:sl})})}}function al({currentId:n,visibleIds:s=[],key:t}){if(t!=="ArrowUp"&&t!=="ArrowDown")return null;const a=s.findIndex(l=>l===n),c=t==="ArrowUp"?-1:1;return a>=0?s[a+c]??null:null}const nl="_root_e46oo_1",ll="_sidebar_e46oo_9",ol="_section_e46oo_18",il="_sectionHeader_e46oo_22",rl="_arrow_e46oo_48",cl="_sectionTitle_e46oo_54",dl="_sectionCount_e46oo_62",hl="_sectionBody_e46oo_71",ul="_historyToggle_e46oo_76",ml="_historyToggleLabel_e46oo_102",pl="_item_e46oo_107",gl="_itemActive_e46oo_133",fl="_itemContent_e46oo_143",xl="_itemLabel_e46oo_149",vl="_itemSublabel_e46oo_157",jl="_itemTime_e46oo_166",yl="_content_e46oo_175",bl="_contentEmpty_e46oo_183",Cl="_contentInner_e46oo_190",_l="_emptyWrap_e46oo_194",Nl="_roleHeader_e46oo_202",Sl="_roleBadge_e46oo_210",kl="_role_user_e46oo_219",wl="_role_assistant_e46oo_225",Tl="_roleLabel_e46oo_231",El="_contentTime_e46oo_238",Ml="_turnDivider_e46oo_246",Rl="_textBlock_e46oo_253",Il="_textBlockBar_e46oo_260",Ll="_textBlockBody_e46oo_269",Al="_textBlockCompact_e46oo_277",Ol="_textBlockCompactFloat_e46oo_284",Bl="_thinkingBlock_e46oo_291",Pl="_thinkingHeader_e46oo_299",Dl="_thinkingPreview_e46oo_314",Hl="_thinkingBody_e46oo_324",Fl="_toolBlock_e46oo_330",$l="_toolBlockResult_e46oo_337",zl="_toolBlockError_e46oo_341",Vl="_toolBlockHeader_e46oo_345",Ul="_toolBlockBody_e46oo_356",ql="_toolName_e46oo_361",Wl="_toolId_e46oo_367",Kl="_errorLabel_e46oo_374",Gl="_blockTag_e46oo_384",Jl="_blockTagText_e46oo_397",Ql="_blockTagThinking_e46oo_403",Yl="_blockTagResult_e46oo_409",Xl="_blockTagError_e46oo_415",Zl="_jsonBlock_e46oo_422",eo="_jsonBlockLabel_e46oo_429",to="_blockSeparator_e46oo_439",so="_markdownBody_e46oo_446",k={root:nl,sidebar:ll,section:ol,sectionHeader:il,arrow:rl,sectionTitle:cl,sectionCount:dl,sectionBody:hl,historyToggle:ul,historyToggleLabel:ml,item:pl,itemActive:gl,itemContent:fl,itemLabel:xl,itemSublabel:vl,itemTime:jl,content:yl,contentEmpty:bl,contentInner:Cl,emptyWrap:_l,roleHeader:Nl,roleBadge:Sl,role_user:kl,role_assistant:wl,roleLabel:Tl,contentTime:El,turnDivider:Ml,textBlock:Rl,textBlockBar:Il,textBlockBody:Ll,textBlockCompact:Al,textBlockCompactFloat:Ol,thinkingBlock:Bl,thinkingHeader:Pl,thinkingPreview:Dl,thinkingBody:Hl,toolBlock:Fl,toolBlockResult:$l,toolBlockError:zl,toolBlockHeader:Vl,toolBlockBody:Ul,toolName:ql,toolId:Wl,errorLabel:Kl,blockTag:Gl,blockTagText:Jl,blockTagThinking:Ql,blockTagResult:Yl,blockTagError:Xl,jsonBlock:Zl,jsonBlockLabel:eo,blockSeparator:to,markdownBody:so},{Text:ao}=Jt;function dt(n){if(n==null)return[];if(typeof n=="string"){const s=n.trim();return s?[{type:"markdown",text:s}]:[]}if(Array.isArray(n)){const s=[];for(const t of n)if(t)if(t.type==="text"){const a=(t.text||"").trim();a&&s.push({type:"markdown",text:a})}else if(t.type==="tool_use")s.push({type:"tool_use",name:t.name||"unknown",id:t.id||"",input:t.input??{}});else if(t.type==="tool_result"){const a=no(t.content);s.push({type:"tool_result",tool_use_id:t.tool_use_id||"",is_error:t.is_error,content:a})}else if(t.type==="thinking"){const a=t.thinking||"";a.trim()&&s.push({type:"thinking",text:a})}else t.type==="image"?s.push({type:"json",label:"image",data:t}):s.push({type:"json",label:t.type||"block",data:t});return s}return[{type:"json",label:"content",data:n}]}function no(n){if(n==null)return[];if(typeof n=="string"){const s=n.trim();return s?[{type:"markdown",text:s}]:[]}return Array.isArray(n)?n.flatMap(s=>{if(!s)return[];if(s.type==="text"){const t=(s.text||"").trim();return t?[{type:"markdown",text:t}]:[]}return[{type:"json",label:s.type||"block",data:s}]}):[{type:"json",label:"content",data:n}]}function lo(n){if(!n)return null;if(typeof n=="string")return[{type:"markdown",text:n}];if(Array.isArray(n)){const s=[];return n.forEach((t,a)=>{a>0&&s.push({type:"separator"}),t&&(typeof t=="string"?s.push({type:"markdown",text:t}):t.type==="text"?s.push({type:"markdown",text:t.text||""}):s.push({type:"json",label:t.type||"item",data:t}))}),s}return[{type:"json",label:"system",data:n}]}function oo(n){const s=[],t=(n==null?void 0:n.name)||"unknown",a=(n==null?void 0:n.description)||"";let c=`### ${t}
28
+
29
+ `;a&&(c+=`${a}
30
+
31
+ `),s.push({type:"markdown",text:c});const l=(n==null?void 0:n.input_schema)||(n==null?void 0:n.parameters)||null;return l&&s.push({type:"json",label:"Parameters",data:l}),s}function io(n){var s;if(typeof n=="string")return n.slice(0,60).replace(/\n/g," ");if(Array.isArray(n)){for(const t of n)if((t==null?void 0:t.type)==="text"&&((s=t.text)!=null&&s.trim()))return t.text.trim().slice(0,60).replace(/\n/g," ")}return""}function ro(n){var a;const s=[];let t=0;for(;t<n.length;){const c=n[t];if((c==null?void 0:c.role)!=="user"){t++;continue}const l=((a=n[t+1])==null?void 0:a.role)==="assistant"?n[t+1]:null;s.push({id:`turn__${t}`,isTurn:!0,turnIndex:s.length,timestamp:c._timestamp||null,assistantTimestamp:(l==null?void 0:l._timestamp)||null,userBlocks:dt(c==null?void 0:c.content),assistantBlocks:l?dt(l.content):null,preview:io(c==null?void 0:c.content)}),t+=l?2:1}return s}function ht(n){try{return new Date(n).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch{return null}}function co({text:n,compact:s}){const t=Qt(n);return s?e.jsx("div",{className:k.textBlockCompact,children:e.jsx("div",{className:`chat-md ${k.markdownBody}`,dangerouslySetInnerHTML:{__html:t}})}):e.jsxs("div",{className:k.textBlock,children:[e.jsx("div",{className:k.textBlockBar,children:e.jsx("span",{className:`${k.blockTag} ${k.blockTagText}`,children:"text"})}),e.jsx("div",{className:`chat-md ${k.textBlockBody}`,dangerouslySetInnerHTML:{__html:t}})]})}function ho({block:n}){const[s,t]=y.useState(!0),a=n.text.length>60?n.text.slice(0,60).replace(/\n/g," ")+"…":n.text.replace(/\n/g," ");return e.jsxs("div",{className:k.thinkingBlock,children:[e.jsxs("div",{className:k.thinkingHeader,onClick:()=>t(c=>!c),children:[s?e.jsx(Te,{className:k.arrow}):e.jsx(Ee,{className:k.arrow}),e.jsx("span",{className:`${k.blockTag} ${k.blockTagThinking}`,children:"thinking"}),!s&&e.jsx("span",{className:k.thinkingPreview,children:a})]}),s&&e.jsx("div",{className:k.thinkingBody,children:e.jsx("div",{className:`chat-md ${k.markdownBody}`,dangerouslySetInnerHTML:{__html:Qt(n.text)}})})]})}function Qe({blocks:n,compact:s}){return!n||n.length===0?null:e.jsx(e.Fragment,{children:n.map((t,a)=>e.jsx(uo,{block:t,compact:s},a))})}function uo({block:n,compact:s}){var t;return n.type==="separator"?e.jsx("hr",{className:k.blockSeparator}):n.type==="markdown"?(t=n.text)!=null&&t.trim()?e.jsx(co,{text:n.text,compact:s}):null:n.type==="thinking"?e.jsx(ho,{block:n}):n.type==="tool_use"?e.jsxs("div",{className:k.toolBlock,children:[e.jsxs("div",{className:k.toolBlockHeader,children:[e.jsx("span",{className:k.blockTag,children:"tool_use"}),e.jsx("span",{className:k.toolName,children:n.name}),n.id&&e.jsx("span",{className:k.toolId,children:n.id})]}),e.jsx("div",{className:k.toolBlockBody,children:e.jsx(Je,{data:n.input,defaultExpand:"root"})})]}):n.type==="tool_result"?e.jsxs("div",{className:`${k.toolBlock} ${n.is_error?k.toolBlockError:k.toolBlockResult}`,children:[e.jsxs("div",{className:k.toolBlockHeader,children:[e.jsx("span",{className:`${k.blockTag} ${n.is_error?k.blockTagError:k.blockTagResult}`,children:"tool_result"}),n.tool_use_id&&e.jsx("span",{className:k.toolId,children:n.tool_use_id}),n.is_error&&e.jsx("span",{className:k.errorLabel,children:"error"})]}),e.jsx("div",{className:k.toolBlockBody,children:e.jsx(Qe,{blocks:n.content,compact:!0})})]}):n.type==="json"?e.jsxs("div",{className:k.jsonBlock,children:[n.label&&e.jsx("div",{className:k.jsonBlockLabel,children:n.label}),e.jsx(Je,{data:n.data,defaultExpand:"root"})]}):null}function mo({turn:n}){const s=n.timestamp?ht(n.timestamp):null,t=n.assistantTimestamp?ht(n.assistantTimestamp):null;return e.jsxs("div",{children:[e.jsxs("div",{className:k.roleHeader,children:[e.jsx("span",{className:`${k.roleBadge} ${k.role_user}`,children:"user"}),e.jsx("span",{className:k.roleLabel,children:`Turn ${n.turnIndex+1}`}),s&&e.jsx("span",{className:k.contentTime,children:s})]}),e.jsx(Qe,{blocks:n.userBlocks}),n.assistantBlocks&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:k.turnDivider}),e.jsxs("div",{className:k.roleHeader,children:[e.jsx("span",{className:`${k.roleBadge} ${k.role_assistant}`,children:"assistant"}),t&&e.jsx("span",{className:k.contentTime,children:t})]}),e.jsx(Qe,{blocks:n.assistantBlocks})]})]})}function po({sectionKey:n,title:s,items:t,historyItems:a=[],onSelect:c,onSelectById:l,selectedId:m,sidebarRef:f}){const[o,d]=y.useState(n!=="tools"),[i,r]=y.useState(!1),u=t.length+a.length,j=`${n}__history_toggle`;function x(b){var _;const S=(_=f.current)==null?void 0:_.querySelector(`[data-context-sidebar-control="${b}"]`);S&&(S.focus(),S.scrollIntoView({block:"nearest"}))}function g(b,S){var T;const _=Array.from(((T=f.current)==null?void 0:T.querySelectorAll("[data-context-sidebar-control]"))||[]).map(R=>R.dataset.contextSidebarControl).filter(Boolean),C=al({currentId:S,visibleIds:_,key:b.key});C&&(b.preventDefault(),typeof window<"u"&&window.requestAnimationFrame(()=>{var B;x(C);const R=(B=f.current)==null?void 0:B.querySelector(`[data-context-sidebar-control="${C}"]`);(R==null?void 0:R.dataset.controlType)==="item"&&l(C)}))}function v(b){const S=m===b.id;return e.jsxs("button",{type:"button",className:`${k.item} ${S?k.itemActive:""}`,onClick:()=>c(b),onKeyDown:_=>g(_,b.id),"aria-current":S?"true":void 0,"data-context-sidebar-control":b.id,"data-control-type":"item",children:[e.jsxs("div",{className:k.itemContent,children:[e.jsx("span",{className:k.itemLabel,children:b.label}),b.sublabel&&!S&&e.jsx("div",{className:k.itemSublabel,children:b.sublabel})]}),b.time&&e.jsx("span",{className:k.itemTime,children:b.time})]},b.id)}return e.jsxs("div",{className:k.section,children:[e.jsxs("button",{type:"button",className:k.sectionHeader,onClick:()=>d(b=>!b),"aria-expanded":o,children:[o?e.jsx(Te,{className:k.arrow}):e.jsx(Ee,{className:k.arrow}),e.jsx("span",{className:k.sectionTitle,children:s}),e.jsx("span",{className:k.sectionCount,children:u})]}),o&&e.jsxs("div",{className:k.sectionBody,children:[a.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:k.historyToggle,onClick:()=>r(b=>!b),onKeyDown:b=>g(b,j),"aria-expanded":i,"data-context-sidebar-control":j,"data-control-type":"toggle",children:[i?e.jsx(Te,{className:k.arrow}):e.jsx(Ee,{className:k.arrow}),e.jsxs("span",{className:k.historyToggleLabel,children:[p("ui.context.history")," (",a.length,")"]})]}),i&&a.map(v)]}),t.map(v)]})]})}function go({body:n,response:s}){const[t,a]=y.useState(null),c=y.useRef(null),l=y.useMemo(()=>{if(!Array.isArray(n==null?void 0:n.messages))return[];const i=ro(n.messages);if(i.length===0)return i;const r=i[i.length-1],u=s!=null&&s.content?dt(s.content):null;return[...i.slice(0,-1),{...r,assistantBlocks:u??r.assistantBlocks}]},[n,s]);if(y.useEffect(()=>{l.length>0?a(l[l.length-1]):a(null)},[n,s]),!n||typeof n!="object")return e.jsx("div",{className:k.emptyWrap,children:e.jsx(we,{description:p("ui.context.noData")})});const m=[];Array.isArray(n.tools)&&n.tools.length>0&&m.push({key:"tools",title:e.jsxs(e.Fragment,{children:[p("ui.context.tools")," ",e.jsx(je,{doc:"ToolsFirst"})]}),items:n.tools.map((i,r)=>({id:`tool__${r}`,label:(i==null?void 0:i.name)||`Tool ${r}`,blocks:oo(i)}))});const f=lo(n.system);if(f!=null&&m.push({key:"system",title:p("ui.context.systemPrompt"),items:[{id:"system__0",label:p("ui.context.systemPrompt"),blocks:f}]}),l.length>0){const i=x=>({...x,label:p("ui.context.historyTurnNoTime",{n:x.turnIndex+1}),time:x.timestamp?ht(x.timestamp):null,sublabel:x.preview||void 0}),r=x=>({...x,label:p("ui.context.currentTurn"),sublabel:x.preview||void 0}),u=l.slice(0,-1).map(i),j=r(l[l.length-1]);m.push({key:"messages",title:p("ui.context.messages"),historyItems:u.length>0?u:void 0,items:[j]})}if(m.length===0)return e.jsx("div",{className:k.emptyWrap,children:e.jsx(we,{description:p("ui.context.noFields")})});const o=t!=null&&t.isTurn?l.find(i=>i.id===t.id)??null:t,d=new Map;return m.forEach(i=>{(i.historyItems||[]).forEach(r=>d.set(r.id,r)),i.items.forEach(r=>d.set(r.id,r))}),e.jsxs("div",{className:k.root,children:[e.jsx("div",{ref:c,className:k.sidebar,children:m.map(i=>e.jsx(po,{sectionKey:i.key,title:i.title,items:i.items,historyItems:i.historyItems,selectedId:o==null?void 0:o.id,onSelect:r=>a(r),onSelectById:r=>{const u=d.get(r);u&&a(u)},sidebarRef:c},i.key))}),e.jsx("div",{className:k.content,children:o==null?e.jsx("div",{className:k.contentEmpty,children:e.jsx(ao,{type:"secondary",children:p("ui.context.selectPrompt")})}):e.jsx("div",{className:k.contentInner,children:o.isTurn?e.jsx(mo,{turn:o}):e.jsxs(e.Fragment,{children:[o.role&&e.jsxs("div",{className:k.roleHeader,children:[e.jsx("span",{className:`${k.roleBadge} ${k[`role_${o.role}`]||""}`,children:o.role}),e.jsx("span",{className:k.roleLabel,children:o.label})]}),e.jsx(Qe,{blocks:o.blocks})]})},o.id)})]})}const fo="_container_15skw_1",xo="_emptyState_15skw_9",vo="_urlSection_15skw_16",jo="_urlLeft_15skw_23",yo="_tokenStatsBox_15skw_28",bo="_tokenGrid_15skw_35",Co="_tokenRows_15skw_45",_o="_tokenRow_15skw_45",No="_tokenRowBorder_15skw_53",So="_tokenLabel_15skw_57",ko="_tokenTd_15skw_64",wo="_tokenHitRate_15skw_73",To="_tokenHitRateLabel_15skw_86",Eo="_urlText_15skw_96",Mo="_metaText_15skw_103",Ro="_headersContainer_15skw_107",Io="_headerRow_15skw_111",Lo="_headerKey_15skw_117",Ao="_headerValue_15skw_122",Oo="_streamingBox_15skw_127",Bo="_rawTextPre_15skw_140",Po="_tabContent_15skw_153",Do="_bodyLabel_15skw_161",Ho="_bodyHeader_15skw_165",Fo="_diffSection_15skw_172",$o="_diffToggle_15skw_176",zo="_diffIcon_15skw_182",Vo="_reminderSelect_15skw_208",Uo="_diffHeaderRow_15skw_227",qo="_diffSpaceRight_15skw_233",Wo="_reminderFilterWrapper_15skw_237",Ko="_reminderLabel_15skw_243",Go="_cacheTabContent_15skw_249",Jo="_userPromptList_15skw_254",Qo="_userPromptItem_15skw_260",Yo="_userPromptNavBtn_15skw_271",Xo="_cacheContent_15skw_282",Zo="_cacheTokenBar_15skw_289",ei="_cacheTokenWrite_15skw_299",ti="_cacheTokenRead_15skw_303",si="_cacheCopyIcon_15skw_307",ai="_cacheScrollArea_15skw_314",ni="_cacheSectionBlock_15skw_320",li="_cacheSectionHeader_15skw_324",oi="_cacheCollapseArrow_15skw_336",ii="_cachePre_15skw_342",ri="_cachePreSystem_15skw_356",N={container:fo,emptyState:xo,urlSection:vo,urlLeft:jo,tokenStatsBox:yo,tokenGrid:bo,tokenRows:Co,tokenRow:_o,tokenRowBorder:No,tokenLabel:So,tokenTd:ko,tokenHitRate:wo,tokenHitRateLabel:To,urlText:Eo,metaText:Mo,headersContainer:Ro,headerRow:Io,headerKey:Lo,headerValue:Ao,streamingBox:Oo,rawTextPre:Bo,tabContent:Po,bodyLabel:Do,bodyHeader:Ho,diffSection:Fo,diffToggle:$o,diffIcon:zo,reminderSelect:Vo,diffHeaderRow:Uo,diffSpaceRight:qo,reminderFilterWrapper:Wo,reminderLabel:Ko,cacheTabContent:Go,userPromptList:Jo,userPromptItem:Qo,userPromptNavBtn:Yo,cacheContent:Xo,cacheTokenBar:Zo,cacheTokenWrite:ei,cacheTokenRead:ti,cacheCopyIcon:si,cacheScrollArea:ai,cacheSectionBlock:ni,cacheSectionHeader:li,cacheCollapseArrow:oi,cachePre:ii,cachePreSystem:ri},{Text:ce,Paragraph:ci}=Jt;class di extends U.Component{constructor(s){super(s),this.state={bodyViewMode:{request:"json",response:"json",diff:"json"},diffExpanded:!1,requestHeadersExpanded:!1,responseHeadersExpanded:!1,reminderFilters:null,cacheHighlightIdx:null,cacheHighlightFading:!1,cacheCollapsed:{tools:!1,system:!1,messages:!1}}}_cacheUnbindScrollFade(){this._cacheOnScrollFade&&this._cacheScrollEl&&(this._cacheScrollEl.removeEventListener("scroll",this._cacheOnScrollFade),this._cacheOnScrollFade=null)}_cacheClearAllTimers(){clearTimeout(this._cacheScrollSettleTimer),clearTimeout(this._cacheFadeClearTimer),clearTimeout(this._cacheAutoFadeTimer),clearTimeout(this._cacheHighlightDelayTimer),this._cacheUnbindScrollFade(),this._cacheScrollEndHandler&&this._cacheScrollEl&&(this._cacheScrollEl.removeEventListener("scrollend",this._cacheScrollEndHandler),this._cacheScrollEndHandler=null)}componentWillUnmount(){this._cacheClearAllTimers()}_cacheBindScrollFade(){this._cacheUnbindScrollFade();const s=this._cacheScrollEl;s&&(this._cacheOnScrollFade=()=>{clearTimeout(this._cacheAutoFadeTimer),this.setState({cacheHighlightFading:!0}),this._cacheFadeClearTimer=setTimeout(()=>{this.setState({cacheHighlightIdx:null,cacheHighlightFading:!1})},3e3),this._cacheUnbindScrollFade()},s.addEventListener("scroll",this._cacheOnScrollFade,{passive:!0}))}scrollToCacheMsg(s){const t=this._cacheScrollEl;if(!t)return;const a=t.querySelector(`[data-msg-idx="${s}"]`);if(!a)return;clearTimeout(this._cacheScrollSettleTimer),clearTimeout(this._cacheFadeClearTimer),clearTimeout(this._cacheAutoFadeTimer),clearTimeout(this._cacheHighlightDelayTimer),this._cacheUnbindScrollFade(),this._cacheScrollEndHandler&&t.removeEventListener("scrollend",this._cacheScrollEndHandler),this.setState({cacheHighlightIdx:null,cacheHighlightFading:!1});let c=!1,l=!1;const m=()=>{!c||!l||(this.setState({cacheHighlightIdx:s,cacheHighlightFading:!1}),this._cacheScrollSettleTimer=setTimeout(()=>this._cacheBindScrollFade(),200),this._cacheAutoFadeTimer=setTimeout(()=>{this.state.cacheHighlightIdx===s&&!this.state.cacheHighlightFading&&(this.setState({cacheHighlightFading:!0}),this._cacheFadeClearTimer=setTimeout(()=>{this.setState({cacheHighlightIdx:null,cacheHighlightFading:!1})},3e3),this._cacheUnbindScrollFade())},3e3))};this._cacheScrollEndHandler=()=>{t.removeEventListener("scrollend",this._cacheScrollEndHandler),c=!0,m()},t.addEventListener("scrollend",this._cacheScrollEndHandler,{once:!0}),this._cacheScrollSettleTimer=setTimeout(()=>{t.removeEventListener("scrollend",this._cacheScrollEndHandler),c=!0,m()},800),this._cacheHighlightDelayTimer=setTimeout(()=>{l=!0,m()},500),a.scrollIntoView({behavior:"smooth",block:"center"})}shouldComponentUpdate(s,t){if(s.request!==this.props.request){const c=be(s.request);this.setState({diffExpanded:c&&!!s.expandDiff,requestHeadersExpanded:!1,responseHeadersExpanded:!1,reminderFilters:null}),this._cacheClearAllTimers()}const a=s.currentTab==="kv-cache-text";return s.request!==this.props.request||s.currentTab!==this.props.currentTab||s.onTabChange!==this.props.onTabChange||s.selectedIndex!==this.props.selectedIndex||s.expandDiff!==this.props.expandDiff||s.pendingCacheHighlight!==this.props.pendingCacheHighlight||t.bodyViewMode!==this.state.bodyViewMode||a&&t.cacheHighlightIdx!==this.state.cacheHighlightIdx||a&&t.cacheHighlightFading!==this.state.cacheHighlightFading||t.diffExpanded!==this.state.diffExpanded||t.requestHeadersExpanded!==this.state.requestHeadersExpanded||t.responseHeadersExpanded!==this.state.responseHeadersExpanded||t.reminderFilters!==this.state.reminderFilters||a&&t.cacheCollapsed!==this.state.cacheCollapsed}componentDidUpdate(s){const t=this.props.pendingCacheHighlight;t&&t!==s.pendingCacheHighlight&&setTimeout(()=>{var a,c;this.scrollToCacheMsg(t.msgIdx),(c=(a=this.props).onCacheHighlightDone)==null||c.call(a)},150)}toggleBodyViewMode(s){this.setState(t=>({bodyViewMode:{...t.bodyViewMode,[s]:t.bodyViewMode[s]==="json"?"text":"json"}}))}copyBody(s){var m;const{request:t}=this.props;if(!t)return;let a;if(s==="diff"?a=this._lastDiffResult:a=s==="request"?t.body:(m=t.response)==null?void 0:m.body,a==null)return;const c=typeof a=="object"?tt(a):a,l=typeof c=="string"?c:JSON.stringify(c,null,2);navigator.clipboard.writeText(l).then(()=>Q.success(p("ui.copySuccess")))}renderHeaders(s){return!s||Object.keys(s).length===0?e.jsx(ce,{type:"secondary",children:p("ui.noHeaders")}):e.jsx("div",{className:N.headersContainer,children:Object.entries(s).map(([t,a])=>e.jsxs("div",{className:N.headerRow,children:[e.jsx(ce,{code:!0,className:N.headerKey,children:t}),t==="authorization"&&e.jsx(je,{doc:"TranslateContextPollution"}),e.jsx(ce,{type:"secondary",className:N.headerValue,children:String(a)})]},t))})}getRequestExpandNode(s,t){if(t!=="request"||!s||typeof s!="object")return;const{request:a,requests:c,selectedIndex:l}=this.props;if(!a)return;const m=c&&l!=null?c[l+1]:null,{type:f}=$e(a,m);let o=null;if(this.state.reminderFilters==="claudeMd"&&Array.isArray(s.messages)){o=new Set,o.add(s.messages);for(const r of s.messages){if(!r||typeof r!="object")continue;const u=r.content;if(typeof u=="string")St(u)&&o.add(r);else if(Array.isArray(u)){let j=!1;for(const x of u)x&&x.type==="text"&&St(x.text)&&(o.add(x),j=!0);j&&(o.add(r),o.add(u))}}}let d=null;if(this.state.reminderFilters==="skills"&&Array.isArray(s.messages)){d=new Set,d.add(s.messages);for(const r of s.messages){if(!r||typeof r!="object")continue;const u=r.content;if(typeof u=="string")kt(u)&&d.add(r);else if(Array.isArray(u)){let j=!1;for(const x of u)x&&x.type==="text"&&kt(x.text)&&(d.add(x),j=!0);j&&(d.add(r),d.add(u))}}}const i=o||d;if(f==="Preflight"){const r=new Set,u=j=>{j&&typeof j=="object"&&(r.add(j),Array.isArray(j)?j.forEach(u):Object.values(j).forEach(u))};return Array.isArray(s.messages)&&u(s.messages),Array.isArray(s.system)&&s.system.length>=3&&u(s.system[2]),(j,x,g)=>!!(j<2||r.has(x)||i&&i.has(x)||j===1&&g==="system")}if(f==="MainAgent"&&Array.isArray(s.messages)&&s.messages.length===1){const r=s.messages[0],u=r&&Array.isArray(r.content)?r.content:null,j=u&&u.length>0?u[u.length-1]:null,x=new Set,g=v=>{v&&typeof v=="object"&&(x.add(v),Array.isArray(v)?v.forEach(g):Object.values(v).forEach(g))};return j&&g(j),x.add(s.messages),r&&typeof r=="object"&&x.add(r),u&&x.add(u),(v,b,S)=>!!(v<2||x.has(b)||i&&i.has(b))}if(i)return(r,u,j)=>!!(r<2||i.has(u))}renderBody(s,t){const{bodyViewMode:a}=this.state;if(s==null)return e.jsx(ce,{type:"secondary",children:p("ui.noBody")});if(typeof s=="string"&&s.includes("Streaming Response"))return e.jsx("div",{className:N.streamingBox,children:e.jsx(ce,{type:"secondary",children:p("ui.streamingResponse")})});const c=typeof s=="object"?tt(s):s,l=a[t]==="json",m=this.getRequestExpandNode(c,t);return e.jsx("div",{children:l?e.jsx(Je,{data:c,defaultExpand:t==="response"?"all":"root",expandNode:m}):e.jsx("pre",{className:N.rawTextPre,children:typeof c=="string"?c:JSON.stringify(c,null,2)})})}getPrevMainAgentRequest(){const{requests:s,selectedIndex:t}=this.props;if(!s||t==null)return null;for(let a=t-1;a>=0;a--)if(be(s[a])){const c=s[a];return c._slimmed?wt(c,this.props.allRequests||s):c}return null}computeDiff(s,t){if(s==null||t==null||typeof s!="object"||typeof t!="object")return null;const a={},c=new Set([...Object.keys(s),...Object.keys(t)]);for(const l of c)if(!l.startsWith("_"))if(!(l in s))a[l]=t[l];else if(l in t){const m=JSON.stringify(s[l]),f=JSON.stringify(t[l]);m!==f&&(l==="messages"&&Array.isArray(s[l])&&Array.isArray(t[l])&&t[l].length>s[l].length?a[l]=t[l].slice(s[l].length):a[l]=t[l])}else continue;return Object.keys(a).length?a:null}render(){var u,j,x;let{request:s,currentTab:t,onTabChange:a}=this.props;if(!s)return e.jsx("div",{className:N.emptyState,children:e.jsx(we,{description:"选择一个请求查看详情"})});s._slimmed&&(s=wt(s,this.props.allRequests||this.props.requests));const c=new Date(s.timestamp).toLocaleString("zh-CN"),l=s.response&&s.response.status<400;let m=null;if(be(s)){const g=this.getPrevMainAgentRequest();if(g){const v=JSON.stringify(s.body).length,b=JSON.stringify(g.body).length;if(v<b)m=e.jsxs("div",{className:N.diffSection,children:[e.jsxs(ce,{strong:!0,className:N.diffToggle,onClick:()=>this.setState(_=>({diffExpanded:!_.diffExpanded})),children:["Body Diff JSON ",e.jsx(je,{doc:"BodyDiffJSON"})," ",this.state.diffExpanded?e.jsx(Te,{className:N.diffIcon}):e.jsx(Ee,{className:N.diffIcon})]}),this.state.diffExpanded&&e.jsx(ce,{type:"secondary",children:p("ui.diffSessionChanged")})]});else{const _=tt(this.computeDiff(g.body,s.body));_&&(this._lastDiffResult=_,m=e.jsxs("div",{className:N.diffSection,children:[e.jsxs("div",{className:N.diffHeaderRow,children:[e.jsxs(ce,{strong:!0,className:N.diffToggle,onClick:()=>this.setState(C=>({diffExpanded:!C.diffExpanded})),children:["Body Diff JSON ",e.jsx(je,{doc:"BodyDiffJSON"})," ",this.state.diffExpanded?e.jsx(Te,{className:N.diffIcon}):e.jsx(Ee,{className:N.diffIcon})]}),this.state.diffExpanded&&e.jsxs(De,{size:"small",className:N.diffSpaceRight,children:[e.jsx(W,{size:"small",icon:this.state.bodyViewMode.diff==="json"?e.jsx(Ue,{}):e.jsx(qe,{}),onClick:()=>this.toggleBodyViewMode("diff"),children:this.state.bodyViewMode.diff==="json"?"Text":"JSON"}),e.jsx(W,{size:"small",icon:e.jsx(Pe,{}),onClick:()=>this.copyBody("diff"),children:p("ui.copy")})]})]}),this.state.diffExpanded&&e.jsx(e.Fragment,{children:this.state.bodyViewMode.diff==="json"?e.jsx(Je,{data:_,defaultExpand:"all"}):e.jsx("pre",{className:N.rawTextPre,children:JSON.stringify(_,null,2)})})]}))}}}const f=ca(s.body),o=da(s.body),d=[{key:"request",label:"Request",children:e.jsxs("div",{className:N.tabContent,children:[e.jsxs("div",{className:N.diffSection,children:[e.jsxs(ce,{strong:!0,className:N.diffToggle,onClick:()=>this.setState(g=>({requestHeadersExpanded:!g.requestHeadersExpanded})),children:["Headers ",this.state.requestHeadersExpanded?e.jsx(Te,{className:N.diffIcon}):e.jsx(Ee,{className:N.diffIcon})]}),this.state.requestHeadersExpanded&&this.renderHeaders(s.headers)]}),m,e.jsxs("div",{children:[e.jsxs("div",{className:N.bodyHeader,children:[e.jsx(ce,{strong:!0,className:N.bodyLabel,children:"Body"}),e.jsxs(De,{size:"small",children:[(f||o)&&e.jsxs("span",{className:N.reminderFilterWrapper,children:[e.jsx("span",{className:N.reminderLabel,children:"system-reminder:"}),e.jsx(Ut,{size:"small",className:N.reminderSelect,placeholder:"filter",value:this.state.reminderFilters||void 0,onChange:g=>this.setState({reminderFilters:g||null}),options:[{label:"CLAUDE.md",value:"claudeMd",disabled:!f},{label:"Skills",value:"skills",disabled:!o}],popupMatchSelectWidth:!1,allowClear:!0})]}),e.jsx(W,{size:"small",icon:this.state.bodyViewMode.request==="json"?e.jsx(Ue,{}):e.jsx(qe,{}),onClick:()=>this.toggleBodyViewMode("request"),children:this.state.bodyViewMode.request==="json"?"Text":"JSON"}),e.jsx(W,{size:"small",icon:e.jsx(Pe,{}),onClick:()=>this.copyBody("request"),children:p("ui.copy")})]})]}),this.renderBody(s.body,"request")]})]})},{key:"response",label:"Response",children:e.jsx("div",{className:N.tabContent,children:s.response?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:N.diffSection,children:[e.jsxs(ce,{strong:!0,className:N.diffToggle,onClick:()=>this.setState(g=>({responseHeadersExpanded:!g.responseHeadersExpanded})),children:["Headers ",this.state.responseHeadersExpanded?e.jsx(Te,{className:N.diffIcon}):e.jsx(Ee,{className:N.diffIcon})]}),this.state.responseHeadersExpanded&&this.renderHeaders(s.response.headers)]}),e.jsxs("div",{children:[e.jsxs("div",{className:N.bodyHeader,children:[e.jsx(ce,{strong:!0,className:N.bodyLabel,children:"Body"}),e.jsxs(De,{size:"small",children:[e.jsx(W,{size:"small",icon:this.state.bodyViewMode.response==="json"?e.jsx(Ue,{}):e.jsx(qe,{}),onClick:()=>this.toggleBodyViewMode("response"),children:this.state.bodyViewMode.response==="json"?"Text":"JSON"}),e.jsx(W,{size:"small",icon:e.jsx(Pe,{}),onClick:()=>this.copyBody("response"),children:p("ui.copy")})]})]}),this.renderBody(s.response.body,"response")]})]}):e.jsx(we,{description:p("ui.responseNotCaptured")})})},{key:"kv-cache-text",label:e.jsxs("span",{children:["KV-Cache-Text ",e.jsx(je,{doc:"KVCacheContent"})]}),children:e.jsx("div",{className:`${N.tabContent} ${N.cacheTabContent}`,children:(()=>{const g=Vt([s]),v=s.timestamp+"|"+s.url;if(g&&(g.cacheCreateTokens>0||g.cacheReadTokens>0)&&(this._lastCachedTokensKey=v,this._lastCachedTokens={cacheCreateTokens:g.cacheCreateTokens,cacheReadTokens:g.cacheReadTokens}),!g||g.system.length===0&&g.messages.length===0&&g.tools.length===0)return e.jsx(we,{description:p("ui.noCachedContent"),image:we.PRESENTED_IMAGE_SIMPLE});const b=()=>{const C=[];return g.tools.length>0&&(C.push(`=== ${p("ui.tools")} ===`),g.tools.forEach(T=>C.push(T))),g.system.length>0&&(C.push(`
32
+ === ${p("ui.systemPrompt")} ===`),g.system.forEach(T=>C.push(T))),g.messages.length>0&&(C.push(`
33
+ === ${p("ui.messages")} ===`),g.messages.forEach(T=>C.push(T))),C.join(`
34
+
35
+ `)},S=g.messages.map((C,T)=>({text:C,msgIdx:T})).filter(({text:C})=>C.startsWith("[user]")).map(({text:C,msgIdx:T})=>{const R=C.replace(/^\[user\]\s*/,"").trim();return!R||Fe(R)?{cleaned:"",msgIdx:T}:{cleaned:Ke.parseSegments(R).filter(E=>E.type==="text").map(E=>E.content.trim()).filter(E=>E&&!Fe(E)).join(" ").trim(),msgIdx:T}}).filter(({cleaned:C})=>!(!C||/Implement the following plan:/i.test(C))),_=S.length>0?e.jsx("div",{className:N.userPromptList,children:S.map(({cleaned:C,msgIdx:T})=>e.jsx("div",{className:N.userPromptItem,onMouseEnter:R=>{R.currentTarget.style.background="rgba(22,104,220,0.2)",R.currentTarget.style.color="#fff"},onMouseLeave:R=>{R.currentTarget.style.background="",R.currentTarget.style.color="#ccc"},onClick:()=>this.scrollToCacheMsg(T),children:C},T))}):null;return e.jsxs("div",{className:N.cacheContent,children:[(()=>{const T=g.cacheCreateTokens>0||g.cacheReadTokens>0?g:this._lastCachedTokensKey===v?this._lastCachedTokens:null;return T||_?e.jsxs("div",{className:N.cacheTokenBar,children:[T&&e.jsxs(e.Fragment,{children:[p("ui.tokens"),": ",e.jsxs("span",{className:N.cacheTokenWrite,children:["write ",q(T.cacheCreateTokens)]})," / ",e.jsxs("span",{className:N.cacheTokenRead,children:["read ",q(T.cacheReadTokens)]}),e.jsx(Gt,{title:p("ui.copyAllCacheText"),children:e.jsx(Pe,{className:N.cacheCopyIcon,onClick:()=>{navigator.clipboard.writeText(b()).then(()=>{Q.success(p("ui.copied"))}).catch(()=>{})}})})]}),_&&e.jsx(Be,{content:_,trigger:"hover",placement:"left",children:e.jsx("span",{className:N.userPromptNavBtn,children:p("ui.userPromptNav")})})]}):null})(),e.jsxs("div",{className:N.cacheScrollArea,ref:C=>{this._cacheScrollEl=C},children:[g.tools.length>0&&e.jsxs("div",{className:N.cacheSectionBlock,children:[e.jsxs("div",{className:N.cacheSectionHeader,onClick:()=>this.setState(C=>({cacheCollapsed:{...C.cacheCollapsed,tools:!C.cacheCollapsed.tools}})),children:[e.jsx("span",{className:N.cacheCollapseArrow,style:{transform:this.state.cacheCollapsed.tools?"rotate(-90deg)":"rotate(0deg)"},children:"▼"}),p("ui.tools")," (",g.tools.length,")"]}),!this.state.cacheCollapsed.tools&&g.tools.map((C,T)=>e.jsx("pre",{className:N.cachePre,children:C},T))]}),g.system.length>0&&e.jsxs("div",{className:N.cacheSectionBlock,children:[e.jsxs("div",{className:N.cacheSectionHeader,onClick:()=>this.setState(C=>({cacheCollapsed:{...C.cacheCollapsed,system:!C.cacheCollapsed.system}})),children:[e.jsx("span",{className:N.cacheCollapseArrow,style:{transform:this.state.cacheCollapsed.system?"rotate(-90deg)":"rotate(0deg)"},children:"▼"}),p("ui.systemPrompt")," (",g.system.length,")"]}),!this.state.cacheCollapsed.system&&g.system.map((C,T)=>e.jsx("pre",{className:N.cachePreSystem,children:C},T))]}),g.messages.length>0&&e.jsxs("div",{className:N.cacheSectionBlock,children:[e.jsxs("div",{className:N.cacheSectionHeader,onClick:()=>this.setState(C=>({cacheCollapsed:{...C.cacheCollapsed,messages:!C.cacheCollapsed.messages}})),children:[e.jsx("span",{className:N.cacheCollapseArrow,style:{transform:this.state.cacheCollapsed.messages?"rotate(-90deg)":"rotate(0deg)"},children:"▼"}),p("ui.messages")," (",g.messages.length,")"]}),!this.state.cacheCollapsed.messages&&g.messages.map((C,T)=>{const R=T===this.state.cacheHighlightIdx,B=R?this.state.cacheHighlightFading?{boxShadow:"0 0 10px rgba(22,104,220,0)",transition:"box-shadow 3s ease-out",position:"relative"}:{boxShadow:"0 0 10px rgba(22,104,220,0.6)",transition:"box-shadow 0.2s ease-in",position:"relative"}:{};return e.jsxs("pre",{"data-msg-idx":T,className:N.cachePre,style:B,children:[R&&e.jsx("svg",{style:{position:"absolute",inset:0,width:"100%",height:"100%",pointerEvents:"none",overflow:"visible",opacity:this.state.cacheHighlightFading?0:1,transition:this.state.cacheHighlightFading?"opacity 3s ease-out":void 0},preserveAspectRatio:"none",children:e.jsx("rect",{x:"0.5",y:"0.5",width:"calc(100% - 1px)",height:"calc(100% - 1px)",rx:"4",ry:"4",fill:"none",stroke:"#1668dc",strokeWidth:"1",strokeDasharray:"6 4",children:e.jsx("animate",{attributeName:"stroke-dashoffset",from:"0",to:"-100",dur:"4s",repeatCount:"indefinite"})})}),C]},T)})]})]})]})})()})},{key:"context",label:"Context",children:e.jsx("div",{className:`${N.tabContent} ${N.cacheTabContent}`,children:e.jsx(go,{body:s.body,response:(u=s.response)==null?void 0:u.body})})}],i=(x=(j=s.response)==null?void 0:j.body)==null?void 0:x.usage,r=i?(()=>{const g=i.input_tokens||0,v=i.output_tokens||0,b=i.cache_creation_input_tokens||0,S=i.cache_read_input_tokens||0,_=g+b+S,C=_>0?(S/_*100).toFixed(1):"0.0";return{input:g,output:v,cacheCreate:b,cacheRead:S,hitRate:C}})():null;return e.jsxs("div",{className:N.container,children:[e.jsxs("div",{className:N.urlSection,children:[e.jsxs("div",{className:N.urlLeft,children:[e.jsx(ci,{className:N.urlText,ellipsis:{rows:2,expandable:!0},children:s.url}),e.jsxs(De,{size:"small",wrap:!0,children:[e.jsx(fe,{color:s.method==="POST"?"blue":"green",children:s.method}),e.jsxs(ce,{type:"secondary",className:N.metaText,children:["🕐 ",c]}),s.duration&&e.jsxs(ce,{type:"secondary",className:N.metaText,children:["⏱️ ",s.duration,"ms"]}),s.response&&e.jsxs(fe,{color:l?"success":"error",children:["HTTP ",s.response.status]})]})]}),r&&e.jsx("div",{className:N.tokenStatsBox,children:e.jsxs("div",{className:N.tokenGrid,children:[e.jsxs("div",{className:N.tokenRows,children:[e.jsxs("div",{className:N.tokenRow,children:[e.jsx("span",{className:N.tokenLabel,children:"Token"}),e.jsxs("span",{className:N.tokenTd,children:["input: ",q(r.input)]}),e.jsxs("span",{className:N.tokenTd,children:["output: ",q(r.output)]})]}),e.jsxs("div",{className:`${N.tokenRow} ${N.tokenRowBorder}`,children:[e.jsx("span",{className:N.tokenLabel,children:"Cache"}),e.jsxs("span",{className:N.tokenTd,children:["create: ",q(r.cacheCreate)]}),e.jsxs("span",{className:N.tokenTd,children:["read: ",q(r.cacheRead)]})]})]}),e.jsxs("div",{className:N.tokenHitRate,children:[e.jsxs("div",{children:[r.hitRate,"%"]}),e.jsx("div",{className:N.tokenHitRateLabel,children:p("ui.hitRate")})]})]})})]}),e.jsx(Wt,{activeKey:t,onChange:a,items:d,size:"small"})]})}}const hi="_resizer_1xl2m_1",ui={resizer:hi};class mi extends U.Component{constructor(s){super(s),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this)}handleMouseDown(s){s.preventDefault(),document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}handleMouseMove(s){this.props.onResize&&this.props.onResize(s.clientX)}handleMouseUp(){document.body.style.cursor="",document.body.style.userSelect="",document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)}componentWillUnmount(){document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)}render(){return e.jsx("div",{onMouseDown:this.handleMouseDown,className:ui.resizer})}}class ji extends ha{constructor(t){super(t);O(this,"handleViewRequest",t=>{this.setState({viewMode:"raw",selectedIndex:t,scrollCenter:!0})});O(this,"handleViewInChat",()=>{this.setState(t=>{const c=(t.showAll?t.requests:ze(t.requests))[t.selectedIndex];if(!c)return null;let l=null;if(be(c)&&c.timestamp)l=c.timestamp;else{const m=$e(c);if((m.type==="SubAgent"||m.type==="Teammate")&&c.timestamp)l=c.timestamp;else{const f=t.requests.indexOf(c);f>=0&&(l=Tt(t.requests,f))}l||Q.info(p("ui.cannotMap"))}return{viewMode:"chat",chatScrollToTs:l}})});O(this,"handleToggleViewMode",()=>{this.setState(t=>{const a=t.viewMode==="raw"?"chat":"raw";if(a==="raw"){if(t.selectedIndex===null){const m=t.showAll?t.requests:ze(t.requests);return{viewMode:a,selectedIndex:m.length>0?m.length-1:null,scrollCenter:!0}}return{viewMode:a,scrollCenter:!0}}const c=t.showAll?t.requests:ze(t.requests),l=t.selectedIndex!=null?c[t.selectedIndex]:null;if(l){let m=null;if(be(l)&&l.timestamp)m=l.timestamp;else{const f=$e(l);if((f.type==="SubAgent"||f.type==="Teammate")&&l.timestamp)m=l.timestamp;else{const o=t.requests.indexOf(l);o>=0&&(m=Tt(t.requests,o)),m||Q.info(p("ui.cannotMap"))}}return{viewMode:a,chatScrollToTs:m}}return{viewMode:a,chatScrollToTs:null}},()=>{this.state.viewMode==="chat"&&this.state.terminalVisible&&this.state.cliMode&&!Ts&&requestAnimationFrame(()=>{const t=document.querySelector(".xterm-helper-textarea");t&&t.focus()})})});O(this,"handleTabChange",t=>{this.setState({currentTab:t})});O(this,"handleCacheHighlightDone",()=>{this.setState({pendingCacheHighlight:null})});O(this,"handleNavigateCacheMsg",t=>{const a=this.state.showAll?this.state.requests:ze(this.state.requests);let c=-1;for(let l=a.length-1;l>=0;l--)if(be(a[l])){c=l;break}c<0||this.setState({selectedIndex:c,scrollCenter:!0,currentTab:"kv-cache-text",pendingCacheHighlight:{msgIdx:t,key:Date.now()}})});O(this,"handleResize",t=>{const a=this.mainContainerRef.current;if(!a)return;const c=a.getBoundingClientRect(),l=t-c.left;l>=250&&l<=800&&this.setState({leftPanelWidth:l})});O(this,"handleLoadLocalJsonlFile",()=>{const t=document.createElement("input");t.type="file",t.accept=".jsonl",t.multiple=!0,t.onchange=a=>{const c=Array.from(a.target.files);if(c.length===0)return;if(c.reduce((d,i)=>d+i.size,0)>500*1024*1024){Q.error(p("ui.fileTooLarge"));return}this.setState({fileLoading:!0,fileLoadingCount:0});let m=0;const f=[],o=[];c.forEach(d=>{const i=new FileReader;i.onload=r=>{try{const j=r.target.result.split(`
36
+ ---
37
+ `).filter(x=>x.trim()).map(x=>{try{return JSON.parse(x)}catch{return null}}).filter(Boolean);f.push(...j),o.push(d.name)}catch{}m++,m===c.length&&this._finishLocalLoad(f,o)},i.readAsText(d)})},t.click()});O(this,"_processJsonlFiles",t=>{if(!t||t.length===0)return;if(t.reduce((f,o)=>f+o.size,0)>500*1024*1024){Q.error(p("ui.fileTooLarge"));return}this.setState({fileLoading:!0,fileLoadingCount:0});let c=0;const l=[],m=[];t.forEach(f=>{const o=new FileReader;o.onload=d=>{try{const r=d.target.result.split(`
38
+ ---
39
+ `).filter(u=>u.trim()).map(u=>{try{return JSON.parse(u)}catch{return null}}).filter(Boolean);l.push(...r),m.push(f.name)}catch{}c++,c===t.length&&this._finishLocalLoad(l,m)},o.readAsText(f)})});O(this,"_isInternalDrag",t=>t.dataTransfer.types.includes("text/x-preset-reorder"));O(this,"_onDragOver",t=>{t.preventDefault(),!this._isInternalDrag(t)&&(this.state.isDragging||this.setState({isDragging:!0}))});O(this,"_onDragLeave",t=>{const a=this._layoutRef.current;a&&!a.contains(t.relatedTarget)&&this.setState({isDragging:!1})});O(this,"_onDrop",t=>{if(t.preventDefault(),this._isInternalDrag(t))return;this.setState({isDragging:!1});const a=Array.from(t.dataTransfer.files);a.length&&Promise.all(a.map(c=>ua(c).then(l=>({name:c.name,path:l})).catch(l=>(Q.error(`${c.name}: ${l.message}`),null)))).then(c=>{const l=c.filter(Boolean).map(m=>`"${m.path}"`);l.length>0&&this.setState(m=>({pendingUploadPaths:[...m.pendingUploadPaths||[],...l]}))})});O(this,"handleUploadPathsConsumed",()=>{this.setState({pendingUploadPaths:[]})});Object.assign(this.state,{leftPanelWidth:380,terminalVisible:!0,currentTab:"request",pendingCacheHighlight:null})}render(){const{filteredRequests:t,selectedRequest:a,fileLoading:c,fileLoadingCount:l,mainAgentSessions:m,viewMode:f}=this.renderPrepare(),{selectedIndex:o,leftPanelWidth:d,currentTab:i}=this.state;return this.state.workspaceMode?this.renderWorkspaceMode():e.jsxs(ma,{theme:this.darkThemeConfig,children:[c&&e.jsx("div",{className:M.loadingOverlay,children:e.jsxs("div",{className:M.loadingText,children:["Loading...(",l,")"]})}),this.state.isDragging&&e.jsx("div",{className:M.dragOverlay,children:e.jsxs("div",{className:M.dragOverlayContent,children:[e.jsx(Pt,{style:{fontSize:48}}),e.jsx("p",{children:p("ui.dragDropHint")})]})}),e.jsxs(_e,{className:M.layout,ref:this._layoutRef,onDragOver:this._onDragOver,onDragLeave:this._onDragLeave,onDrop:this._onDrop,children:[e.jsx(_e.Header,{className:M.header,children:e.jsx(Ke,{requestCount:t.length,requests:t,viewMode:f,cacheExpireAt:this.state.cacheExpireAt,cacheType:this.state.cacheType,onToggleViewMode:this.handleToggleViewMode,onLangChange:this.handleLangChange,onImportLocalLogs:this.handleImportLocalLogs,isLocalLog:!!this._isLocalLog,localLogFile:this._localLogFile,projectName:this.state.projectName,collapseToolResults:this.state.collapseToolResults,onCollapseToolResultsChange:this.handleCollapseToolResultsChange,expandThinking:this.state.expandThinking,onExpandThinkingChange:this.handleExpandThinkingChange,expandDiff:this.state.expandDiff,onExpandDiffChange:this.handleExpandDiffChange,filterIrrelevant:!this.state.showAll,onFilterIrrelevantChange:this.handleFilterIrrelevantChange,updateInfo:this.state.updateInfo,onDismissUpdate:()=>this.setState({updateInfo:null}),cliMode:this.state.cliMode,terminalVisible:this.state.terminalVisible,onToggleTerminal:()=>this.setState(r=>({terminalVisible:!r.terminalVisible})),onReturnToWorkspaces:this.state.cliMode?this.handleReturnToWorkspaces:null,contextWindow:this.state.contextWindow,onNavigateCacheMsg:this.handleNavigateCacheMsg,serverCachedContent:this.state.serverCachedContent||this._lastKvCacheContent,resumeAutoChoice:this.state.resumeAutoChoice,onResumeAutoChoiceToggle:this.handleResumeAutoChoiceToggle,onResumeAutoChoiceChange:this.handleResumeAutoChoiceChange})}),e.jsxs(_e.Content,{className:M.content,children:[f==="raw"&&(t.length===0?e.jsx("div",{className:M.guideContainer,children:e.jsxs("div",{className:M.guideContent,children:[e.jsx("h2",{className:M.guideTitle,children:p("ui.guide.title")}),e.jsxs("div",{className:M.guideStep,children:[e.jsx("div",{className:M.guideStepNum,children:"1"}),e.jsxs("div",{className:M.guideStepBody,children:[e.jsx("p",{className:M.guideText,children:p("ui.guide.step1")}),e.jsx("code",{className:M.guideCode,children:p("ui.guide.exampleQuestion")})]})]}),e.jsxs("div",{className:M.guideStep,children:[e.jsx("div",{className:M.guideStepNum,children:"2"}),e.jsxs("div",{className:M.guideStepBody,children:[e.jsx("p",{className:M.guideText,children:p("ui.guide.step2")}),e.jsx("code",{className:M.guideCode,children:p("ui.guide.troubleshootCmd")})]})]}),e.jsxs("div",{className:M.guideStep,children:[e.jsx("div",{className:M.guideStepNum,children:"3"}),e.jsxs("div",{className:M.guideStepBody,children:[e.jsx("p",{className:M.guideText,children:p("ui.guide.step3")}),e.jsx("code",{className:M.guideCode,children:"npm install -g @anthropic-ai/claude-code"})]})]})]})}):e.jsxs("div",{ref:this.mainContainerRef,className:M.mainContainer,children:[e.jsxs("div",{className:M.leftPanel,style:{width:d},children:[e.jsxs("div",{className:M.leftPanelHeader,children:[e.jsx("span",{children:p("ui.requestList")}),e.jsx("span",{className:M.leftPanelCount,children:p("ui.totalRequests",{count:t.length})})]}),e.jsx("div",{className:M.leftPanelBody,children:e.jsx(Fn,{requests:t,selectedIndex:o,scrollCenter:this.state.scrollCenter,onSelect:this.handleSelectRequest,onScrollDone:this.handleScrollDone,cacheLossMap:this._cacheLossMap})})]}),e.jsx(mi,{onResize:this.handleResize}),e.jsx("div",{className:M.rightPanel,children:e.jsx(di,{request:a,requests:t,allRequests:this.state.requests,selectedIndex:o,currentTab:i,onTabChange:this.handleTabChange,onViewInChat:this.handleViewInChat,expandDiff:this.state.expandDiff,pendingCacheHighlight:this.state.pendingCacheHighlight,onCacheHighlightDone:this.handleCacheHighlightDone})})]})),e.jsx("div",{className:M.chatViewWrapper,style:{display:f==="chat"?"flex":"none"},children:e.jsx(pa,{requests:t,mainAgentSessions:m,userProfile:this.state.userProfile,collapseToolResults:this.state.collapseToolResults,expandThinking:this.state.expandThinking,showThinkingSummaries:this.state.showThinkingSummaries,onViewRequest:this.handleViewRequest,scrollToTimestamp:this.state.chatScrollToTs,onScrollTsDone:this.handleScrollTsDone,cliMode:this._isLocalLog?!1:this.state.cliMode,terminalVisible:this._isLocalLog?!1:this.state.terminalVisible,onToggleTerminal:()=>this.setState(r=>({terminalVisible:!r.terminalVisible})),pendingUploadPaths:this.state.pendingUploadPaths,onUploadPathsConsumed:this.handleUploadPathsConsumed,fileLoading:this.state.fileLoading})})]}),e.jsx("div",{className:M.footer,children:e.jsxs("div",{className:M.footerRight,children:[e.jsx("span",{className:M.footerText,children:p("ui.footer.starRequest")}),e.jsxs("a",{href:"https://github.com/weiesky/cc-viewer",target:"_blank",rel:"noopener noreferrer",className:M.footerLink,children:[e.jsx("svg",{className:M.footerIcon,viewBox:"0 0 16 16",fill:"currentColor",children:e.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})}),"GitHub",this.state.githubStars!=null?` ★ ${this.state.githubStars}`:""]}),e.jsx("span",{className:M.footerDivider,children:"|"}),e.jsx("a",{href:"dingtalk://dingtalkclient/action/sendmsg?dingtalk_id=sthk5es",className:M.footerLink,children:p("ui.footer.contact")})]})})]}),e.jsx(Ce,{title:p("ui.resume.title"),open:this.state.resumeModalVisible,closable:!1,maskClosable:!1,keyboard:!1,footer:e.jsxs("div",{children:[e.jsxs("div",{className:M.resumeFooterRight,children:[e.jsx(W,{type:"primary",onClick:()=>this.handleResumeChoice("continue"),className:M.btnMarginRight,children:p("ui.resume.continue")},"continue"),e.jsx(W,{onClick:()=>this.handleResumeChoice("new"),children:p("ui.resume.new")},"new")]}),e.jsx("div",{className:M.resumeFooterLeft,children:e.jsx(ga,{checked:this.state.resumeRememberChoice,onChange:r=>this.setState({resumeRememberChoice:r.target.checked}),className:M.resumeCheckboxOpacity,children:e.jsx("span",{className:M.resumeCheckboxOpacity,children:p("ui.resume.remember")})})})]}),children:e.jsx("p",{children:p("ui.resume.message",{file:this.state.resumeFileName})})}),e.jsxs(Ce,{title:e.jsxs("span",{className:M.modalTitleInline,children:[e.jsx(fa,{apiEndpoint:de("/api/open-log-dir"),title:p("ui.openLogDir"),size:16}),p("ui.importLocalLogs")]}),open:this.state.importModalVisible,onCancel:this.handleCloseImportModal,footer:null,width:1e3,styles:{body:{overflow:"hidden"}},children:[e.jsxs("div",{className:M.modalActions,children:[e.jsx(W,{icon:e.jsx(Pt,{}),onClick:this.handleLoadLocalJsonlFile,children:p("ui.loadLocalJsonl")}),e.jsx(W,{size:"small",type:this.state.selectedLogs.size>1?"primary":"default",disabled:this.state.selectedLogs.size<2,onClick:this.handleMergeLogs,className:M.btnMarginLeft,children:p("ui.mergeLogs")}),e.jsx(W,{size:"small",danger:!0,icon:e.jsx(Kt,{}),disabled:this.state.selectedLogs.size===0,onClick:this.handleDeleteLogs,className:M.btnMarginLeft,children:p("ui.deleteLogs")}),e.jsx(W,{size:"small",icon:e.jsx(ot,{spin:this.state.refreshingStats}),loading:this.state.refreshingStats,onClick:this.handleRefreshStats,className:M.btnMarginLeft,children:p("ui.refreshStats")})]}),this.state.localLogsLoading?e.jsx("div",{className:M.spinCenter,children:e.jsx(qt,{})}):(()=>{const r=this.state.localLogs[this.state.currentProject];return!r||r.length===0?e.jsx("div",{className:M.emptyCenter,children:p("ui.noLogs")}):e.jsx("div",{className:M.logListContainer,children:this.renderLogTable(r,!1)})})()]})]})}}export{ji as default};
@@ -38,4 +38,4 @@
38
38
 
39
39
  Outdated base version: https://github.com/primer/github-syntax-dark
40
40
  Current colors taken from GitHub's CSS
41
- */.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#79c0ff}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-comment,.hljs-code,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c}._fullFileDiffView_83q0w_1{width:100%;height:100%;display:flex;flex-direction:column;background:#0d0d0d;overflow:hidden}._diffSummary_83q0w_10{padding:8px 16px;background:#111;border-bottom:1px solid #2a2a2a;display:flex;gap:8px;align-items:center;flex-shrink:0}._addedBadge_83q0w_20{padding:2px 8px;background:#73c99126;border:1px solid #73c9914d;border-radius:4px;font-size:11px;font-weight:600;color:#73c991;font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace}._deletedBadge_83q0w_31{padding:2px 8px;background:#f14c4c26;border:1px solid #f14c4c4d;border-radius:4px;font-size:11px;font-weight:600;color:#f14c4c;font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace}._codeContainer_83q0w_42{flex:1;overflow:hidden;display:flex;min-height:0;font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace;font-size:13px;line-height:1.6}._lineNumberCol_83q0w_52{flex-shrink:0;overflow:hidden;background:#0d0d0d;border-right:1px solid #2a2a2a;-webkit-user-select:none;user-select:none}._lineNumRow_83q0w_60{display:flex;min-height:21px}._oldLineNum_83q0w_65,._newLineNum_83q0w_66{display:inline-block;width:40px;text-align:right;padding:0 6px;font-size:12px;box-sizing:border-box}._lineNumNormal_83q0w_75 ._oldLineNum_83q0w_65,._lineNumNormal_83q0w_75 ._newLineNum_83q0w_66{color:#555}._lineNumAdd_83q0w_80{border-right:3px solid #73c991}._lineNumAdd_83q0w_80 ._oldLineNum_83q0w_65{color:#555}._lineNumAdd_83q0w_80 ._newLineNum_83q0w_66{color:#73c991;font-weight:600}._lineNumDelete_83q0w_93{border-right:3px solid #f14c4c}._lineNumDelete_83q0w_93 ._oldLineNum_83q0w_65{color:#f14c4c;font-weight:600}._lineNumDelete_83q0w_93 ._newLineNum_83q0w_66{color:#555}._codeColWrap_83q0w_106{flex:1;position:relative;min-width:0;overflow:hidden}._codeCol_83q0w_106{width:100%;height:100%;overflow:auto;min-width:0}._codeInner_83q0w_120{width:fit-content;min-width:100%}._codeLine_83q0w_125{position:relative;min-height:21px;display:flex;transition:background .1s}._codeLine_83q0w_125:hover{background:#ffffff08}._linePrefix_83q0w_136{display:inline-block;width:16px;text-align:center;color:#888;flex-shrink:0;-webkit-user-select:none;user-select:none}._lineContent_83q0w_145{padding-right:16px;color:#ccc;white-space:pre}._lineNormal_83q0w_151{background:transparent}._lineAdd_83q0w_155{background:#73c9911a}._lineAdd_83q0w_155 ._linePrefix_83q0w_136{color:#73c991}._lineDelete_83q0w_163{background:#f14c4c1a}._lineDelete_83q0w_163 ._linePrefix_83q0w_136{color:#f14c4c}._lineDelete_83q0w_163 ._lineContent_83q0w_145{text-decoration:line-through;opacity:.8}._miniMap_1ho3j_1{position:absolute;top:0;right:0;width:10px;height:100%;cursor:pointer;z-index:10}._marker_1ho3j_11{position:absolute;left:0;width:100%;border-radius:1px;pointer-events:none}._gitDiffView_1771a_1{flex:1;display:flex;flex-direction:column;background:#0d0d0d;overflow:hidden;animation:_slideInFromRight_1771a_1 .25s ease-out}@keyframes _slideInFromRight_1771a_1{0%{transform:translate(-40px);opacity:0}to{transform:translate(0);opacity:1}}._closing_1771a_21{animation:_slideOutToRight_1771a_1 .2s ease-in forwards}@keyframes _slideOutToRight_1771a_1{0%{transform:translate(0);opacity:1}to{transform:translate(-40px);opacity:0}}._header_1771a_36{display:flex;align-items:center;justify-content:space-between;padding:6px 16px;border-bottom:1px solid #2a2a2a;background:#111;flex-shrink:0}._headerLeft_1771a_46{display:flex;align-items:center;gap:12px;flex:1;min-width:0}._backBtn_1771a_54{width:28px;height:28px;border:none;background:none;color:#888;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:4px;padding:0;flex-shrink:0;transition:all .15s}._backBtn_1771a_54:hover{color:#ccc;background:#2a2a2a}._filePath_1771a_75{font-size:13px;color:#ccc;font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;transition:color .15s}._filePath_1771a_75:hover{color:#79c0ff;text-decoration:underline}._diffBadge_1771a_91{padding:2px 8px;background:#2a2a2a;border:1px solid #444;border-radius:4px;font-size:10px;font-weight:600;color:#e2c08d;letter-spacing:.5px;flex-shrink:0}._headerRight_1771a_103{display:flex;align-items:center;flex-shrink:0}._closeBtn_1771a_109{display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid #3a3a3a;background:#1e1e1e;color:#888;border-radius:6px;cursor:pointer;transition:background .15s,color .15s,border-color .15s}._closeBtn_1771a_109:hover{background:#2a2a2a;color:#fff;border-color:#4a4a4a}._contentContainer_1771a_130{flex:1;overflow:auto;position:relative}._loading_1771a_136{display:flex;align-items:center;justify-content:center;height:100%;color:#888;font-size:13px}._error_1771a_145{display:flex;align-items:center;justify-content:center;height:100%;color:#ff6b6b;font-size:13px;padding:20px;text-align:center}._binaryNotice_1771a_156{display:flex;align-items:center;justify-content:center;height:100%;color:#888;font-size:13px;font-style:italic;padding:20px;text-align:center}._largeFileWarning_1771a_168{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:#e2c08d;font-size:13px;padding:20px;text-align:center;gap:8px}._fileSize_1771a_181{color:#888;font-size:12px;margin:0}._centerEmpty_zqm5n_1{display:flex;align-items:center;justify-content:center;height:100%}._container_zqm5n_8{flex:1;overflow:auto;padding:16px 24px;display:flex;flex-direction:column;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}._sessionDividerText_zqm5n_18{font-size:11px;color:#555}._lastResponseLabel_zqm5n_23{font-size:11px}._splitContainer_zqm5n_27{display:flex;flex-direction:row;height:100%;overflow:hidden}._chatSection_zqm5n_34{flex:1;display:flex;flex-direction:column;min-width:0;overflow:hidden}._vResizer_zqm5n_42{width:5px;background:#1e1e1e;cursor:col-resize;flex-shrink:0;border-left:1px solid #2a2a2a;border-right:1px solid #2a2a2a;transition:background .15s}._vResizer_zqm5n_42:hover{background:#2a2a2a}._terminalToggle_zqm5n_56{display:flex;align-items:center;justify-content:center;align-self:center;width:14px;height:48px;margin-left:-14px;flex-shrink:0;cursor:pointer;color:#555;background:#ffffff0a;border-radius:4px 0 0 4px;transition:background .2s,color .2s;z-index:20;position:relative}._terminalToggle_zqm5n_56:hover{background:#ffffff1a;color:#999}._snapLine_zqm5n_79{position:absolute;top:0;bottom:0;width:2px;background:transparent;border-left:2px dashed #ffffff1a;pointer-events:none;z-index:1000;transition:all .15s}._snapLineActive_zqm5n_91{position:absolute;top:0;bottom:0;width:2px;background:transparent;border-left:2px dashed #ffffff80;pointer-events:none;z-index:1001}._snapLineLabel_zqm5n_102{position:absolute;top:50%;left:8px;transform:translateY(-50%);background:#ffffffe6;color:#000;padding:4px 8px;border-radius:4px;font-size:11px;font-weight:600;white-space:nowrap;font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace;box-shadow:0 2px 8px #0000004d}._snapPreview_zqm5n_118{position:absolute;top:0;bottom:0;background:#ffffff1a;pointer-events:none;z-index:999}._vResizer_zqm5n_42:hover{background:#333}._chatInputBar_zqm5n_131{display:flex;align-items:flex-end;gap:8px;padding:10px 16px;background:#111;border-top:1px solid #2a2a2a;flex-shrink:0}._chatInputWrapper_zqm5n_141{flex:1;display:flex;flex-direction:column;background:#1e1e1e;border:1px solid #333;border-radius:12px;transition:border-color .2s;overflow:hidden}._chatInputWrapper_zqm5n_141:focus-within{border-color:#555}._chatTextareaWrap_zqm5n_156{position:relative;flex:1}._chatTextarea_zqm5n_156{width:100%;min-height:22px;max-height:120px;padding:10px 14px;background:transparent;color:#e0e0e0;border:none;outline:none;resize:none;font-size:14px;line-height:1.5;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}._chatTextarea_zqm5n_156::placeholder{color:#555}._chatInputHint_zqm5n_180{font-size:11px;color:#444;padding:0 14px 6px;-webkit-user-select:none;user-select:none}._chatSendBtn_zqm5n_187{width:36px;height:36px;border-radius:10px;border:none;background:#4a9eff;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .15s,opacity .15s}._chatSendBtn_zqm5n_187:hover{background:#3a8eef}._chatSendBtn_zqm5n_187:disabled{opacity:.35;cursor:default}._chatSendBtn_zqm5n_187 svg{width:18px;height:18px}._messageListWrap_zqm5n_216{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}._stickyBottomBtn_zqm5n_224{position:absolute;left:0;bottom:0;display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 18px;height:60px;justify-content:center;border-radius:0;border:none;background:none;color:#999;font-size:12px;cursor:pointer;transition:color .15s;z-index:10;box-shadow:none}._stickyBottomBtn_zqm5n_224 span{background:#00000080;padding:2px 10px;border-radius:10px}._stickyBottomBtn_zqm5n_224:hover{color:#fff;background:none}@media(max-width:768px){._stickyBottomBtn_zqm5n_224{gap:4px;padding:16px 18px;height:120px;font-size:24px}._stickyBottomBtn_zqm5n_224 span{padding:4px 20px;border-radius:20px}._stickyBottomBtn_zqm5n_224 svg{width:28px;height:28px}}._ptyPromptBubble_zqm5n_274{margin:8px 0;padding:12px 16px;border-radius:12px;border:1px solid #3a3a3a;background:#161616;animation:_ptyPromptFadeIn_zqm5n_1 .25s ease-out}._ptyPromptResolved_zqm5n_283{opacity:.55}@keyframes _ptyPromptFadeIn_zqm5n_1{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}._ptyPromptQuestion_zqm5n_292{font-size:13px;color:#ccc;margin-bottom:10px;line-height:1.4}._ptyPromptOptions_zqm5n_299{display:flex;flex-wrap:wrap;gap:8px}._ptyPromptOption_zqm5n_299{padding:6px 14px;border-radius:18px;border:1px solid #3a3a3a;background:#1e1e1e;color:#bbb;font-size:12px;cursor:pointer;transition:background .15s,color .15s,border-color .15s;white-space:nowrap}._ptyPromptOption_zqm5n_299:hover{background:#2a2a2a;color:#eee;border-color:#555}._ptyPromptOptionPrimary_zqm5n_323{padding:6px 14px;border-radius:18px;border:1px solid #4a9eff;background:#4a9eff26;color:#4a9eff;font-size:12px;cursor:pointer;transition:background .15s,color .15s,border-color .15s;white-space:nowrap}._ptyPromptOptionPrimary_zqm5n_323:hover{background:#4a9eff40;color:#6ab4ff;border-color:#6ab4ff}._ptyPromptOptionChosen_zqm5n_341{padding:6px 14px;border-radius:18px;border:1px solid #4a9eff;background:#4a9eff33;color:#4a9eff;font-size:12px;cursor:default;white-space:nowrap}._ptyPromptOptionDimmed_zqm5n_352{padding:6px 14px;border-radius:18px;border:1px solid #2a2a2a;background:transparent;color:#444;font-size:12px;cursor:default;white-space:nowrap}._ghostText_zqm5n_363{position:absolute;top:0;left:0;right:0;padding:10px 14px;color:#444;font-size:14px;line-height:1.5;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;pointer-events:none;white-space:pre-wrap;overflow:hidden;max-height:120px}._suggestionChip_zqm5n_379{display:flex;align-items:center;gap:8px;padding:8px 14px;background:#1e1e1e;border-top:1px solid #2a2a2a;cursor:pointer;flex-shrink:0;transition:background .15s}._suggestionChip_zqm5n_379:hover{background:#222}._suggestionChipText_zqm5n_395{flex:1;color:#555;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._suggestionChipAction_zqm5n_404{color:#4a9eff;font-size:14px;flex-shrink:0}._loadMoreWrap_zqm5n_410{display:flex;justify-content:center;padding:12px 0 4px}._loadMoreBtn_zqm5n_416{padding:6px 18px;border-radius:16px;border:1px solid #3a3a3a;background:#ffffff0f;color:#999;font-size:12px;cursor:pointer;transition:background .15s,color .15s}._loadMoreBtn_zqm5n_416:hover{background:#ffffff1f;color:#ccc}._navSidebar_zqm5n_432{width:40px;flex-shrink:0;background:#1a1a1a;border-right:1px solid #2a2a2a;display:flex;flex-direction:column;align-items:center;padding-top:8px;gap:4px}@media(max-width:768px){._navSidebar_zqm5n_432{display:none}}._navBtn_zqm5n_449{width:32px;height:32px;border:none;background:none;color:#666;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:6px;padding:0;transition:background .15s,color .15s}._navBtn_zqm5n_449:hover{color:#ccc;background:#1e1e1e}._navBtnActive_zqm5n_469{width:32px;height:32px;border:none;background:#4a9eff26;color:#4a9eff;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:6px;padding:0;transition:background .15s,color .15s}._navBtnActive_zqm5n_469:hover{background:#4a9eff40;color:#6ab4ff}._roleFilterBar_zqm5n_489{display:flex;gap:6px;padding:6px 12px;background:#1a1a1a;border-bottom:1px solid #333;overflow-x:auto;flex-shrink:0}._roleChip_zqm5n_498,._roleChipActive_zqm5n_498{display:flex;align-items:center;gap:4px;padding:3px 8px;border-radius:12px;border:1px solid #333;background:transparent;color:#888;font-size:11px;cursor:pointer;white-space:nowrap;transition:border-color .15s,color .15s}._roleChipActive_zqm5n_498{border-color:#4a9eff;color:#ccc}._roleChip_zqm5n_498:hover,._roleChipActive_zqm5n_498:hover{border-color:#555}._roleAvatar_zqm5n_519{width:16px;height:16px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}._roleAvatar_zqm5n_519 svg{width:10px;height:10px}._roleAvatarImg_zqm5n_532{width:16px;height:16px;border-radius:50%;flex-shrink:0;object-fit:cover}._roleName_zqm5n_539{max-width:80px;overflow:hidden;text-overflow:ellipsis}._roleCheck_zqm5n_544{color:#4a9eff;font-size:10px}._teamActiveSpinner_zqm5n_549{position:absolute;bottom:4px;right:4px;width:10px;height:10px;border:2px solid #ffffff26;border-top-color:#fa8c16;border-radius:50%;animation:_teamSpin_zqm5n_1 .8s linear infinite}@keyframes _teamSpin_zqm5n_1{to{transform:rotate(360deg)}}._teamPopover_zqm5n_565{min-width:200px;max-width:320px;padding:8px 0}._teamPopoverTitle_zqm5n_571{font-size:13px;font-weight:600;color:#e5e5e5;padding:4px 12px 8px;border-bottom:1px solid #2a2a2a}._teamPopoverItem_zqm5n_579{display:flex;align-items:center;padding:6px 12px;cursor:pointer;transition:background .15s;font-size:12px;color:#ccc}._teamPopoverItem_zqm5n_579:hover{background:#222}._teamPopoverName_zqm5n_593{flex:1;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._teamPopoverMeta_zqm5n_601{color:#666;font-size:11px;margin:0 8px;flex-shrink:0}._teamPopoverTime_zqm5n_608{color:#555;font-size:11px;flex-shrink:0}._teamModalBody_zqm5n_614{flex:1;min-width:0;overflow-y:auto;padding:16px 24px;display:flex;flex-direction:column;gap:4px}._teamGanttToggle_zqm5n_624{cursor:pointer;padding:8px 16px;font-size:12px;color:#888;-webkit-user-select:none;user-select:none;border-bottom:1px solid #1e1e1e;transition:color .15s}._teamGanttToggle_zqm5n_624:hover{color:#ccc}._teamGanttWrap_zqm5n_638{--gantt-label-width: 110px;padding:8px 16px 4px;border-bottom:1px solid #1e1e1e;position:relative;max-height:120px;overflow-y:auto;flex-shrink:0}._teamGanttRow_zqm5n_648{display:flex;align-items:center;height:22px;margin-bottom:3px}._teamGanttLabel_zqm5n_655{width:calc(var(--gantt-label-width) - 10px);font-size:11px;color:#888;text-align:right;padding-right:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:0}._teamGanttTrack_zqm5n_667{flex:1;height:14px;background:#111;border-radius:3px;position:relative;overflow:hidden}._teamGanttBar_zqm5n_676{position:absolute;height:100%;border-radius:3px;min-width:4px;top:0}._teamGanttDiamond_zqm5n_684{position:absolute;top:50%;transform:translate(-50%,-50%);font-size:12px;line-height:1;z-index:2;pointer-events:auto;cursor:default;filter:drop-shadow(0 0 2px #000000e6);transition:transform .15s}._teamGanttDiamond_zqm5n_684:hover{transform:translate(-50%,-50%) scale(1.4)}._teamGanttArrows_zqm5n_701{position:absolute;top:0;left:var(--gantt-label-width);right:0;width:calc(100% - var(--gantt-label-width));pointer-events:none;z-index:5}._teamGanttIndicator_zqm5n_711{position:absolute;top:0;bottom:0;width:2px;background:#4a9eff;z-index:10;pointer-events:none;box-shadow:0 0 6px #4a9eff80;transition:left .15s ease-out}._teamModalLayout_zqm5n_723{display:flex;height:100%}._teamAgentCards_zqm5n_728{width:160px;flex-shrink:0;border-right:1px solid #2a2a2a;overflow-y:auto;background:#0d0d0d;padding:8px}._teamAgentCard_zqm5n_728{padding:8px;border-radius:0;margin-bottom:6px;border-left:3px solid #333;background:#111;transition:background .15s}._teamAgentCard_zqm5n_728:hover{background:#1e1e1e}._teamAgentCardActive_zqm5n_750{background:#1e1e1e!important}._teamAgentCardHeader_zqm5n_754{display:flex;align-items:center;gap:6px}._teamAgentAvatar_zqm5n_760{width:20px;height:20px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;overflow:hidden}._teamAgentAvatar_zqm5n_760 svg{width:14px;height:14px;fill:#fff}._teamAgentName_zqm5n_777{font-size:12px;font-weight:500;color:#e5e5e5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._teamAgentType_zqm5n_786{font-size:10px;color:#666;margin-top:2px}._teamAgentStatus_zqm5n_792{font-size:10px;margin-top:4px}._teamAgentPopover_zqm5n_797{padding:10px 12px;min-width:200px}._teamAgentPopTeammateMsg_zqm5n_802{background:#060f2a;border:1px solid #0b2a5c;border-radius:6px;padding:10px 12px;margin-bottom:8px}._teamAgentPopTmSummary_zqm5n_810{font-size:12px;font-weight:600;color:#4a9eff;margin-bottom:6px}._teamAgentPopTmContent_zqm5n_817{font-size:12px;color:#ccc;line-height:1.6}._teamAgentPopTask_zqm5n_823{font-size:13px;font-weight:600;color:#e5e5e5;margin-bottom:8px;padding-bottom:6px;border-bottom:1px solid #2a2a2a}._teamAgentPopMsg_zqm5n_832{font-size:12px;color:#ccc;line-height:1.5;white-space:pre-wrap;word-break:break-word;margin-bottom:8px;padding:6px 8px;background:#111;border-radius:4px;border:1px solid #222}._teammateReportEntry_zqm5n_845{background:#060f2a;border:1px solid #0b2a5c;border-radius:8px;padding:12px;margin:4px 0}._teammateReportHeader_zqm5n_853{display:flex;align-items:center;gap:8px;margin-bottom:8px;padding-bottom:6px;border-bottom:1px solid #0b2a5c}._teammateReportName_zqm5n_862{font-size:13px;font-weight:600;color:#e5e5e5}._teammateReportSummary_zqm5n_868{font-size:12px;color:#4a9eff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}._teammateReportBody_zqm5n_877{font-size:12px;color:#ccc;line-height:1.6}._teamModalContent_zqm5n_883{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden}._teamBtnRelative_zqm5n_891{position:relative}._ganttLabelLead_zqm5n_895{color:#196ae1;font-weight:600}._ganttLabelAgent_zqm5n_900{color:#eee}._ganttTimeAxisRow_zqm5n_904{margin-top:2px}._ganttTimeAxisTrack_zqm5n_908{background:transparent;height:16px;position:relative}._ganttTickLabel_zqm5n_914{position:absolute;transform:translate(-50%);font-size:9px;color:#555;white-space:nowrap}._teamPopoverStatus_zqm5n_922{margin-right:6px;font-size:10px}._terminalPanelWrap_zqm5n_927{flex-shrink:0;min-width:200px;display:flex;flex-direction:column}._ganttIndicatorInitial_zqm5n_934{left:110px}._teamModalTitle_zqm5n_938{color:#e5e5e5;font-size:15px}._teamLeadCard_zqm5n_943{border-left-color:#196ae1}._agentNoMessages_zqm5n_947{color:#666;font-size:12px}._teamAgentCardClickable_zqm5n_952{border-left-color:#eee;cursor:pointer}._agentStatusDurSuffix_zqm5n_957{color:#888}._navSidebarContent_zqm5n_961{flex:1;min-width:0;display:flex;flex-direction:column;min-height:0}._innerSplitArea_zqm5n_969{flex:1;display:flex;min-width:0;position:relative}._chatSectionFlex_zqm5n_976{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden;position:relative}._overlayPanel_zqm5n_985{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;display:flex;flex-direction:column}._helpBtn_6dlto_1{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;background:#1e1e1e;border:1px solid #444;color:#aaa;font-size:11px;line-height:1;cursor:pointer;margin-left:4px;vertical-align:middle;transition:background .2s;-webkit-user-select:none;user-select:none}._helpBtn_6dlto_1:hover{background:#333}._modalBody_6dlto_24{max-height:60vh;overflow-y:auto;overflow-x:hidden;line-height:1.7;color:#d9d9d9;word-break:break-word}._modalBody_6dlto_24 h1,._modalBody_6dlto_24 h2,._modalBody_6dlto_24 h3{margin-top:.8em;color:#f0f0f0}._modalBody_6dlto_24 p{margin:.5em 0}._modalBody_6dlto_24 code{background:#2a2a2a;padding:1px 4px;border-radius:3px;font-size:.9em;color:#e8ab6a}._modalBody_6dlto_24 pre{background:#1e1e1e;padding:12px;border-radius:6px;overflow-x:auto;color:#d9d9d9;max-width:100%;box-sizing:border-box}._modalBody_6dlto_24 a{color:#5b9bd5}._modalBody_6dlto_24 strong{color:#f0f0f0}._spinWrap_6dlto_70{display:flex;justify-content:center;padding:40px 0}._modalBody_6dlto_24 textarea{width:100%;min-height:200px;background:#1e1e1e;color:#d9d9d9;font-family:monospace;font-size:13px;line-height:1.6;border:1px solid #333;border-radius:6px;padding:10px 14px;resize:vertical;outline:none;box-sizing:border-box}@media(max-width:768px){._modalBody_6dlto_24{font-size:13px;line-height:1.6;max-height:75vh}._modalBody_6dlto_24 h1{font-size:18px}._modalBody_6dlto_24 h2{font-size:16px}._modalBody_6dlto_24 h3{font-size:14px}._modalBody_6dlto_24 pre{font-size:12px;padding:8px}._modalBody_6dlto_24 code,._modalBody_6dlto_24 textarea{font-size:12px}}._headerBar_x7bh3_2{display:flex;align-items:center;justify-content:space-between;width:100%;height:100%}._logoWrap_x7bh3_10{display:inline-flex;align-items:center;position:relative;margin-top:14px}._logoWrapActive_x7bh3_17:after{content:"";position:absolute;top:-10px;bottom:-10px;left:0;right:-200px}._logoImage_x7bh3_26{height:24px;width:24px;border-radius:3px;vertical-align:middle;opacity:.75;transition:opacity .2s;cursor:pointer}._logoImageActive_x7bh3_36{opacity:1}._compactBtn_x7bh3_41{font-size:12px;height:30px;line-height:28px}._compactBtnNoBorder_x7bh3_47{font-size:12px;height:30px;line-height:28px;border:none}._tokenStatsTag_x7bh3_55{border-radius:12px;cursor:pointer;background:#2a2a2a;border:1px solid #3a3a3a;color:#ccc}._tokenStatsIcon_x7bh3_63{margin-right:4px}._liveTag_x7bh3_68{position:relative;display:inline-flex;align-items:center;border-radius:12px;border:1px solid;padding:0 10px;height:22px;font-size:12px;line-height:22px;overflow:hidden;transition:border-color .3s,color .3s;white-space:nowrap}._liveTagFill_x7bh3_83{position:absolute;left:0;top:0;bottom:0;opacity:.35;transition:width .5s ease,background-color .3s;pointer-events:none}._liveTagContent_x7bh3_93{position:relative;z-index:1;display:inline-flex;align-items:center}._liveTagHistory_x7bh3_100{background:#2a2a2a;border-color:#424242;color:#d1d5db}._liveTagText_x7bh3_106{margin-left:4px}._countdownStrong_x7bh3_111{font-variant-numeric:tabular-nums}._qrcodePopover_x7bh3_116{display:flex;flex-direction:column;align-items:center;padding:8px}._qrcodeSection_x7bh3_123{display:flex;flex-direction:column;align-items:center;padding:16px;margin-bottom:12px;border:1px solid #333;border-radius:8px;background:#111}._qrcodeTitle_x7bh3_134{font-size:14px;font-weight:600;color:#e5e5e5;margin-bottom:12px}._qrcodeUrlInput_x7bh3_141{margin-top:12px;font-size:12px;font-family:Menlo,Monaco,monospace}._qrcodeUrlCopy_x7bh3_147{cursor:pointer;color:#888;transition:color .2s}._qrcodeUrlCopy_x7bh3_147:hover{color:#3b82f6}._settingsGroupBox_x7bh3_158{border:1px solid #333;border-radius:8px;background:#111;padding:4px 16px;margin-bottom:12px}._settingsGroupTitle_x7bh3_166{font-size:14px;font-weight:600;color:#e5e5e5;padding:12px 0 4px;border-bottom:1px solid #333}._settingsItem_x7bh3_175{display:flex;justify-content:space-between;align-items:center;padding:12px 0}._settingsLabel_x7bh3_182{font-size:14px}._tokenStatsEmpty_x7bh3_187{padding:8px 4px;color:#999;font-size:13px}._tokenStatsContainer_x7bh3_194{display:flex;gap:12px;align-items:flex-start}._tokenStatsColumn_x7bh3_200{min-width:240px}._toolStatsColumn_x7bh3_204{min-width:180px}._modelCard_x7bh3_209{border:1px solid #333;border-radius:6px;padding:8px 10px;background:#111}._modelCardSpaced_x7bh3_216{margin-bottom:10px}._modelName_x7bh3_222{font-size:13px;font-weight:600;color:#e5e5e5;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #333}._statsTable_x7bh3_232{width:100%;border-collapse:collapse}._th_x7bh3_237{padding:2px 12px;font-size:12px;font-family:monospace;white-space:nowrap;color:#888;font-weight:400;text-align:right}._td_x7bh3_247{padding:2px 12px;font-size:12px;font-family:monospace;white-space:nowrap;color:#e5e5e5;text-align:right}._label_x7bh3_256{padding:2px 12px;font-size:12px;font-family:monospace;white-space:nowrap;color:#aaa;font-weight:400;text-align:left}._rowBorder_x7bh3_266{border-bottom:1px solid #2a2a2a}._rebuildCard_x7bh3_270{border:1px solid #333;border-radius:6px;padding:8px 10px;margin-top:10px;background:#111}._rebuildTotalRow_x7bh3_278{border-top:1px solid #444}._rebuildTotalRow_x7bh3_278 td{font-weight:600}._promptExportBar_x7bh3_287{margin-bottom:12px}._promptScrollArea_x7bh3_291{max-height:500px;overflow:auto}._promptEmpty_x7bh3_296{color:#999;padding:12px}._promptTimestamp_x7bh3_302{color:#666;font-size:12px;margin:12px 0 4px;padding-bottom:6px}._textPromptCard_x7bh3_310{margin:4px 0;background:#141414;border-radius:6px;border:1px solid #303030;padding:10px 14px}._preText_x7bh3_319{white-space:pre-wrap;word-break:break-word;font-size:13px;line-height:1.6;color:#d9d9d9;margin:4px 0}._systemCollapse_x7bh3_329{margin:4px 0;background:#1e1e1e;border:1px solid #303030;border-radius:6px}._systemLabel_x7bh3_336{color:#888;font-size:12px}._preSys_x7bh3_341{white-space:pre-wrap;word-break:break-word;font-size:12px;line-height:1.5;color:#999;margin:0}._promptTextarea_x7bh3_351{box-sizing:border-box;background:#000;width:100%;min-height:400px;color:#d9d9d9;font-family:monospace;font-size:13px;line-height:1.6;border:none;resize:vertical;padding:10px 14px;outline:none}._projectStatsCenter_x7bh3_367{display:flex;justify-content:center;padding:40px 0}._projectStatsEmpty_x7bh3_373{color:#999;padding:40px 0;text-align:center;font-size:13px}._projectStatsContent_x7bh3_380{display:flex;flex-direction:column;gap:16px}._projectStatsUpdated_x7bh3_386{color:#666;font-size:12px;text-align:right}._projectStatsSummary_x7bh3_392{display:grid;grid-template-columns:1fr 1fr;gap:10px}._projectStatCard_x7bh3_398{background:#111;border:1px solid #333;border-radius:8px;padding:14px 12px;text-align:center}._projectStatValue_x7bh3_406{font-size:22px;font-weight:700;color:#e5e5e5;font-family:monospace;font-variant-numeric:tabular-nums}._projectStatLabel_x7bh3_414{font-size:12px;color:#888;margin-top:4px}._projectStatsSection_x7bh3_420{display:flex;flex-direction:column;gap:10px}._projectStatsSectionTitle_x7bh3_426{font-size:14px;font-weight:600;color:#ccc;padding-bottom:4px;border-bottom:1px solid #333}._projectStatsModelCard_x7bh3_434{background:#111;border:1px solid #333;border-radius:6px;padding:10px 12px}._projectStatsModelHeader_x7bh3_441{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #333}._projectStatsModelName_x7bh3_450{font-size:13px;font-weight:600;color:#e5e5e5}._projectStatsModelCount_x7bh3_456{font-size:12px;color:#888;font-family:monospace}._pluginDirHint_x7bh3_463{margin-bottom:12px;font-size:12px;color:#888}._pluginDirPath_x7bh3_469{font-family:Menlo,Monaco,monospace;color:#aaa;cursor:pointer;padding:1px 4px;border-radius:3px;background:#1e1e1e}._pluginDirPath_x7bh3_469:hover{color:#3b82f6}._pluginList_x7bh3_482{display:flex;flex-direction:column;gap:8px}._pluginItem_x7bh3_488{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border:1px solid #303030;border-radius:6px;background:#141414}._pluginInfo_x7bh3_498{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}._pluginName_x7bh3_506{font-size:14px;color:#e5e5e5;font-weight:500}._pluginFile_x7bh3_512{font-size:12px;color:#666;font-family:Menlo,Monaco,monospace}._pluginHooks_x7bh3_518{display:flex;gap:4px;flex-wrap:wrap;margin-top:2px}._pluginHookTag_x7bh3_525{font-size:11px;padding:0 5px;border-radius:3px;background:#1e3a5f;color:#60a5fa;line-height:18px}._pluginActions_x7bh3_534{display:flex;align-items:center;gap:8px;flex-shrink:0;margin-left:12px}._pluginEmpty_x7bh3_542{text-align:center;padding:32px 0;color:#999}._cachePopover_x7bh3_549{max-width:800px}._cacheScrollArea_x7bh3_553{max-height:450px;overflow-y:auto}._cachePopoverTitle_x7bh3_558{display:flex;align-items:center;gap:6px;font-size:14px;font-weight:600;color:#e5e5e5}._cachePopoverHeader_x7bh3_567{margin-bottom:8px;padding-bottom:6px;border-bottom:1px solid #333}._cacheCopyBtn_x7bh3_573{font-size:14px;color:#888;cursor:pointer;transition:color .2s;margin-left:8px}._cacheCopyBtn_x7bh3_573:hover{color:#e5e5e5}._cachePopoverEmpty_x7bh3_585{padding:8px 4px;color:#999;font-size:13px}._cacheTokenInfo_x7bh3_591{display:flex;align-items:center;font-size:12px;font-family:monospace;color:#aaa;margin-bottom:8px}._cacheSection_x7bh3_600{margin-bottom:10px}._cacheSectionTitle_x7bh3_604{font-size:12px;font-weight:600;color:#aaa;margin-bottom:4px}._cacheCodeBlock_x7bh3_611{white-space:pre-wrap;word-break:break-word;font-size:12px;line-height:1.5;color:#ccc;background:#111;border:1px solid #2a2a2a;border-radius:4px;padding:8px;margin:4px 0;font-family:Menlo,Monaco,monospace}._cacheCodeBlockSystem_x7bh3_625{white-space:pre-wrap;word-break:break-word;font-size:12px;line-height:1.5;color:#ccc;background:#060f2a;border:1px solid #0b2a5c;border-radius:4px;padding:8px;margin:4px 0;font-family:Menlo,Monaco,monospace}._cacheNavBtn_x7bh3_639{margin-left:auto;font-size:11px;color:#1668dc;cursor:pointer;border:1px solid #1668dc;border-radius:3px;padding:1px 6px;white-space:nowrap}._cacheNavBtn_x7bh3_639:hover{background:#1668dc26}._cacheNavList_x7bh3_654{width:600px;max-height:300px;overflow-y:auto}._cacheNavItem_x7bh3_660{padding:4px 8px;font-size:12px;color:#ccc;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:3px}._cacheNavItem_x7bh3_660:hover{background:#1668dc33;color:#fff}._cacheBlockHighlight_x7bh3_676{box-shadow:0 0 10px #1668dc99;transition:box-shadow .2s ease-in}._cacheBlockHighlightFading_x7bh3_681{box-shadow:0 0 10px #1668dc00;transition:box-shadow 3s ease-out}._cacheBorderSvg_x7bh3_686{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;pointer-events:none;overflow:visible}._cacheBorderSvgFading_x7bh3_695{opacity:0;transition:opacity 3s ease-out}._cacheBorderRect_x7bh3_700{animation:_cacheDashRotate_x7bh3_1 4s linear infinite}@keyframes _cacheDashRotate_x7bh3_1{0%{stroke-dashoffset:0}to{stroke-dashoffset:-100}}._thLeft_x7bh3_710{text-align:left}._cacheCalibrationLabel_x7bh3_715{margin-left:auto;color:#888;font-size:12px;white-space:nowrap}._calibrationSelect_x7bh3_723{width:160px;flex-shrink:0}._cachePopoverPlaceholder_x7bh3_729{min-width:300px}._cacheWriteToken_x7bh3_734{color:#faad14}._cacheReadToken_x7bh3_738{color:#52c41a}._cacheCtxPercent_x7bh3_742{color:#888;margin-left:6px}._pluginModalFooter_x7bh3_748{display:flex;justify-content:space-between}._pluginModalFooterLeft_x7bh3_753{display:flex;gap:8px}._pluginDirLabel_x7bh3_759{color:#888}._pluginEmptyTitle_x7bh3_764{font-size:14px;margin-bottom:4px}._pluginEmptyHint_x7bh3_769{font-size:12px;color:#666}._cdnUrlLabel_x7bh3_775{margin-bottom:6px;color:#ccc;font-size:13px}._cdnInput_x7bh3_781{background:#1e1e1e;border-color:#333;color:#eee}._titleIcon_x7bh3_788{margin-right:8px}._countryFlagIcon_x7bh3_793{vertical-align:-3px;font-size:20px}._svgIcon_x7bh3_799{vertical-align:-3px}._iconMirror_x7bh3_804{transform:scaleX(-1)}._langGrid_x7bh3_809{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:8px 4px;min-width:360px;max-height:none}._langBtn_x7bh3_819{width:100%;text-align:center}._countryInfoPopover_x7bh3_825{color:#ccc;font-size:13px;line-height:22px}._countryInfoMeta_x7bh3_831{color:#888;font-size:12px}
41
+ */.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#79c0ff}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-comment,.hljs-code,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c}._fullFileDiffView_83q0w_1{width:100%;height:100%;display:flex;flex-direction:column;background:#0d0d0d;overflow:hidden}._diffSummary_83q0w_10{padding:8px 16px;background:#111;border-bottom:1px solid #2a2a2a;display:flex;gap:8px;align-items:center;flex-shrink:0}._addedBadge_83q0w_20{padding:2px 8px;background:#73c99126;border:1px solid #73c9914d;border-radius:4px;font-size:11px;font-weight:600;color:#73c991;font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace}._deletedBadge_83q0w_31{padding:2px 8px;background:#f14c4c26;border:1px solid #f14c4c4d;border-radius:4px;font-size:11px;font-weight:600;color:#f14c4c;font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace}._codeContainer_83q0w_42{flex:1;overflow:hidden;display:flex;min-height:0;font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace;font-size:13px;line-height:1.6}._lineNumberCol_83q0w_52{flex-shrink:0;overflow:hidden;background:#0d0d0d;border-right:1px solid #2a2a2a;-webkit-user-select:none;user-select:none}._lineNumRow_83q0w_60{display:flex;min-height:21px}._oldLineNum_83q0w_65,._newLineNum_83q0w_66{display:inline-block;width:40px;text-align:right;padding:0 6px;font-size:12px;box-sizing:border-box}._lineNumNormal_83q0w_75 ._oldLineNum_83q0w_65,._lineNumNormal_83q0w_75 ._newLineNum_83q0w_66{color:#555}._lineNumAdd_83q0w_80{border-right:3px solid #73c991}._lineNumAdd_83q0w_80 ._oldLineNum_83q0w_65{color:#555}._lineNumAdd_83q0w_80 ._newLineNum_83q0w_66{color:#73c991;font-weight:600}._lineNumDelete_83q0w_93{border-right:3px solid #f14c4c}._lineNumDelete_83q0w_93 ._oldLineNum_83q0w_65{color:#f14c4c;font-weight:600}._lineNumDelete_83q0w_93 ._newLineNum_83q0w_66{color:#555}._codeColWrap_83q0w_106{flex:1;position:relative;min-width:0;overflow:hidden}._codeCol_83q0w_106{width:100%;height:100%;overflow:auto;min-width:0}._codeInner_83q0w_120{width:fit-content;min-width:100%}._codeLine_83q0w_125{position:relative;min-height:21px;display:flex;transition:background .1s}._codeLine_83q0w_125:hover{background:#ffffff08}._linePrefix_83q0w_136{display:inline-block;width:16px;text-align:center;color:#888;flex-shrink:0;-webkit-user-select:none;user-select:none}._lineContent_83q0w_145{padding-right:16px;color:#ccc;white-space:pre}._lineNormal_83q0w_151{background:transparent}._lineAdd_83q0w_155{background:#73c9911a}._lineAdd_83q0w_155 ._linePrefix_83q0w_136{color:#73c991}._lineDelete_83q0w_163{background:#f14c4c1a}._lineDelete_83q0w_163 ._linePrefix_83q0w_136{color:#f14c4c}._lineDelete_83q0w_163 ._lineContent_83q0w_145{text-decoration:line-through;opacity:.8}._miniMap_1ho3j_1{position:absolute;top:0;right:0;width:10px;height:100%;cursor:pointer;z-index:10}._marker_1ho3j_11{position:absolute;left:0;width:100%;border-radius:1px;pointer-events:none}._gitDiffView_1771a_1{flex:1;display:flex;flex-direction:column;background:#0d0d0d;overflow:hidden;animation:_slideInFromRight_1771a_1 .25s ease-out}@keyframes _slideInFromRight_1771a_1{0%{transform:translate(-40px);opacity:0}to{transform:translate(0);opacity:1}}._closing_1771a_21{animation:_slideOutToRight_1771a_1 .2s ease-in forwards}@keyframes _slideOutToRight_1771a_1{0%{transform:translate(0);opacity:1}to{transform:translate(-40px);opacity:0}}._header_1771a_36{display:flex;align-items:center;justify-content:space-between;padding:6px 16px;border-bottom:1px solid #2a2a2a;background:#111;flex-shrink:0}._headerLeft_1771a_46{display:flex;align-items:center;gap:12px;flex:1;min-width:0}._backBtn_1771a_54{width:28px;height:28px;border:none;background:none;color:#888;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:4px;padding:0;flex-shrink:0;transition:all .15s}._backBtn_1771a_54:hover{color:#ccc;background:#2a2a2a}._filePath_1771a_75{font-size:13px;color:#ccc;font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;transition:color .15s}._filePath_1771a_75:hover{color:#79c0ff;text-decoration:underline}._diffBadge_1771a_91{padding:2px 8px;background:#2a2a2a;border:1px solid #444;border-radius:4px;font-size:10px;font-weight:600;color:#e2c08d;letter-spacing:.5px;flex-shrink:0}._headerRight_1771a_103{display:flex;align-items:center;flex-shrink:0}._closeBtn_1771a_109{display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid #3a3a3a;background:#1e1e1e;color:#888;border-radius:6px;cursor:pointer;transition:background .15s,color .15s,border-color .15s}._closeBtn_1771a_109:hover{background:#2a2a2a;color:#fff;border-color:#4a4a4a}._contentContainer_1771a_130{flex:1;overflow:auto;position:relative}._loading_1771a_136{display:flex;align-items:center;justify-content:center;height:100%;color:#888;font-size:13px}._error_1771a_145{display:flex;align-items:center;justify-content:center;height:100%;color:#ff6b6b;font-size:13px;padding:20px;text-align:center}._binaryNotice_1771a_156{display:flex;align-items:center;justify-content:center;height:100%;color:#888;font-size:13px;font-style:italic;padding:20px;text-align:center}._largeFileWarning_1771a_168{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:#e2c08d;font-size:13px;padding:20px;text-align:center;gap:8px}._fileSize_1771a_181{color:#888;font-size:12px;margin:0}._centerEmpty_zqm5n_1{display:flex;align-items:center;justify-content:center;height:100%}._container_zqm5n_8{flex:1;overflow:auto;padding:16px 24px;display:flex;flex-direction:column;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}._sessionDividerText_zqm5n_18{font-size:11px;color:#555}._lastResponseLabel_zqm5n_23{font-size:11px}._splitContainer_zqm5n_27{display:flex;flex-direction:row;height:100%;overflow:hidden}._chatSection_zqm5n_34{flex:1;display:flex;flex-direction:column;min-width:0;overflow:hidden}._vResizer_zqm5n_42{width:5px;background:#1e1e1e;cursor:col-resize;flex-shrink:0;border-left:1px solid #2a2a2a;border-right:1px solid #2a2a2a;transition:background .15s}._vResizer_zqm5n_42:hover{background:#2a2a2a}._terminalToggle_zqm5n_56{display:flex;align-items:center;justify-content:center;align-self:center;width:14px;height:48px;margin-left:-14px;flex-shrink:0;cursor:pointer;color:#555;background:#ffffff0a;border-radius:4px 0 0 4px;transition:background .2s,color .2s;z-index:20;position:relative}._terminalToggle_zqm5n_56:hover{background:#ffffff1a;color:#999}._snapLine_zqm5n_79{position:absolute;top:0;bottom:0;width:2px;background:transparent;border-left:2px dashed #ffffff1a;pointer-events:none;z-index:1000;transition:all .15s}._snapLineActive_zqm5n_91{position:absolute;top:0;bottom:0;width:2px;background:transparent;border-left:2px dashed #ffffff80;pointer-events:none;z-index:1001}._snapLineLabel_zqm5n_102{position:absolute;top:50%;left:8px;transform:translateY(-50%);background:#ffffffe6;color:#000;padding:4px 8px;border-radius:4px;font-size:11px;font-weight:600;white-space:nowrap;font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace;box-shadow:0 2px 8px #0000004d}._snapPreview_zqm5n_118{position:absolute;top:0;bottom:0;background:#ffffff1a;pointer-events:none;z-index:999}._vResizer_zqm5n_42:hover{background:#333}._chatInputBar_zqm5n_131{display:flex;align-items:flex-end;gap:8px;padding:10px 16px;background:#111;border-top:1px solid #2a2a2a;flex-shrink:0}._chatInputWrapper_zqm5n_141{flex:1;display:flex;flex-direction:column;background:#1e1e1e;border:1px solid #333;border-radius:12px;transition:border-color .2s;overflow:hidden}._chatInputWrapper_zqm5n_141:focus-within{border-color:#555}._chatTextareaWrap_zqm5n_156{position:relative;flex:1}._chatTextarea_zqm5n_156{width:100%;min-height:22px;max-height:120px;padding:10px 14px;background:transparent;color:#e0e0e0;border:none;outline:none;resize:none;font-size:14px;line-height:1.5;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}._chatTextarea_zqm5n_156::placeholder{color:#555}._chatInputHint_zqm5n_180{font-size:11px;color:#444;padding:0 14px 6px;-webkit-user-select:none;user-select:none}._chatSendBtn_zqm5n_187{width:36px;height:36px;border-radius:10px;border:none;background:#4a9eff;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .15s,opacity .15s}._chatSendBtn_zqm5n_187:hover{background:#3a8eef}._chatSendBtn_zqm5n_187:disabled{opacity:.35;cursor:default}._chatSendBtn_zqm5n_187 svg{width:18px;height:18px}._messageListWrap_zqm5n_216{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}._stickyBottomBtn_zqm5n_224{position:absolute;left:0;bottom:0;display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 18px;height:60px;justify-content:center;border-radius:0;border:none;background:none;color:#999;font-size:12px;cursor:pointer;transition:color .15s;z-index:10;box-shadow:none}._stickyBottomBtn_zqm5n_224 span{background:#00000080;padding:2px 10px;border-radius:10px}._stickyBottomBtn_zqm5n_224:hover{color:#fff;background:none}@media(max-width:768px){._stickyBottomBtn_zqm5n_224{gap:4px;padding:16px 18px;height:120px;font-size:24px}._stickyBottomBtn_zqm5n_224 span{padding:4px 20px;border-radius:20px}._stickyBottomBtn_zqm5n_224 svg{width:28px;height:28px}}._ptyPromptBubble_zqm5n_274{margin:8px 0;padding:12px 16px;border-radius:12px;border:1px solid #3a3a3a;background:#161616;animation:_ptyPromptFadeIn_zqm5n_1 .25s ease-out}._ptyPromptResolved_zqm5n_283{opacity:.55}@keyframes _ptyPromptFadeIn_zqm5n_1{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}._ptyPromptQuestion_zqm5n_292{font-size:13px;color:#ccc;margin-bottom:10px;line-height:1.4}._ptyPromptOptions_zqm5n_299{display:flex;flex-wrap:wrap;gap:8px}._ptyPromptOption_zqm5n_299{padding:6px 14px;border-radius:18px;border:1px solid #3a3a3a;background:#1e1e1e;color:#bbb;font-size:12px;cursor:pointer;transition:background .15s,color .15s,border-color .15s;white-space:nowrap}._ptyPromptOption_zqm5n_299:hover{background:#2a2a2a;color:#eee;border-color:#555}._ptyPromptOptionPrimary_zqm5n_323{padding:6px 14px;border-radius:18px;border:1px solid #4a9eff;background:#4a9eff26;color:#4a9eff;font-size:12px;cursor:pointer;transition:background .15s,color .15s,border-color .15s;white-space:nowrap}._ptyPromptOptionPrimary_zqm5n_323:hover{background:#4a9eff40;color:#6ab4ff;border-color:#6ab4ff}._ptyPromptOptionChosen_zqm5n_341{padding:6px 14px;border-radius:18px;border:1px solid #4a9eff;background:#4a9eff33;color:#4a9eff;font-size:12px;cursor:default;white-space:nowrap}._ptyPromptOptionDimmed_zqm5n_352{padding:6px 14px;border-radius:18px;border:1px solid #2a2a2a;background:transparent;color:#444;font-size:12px;cursor:default;white-space:nowrap}._ghostText_zqm5n_363{position:absolute;top:0;left:0;right:0;padding:10px 14px;color:#444;font-size:14px;line-height:1.5;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;pointer-events:none;white-space:pre-wrap;overflow:hidden;max-height:120px}._suggestionChip_zqm5n_379{display:flex;align-items:center;gap:8px;padding:8px 14px;background:#1e1e1e;border-top:1px solid #2a2a2a;cursor:pointer;flex-shrink:0;transition:background .15s}._suggestionChip_zqm5n_379:hover{background:#222}._suggestionChipText_zqm5n_395{flex:1;color:#555;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._suggestionChipAction_zqm5n_404{color:#4a9eff;font-size:14px;flex-shrink:0}._loadMoreWrap_zqm5n_410{display:flex;justify-content:center;padding:12px 0 4px}._loadMoreBtn_zqm5n_416{padding:6px 18px;border-radius:16px;border:1px solid #3a3a3a;background:#ffffff0f;color:#999;font-size:12px;cursor:pointer;transition:background .15s,color .15s}._loadMoreBtn_zqm5n_416:hover{background:#ffffff1f;color:#ccc}._navSidebar_zqm5n_432{width:40px;flex-shrink:0;background:#1a1a1a;border-right:1px solid #2a2a2a;display:flex;flex-direction:column;align-items:center;padding-top:8px;gap:4px}@media(max-width:768px){._navSidebar_zqm5n_432{display:none}}._navBtn_zqm5n_449{width:32px;height:32px;border:none;background:none;color:#666;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:6px;padding:0;transition:background .15s,color .15s}._navBtn_zqm5n_449:hover{color:#ccc;background:#1e1e1e}._navBtnActive_zqm5n_469{width:32px;height:32px;border:none;background:#4a9eff26;color:#4a9eff;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:6px;padding:0;transition:background .15s,color .15s}._navBtnActive_zqm5n_469:hover{background:#4a9eff40;color:#6ab4ff}._roleFilterBar_zqm5n_489{display:flex;gap:6px;padding:6px 12px;background:#1a1a1a;border-bottom:1px solid #333;overflow-x:auto;flex-shrink:0}._roleChip_zqm5n_498,._roleChipActive_zqm5n_498{display:flex;align-items:center;gap:4px;padding:3px 8px;border-radius:12px;border:1px solid #333;background:transparent;color:#888;font-size:11px;cursor:pointer;white-space:nowrap;transition:border-color .15s,color .15s}._roleChipActive_zqm5n_498{border-color:#4a9eff;color:#ccc}._roleChip_zqm5n_498:hover,._roleChipActive_zqm5n_498:hover{border-color:#555}._roleAvatar_zqm5n_519{width:16px;height:16px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}._roleAvatar_zqm5n_519 svg{width:10px;height:10px}._roleAvatarImg_zqm5n_532{width:16px;height:16px;border-radius:50%;flex-shrink:0;object-fit:cover}._roleName_zqm5n_539{max-width:80px;overflow:hidden;text-overflow:ellipsis}._roleCheck_zqm5n_544{color:#4a9eff;font-size:10px}._teamActiveSpinner_zqm5n_549{position:absolute;bottom:4px;right:4px;width:10px;height:10px;border:2px solid #ffffff26;border-top-color:#fa8c16;border-radius:50%;animation:_teamSpin_zqm5n_1 .8s linear infinite}@keyframes _teamSpin_zqm5n_1{to{transform:rotate(360deg)}}._teamPopover_zqm5n_565{min-width:200px;max-width:320px;padding:8px 0}._teamPopoverTitle_zqm5n_571{font-size:13px;font-weight:600;color:#e5e5e5;padding:4px 12px 8px;border-bottom:1px solid #2a2a2a}._teamPopoverItem_zqm5n_579{display:flex;align-items:center;padding:6px 12px;cursor:pointer;transition:background .15s;font-size:12px;color:#ccc}._teamPopoverItem_zqm5n_579:hover{background:#222}._teamPopoverName_zqm5n_593{flex:1;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._teamPopoverMeta_zqm5n_601{color:#666;font-size:11px;margin:0 8px;flex-shrink:0}._teamPopoverTime_zqm5n_608{color:#555;font-size:11px;flex-shrink:0}._teamModalBody_zqm5n_614{flex:1;min-width:0;overflow-y:auto;padding:16px 24px;display:flex;flex-direction:column;gap:4px}._teamGanttToggle_zqm5n_624{cursor:pointer;padding:8px 16px;font-size:12px;color:#888;-webkit-user-select:none;user-select:none;border-bottom:1px solid #1e1e1e;transition:color .15s}._teamGanttToggle_zqm5n_624:hover{color:#ccc}._teamGanttWrap_zqm5n_638{--gantt-label-width: 110px;padding:8px 16px 4px;border-bottom:1px solid #1e1e1e;position:relative;max-height:120px;overflow-y:auto;flex-shrink:0}._teamGanttRow_zqm5n_648{display:flex;align-items:center;height:22px;margin-bottom:3px}._teamGanttLabel_zqm5n_655{width:calc(var(--gantt-label-width) - 10px);font-size:11px;color:#888;text-align:right;padding-right:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:0}._teamGanttTrack_zqm5n_667{flex:1;height:14px;background:#111;border-radius:3px;position:relative;overflow:hidden}._teamGanttBar_zqm5n_676{position:absolute;height:100%;border-radius:3px;min-width:4px;top:0}._teamGanttDiamond_zqm5n_684{position:absolute;top:50%;transform:translate(-50%,-50%);font-size:12px;line-height:1;z-index:2;pointer-events:auto;cursor:default;filter:drop-shadow(0 0 2px #000000e6);transition:transform .15s}._teamGanttDiamond_zqm5n_684:hover{transform:translate(-50%,-50%) scale(1.4)}._teamGanttArrows_zqm5n_701{position:absolute;top:0;left:var(--gantt-label-width);right:0;width:calc(100% - var(--gantt-label-width));pointer-events:none;z-index:5}._teamGanttIndicator_zqm5n_711{position:absolute;top:0;bottom:0;width:2px;background:#4a9eff;z-index:10;pointer-events:none;box-shadow:0 0 6px #4a9eff80;transition:left .15s ease-out}._teamModalLayout_zqm5n_723{display:flex;height:100%}._teamAgentCards_zqm5n_728{width:160px;flex-shrink:0;border-right:1px solid #2a2a2a;overflow-y:auto;background:#0d0d0d;padding:8px}._teamAgentCard_zqm5n_728{padding:8px;border-radius:0;margin-bottom:6px;border-left:3px solid #333;background:#111;transition:background .15s}._teamAgentCard_zqm5n_728:hover{background:#1e1e1e}._teamAgentCardActive_zqm5n_750{background:#1e1e1e!important}._teamAgentCardHeader_zqm5n_754{display:flex;align-items:center;gap:6px}._teamAgentAvatar_zqm5n_760{width:20px;height:20px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;overflow:hidden}._teamAgentAvatar_zqm5n_760 svg{width:14px;height:14px;fill:#fff}._teamAgentName_zqm5n_777{font-size:12px;font-weight:500;color:#e5e5e5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._teamAgentType_zqm5n_786{font-size:10px;color:#666;margin-top:2px}._teamAgentStatus_zqm5n_792{font-size:10px;margin-top:4px}._teamAgentPopover_zqm5n_797{padding:10px 12px;min-width:200px}._teamAgentPopTeammateMsg_zqm5n_802{background:#060f2a;border:1px solid #0b2a5c;border-radius:6px;padding:10px 12px;margin-bottom:8px}._teamAgentPopTmSummary_zqm5n_810{font-size:12px;font-weight:600;color:#4a9eff;margin-bottom:6px}._teamAgentPopTmContent_zqm5n_817{font-size:12px;color:#ccc;line-height:1.6}._teamAgentPopTask_zqm5n_823{font-size:13px;font-weight:600;color:#e5e5e5;margin-bottom:8px;padding-bottom:6px;border-bottom:1px solid #2a2a2a}._teamAgentPopMsg_zqm5n_832{font-size:12px;color:#ccc;line-height:1.5;white-space:pre-wrap;word-break:break-word;margin-bottom:8px;padding:6px 8px;background:#111;border-radius:4px;border:1px solid #222}._teammateReportEntry_zqm5n_845{background:#060f2a;border:1px solid #0b2a5c;border-radius:8px;padding:12px;margin:4px 0}._teammateReportHeader_zqm5n_853{display:flex;align-items:center;gap:8px;margin-bottom:8px;padding-bottom:6px;border-bottom:1px solid #0b2a5c}._teammateReportName_zqm5n_862{font-size:13px;font-weight:600;color:#e5e5e5}._teammateReportSummary_zqm5n_868{font-size:12px;color:#4a9eff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}._teammateReportBody_zqm5n_877{font-size:12px;color:#ccc;line-height:1.6}._teamModalContent_zqm5n_883{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden}._teamBtnRelative_zqm5n_891{position:relative}._ganttLabelLead_zqm5n_895{color:#196ae1;font-weight:600}._ganttLabelAgent_zqm5n_900{color:#eee}._ganttTimeAxisRow_zqm5n_904{margin-top:2px}._ganttTimeAxisTrack_zqm5n_908{background:transparent;height:16px;position:relative}._ganttTickLabel_zqm5n_914{position:absolute;transform:translate(-50%);font-size:9px;color:#555;white-space:nowrap}._teamPopoverStatus_zqm5n_922{margin-right:6px;font-size:10px}._terminalPanelWrap_zqm5n_927{flex-shrink:0;min-width:200px;display:flex;flex-direction:column}._ganttIndicatorInitial_zqm5n_934{left:110px}._teamModalTitle_zqm5n_938{color:#e5e5e5;font-size:15px}._teamLeadCard_zqm5n_943{border-left-color:#196ae1}._agentNoMessages_zqm5n_947{color:#666;font-size:12px}._teamAgentCardClickable_zqm5n_952{border-left-color:#eee;cursor:pointer}._agentStatusDurSuffix_zqm5n_957{color:#888}._navSidebarContent_zqm5n_961{flex:1;min-width:0;display:flex;flex-direction:column;min-height:0}._innerSplitArea_zqm5n_969{flex:1;display:flex;min-width:0;position:relative}._chatSectionFlex_zqm5n_976{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden;position:relative}._overlayPanel_zqm5n_985{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;display:flex;flex-direction:column}._helpBtn_6dlto_1{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;background:#1e1e1e;border:1px solid #444;color:#aaa;font-size:11px;line-height:1;cursor:pointer;margin-left:4px;vertical-align:middle;transition:background .2s;-webkit-user-select:none;user-select:none}._helpBtn_6dlto_1:hover{background:#333}._modalBody_6dlto_24{max-height:60vh;overflow-y:auto;overflow-x:hidden;line-height:1.7;color:#d9d9d9;word-break:break-word}._modalBody_6dlto_24 h1,._modalBody_6dlto_24 h2,._modalBody_6dlto_24 h3{margin-top:.8em;color:#f0f0f0}._modalBody_6dlto_24 p{margin:.5em 0}._modalBody_6dlto_24 code{background:#2a2a2a;padding:1px 4px;border-radius:3px;font-size:.9em;color:#e8ab6a}._modalBody_6dlto_24 pre{background:#1e1e1e;padding:12px;border-radius:6px;overflow-x:auto;color:#d9d9d9;max-width:100%;box-sizing:border-box}._modalBody_6dlto_24 a{color:#5b9bd5}._modalBody_6dlto_24 strong{color:#f0f0f0}._spinWrap_6dlto_70{display:flex;justify-content:center;padding:40px 0}._modalBody_6dlto_24 textarea{width:100%;min-height:200px;background:#1e1e1e;color:#d9d9d9;font-family:monospace;font-size:13px;line-height:1.6;border:1px solid #333;border-radius:6px;padding:10px 14px;resize:vertical;outline:none;box-sizing:border-box}@media(max-width:768px){._modalBody_6dlto_24{font-size:13px;line-height:1.6;max-height:75vh}._modalBody_6dlto_24 h1{font-size:18px}._modalBody_6dlto_24 h2{font-size:16px}._modalBody_6dlto_24 h3{font-size:14px}._modalBody_6dlto_24 pre{font-size:12px;padding:8px}._modalBody_6dlto_24 code,._modalBody_6dlto_24 textarea{font-size:12px}}._headerBar_g8wde_2{display:flex;align-items:center;justify-content:space-between;width:100%;height:100%}._logoWrap_g8wde_10{display:inline-flex;align-items:center;position:relative;margin-top:14px}._logoWrapActive_g8wde_17:after{content:"";position:absolute;top:-10px;bottom:-10px;left:0;right:-200px}._logoImage_g8wde_26{height:24px;width:24px;border-radius:3px;vertical-align:middle;opacity:.75;transition:opacity .2s;cursor:pointer}._logoImageActive_g8wde_36{opacity:1}._compactBtn_g8wde_41{font-size:12px;height:30px;line-height:28px}._compactBtnNoBorder_g8wde_47{font-size:12px;height:30px;line-height:28px;border:none}._tokenStatsTag_g8wde_55{border-radius:12px;cursor:pointer;background:#2a2a2a;border:1px solid #3a3a3a;color:#ccc}._tokenStatsIcon_g8wde_63{margin-right:4px}._liveTag_g8wde_68{position:relative;display:inline-flex;align-items:center;border-radius:12px;border:1px solid;padding:0 10px;height:22px;font-size:12px;line-height:22px;overflow:hidden;transition:border-color .3s,color .3s;white-space:nowrap}._liveTagFill_g8wde_83{position:absolute;left:0;top:0;bottom:0;opacity:.35;transition:width .5s ease,background-color .3s;pointer-events:none}._liveTagContent_g8wde_93{position:relative;z-index:1;display:inline-flex;align-items:center}._liveTagHistory_g8wde_100{background:#2a2a2a;border-color:#424242;color:#d1d5db}._liveTagText_g8wde_106{margin-left:4px}._countdownStrong_g8wde_111{font-variant-numeric:tabular-nums}._qrcodePopover_g8wde_116{display:flex;flex-direction:column;align-items:center;padding:8px}._qrcodeSection_g8wde_123{display:flex;flex-direction:column;align-items:center;padding:16px;margin-bottom:12px;border:1px solid #333;border-radius:8px;background:#111}._qrcodeTitle_g8wde_134{font-size:14px;font-weight:600;color:#e5e5e5;margin-bottom:12px}._qrcodeUrlInput_g8wde_141{margin-top:12px;font-size:12px;font-family:Menlo,Monaco,monospace}._qrcodeUrlCopy_g8wde_147{cursor:pointer;color:#888;transition:color .2s}._qrcodeUrlCopy_g8wde_147:hover{color:#3b82f6}._settingsGroupBox_g8wde_158{border:1px solid #333;border-radius:8px;background:#111;padding:4px 16px;margin-bottom:12px}._settingsGroupTitle_g8wde_166{font-size:14px;font-weight:600;color:#e5e5e5;padding:12px 0 4px;border-bottom:1px solid #333}._settingsItem_g8wde_175{display:flex;justify-content:space-between;align-items:center;padding:12px 0}._settingsLabel_g8wde_182{font-size:14px}._tokenStatsEmpty_g8wde_187{padding:8px 4px;color:#999;font-size:13px}._tokenStatsContainer_g8wde_194{display:flex;gap:12px;align-items:flex-start}._tokenStatsColumn_g8wde_200{min-width:240px}._toolStatsColumn_g8wde_204{min-width:180px}._modelCard_g8wde_209{border:1px solid #333;border-radius:6px;padding:8px 10px;background:#111}._modelCardSpaced_g8wde_216{margin-bottom:10px}._modelName_g8wde_222{font-size:13px;font-weight:600;color:#e5e5e5;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #333}._statsTable_g8wde_232{width:100%;border-collapse:collapse}._th_g8wde_237{padding:2px 12px;font-size:12px;font-family:monospace;white-space:nowrap;color:#888;font-weight:400;text-align:right}._td_g8wde_247{padding:2px 12px;font-size:12px;font-family:monospace;white-space:nowrap;color:#e5e5e5;text-align:right}._label_g8wde_256{padding:2px 12px;font-size:12px;font-family:monospace;white-space:nowrap;color:#aaa;font-weight:400;text-align:left}._rowBorder_g8wde_266{border-bottom:1px solid #2a2a2a}._rebuildCard_g8wde_270{border:1px solid #333;border-radius:6px;padding:8px 10px;margin-top:10px;background:#111}._rebuildTotalRow_g8wde_278{border-top:1px solid #444}._rebuildTotalRow_g8wde_278 td{font-weight:600}._promptExportBar_g8wde_287{margin-bottom:12px}._promptScrollArea_g8wde_291{max-height:500px;overflow:auto}._promptEmpty_g8wde_296{color:#999;padding:12px}._promptTimestamp_g8wde_302{color:#666;font-size:12px;margin:12px 0 4px;padding-bottom:6px}._textPromptCard_g8wde_310{margin:4px 0;background:#141414;border-radius:6px;border:1px solid #303030;padding:10px 14px}._preText_g8wde_319{white-space:pre-wrap;word-break:break-word;font-size:13px;line-height:1.6;color:#d9d9d9;margin:4px 0}._systemCollapse_g8wde_329{margin:4px 0;background:#1e1e1e;border:1px solid #303030;border-radius:6px}._systemLabel_g8wde_336{color:#888;font-size:12px}._preSys_g8wde_341{white-space:pre-wrap;word-break:break-word;font-size:12px;line-height:1.5;color:#999;margin:0}._promptTextarea_g8wde_351{box-sizing:border-box;background:#000;width:100%;min-height:400px;color:#d9d9d9;font-family:monospace;font-size:13px;line-height:1.6;border:none;resize:vertical;padding:10px 14px;outline:none}._projectStatsCenter_g8wde_367{display:flex;justify-content:center;padding:40px 0}._projectStatsEmpty_g8wde_373{color:#999;padding:40px 0;text-align:center;font-size:13px}._projectStatsContent_g8wde_380{display:flex;flex-direction:column;gap:16px}._projectStatsUpdated_g8wde_386{color:#666;font-size:12px;text-align:right}._projectStatsSummary_g8wde_392{display:grid;grid-template-columns:1fr 1fr;gap:10px}._projectStatCard_g8wde_398{background:#111;border:1px solid #333;border-radius:8px;padding:14px 12px;text-align:center}._projectStatValue_g8wde_406{font-size:22px;font-weight:700;color:#e5e5e5;font-family:monospace;font-variant-numeric:tabular-nums}._projectStatLabel_g8wde_414{font-size:12px;color:#888;margin-top:4px}._projectStatsSection_g8wde_420{display:flex;flex-direction:column;gap:10px}._projectStatsSectionTitle_g8wde_426{font-size:14px;font-weight:600;color:#ccc;padding-bottom:4px;border-bottom:1px solid #333}._projectStatsModelCard_g8wde_434{background:#111;border:1px solid #333;border-radius:6px;padding:10px 12px}._projectStatsModelHeader_g8wde_441{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #333}._projectStatsModelName_g8wde_450{font-size:13px;font-weight:600;color:#e5e5e5}._projectStatsModelCount_g8wde_456{font-size:12px;color:#888;font-family:monospace}._pluginDirHint_g8wde_463{margin-bottom:12px;font-size:12px;color:#888}._pluginDirPath_g8wde_469{font-family:Menlo,Monaco,monospace;color:#aaa;cursor:pointer;padding:1px 4px;border-radius:3px;background:#1e1e1e}._pluginDirPath_g8wde_469:hover{color:#3b82f6}._pluginList_g8wde_482{display:flex;flex-direction:column;gap:8px}._pluginItem_g8wde_488{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border:1px solid #303030;border-radius:6px;background:#141414}._pluginInfo_g8wde_498{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}._pluginName_g8wde_506{font-size:14px;color:#e5e5e5;font-weight:500}._pluginFile_g8wde_512{font-size:12px;color:#666;font-family:Menlo,Monaco,monospace}._pluginHooks_g8wde_518{display:flex;gap:4px;flex-wrap:wrap;margin-top:2px}._pluginHookTag_g8wde_525{font-size:11px;padding:0 5px;border-radius:3px;background:#1e3a5f;color:#60a5fa;line-height:18px}._pluginActions_g8wde_534{display:flex;align-items:center;gap:8px;flex-shrink:0;margin-left:12px}._pluginEmpty_g8wde_542{text-align:center;padding:32px 0;color:#999}._cachePopover_g8wde_549{max-width:800px}._cacheScrollArea_g8wde_553{max-height:450px;overflow-y:auto}._cachePopoverTitle_g8wde_558{display:flex;align-items:center;gap:6px;font-size:14px;font-weight:600;color:#e5e5e5}._cachePopoverHeader_g8wde_567{margin-bottom:8px;padding-bottom:6px;border-bottom:1px solid #333}._cacheCopyBtn_g8wde_573{font-size:14px;color:#888;cursor:pointer;transition:color .2s;margin-left:8px}._cacheCopyBtn_g8wde_573:hover{color:#e5e5e5}._cachePopoverEmpty_g8wde_585{padding:8px 4px;color:#999;font-size:13px}._cacheTokenInfo_g8wde_591{display:flex;align-items:center;font-size:12px;font-family:monospace;color:#aaa;margin-bottom:8px}._cacheSection_g8wde_600{margin-bottom:10px}._cacheSectionTitle_g8wde_604{display:flex;align-items:center;gap:2px;font-size:12px;font-weight:600;color:#aaa;margin-bottom:4px;padding:4px 0;background:none;border:none;cursor:pointer;-webkit-user-select:none;user-select:none;width:100%;text-align:left}._cacheSectionTitle_g8wde_604:hover{color:#ccc}._cacheSectionArrow_g8wde_625{display:inline-block;width:12px;font-size:10px;color:#666;flex-shrink:0}._cacheCodeBlock_g8wde_633{white-space:pre-wrap;word-break:break-word;font-size:12px;line-height:1.5;color:#ccc;background:#111;border:1px solid #2a2a2a;border-radius:4px;padding:8px;margin:4px 0;font-family:Menlo,Monaco,monospace}._cacheCodeBlockSystem_g8wde_647{white-space:pre-wrap;word-break:break-word;font-size:12px;line-height:1.5;color:#ccc;background:#060f2a;border:1px solid #0b2a5c;border-radius:4px;padding:8px;margin:4px 0;font-family:Menlo,Monaco,monospace}._cacheNavBtn_g8wde_661{margin-left:auto;font-size:11px;color:#1668dc;cursor:pointer;border:1px solid #1668dc;border-radius:3px;padding:1px 6px;white-space:nowrap}._cacheNavBtn_g8wde_661:hover{background:#1668dc26}._cacheNavList_g8wde_676{width:600px;max-height:300px;overflow-y:auto}._cacheNavItem_g8wde_682{padding:4px 8px;font-size:12px;color:#ccc;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:3px}._cacheNavItem_g8wde_682:hover{background:#1668dc33;color:#fff}._cacheBlockHighlight_g8wde_698{box-shadow:0 0 10px #1668dc99;transition:box-shadow .2s ease-in}._cacheBlockHighlightFading_g8wde_703{box-shadow:0 0 10px #1668dc00;transition:box-shadow 3s ease-out}._cacheBorderSvg_g8wde_708{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;pointer-events:none;overflow:visible}._cacheBorderSvgFading_g8wde_717{opacity:0;transition:opacity 3s ease-out}._cacheBorderRect_g8wde_722{animation:_cacheDashRotate_g8wde_1 4s linear infinite}@keyframes _cacheDashRotate_g8wde_1{0%{stroke-dashoffset:0}to{stroke-dashoffset:-100}}._thLeft_g8wde_732{text-align:left}._cacheCalibrationLabel_g8wde_737{margin-left:auto;color:#888;font-size:12px;white-space:nowrap}._calibrationSelect_g8wde_745{width:160px;flex-shrink:0}._cachePopoverPlaceholder_g8wde_751{min-width:300px}._cacheWriteToken_g8wde_756{color:#faad14}._cacheReadToken_g8wde_760{color:#52c41a}._cacheCtxPercent_g8wde_764{color:#888;margin-left:6px}._pluginModalFooter_g8wde_770{display:flex;justify-content:space-between}._pluginModalFooterLeft_g8wde_775{display:flex;gap:8px}._pluginDirLabel_g8wde_781{color:#888}._pluginEmptyTitle_g8wde_786{font-size:14px;margin-bottom:4px}._pluginEmptyHint_g8wde_791{font-size:12px;color:#666}._cdnUrlLabel_g8wde_797{margin-bottom:6px;color:#ccc;font-size:13px}._cdnInput_g8wde_803{background:#1e1e1e;border-color:#333;color:#eee}._titleIcon_g8wde_810{margin-right:8px}._countryFlagIcon_g8wde_815{vertical-align:-3px;font-size:20px}._svgIcon_g8wde_821{vertical-align:-3px}._iconMirror_g8wde_826{transform:scaleX(-1)}._langGrid_g8wde_831{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:8px 4px;min-width:360px;max-height:none}._langBtn_g8wde_841{width:100%;text-align:center}._countryInfoPopover_g8wde_847{color:#ccc;font-size:13px;line-height:22px}._countryInfoMeta_g8wde_853{color:#888;font-size:12px}