cc-viewer 1.6.152 → 1.6.154
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-xn45s3fA.js → App-eghzu7Qg.js} +12 -12
- package/dist/assets/{AppHeader-BNZbmc1y.css → AppHeader-CcZY-1zv.css} +1 -1
- package/dist/assets/{AppHeader.module-BllftMcf.js → AppHeader.module-DvQ_bZ5X.js} +146 -146
- package/dist/assets/Mobile-BYSHNj-T.js +10 -0
- package/dist/assets/{_baseUniq-CaCewwzI.js → _baseUniq-Bq5teT7W.js} +1 -1
- package/dist/assets/{arc-CzkqTBjE.js → arc-mL5kAtnv.js} +1 -1
- package/dist/assets/{architectureDiagram-Q4EWVU46-BFphsNj1.js → architectureDiagram-Q4EWVU46-CW3t8GCA.js} +1 -1
- package/dist/assets/{blockDiagram-DXYQGD6D-Bxsd3Lp3.js → blockDiagram-DXYQGD6D-DHlA69yP.js} +1 -1
- package/dist/assets/{c4Diagram-AHTNJAMY-C1idiwQe.js → c4Diagram-AHTNJAMY-CWuY62tP.js} +1 -1
- package/dist/assets/channel-BagtSGft.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-CDLTl49h.js → chunk-4BX2VUAB-CoeBCn39.js} +1 -1
- package/dist/assets/{chunk-4TB4RGXK-BjY8ChtI.js → chunk-4TB4RGXK-CUJqCV8p.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-B0IYSVWy.js → chunk-55IACEB6-rEtk1rJn.js} +1 -1
- package/dist/assets/{chunk-EDXVE4YY-CMhUQhf4.js → chunk-EDXVE4YY-BXJX6GKI.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-9vR9kG1I.js → chunk-FMBD7UC4-BDN7m4t5.js} +1 -1
- package/dist/assets/{chunk-OYMX7WX6-Bq7dOyh0.js → chunk-OYMX7WX6-DV2tRqJz.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-CIeCERuV.js → chunk-QZHKN3VN-DZLiaz7h.js} +1 -1
- package/dist/assets/{chunk-YZCP3GAM-B-W0ak-k.js → chunk-YZCP3GAM-DLSet-Rk.js} +1 -1
- package/dist/assets/classDiagram-6PBFFD2Q-DYt_iD0o.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-DYt_iD0o.js +1 -0
- package/dist/assets/clone-BeahnYa4.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-CAEbjSUY.js → cose-bilkent-S5V4N54A-Dp5Z_4Tx.js} +1 -1
- package/dist/assets/{dagre-KV5264BT-ChJ4AGyK.js → dagre-KV5264BT-BKpVdjiJ.js} +1 -1
- package/dist/assets/{diagram-5BDNPKRD-Du5VSQro.js → diagram-5BDNPKRD-a737Lqvn.js} +1 -1
- package/dist/assets/{diagram-G4DWMVQ6-BTMTVh0L.js → diagram-G4DWMVQ6-BmXgBfoE.js} +1 -1
- package/dist/assets/{diagram-MMDJMWI5-DXA4h0cT.js → diagram-MMDJMWI5-Cvedma2P.js} +1 -1
- package/dist/assets/{diagram-TYMM5635-B1HE5Ht_.js → diagram-TYMM5635--yV7P2-g.js} +1 -1
- package/dist/assets/{erDiagram-SMLLAGMA-6QlUmTBH.js → erDiagram-SMLLAGMA-CXLXa45C.js} +1 -1
- package/dist/assets/{flowDiagram-DWJPFMVM-DNJ8Jda5.js → flowDiagram-DWJPFMVM-BbY5M4WT.js} +1 -1
- package/dist/assets/{ganttDiagram-T4ZO3ILL-DWQ3Baru.js → ganttDiagram-T4ZO3ILL-DDoe-D8m.js} +1 -1
- package/dist/assets/{gitGraphDiagram-UUTBAWPF-wDmdqFnZ.js → gitGraphDiagram-UUTBAWPF-DOSRGs8Q.js} +1 -1
- package/dist/assets/{graph-wVOIMhoN.js → graph-D2SdCMci.js} +1 -1
- package/dist/assets/{index-DzKPZsHk.js → index-DIyztX-x.js} +2 -2
- package/dist/assets/{infoDiagram-42DDH7IO-BcR6dEzj.js → infoDiagram-42DDH7IO-BVNNhbo-.js} +1 -1
- package/dist/assets/{ishikawaDiagram-UXIWVN3A-B58TFbap.js → ishikawaDiagram-UXIWVN3A-CifXkscV.js} +1 -1
- package/dist/assets/{journeyDiagram-VCZTEJTY-MYav_KcU.js → journeyDiagram-VCZTEJTY-Bd3_iIpv.js} +1 -1
- package/dist/assets/{kanban-definition-6JOO6SKY-C0k63kwB.js → kanban-definition-6JOO6SKY-DH6fPGmv.js} +1 -1
- package/dist/assets/{layout-nq6cvpp1.js → layout-iINEIpJS.js} +1 -1
- package/dist/assets/{linear-D1rb_qkj.js → linear-Sl4HD9SP.js} +1 -1
- package/dist/assets/{mermaid.core-Dq5mP2Xb.js → mermaid.core-DJxnTHij.js} +4 -4
- package/dist/assets/{min-CIM8eK8V.js → min-Bwp8hxQ9.js} +1 -1
- package/dist/assets/{mindmap-definition-QFDTVHPH-Ch0L_pRm.js → mindmap-definition-QFDTVHPH-CjQAQvuD.js} +1 -1
- package/dist/assets/{pieDiagram-DEJITSTG-D2kOp6UF.js → pieDiagram-DEJITSTG-Buiwz1ht.js} +1 -1
- package/dist/assets/{quadrantDiagram-34T5L4WZ-DWGJN3RV.js → quadrantDiagram-34T5L4WZ-f2f1fbrQ.js} +1 -1
- package/dist/assets/{requirementDiagram-MS252O5E-tLD_3npg.js → requirementDiagram-MS252O5E-CidP1EV3.js} +1 -1
- package/dist/assets/{sankeyDiagram-XADWPNL6-DqHqnXZn.js → sankeyDiagram-XADWPNL6-Bqx-rYcK.js} +1 -1
- package/dist/assets/{sequenceDiagram-FGHM5R23-kPdmvr4Y.js → sequenceDiagram-FGHM5R23-BPlE4Dum.js} +1 -1
- package/dist/assets/{stateDiagram-FHFEXIEX-B8OWEO6N.js → stateDiagram-FHFEXIEX-DH2MYaIg.js} +1 -1
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-B6E6jqnj.js +1 -0
- package/dist/assets/{timeline-definition-GMOUNBTQ-kDyIIoTn.js → timeline-definition-GMOUNBTQ-DqWL-r1T.js} +1 -1
- package/dist/assets/{vennDiagram-DHZGUBPP-BF5jtRLj.js → vennDiagram-DHZGUBPP-MeQcBT36.js} +1 -1
- package/dist/assets/{wardley-RL74JXVD-XxUfU9XY.js → wardley-RL74JXVD-C2jDAkJ3.js} +1 -1
- package/dist/assets/{wardleyDiagram-NUSXRM2D-DQlQesuF.js → wardleyDiagram-NUSXRM2D-CXVgRMV7.js} +1 -1
- package/dist/assets/{xychartDiagram-5P7HB3ND-BKIl4c4U.js → xychartDiagram-5P7HB3ND-D8LbH6PY.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/Mobile-BtAraEr7.js +0 -10
- package/dist/assets/channel-Bsx-gJxv.js +0 -1
- package/dist/assets/classDiagram-6PBFFD2Q-CRE8W0YP.js +0 -1
- package/dist/assets/classDiagram-v2-HSJHXN6E-CRE8W0YP.js +0 -1
- package/dist/assets/clone-1w22ixCt.js +0 -1
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-BZ2LC0Bd.js +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var Fe=Object.defineProperty;var He=(t,l,s)=>l in t?Fe(t,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[l]=s;var O=(t,l,s)=>He(t,typeof l!="symbol"?l+"":l,s);import{r as x,j as e,i as We,a as Ue}from"./index-DIyztX-x.js";import{g as _e,m as Ge,a as Te,r as $e,K,u as A,C as ue,i as Pe,c as M,b as Le,d as Ze,I as qe,_ as Xe,e as z,t as b,f as Ke,h as Ye,F as Je,j as Qe,k as et,l as tt,n as st,o as it,s as n,q as ae,v as q,A as at,w as lt,x as nt,y as je,z as r,B as ot,D as rt,R as ct,E as B,G as dt,H as ve,J as mt,T as ht,O as ut,L as gt,M as bt,S as ft,N as he,P as Ne,Q as xt,U as Se}from"./AppHeader.module-DvQ_bZ5X.js";const pt=new K("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),jt=new K("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),vt=new K("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),Nt=new K("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),St=new K("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),Ct=new K("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),yt=t=>{const{componentCls:l,iconCls:s,antCls:i,badgeShadowSize:a,textFontSize:d,textFontSizeSM:o,statusSize:c,dotSize:p,textFontWeight:m,indicatorHeight:f,indicatorHeightSM:u,marginXS:j,calc:y}=t,v=`${i}-scroll-number`,w=Te(t,(C,{darkColor:g})=>({[`&${l} ${l}-color-${C}`]:{background:g,[`&:not(${l}-count)`]:{color:g},"a:hover &":{background:g}}}));return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},$e(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${l}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:t.indicatorZIndex,minWidth:f,height:f,color:t.badgeTextColor,fontWeight:m,fontSize:d,lineHeight:A(f),whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:y(f).div(2).equal(),boxShadow:`0 0 0 ${A(a)} ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${l}-count-sm`]:{minWidth:u,height:u,fontSize:o,lineHeight:A(u),borderRadius:y(u).div(2).equal()},[`${l}-multiple-words`]:{padding:`0 ${A(t.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${l}-dot`]:{zIndex:t.indicatorZIndex,width:p,minWidth:p,height:p,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${A(a)} ${t.badgeShadowColor}`},[`${l}-count, ${l}-dot, ${v}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${s}-spin`]:{animationName:Ct,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${l}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${l}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:c,height:c,verticalAlign:"middle",borderRadius:"50%"},[`${l}-status-success`]:{backgroundColor:t.colorSuccess},[`${l}-status-processing`]:{overflow:"visible",color:t.colorInfo,backgroundColor:t.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:a,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:pt,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${l}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${l}-status-error`]:{backgroundColor:t.colorError},[`${l}-status-warning`]:{backgroundColor:t.colorWarning},[`${l}-status-text`]:{marginInlineStart:j,color:t.colorText,fontSize:t.fontSize}}}),w),{[`${l}-zoom-appear, ${l}-zoom-enter`]:{animationName:jt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${l}-zoom-leave`]:{animationName:vt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${l}-not-a-wrapper`]:{[`${l}-zoom-appear, ${l}-zoom-enter`]:{animationName:Nt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${l}-zoom-leave`]:{animationName:St,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${l}-status)`]:{verticalAlign:"middle"},[`${v}-custom-component, ${l}-count`]:{transform:"none"},[`${v}-custom-component, ${v}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[v]:{overflow:"hidden",transition:`all ${t.motionDurationMid} ${t.motionEaseOutBack}`,[`${v}-only`]:{position:"relative",display:"inline-block",height:f,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${v}-only-unit`]:{height:f,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${v}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${l}-count, ${l}-dot, ${v}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}},ke=t=>{const{fontHeight:l,lineWidth:s,marginXS:i,colorBorderBg:a}=t,d=l,o=s,c=t.colorTextLightSolid,p=t.colorError,m=t.colorErrorHover;return Ge(t,{badgeFontHeight:d,badgeShadowSize:o,badgeTextColor:c,badgeColor:p,badgeColorHover:m,badgeShadowColor:a,badgeProcessingDuration:"1.2s",badgeRibbonOffset:i,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},Ve=t=>{const{fontSize:l,lineHeight:s,fontSizeSM:i,lineWidth:a}=t;return{indicatorZIndex:"auto",indicatorHeight:Math.round(l*s)-2*a,indicatorHeightSM:l,dotSize:i/2,textFontSize:i,textFontSizeSM:i,textFontWeight:"normal",statusSize:i/2}},wt=_e("Badge",t=>{const l=ke(t);return yt(l)},Ve),_t=t=>{const{antCls:l,badgeFontHeight:s,marginXS:i,badgeRibbonOffset:a,calc:d}=t,o=`${l}-ribbon`,c=`${l}-ribbon-wrapper`,p=Te(t,(m,{darkColor:f})=>({[`&${o}-color-${m}`]:{background:f,color:f}}));return{[c]:{position:"relative"},[o]:Object.assign(Object.assign(Object.assign(Object.assign({},$e(t)),{position:"absolute",top:i,padding:`0 ${A(t.paddingXS)}`,color:t.colorPrimary,lineHeight:A(s),whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${o}-text`]:{color:t.badgeTextColor},[`${o}-corner`]:{position:"absolute",top:"100%",width:a,height:a,color:"currentcolor",border:`${A(d(a).div(2).equal())} solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),p),{[`&${o}-placement-end`]:{insetInlineEnd:d(a).mul(-1).equal(),borderEndEndRadius:0,[`${o}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${o}-placement-start`]:{insetInlineStart:d(a).mul(-1).equal(),borderEndStartRadius:0,[`${o}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},Tt=_e(["Badge","Ribbon"],t=>{const l=ke(t);return _t(l)},Ve),$t=t=>{const{className:l,prefixCls:s,style:i,color:a,children:d,text:o,placement:c="end",rootClassName:p}=t,{getPrefixCls:m,direction:f}=x.useContext(ue),u=m("ribbon",s),j=`${u}-wrapper`,[y,v,w]=Tt(u,j),C=Pe(a,!1),g=M(u,`${u}-placement-${c}`,{[`${u}-rtl`]:f==="rtl",[`${u}-color-${a}`]:C},l),h={},P={};return a&&!C&&(h.background=a,P.color=a),y(x.createElement("div",{className:M(j,p,v,w)},d,x.createElement("div",{className:M(g,v),style:Object.assign(Object.assign({},h),i)},x.createElement("span",{className:`${u}-text`},o),x.createElement("div",{className:`${u}-corner`,style:P}))))},Ce=t=>{const{prefixCls:l,value:s,current:i,offset:a=0}=t;let d;return a&&(d={position:"absolute",top:`${a}00%`,left:0}),x.createElement("span",{style:d,className:M(`${l}-only-unit`,{current:i})},s)};function Pt(t,l,s){let i=t,a=0;for(;(i+10)%10!==l;)i+=s,a+=s;return a}const Lt=t=>{const{prefixCls:l,count:s,value:i}=t,a=Number(i),d=Math.abs(s),[o,c]=x.useState(a),[p,m]=x.useState(d),f=()=>{c(a),m(d)};x.useEffect(()=>{const y=setTimeout(f,1e3);return()=>clearTimeout(y)},[a]);let u,j;if(o===a||Number.isNaN(a)||Number.isNaN(o))u=[x.createElement(Ce,Object.assign({},t,{key:a,current:!0}))],j={transition:"none"};else{u=[];const y=a+10,v=[];for(let h=a;h<=y;h+=1)v.push(h);const w=p<d?1:-1,C=v.findIndex(h=>h%10===o);u=(w<0?v.slice(0,C+1):v.slice(C)).map((h,P)=>{const R=h%10;return x.createElement(Ce,Object.assign({},t,{key:h,value:R,offset:w<0?P-C:P,current:P===C}))}),j={transform:`translateY(${-Pt(o,a,w)}00%)`}}return x.createElement("span",{className:`${l}-only`,style:j,onTransitionEnd:f},u)};var kt=function(t,l){var s={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&l.indexOf(i)<0&&(s[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,i=Object.getOwnPropertySymbols(t);a<i.length;a++)l.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(t,i[a])&&(s[i[a]]=t[i[a]]);return s};const Vt=x.forwardRef((t,l)=>{const{prefixCls:s,count:i,className:a,motionClassName:d,style:o,title:c,show:p,component:m="sup",children:f}=t,u=kt(t,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:j}=x.useContext(ue),y=j("scroll-number",s),v=Object.assign(Object.assign({},u),{"data-show":p,style:o,className:M(y,a,d),title:c});let w=i;if(i&&Number(i)%1===0){const C=String(i).split("");w=x.createElement("bdi",null,C.map((g,h)=>x.createElement(Lt,{prefixCls:y,count:Number(i),value:g,key:C.length-h})))}return o!=null&&o.borderColor&&(v.style=Object.assign(Object.assign({},o),{boxShadow:`0 0 0 1px ${o.borderColor} inset`})),f?Le(f,C=>({className:M(`${y}-custom-component`,C==null?void 0:C.className,d)})):x.createElement(m,Object.assign({},v,{ref:l}),w)});var Ot=function(t,l){var s={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&l.indexOf(i)<0&&(s[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,i=Object.getOwnPropertySymbols(t);a<i.length;a++)l.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(t,i[a])&&(s[i[a]]=t[i[a]]);return s};const It=x.forwardRef((t,l)=>{var s,i,a,d,o;const{prefixCls:c,scrollNumberPrefixCls:p,children:m,status:f,text:u,color:j,count:y=null,overflowCount:v=99,dot:w=!1,size:C="default",title:g,offset:h,style:P,className:R,rootClassName:F,classNames:k,styles:V,showZero:H=!1}=t,Y=Ot(t,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:W,direction:E,badge:N}=x.useContext(ue),_=W("badge",c),[J,ee,le]=wt(_),T=y>v?`${v}+`:y,$=T==="0"||T===0||u==="0"||u===0,D=y===null||$&&!H,ne=(f!=null||j!=null)&&D,Me=f!=null||!$,Q=w&&!$,U=Q?"":T,G=x.useMemo(()=>((U==null||U==="")&&(u==null||u==="")||$&&!H)&&!Q,[U,$,H,Q,u]),ge=x.useRef(y);G||(ge.current=y);const Z=ge.current,be=x.useRef(U);G||(be.current=U);const oe=be.current,fe=x.useRef(Q);G||(fe.current=Q);const te=x.useMemo(()=>{if(!h)return Object.assign(Object.assign({},N==null?void 0:N.style),P);const I={marginTop:h[1]};return E==="rtl"?I.left=Number.parseInt(h[0],10):I.right=-Number.parseInt(h[0],10),Object.assign(Object.assign(Object.assign({},I),N==null?void 0:N.style),P)},[E,h,P,N==null?void 0:N.style]),Re=g??(typeof Z=="string"||typeof Z=="number"?Z:void 0),xe=!G&&(u===0?H:!!u&&u!==!0),De=xe?x.createElement("span",{className:`${_}-status-text`},u):null,Ae=!Z||typeof Z!="object"?void 0:Le(Z,I=>({style:Object.assign(Object.assign({},te),I.style)})),se=Pe(j,!1),Ee=M(k==null?void 0:k.indicator,(s=N==null?void 0:N.classNames)===null||s===void 0?void 0:s.indicator,{[`${_}-status-dot`]:ne,[`${_}-status-${f}`]:!!f,[`${_}-color-${j}`]:se}),re={};j&&!se&&(re.color=j,re.background=j);const pe=M(_,{[`${_}-status`]:ne,[`${_}-not-a-wrapper`]:!m,[`${_}-rtl`]:E==="rtl"},R,F,N==null?void 0:N.className,(i=N==null?void 0:N.classNames)===null||i===void 0?void 0:i.root,k==null?void 0:k.root,ee,le);if(!m&&ne&&(u||Me||!D)){const I=te.color;return J(x.createElement("span",Object.assign({},Y,{className:pe,style:Object.assign(Object.assign(Object.assign({},V==null?void 0:V.root),(a=N==null?void 0:N.styles)===null||a===void 0?void 0:a.root),te)}),x.createElement("span",{className:Ee,style:Object.assign(Object.assign(Object.assign({},V==null?void 0:V.indicator),(d=N==null?void 0:N.styles)===null||d===void 0?void 0:d.indicator),re)}),xe&&x.createElement("span",{style:{color:I},className:`${_}-status-text`},u)))}return J(x.createElement("span",Object.assign({ref:l},Y,{className:pe,style:Object.assign(Object.assign({},(o=N==null?void 0:N.styles)===null||o===void 0?void 0:o.root),V==null?void 0:V.root)}),m,x.createElement(Ze,{visible:!G,motionName:`${_}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:I})=>{var ce,de;const Be=W("scroll-number",p),me=fe.current,ze=M(k==null?void 0:k.indicator,(ce=N==null?void 0:N.classNames)===null||ce===void 0?void 0:ce.indicator,{[`${_}-dot`]:me,[`${_}-count`]:!me,[`${_}-count-sm`]:C==="small",[`${_}-multiple-words`]:!me&&oe&&oe.toString().length>1,[`${_}-status-${f}`]:!!f,[`${_}-color-${j}`]:se});let ie=Object.assign(Object.assign(Object.assign({},V==null?void 0:V.indicator),(de=N==null?void 0:N.styles)===null||de===void 0?void 0:de.indicator),te);return j&&!se&&(ie=ie||{},ie.background=j),x.createElement(Vt,{prefixCls:Be,show:!G,motionClassName:I,className:ze,count:oe,title:Re,style:ie,key:"scrollNumber"},Ae)}),De))}),Oe=It;Oe.Ribbon=$t;var Mt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M793 242H366v-74c0-6.7-7.7-10.4-12.9-6.3l-142 112a8 8 0 000 12.6l142 112c5.2 4.1 12.9.4 12.9-6.3v-74h415v470H175c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-28.7 64-64V306c0-35.3-28.7-64-64-64z"}}]},name:"rollback",theme:"outlined"},Rt=function(l,s){return x.createElement(qe,Xe({},l,{ref:s,icon:Mt}))},Dt=x.forwardRef(Rt);const At="_container_1k4mc_1",Et="_fileListSection_1k4mc_10",Bt="_header_1k4mc_19",zt="_headerTitle_1k4mc_28",Ft="_fileCount_1k4mc_36",Ht="_changesContainer_1k4mc_44",Wt="_changeItem_1k4mc_51",Ut="_changeItemActive_1k4mc_68",Gt="_dirItem_1k4mc_77",Zt="_dirArrow_1k4mc_88",qt="_dirName_1k4mc_97",Xt="_status_1k4mc_102",Kt="_icon_1k4mc_111",Yt="_fileName_1k4mc_120",Jt="_diffSection_1k4mc_127",Qt="_diffHeader_1k4mc_135",es="_diffFilePath_1k4mc_145",ts="_diffBadge_1k4mc_155",ss="_diffContent_1k4mc_167",is="_diffPlaceholder_1k4mc_173",as="_statusText_1k4mc_184",ls="_errorText_1k4mc_191",ns="_emptyText_1k4mc_198",os="_warningText_1k4mc_205",rs="_fileSizeNote_1k4mc_217",cs="_statusTextItalic_1k4mc_222",ds="_imagePreviewWrap_1k4mc_226",ms="_imagePreview_1k4mc_226",hs="_rotated90_1k4mc_242",S={container:At,fileListSection:Et,header:Bt,headerTitle:zt,fileCount:Ft,changesContainer:Ht,changeItem:Wt,changeItemActive:Ut,dirItem:Gt,dirArrow:Zt,dirName:qt,status:Xt,icon:Kt,fileName:Yt,diffSection:Jt,diffHeader:Qt,diffFilePath:es,diffBadge:ts,diffContent:ss,diffPlaceholder:is,statusText:as,errorText:ls,emptyText:ns,warningText:os,fileSizeNote:rs,statusTextItalic:cs,imagePreviewWrap:ds,imagePreview:ms,rotated90:hs},us={M:"#e2c08d",A:"#73c991",D:"#f14c4c",R:"#73c991",C:"#73c991",U:"#e2c08d","?":"#73c991","??":"#73c991"},gs={"??":"U"},bs={js:"#e8d44d",jsx:"#61dafb",ts:"#3178c6",tsx:"#3178c6",json:"#999",md:"#519aba",css:"#a86fd9",scss:"#cd6799",html:"#e34c26",py:"#3572a5",go:"#00add8",rs:"#dea584"};function fs(t){const l=t.includes(".")?t.split(".").pop().toLowerCase():"",s=bs[l]||"#888";return e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"1.5",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function xs(){return e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"#c09553",stroke:"none",children:e.jsx("path",{d:"M2 6c0-1.1.9-2 2-2h5l2 2h9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6z"})})}function ps(t){const l={dirs:{},files:[]};for(const s of t){const i=s.file.split("/");let a=l;for(let d=0;d<i.length-1;d++)a.dirs[i[d]]||(a.dirs[i[d]]={dirs:{},files:[]}),a=a.dirs[i[d]];a.files.push({name:i[i.length-1],status:s.status,fullPath:s.file})}return l}function Ie({name:t,node:l,depth:s,selectedFile:i,onFileClick:a}){const d=Object.keys(l.dirs).sort(),o=[...l.files].sort((c,p)=>c.name.localeCompare(p.name));return e.jsxs(e.Fragment,{children:[t&&e.jsxs("div",{className:S.dirItem,style:{paddingLeft:8+s*16},children:[e.jsx("span",{className:S.dirArrow,children:e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:S.rotated90,children:e.jsx("polyline",{points:"9 6 15 12 9 18"})})}),e.jsx("span",{className:S.icon,children:xs()}),e.jsx("span",{className:S.dirName,children:t})]}),d.map(c=>e.jsx(Ie,{name:c,node:l.dirs[c],depth:t?s+1:s,selectedFile:i,onFileClick:a},c)),o.map(c=>e.jsxs("div",{className:`${S.changeItem} ${i===c.fullPath?S.changeItemActive:""}`,style:{paddingLeft:8+(t?s+1:s)*16},onClick:()=>a&&a(c.fullPath),children:[e.jsx("span",{className:S.icon,children:fs(c.name)}),e.jsx("span",{className:S.fileName,children:c.name}),e.jsx("span",{className:S.status,style:{color:us[c.status]||"#888"},children:gs[c.status]||c.status})]},c.fullPath))]})}function js({visible:t}){const[l,s]=x.useState(null),[i,a]=x.useState(null),[d,o]=x.useState(!0),[c,p]=x.useState(null),[m,f]=x.useState(null),[u,j]=x.useState(null),[y,v]=x.useState(!1),[w,C]=x.useState(!1),g=x.useRef(!0);return x.useEffect(()=>{if(g.current=!0,!!t)return o(!0),a(null),fetch(z("/api/git-status")).then(h=>h.ok?h.json():Promise.reject()).then(h=>{g.current&&(s(h.changes||[]),o(!1))}).catch(()=>{g.current&&(a("Failed to load git status"),o(!1))}),()=>{g.current=!1}},[t]),x.useEffect(()=>{if(!c){f(null),j(null);return}v(!0),f(null),j(null),fetch(z(`/api/git-diff?files=${encodeURIComponent(c)}`)).then(h=>{if(!h.ok)throw new Error(`HTTP ${h.status}`);return h.json()}).then(h=>{g.current&&(h.diffs&&h.diffs[0]?f(h.diffs[0]):j("No diff data available"),v(!1))}).catch(h=>{g.current&&(j(`${b("ui.fileLoadError")}: ${h.message}`),v(!1))})},[c]),e.jsxs("div",{className:S.container,children:[e.jsxs("div",{className:S.fileListSection,children:[e.jsxs("div",{className:S.header,children:[e.jsx("span",{className:S.headerTitle,children:b("ui.gitChanges")}),e.jsx("span",{className:S.fileCount,children:l?l.length:0})]}),e.jsxs("div",{className:S.changesContainer,children:[d&&e.jsx("div",{className:S.statusText,children:"Loading..."}),i&&e.jsx("div",{className:S.errorText,children:i}),!d&&!i&&l&&l.length===0&&e.jsx("div",{className:S.emptyText,children:"No changes"}),!d&&!i&&l&&l.length>0&&e.jsx(Ie,{name:"",node:ps(l),depth:0,selectedFile:c,onFileClick:p})]})]}),e.jsx("div",{className:S.diffSection,children:c?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:S.diffHeader,children:[e.jsx("span",{className:S.diffFilePath,children:c}),e.jsx("span",{className:S.diffBadge,children:"DIFF"})]}),e.jsxs("div",{className:S.diffContent,children:[y&&e.jsx("div",{className:S.statusText,children:b("ui.loading")}),u&&e.jsx("div",{className:S.errorText,children:u}),!y&&!u&&m&&e.jsx(e.Fragment,{children:m.is_large?e.jsxs("div",{className:S.warningText,children:[e.jsx("p",{children:b("ui.largeFileWarning")}),e.jsxs("p",{className:S.fileSizeNote,children:[b("ui.fileSize"),": ",(m.size/(1024*1024)).toFixed(2)," MB"]})]}):Ke(c)&&!m.is_deleted?e.jsxs("div",{className:S.imagePreviewWrap,children:[e.jsx("img",{className:S.imagePreview,src:z(`/api/file-raw?path=${encodeURIComponent(c)}`),alt:c,onClick:()=>C(!0)}),w&&e.jsx(Ye,{src:z(`/api/file-raw?path=${encodeURIComponent(c)}`),alt:c,onClose:()=>C(!1)})]}):m.is_binary?e.jsx("div",{className:`${S.statusText} ${S.statusTextItalic}`,children:b("ui.binaryFileNotice")}):e.jsx(Je,{file_path:c,old_string:m.old_content,new_string:m.new_content})})]})]}):e.jsxs("div",{className:S.diffPlaceholder,children:[e.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"#333",strokeWidth:"1.5",children:[e.jsx("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),e.jsx("circle",{cx:"18",cy:"6",r:"3"}),e.jsx("circle",{cx:"6",cy:"18",r:"3"}),e.jsx("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),e.jsx("span",{children:b("ui.mobileGitDiffHint")})]})})]})}const vs="_container_1bb9n_1",Ns="_header_1bb9n_9",Ss="_headerTitle_1bb9n_18",Cs="_closeBtn_1bb9n_24",ys="_content_1bb9n_38",ws="_empty_1bb9n_47",_s="_fixedTable_1bb9n_54",Ts="_ellipsisCell_1bb9n_58",$s="_thLeft_1bb9n_65",Ps="_colWide_1bb9n_69",Ls="_colNarrow_1bb9n_73",L={container:vs,header:Ns,headerTitle:Ss,closeBtn:Cs,content:ys,empty:ws,fixedTable:_s,ellipsisCell:Ts,thLeft:$s,colWide:Ps,colNarrow:Ls},ks=["ttl","system_change","tools_change","model_change","msg_truncated","msg_modified","key_change"],ye={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"};function Vs({requests:t=[],visible:l,onClose:s}){const{byModel:i,models:a,toolStats:d,skillStats:o,cacheStats:c,activeReasons:p,totalCount:m,totalCache:f,hasCacheStats:u,subAgentEntries:j,hasSubAgentStats:y,teammateEntries:v,hasTeammateStats:w,isEmpty:C}=x.useMemo(()=>{const g=Qe(t),h=Object.keys(g),P=et(t),R=tt(t),F=st(t),k=ks.filter(T=>F[T].count>0),V=k.reduce((T,$)=>T+F[$].count,0),H=k.reduce((T,$)=>T+F[$].cacheCreate,0),Y=k.length>0,W={},E={};for(let T=0;T<t.length;T++){const $=it(t[T],t[T+1]);if($.type==="SubAgent"){const D=$.subType||"Other";W[D]=(W[D]||0)+1}else if($.type==="Teammate"){const D=$.subType||"Teammate";E[D]=(E[D]||0)+1}}const N=Object.entries(W).sort((T,$)=>$[1]-T[1]),_=N.length>0,J=Object.entries(E).sort((T,$)=>$[1]-T[1]),ee=J.length>0,le=h.length===0&&P.length===0&&!Y&&!_&&!ee&&R.length===0;return{byModel:g,models:h,toolStats:P,skillStats:R,cacheStats:F,activeReasons:k,totalCount:V,totalCache:H,hasCacheStats:Y,subAgentEntries:N,hasSubAgentStats:_,teammateEntries:J,hasTeammateStats:ee,isEmpty:le}},[t]);return l?e.jsxs("div",{className:L.container,children:[e.jsxs("div",{className:L.header,children:[e.jsx("span",{className:L.headerTitle,children:b("ui.tokenStats")}),e.jsx("button",{className:L.closeBtn,onClick:s,children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsx("div",{className:L.content,children:C?e.jsx("div",{className:L.empty,children:"—"}):e.jsxs(e.Fragment,{children:[o.length>0&&e.jsxs("div",{className:n.modelCard,children:[e.jsx("div",{className:n.modelName,children:b("ui.skillUsageStats")}),e.jsxs("table",{className:n.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${n.th} ${L.thLeft}`,children:"Skill"}),e.jsx("td",{className:n.th,children:b("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[o.map(([g,h])=>e.jsxs("tr",{className:n.rowBorder,children:[e.jsx("td",{className:n.label,children:g}),e.jsx("td",{className:n.td,children:h})]},g)),o.length>1&&e.jsxs("tr",{className:n.rebuildTotalRow,children:[e.jsx("td",{className:n.label,children:"Total"}),e.jsx("td",{className:n.td,children:o.reduce((g,h)=>g+h[1],0)})]})]})]})]}),y&&e.jsxs("div",{className:n.modelCard,children:[e.jsx("div",{className:n.modelName,children:b("ui.subAgentStats")}),e.jsxs("table",{className:n.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${n.th} ${L.thLeft}`,children:"SubAgent"}),e.jsx("td",{className:n.th,children:b("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[j.map(([g,h])=>e.jsxs("tr",{className:n.rowBorder,children:[e.jsxs("td",{className:n.label,children:[g," ",e.jsx(ae,{doc:`SubAgent-${g}`})]}),e.jsx("td",{className:n.td,children:h})]},g)),j.length>1&&e.jsxs("tr",{className:n.rebuildTotalRow,children:[e.jsx("td",{className:n.label,children:"Total"}),e.jsx("td",{className:n.td,children:j.reduce((g,h)=>g+h[1],0)})]})]})]})]}),w&&e.jsxs("div",{className:n.modelCard,children:[e.jsx("div",{className:n.modelName,children:"Teammate"}),e.jsxs("table",{className:n.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${n.th} ${L.thLeft}`,children:"Name"}),e.jsx("td",{className:n.th,children:b("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[v.map(([g,h])=>e.jsxs("tr",{className:n.rowBorder,children:[e.jsx("td",{className:n.label,children:g}),e.jsx("td",{className:n.td,children:h})]},g)),v.length>1&&e.jsxs("tr",{className:n.rebuildTotalRow,children:[e.jsx("td",{className:n.label,children:"Total"}),e.jsx("td",{className:n.td,children:v.reduce((g,h)=>g+h[1],0)})]})]})]})]}),d.length>0&&e.jsxs("div",{className:n.modelCard,children:[e.jsx("div",{className:n.modelName,children:b("ui.toolUsageStats")}),e.jsxs("table",{className:n.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${n.th} ${L.thLeft}`,children:"Tool"}),e.jsx("td",{className:n.th,children:b("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[d.map(([g,h])=>e.jsxs("tr",{className:n.rowBorder,children:[e.jsxs("td",{className:n.label,children:[g," ",e.jsx(ae,{doc:`Tool-${g}`})]}),e.jsx("td",{className:n.td,children:h})]},g)),d.length>1&&e.jsxs("tr",{className:n.rebuildTotalRow,children:[e.jsx("td",{className:n.label,children:"Total"}),e.jsx("td",{className:n.td,children:d.reduce((g,h)=>g+h[1],0)})]})]})]})]}),u&&e.jsxs("div",{className:n.modelCard,children:[e.jsxs("div",{className:n.modelName,children:["MainAgent",e.jsx(ae,{doc:"MainAgent"})," ",b("ui.cacheRebuildStats"),e.jsx(ae,{doc:"CacheRebuild"})]}),e.jsxs("table",{className:`${n.statsTable} ${L.fixedTable}`,children:[e.jsxs("colgroup",{children:[e.jsx("col",{className:L.colWide}),e.jsx("col",{className:L.colNarrow}),e.jsx("col",{className:L.colNarrow})]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${n.th} ${L.thLeft}`,children:b("ui.cacheRebuild.reason")}),e.jsx("td",{className:n.th,children:b("ui.cacheRebuild.count")}),e.jsx("td",{className:n.th,children:b("ui.cacheRebuild.cacheCreate")})]})}),e.jsxs("tbody",{children:[p.map(g=>e.jsxs("tr",{className:n.rowBorder,children:[e.jsx("td",{className:`${n.label} ${L.ellipsisCell}`,title:b(`ui.${ye[g]}`),children:b(`ui.${ye[g]}`)}),e.jsx("td",{className:n.td,children:c[g].count}),e.jsx("td",{className:n.td,children:q(c[g].cacheCreate)})]},g)),p.length>1&&e.jsxs("tr",{className:n.rebuildTotalRow,children:[e.jsx("td",{className:n.label,children:"Total"}),e.jsx("td",{className:n.td,children:m}),e.jsx("td",{className:n.td,children:q(f)})]})]})]})]}),a.map(g=>{const h=i[g],P=h.input+h.cacheCreation+h.cacheRead,R=P>0?(h.cacheRead/P*100).toFixed(1):"0.0";return e.jsxs("div",{className:n.modelCard,children:[e.jsx("div",{className:n.modelName,children:g}),e.jsx("table",{className:n.statsTable,children:e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{className:n.label,children:"Token"}),e.jsx("td",{className:n.th,children:"input"}),e.jsx("td",{className:n.th,children:"output"})]}),e.jsxs("tr",{className:n.rowBorder,children:[e.jsx("td",{className:n.label}),e.jsx("td",{className:n.td,children:q(P)}),e.jsx("td",{className:n.td,children:q(h.output)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:n.label,children:"Cache"}),e.jsx("td",{className:n.th,children:"create"}),e.jsx("td",{className:n.th,children:"read"})]}),e.jsxs("tr",{className:n.rowBorder,children:[e.jsx("td",{className:n.label}),e.jsx("td",{className:n.td,children:q(h.cacheCreation)}),e.jsx("td",{className:n.td,children:q(h.cacheRead)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:n.label,children:b("ui.hitRate")}),e.jsxs("td",{colSpan:2,className:n.td,children:[R,"%"]})]})]})})]},g)})]})})]}):null}const X=class X extends at{constructor(s){super(s);O(this,"handleExportPromptsTxt",s=>{if(!s||s.length===0)return;const i=[];for(const c of s){const p=[],m=c.timestamp?new Date(c.timestamp).toLocaleString():"";m&&p.push(`${m}:
|
|
2
|
+
`);const f=(c.segments||[]).filter(u=>u.type==="text").map(u=>u.content);f.length>0&&p.push(f.join(`
|
|
3
|
+
`)),i.push(p.join(`
|
|
4
|
+
`))}if(i.length===0)return;const a=new Blob([i.join(`
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
`)],{type:"text/plain;charset=utf-8"}),d=URL.createObjectURL(a),o=document.createElement("a");o.href=d,o.download=`user-prompts-${new Date().toISOString().slice(0,10)}.txt`,o.click(),URL.revokeObjectURL(d)});O(this,"handlePendingPermission",s=>{this.setState({globalPermission:s})});O(this,"handlePendingPlanApproval",s=>{this.setState({globalPlanApproval:s})});O(this,"handleAutoApproveChange",s=>{this.setState({autoApproveSeconds:s}),fetch(z("/api/preferences"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({autoApproveSeconds:s})}).catch(()=>{})});O(this,"_isInternalDrag",s=>s.dataTransfer.types.includes("text/x-preset-reorder"));O(this,"_onDragOver",s=>{if(s.preventDefault(),this._isInternalDrag(s))return;if(s.target.closest&&s.target.closest("[data-file-explorer]")){this.state.isDragging&&this.setState({isDragging:!1});return}this.state.isDragging||this.setState({isDragging:!0})});O(this,"_onDragLeave",s=>{const i=this._layoutRef.current;i&&!i.contains(s.relatedTarget)&&this.setState({isDragging:!1})});O(this,"_onDrop",s=>{if(s.preventDefault(),this._isInternalDrag(s))return;this.setState({isDragging:!1});const i=Array.from(s.dataTransfer.files);i.length&&Promise.all(i.map(a=>ot(a).then(d=>({name:a.name,path:d})).catch(d=>(rt.error(`${a.name}: ${d.message}`),null)))).then(a=>{const d=a.filter(Boolean).map(o=>`"${o.path}"`);d.length>0&&this.setState(o=>({pendingUploadPaths:[...o.pendingUploadPaths||[],...d]}))})});O(this,"handleUploadPathsConsumed",()=>{this.setState({pendingUploadPaths:[]})});O(this,"_handleTerminalFilePath",s=>{this.setState(i=>({terminalPendingImages:[...i.terminalPendingImages,{path:s,source:"terminal"}]}))});O(this,"_handleRemoveTerminalImage",s=>{this.setState(i=>({terminalPendingImages:i.terminalPendingImages.filter((a,d)=>d!==s)}))});O(this,"_handleClearTerminalImages",()=>{this.setState({terminalPendingImages:[]})});Object.assign(this.state,{mobileMenuVisible:!1,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1,mobileTerminalVisible:!1,globalPermission:null,globalPlanApproval:null,autoApproveSeconds:0,hasGit:!0,terminalPendingImages:[]})}componentDidMount(){super.componentDidMount(),fetch(z("/api/git-status")).then(s=>{s.ok||this.setState({hasGit:!1,mobileGitDiffVisible:!1})}).catch(()=>this.setState({hasGit:!1,mobileGitDiffVisible:!1})),We&&!Ue&&window.visualViewport&&(this._onVisualViewportChange=()=>{const s=this._layoutRef.current;if(!s)return;const i=window.visualViewport;s.style.position="fixed",s.style.top=`${i.offsetTop}px`,s.style.height=`${i.height}px`,s.style.width="100%",s.style.left="0"},window.visualViewport.addEventListener("resize",this._onVisualViewportChange),window.visualViewport.addEventListener("scroll",this._onVisualViewportChange),this._onVisualViewportChange())}componentWillUnmount(){this._onVisualViewportChange&&window.visualViewport&&(window.visualViewport.removeEventListener("resize",this._onVisualViewportChange),window.visualViewport.removeEventListener("scroll",this._onVisualViewportChange)),super.componentWillUnmount()}static parseSegments(s){const i=[],a=/<([a-zA-Z_][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>/g;let d=0,o;for(;(o=a.exec(s))!==null;){const p=s.slice(d,o.index).trim();p&&i.push({type:"text",content:p});const m=o[1];if(d=o.index+o[0].length,X.COMMAND_TAGS.has(m))continue;const f=new RegExp(`^<${m}(?:\\s[^>]*)?>([\\s\\S]*)<\\/${m}>$`),u=o[0].match(f),j=u?u[1].trim():o[0].trim();i.push({type:"system",content:j,label:m})}const c=s.slice(d).trim();return c&&i.push({type:"text",content:c}),i}static extractUserTexts(s){const i=[],a=[];let d=null;for(const o of s)if(o.role==="user"){if(typeof o.content=="string"){const c=o.content.trim();if(!c)continue;if(!lt(c)){if(/Implement the following plan:/i.test(c))continue;i.push(c),a.push(c)}}else if(Array.isArray(o.content)){const{commands:c,textBlocks:p}=nt(o.content);c.length>0&&(d=c[c.length-1]);const m=[];for(const u of p)/Implement the following plan:/i.test((u.text||"").trim())||m.push(u.text.trim());const f=o.content.filter(u=>{var j;return u.type==="text"&&((j=u.text)==null?void 0:j.trim())}).map(u=>u.text.trim());m.length>0&&(i.push(m.join(`
|
|
9
|
+
`)),a.push(f.join(`
|
|
10
|
+
`)))}}return{userMsgs:i,fullTexts:a,slashCmd:d}}extractUserPrompts(s){var c;const i=[],a=new Set;let d=null;const o=s.filter(p=>je(p));for(let p=0;p<o.length;p++){const m=o[p],f=((c=m.body)==null?void 0:c.messages)||[],u=m.timestamp||"",{userMsgs:j,fullTexts:y,slashCmd:v}=X.extractUserTexts(f);v&&v!=="/compact"&&v!==d&&i.push({type:"prompt",segments:[{type:"text",content:v}],timestamp:u}),d=v;for(let w=0;w<j.length;w++){const C=j[w];if(a.has(C))continue;a.add(C);const g=y[w]||C;i.push({type:"prompt",segments:X.parseSegments(g),timestamp:u})}}return i}renderOriginalPrompt(s){const i=s.segments.filter(a=>a.type==="text");return i.length===0?null:e.jsx("div",{className:r.mobilePromptCard,children:i.map((a,d)=>e.jsx("pre",{className:r.mobilePromptPreText,children:a.content},d))})}render(){var p;const{filteredRequests:s,fileLoading:i,fileLoadingCount:a,mainAgentSessions:d}=this.renderPrepare();if(this.state.workspaceMode)return this.renderWorkspaceMode();const o=!!this._isLocalLog;let c=null;for(let m=s.length-1;m>=0;m--)if(je(s[m])&&((p=s[m].body)!=null&&p.model)){c=s[m].body.model;break}return e.jsxs("div",{className:r.mobileCLIRoot,ref:this._layoutRef,onDragOver:this._onDragOver,onDragLeave:this._onDragLeave,onDrop:this._onDrop,children:[this.state.isDragging&&e.jsx("div",{className:r.dragOverlay,children:e.jsxs("div",{className:r.dragOverlayContent,children:[e.jsx(ct,{className:r.dragIcon}),e.jsx("p",{children:b("ui.dragDropHint")})]})}),e.jsxs("div",{className:r.mobileCLIHeader,children:[e.jsxs("div",{className:r.mobileCLIHeaderLeft,children:[e.jsx("button",{className:r.mobileMenuBtn,onClick:()=>this.setState(m=>({mobileMenuVisible:!m.mobileMenuVisible})),"aria-label":b("ui.mobileMenu"),children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),e.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),e.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),e.jsx(Oe,{status:"processing",color:"green"}),e.jsx("span",{className:r.mobileCLIStatusLabel,children:o?b("ui.historyLog",{file:this._localLogFile}):b("ui.liveMonitoring")+(this.state.projectName?`: ${this.state.projectName}`:"")})]}),e.jsxs("div",{className:r.mobileCLIHeaderRight,children:[o?e.jsx(B,{type:"text",size:"small",icon:e.jsx(Dt,{}),onClick:()=>history.back(),className:r.mobileNavBtn,children:b("ui.mobileGoBack")}):this.state.hasGit?e.jsx(B,{type:"text",size:"small",icon:e.jsx(dt,{}),onClick:()=>this.setState(m=>({mobileGitDiffVisible:!m.mobileGitDiffVisible,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileStatsVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1})),style:{color:this.state.mobileGitDiffVisible?"var(--color-primary)":"var(--text-tertiary)",fontSize:12},children:this.state.mobileGitDiffVisible?b("ui.mobileGitDiffExit"):b("ui.mobileGitDiffBrowse")}):null,!o&&e.jsx(B,{type:"text",size:"small",icon:e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("polyline",{points:"4 17 10 11 4 5"}),e.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]}),onClick:()=>this.setState(m=>({mobileTerminalVisible:!m.mobileTerminalVisible,mobileGitDiffVisible:!1,mobileStatsVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1})),style:{color:this.state.mobileTerminalVisible?"var(--color-primary)":"var(--text-tertiary)",fontSize:12},children:this.state.mobileTerminalVisible?b("ui.mobileTerminalExit"):b("ui.mobileTerminalBrowse")})]}),this.state.mobileMenuVisible&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:r.mobileMenuOverlay,onClick:()=>this.setState({mobileMenuVisible:!1})}),e.jsxs("div",{className:r.mobileMenuDropdown,children:[e.jsxs("button",{className:r.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,mobileLogMgmtVisible:!0,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1}),this.handleImportLocalLogs()},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"}),e.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),e.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"})]}),b("ui.logManagement")]}),e.jsxs("button",{className:r.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,mobileStatsVisible:!0,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1})},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"3",width:"7",height:"7"}),e.jsx("rect",{x:"14",y:"3",width:"7",height:"7"}),e.jsx("rect",{x:"3",y:"14",width:"7",height:"7"}),e.jsx("rect",{x:"14",y:"14",width:"7",height:"7"})]}),b("ui.tokenStats")]}),e.jsxs("button",{className:r.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,mobileSettingsVisible:!0,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileLogMgmtVisible:!1,mobilePromptVisible:!1})},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"3"}),e.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]}),b("ui.settings")]}),e.jsxs("button",{className:r.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,mobilePromptVisible:!0,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileTerminalVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1})},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"}),e.jsx("line",{x1:"12",y1:"18",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"12",x2:"9",y2:"15"}),e.jsx("line",{x1:"12",y1:"12",x2:"15",y2:"15"})]}),b("ui.userPrompt")]})]})]})]}),e.jsxs("div",{className:r.mobileCLIBody,children:[!o&&e.jsxs(e.Fragment,{children:[i&&e.jsxs("div",{className:r.mobileLoadingOverlay,children:[e.jsx("div",{className:r.mobileLoadingSpinner}),e.jsxs("div",{className:r.mobileLoadingLabel,children:[b("ui.loadingChat"),a>0?` (${a})`:""]})]}),e.jsx(ve,{theme:this.themeConfig,children:e.jsx("div",{className:r.mobileChatInner,children:e.jsx(mt,{requests:s,mainAgentSessions:d,userProfile:this.state.userProfile,collapseToolResults:this.state.collapseToolResults,expandThinking:this.state.expandThinking,showFullToolContent:this.state.showFullToolContent,showThinkingSummaries:this.state.showThinkingSummaries,onViewRequest:null,scrollToTimestamp:null,onScrollTsDone:()=>{},cliMode:this.state.cliMode,sdkMode:this.state.sdkMode,terminalVisible:!1,mobileChatVisible:!0,fileLoading:this.state.fileLoading,isStreaming:this.state.isStreaming,hasMoreHistory:this.state.hasMoreHistory,loadingMore:this.state.loadingMore,onLoadMoreHistory:()=>this.loadMoreHistory(),loadingSessionId:this.state.loadingSessionId,onLoadSession:m=>this.loadSession(m),onPendingPermission:this.handlePendingPermission,onPendingPlanApproval:this.handlePendingPlanApproval,pendingUploadPaths:this.state.pendingUploadPaths,onUploadPathsConsumed:this.handleUploadPathsConsumed})})})]}),!o&&e.jsx("div",{className:`${r.mobileChatOverlay} ${this.state.mobileTerminalVisible?r.mobileChatOverlayVisible:""}`,children:e.jsx(ht,{modelName:c,onFilePath:this._handleTerminalFilePath,pendingImages:this.state.terminalPendingImages,onRemovePendingImage:this._handleRemoveTerminalImage,onClearPendingImages:this._handleClearTerminalImages})}),e.jsx("div",{className:`${r.mobileGitDiffOverlay} ${this.state.mobileGitDiffVisible?r.mobileGitDiffOverlayVisible:""}`,children:e.jsx("div",{className:r.mobileGitDiffInner,children:e.jsx(js,{visible:this.state.mobileGitDiffVisible})})}),e.jsx("div",{className:`${r.mobileStatsOverlay} ${this.state.mobileStatsVisible?r.mobileStatsOverlayVisible:""}`,children:e.jsx("div",{className:r.mobileStatsInner,children:e.jsx(Vs,{requests:s,visible:this.state.mobileStatsVisible,onClose:()=>this.setState({mobileStatsVisible:!1})})})}),e.jsxs("div",{className:`${r.mobileLogMgmtOverlay} ${this.state.mobileLogMgmtVisible?r.mobileLogMgmtOverlayVisible:""}`,children:[e.jsxs("div",{className:r.mobileLogMgmtHeader,children:[e.jsxs("span",{className:r.mobileLogMgmtTitle,children:[e.jsx(ut,{apiEndpoint:z("/api/open-log-dir"),title:b("ui.openLogDir"),size:14}),b("ui.importLocalLogs")]}),e.jsx("button",{className:r.mobileLogMgmtClose,onClick:()=>this.setState({mobileLogMgmtVisible:!1,selectedLogs:new Set}),children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsxs("div",{className:r.mobileLogMgmtActions,children:[e.jsx(B,{size:"small",type:this.state.selectedLogs.size>=2?"primary":"default",disabled:this.state.selectedLogs.size<2,onClick:this.handleMergeLogs,style:this.state.selectedLogs.size<2?{color:"var(--text-muted)",borderColor:"var(--border-light)"}:void 0,children:b("ui.mergeLogs")}),e.jsx(B,{size:"small",icon:e.jsx(gt,{}),disabled:this.state.selectedLogs.size===0,onClick:this.handleDeleteLogs,style:this.state.selectedLogs.size===0?{color:"var(--text-muted)",borderColor:"var(--border-light)"}:{color:"var(--color-error-light)",borderColor:"var(--color-error-light)"},children:b("ui.deleteLogs")}),e.jsx(B,{size:"small",icon:e.jsx(bt,{spin:this.state.refreshingStats}),loading:this.state.refreshingStats,onClick:this.handleRefreshStats,children:b("ui.refreshStats")})]}),e.jsx("div",{className:r.mobileLogMgmtBody,children:this.state.localLogsLoading?e.jsx("div",{className:r.spinCenter,children:e.jsx(ft,{})}):(()=>{const m=this.state.localLogs[this.state.currentProject];return!m||m.length===0?e.jsx("div",{className:r.emptyCenter,children:b("ui.noLogs")}):e.jsx(ve,{theme:this.themeConfig,children:e.jsx("div",{className:r.logListContainer,children:this.renderLogTable(m,!0)})})})()})]}),e.jsxs("div",{className:`${r.mobileSettingsOverlay} ${this.state.mobileSettingsVisible?r.mobileSettingsOverlayVisible:""}`,children:[e.jsxs("div",{className:r.mobileLogMgmtHeader,children:[e.jsx("span",{className:r.mobileLogMgmtTitle,children:b("ui.settings")}),e.jsx("button",{className:r.mobileLogMgmtClose,onClick:()=>this.setState({mobileSettingsVisible:!1}),children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsxs("div",{className:r.mobileSettingsBody,children:[e.jsx("div",{className:r.mobileSettingsSectionTitle,children:b("ui.chatDisplaySwitches")}),e.jsxs("div",{className:r.mobileSettingsRow,children:[e.jsx("span",{className:r.mobileSettingsLabel,children:b("ui.collapseToolResults")}),e.jsx(he,{checked:!!this.state.collapseToolResults,onChange:this.handleCollapseToolResultsChange})]}),e.jsxs("div",{className:r.mobileSettingsRow,children:[e.jsx("span",{className:r.mobileSettingsLabel,children:b("ui.expandThinking")}),e.jsx(he,{checked:!!this.state.expandThinking,onChange:this.handleExpandThinkingChange})]}),e.jsxs("div",{className:r.mobileSettingsRow,children:[e.jsx("span",{className:r.mobileSettingsLabel,children:b("ui.showFullToolContent")}),e.jsx(he,{checked:!!this.state.showFullToolContent,onChange:this.handleShowFullToolContentChange})]}),e.jsx("div",{className:r.mobileSettingsSectionTitle,children:b("ui.themeColor")}),e.jsx("div",{className:r.mobileSettingsRow,children:e.jsx(Ne,{size:"small",value:this.state.themeColor||"dark",onChange:this.handleThemeColorChange,options:[{label:b("ui.themeColor.dark"),value:"dark"},{label:b("ui.themeColor.light"),value:"light"}],style:{width:140}})}),e.jsx("div",{className:r.mobileSettingsSectionTitle,children:b("ui.permission.autoApprove.setting")}),e.jsx("div",{className:r.mobileSettingsRow,children:e.jsx(Ne,{size:"small",value:this.state.autoApproveSeconds||0,onChange:this.handleAutoApproveChange,options:[{label:b("ui.permission.autoApprove.off"),value:0},{label:"3s",value:3},{label:"5s",value:5},{label:"10s",value:10},{label:"15s",value:15},{label:"20s",value:20},{label:"30s",value:30},{label:"60s",value:60}],style:{width:100}})})]})]}),e.jsxs("div",{className:`${r.mobilePromptOverlay} ${this.state.mobilePromptVisible?r.mobilePromptOverlayVisible:""}`,children:[e.jsxs("div",{className:r.mobileLogMgmtHeader,children:[e.jsx("span",{className:r.mobileLogMgmtTitle,children:b("ui.userPrompt")}),e.jsx("button",{className:r.mobileLogMgmtClose,onClick:()=>this.setState({mobilePromptVisible:!1}),children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsx("div",{className:r.mobilePromptBody,children:(()=>{const m=this.extractUserPrompts(s);return m.length===0?e.jsx("div",{className:r.mobilePromptEmpty,children:b("ui.noPrompt")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:r.mobilePromptHeader,children:[e.jsxs("span",{className:r.mobilePromptCount,children:[m.length," ",b("ui.promptCountUnit")]}),e.jsx(B,{size:"small",icon:e.jsx(xt,{}),onClick:()=>this.handleExportPromptsTxt(m),children:b("ui.exportPromptsTxt")})]}),e.jsx("div",{className:r.mobilePromptList,children:m.map((f,u)=>e.jsxs("div",{className:r.mobilePromptItem,children:[f.timestamp&&e.jsx("div",{className:r.mobilePromptTimestamp,children:new Date(f.timestamp).toLocaleString()}),this.renderOriginalPrompt(f)]},u))})]})})()})]})]}),this.state.globalPermission&&e.jsx(Se,{toolName:this.state.globalPermission.permission.toolName,toolInput:this.state.globalPermission.permission.input,requestId:this.state.globalPermission.permission.id,onAllow:this.state.globalPermission.handlers.allow,onAllowSession:this.state.globalPermission.handlers.allowSession,onDeny:this.state.globalPermission.handlers.deny,visible:!0,global:!0,autoApproveSeconds:this.state.autoApproveSeconds,onAutoApproveChange:this.handleAutoApproveChange,modelName:this.state.globalPermission.modelName}),this.state.globalPlanApproval&&e.jsx(Se,{toolName:"ExitPlanMode",toolInput:this.state.globalPlanApproval.plan.input,requestId:this.state.globalPlanApproval.plan.id,onAllow:this.state.globalPlanApproval.handlers.approve,onDeny:m=>this.state.globalPlanApproval.handlers.reject(m,""),visible:!0,global:!0})]})}};O(X,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let we=X;export{we as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aW as L,bk as ln,aG as A,aU as P,aF as W,bl as gn,bm as dn,bn as hn,bo as z,bp as pn,bq as An,br as m,aX as N,b0 as U,b3 as T,bs as _n,a_ as on,bt as wn,bu as On,aH as V,bv as vn,bw as I}from"./mermaid.core-
|
|
1
|
+
import{aW as L,bk as ln,aG as A,aU as P,aF as W,bl as gn,bm as dn,bn as hn,bo as z,bp as pn,bq as An,br as m,aX as N,b0 as U,b3 as T,bs as _n,a_ as on,bt as wn,bu as On,aH as V,bv as vn,bw as I}from"./mermaid.core-DJxnTHij.js";var Pn="[object Symbol]";function x(n){return typeof n=="symbol"||L(n)&&ln(n)==Pn}function bn(n,r){for(var e=-1,i=n==null?0:n.length,f=Array(i);++e<i;)f[e]=r(n[e],e,n);return f}var B=P?P.prototype:void 0,H=B?B.toString:void 0;function k(n){if(typeof n=="string")return n;if(A(n))return bn(n,k)+"";if(x(n))return H?H.call(n):"";var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function yn(){}function En(n,r){for(var e=-1,i=n==null?0:n.length;++e<i&&r(n[e],e,n)!==!1;);return n}function cn(n,r,e,i){for(var f=n.length,t=e+-1;++t<f;)if(r(n[t],t,n))return t;return-1}function Tn(n){return n!==n}function Rn(n,r,e){for(var i=e-1,f=n.length;++i<f;)if(n[i]===r)return i;return-1}function In(n,r,e){return r===r?Rn(n,r,e):cn(n,Tn,e)}function Sn(n,r){var e=n==null?0:n.length;return!!e&&In(n,r,0)>-1}function M(n){return W(n)?gn(n):dn(n)}var Ln=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xn=/^\w*$/;function $(n,r){if(A(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||x(n)?!0:xn.test(n)||!Ln.test(n)||r!=null&&n in Object(r)}var Mn=500;function $n(n){var r=hn(n,function(i){return e.size===Mn&&e.clear(),i}),e=r.cache;return r}var Cn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fn=/\\(\\)?/g,Gn=$n(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(Cn,function(e,i,f,t){r.push(f?t.replace(Fn,"$1"):i||e)}),r});function Dn(n){return n==null?"":k(n)}function j(n,r){return A(n)?n:$(n,r)?[n]:Gn(Dn(n))}function R(n){if(typeof n=="string"||x(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function nn(n,r){r=j(r,n);for(var e=0,i=r.length;n!=null&&e<i;)n=n[R(r[e++])];return e&&e==i?n:void 0}function mn(n,r,e){var i=n==null?void 0:nn(n,r);return i===void 0?e:i}function rn(n,r){for(var e=-1,i=r.length,f=n.length;++e<i;)n[f+e]=r[e];return n}var K=P?P.isConcatSpreadable:void 0;function Nn(n){return A(n)||z(n)||!!(K&&n&&n[K])}function Kr(n,r,e,i,f){var t=-1,s=n.length;for(e||(e=Nn),f||(f=[]);++t<s;){var u=n[t];e(u)?rn(f,u):i||(f[f.length]=u)}return f}function Un(n,r,e,i){var f=-1,t=n==null?0:n.length;for(i&&t&&(e=n[++f]);++f<t;)e=r(e,n[f],f,n);return e}function en(n,r){for(var e=-1,i=n==null?0:n.length,f=0,t=[];++e<i;){var s=n[e];r(s,e,n)&&(t[f++]=s)}return t}function Bn(){return[]}var Hn=Object.prototype,Kn=Hn.propertyIsEnumerable,q=Object.getOwnPropertySymbols,qn=q?function(n){return n==null?[]:(n=Object(n),en(q(n),function(r){return Kn.call(n,r)}))}:Bn;function Zn(n,r,e){var i=r(n);return A(n)?i:rn(i,e(n))}function Z(n){return Zn(n,M,qn)}var Xn="__lodash_hash_undefined__";function Yn(n){return this.__data__.set(n,Xn),this}function Jn(n){return this.__data__.has(n)}function b(n){var r=-1,e=n==null?0:n.length;for(this.__data__=new pn;++r<e;)this.add(n[r])}b.prototype.add=b.prototype.push=Yn;b.prototype.has=Jn;function Qn(n,r){for(var e=-1,i=n==null?0:n.length;++e<i;)if(r(n[e],e,n))return!0;return!1}function tn(n,r){return n.has(r)}var Wn=1,zn=2;function fn(n,r,e,i,f,t){var s=e&Wn,u=n.length,a=r.length;if(u!=a&&!(s&&a>u))return!1;var h=t.get(n),g=t.get(r);if(h&&g)return h==r&&g==n;var l=-1,d=!0,o=e&zn?new b:void 0;for(t.set(n,r),t.set(r,n);++l<u;){var p=n[l],_=r[l];if(i)var w=s?i(_,p,l,r,n,t):i(p,_,l,n,r,t);if(w!==void 0){if(w)continue;d=!1;break}if(o){if(!Qn(r,function(O,v){if(!tn(o,v)&&(p===O||f(p,O,e,i,t)))return o.push(v)})){d=!1;break}}else if(!(p===_||f(p,_,e,i,t))){d=!1;break}}return t.delete(n),t.delete(r),d}function Vn(n){var r=-1,e=Array(n.size);return n.forEach(function(i,f){e[++r]=[f,i]}),e}function C(n){var r=-1,e=Array(n.size);return n.forEach(function(i){e[++r]=i}),e}var kn=1,jn=2,nr="[object Boolean]",rr="[object Date]",er="[object Error]",ir="[object Map]",tr="[object Number]",fr="[object RegExp]",sr="[object Set]",ur="[object String]",ar="[object Symbol]",lr="[object ArrayBuffer]",gr="[object DataView]",X=P?P.prototype:void 0,S=X?X.valueOf:void 0;function dr(n,r,e,i,f,t,s){switch(e){case gr:if(n.byteLength!=r.byteLength||n.byteOffset!=r.byteOffset)return!1;n=n.buffer,r=r.buffer;case lr:return!(n.byteLength!=r.byteLength||!t(new m(n),new m(r)));case nr:case rr:case tr:return An(+n,+r);case er:return n.name==r.name&&n.message==r.message;case fr:case ur:return n==r+"";case ir:var u=Vn;case sr:var a=i&kn;if(u||(u=C),n.size!=r.size&&!a)return!1;var h=s.get(n);if(h)return h==r;i|=jn,s.set(n,r);var g=fn(u(n),u(r),i,f,t,s);return s.delete(n),g;case ar:if(S)return S.call(n)==S.call(r)}return!1}var hr=1,pr=Object.prototype,Ar=pr.hasOwnProperty;function _r(n,r,e,i,f,t){var s=e&hr,u=Z(n),a=u.length,h=Z(r),g=h.length;if(a!=g&&!s)return!1;for(var l=a;l--;){var d=u[l];if(!(s?d in r:Ar.call(r,d)))return!1}var o=t.get(n),p=t.get(r);if(o&&p)return o==r&&p==n;var _=!0;t.set(n,r),t.set(r,n);for(var w=s;++l<a;){d=u[l];var O=n[d],v=r[d];if(i)var D=s?i(v,O,d,r,n,t):i(O,v,d,n,r,t);if(!(D===void 0?O===v||f(O,v,e,i,t):D)){_=!1;break}w||(w=d=="constructor")}if(_&&!w){var y=n.constructor,E=r.constructor;y!=E&&"constructor"in n&&"constructor"in r&&!(typeof y=="function"&&y instanceof y&&typeof E=="function"&&E instanceof E)&&(_=!1)}return t.delete(n),t.delete(r),_}var or=1,Y="[object Arguments]",J="[object Array]",c="[object Object]",wr=Object.prototype,Q=wr.hasOwnProperty;function Or(n,r,e,i,f,t){var s=A(n),u=A(r),a=s?J:N(n),h=u?J:N(r);a=a==Y?c:a,h=h==Y?c:h;var g=a==c,l=h==c,d=a==h;if(d&&U(n)){if(!U(r))return!1;s=!0,g=!1}if(d&&!g)return t||(t=new T),s||_n(n)?fn(n,r,e,i,f,t):dr(n,r,a,e,i,f,t);if(!(e&or)){var o=g&&Q.call(n,"__wrapped__"),p=l&&Q.call(r,"__wrapped__");if(o||p){var _=o?n.value():n,w=p?r.value():r;return t||(t=new T),f(_,w,e,i,t)}}return d?(t||(t=new T),_r(n,r,e,i,f,t)):!1}function F(n,r,e,i,f){return n===r?!0:n==null||r==null||!L(n)&&!L(r)?n!==n&&r!==r:Or(n,r,e,i,F,f)}var vr=1,Pr=2;function br(n,r,e,i){var f=e.length,t=f;if(n==null)return!t;for(n=Object(n);f--;){var s=e[f];if(s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++f<t;){s=e[f];var u=s[0],a=n[u],h=s[1];if(s[2]){if(a===void 0&&!(u in n))return!1}else{var g=new T,l;if(!(l===void 0?F(h,a,vr|Pr,i,g):l))return!1}}return!0}function sn(n){return n===n&&!on(n)}function yr(n){for(var r=M(n),e=r.length;e--;){var i=r[e],f=n[i];r[e]=[i,f,sn(f)]}return r}function un(n,r){return function(e){return e==null?!1:e[n]===r&&(r!==void 0||n in Object(e))}}function Er(n){var r=yr(n);return r.length==1&&r[0][2]?un(r[0][0],r[0][1]):function(e){return e===n||br(e,n,r)}}function cr(n,r){return n!=null&&r in Object(n)}function Tr(n,r,e){r=j(r,n);for(var i=-1,f=r.length,t=!1;++i<f;){var s=R(r[i]);if(!(t=n!=null&&e(n,s)))break;n=n[s]}return t||++i!=f?t:(f=n==null?0:n.length,!!f&&wn(f)&&On(s,f)&&(A(n)||z(n)))}function Rr(n,r){return n!=null&&Tr(n,r,cr)}var Ir=1,Sr=2;function Lr(n,r){return $(n)&&sn(r)?un(R(n),r):function(e){var i=mn(e,n);return i===void 0&&i===r?Rr(e,n):F(r,i,Ir|Sr)}}function xr(n){return function(r){return r==null?void 0:r[n]}}function Mr(n){return function(r){return nn(r,n)}}function $r(n){return $(n)?xr(R(n)):Mr(n)}function an(n){return typeof n=="function"?n:n==null?V:typeof n=="object"?A(n)?Lr(n[0],n[1]):Er(n):$r(n)}function Cr(n,r){return n&&vn(n,r,M)}function Fr(n,r){return function(e,i){if(e==null)return e;if(!W(e))return n(e,i);for(var f=e.length,t=-1,s=Object(e);++t<f&&i(s[t],t,s)!==!1;);return e}}var G=Fr(Cr);function Gr(n){return typeof n=="function"?n:V}function qr(n,r){var e=A(n)?En:G;return e(n,Gr(r))}function Dr(n,r){var e=[];return G(n,function(i,f,t){r(i,f,t)&&e.push(i)}),e}function Zr(n,r){var e=A(n)?en:Dr;return e(n,an(r))}function mr(n,r,e,i,f){return f(n,function(t,s,u){e=i?(i=!1,t):r(e,t,s,u)}),e}function Xr(n,r,e){var i=A(n)?Un:mr,f=arguments.length<3;return i(n,an(r),e,f,G)}var Nr=1/0,Ur=I&&1/C(new I([,-0]))[1]==Nr?function(n){return new I(n)}:yn,Br=200;function Yr(n,r,e){var i=-1,f=Sn,t=n.length,s=!0,u=[],a=u;if(t>=Br){var h=r?null:Ur(n);if(h)return C(h);s=!1,f=tn,a=new b}else a=r?[]:u;n:for(;++i<t;){var g=n[i],l=r?r(g):g;if(g=g!==0?g:0,s&&l===l){for(var d=a.length;d--;)if(a[d]===l)continue n;r&&a.push(l),u.push(g)}else f(a,l,e)||(a!==u&&a.push(l),u.push(g))}return u}export{G as a,Kr as b,an as c,bn as d,rn as e,Zn as f,qn as g,En as h,x as i,Z as j,M as k,Yr as l,Zr as m,qr as n,cn as o,Gr as p,Cr as q,Xr as r,Bn as s,Tr as t,j as u,R as v,nn as w,Rr as x,Dn as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as ln,a0 as an,a1 as G,a2 as q,a3 as z,a4 as un,a5 as y,a6 as tn,a7 as K,a8 as _,a9 as rn,aa as o,ab as on,ac as sn,ad as fn}from"./mermaid.core-
|
|
1
|
+
import{$ as ln,a0 as an,a1 as G,a2 as q,a3 as z,a4 as un,a5 as y,a6 as tn,a7 as K,a8 as _,a9 as rn,aa as o,ab as on,ac as sn,ad as fn}from"./mermaid.core-DJxnTHij.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,B,a){var O=I-l,i=D-h,n=B-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function V(l,h,I,D,v,A,B){var a=l-I,O=h-D,i=(B?A:-A)/K(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,C=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*K(on(0,T*T*R-P*P)),$=(P*g-m*S)/R,j=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=$-C,e=j-t,r=w-C,F=p-t;return x*x+e*e>r*r+F*F&&($=w,j=p),{cx:$,cy:j,x01:-n,y01:-d,x11:$*(v/T-1),y11:j*(v/T-1)}}function hn(){var l=cn,h=yn,I=z(0),D=null,v=gn,A=dn,B=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,C=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(C>tn-y)a.moveTo(s*G(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*G(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=C,S=C,$=B.apply(this,arguments)/2,j=$>y&&(D?+D.apply(this,arguments):K(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(j>y){var F=sn(j/u*q($)),L=sn(j/s*q($));(P-=F*2)>y?(F*=t?1:-1,R+=F,T-=F):(P=0,R=T=(f+c)/2),(S-=L*2)>y?(L*=t?1:-1,m+=L,g-=L):(S=0,m=g=(f+c)/2)}var H=s*G(m),J=s*q(m),M=u*G(T),N=u*q(T);if(w>y){var Q=s*G(g),U=s*q(g),W=u*G(R),X=u*q(R),E;if(C<an)if(E=pn(H,J,W,X,Q,U,M,N)){var Y=H-E[0],Z=J-E[1],b=Q-E[0],k=U-E[1],nn=1/q(fn((Y*b+Z*k)/(K(Y*Y+Z*Z)*K(b*b+k*k)))/2),en=K(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=V(W,X,H,J,s,x,t),r=V(Q,U,M,N,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(H,J),a.arc(0,0,s,m,g,!t)):a.moveTo(H,J),!(u>y)||!(P>y)?a.lineTo(M,N):p>y?(e=V(M,N,Q,U,u,-p,t),r=V(H,J,W,X,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[G(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:z(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:z(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:z(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:z(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:z(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:z(+n),i):A},i.padAngle=function(n){return arguments.length?(B=typeof n=="function"?n:z(+n),i):B},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
|