cc-viewer 1.6.133 → 1.6.135
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{App-BFEbsWQM.js → App-CiKrTzmV.js} +3 -3
- package/dist/assets/{AppHeader-33AglxUb.css → AppHeader-CSZXVrUA.css} +2 -2
- package/dist/assets/{AppHeader.module-CtuCFbdA.js → AppHeader.module-BucAP1I6.js} +167 -167
- package/dist/assets/{Mobile-Bp2RbeBU.js → Mobile-CPsj17Ye.js} +1 -1
- package/dist/assets/{_basePickBy-B0T11xYQ.js → _basePickBy-B07313hh.js} +1 -1
- package/dist/assets/{_baseUniq-D0M8tzSp.js → _baseUniq-CC1OyGvv.js} +1 -1
- package/dist/assets/{arc-D6cdy7q_.js → arc-xgfeR0sh.js} +1 -1
- package/dist/assets/{architectureDiagram-2XIMDMQ5-2GfhKa0T.js → architectureDiagram-2XIMDMQ5-U4BWIbeh.js} +1 -1
- package/dist/assets/{blockDiagram-WCTKOSBZ-DLA0Sj1x.js → blockDiagram-WCTKOSBZ-DVT_orpB.js} +1 -1
- package/dist/assets/{c4Diagram-IC4MRINW-CA_Hr66Y.js → c4Diagram-IC4MRINW-BiwQJYjP.js} +1 -1
- package/dist/assets/channel-D_8xFXy2.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-D04pZGdL.js → chunk-4BX2VUAB-CBYSBxyt.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-CUb23Ouk.js → chunk-55IACEB6-hT0sLSWa.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-FI6C75_Q.js → chunk-FMBD7UC4-CfGLrmuo.js} +1 -1
- package/dist/assets/{chunk-JSJVCQXG-BbOPb9o6.js → chunk-JSJVCQXG-BHoMGqjU.js} +1 -1
- package/dist/assets/{chunk-KX2RTZJC-CAzT38FV.js → chunk-KX2RTZJC-DN75gY1l.js} +1 -1
- package/dist/assets/{chunk-NQ4KR5QH-Dti2CrAe.js → chunk-NQ4KR5QH-BbNNEwOx.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-DyGq9ruZ.js → chunk-QZHKN3VN-BNDj0nMC.js} +1 -1
- package/dist/assets/{chunk-WL4C6EOR-BwLYBeLu.js → chunk-WL4C6EOR-BozgtboQ.js} +1 -1
- package/dist/assets/classDiagram-VBA2DB6C-BWwwHOZ-.js +1 -0
- package/dist/assets/classDiagram-v2-RAHNMMFH-BWwwHOZ-.js +1 -0
- package/dist/assets/clone-DJV9Krok.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-V_7iUn46.js → cose-bilkent-S5V4N54A-CSdGwvjf.js} +1 -1
- package/dist/assets/{dagre-KLK3FWXG-CZUsFwM6.js → dagre-KLK3FWXG-Ehj7Ubjz.js} +1 -1
- package/dist/assets/{diagram-E7M64L7V-DMxygiOC.js → diagram-E7M64L7V-B-V5o8xE.js} +1 -1
- package/dist/assets/{diagram-IFDJBPK2-Ld2HDtF0.js → diagram-IFDJBPK2-Zo7tHk4R.js} +1 -1
- package/dist/assets/{diagram-P4PSJMXO-m1kcREdi.js → diagram-P4PSJMXO-DSFTgzZe.js} +1 -1
- package/dist/assets/{erDiagram-INFDFZHY-vVdlf61B.js → erDiagram-INFDFZHY-D0nAwbRU.js} +1 -1
- package/dist/assets/{flowDiagram-PKNHOUZH-2Y6Ggt46.js → flowDiagram-PKNHOUZH-BViiPxcU.js} +1 -1
- package/dist/assets/{ganttDiagram-A5KZAMGK-0V8ypZHs.js → ganttDiagram-A5KZAMGK-C_WC40Vu.js} +1 -1
- package/dist/assets/{gitGraphDiagram-K3NZZRJ6-HI7IftLs.js → gitGraphDiagram-K3NZZRJ6-CemF1196.js} +1 -1
- package/dist/assets/{graph-CFNwsLbn.js → graph-8HK8KYfu.js} +1 -1
- package/dist/assets/{index-C_MF_ut6.js → index-fQ2Hgk5k.js} +2 -2
- package/dist/assets/{infoDiagram-LFFYTUFH-CTmG7GiP.js → infoDiagram-LFFYTUFH-KxXnHQw7.js} +1 -1
- package/dist/assets/{ishikawaDiagram-PHBUUO56-DYR1Aom3.js → ishikawaDiagram-PHBUUO56-CsLpZ7y_.js} +1 -1
- package/dist/assets/{journeyDiagram-4ABVD52K-B72IGO-5.js → journeyDiagram-4ABVD52K-P9g9CpuI.js} +1 -1
- package/dist/assets/{kanban-definition-K7BYSVSG-BwfQ0qJA.js → kanban-definition-K7BYSVSG-Po5BPVa9.js} +1 -1
- package/dist/assets/{layout-ubniD4iw.js → layout-CShr6rES.js} +1 -1
- package/dist/assets/{linear-DXo9GC2I.js → linear-NZrYUAOy.js} +1 -1
- package/dist/assets/{mermaid.core-JEugC4ZG.js → mermaid.core-oUtOSZ0B.js} +4 -4
- package/dist/assets/{mindmap-definition-YRQLILUH-BY54o1L8.js → mindmap-definition-YRQLILUH-H6VoY0jO.js} +1 -1
- package/dist/assets/{pieDiagram-SKSYHLDU-KOY275JH.js → pieDiagram-SKSYHLDU-BAZvUo10.js} +1 -1
- package/dist/assets/{quadrantDiagram-337W2JSQ-CIffLrSV.js → quadrantDiagram-337W2JSQ-D8FqRn98.js} +1 -1
- package/dist/assets/{requirementDiagram-Z7DCOOCP-OJQ_B16B.js → requirementDiagram-Z7DCOOCP-DblTBWUx.js} +1 -1
- package/dist/assets/{sankeyDiagram-WA2Y5GQK-CbmsQtQE.js → sankeyDiagram-WA2Y5GQK-CerU8Igi.js} +1 -1
- package/dist/assets/{sequenceDiagram-2WXFIKYE-q2XAawHr.js → sequenceDiagram-2WXFIKYE-BH5oScre.js} +1 -1
- package/dist/assets/{stateDiagram-RAJIS63D-bC1v7Grm.js → stateDiagram-RAJIS63D-SmC70KgI.js} +1 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-HqjqpTdD.js +1 -0
- package/dist/assets/{timeline-definition-YZTLITO2-CRdvqD0V.js → timeline-definition-YZTLITO2-DXSWFPXm.js} +1 -1
- package/dist/assets/{treemap-KZPCXAKY-Ser7nc2K.js → treemap-KZPCXAKY-BnpH2C-Y.js} +1 -1
- package/dist/assets/{vennDiagram-LZ73GAT5--BhChYBy.js → vennDiagram-LZ73GAT5-TFM1kZZz.js} +1 -1
- package/dist/assets/{xychartDiagram-JWTSCODW-Ksm5Oz1H.js → xychartDiagram-JWTSCODW-q44H5Cko.js} +1 -1
- package/dist/index.html +1 -1
- package/lib/ask-bridge.js +8 -4
- package/lib/ensure-hooks.js +4 -2
- package/lib/perm-bridge.js +5 -2
- package/package.json +1 -1
- package/pty-manager.js +7 -1
- package/dist/assets/channel-la8yOvt2.js +0 -1
- package/dist/assets/classDiagram-VBA2DB6C-kUt0Xf8-.js +0 -1
- package/dist/assets/classDiagram-v2-RAHNMMFH-kUt0Xf8-.js +0 -1
- package/dist/assets/clone-CEVDUDen.js +0 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-BcqwFGAz.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Bs=Object.defineProperty;var Ds=(a,s,t)=>s in a?Bs(a,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[s]=t;var O=(a,s,t)=>Ds(a,typeof s!="symbol"?s+"":s,t);import{r as v,R as U,j as e,a as Os}from"./index-
|
|
1
|
+
var Bs=Object.defineProperty;var Ds=(a,s,t)=>s in a?Bs(a,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[s]=t;var O=(a,s,t)=>Ds(a,typeof s!="symbol"?s+"":s,t);import{r as v,R as U,j as e,a as Os}from"./index-fQ2Hgk5k.js";import{g as Yt,r as $s,u as Ee,P as ct,c as te,Q as at,d as ft,U as Zt,V as Fs,W as Hs,X as zs,Y as Vs,Z as qs,$ as es,a0 as wt,a1 as Us,a2 as Ws,a3 as Ks,a4 as Gs,a5 as Js,a6 as Qs,a7 as Xs,_ as oe,a8 as Ys,a9 as xt,aa as Se,ab as Tt,ac as ut,ad as Mt,ae as Zs,af as ea,ag as Et,ah as ta,m as sa,ai as aa,aj as na,ak as oa,al as ia,am as la,an as ra,ao as It,C as _t,I as Ce,ap as ca,aq as ts,ar as da,as as ss,at as ha,au as ua,av as ma,e as ue,t as m,w as Ke,x as pa,y as Te,j as ga,k as fa,l as xa,s as d,v as G,q as re,aw as as,ax as Ve,ay as J,L as Le,az as ze,n as va,aA as ya,o as Ge,aB as ja,aC as _e,S as ns,aD as qe,aE as Ca,aF as je,aG as Rt,B as H,J as Me,aH as Re,M as ba,aI as os,aJ as Qe,aK as Na,aL as Sa,G as vt,aM as Lt,H as yt,aN as _a,O as is,aO as ka,aP as wa,aQ as Ae,aR as Pt,aS as Ta,aT as At,aU as ls,aV as rs,aW as Be,aX as De,aY as cs,aZ as mt,a_ as Bt,a$ as Dt,b0 as Ot,b1 as Ma,b2 as Ea,A as Ia,b3 as Xe,b4 as $t,b5 as Ra,D as La,z as I,E as Pa,b6 as Aa}from"./AppHeader.module-BucAP1I6.js";const Ye=(a,s,t,n,r)=>({background:a,border:`${Ee(n.lineWidth)} ${n.lineType} ${s}`,[`${r}-icon`]:{color:t}}),Ba=a=>{const{componentCls:s,motionDurationSlow:t,marginXS:n,marginSM:r,fontSize:o,fontSizeLG:u,lineHeight:g,borderRadiusLG:i,motionEaseInOutCirc:h,withDescriptionIconSize:l,colorText:c,colorTextHeading:p,withDescriptionPadding:j,defaultPadding:f}=a;return{[s]:Object.assign(Object.assign({},$s(a)),{position:"relative",display:"flex",alignItems:"center",padding:f,wordWrap:"break-word",borderRadius:i,[`&${s}-rtl`]:{direction:"rtl"},[`${s}-content`]:{flex:1,minWidth:0},[`${s}-icon`]:{marginInlineEnd:n,lineHeight:0},"&-description":{display:"none",fontSize:o,lineHeight:g},"&-message":{color:p},[`&${s}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${t} ${h}, opacity ${t} ${h},
|
|
2
2
|
padding-top ${t} ${h}, padding-bottom ${t} ${h},
|
|
3
3
|
margin-bottom ${t} ${h}`},[`&${s}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${s}-with-description`]:{alignItems:"flex-start",padding:j,[`${s}-icon`]:{marginInlineEnd:r,fontSize:l,lineHeight:0},[`${s}-message`]:{display:"block",marginBottom:n,color:p,fontSize:u},[`${s}-description`]:{display:"block",color:c}},[`${s}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},Da=a=>{const{componentCls:s,colorSuccess:t,colorSuccessBorder:n,colorSuccessBg:r,colorWarning:o,colorWarningBorder:u,colorWarningBg:g,colorError:i,colorErrorBorder:h,colorErrorBg:l,colorInfo:c,colorInfoBorder:p,colorInfoBg:j}=a;return{[s]:{"&-success":Ye(r,n,t,a,s),"&-info":Ye(j,p,c,a,s),"&-warning":Ye(g,u,o,a,s),"&-error":Object.assign(Object.assign({},Ye(l,h,i,a,s)),{[`${s}-description > pre`]:{margin:0,padding:0}})}}},Oa=a=>{const{componentCls:s,iconCls:t,motionDurationMid:n,marginXS:r,fontSizeIcon:o,colorIcon:u,colorIconHover:g}=a;return{[s]:{"&-action":{marginInlineStart:r},[`${s}-close-icon`]:{marginInlineStart:r,padding:0,overflow:"hidden",fontSize:o,lineHeight:Ee(o),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${t}-close`]:{color:u,transition:`color ${n}`,"&:hover":{color:g}}},"&-close-text":{color:u,transition:`color ${n}`,"&:hover":{color:g}}}}},$a=a=>({withDescriptionIconSize:a.fontSizeHeading3,defaultPadding:`${a.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${a.paddingMD}px ${a.paddingContentHorizontalLG}px`}),Fa=Yt("Alert",a=>[Ba(a),Da(a),Oa(a)],$a);var Ft=function(a,s){var t={};for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&s.indexOf(n)<0&&(t[n]=a[n]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(a);r<n.length;r++)s.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(a,n[r])&&(t[n[r]]=a[n[r]]);return t};const Ha={success:qs,info:Vs,error:zs,warning:Hs},za=a=>{const{icon:s,prefixCls:t,type:n}=a,r=Ha[n]||null;return s?Fs(s,v.createElement("span",{className:`${t}-icon`},s),()=>({className:te(`${t}-icon`,s.props.className)})):v.createElement(r,{className:`${t}-icon`})},Va=a=>{const{isClosable:s,prefixCls:t,closeIcon:n,handleClose:r,ariaProps:o}=a,u=n===!0||n===void 0?v.createElement(es,null):n;return s?v.createElement("button",Object.assign({type:"button",onClick:r,className:`${t}-close-icon`,tabIndex:0},o),u):null},ds=v.forwardRef((a,s)=>{const{description:t,prefixCls:n,message:r,banner:o,className:u,rootClassName:g,style:i,onMouseEnter:h,onMouseLeave:l,onClick:c,afterClose:p,showIcon:j,closable:f,closeText:x,closeIcon:y,action:C,id:k}=a,N=Ft(a,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action","id"]),[b,M]=v.useState(!1),E=v.useRef(null);v.useImperativeHandle(s,()=>({nativeElement:E.current}));const{getPrefixCls:L,direction:R,closable:T,closeIcon:A,className:D,style:se}=ct("alert"),F=L("alert",n),[P,Q,ie]=Fa(F),Y=ee=>{var S;M(!0),(S=a.onClose)===null||S===void 0||S.call(a,ee)},ce=v.useMemo(()=>a.type!==void 0?a.type:o?"warning":"info",[a.type,o]),de=v.useMemo(()=>typeof f=="object"&&f.closeIcon||x?!0:typeof f=="boolean"?f:y!==!1&&y!==null&&y!==void 0?!0:!!T,[x,y,f,T]),le=o&&j===void 0?!0:j,W=te(F,`${F}-${ce}`,{[`${F}-with-description`]:!!t,[`${F}-no-icon`]:!le,[`${F}-banner`]:!!o,[`${F}-rtl`]:R==="rtl"},D,u,g,ie,Q),me=at(N,{aria:!0,data:!0}),ae=v.useMemo(()=>typeof f=="object"&&f.closeIcon?f.closeIcon:x||(y!==void 0?y:typeof T=="object"&&T.closeIcon?T.closeIcon:A),[y,f,T,x,A]),xe=v.useMemo(()=>{const ee=f??T;if(typeof ee=="object"){const{closeIcon:S}=ee;return Ft(ee,["closeIcon"])}return{}},[f,T]);return P(v.createElement(ft,{visible:!b,motionName:`${F}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:ee=>({maxHeight:ee.offsetHeight}),onLeaveEnd:p},({className:ee,style:S},K)=>v.createElement("div",Object.assign({id:k,ref:Zt(E,K),"data-show":!b,className:te(W,ee),style:Object.assign(Object.assign(Object.assign({},se),i),S),onMouseEnter:h,onMouseLeave:l,onClick:c,role:"alert"},me),le?v.createElement(za,{description:t,icon:a.icon,prefixCls:F,type:ce}):null,v.createElement("div",{className:`${F}-content`},r?v.createElement("div",{className:`${F}-message`},r):null,t?v.createElement("div",{className:`${F}-description`},t):null),C?v.createElement("div",{className:`${F}-action`},C):null,v.createElement(Va,{isClosable:de,prefixCls:F,closeIcon:ae,handleClose:Y,ariaProps:xe}))))});function qa(a,s,t){return s=wt(s),Us(a,Ws()?Reflect.construct(s,t||[],wt(a).constructor):s.apply(a,t))}let Ua=(function(a){function s(){var t;return Js(this,s),t=qa(this,s,arguments),t.state={error:void 0,info:{componentStack:""}},t}return Ks(s,a),Gs(s,[{key:"componentDidCatch",value:function(n,r){this.setState({error:n,info:r})}},{key:"render",value:function(){const{message:n,description:r,id:o,children:u}=this.props,{error:g,info:i}=this.state,h=(i==null?void 0:i.componentStack)||null,l=typeof n>"u"?(g||"").toString():n,c=typeof r>"u"?h:r;return g?v.createElement(ds,{id:o,type:"error",message:l,description:v.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},c)}):u}}])})(v.Component);const hs=ds;hs.ErrorBoundary=Ua;var Ht=v.createContext(null),us=v.createContext({}),Wa=["prefixCls","className","containerRef"],Ka=function(s){var t=s.prefixCls,n=s.className,r=s.containerRef,o=Qs(s,Wa),u=v.useContext(us),g=u.panel,i=Xs(g,r);return v.createElement("div",oe({className:te("".concat(t,"-content"),n),role:"dialog",ref:i},at(s,{aria:!0}),{"aria-modal":"true"},o))};function zt(a){return typeof a=="string"&&String(Number(a))===a?(Ys(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(a)):a}var Vt={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Ga(a,s){var t,n,r,o=a.prefixCls,u=a.open,g=a.placement,i=a.inline,h=a.push,l=a.forceRender,c=a.autoFocus,p=a.keyboard,j=a.classNames,f=a.rootClassName,x=a.rootStyle,y=a.zIndex,C=a.className,k=a.id,N=a.style,b=a.motion,M=a.width,E=a.height,L=a.children,R=a.mask,T=a.maskClosable,A=a.maskMotion,D=a.maskClassName,se=a.maskStyle,F=a.afterOpenChange,P=a.onClose,Q=a.onMouseEnter,ie=a.onMouseOver,Y=a.onMouseLeave,ce=a.onClick,de=a.onKeyDown,le=a.onKeyUp,W=a.styles,me=a.drawerRender,ae=v.useRef(),xe=v.useRef(),ee=v.useRef();v.useImperativeHandle(s,function(){return ae.current});var S=function(ge){var $e=ge.keyCode,Fe=ge.shiftKey;switch($e){case ut.TAB:{if($e===ut.TAB){if(!Fe&&document.activeElement===ee.current){var He;(He=xe.current)===null||He===void 0||He.focus({preventScroll:!0})}else if(Fe&&document.activeElement===xe.current){var ht;(ht=ee.current)===null||ht===void 0||ht.focus({preventScroll:!0})}}break}case ut.ESC:{P&&p&&(ge.stopPropagation(),P(ge));break}}};v.useEffect(function(){if(u&&c){var Z;(Z=ae.current)===null||Z===void 0||Z.focus({preventScroll:!0})}},[u]);var K=v.useState(!1),ve=xt(K,2),be=ve[0],Ne=ve[1],q=v.useContext(Ht),ke;typeof h=="boolean"?ke=h?{}:{distance:0}:ke=h||{};var ye=(t=(n=(r=ke)===null||r===void 0?void 0:r.distance)!==null&&n!==void 0?n:q==null?void 0:q.pushDistance)!==null&&t!==void 0?t:180,Je=v.useMemo(function(){return{pushDistance:ye,push:function(){Ne(!0)},pull:function(){Ne(!1)}}},[ye]);v.useEffect(function(){if(u){var Z;q==null||(Z=q.push)===null||Z===void 0||Z.call(q)}else{var ge;q==null||(ge=q.pull)===null||ge===void 0||ge.call(q)}},[u]),v.useEffect(function(){return function(){var Z;q==null||(Z=q.pull)===null||Z===void 0||Z.call(q)}},[]);var pe=v.createElement(ft,oe({key:"mask"},A,{visible:R&&u}),function(Z,ge){var $e=Z.className,Fe=Z.style;return v.createElement("div",{className:te("".concat(o,"-mask"),$e,j==null?void 0:j.mask,D),style:Se(Se(Se({},Fe),se),W==null?void 0:W.mask),onClick:T&&u?P:void 0,ref:ge})}),ne=typeof b=="function"?b(g):b,$={};if(be&&ye)switch(g){case"top":$.transform="translateY(".concat(ye,"px)");break;case"bottom":$.transform="translateY(".concat(-ye,"px)");break;case"left":$.transform="translateX(".concat(ye,"px)");break;default:$.transform="translateX(".concat(-ye,"px)");break}g==="left"||g==="right"?$.width=zt(M):$.height=zt(E);var he={onMouseEnter:Q,onMouseOver:ie,onMouseLeave:Y,onClick:ce,onKeyDown:de,onKeyUp:le},we=v.createElement(ft,oe({key:"panel"},ne,{visible:u,forceRender:l,onVisibleChanged:function(ge){F==null||F(ge)},removeOnLeave:!1,leavedClassName:"".concat(o,"-content-wrapper-hidden")}),function(Z,ge){var $e=Z.className,Fe=Z.style,He=v.createElement(Ka,oe({id:k,containerRef:ge,prefixCls:o,className:te(C,j==null?void 0:j.content),style:Se(Se({},N),W==null?void 0:W.content)},at(a,{aria:!0}),he),L);return v.createElement("div",oe({className:te("".concat(o,"-content-wrapper"),j==null?void 0:j.wrapper,$e),style:Se(Se(Se({},$),Fe),W==null?void 0:W.wrapper)},at(a,{data:!0})),me?me(He):He)}),We=Se({},x);return y&&(We.zIndex=y),v.createElement(Ht.Provider,{value:Je},v.createElement("div",{className:te(o,"".concat(o,"-").concat(g),f,Tt(Tt({},"".concat(o,"-open"),u),"".concat(o,"-inline"),i)),style:We,tabIndex:-1,ref:ae,onKeyDown:S},pe,v.createElement("div",{tabIndex:0,ref:xe,style:Vt,"aria-hidden":"true","data-sentinel":"start"}),we,v.createElement("div",{tabIndex:0,ref:ee,style:Vt,"aria-hidden":"true","data-sentinel":"end"})))}var Ja=v.forwardRef(Ga),Qa=function(s){var t=s.open,n=t===void 0?!1:t,r=s.prefixCls,o=r===void 0?"rc-drawer":r,u=s.placement,g=u===void 0?"right":u,i=s.autoFocus,h=i===void 0?!0:i,l=s.keyboard,c=l===void 0?!0:l,p=s.width,j=p===void 0?378:p,f=s.mask,x=f===void 0?!0:f,y=s.maskClosable,C=y===void 0?!0:y,k=s.getContainer,N=s.forceRender,b=s.afterOpenChange,M=s.destroyOnClose,E=s.onMouseEnter,L=s.onMouseOver,R=s.onMouseLeave,T=s.onClick,A=s.onKeyDown,D=s.onKeyUp,se=s.panelRef,F=v.useState(!1),P=xt(F,2),Q=P[0],ie=P[1],Y=v.useState(!1),ce=xt(Y,2),de=ce[0],le=ce[1];Mt(function(){le(!0)},[]);var W=de?n:!1,me=v.useRef(),ae=v.useRef();Mt(function(){W&&(ae.current=document.activeElement)},[W]);var xe=function(be){var Ne;if(ie(be),b==null||b(be),!be&&ae.current&&!((Ne=me.current)!==null&&Ne!==void 0&&Ne.contains(ae.current))){var q;(q=ae.current)===null||q===void 0||q.focus({preventScroll:!0})}},ee=v.useMemo(function(){return{panel:se}},[se]);if(!N&&!Q&&!W&&M)return null;var S={onMouseEnter:E,onMouseOver:L,onMouseLeave:R,onClick:T,onKeyDown:A,onKeyUp:D},K=Se(Se({},s),{},{open:W,prefixCls:o,placement:g,autoFocus:h,keyboard:c,width:j,mask:x,maskClosable:C,inline:k===!1,afterOpenChange:xe,ref:me},S);return v.createElement(us.Provider,{value:ee},v.createElement(Zs,{open:W||N||Q,autoDestroy:!1,getContainer:k,autoLock:x&&(W||Q)},v.createElement(Ja,K)))};const ms=a=>{var s,t;const{prefixCls:n,ariaId:r,title:o,footer:u,extra:g,closable:i,loading:h,onClose:l,headerStyle:c,bodyStyle:p,footerStyle:j,children:f,classNames:x,styles:y}=a,C=ct("drawer");let k;i===!1?k=void 0:i===void 0||i===!0?k="start":k=(i==null?void 0:i.placement)==="end"?"end":"start";const N=v.useCallback(R=>v.createElement("button",{type:"button",onClick:l,className:te(`${n}-close`,{[`${n}-close-${k}`]:k==="end"})},R),[l,n,k]),[b,M]=ea(Et(a),Et(C),{closable:!0,closeIconRender:N}),E=()=>{var R,T;return!o&&!b?null:v.createElement("div",{style:Object.assign(Object.assign(Object.assign({},(R=C.styles)===null||R===void 0?void 0:R.header),c),y==null?void 0:y.header),className:te(`${n}-header`,{[`${n}-header-close-only`]:b&&!o&&!g},(T=C.classNames)===null||T===void 0?void 0:T.header,x==null?void 0:x.header)},v.createElement("div",{className:`${n}-header-title`},k==="start"&&M,o&&v.createElement("div",{className:`${n}-title`,id:r},o)),g&&v.createElement("div",{className:`${n}-extra`},g),k==="end"&&M)},L=()=>{var R,T;if(!u)return null;const A=`${n}-footer`;return v.createElement("div",{className:te(A,(R=C.classNames)===null||R===void 0?void 0:R.footer,x==null?void 0:x.footer),style:Object.assign(Object.assign(Object.assign({},(T=C.styles)===null||T===void 0?void 0:T.footer),j),y==null?void 0:y.footer)},u)};return v.createElement(v.Fragment,null,E(),v.createElement("div",{className:te(`${n}-body`,x==null?void 0:x.body,(s=C.classNames)===null||s===void 0?void 0:s.body),style:Object.assign(Object.assign(Object.assign({},(t=C.styles)===null||t===void 0?void 0:t.body),p),y==null?void 0:y.body)},h?v.createElement(ta,{active:!0,title:!1,paragraph:{rows:5},className:`${n}-body-skeleton`}):f),L())},Xa=a=>{const s="100%";return{left:`translateX(-${s})`,right:`translateX(${s})`,top:`translateY(-${s})`,bottom:`translateY(${s})`}[a]},ps=(a,s)=>({"&-enter, &-appear":Object.assign(Object.assign({},a),{"&-active":s}),"&-leave":Object.assign(Object.assign({},s),{"&-active":a})}),gs=(a,s)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${s}`}}},ps({opacity:a},{opacity:1})),Ya=(a,s)=>[gs(.7,s),ps({transform:Xa(a)},{transform:"none"})],Za=a=>{const{componentCls:s,motionDurationSlow:t}=a;return{[s]:{[`${s}-mask-motion`]:gs(0,t),[`${s}-panel-motion`]:["left","right","top","bottom"].reduce((n,r)=>Object.assign(Object.assign({},n),{[`&-${r}`]:Ya(r,t)}),{})}}},en=a=>{const{borderRadiusSM:s,componentCls:t,zIndexPopup:n,colorBgMask:r,colorBgElevated:o,motionDurationSlow:u,motionDurationMid:g,paddingXS:i,padding:h,paddingLG:l,fontSizeLG:c,lineHeightLG:p,lineWidth:j,lineType:f,colorSplit:x,marginXS:y,colorIcon:C,colorIconHover:k,colorBgTextHover:N,colorBgTextActive:b,colorText:M,fontWeightStrong:E,footerPaddingBlock:L,footerPaddingInline:R,calc:T}=a,A=`${t}-content-wrapper`;return{[t]:{position:"fixed",inset:0,zIndex:n,pointerEvents:"none",color:M,"&-pure":{position:"relative",background:o,display:"flex",flexDirection:"column",[`&${t}-left`]:{boxShadow:a.boxShadowDrawerLeft},[`&${t}-right`]:{boxShadow:a.boxShadowDrawerRight},[`&${t}-top`]:{boxShadow:a.boxShadowDrawerUp},[`&${t}-bottom`]:{boxShadow:a.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${t}-mask`]:{position:"absolute",inset:0,zIndex:n,background:r,pointerEvents:"auto"},[A]:{position:"absolute",zIndex:n,maxWidth:"100vw",transition:`all ${u}`,"&-hidden":{display:"none"}},[`&-left > ${A}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:a.boxShadowDrawerLeft},[`&-right > ${A}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:a.boxShadowDrawerRight},[`&-top > ${A}`]:{top:0,insetInline:0,boxShadow:a.boxShadowDrawerUp},[`&-bottom > ${A}`]:{bottom:0,insetInline:0,boxShadow:a.boxShadowDrawerDown},[`${t}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:o,pointerEvents:"auto"},[`${t}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${Ee(h)} ${Ee(l)}`,fontSize:c,lineHeight:p,borderBottom:`${Ee(j)} ${f} ${x}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${t}-extra`]:{flex:"none"},[`${t}-close`]:Object.assign({display:"inline-flex",width:T(c).add(i).equal(),height:T(c).add(i).equal(),borderRadius:s,justifyContent:"center",alignItems:"center",color:C,fontWeight:E,fontSize:c,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${g}`,textRendering:"auto",[`&${t}-close-end`]:{marginInlineStart:y},[`&:not(${t}-close-end)`]:{marginInlineEnd:y},"&:hover":{color:k,backgroundColor:N,textDecoration:"none"},"&:active":{backgroundColor:b}},aa(a)),[`${t}-title`]:{flex:1,margin:0,fontWeight:a.fontWeightStrong,fontSize:c,lineHeight:p},[`${t}-body`]:{flex:1,minWidth:0,minHeight:0,padding:l,overflow:"auto",[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${t}-footer`]:{flexShrink:0,padding:`${Ee(L)} ${Ee(R)}`,borderTop:`${Ee(j)} ${f} ${x}`},"&-rtl":{direction:"rtl"}}}},tn=a=>({zIndexPopup:a.zIndexPopupBase,footerPaddingBlock:a.paddingXS,footerPaddingInline:a.padding}),fs=Yt("Drawer",a=>{const s=sa(a,{});return[en(s),Za(s)]},tn);var xs=function(a,s){var t={};for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&s.indexOf(n)<0&&(t[n]=a[n]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(a);r<n.length;r++)s.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(a,n[r])&&(t[n[r]]=a[n[r]]);return t};const sn={distance:180},Ze=a=>{const{rootClassName:s,width:t,height:n,size:r="default",mask:o=!0,push:u=sn,open:g,afterOpenChange:i,onClose:h,prefixCls:l,getContainer:c,panelRef:p=null,style:j,className:f,"aria-labelledby":x,visible:y,afterVisibleChange:C,maskStyle:k,drawerStyle:N,contentWrapperStyle:b,destroyOnClose:M,destroyOnHidden:E}=a,L=xs(a,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","aria-labelledby","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),R=na(),T=L.title?R:void 0,{getPopupContainer:A,getPrefixCls:D,direction:se,className:F,style:P,classNames:Q,styles:ie}=ct("drawer"),Y=D("drawer",l),[ce,de,le]=fs(Y),W=c===void 0&&A?()=>A(document.body):c,me=te({"no-mask":!o,[`${Y}-rtl`]:se==="rtl"},s,de,le),ae=v.useMemo(()=>t??(r==="large"?736:378),[t,r]),xe=v.useMemo(()=>n??(r==="large"?736:378),[n,r]),ee={motionName:It(Y,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},S=ye=>({motionName:It(Y,`panel-motion-${ye}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),K=oa(),ve=Zt(p,K),[be,Ne]=ia("Drawer",L.zIndex),{classNames:q={},styles:ke={}}=L;return ce(v.createElement(la,{form:!0,space:!0},v.createElement(ra.Provider,{value:Ne},v.createElement(Qa,Object.assign({prefixCls:Y,onClose:h,maskMotion:ee,motion:S},L,{classNames:{mask:te(q.mask,Q.mask),content:te(q.content,Q.content),wrapper:te(q.wrapper,Q.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},ke.mask),k),ie.mask),content:Object.assign(Object.assign(Object.assign({},ke.content),N),ie.content),wrapper:Object.assign(Object.assign(Object.assign({},ke.wrapper),b),ie.wrapper)},open:g??y,mask:o,push:u,width:ae,height:xe,style:Object.assign(Object.assign({},P),j),className:te(F,f),rootClassName:me,getContainer:W,afterOpenChange:i??C,panelRef:ve,zIndex:be,"aria-labelledby":x??T,destroyOnClose:E??M}),v.createElement(ms,Object.assign({prefixCls:Y},L,{ariaId:T,onClose:h}))))))},an=a=>{const{prefixCls:s,style:t,className:n,placement:r="right"}=a,o=xs(a,["prefixCls","style","className","placement"]),{getPrefixCls:u}=v.useContext(_t),g=u("drawer",s),[i,h,l]=fs(g),c=te(g,`${g}-pure`,`${g}-${r}`,h,l,n);return i(v.createElement("div",{className:c,style:t},v.createElement(ms,Object.assign({prefixCls:g},o))))};Ze._InternalPanelDoNotUseOrYouWillBeFired=an;var nn={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"},on=function(s,t){return v.createElement(Ce,oe({},s,{ref:t,icon:nn}))},et=v.forwardRef(on),ln={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},rn=function(s,t){return v.createElement(Ce,oe({},s,{ref:t,icon:ln}))},qt=v.forwardRef(rn);function cn(a,s,t){return typeof t=="boolean"?t:a.length?!0:ca(s).some(r=>r.type===ts)}var vs=function(a,s){var t={};for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&s.indexOf(n)<0&&(t[n]=a[n]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(a);r<n.length;r++)s.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(a,n[r])&&(t[n[r]]=a[n[r]]);return t};function dt({suffixCls:a,tagName:s,displayName:t}){return n=>v.forwardRef((o,u)=>v.createElement(n,Object.assign({ref:u,suffixCls:a,tagName:s},o)))}const kt=v.forwardRef((a,s)=>{const{prefixCls:t,suffixCls:n,className:r,tagName:o}=a,u=vs(a,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:g}=v.useContext(_t),i=g("layout",t),[h,l,c]=ss(i),p=n?`${i}-${n}`:i;return h(v.createElement(o,Object.assign({className:te(t||p,r,l,c),ref:s},u)))}),dn=v.forwardRef((a,s)=>{const{direction:t}=v.useContext(_t),[n,r]=v.useState([]),{prefixCls:o,className:u,rootClassName:g,children:i,hasSider:h,tagName:l,style:c}=a,p=vs(a,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),j=da(p,["suffixCls"]),{getPrefixCls:f,className:x,style:y}=ct("layout"),C=f("layout",o),k=cn(n,i,h),[N,b,M]=ss(C),E=te(C,{[`${C}-has-sider`]:k,[`${C}-rtl`]:t==="rtl"},x,u,g,b,M),L=v.useMemo(()=>({siderHook:{addSider:R=>{r(T=>[].concat(ha(T),[R]))},removeSider:R=>{r(T=>T.filter(A=>A!==R))}}}),[]);return N(v.createElement(ua.Provider,{value:L},v.createElement(l,Object.assign({ref:s,className:E,style:Object.assign(Object.assign({},y),c)},j),i)))}),hn=dt({tagName:"div",displayName:"Layout"})(dn),un=dt({suffixCls:"header",tagName:"header",displayName:"Header"})(kt),mn=dt({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(kt),pn=dt({suffixCls:"content",tagName:"main",displayName:"Content"})(kt),Ie=hn;Ie.Header=un;Ie.Footer=mn;Ie.Content=pn;Ie.Sider=ts;Ie._InternalSiderContext=ma;var gn={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"},fn=function(s,t){return v.createElement(Ce,oe({},s,{ref:t,icon:gn}))},Ut=v.forwardRef(fn),xn={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"},vn=function(s,t){return v.createElement(Ce,oe({},s,{ref:t,icon:xn}))},Wt=v.forwardRef(vn),yn={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"},jn=function(s,t){return v.createElement(Ce,oe({},s,{ref:t,icon:yn}))},Kt=v.forwardRef(jn),Cn={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"},bn=function(s,t){return v.createElement(Ce,oe({},s,{ref:t,icon:Cn}))},tt=v.forwardRef(bn),Nn={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"},Sn=function(s,t){return v.createElement(Ce,oe({},s,{ref:t,icon:Nn}))},pt=v.forwardRef(Sn),_n={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"},kn=function(s,t){return v.createElement(Ce,oe({},s,{ref:t,icon:_n}))},wn=v.forwardRef(kn),Tn={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"},Mn=function(s,t){return v.createElement(Ce,oe({},s,{ref:t,icon:Tn}))},Gt=v.forwardRef(Mn),En={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"},In=function(s,t){return v.createElement(Ce,oe({},s,{ref:t,icon:En}))},Rn=v.forwardRef(In),Ln={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"},Pn=function(s,t){return v.createElement(Ce,oe({},s,{ref:t,icon:Ln}))},Jt=v.forwardRef(Pn),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"},Bn=function(s,t){return v.createElement(Ce,oe({},s,{ref:t,icon:An}))},Qt=v.forwardRef(Bn),Dn=Object.defineProperty,nt=Object.getOwnPropertySymbols,ys=Object.prototype.hasOwnProperty,js=Object.prototype.propertyIsEnumerable,Xt=(a,s,t)=>s in a?Dn(a,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[s]=t,jt=(a,s)=>{for(var t in s||(s={}))ys.call(s,t)&&Xt(a,t,s[t]);if(nt)for(var t of nt(s))js.call(s,t)&&Xt(a,t,s[t]);return a},Ct=(a,s)=>{var t={};for(var n in a)ys.call(a,n)&&s.indexOf(n)<0&&(t[n]=a[n]);if(a!=null&&nt)for(var n of nt(a))s.indexOf(n)<0&&js.call(a,n)&&(t[n]=a[n]);return t};/**
|
|
4
4
|
* @license QR Code generator library (TypeScript)
|
|
@@ -17,7 +17,7 @@ var Bs=Object.defineProperty;var Ds=(a,s,t)=>s in a?Bs(a,s,{enumerable:!0,config
|
|
|
17
17
|
|
|
18
18
|
`)],{type:"text/plain;charset=utf-8"}),o=URL.createObjectURL(r),u=document.createElement("a");u.href=o,u.download=`user-prompts-${new Date().toISOString().slice(0,10)}.txt`,u.click(),URL.revokeObjectURL(o)});O(this,"handleCalibrationModelChange",t=>{this.setState({calibrationModel:t}),localStorage.setItem("ccv_calibrationModel",t)});O(this,"handleShowProjectStats",()=>{this.setState({projectStatsVisible:!0,projectStatsLoading:!0}),fetch(ue("/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(ue("/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,n)=>{fetch(ue("/api/preferences")).then(r=>r.json()).then(r=>{let o=Array.isArray(r.disabledPlugins)?[...r.disabledPlugins]:[];return n?o=o.filter(u=>u!==t):o.includes(t)||o.push(t),fetch(ue("/api/preferences"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({disabledPlugins:o})})}).then(()=>fetch(ue("/api/plugins/reload"),{method:"POST"})).then(r=>{if(!r.ok)throw new Error(r.status);return r.json()}).then(r=>{this.setState({pluginsList:r.plugins||[],pluginsDir:r.pluginsDir||""})}).catch(()=>{})});O(this,"handleDeletePlugin",(t,n)=>{this.setState({deleteConfirmVisible:!0,deleteTarget:{file:t,name:n}})});O(this,"handleDeletePluginConfirm",()=>{const{file:t}=this.state.deleteTarget||{};t&&(this.setState({deleteConfirmVisible:!1,deleteTarget:null}),fetch(ue(`/api/plugins?file=${encodeURIComponent(t)}`),{method:"DELETE"}).then(n=>{if(!n.ok)throw new Error(n.status);return n.json()}).then(n=>{n.plugins&&this.setState({pluginsList:n.plugins,pluginsDir:n.pluginsDir||""})}).catch(()=>{}))});O(this,"handleReloadPlugins",()=>{fetch(ue("/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 n=t.files;if(!n||n.length===0)return;for(const o of n)if(!o.name.endsWith(".js")&&!o.name.endsWith(".mjs")){J.error(m("ui.plugins.invalidFile"));return}const r=Array.from(n).map(o=>new Promise((u,g)=>{const i=new FileReader;i.onload=()=>u({name:o.name,content:i.result}),i.onerror=()=>g(new Error(`Failed to read ${o.name}`)),i.readAsText(o)}));Promise.all(r).then(o=>fetch(ue("/api/plugins/upload"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:o})})).then(o=>o.ok?o.json():o.text().then(u=>{try{return JSON.parse(u)}catch{throw new Error(m("ui.plugins.serverError",{status:o.status}))}})).then(o=>{o.error?J.error(m("ui.plugins.addFailed",{reason:o.error})):o.plugins&&(this.setState({pluginsList:o.plugins,pluginsDir:o.pluginsDir||""}),J.success(m("ui.plugins.addSuccess")))}).catch(o=>{J.error(o.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()){J.error(m("ui.plugins.cdnUrlRequired"));return}try{new URL(t)}catch{J.error(m("ui.plugins.cdnInvalidUrl"));return}this.setState({cdnLoading:!0}),fetch(ue("/api/plugins/install-from-url"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:t.trim()})}).then(n=>n.json()).then(n=>{n.error?J.error(m("ui.plugins.cdnInstallFailed",{reason:n.error})):(J.success(m("ui.plugins.cdnInstallSuccess")),n.plugins&&this.setState({pluginsList:n.plugins,pluginsDir:n.pluginsDir||""}),this.setState({cdnModalVisible:!1,cdnUrl:""}))}).catch(n=>{J.error(m("ui.plugins.cdnInstallFailed",{reason:n.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(ue("/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=>{_e.confirm({title:m("ui.processManagement.killConfirm"),onOk:()=>{fetch(ue("/api/ccv-processes/kill"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pid:t})}).then(n=>n.json()).then(n=>{n.ok?(J.success(m("ui.processManagement.killed")),this.fetchProcesses()):J.error(n.error||m("ui.processManagement.killFailed"))}).catch(()=>{J.error(m("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:(n=>gt.some(r=>r.value===n)?n:"auto")(localStorage.getItem("ccv_calibrationModel")||"auto"),proxyModalVisible:!1,editingProxy:null,editForm:{name:"",baseURL:"",apiKey:"",models:"",activeModel:""},logDirDraft:null},this._rafId=null,this._expiredTimer=null,this.updateCountdown=this.updateCountdown.bind(this)}componentDidMount(){this.startCountdown(),fetch(ue("/api/local-url")).then(t=>t.json()).then(t=>{t.url&&this.setState({localUrl:t.url})}).catch(()=>{}),fetch(ue("/api/claude-settings")).then(t=>t.json()).then(t=>{t.model&&this.setState({settingsModel:t.model})}).catch(()=>{}),fetch("https://ipinfo.io/json",{signal:AbortSignal.timeout(5e3)}).then(t=>t.json()).then(t=>{t.country&&this.setState({countryFlag:Jn(t.country),countryInfo:t})}).catch(()=>{})}componentDidUpdate(t){t.cacheExpireAt!==this.props.cacheExpireAt&&this.startCountdown()}shouldComponentUpdate(t,n){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.showFullToolContent!==this.props.showFullToolContent||t.expandDiff!==this.props.expandDiff||t.filterIrrelevant!==this.props.filterIrrelevant||t.logDir!==this.props.logDir||t.cliMode!==this.props.cliMode||t.contextWindow!==this.props.contextWindow||t.serverCachedContent!==this.props.serverCachedContent||t.resumeAutoChoice!==this.props.resumeAutoChoice||t.proxyProfiles!==this.props.proxyProfiles||t.activeProxyId!==this.props.activeProxyId||t.defaultConfig!==this.props.defaultConfig||n!==this.state}componentWillUnmount(){this._rafId&&cancelAnimationFrame(this._rafId),this._expiredTimer&&clearTimeout(this._expiredTimer),this._cacheFadeClearTimer&&clearTimeout(this._cacheFadeClearTimer),this._cacheScrollSettleTimer&&clearTimeout(this._cacheScrollSettleTimer),this._cacheAutoFadeTimer&&clearTimeout(this._cacheAutoFadeTimer),this._cacheHighlightDelayTimer&&clearTimeout(this._cacheHighlightDelayTimer),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 n=Math.max(0,t-Date.now());if(n<=0){const u=m("ui.cacheExpired");this.state.countdownText!==u&&this.setState({countdownText:u}),this._expiredTimer=setTimeout(()=>{this.state.countdownText!==""&&this.setState({countdownText:""})},5e3);return}const r=Math.ceil(n/1e3);let o;if(r>=60){const u=Math.floor(r/60),g=r%60;o=m("ui.minuteSecond",{m:u,s:String(g).padStart(2,"0")})}else o=m("ui.second",{s:r});o!==this.state.countdownText&&this.setState({countdownText:o}),this._rafId=requestAnimationFrame(this.updateCountdown)}static parseSegments(t){const n=[],r=/<([a-zA-Z_][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>/g;let o=0,u;for(;(u=r.exec(t))!==null;){const i=t.slice(o,u.index).trim();i&&n.push({type:"text",content:i});const h=u[1];if(o=u.index+u[0].length,Pe.COMMAND_TAGS.has(h))continue;const l=new RegExp(`^<${h}(?:\\s[^>]*)?>([\\s\\S]*)<\\/${h}>$`),c=u[0].match(l),p=c?c[1].trim():u[0].trim();n.push({type:"system",content:p,label:h})}const g=t.slice(o).trim();return g&&n.push({type:"text",content:g}),n}static extractUserTexts(t){const n=[],r=[];let o=null;for(const u of t)if(u.role==="user"){if(typeof u.content=="string"){const g=u.content.trim();if(!g)continue;if(!Ke(g)){if(/Implement the following plan:/i.test(g))continue;n.push(g),r.push(g)}}else if(Array.isArray(u.content)){const{commands:g,textBlocks:i}=pa(u.content);g.length>0&&(o=g[g.length-1]);const h=[];for(const c of i)/Implement the following plan:/i.test((c.text||"").trim())||h.push(c.text.trim());const l=u.content.filter(c=>{var p;return c.type==="text"&&((p=c.text)==null?void 0:p.trim())}).map(c=>c.text.trim());h.length>0&&(n.push(h.join(`
|
|
19
19
|
`)),r.push(l.join(`
|
|
20
|
-
`)))}}return{userMsgs:n,fullTexts:r,slashCmd:o}}extractUserPrompts(){var g;const{requests:t=[]}=this.props,n=[],r=new Set;let o=null;const u=t.filter(i=>Te(i));for(let i=0;i<u.length;i++){const h=u[i],l=((g=h.body)==null?void 0:g.messages)||[],c=h.timestamp||"",{userMsgs:p,fullTexts:j,slashCmd:f}=Pe.extractUserTexts(l);f&&f!=="/compact"&&f!==o&&n.push({type:"prompt",segments:[{type:"text",content:f}],timestamp:c}),o=f;for(let x=0;x<p.length;x++){const y=p[x];if(r.has(y))continue;r.add(y);const C=j[x]||y;n.push({type:"prompt",segments:Pe.parseSegments(C),timestamp:c})}}return n}renderTokenStats(){const{requests:t=[]}=this.props,n=ga(t),r=Object.keys(n),o=fa(t),u=xa(t);if(r.length===0&&o.length===0)return e.jsx("div",{className:d.tokenStatsEmpty,children:"暂无 token 数据"});const g=e.jsx("div",{className:d.tokenStatsColumn,children:r.map(c=>{const p=n[c],j=p.input+p.cacheCreation+p.cacheRead,f=j>0?(p.cacheRead/j*100).toFixed(1):"0.0";return e.jsxs("div",{className:r.length>1?d.modelCardSpaced:d.modelCard,children:[e.jsx("div",{className:d.modelName,children:c}),e.jsx("table",{className:d.statsTable,children:e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{className:d.label,children:"Token"}),e.jsx("td",{className:d.th,children:"input"}),e.jsx("td",{className:d.th,children:"output"})]}),e.jsxs("tr",{className:d.rowBorder,children:[e.jsx("td",{className:d.label}),e.jsx("td",{className:d.td,children:G(j)}),e.jsx("td",{className:d.td,children:G(p.output)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:d.label,children:"Cache"}),e.jsx("td",{className:d.th,children:"create"}),e.jsx("td",{className:d.th,children:"read"})]}),e.jsxs("tr",{className:d.rowBorder,children:[e.jsx("td",{className:d.label}),e.jsx("td",{className:d.td,children:G(p.cacheCreation)}),e.jsx("td",{className:d.td,children:G(p.cacheRead)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:d.label,children:m("ui.hitRate")}),e.jsxs("td",{colSpan:2,className:d.td,children:[f,"%"]})]})]})})]},c)})}),i=this.renderCacheRebuildStats(),h=o.length>0?e.jsx("div",{className:d.toolStatsColumn,children:e.jsxs("div",{className:d.modelCard,children:[e.jsx("div",{className:d.modelName,children:m("ui.toolUsageStats")}),e.jsxs("table",{className:d.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${d.th} ${d.thLeft}`,children:"Tool"}),e.jsx("td",{className:d.th,children:m("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[o.map(([c,p])=>e.jsxs("tr",{className:d.rowBorder,children:[e.jsxs("td",{className:d.label,children:[c," ",e.jsx(re,{doc:`Tool-${c}`})]}),e.jsx("td",{className:d.td,children:p})]},c)),o.length>1&&e.jsxs("tr",{className:d.rebuildTotalRow,children:[e.jsx("td",{className:d.label,children:"Total"}),e.jsx("td",{className:d.td,children:o.reduce((c,p)=>c+p[1],0)})]})]})]})]})}):null,l=u.length>0?e.jsx("div",{className:d.toolStatsColumn,children:e.jsxs("div",{className:d.modelCard,children:[e.jsx("div",{className:d.modelName,children:m("ui.skillUsageStats")}),e.jsxs("table",{className:d.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${d.th} ${d.thLeft}`,children:"Skill"}),e.jsx("td",{className:d.th,children:m("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[u.map(([c,p])=>e.jsxs("tr",{className:d.rowBorder,children:[e.jsx("td",{className:d.label,children:c}),e.jsx("td",{className:d.td,children:p})]},c)),u.length>1&&e.jsxs("tr",{className:d.rebuildTotalRow,children:[e.jsx("td",{className:d.label,children:"Total"}),e.jsx("td",{className:d.td,children:u.reduce((c,p)=>c+p[1],0)})]})]})]})]})}):null;return e.jsxs("div",{className:d.tokenStatsContainer,children:[g,i,h,l]})}_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(i=>({_cacheSectionCollapsed:{...i._cacheSectionCollapsed||{},messages:!1}}),()=>this.scrollToCacheMsg(t));return}const n=this._cacheScrollEl;if(!n)return;const r=n.querySelector(`[data-msg-idx="${t}"]`);if(!r)return;clearTimeout(this._cacheScrollSettleTimer),clearTimeout(this._cacheFadeClearTimer),clearTimeout(this._cacheAutoFadeTimer),clearTimeout(this._cacheHighlightDelayTimer),this._cacheUnbindScrollFade(),this._cacheScrollEndHandler&&n.removeEventListener("scrollend",this._cacheScrollEndHandler),this.setState({cacheHighlightIdx:null,cacheHighlightFading:!1});let o=!1,u=!1;const g=()=>{!o||!u||(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=()=>{n.removeEventListener("scrollend",this._cacheScrollEndHandler),o=!0,g()},n.addEventListener("scrollend",this._cacheScrollEndHandler,{once:!0}),this._cacheScrollSettleTimer=setTimeout(()=>{n.removeEventListener("scrollend",this._cacheScrollEndHandler),o=!0,g()},800),this._cacheHighlightDelayTimer=setTimeout(()=>{u=!0,g()},500),r.scrollIntoView({behavior:"smooth",block:"center"})}renderCacheContentPopover(t){const{requests:n=[],serverCachedContent:r}=this.props,o=r||as(n);if(o&&(o.cacheCreateTokens>0||o.cacheReadTokens>0)&&(this._lastCachedTokens={cacheCreateTokens:o.cacheCreateTokens,cacheReadTokens:o.cacheReadTokens}),t>0&&(this._lastContextPercent=t),!o||o.system.length===0&&o.messages.length===0&&o.tools.length===0)return e.jsx("div",{className:d.cachePopoverEmpty,children:m("ui.noCachedContent")});const u=(l,c,p,j)=>{if(c.length===0)return null;const f=l===m("ui.messages"),x=(this.state._cacheSectionCollapsed||{})[j],y=x!==void 0?!!x
|
|
20
|
+
`)))}}return{userMsgs:n,fullTexts:r,slashCmd:o}}extractUserPrompts(){var g;const{requests:t=[]}=this.props,n=[],r=new Set;let o=null;const u=t.filter(i=>Te(i));for(let i=0;i<u.length;i++){const h=u[i],l=((g=h.body)==null?void 0:g.messages)||[],c=h.timestamp||"",{userMsgs:p,fullTexts:j,slashCmd:f}=Pe.extractUserTexts(l);f&&f!=="/compact"&&f!==o&&n.push({type:"prompt",segments:[{type:"text",content:f}],timestamp:c}),o=f;for(let x=0;x<p.length;x++){const y=p[x];if(r.has(y))continue;r.add(y);const C=j[x]||y;n.push({type:"prompt",segments:Pe.parseSegments(C),timestamp:c})}}return n}renderTokenStats(){const{requests:t=[]}=this.props,n=ga(t),r=Object.keys(n),o=fa(t),u=xa(t);if(r.length===0&&o.length===0)return e.jsx("div",{className:d.tokenStatsEmpty,children:"暂无 token 数据"});const g=e.jsx("div",{className:d.tokenStatsColumn,children:r.map(c=>{const p=n[c],j=p.input+p.cacheCreation+p.cacheRead,f=j>0?(p.cacheRead/j*100).toFixed(1):"0.0";return e.jsxs("div",{className:r.length>1?d.modelCardSpaced:d.modelCard,children:[e.jsx("div",{className:d.modelName,children:c}),e.jsx("table",{className:d.statsTable,children:e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{className:d.label,children:"Token"}),e.jsx("td",{className:d.th,children:"input"}),e.jsx("td",{className:d.th,children:"output"})]}),e.jsxs("tr",{className:d.rowBorder,children:[e.jsx("td",{className:d.label}),e.jsx("td",{className:d.td,children:G(j)}),e.jsx("td",{className:d.td,children:G(p.output)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:d.label,children:"Cache"}),e.jsx("td",{className:d.th,children:"create"}),e.jsx("td",{className:d.th,children:"read"})]}),e.jsxs("tr",{className:d.rowBorder,children:[e.jsx("td",{className:d.label}),e.jsx("td",{className:d.td,children:G(p.cacheCreation)}),e.jsx("td",{className:d.td,children:G(p.cacheRead)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:d.label,children:m("ui.hitRate")}),e.jsxs("td",{colSpan:2,className:d.td,children:[f,"%"]})]})]})})]},c)})}),i=this.renderCacheRebuildStats(),h=o.length>0?e.jsx("div",{className:d.toolStatsColumn,children:e.jsxs("div",{className:d.modelCard,children:[e.jsx("div",{className:d.modelName,children:m("ui.toolUsageStats")}),e.jsxs("table",{className:d.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${d.th} ${d.thLeft}`,children:"Tool"}),e.jsx("td",{className:d.th,children:m("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[o.map(([c,p])=>e.jsxs("tr",{className:d.rowBorder,children:[e.jsxs("td",{className:d.label,children:[c," ",e.jsx(re,{doc:`Tool-${c}`})]}),e.jsx("td",{className:d.td,children:p})]},c)),o.length>1&&e.jsxs("tr",{className:d.rebuildTotalRow,children:[e.jsx("td",{className:d.label,children:"Total"}),e.jsx("td",{className:d.td,children:o.reduce((c,p)=>c+p[1],0)})]})]})]})]})}):null,l=u.length>0?e.jsx("div",{className:d.toolStatsColumn,children:e.jsxs("div",{className:d.modelCard,children:[e.jsx("div",{className:d.modelName,children:m("ui.skillUsageStats")}),e.jsxs("table",{className:d.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${d.th} ${d.thLeft}`,children:"Skill"}),e.jsx("td",{className:d.th,children:m("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[u.map(([c,p])=>e.jsxs("tr",{className:d.rowBorder,children:[e.jsx("td",{className:d.label,children:c}),e.jsx("td",{className:d.td,children:p})]},c)),u.length>1&&e.jsxs("tr",{className:d.rebuildTotalRow,children:[e.jsx("td",{className:d.label,children:"Total"}),e.jsx("td",{className:d.td,children:u.reduce((c,p)=>c+p[1],0)})]})]})]})]})}):null;return e.jsxs("div",{className:d.tokenStatsContainer,children:[g,i,h,l]})}_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(i=>({_cacheSectionCollapsed:{...i._cacheSectionCollapsed||{},messages:!1}}),()=>this.scrollToCacheMsg(t));return}const n=this._cacheScrollEl;if(!n)return;const r=n.querySelector(`[data-msg-idx="${t}"]`);if(!r)return;clearTimeout(this._cacheScrollSettleTimer),clearTimeout(this._cacheFadeClearTimer),clearTimeout(this._cacheAutoFadeTimer),clearTimeout(this._cacheHighlightDelayTimer),this._cacheUnbindScrollFade(),this._cacheScrollEndHandler&&n.removeEventListener("scrollend",this._cacheScrollEndHandler),this.setState({cacheHighlightIdx:null,cacheHighlightFading:!1});let o=!1,u=!1;const g=()=>{!o||!u||(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=()=>{n.removeEventListener("scrollend",this._cacheScrollEndHandler),o=!0,g()},n.addEventListener("scrollend",this._cacheScrollEndHandler,{once:!0}),this._cacheScrollSettleTimer=setTimeout(()=>{n.removeEventListener("scrollend",this._cacheScrollEndHandler),o=!0,g()},800),this._cacheHighlightDelayTimer=setTimeout(()=>{u=!0,g()},500),r.scrollIntoView({behavior:"smooth",block:"center"})}renderCacheContentPopover(t){const{requests:n=[],serverCachedContent:r}=this.props,o=r||as(n);if(o&&(o.cacheCreateTokens>0||o.cacheReadTokens>0)&&(this._lastCachedTokens={cacheCreateTokens:o.cacheCreateTokens,cacheReadTokens:o.cacheReadTokens}),t>0&&(this._lastContextPercent=t),!o||o.system.length===0&&o.messages.length===0&&o.tools.length===0)return e.jsx("div",{className:d.cachePopoverEmpty,children:m("ui.noCachedContent")});const u=(l,c,p,j)=>{if(c.length===0)return null;const f=l===m("ui.messages"),x=(this.state._cacheSectionCollapsed||{})[j],y=x!==void 0?!!x:!0,C=()=>this.setState(k=>({_cacheSectionCollapsed:{...k._cacheSectionCollapsed||{},[j]:!y}}));return e.jsxs("div",{className:d.cacheSection,children:[e.jsxs("button",{type:"button",className:d.cacheSectionTitle,onClick:C,"aria-expanded":!y,children:[e.jsx("span",{className:d.cacheSectionArrow,children:y?"▶":"▼"}),l," (",c.length,")"]}),!y&&c.map((k,N)=>{const b=f?{"data-msg-idx":N}:{};let M=p||d.cacheCodeBlock;const E=f&&N===this.state.cacheHighlightIdx;return E&&(M+=" "+(this.state.cacheHighlightFading?d.cacheBlockHighlightFading:d.cacheBlockHighlight)),e.jsxs("pre",{className:M,...b,style:E?{position:"relative"}:void 0,children:[E&&e.jsx("svg",{className:`${d.cacheBorderSvg}${this.state.cacheHighlightFading?" "+d.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:d.cacheBorderRect})}),k]},N)})]})},g=()=>{const l=[];return o.tools.length>0&&(l.push(`=== ${m("ui.tools")} (${o.tools.length}) ===`),o.tools.forEach(c=>l.push(c))),o.system.length>0&&(l.push(`
|
|
21
21
|
=== ${m("ui.systemPrompt")} (${o.system.length}) ===`),o.system.forEach(c=>l.push(c))),o.messages.length>0&&(l.push(`
|
|
22
22
|
=== ${m("ui.messages")} (${o.messages.length}) ===`),o.messages.forEach(c=>l.push(c))),l.join(`
|
|
23
23
|
|
|
@@ -38,4 +38,4 @@ var Bs=Object.defineProperty;var Ds=(a,s,t)=>s in a?Bs(a,s,{enumerable:!0,config
|
|
|
38
38
|
---
|
|
39
39
|
`).filter(f=>f.trim()).map(f=>{try{return JSON.parse(f)}catch{return null}}).filter(Boolean);g.push(...j),i.push(h.name)}catch{}u++,u===r.length&&this._finishLocalLoad(g,i)},l.readAsText(h)})},t.click()});O(this,"_processJsonlFiles",t=>{if(!t||t.length===0)return;if(t.reduce((g,i)=>g+i.size,0)>500*1024*1024){J.error(m("ui.fileTooLarge"));return}this.setState({fileLoading:!0,fileLoadingCount:0});let r=0;const o=[],u=[];t.forEach(g=>{const i=new FileReader;i.onload=h=>{try{const c=h.target.result.split(`
|
|
40
40
|
---
|
|
41
|
-
`).filter(p=>p.trim()).map(p=>{try{return JSON.parse(p)}catch{return null}}).filter(Boolean);o.push(...c),u.push(g.name)}catch{}r++,r===t.length&&this._finishLocalLoad(o,u)},i.readAsText(g)})});O(this,"_isInternalDrag",t=>t.dataTransfer.types.includes("text/x-preset-reorder"));O(this,"_onDragOver",t=>{if(t.preventDefault(),this._isInternalDrag(t))return;if(t.target.closest&&t.target.closest("[data-file-explorer]")){this.state.isDragging&&this.setState({isDragging:!1});return}this.state.isDragging||this.setState({isDragging:!0})});O(this,"_onDragLeave",t=>{const n=this._layoutRef.current;n&&!n.contains(t.relatedTarget)&&this.setState({isDragging:!1})});O(this,"_onDrop",t=>{if(t.preventDefault(),this._isInternalDrag(t))return;this.setState({isDragging:!1});const n=Array.from(t.dataTransfer.files);n.length&&Promise.all(n.map(r=>Ra(r).then(o=>({name:r.name,path:o})).catch(o=>(J.error(`${r.name}: ${o.message}`),null)))).then(r=>{const o=r.filter(Boolean).map(u=>`"${u.path}"`);o.length>0&&this.setState(u=>({pendingUploadPaths:[...u.pendingUploadPaths||[],...o]}))})});O(this,"handleUploadPathsConsumed",()=>{this.setState({pendingUploadPaths:[]})});Object.assign(this.state,{leftPanelWidth:380,terminalVisible:!0,currentTab:"context",pendingCacheHighlight:null})}render(){const{filteredRequests:t,selectedRequest:n,fileLoading:r,fileLoadingCount:o,mainAgentSessions:u,viewMode:g}=this.renderPrepare(),{selectedIndex:i,leftPanelWidth:h,currentTab:l}=this.state;return this.state.workspaceMode?this.renderWorkspaceMode():e.jsxs(La,{theme:this.themeConfig,children:[r&&e.jsx("div",{className:I.loadingOverlay,children:e.jsxs("div",{className:I.loadingText,children:["Loading...(",o,")"]})}),this.state.isDragging&&e.jsx("div",{className:I.dragOverlay,children:e.jsxs("div",{className:I.dragOverlayContent,children:[e.jsx(Qt,{className:I.dragIcon}),e.jsx("p",{children:m("ui.dragDropHint")})]})}),e.jsxs(Ie,{className:I.layout,ref:this._layoutRef,onDragOver:this._onDragOver,onDragLeave:this._onDragLeave,onDrop:this._onDrop,children:[e.jsx(Ie.Header,{className:I.header,children:e.jsx(ot,{requestCount:t.length,requests:t,viewMode:g,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,showFullToolContent:this.state.showFullToolContent,onShowFullToolContentChange:this.handleShowFullToolContentChange,expandDiff:this.state.expandDiff,onExpandDiffChange:this.handleExpandDiffChange,filterIrrelevant:!this.state.showAll,onFilterIrrelevantChange:this.handleFilterIrrelevantChange,logDir:this.state.logDir,onLogDirChange:this.handleLogDirChange,updateInfo:this.state.updateInfo,onDismissUpdate:()=>this.setState({updateInfo:null}),cliMode:this.state.cliMode,sdkMode:this.state.sdkMode,terminalVisible:this.state.sdkMode?!1:this.state.terminalVisible,onToggleTerminal:()=>this.setState(c=>({terminalVisible:!c.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,themeColor:this.state.themeColor,onThemeColorChange:this.handleThemeColorChange,autoApproveSeconds:this.state.autoApproveSeconds,onAutoApproveChange:this.handleAutoApproveChange,proxyProfiles:this.state.proxyProfiles,activeProxyId:this.state.activeProxyId,defaultConfig:this.state.defaultConfig,onProxyProfileChange:this.handleProxyProfileChange})}),this.state.claudeMissing&&e.jsx(hs,{type:"warning",showIcon:!0,banner:!0,message:m("ui.claudeMissing.title"),description:e.jsxs("span",{children:[m("ui.claudeMissing.desc"),e.jsx("br",{}),e.jsx("code",{style:{background:"var(--bg-code)",padding:"2px 6px",borderRadius:3},children:"npm install -g @anthropic-ai/claude-code"})," ",e.jsx("span",{style:{color:"var(--text-muted)",margin:"0 4px"},children:m("ui.claudeMissing.or")})," ",e.jsx("a",{href:"https://claude.ai/download",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--color-primary-light)"},children:m("ui.claudeMissing.native")})]})}),e.jsxs(Ie.Content,{className:I.content,children:[g==="raw"&&(t.length===0?e.jsx("div",{className:I.guideContainer,children:e.jsxs("div",{className:I.guideContent,children:[e.jsx("h2",{className:I.guideTitle,children:m("ui.guide.title")}),e.jsxs("div",{className:I.guideStep,children:[e.jsx("div",{className:I.guideStepNum,children:"1"}),e.jsxs("div",{className:I.guideStepBody,children:[e.jsx("p",{className:I.guideText,children:m("ui.guide.step1")}),e.jsx("code",{className:I.guideCode,children:m("ui.guide.exampleQuestion")})]})]}),e.jsxs("div",{className:I.guideStep,children:[e.jsx("div",{className:I.guideStepNum,children:"2"}),e.jsxs("div",{className:I.guideStepBody,children:[e.jsx("p",{className:I.guideText,children:m("ui.guide.step2")}),e.jsx("code",{className:I.guideCode,children:m("ui.guide.troubleshootCmd")})]})]}),e.jsxs("div",{className:I.guideStep,children:[e.jsx("div",{className:I.guideStepNum,children:"3"}),e.jsxs("div",{className:I.guideStepBody,children:[e.jsx("p",{className:I.guideText,children:m("ui.guide.step3")}),e.jsx("code",{className:I.guideCode,children:"npm install -g @anthropic-ai/claude-code"})]})]})]})}):e.jsxs("div",{ref:this.mainContainerRef,className:I.mainContainer,children:[e.jsxs("div",{className:I.leftPanel,style:{width:h},children:[e.jsxs("div",{className:I.leftPanelHeader,children:[e.jsx("span",{children:m("ui.requestList")}),e.jsx("span",{className:I.leftPanelCount,children:m("ui.totalRequests",{count:t.length})})]}),e.jsx("div",{className:I.leftPanelBody,children:e.jsx(Co,{requests:t,selectedIndex:i,scrollCenter:this.state.scrollCenter,onSelect:this.handleSelectRequest,onScrollDone:this.handleScrollDone,cacheLossMap:this._cacheLossMap})})]}),e.jsx(Kl,{onResize:this.handleResize}),e.jsx("div",{className:I.rightPanel,children:e.jsx(ql,{request:n,requests:t,allRequests:this.state.requests,selectedIndex:i,currentTab:l,onTabChange:this.handleTabChange,onViewInChat:this.handleViewInChat,expandDiff:this.state.expandDiff,pendingCacheHighlight:this.state.pendingCacheHighlight,onCacheHighlightDone:this.handleCacheHighlightDone})})]})),e.jsx("div",{className:I.chatViewWrapper,style:{display:g==="chat"?"flex":"none"},children:e.jsx(Pa,{requests:t,mainAgentSessions:u,userProfile:this.state.userProfile,collapseToolResults:this.state.collapseToolResults,expandThinking:this.state.expandThinking,showFullToolContent:this.state.showFullToolContent,showThinkingSummaries:this.state.showThinkingSummaries,onViewRequest:this.handleViewRequest,scrollToTimestamp:this.state.chatScrollToTs,onScrollTsDone:this.handleScrollTsDone,cliMode:this._isLocalLog?!1:this.state.cliMode,sdkMode:this._isLocalLog?!1:this.state.sdkMode,terminalVisible:this._isLocalLog||this.state.sdkMode?!1:this.state.terminalVisible,onToggleTerminal:()=>this.setState(c=>({terminalVisible:!c.terminalVisible})),pendingUploadPaths:this.state.pendingUploadPaths,onUploadPathsConsumed:this.handleUploadPathsConsumed,fileLoading:this.state.fileLoading,isStreaming:this.state.isStreaming,hasMoreHistory:this.state.hasMoreHistory,loadingMore:this.state.loadingMore,onLoadMoreHistory:()=>this.loadMoreHistory(),loadingSessionId:this.state.loadingSessionId,onLoadSession:c=>this.loadSession(c),lang:this.state.lang,autoApproveSeconds:this.state.autoApproveSeconds,onAutoApproveChange:this.handleAutoApproveChange})})]}),e.jsx("div",{className:I.footer,children:e.jsxs("div",{className:I.footerRight,children:[e.jsxs("a",{href:"https://github.com/weiesky/cc-viewer",target:"_blank",rel:"noopener noreferrer",className:I.footerLink,children:[e.jsx("svg",{className:I.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:I.footerSep,children:"|"}),e.jsxs("span",{className:`${I.footerVersion}${this.state.updateInfo?` ${I.footerVersionNew}`:""}`,onClick:()=>this.setState({updateModalVisible:!0}),style:{cursor:"pointer"},children:["v","1.6.133",this.state.updateInfo&&e.jsxs("svg",{className:I.newBadge,width:"28",height:"12",viewBox:"0 0 28 12",children:[e.jsx("rect",{width:"28",height:"12",rx:"3",fill:"currentColor",opacity:"0.25"}),e.jsx("text",{x:"14",y:"9",textAnchor:"middle",fill:"currentColor",fontSize:"8",fontWeight:"600",fontFamily:"system-ui",children:"NEW"})]})]})]})})]}),e.jsx(_e,{title:m("ui.update.title"),open:this.state.updateModalVisible,onCancel:()=>this.setState({updateModalVisible:!1}),footer:null,width:480,children:e.jsxs("div",{style:{lineHeight:1.8},children:[e.jsxs("p",{children:[e.jsxs("strong",{children:[m("ui.update.current"),":"]})," v","1.6.133"]}),this.state.updateInfo&&e.jsxs("p",{children:[e.jsxs("strong",{children:[m("ui.update.latest"),":"]})," v",this.state.updateInfo.version]}),e.jsx("p",{style:{marginTop:12},children:e.jsx("strong",{children:m("ui.update.npm")})}),e.jsx("code",{style:{display:"block",background:"var(--bg-code)",padding:"8px 12px",borderRadius:6,fontSize:13},children:"npm update -g cc-viewer"}),typeof window<"u"&&window.electronAPI&&e.jsxs(e.Fragment,{children:[e.jsx("p",{style:{marginTop:16},children:e.jsx("strong",{children:m("ui.update.electron")})}),e.jsx("p",{style:{color:"var(--text-tertiary)",fontSize:13},children:m("ui.update.electronDesc")}),e.jsxs("ol",{style:{color:"var(--text-tertiary)",fontSize:13,paddingLeft:20,margin:"6px 0"},children:[e.jsx("li",{children:m("ui.update.step1")}),e.jsx("li",{children:m("ui.update.step2")}),e.jsx("li",{children:m("ui.update.step3")})]})]}),e.jsx("div",{style:{marginTop:16,textAlign:"right"},children:e.jsx(H,{type:"primary",href:"https://github.com/weiesky/cc-viewer/releases",target:"_blank",rel:"noopener noreferrer",children:m("ui.update.goReleases")})})]})}),e.jsx(_e,{title:m("ui.resume.title"),open:this.state.resumeModalVisible,closable:!1,maskClosable:!1,keyboard:!1,footer:e.jsxs("div",{children:[e.jsxs("div",{className:I.resumeFooterRight,children:[e.jsx(H,{type:"primary",onClick:()=>this.handleResumeChoice("continue"),className:I.btnMarginRight,children:m("ui.resume.continue")},"continue"),e.jsx(H,{onClick:()=>this.handleResumeChoice("new"),children:m("ui.resume.new")},"new")]}),e.jsx("div",{className:I.resumeFooterLeft,children:e.jsx(Aa,{checked:this.state.resumeRememberChoice,onChange:c=>this.setState({resumeRememberChoice:c.target.checked}),className:I.resumeCheckboxOpacity,children:e.jsx("span",{className:I.resumeCheckboxOpacity,children:m("ui.resume.remember")})})})]}),children:e.jsx("p",{children:m("ui.resume.message",{file:this.state.resumeFileName})})}),e.jsxs(_e,{title:e.jsxs("span",{className:I.modalTitleInline,children:[e.jsx(is,{apiEndpoint:ue("/api/open-log-dir"),title:m("ui.openLogDir"),size:16}),m("ui.importLocalLogs")]}),open:this.state.importModalVisible,onCancel:this.handleCloseImportModal,footer:null,width:1e3,styles:{body:{overflow:"hidden"}},children:[e.jsxs("div",{className:I.modalActions,children:[e.jsx(H,{icon:e.jsx(Qt,{}),onClick:this.handleLoadLocalJsonlFile,children:m("ui.loadLocalJsonl")}),e.jsx(H,{size:"small",type:this.state.selectedLogs.size>1?"primary":"default",disabled:this.state.selectedLogs.size<2,onClick:this.handleMergeLogs,className:I.btnMarginLeft,children:m("ui.mergeLogs")}),e.jsx(H,{size:"small",danger:!0,icon:e.jsx(vt,{}),disabled:this.state.selectedLogs.size===0,onClick:this.handleDeleteLogs,className:I.btnMarginLeft,children:m("ui.deleteLogs")}),e.jsx(H,{size:"small",icon:e.jsx(yt,{spin:this.state.refreshingStats}),loading:this.state.refreshingStats,onClick:this.handleRefreshStats,className:I.btnMarginLeft,children:m("ui.refreshStats")})]}),this.state.localLogsLoading?e.jsx("div",{className:I.spinCenter,children:e.jsx(ns,{})}):(()=>{const c=this.state.localLogs[this.state.currentProject];return!c||c.length===0?e.jsx("div",{className:I.emptyCenter,children:m("ui.noLogs")}):e.jsx("div",{className:I.logListContainer,children:this.renderLogTable(c,!1)})})()]})]})}}export{Zl as default};
|
|
41
|
+
`).filter(p=>p.trim()).map(p=>{try{return JSON.parse(p)}catch{return null}}).filter(Boolean);o.push(...c),u.push(g.name)}catch{}r++,r===t.length&&this._finishLocalLoad(o,u)},i.readAsText(g)})});O(this,"_isInternalDrag",t=>t.dataTransfer.types.includes("text/x-preset-reorder"));O(this,"_onDragOver",t=>{if(t.preventDefault(),this._isInternalDrag(t))return;if(t.target.closest&&t.target.closest("[data-file-explorer]")){this.state.isDragging&&this.setState({isDragging:!1});return}this.state.isDragging||this.setState({isDragging:!0})});O(this,"_onDragLeave",t=>{const n=this._layoutRef.current;n&&!n.contains(t.relatedTarget)&&this.setState({isDragging:!1})});O(this,"_onDrop",t=>{if(t.preventDefault(),this._isInternalDrag(t))return;this.setState({isDragging:!1});const n=Array.from(t.dataTransfer.files);n.length&&Promise.all(n.map(r=>Ra(r).then(o=>({name:r.name,path:o})).catch(o=>(J.error(`${r.name}: ${o.message}`),null)))).then(r=>{const o=r.filter(Boolean).map(u=>`"${u.path}"`);o.length>0&&this.setState(u=>({pendingUploadPaths:[...u.pendingUploadPaths||[],...o]}))})});O(this,"handleUploadPathsConsumed",()=>{this.setState({pendingUploadPaths:[]})});Object.assign(this.state,{leftPanelWidth:380,terminalVisible:!0,currentTab:"context",pendingCacheHighlight:null})}render(){const{filteredRequests:t,selectedRequest:n,fileLoading:r,fileLoadingCount:o,mainAgentSessions:u,viewMode:g}=this.renderPrepare(),{selectedIndex:i,leftPanelWidth:h,currentTab:l}=this.state;return this.state.workspaceMode?this.renderWorkspaceMode():e.jsxs(La,{theme:this.themeConfig,children:[r&&e.jsx("div",{className:I.loadingOverlay,children:e.jsxs("div",{className:I.loadingText,children:["Loading...(",o,")"]})}),this.state.isDragging&&e.jsx("div",{className:I.dragOverlay,children:e.jsxs("div",{className:I.dragOverlayContent,children:[e.jsx(Qt,{className:I.dragIcon}),e.jsx("p",{children:m("ui.dragDropHint")})]})}),e.jsxs(Ie,{className:I.layout,ref:this._layoutRef,onDragOver:this._onDragOver,onDragLeave:this._onDragLeave,onDrop:this._onDrop,children:[e.jsx(Ie.Header,{className:I.header,children:e.jsx(ot,{requestCount:t.length,requests:t,viewMode:g,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,showFullToolContent:this.state.showFullToolContent,onShowFullToolContentChange:this.handleShowFullToolContentChange,expandDiff:this.state.expandDiff,onExpandDiffChange:this.handleExpandDiffChange,filterIrrelevant:!this.state.showAll,onFilterIrrelevantChange:this.handleFilterIrrelevantChange,logDir:this.state.logDir,onLogDirChange:this.handleLogDirChange,updateInfo:this.state.updateInfo,onDismissUpdate:()=>this.setState({updateInfo:null}),cliMode:this.state.cliMode,sdkMode:this.state.sdkMode,terminalVisible:this.state.sdkMode?!1:this.state.terminalVisible,onToggleTerminal:()=>this.setState(c=>({terminalVisible:!c.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,themeColor:this.state.themeColor,onThemeColorChange:this.handleThemeColorChange,autoApproveSeconds:this.state.autoApproveSeconds,onAutoApproveChange:this.handleAutoApproveChange,proxyProfiles:this.state.proxyProfiles,activeProxyId:this.state.activeProxyId,defaultConfig:this.state.defaultConfig,onProxyProfileChange:this.handleProxyProfileChange})}),this.state.claudeMissing&&e.jsx(hs,{type:"warning",showIcon:!0,banner:!0,message:m("ui.claudeMissing.title"),description:e.jsxs("span",{children:[m("ui.claudeMissing.desc"),e.jsx("br",{}),e.jsx("code",{style:{background:"var(--bg-code)",padding:"2px 6px",borderRadius:3},children:"npm install -g @anthropic-ai/claude-code"})," ",e.jsx("span",{style:{color:"var(--text-muted)",margin:"0 4px"},children:m("ui.claudeMissing.or")})," ",e.jsx("a",{href:"https://claude.ai/download",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--color-primary-light)"},children:m("ui.claudeMissing.native")})]})}),e.jsxs(Ie.Content,{className:I.content,children:[g==="raw"&&(t.length===0?e.jsx("div",{className:I.guideContainer,children:e.jsxs("div",{className:I.guideContent,children:[e.jsx("h2",{className:I.guideTitle,children:m("ui.guide.title")}),e.jsxs("div",{className:I.guideStep,children:[e.jsx("div",{className:I.guideStepNum,children:"1"}),e.jsxs("div",{className:I.guideStepBody,children:[e.jsx("p",{className:I.guideText,children:m("ui.guide.step1")}),e.jsx("code",{className:I.guideCode,children:m("ui.guide.exampleQuestion")})]})]}),e.jsxs("div",{className:I.guideStep,children:[e.jsx("div",{className:I.guideStepNum,children:"2"}),e.jsxs("div",{className:I.guideStepBody,children:[e.jsx("p",{className:I.guideText,children:m("ui.guide.step2")}),e.jsx("code",{className:I.guideCode,children:m("ui.guide.troubleshootCmd")})]})]}),e.jsxs("div",{className:I.guideStep,children:[e.jsx("div",{className:I.guideStepNum,children:"3"}),e.jsxs("div",{className:I.guideStepBody,children:[e.jsx("p",{className:I.guideText,children:m("ui.guide.step3")}),e.jsx("code",{className:I.guideCode,children:"npm install -g @anthropic-ai/claude-code"})]})]})]})}):e.jsxs("div",{ref:this.mainContainerRef,className:I.mainContainer,children:[e.jsxs("div",{className:I.leftPanel,style:{width:h},children:[e.jsxs("div",{className:I.leftPanelHeader,children:[e.jsx("span",{children:m("ui.requestList")}),e.jsx("span",{className:I.leftPanelCount,children:m("ui.totalRequests",{count:t.length})})]}),e.jsx("div",{className:I.leftPanelBody,children:e.jsx(Co,{requests:t,selectedIndex:i,scrollCenter:this.state.scrollCenter,onSelect:this.handleSelectRequest,onScrollDone:this.handleScrollDone,cacheLossMap:this._cacheLossMap})})]}),e.jsx(Kl,{onResize:this.handleResize}),e.jsx("div",{className:I.rightPanel,children:e.jsx(ql,{request:n,requests:t,allRequests:this.state.requests,selectedIndex:i,currentTab:l,onTabChange:this.handleTabChange,onViewInChat:this.handleViewInChat,expandDiff:this.state.expandDiff,pendingCacheHighlight:this.state.pendingCacheHighlight,onCacheHighlightDone:this.handleCacheHighlightDone})})]})),e.jsx("div",{className:I.chatViewWrapper,style:{display:g==="chat"?"flex":"none"},children:e.jsx(Pa,{requests:t,mainAgentSessions:u,userProfile:this.state.userProfile,collapseToolResults:this.state.collapseToolResults,expandThinking:this.state.expandThinking,showFullToolContent:this.state.showFullToolContent,showThinkingSummaries:this.state.showThinkingSummaries,onViewRequest:this.handleViewRequest,scrollToTimestamp:this.state.chatScrollToTs,onScrollTsDone:this.handleScrollTsDone,cliMode:this._isLocalLog?!1:this.state.cliMode,sdkMode:this._isLocalLog?!1:this.state.sdkMode,terminalVisible:this._isLocalLog||this.state.sdkMode?!1:this.state.terminalVisible,onToggleTerminal:()=>this.setState(c=>({terminalVisible:!c.terminalVisible})),pendingUploadPaths:this.state.pendingUploadPaths,onUploadPathsConsumed:this.handleUploadPathsConsumed,fileLoading:this.state.fileLoading,isStreaming:this.state.isStreaming,hasMoreHistory:this.state.hasMoreHistory,loadingMore:this.state.loadingMore,onLoadMoreHistory:()=>this.loadMoreHistory(),loadingSessionId:this.state.loadingSessionId,onLoadSession:c=>this.loadSession(c),lang:this.state.lang,autoApproveSeconds:this.state.autoApproveSeconds,onAutoApproveChange:this.handleAutoApproveChange})})]}),e.jsx("div",{className:I.footer,children:e.jsxs("div",{className:I.footerRight,children:[e.jsxs("a",{href:"https://github.com/weiesky/cc-viewer",target:"_blank",rel:"noopener noreferrer",className:I.footerLink,children:[e.jsx("svg",{className:I.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:I.footerSep,children:"|"}),e.jsxs("span",{className:`${I.footerVersion}${this.state.updateInfo?` ${I.footerVersionNew}`:""}`,onClick:()=>this.setState({updateModalVisible:!0}),style:{cursor:"pointer"},children:["v","1.6.135",this.state.updateInfo&&e.jsxs("svg",{className:I.newBadge,width:"28",height:"12",viewBox:"0 0 28 12",children:[e.jsx("rect",{width:"28",height:"12",rx:"3",fill:"currentColor",opacity:"0.25"}),e.jsx("text",{x:"14",y:"9",textAnchor:"middle",fill:"currentColor",fontSize:"8",fontWeight:"600",fontFamily:"system-ui",children:"NEW"})]})]})]})})]}),e.jsx(_e,{title:m("ui.update.title"),open:this.state.updateModalVisible,onCancel:()=>this.setState({updateModalVisible:!1}),footer:null,width:480,children:e.jsxs("div",{style:{lineHeight:1.8},children:[e.jsxs("p",{children:[e.jsxs("strong",{children:[m("ui.update.current"),":"]})," v","1.6.135"]}),this.state.updateInfo&&e.jsxs("p",{children:[e.jsxs("strong",{children:[m("ui.update.latest"),":"]})," v",this.state.updateInfo.version]}),e.jsx("p",{style:{marginTop:12},children:e.jsx("strong",{children:m("ui.update.npm")})}),e.jsx("code",{style:{display:"block",background:"var(--bg-code)",padding:"8px 12px",borderRadius:6,fontSize:13},children:"npm update -g cc-viewer"}),typeof window<"u"&&window.electronAPI&&e.jsxs(e.Fragment,{children:[e.jsx("p",{style:{marginTop:16},children:e.jsx("strong",{children:m("ui.update.electron")})}),e.jsx("p",{style:{color:"var(--text-tertiary)",fontSize:13},children:m("ui.update.electronDesc")}),e.jsxs("ol",{style:{color:"var(--text-tertiary)",fontSize:13,paddingLeft:20,margin:"6px 0"},children:[e.jsx("li",{children:m("ui.update.step1")}),e.jsx("li",{children:m("ui.update.step2")}),e.jsx("li",{children:m("ui.update.step3")})]})]}),e.jsx("div",{style:{marginTop:16,textAlign:"right"},children:e.jsx(H,{type:"primary",href:"https://github.com/weiesky/cc-viewer/releases",target:"_blank",rel:"noopener noreferrer",children:m("ui.update.goReleases")})})]})}),e.jsx(_e,{title:m("ui.resume.title"),open:this.state.resumeModalVisible,closable:!1,maskClosable:!1,keyboard:!1,footer:e.jsxs("div",{children:[e.jsxs("div",{className:I.resumeFooterRight,children:[e.jsx(H,{type:"primary",onClick:()=>this.handleResumeChoice("continue"),className:I.btnMarginRight,children:m("ui.resume.continue")},"continue"),e.jsx(H,{onClick:()=>this.handleResumeChoice("new"),children:m("ui.resume.new")},"new")]}),e.jsx("div",{className:I.resumeFooterLeft,children:e.jsx(Aa,{checked:this.state.resumeRememberChoice,onChange:c=>this.setState({resumeRememberChoice:c.target.checked}),className:I.resumeCheckboxOpacity,children:e.jsx("span",{className:I.resumeCheckboxOpacity,children:m("ui.resume.remember")})})})]}),children:e.jsx("p",{children:m("ui.resume.message",{file:this.state.resumeFileName})})}),e.jsxs(_e,{title:e.jsxs("span",{className:I.modalTitleInline,children:[e.jsx(is,{apiEndpoint:ue("/api/open-log-dir"),title:m("ui.openLogDir"),size:16}),m("ui.importLocalLogs")]}),open:this.state.importModalVisible,onCancel:this.handleCloseImportModal,footer:null,width:1e3,styles:{body:{overflow:"hidden"}},children:[e.jsxs("div",{className:I.modalActions,children:[e.jsx(H,{icon:e.jsx(Qt,{}),onClick:this.handleLoadLocalJsonlFile,children:m("ui.loadLocalJsonl")}),e.jsx(H,{size:"small",type:this.state.selectedLogs.size>1?"primary":"default",disabled:this.state.selectedLogs.size<2,onClick:this.handleMergeLogs,className:I.btnMarginLeft,children:m("ui.mergeLogs")}),e.jsx(H,{size:"small",danger:!0,icon:e.jsx(vt,{}),disabled:this.state.selectedLogs.size===0,onClick:this.handleDeleteLogs,className:I.btnMarginLeft,children:m("ui.deleteLogs")}),e.jsx(H,{size:"small",icon:e.jsx(yt,{spin:this.state.refreshingStats}),loading:this.state.refreshingStats,onClick:this.handleRefreshStats,className:I.btnMarginLeft,children:m("ui.refreshStats")})]}),this.state.localLogsLoading?e.jsx("div",{className:I.spinCenter,children:e.jsx(ns,{})}):(()=>{const c=this.state.localLogs[this.state.currentProject];return!c||c.length===0?e.jsx("div",{className:I.emptyCenter,children:m("ui.noLogs")}):e.jsx("div",{className:I.logListContainer,children:this.renderLogTable(c,!1)})})()]})]})}}export{Zl as default};
|