chatlab-cli 0.28.1 → 0.30.0
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/{chat-command-ISJ2DC7R.mjs → chat-command-UZ23GKO7.mjs} +8 -5
- package/dist/{chat-command-ISJ2DC7R.mjs.map → chat-command-UZ23GKO7.mjs.map} +1 -1
- package/dist/{chunk-AB6TAXTQ.mjs → chunk-4IZ3WKYU.mjs} +591 -310
- package/dist/chunk-4IZ3WKYU.mjs.map +1 -0
- package/dist/{chunk-3QBVO4J7.mjs → chunk-5UBHNQFZ.mjs} +101 -41
- package/dist/chunk-5UBHNQFZ.mjs.map +1 -0
- package/dist/chunk-7BZLS2KW.mjs +8965 -0
- package/dist/chunk-7BZLS2KW.mjs.map +1 -0
- package/dist/{chunk-ZVDOFWL7.mjs → chunk-A2SANKG4.mjs} +4043 -10895
- package/dist/chunk-A2SANKG4.mjs.map +1 -0
- package/dist/chunk-CNSYXRJP.mjs +526 -0
- package/dist/chunk-CNSYXRJP.mjs.map +1 -0
- package/dist/{chunk-T7IETWHN.mjs → chunk-FCCL5Z4W.mjs} +5 -3
- package/dist/{chunk-T7IETWHN.mjs.map → chunk-FCCL5Z4W.mjs.map} +1 -1
- package/dist/chunk-M55KW2HA.mjs +2323 -0
- package/dist/chunk-M55KW2HA.mjs.map +1 -0
- package/dist/chunk-MUPILWAZ.mjs +1339 -0
- package/dist/chunk-MUPILWAZ.mjs.map +1 -0
- package/dist/{chunk-YBS3YQB6.mjs → chunk-P3ZOLTGS.mjs} +31 -57
- package/dist/chunk-P3ZOLTGS.mjs.map +1 -0
- package/dist/{chunk-NJB2NNB2.mjs → chunk-RDR6PS2R.mjs} +2 -2
- package/dist/{chunk-ERAAWLEF.mjs → chunk-ZFU2CHW3.mjs} +11 -8
- package/dist/{chunk-ERAAWLEF.mjs.map → chunk-ZFU2CHW3.mjs.map} +1 -1
- package/dist/cli.mjs +7 -4
- package/dist/contacts-worker.mjs +48 -0
- package/dist/contacts-worker.mjs.map +1 -0
- package/dist/{http-MBILV37U.mjs → http-UWRA5FLB.mjs} +11 -8
- package/dist/{import-EYV3GXHE.mjs → import-745KQL7N.mjs} +7 -4
- package/dist/index.mjs +11 -8
- package/dist/{mcp-H55AEXU5.mjs → mcp-UHN5JOHC.mjs} +8 -5
- package/dist/{mcp-H55AEXU5.mjs.map → mcp-UHN5JOHC.mjs.map} +1 -1
- package/dist/people-relationships-worker.mjs +48 -0
- package/dist/people-relationships-worker.mjs.map +1 -0
- package/dist/semantic-index-worker.mjs +1 -1
- package/dist/{src-36ZIR65K.mjs → src-Y7MDRXLJ.mjs} +68 -44
- package/dist/{stream-import-YZMZ56B5.mjs → stream-import-3JMXQD7P.mjs} +7 -4
- package/dist/{worker-runtime-YDYS2C6T.mjs → worker-runtime-63RYMGZI.mjs} +7 -3
- package/dist/{worker-runtime-YDYS2C6T.mjs.map → worker-runtime-63RYMGZI.mjs.map} +1 -1
- package/dist-web/assets/BufferResource-BVdJ_I5X.js +185 -0
- package/dist-web/assets/CanvasRenderer-BaRuT54R.js +1 -0
- package/dist-web/assets/DebugToolsPanel-D_lFIW6j.css +1 -0
- package/dist-web/assets/DebugToolsPanel.vue_vue_type_script_setup_true_lang-N5CoiJzN.js +110 -0
- package/dist-web/assets/{EChartWordcloud-B_YisOW5.js → EChartWordcloud-Clg60FMo.js} +1 -1
- package/dist-web/assets/Filter-B7cNFtuE.js +1 -0
- package/dist-web/assets/LoadingState.vue_vue_type_script_setup_true_lang-D_dJuLWJ.js +1 -0
- package/dist-web/assets/MessageExportModal-B2Qm6VVj.js +1 -0
- package/dist-web/assets/PageHeader-Bbn87QZS.css +1 -0
- package/dist-web/assets/PageHeader-PjlWy9fC.js +1 -0
- package/dist-web/assets/RelationshipGalaxyCanvas-11MafciW.js +244 -0
- package/dist-web/assets/RelationshipGalaxyThreeCanvas-BluPHjCR.css +1 -0
- package/dist-web/assets/RelationshipGalaxyThreeCanvas-C1I4B8NX.js +4108 -0
- package/dist-web/assets/RenderTargetSystem-Chkz1WlI.js +184 -0
- package/dist-web/assets/WebGLRenderer-xK19ru58.js +156 -0
- package/dist-web/assets/WebGPURenderer-CL5ZaKsn.js +41 -0
- package/dist-web/assets/browserAll-CyyNzRD_.js +14 -0
- package/dist-web/assets/electron-MXaTKaMu.js +1 -0
- package/dist-web/assets/{fetch-29ZBtGV0.js → fetch-D1dDiFO4.js} +1 -1
- package/dist-web/assets/{fetch-TCeykOkO.js → fetch-DDnVXGte.js} +1 -1
- package/dist-web/assets/{fetch-Bh1fo3Df.js → fetch-DTwdRTXM.js} +1 -1
- package/dist-web/assets/{fetch-BcxrU2mr.js → fetch-DaaJwT-5.js} +1 -1
- package/dist-web/assets/{fetch-tIIVdXSv.js → fetch-DeA0ztwT.js} +1 -1
- package/dist-web/assets/fetch-DpnIGZSN.js +17 -0
- package/dist-web/assets/{fetch-C3yhWO2S.js → fetch-DsE-xcP2.js} +1 -1
- package/dist-web/assets/{fetch-BYczbT4C.js → fetch-DsTgYu_X.js} +1 -1
- package/dist-web/assets/fetch-hKE53UO4.js +1 -0
- package/dist-web/assets/fetch-u9GTMhMF.js +1 -0
- package/dist-web/assets/index---rXG1hZ.css +1 -0
- package/dist-web/assets/index-BVkE4qis.js +22 -0
- package/dist-web/assets/index-BcXLcFnV.css +1 -0
- package/dist-web/assets/index-BnHKyESZ.js +1 -0
- package/dist-web/assets/index-Btr5H7d-.js +2 -0
- package/dist-web/assets/{index-BX3tqfLz.css → index-C1p9CbmN.css} +1 -1
- package/dist-web/assets/index-COpza1A4.css +1 -0
- package/dist-web/assets/index-D04LWJop.js +173 -0
- package/dist-web/assets/index-DFCYmzGE.js +2 -0
- package/dist-web/assets/index-DosG7LmJ.css +1 -0
- package/dist-web/assets/index-DqXHRIhI.js +1 -0
- package/dist-web/assets/{index-fbWrQpgH.js → index-DqtXt3wl.js} +1 -1
- package/dist-web/assets/index-Dszv-QFp.js +64 -0
- package/dist-web/assets/index-DzLrWGXu.js +1 -0
- package/dist-web/assets/people-page-header-Mupn-U_b.js +1 -0
- package/dist-web/assets/relationship-galaxy-viewport-Cwfa51ER.js +1 -0
- package/dist-web/assets/{vendor-echarts-CITQeskI.js → vendor-echarts-hJVnODyU.js} +2 -2
- package/dist-web/assets/{vendor-echarts-wordcloud-B1kQMklB.js → vendor-echarts-wordcloud-k5ih2Jl4.js} +1 -1
- package/dist-web/assets/{vendor-nuxt-ui-Zy8txNdC.js → vendor-nuxt-ui-DaLxYaC4.js} +2 -2
- package/dist-web/assets/{vendor-reka-ui-mMvma1EP.js → vendor-reka-ui-CzM4kDQ7.js} +1 -1
- package/dist-web/assets/{vendor-zrender-DFl4U2Oe.js → vendor-zrender-5DcYjSZk.js} +1 -1
- package/dist-web/assets/{web-H3XLx159.js → web-DPVWfPS-.js} +1 -1
- package/dist-web/assets/webworkerAll-DF5QV_vN.js +83 -0
- package/dist-web/index.html +4 -4
- package/package.json +1 -1
- package/dist/chunk-3QBVO4J7.mjs.map +0 -1
- package/dist/chunk-AB6TAXTQ.mjs.map +0 -1
- package/dist/chunk-GHTGFM6O.mjs +0 -540
- package/dist/chunk-GHTGFM6O.mjs.map +0 -1
- package/dist/chunk-YBS3YQB6.mjs.map +0 -1
- package/dist/chunk-ZVDOFWL7.mjs.map +0 -1
- package/dist-web/assets/DebugToolsPanel-DFw6_G5V.css +0 -1
- package/dist-web/assets/DebugToolsPanel.vue_vue_type_script_setup_true_lang-Do3x4aL3.js +0 -110
- package/dist-web/assets/MessageExportModal-rijqUusq.js +0 -1
- package/dist-web/assets/electron-DWDCqx_d.js +0 -1
- package/dist-web/assets/fetch-BAxKmbKF.js +0 -1
- package/dist-web/assets/fetch-Da_TBxrX.js +0 -1
- package/dist-web/assets/fetch-DyD8wDhb.js +0 -17
- package/dist-web/assets/index-BzjLqlW_.js +0 -173
- package/dist-web/assets/index-C74qEDFh.js +0 -64
- package/dist-web/assets/index-CM6xNPFp.css +0 -1
- package/dist-web/assets/index-CgK2LLIF.js +0 -12
- package/dist-web/assets/index-CjkOvM3N.js +0 -2
- package/dist-web/assets/index-Dno7CADA.js +0 -1
- package/dist-web/assets/index-I3SWZjnW.css +0 -1
- /package/dist/{chunk-NJB2NNB2.mjs.map → chunk-RDR6PS2R.mjs.map} +0 -0
- /package/dist/{http-MBILV37U.mjs.map → http-UWRA5FLB.mjs.map} +0 -0
- /package/dist/{import-EYV3GXHE.mjs.map → import-745KQL7N.mjs.map} +0 -0
- /package/dist/{src-36ZIR65K.mjs.map → src-Y7MDRXLJ.mjs.map} +0 -0
- /package/dist/{stream-import-YZMZ56B5.mjs.map → stream-import-3JMXQD7P.mjs.map} +0 -0
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/EChartWordcloud-B_YisOW5.js","assets/vendor-echarts-wordcloud-B1kQMklB.js","assets/vendor-echarts-CITQeskI.js","assets/vendor-zrender-DFl4U2Oe.js","assets/vendor-reka-ui-mMvma1EP.js","assets/MessageExportModal-rijqUusq.js","assets/vendor-nuxt-ui-Zy8txNdC.js","assets/index-CgK2LLIF.js","assets/vendor-snapdom-XnBoh1gd.js","assets/index-CM6xNPFp.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as He}from"./vendor-snapdom-XnBoh1gd.js";import{k as tt,g as ge,b as ce,l as at,a as Me,j as Be,c as st,e as We,_ as ot,n as nt,D as lt,u as it,d as rt}from"./vendor-nuxt-ui-Zy8txNdC.js";import{b as I,d as fe,F as Te,p as B,G as o,P as k,Q as J,a5 as t,Z as W,a3 as ee,T as c,O as Oe,J as ct,H as C,a0 as pe,h as $,w as O,m as ut,u as e,K as M,L as y,U as D,R as K,bI as je,a9 as Ee,bJ as dt,au as Pe,E as mt,bF as qe,n as Ce,bD as Ve,i as Ne}from"./vendor-reka-ui-mMvma1EP.js";import{p as vt,u as te,k as Re,T as ie,j as Z,q as ht,r as Ge,_ as Le,t as pt,e as gt,b as ft,s as yt}from"./index-CgK2LLIF.js";import{_ as ae,a as E,g as Ye,b as xt,c as oe,d as le,e as bt,f as Se,h as kt,i as Ae,j as _t,u as wt,k as $t,l as Ct,m as It,n as St,o as Mt,p as Tt,q as Vt,r as Rt,s as Lt,t as Dt,v as Nt,w as At,x as zt,y as Ut,z as Ft,A as Ht,C as Bt,B as Wt,D as Ot,E as jt,F as Et}from"./DebugToolsPanel.vue_vue_type_script_setup_true_lang-Do3x4aL3.js";import"./vendor-echarts-wordcloud-B1kQMklB.js";import{u as Ke,i as Pt,j as Je,k as qt,m as Qe,n as Ze,o as Gt,p as Yt,q as Kt}from"./vendor-echarts-CITQeskI.js";import{a as ze}from"./index-fbWrQpgH.js";import"./vendor-zrender-DFl4U2Oe.js";function Jt(u,s={}){const{threshold:a=300,containerSelector:n=".overflow-y-auto",scrollLockDuration:m=800}=s,l=I(u[0]?.id||"");let d=!1;const p=I(null);let h=null;function b(){if(d)return;const r=[];u.forEach(f=>{const w=document.getElementById(f.id);if(w){const g=w.getBoundingClientRect();r.push({id:f.id,top:Math.round(g.top)})}});let i=0;for(let f=0;f<r.length;f++){if(r[f].top>a){i=Math.max(0,f-1);break}i=f}l.value=u[i]?.id||""}function x(r){const i=document.getElementById(r);i&&(l.value=r,d=!0,i.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{d=!1,b()},m))}return fe(()=>{h=p.value?.closest(n)||null,h&&(h.addEventListener("scroll",b,{passive:!0}),b())}),Te(()=>{h&&h.removeEventListener("scroll",b)}),{contentRef:p,activeAnchor:l,scrollToAnchor:x,updateActiveAnchor:b}}const Qt={class:"sticky top-24 space-y-6"},Zt={class:"border-l border-gray-200 dark:border-gray-800"},Xt=["onClick"],ea=B({__name:"PageAnchorsNav",props:{anchors:{},activeAnchor:{},width:{default:"w-44"},hideOnMobile:{type:Boolean,default:!0}},emits:["click"],setup(u,{emit:s}){const a=s;function n(m){a("click",m)}return(m,l)=>(o(),k("div",{class:J([u.width,"shrink-0",u.hideOnMobile?"hidden lg:block":""])},[t("div",Qt,[t("nav",null,[t("div",Zt,[(o(!0),k(W,null,ee(u.anchors,d=>(o(),k("button",{key:d.id,class:J(["-ml-px block border-l-2 py-1.5 pl-4 text-left text-sm transition-colors",[u.activeAnchor===d.id?"border-pink-500 font-medium text-pink-600 dark:text-pink-400":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"]]),onClick:p=>n(d.id)},c(d.label),11,Xt))),128))])]),Oe(m.$slots,"default")])],2))}}),re=B({__name:"TopNSelect",props:{modelValue:{default:10},modelModifiers:{}},emits:["update:modelValue"],setup(u){const s=ct(u,"modelValue"),a=[{label:"Top 5",value:5},{label:"Top 10",value:10},{label:"Top 20",value:20},{label:"Top 30",value:30},{label:"Top 50",value:50},{label:"Top 100",value:100}];return(n,m)=>{const l=tt;return o(),C(l,{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=d=>s.value=d),items:a,"value-key":"value",class:"w-25"},null,8,["modelValue"])}}}),de=B({__name:"ScrollableChart",props:{contentHeight:{},maxHeightVh:{default:60},paddingClass:{default:"px-3 py-2"}},setup(u){const s=u,a=$(()=>typeof window>"u"?500:Math.round(window.innerHeight*s.maxHeightVh/100)),n=$(()=>s.contentHeight>a.value),m=$(()=>({maxHeight:`${s.maxHeightVh}vh`,overflowY:n.value?"auto":"hidden"}));return(l,d)=>(o(),k("div",{class:J(u.paddingClass),style:pe(m.value)},[Oe(l.$slots,"default")],6))}}),ta=B({__name:"EChartGraph",props:{data:{},height:{default:400},layout:{default:"circular"},directed:{type:Boolean,default:!1}},setup(u,{expose:s}){Ke([Pt,Je,qt,Qe]);const a=u,n=$(()=>typeof a.height=="number"?`${a.height}px`:a.height),m=vt(),l=I(null);let d=null;const p=["#ee4567","#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#9a60b4","#fc8452","#3ba272","#ea7ccc","#6e7074","#546570"],h=$(()=>{const v=new Set;return a.data.nodes.filter(_=>v.has(_.name)?!1:(v.add(_.name),!0))}),b=$(()=>{const v=new Map;return h.value.forEach((_,S)=>{v.set(_.name,p[S%p.length])}),v});function x(v,_){return _<=0?1:1+v/_*5}const r=$(()=>{const v=a.data.maxLinkValue||Math.max(...a.data.links.map(_=>_.value||1),1);return{tooltip:{trigger:"item",backgroundColor:m.value?"rgba(30, 30, 30, 0.9)":"rgba(255, 255, 255, 0.95)",borderColor:m.value?"rgba(255, 255, 255, 0.1)":"rgba(0, 0, 0, 0.1)",textStyle:{color:m.value?"#e5e7eb":"#374151"},formatter:_=>_.dataType==="node"?`<b>${_.data.name}</b><br/>消息数: ${_.data.value||0}`:_.dataType==="edge"?`${_.data.source} → ${_.data.target}<br/>艾特次数: ${_.data.value||0}`:""},animationDuration:1e3,animationDurationUpdate:500,animationEasingUpdate:"quinticInOut",series:[{type:"graph",layout:a.layout,circular:a.layout==="circular"?{rotateLabel:!0}:void 0,force:a.layout==="force"?{repulsion:300,gravity:.1,edgeLength:[80,200],friction:.6}:void 0,roam:!0,scaleLimit:{min:.3,max:3},draggable:!0,label:{show:!0,position:"right",formatter:"{b}",color:m.value?"#e5e7eb":"#374151",fontSize:11,fontWeight:500},edgeSymbol:a.directed?["none","arrow"]:["none","none"],edgeSymbolSize:a.directed?[0,10]:[0,0],lineStyle:{curveness:.3,opacity:.5},emphasis:{focus:"adjacency",label:{show:!0,fontSize:13,fontWeight:600},lineStyle:{width:4,opacity:.9},itemStyle:{shadowBlur:15,shadowColor:"rgba(0, 0, 0, 0.3)"}},data:h.value.map(_=>{const S=b.value.get(_.name)||p[0];return{name:_.name,value:_.value,symbolSize:_.symbolSize||30,label:{show:a.layout==="circular"?!0:(_.symbolSize||30)>30},itemStyle:{color:S,borderColor:"#fff",borderWidth:2,shadowBlur:5,shadowColor:`${S}66`}}}),links:a.data.links.filter(_=>b.value.has(_.source)&&b.value.has(_.target)).map(_=>{const S=b.value.get(_.source)||p[0];return{source:_.source,target:_.target,value:_.value,lineStyle:{color:S,width:x(_.value||1,v)}}})}]}});function i(){l.value&&(d=Ze(l.value,m.value?"dark":void 0,{renderer:"canvas"}),d.setOption({backgroundColor:"transparent",...r.value}))}function f(){d&&d.setOption({backgroundColor:"transparent",...r.value},{notMerge:!0})}function w(){d?.resize()}function g(){d&&d.dispatchAction({type:"restore"})}return s({resetView:g}),O([()=>a.data,()=>a.layout,()=>a.directed,m],()=>{d?f():i()},{deep:!0}),fe(()=>{i(),window.addEventListener("resize",w)}),Te(()=>{window.removeEventListener("resize",w),d?.dispose()}),(v,_)=>(o(),k("div",{ref_key:"chartRef",ref:l,style:pe({height:n.value,width:"100%"})},null,4))}}),Xe=Symbol("ranking-width-mode"),et={standard:{contentClass:"max-w-3xl",gridLeft:110,labelMaxLength:8},wide:{contentClass:"max-w-5xl",gridLeft:180,labelMaxLength:16},full:{contentClass:"max-w-none",gridLeft:260,labelMaxLength:28}};function me(){const u=ut(Xe,null);return $(()=>et[u?.value??"standard"])}function ve(u,s){return u.length<=s?u:`${u.slice(0,s)}…`}const aa={class:"px-3 py-2"},be=B({__name:"EChartRank",props:{members:{},title:{},description:{},topN:{default:10},unit:{default:"条"},height:{default:"auto"},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(u){const s=u,a=me(),n=$(()=>s.members.slice(0,s.topN)),m=$(()=>{if(s.height!=="auto")return s.height;const p=n.value.length*36;return Math.max(p+30,180)}),l={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]},d=$(()=>{const p=[...n.value].reverse(),h=p.map(i=>ve(i.name,a.value.labelMaxLength)),b=p.map(i=>i.value),x=Math.max(...b,1),r=p.map(i=>({value:i.value,itemStyle:{color:l,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"transparent",textStyle:{color:"#fff"},formatter:i=>{const f=i[0];if(!f)return"";const w=n.value.length-1-f.dataIndex,g=n.value[w];return`
|
|
3
|
-
<div style="padding: 4px 8px;">
|
|
4
|
-
<div style="font-weight: bold; margin-bottom: 4px;">${g.name}</div>
|
|
5
|
-
<div>${g.value} ${s.unit} (${g.percentage}%)</div>
|
|
6
|
-
</div>
|
|
7
|
-
`}},grid:{left:a.value.gridLeft,right:70,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:x*1.1,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:h,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(i,f)=>{const g=n.value.length-1-f+1;return`${g===1?"🥇":g===2?"🥈":g===3?"🥉":`${g}.`} ${i}`}}},series:[{type:"bar",data:r,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:i=>{const f=n.value.length-1-i.dataIndex;return`${n.value[f].value} ${s.unit}`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(238, 69, 103, 0.3)"}}}]}});return(p,h)=>u.bare?(o(),C(e(de),{key:0,"content-height":m.value,"max-height-vh":u.maxHeightVh},{default:M(()=>[y(ae,{option:d.value,height:m.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(E),{key:1,title:u.title,description:u.description,scrollable:"","max-height-vh":u.maxHeightVh},{default:M(()=>[t("div",aa,[y(ae,{option:d.value,height:m.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),sa={class:"divide-y divide-gray-100 dark:divide-gray-800"},oa={key:0,class:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-linear-to-br from-pink-100 to-rose-100 text-sm font-medium text-pink-600 dark:from-pink-900/30 dark:to-rose-900/30 dark:text-pink-400"},na={class:"w-32 shrink-0"},la={class:"wrap-break-word font-medium text-gray-900 dark:text-white"},ia={class:"flex flex-1 items-center"},ra={class:"h-2 w-full overflow-hidden rounded-full bg-gray-100 dark:bg-gray-800"},ca={class:"flex shrink-0 items-baseline gap-2 whitespace-nowrap"},ua={class:"text-lg font-bold text-gray-900 dark:text-white"},da={class:"text-sm text-gray-500"},Ue=B({__name:"RankList",props:{members:{},showAvatar:{type:Boolean,default:!1},rankLimit:{default:0},unit:{}},setup(u){const{t:s}=te(),a=u,n=$(()=>a.unit||s("views.charts.rankList.unit")),m=$(()=>a.rankLimit>0?a.members.slice(0,a.rankLimit):a.members);function l(d){if(m.value.length===0)return 0;const p=m.value[0].value;return p===0?0:Math.round(m.value[d].value/p*100)}return(d,p)=>(o(),k("div",sa,[(o(!0),k(W,null,ee(m.value,(h,b)=>(o(),k("div",{key:h.id,class:"flex items-center gap-3 px-5 py-3 transition-colors hover:bg-gray-50 dark:hover:bg-gray-800/50"},[t("div",{class:J(["flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-sm font-bold",e(Ye)(b)])},c(b+1),3),u.showAvatar?(o(),k("div",oa,c(h.name.slice(0,1)),1)):D("",!0),t("div",na,[t("p",la,c(h.name),1)]),t("div",ia,[t("div",ra,[t("div",{class:J(["h-full rounded-full bg-linear-to-r transition-all",e(xt)(b)]),style:pe({width:`${l(b)}%`})},null,6)])]),t("div",ca,[t("span",ua,c(h.value),1),t("span",da,c(n.value)+" ("+c(h.percentage)+"%)",1)])]))),128))]))}}),ma={class:"flex items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-800"},va={class:"font-semibold text-gray-900 whitespace-nowrap dark:text-white"},ha={key:0,class:"mt-1 text-sm text-gray-500 dark:text-gray-400"},pa={class:"no-capture flex items-center gap-1"},ga={class:"flex w-full items-center justify-between border-b border-gray-200 px-6 py-4 dark:border-gray-700"},fa={class:"flex items-center gap-2"},ya={class:"text-lg font-semibold text-gray-900 whitespace-nowrap dark:text-white"},xa={class:"text-sm text-gray-500"},ba={class:"max-h-[60vh] p-4 overflow-y-auto"},Fe=B({__name:"RankListPro",props:{members:{},title:{},description:{},topN:{default:10},unit:{}},setup(u){const{t:s}=te(),a=u,n=I(!1),m=I(null),l=I(null),d=$(()=>a.members.slice(0,a.topN)),p=$(()=>a.members.length>a.topN);return(h,b)=>{const x=ce,r=ge;return o(),k("div",{ref_key:"cardRef",ref:m,class:"rounded-xl border border-gray-200 bg-white shadow-sm dark:border-gray-800 dark:bg-gray-900"},[t("div",ma,[t("div",null,[t("h3",va,c(u.title),1),u.description?(o(),k("p",ha,c(u.description),1)):D("",!0)]),t("div",pa,[y(ze,{size:"xs",type:"element","target-element":m.value},null,8,["target-element"]),y(r,{open:n.value,"onUpdate:open":b[0]||(b[0]=i=>n.value=i),ui:{content:"md:w-full max-w-3xl"}},{content:M(()=>[t("div",{ref_key:"modalBodyRef",ref:l,class:"section-content flex flex-col"},[t("div",ga,[t("div",fa,[t("h3",ya,c(u.title),1),t("span",xa," ("+c(e(s)("views.charts.rankListPro.memberCount",{count:u.members.length}))+") ",1)]),y(ze,{size:"xs",type:"element","target-element":l.value},null,8,["target-element"])]),t("div",ba,[y(Ue,{members:u.members,unit:u.unit},null,8,["members","unit"])])],512)]),default:M(()=>[p.value?(o(),C(x,{key:0,icon:"i-heroicons-list-bullet",variant:"ghost"},{default:M(()=>[K(c(e(s)("views.charts.rankListPro.fullRanking")),1)]),_:1})):D("",!0)]),_:1},8,["open"])])]),y(Ue,{members:d.value,unit:u.unit},null,8,["members","unit"])],512)}}}),ka={class:"main-content mx-auto max-w-6xl py-6"},_a={class:"mb-4 flex items-center justify-end gap-4"},wa={class:"text-xs text-gray-500 dark:text-gray-400"},$a={key:0,class:"grid grid-cols-2 gap-6"},Ca={class:"mb-3 text-center"},Ia={class:"text-base font-semibold text-gray-900 dark:text-white"},Sa={class:"flex flex-wrap gap-2"},Ma=["title","onClick"],Ta={class:"text-xs opacity-50"},Va={key:1,class:"grid grid-cols-2 gap-6"},Ra={class:"mb-3 text-center"},La={class:"text-base font-semibold text-gray-900 dark:text-white"},Da={class:"relative w-full",style:{"aspect-ratio":"4 / 3"}},Na={class:"mt-4 text-center text-xs text-gray-500 dark:text-gray-400"},Aa=B({__name:"CatchphraseTab",props:{sessionId:{},timeFilter:{}},setup(u){const s=je(()=>He(()=>import("./EChartWordcloud-B_YisOW5.js"),__vite__mapDeps([0,1,2,3,4]))),{t:a}=te(),n=Re(),m=u,l=I(null),d=I(!1),p=I("list"),h=I(30),b=$(()=>[{label:a("quotes.catchphrase.viewMode.list"),value:"list"},{label:a("quotes.catchphrase.viewMode.wordcloud"),value:"wordcloud"}]),x=[{label:"10",value:10},{label:"30",value:30},{label:"50",value:50},{label:"100",value:100}],r=$(()=>l.value&&l.value.members.length>0),i=$(()=>{if(!l.value)return[];const T=h.value;return console.log("[CatchphraseTab] displayMembers recompute, topN:",T,"type:",typeof T),l.value.members.map(z=>{const P=z.catchphrases.slice(0,T);return console.log("[CatchphraseTab]",z.name,"total:",z.catchphrases.length,"display:",P.length),{...z,catchphrases:P}})}),f=$(()=>i.value.map(T=>({name:T.name,data:{words:T.catchphrases.map(z=>({word:z.content,count:z.count}))}}))),w=[{bg:"bg-amber-50 dark:bg-amber-900/20",text:"text-amber-700 dark:text-amber-400",badge:"bg-amber-100 dark:bg-amber-800/40 text-amber-600 dark:text-amber-300"},{bg:"bg-slate-50 dark:bg-slate-800/40",text:"text-slate-600 dark:text-slate-300",badge:"bg-slate-100 dark:bg-slate-700/60 text-slate-500 dark:text-slate-400"},{bg:"bg-orange-50 dark:bg-orange-900/15",text:"text-orange-600 dark:text-orange-400",badge:"bg-orange-100 dark:bg-orange-800/30 text-orange-500 dark:text-orange-300"}];function g(T){return T<w.length?w[T]:{bg:"bg-gray-50 dark:bg-gray-800/30",text:"text-gray-600 dark:text-gray-400",badge:"bg-gray-100 dark:bg-gray-700/40 text-gray-500 dark:text-gray-400"}}function v(T,z=20){return T.length<=z?T:T.slice(0,z)+"..."}async function _(){if(m.sessionId){d.value=!0;try{l.value=await Z().getCatchphraseAnalysis(m.sessionId,m.timeFilter),console.log("[CatchphraseTab] API result: members:",l.value?.members.length,"per-member catchphrases:",l.value?.members.map(T=>({name:T.name,count:T.catchphrases.length})))}catch(T){console.error("Failed to load catchphrase analysis:",T)}finally{d.value=!1}}}function S(T){n.openChatRecordDrawer({keywords:[T]})}return O(h,(T,z)=>{console.log("[CatchphraseTab] topN changed:",z,"->",T,"type:",typeof T)}),O(()=>[m.sessionId,m.timeFilter],()=>{_()},{immediate:!0,deep:!0}),(T,z)=>(o(),k("div",ka,[d.value?(o(),C(e(oe),{key:0,text:e(a)("quotes.catchphrase.loading")},null,8,["text"])):r.value?(o(),k(W,{key:2},[t("div",_a,[t("span",wa,c(e(a)("quotes.catchphrase.topN")),1),y(e(ie),{modelValue:h.value,"onUpdate:modelValue":z[0]||(z[0]=P=>h.value=P),size:"xs",items:x},null,8,["modelValue"]),z[2]||(z[2]=t("div",{class:"h-4 w-px bg-gray-200 dark:bg-gray-700"},null,-1)),y(e(ie),{modelValue:p.value,"onUpdate:modelValue":z[1]||(z[1]=P=>p.value=P),size:"xs",items:b.value},null,8,["modelValue","items"])]),p.value==="list"?(o(),k("div",$a,[(o(!0),k(W,null,ee(i.value,P=>(o(),k("div",{key:P.memberId},[t("div",Ca,[t("span",Ia,c(P.name),1)]),t("div",Sa,[(o(!0),k(W,null,ee(P.catchphrases,(V,N)=>(o(),k("div",{key:N,class:J(["inline-flex cursor-pointer items-center gap-1.5 rounded-full px-3 py-1.5 transition-opacity hover:opacity-75",g(N).bg]),title:V.content,onClick:U=>S(V.content)},[N<3?(o(),k("span",{key:0,class:J(["flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-[10px] font-bold",g(N).badge])},c(N+1),3)):D("",!0),t("span",{class:J(["text-sm font-medium",g(N).text])},c(v(V.content)),3),t("span",Ta,c(e(a)("quotes.catchphrase.times",{count:V.count})),1)],10,Ma))),128))])]))),128))])):(o(),k("div",Va,[(o(!0),k(W,null,ee(f.value,P=>(o(),k("div",{key:P.name},[t("div",Ra,[t("span",La,c(P.name),1)]),t("div",Da,[P.data.words.length===0?(o(),C(e(le),{key:0,text:e(a)("quotes.catchphrase.empty.title"),class:"h-full"},null,8,["text"])):(o(),C(e(s),{key:1,data:P.data,height:"100%","max-words":h.value,"color-scheme":"default","size-scale":1,loading:d.value,onWordClick:S},null,8,["data","max-words","loading"]))])]))),128))])),t("p",Na,c(e(a)("quotes.catchphrase.stats.clickHint")),1)],64)):(o(),C(e(le),{key:1,text:e(a)("quotes.catchphrase.empty.title")},null,8,["text"]))]))}}),za={class:"main-content mx-auto max-w-3xl p-6"},Ua={class:"flex items-center gap-3"},Fa={class:"shrink-0 text-lg font-bold text-pink-600"},Ha={class:"flex flex-1 items-center gap-1 overflow-hidden text-sm"},Ba={class:"shrink-0 font-medium text-gray-900 dark:text-white whitespace-nowrap"},Wa=["title"],Oa={class:"flex shrink-0 items-center gap-2 text-xs text-gray-500"},ja=B({__name:"HotRepeatTab",props:{sessionId:{},timeFilter:{}},setup(u){const{t:s}=te(),a=u,n=Re(),m=I(null),l=I(!1);async function d(){if(a.sessionId){l.value=!0;try{m.value=await Z().getRepeatAnalysis(a.sessionId,a.timeFilter)}catch(b){console.error("Failed to load repeat analysis:",b)}finally{l.value=!1}}}function p(b,x=30){return b.length<=x?b:b.slice(0,x)+"..."}function h(b){n.openChatRecordDrawer({scrollToMessageId:b.firstMessageId,highlightKeywords:[b.content]})}return O(()=>[a.sessionId,a.timeFilter],()=>{d()},{immediate:!0,deep:!0}),(b,x)=>{const r=ce;return o(),k("div",za,[l.value?(o(),C(e(oe),{key:0,text:e(s)("quotes.hotRepeat.loading")},null,8,["text"])):m.value&&m.value.hotContents.length>0?(o(),C(e(bt),{key:1,items:m.value.hotContents,title:e(s)("quotes.hotRepeat.title"),description:e(s)("quotes.hotRepeat.description"),"top-n":50,"count-template":e(s)("quotes.hotRepeat.countTemplate")},{item:M(({item:i,index:f})=>[t("div",Ua,[t("span",{class:J(["flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-bold",e(Ye)(f)])},c(f+1),3),t("span",Fa,c(e(s)("quotes.hotRepeat.people",{count:i.maxChainLength})),1),t("div",Ha,[t("span",Ba,c(i.originatorName)+c(e(s)("quotes.hotRepeat.colon")),1),t("span",{class:"truncate text-gray-600 dark:text-gray-400",title:i.content},c(p(i.content)),9,Wa)]),t("div",Oa,[t("span",null,c(e(s)("quotes.hotRepeat.times",{count:i.count})),1),x[0]||(x[0]=t("span",{class:"text-gray-300 dark:text-gray-600"},"|",-1)),t("span",null,c(e(Se)(i.lastTs)),1),y(r,{icon:"i-heroicons-chat-bubble-left-right",color:"neutral",variant:"ghost",size:"xs",title:e(s)("quotes.hotRepeat.viewChat"),onClick:Ee(w=>h(i),["stop"])},null,8,["title","onClick"])])])]),_:1},8,["items","title","description","count-template"])):(o(),C(e(E),{key:2,title:e(s)("quotes.hotRepeat.title")},{default:M(()=>[y(e(le),{text:e(s)("quotes.hotRepeat.empty")},null,8,["text"])]),_:1},8,["title"]))])}}}),Ea={class:"main-content mx-auto max-w-[920px] space-y-6 p-6"},Pa={class:"grid grid-cols-1 gap-6 lg:grid-cols-2"},qa={class:"p-5"},Ga={class:"p-5"},Ya=B({__name:"OverviewTab",props:{session:{},memberActivity:{},topMembers:{},bottomMembers:{},messageTypes:{},hourlyActivity:{},dailyActivity:{},timeRange:{},selectedYear:{},filteredMessageCount:{},filteredMemberCount:{},timeFilter:{}},setup(u){const{t:s}=te(),a=u,{dailyChartData:n}=wt(()=>a.dailyActivity),m=$(()=>({labels:a.messageTypes.map(d=>$t(d.type,s)),values:a.messageTypes.map(d=>d.count)})),l=$(()=>{const d=[...a.memberActivity].sort((r,i)=>i.messageCount-r.messageCount),p=d.slice(0,10),h=d.slice(10).reduce((r,i)=>r+i.messageCount,0),b=p.map(r=>r.name),x=p.map(r=>r.messageCount);return h>0&&(b.push(s("analysis.overview.others")),x.push(h)),{labels:b,values:x}});return(d,p)=>(o(),k("div",Ea,[y(kt,{session:u.session,"daily-activity":u.dailyActivity,"message-types":u.messageTypes,"hourly-activity":u.hourlyActivity,"time-range":u.timeRange,"selected-year":u.selectedYear,"filtered-message-count":u.filteredMessageCount,"time-filter":u.timeFilter},null,8,["session","daily-activity","message-types","hourly-activity","time-range","selected-year","filtered-message-count","time-filter"]),t("div",Pa,[y(e(E),{title:e(s)("analysis.overview.messageTypeDistribution"),"show-divider":!1},{default:M(()=>[t("div",qa,[y(e(Ae),{data:m.value,height:280},null,8,["data"])])]),_:1},8,["title"]),y(e(E),{title:e(s)("analysis.overview.memberDistribution"),"show-divider":!1},{default:M(()=>[t("div",Ga,[y(e(Ae),{data:l.value,height:280},null,8,["data"])])]),_:1},8,["title"])]),y(_t,{"daily-activity":u.dailyActivity,"daily-chart-data":e(n)},null,8,["daily-activity","daily-chart-data"])]))}}),Ka={class:"flex items-center gap-3"},Ja={key:1,class:"py-8 text-center text-sm text-gray-400"},Qa=B({__name:"ActivityRank",props:{sessionId:{},memberActivity:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(u){const s=u,a=I(null),n=I(null),m=I(!1),l=I("activity"),d=I(s.globalTopN??10);O(()=>s.globalTopN,g=>{g!==void 0&&(d.value=g)});async function p(){if(s.sessionId){m.value=!0;try{const g=Z(),[v,_]=await Promise.all([g.getDragonKingAnalysis(s.sessionId,s.timeFilter),g.getCheckInAnalysis(s.sessionId,s.timeFilter)]);a.value=v,n.value=_}catch(g){console.error("加载活跃数据失败:",g)}finally{m.value=!1}}}const h=$(()=>s.memberActivity.map(g=>({id:g.memberId.toString(),name:g.name,value:g.messageCount,percentage:g.percentage}))),b=$(()=>a.value?a.value.rank.map(g=>({id:g.memberId.toString(),name:g.name,value:g.count,percentage:g.percentage})):[]),x=$(()=>n.value?n.value.loyaltyRank.map(g=>({id:g.memberId.toString(),name:g.name,value:g.totalDays,percentage:g.percentage})):[]),r=$(()=>{switch(l.value){case"activity":return h.value;case"dragon":return b.value;case"loyalty":return x.value;default:return h.value}}),i=$(()=>{switch(l.value){case"activity":return"条";case"dragon":case"loyalty":return"天";default:return"条"}}),f=$(()=>{switch(l.value){case"activity":return"🏆 活跃榜 - 发言数量";case"dragon":return"🏆 活跃榜 - 龙王";case"loyalty":return"🏆 活跃榜 - 累计发言";default:return"🏆 活跃榜"}}),w=$(()=>{switch(l.value){case"activity":return"按消息发送数量排名";case"dragon":return`每天发言最多的人+1(共 ${a.value?.totalDays??0} 天)`;case"loyalty":return`累计发言天数排名(共 ${n.value?.totalDays??0} 天)`;default:return""}});return O(()=>[s.sessionId,s.timeFilter],()=>p(),{immediate:!0,deep:!0}),(g,v)=>(o(),C(e(E),{title:f.value,description:w.value},{headerRight:M(()=>[t("div",Ka,[u.showTopNSelect?(o(),C(e(re),{key:0,modelValue:d.value,"onUpdate:modelValue":v[0]||(v[0]=_=>d.value=_)},null,8,["modelValue"])):D("",!0),y(e(ie),{modelValue:l.value,"onUpdate:modelValue":v[1]||(v[1]=_=>l.value=_),items:[{label:"发言数量",value:"activity"},{label:"龙王",value:"dragon"},{label:"累计发言",value:"loyalty"}],size:"sm"},null,8,["modelValue"])])]),default:M(()=>[m.value&&(l.value==="dragon"||l.value==="loyalty")?(o(),C(e(oe),{key:0,text:"正在加载数据..."})):(o(),k(W,{key:1},[r.value.length>0?(o(),C(e(be),{key:0,members:r.value,title:f.value,unit:i.value,"top-n":d.value,bare:""},null,8,["members","title","unit","top-n"])):(o(),k("div",Ja,"暂无数据"))],64))]),_:1},8,["title","description"]))}}),Za={key:0},Xa={key:0,class:"flex items-center justify-center gap-6 border-t border-gray-100 px-5 py-3 dark:border-gray-800"},es={class:"px-3 py-2"},ts=B({__name:"EChartStreakRank",props:{items:{},title:{},description:{},topN:{default:10},mode:{default:"max"},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(u){const s=u,a=me(),n=$(()=>s.mode==="current"?s.items.filter(x=>x.currentStreak>0).sort((x,r)=>r.currentStreak-x.currentStreak).slice(0,s.topN):s.items.slice(0,s.topN)),m=$(()=>{const x=n.value.length*36;return Math.max(x+30,180)}),l={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]},d={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f97316"},{offset:1,color:"#fb923c"}]};function p(x,r){return`${x} ~ ${r}`}function h(x){return s.mode==="current"?x.currentStreak:x.maxStreak}const b=$(()=>{const x=[...n.value].reverse(),r=x.map(g=>ve(g.name,a.value.labelMaxLength)),i=x.map(g=>h(g)),f=Math.max(...i,1),w=x.map(g=>({value:h(g),itemStyle:{color:s.mode==="current"||g.currentStreak>0?d:l,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"transparent",textStyle:{color:"#fff"},formatter:g=>{const v=g[0];if(!v)return"";const _=n.value.length-1-v.dataIndex,S=n.value[_];if(s.mode==="current")return`
|
|
8
|
-
<div style="padding: 4px 8px;">
|
|
9
|
-
<div style="font-weight: bold; margin-bottom: 6px;">${S.name}</div>
|
|
10
|
-
<div style="color: #fb923c;">🔥 当前连续 <b>${S.currentStreak}</b> 天</div>
|
|
11
|
-
<div style="margin-top: 4px; font-size: 12px; color: #9ca3af;">最长记录: ${S.maxStreak} 天</div>
|
|
12
|
-
</div>
|
|
13
|
-
`;let T=`
|
|
14
|
-
<div style="padding: 4px 8px;">
|
|
15
|
-
<div style="font-weight: bold; margin-bottom: 6px;">${S.name}</div>
|
|
16
|
-
<div style="margin-bottom: 4px;">🔥 最长连续: <b>${S.maxStreak}</b> 天</div>
|
|
17
|
-
<div style="font-size: 12px; color: #9ca3af;">${p(S.maxStreakStart,S.maxStreakEnd)}</div>
|
|
18
|
-
`;return S.currentStreak>0&&(T+=`<div style="margin-top: 6px; color: #fb923c;">🔥 当前连续 ${S.currentStreak} 天</div>`),T+="</div>",T}},grid:{left:a.value.gridLeft,right:70,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:f*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:r,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(g,v)=>{const S=n.value.length-1-v+1;return`${S===1?"🥇":S===2?"🥈":S===3?"🥉":`${S}.`} ${g}`}}},series:[{type:"bar",data:w,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:g=>{const v=n.value.length-1-g.dataIndex,_=n.value[v],S=h(_),T=s.mode==="current"||_.currentStreak>0?" 🔥":"";return`${S} 天${T}`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(249, 115, 22, 0.3)"}}}]}});return(x,r)=>u.bare?(o(),k("div",Za,[y(e(de),{"content-height":m.value,"max-height-vh":u.maxHeightVh},{default:M(()=>[y(e(ae),{option:b.value,height:m.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"]),u.mode==="max"?(o(),k("div",Xa,[...r[0]||(r[0]=[dt('<div class="flex items-center gap-1.5"><div class="h-3 w-6 rounded bg-linear-to-r from-orange-500 to-orange-400"></div><span class="text-xs text-gray-500">当前连续中 🔥</span></div><div class="flex items-center gap-1.5"><div class="h-3 w-6 rounded bg-linear-to-r from-pink-500 to-pink-400"></div><span class="text-xs text-gray-500">已中断</span></div>',2)])])):D("",!0)])):(o(),C(e(E),{key:1,title:u.title,description:u.description,scrollable:"","max-height-vh":u.maxHeightVh},Pe({default:M(()=>[t("div",es,[y(e(ae),{option:b.value,height:m.value},null,8,["option","height"])])]),_:2},[u.mode==="max"?{name:"footer",fn:M(()=>[r[1]||(r[1]=t("div",{class:"flex items-center justify-center gap-6 border-t border-gray-100 px-5 py-3 dark:border-gray-800"},[t("div",{class:"flex items-center gap-1.5"},[t("div",{class:"h-3 w-6 rounded bg-linear-to-r from-orange-500 to-orange-400"}),t("span",{class:"text-xs text-gray-500"},"当前连续中 🔥")]),t("div",{class:"flex items-center gap-1.5"},[t("div",{class:"h-3 w-6 rounded bg-linear-to-r from-pink-500 to-pink-400"}),t("span",{class:"text-xs text-gray-500"},"已中断")])],-1))]),key:"0"}:void 0]),1032,["title","description","max-height-vh"]))}}),as={class:"px-3 py-2"},ss=B({__name:"EChartBattleRank",props:{battles:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(u){const s=u,a=$(()=>s.battles.slice(0,s.topN)),n=$(()=>{const p=a.value.length*36;return Math.max(p+30,180)}),m={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]};function l(p){return`${p.participantCount} 人参战`}const d=$(()=>{const p=[...a.value].reverse(),h=p.map(i=>l(i)),b=p.map(i=>i.totalImages),x=Math.max(...b,1),r=p.map(i=>({value:i.totalImages,itemStyle:{color:m,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.85)",borderColor:"transparent",textStyle:{color:"#fff",fontSize:12},extraCssText:"max-width: 300px;",formatter:i=>{const f=i[0];if(!f)return"";const w=a.value.length-1-f.dataIndex,g=a.value[w],v=g.participants.slice(0,5).map(S=>`<span style="color: #d1d5db;">${S.name}</span> <b>${S.imageCount}</b>张`).join("、"),_=g.participants.length>5?`、+${g.participants.length-5}`:"";return`
|
|
19
|
-
<div style="padding: 6px 8px;">
|
|
20
|
-
<div style="font-weight: bold; margin-bottom: 8px; font-size: 13px;">
|
|
21
|
-
⚔️ ${Se(g.startTime)}
|
|
22
|
-
</div>
|
|
23
|
-
<div style="margin-bottom: 6px;">
|
|
24
|
-
<span style="color: #9ca3af;">参战人数:</span> <b>${g.participantCount}</b> 人
|
|
25
|
-
</div>
|
|
26
|
-
<div style="margin-bottom: 8px;">
|
|
27
|
-
<span style="color: #9ca3af;">总图片数:</span> <b style="color: #f472b6;">${g.totalImages}</b> 张
|
|
28
|
-
</div>
|
|
29
|
-
<div style="border-top: 1px solid #374151; padding-top: 6px; font-size: 11px;">
|
|
30
|
-
${v}${_}
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
`}},grid:{left:95,right:125,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:x*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:h,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:11,color:"#4b5563",margin:12,formatter:(i,f)=>{const g=a.value.length-1-f+1;return`${g===1?"🥇":g===2?"🥈":g===3?"🥉":`${g}.`} ${i}`}}},series:[{type:"bar",data:r,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:i=>{const f=a.value.length-1-i.dataIndex,w=a.value[f],g=Se(w.startTime);return`${w.totalImages} 张 (${g})`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(238, 69, 103, 0.3)"}}}]}});return(p,h)=>u.bare?(o(),C(e(de),{key:0,"content-height":n.value,"max-height-vh":u.maxHeightVh},{default:M(()=>[y(e(ae),{option:d.value,height:n.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(E),{key:1,title:u.title,description:u.description,scrollable:"","max-height-vh":u.maxHeightVh},{default:M(()=>[t("div",as,[y(e(ae),{option:d.value,height:n.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),os={class:"px-3 py-2"},ns=B({__name:"EChartTimeRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(u){const s=u,a=me(),n=$(()=>s.items.slice(0,s.topN)),m=$(()=>{const h=n.value.length*36;return Math.max(h+30,180)}),l={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f59e0b"},{offset:1,color:"#fbbf24"}]};function d(h){return(h/1e3).toFixed(2)+"s"}const p=$(()=>{if(n.value.length===0)return{};const h=[...n.value].reverse(),b=h.map(i=>ve(i.name,a.value.labelMaxLength)),x=n.value[0].avgTimeDiff,r=h.map(i=>({value:Math.round(x/i.avgTimeDiff*100),itemStyle:{color:l,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"transparent",textStyle:{color:"#fff"},formatter:i=>{const f=i[0];if(!f)return"";const w=n.value.length-1-f.dataIndex,g=n.value[w];return`
|
|
34
|
-
<div style="padding: 4px 8px;">
|
|
35
|
-
<div style="font-weight: bold; margin-bottom: 6px;">${g.name}</div>
|
|
36
|
-
<div style="margin-bottom: 4px;">⚡️ 平均反应时间: <b>${d(g.avgTimeDiff)}</b></div>
|
|
37
|
-
<div style="font-size: 12px; color: #9ca3af;">参与复读 ${g.count} 次</div>
|
|
38
|
-
</div>
|
|
39
|
-
`}},grid:{left:a.value.gridLeft,right:100,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:105,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:b,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(i,f)=>{const g=n.value.length-1-f+1;return`${g===1?"🥇":g===2?"🥈":g===3?"🥉":`${g}.`} ${i}`}}},series:[{type:"bar",data:r,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:i=>{const f=n.value.length-1-i.dataIndex,w=n.value[f];return`${d(w.avgTimeDiff)} · ${w.count}次`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(245, 158, 11, 0.3)"}}}]}});return(h,b)=>u.bare?(o(),C(e(de),{key:0,"content-height":m.value,"max-height-vh":u.maxHeightVh},{default:M(()=>[y(e(ae),{option:p.value,height:m.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(E),{key:1,title:u.title,description:u.description,scrollable:"","max-height-vh":u.maxHeightVh},{default:M(()=>[t("div",os,[y(e(ae),{option:p.value,height:m.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),ls={class:"flex items-center gap-3"},is={class:"px-3 py-2"},rs=B({__name:"EChartDivingRank",props:{items:{},showTopNSelect:{type:Boolean,default:!0},maxHeightVh:{default:60},globalTopN:{}},setup(u){const s=u,a=me(),n=I("desc"),m=I(s.globalTopN??10);O(()=>s.globalTopN,i=>{i!==void 0&&(m.value=i)});const l=$(()=>[...s.items].sort((f,w)=>n.value==="desc"?w.daysSinceLastMessage-f.daysSinceLastMessage:f.daysSinceLastMessage-w.daysSinceLastMessage).slice(0,m.value)),d=$(()=>n.value==="desc"?"🤿 潜水榜 - 潜水最久":"🤿 潜水榜 - 最近冒泡"),p=$(()=>n.value==="desc"?"距离上次发言时间最久的成员":"最近发言过的成员"),h=$(()=>{const i=l.value.length*36;return Math.max(i+30,180)}),b={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#06b6d4"},{offset:1,color:"#22d3ee"}]};function x(i){return i===0?"今天":i===1?"昨天":`${i} 天前`}const r=$(()=>{if(l.value.length===0)return{};const i=[...l.value].reverse(),f=i.map(v=>ve(v.name,a.value.labelMaxLength)),w=Math.max(...l.value.map(v=>v.daysSinceLastMessage),1),g=i.map(v=>({value:v.daysSinceLastMessage,itemStyle:{color:b,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"transparent",textStyle:{color:"#fff"},formatter:v=>{const _=v[0];if(!_)return"";const S=l.value.length-1-_.dataIndex,T=l.value[S];return`
|
|
40
|
-
<div style="padding: 4px 8px;">
|
|
41
|
-
<div style="font-weight: bold; margin-bottom: 6px;">${T.name}</div>
|
|
42
|
-
<div style="margin-bottom: 4px;">🤿 ${x(T.daysSinceLastMessage)}</div>
|
|
43
|
-
<div style="font-size: 12px; color: #9ca3af;">最后发言: ${Ct(T.lastMessageTs)}</div>
|
|
44
|
-
</div>
|
|
45
|
-
`}},grid:{left:a.value.gridLeft,right:100,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:w*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:f,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(v,_)=>{const T=l.value.length-1-_+1;return`${T===1?"🥇":T===2?"🥈":T===3?"🥉":`${T}.`} ${v}`}}},series:[{type:"bar",data:g,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:v=>{const _=l.value.length-1-v.dataIndex,S=l.value[_];return x(S.daysSinceLastMessage)},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(0, 0, 0, 0.2)"}}}]}});return(i,f)=>(o(),C(e(E),{title:d.value,description:p.value,scrollable:"","max-height-vh":u.maxHeightVh},{headerRight:M(()=>[t("div",ls,[u.showTopNSelect?(o(),C(e(re),{key:0,modelValue:m.value,"onUpdate:modelValue":f[0]||(f[0]=w=>m.value=w)},null,8,["modelValue"])):D("",!0),y(e(ie),{modelValue:n.value,"onUpdate:modelValue":f[1]||(f[1]=w=>n.value=w),items:[{label:"潜水最久",value:"desc"},{label:"最近冒泡",value:"asc"}],size:"sm"},null,8,["modelValue"])])]),default:M(()=>[t("div",is,[y(e(ae),{option:r.value,height:h.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),cs={class:"px-3 py-2"},us=B({__name:"EChartConsecutiveRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(u){const s=u,a=me(),n=$(()=>[...s.items].sort((h,b)=>b.maxConsecutiveDays-h.maxConsecutiveDays).slice(0,s.topN)),m=$(()=>{const h=n.value.length*36;return Math.max(h+30,180)}),l={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f97316"},{offset:1,color:"#fb923c"}]},d={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ec4899"},{offset:1,color:"#f472b6"}]},p=$(()=>{if(n.value.length===0)return{};const h=[...n.value].reverse(),b=h.map(r=>ve(r.name,a.value.labelMaxLength)),x=Math.max(...n.value.map(r=>r.maxConsecutiveDays),1);return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.85)",borderColor:"transparent",textStyle:{color:"#fff",fontSize:12},formatter:r=>{if(!r||r.length===0)return"";const i=r[0].dataIndex,f=n.value.length-1-i,w=n.value[f];let g=`
|
|
46
|
-
<div style="padding: 6px 8px;">
|
|
47
|
-
<div style="font-weight: bold; margin-bottom: 6px;">${w.name}</div>
|
|
48
|
-
<div>最长连续: <b style="color: #f472b6;">${w.maxConsecutiveDays}</b> 天</div>
|
|
49
|
-
`;return w.currentStreak>0&&(g+=`<div style="color: #f97316;">🔥 当前连续 ${w.currentStreak} 天</div>`),g+="</div>",g}},legend:{show:!1},grid:{left:a.value.gridLeft,right:75,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:x*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:b,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(r,i)=>{const w=n.value.length-1-i+1;return`${w===1?"🥇":w===2?"🥈":w===3?"🥉":`${w}.`} ${r}`}}},series:[{name:"当前连续",type:"bar",data:h.map(r=>({value:r.currentStreak>0?r.maxConsecutiveDays:0,itemStyle:{color:l,borderRadius:[0,4,4,0]}})),barWidth:18,barGap:"-100%",label:{show:!0,position:"right",distance:8,formatter:r=>{const i=n.value.length-1-r.dataIndex,f=n.value[i];return f.currentStreak>0?`${f.maxConsecutiveDays} 天`:""},fontSize:11,fontWeight:500,color:"#6b7280"}},{name:"已中断",type:"bar",data:h.map(r=>({value:r.currentStreak===0?r.maxConsecutiveDays:0,itemStyle:{color:d,borderRadius:[0,4,4,0]}})),barWidth:18,label:{show:!0,position:"right",distance:8,formatter:r=>{const i=n.value.length-1-r.dataIndex,f=n.value[i];return f.currentStreak===0?`${f.maxConsecutiveDays} 天`:""},fontSize:11,fontWeight:500,color:"#6b7280"}}]}});return(h,b)=>u.bare?(o(),C(e(de),{key:0,"content-height":m.value,"max-height-vh":u.maxHeightVh},{default:M(()=>[y(e(ae),{option:p.value,height:m.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(E),{key:1,title:u.title,description:u.description,scrollable:"","max-height-vh":u.maxHeightVh},{default:M(()=>[t("div",cs,[y(e(ae),{option:p.value,height:m.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),ds={class:"px-3 py-2"},ms=B({__name:"EChartNightOwlRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(u){const s=u,a=me(),n=$(()=>s.items.slice(0,s.topN)),m=$(()=>{const p=n.value.length*36;return Math.max(p+50,200)}),l={h23:"#8b5cf6",h0:"#3b82f6",h1:"#06b6d4",h2:"#f59e0b",h3to4:"#ef4444"},d=$(()=>{if(n.value.length===0)return{};const p=[...n.value].reverse(),h=p.map(x=>ve(x.name,a.value.labelMaxLength)),b=Math.max(...n.value.map(x=>x.totalNightMessages),1);return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.85)",borderColor:"transparent",textStyle:{color:"#fff",fontSize:12},formatter:x=>{if(!x||x.length===0)return"";const r=x[0].dataIndex,i=n.value.length-1-r,f=n.value[i],w=f.hourlyBreakdown;return`
|
|
50
|
-
<div style="padding: 6px 8px;">
|
|
51
|
-
<div style="font-weight: bold; margin-bottom: 6px;">${f.name}</div>
|
|
52
|
-
<div style="margin-bottom: 4px;">
|
|
53
|
-
称号: <b style="color: #f472b6;">${f.title}</b>
|
|
54
|
-
</div>
|
|
55
|
-
<div style="margin-bottom: 6px;">总发言: <b>${f.totalNightMessages}</b> 条</div>
|
|
56
|
-
<div style="border-top: 1px solid #374151; padding-top: 6px;">
|
|
57
|
-
<div><span style="color: ${l.h23};">●</span> 23点: ${w.h23} 条</div>
|
|
58
|
-
<div><span style="color: ${l.h0};">●</span> 0点: ${w.h0} 条</div>
|
|
59
|
-
<div><span style="color: ${l.h1};">●</span> 1点: ${w.h1} 条</div>
|
|
60
|
-
<div><span style="color: ${l.h2};">●</span> 2点: ${w.h2} 条</div>
|
|
61
|
-
<div><span style="color: ${l.h3to4};">●</span> 3-4点: ${w.h3to4} 条</div>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
`}},legend:{show:!0,bottom:0,itemWidth:12,itemHeight:12,textStyle:{color:"#6b7280",fontSize:10}},grid:{left:a.value.gridLeft,right:70,top:15,bottom:35,containLabel:!1},xAxis:{type:"value",max:b*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:h,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(x,r)=>{const f=n.value.length-1-r+1;return`${f===1?"🥇":f===2?"🥈":f===3?"🥉":`${f}.`} ${x}`}}},series:[{name:"23点",type:"bar",stack:"total",data:p.map(x=>x.hourlyBreakdown.h23),itemStyle:{color:l.h23},barWidth:18},{name:"0点",type:"bar",stack:"total",data:p.map(x=>x.hourlyBreakdown.h0),itemStyle:{color:l.h0},barWidth:18},{name:"1点",type:"bar",stack:"total",data:p.map(x=>x.hourlyBreakdown.h1),itemStyle:{color:l.h1},barWidth:18},{name:"2点",type:"bar",stack:"total",data:p.map(x=>x.hourlyBreakdown.h2),itemStyle:{color:l.h2},barWidth:18},{name:"3-4点",type:"bar",stack:"total",data:p.map(x=>x.hourlyBreakdown.h3to4),itemStyle:{color:l.h3to4,borderRadius:[0,4,4,0]},barWidth:18,label:{show:!0,position:"right",distance:8,formatter:x=>{const r=n.value.length-1-x.dataIndex;return`${n.value[r].totalNightMessages} 条`},fontSize:11,fontWeight:500,color:"#6b7280"}}]}});return(p,h)=>u.bare?(o(),C(e(de),{key:0,"content-height":m.value,"max-height-vh":u.maxHeightVh},{default:M(()=>[y(e(ae),{option:d.value,height:m.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),C(e(E),{key:1,title:u.title,description:u.description,scrollable:"","max-height-vh":u.maxHeightVh},{default:M(()=>[t("div",ds,[y(e(ae),{option:d.value,height:m.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),vs={id:"streak-rank",class:"scroll-mt-24"},hs={class:"flex items-center gap-3"},ps=B({__name:"CheckInRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(u){const s=u,a=I(null),n=I(!1),m=I("max"),l=I(s.globalTopN??10);O(()=>s.globalTopN,x=>{x!==void 0&&(l.value=x)});const d=$(()=>m.value==="max"?"🔥 火花榜 - 最长连续":"🔥 火花榜 - 当前连续"),p=$(()=>m.value==="max"?"历史最长连续发言天数":"正在持续连续发言的成员"),h=$(()=>a.value?a.value.streakRank.some(x=>x.currentStreak>0):!1);async function b(){if(s.sessionId){n.value=!0;try{a.value=await Z().getCheckInAnalysis(s.sessionId,s.timeFilter)}catch(x){console.error("加载打卡分析失败:",x)}finally{n.value=!1}}}return O(()=>[s.sessionId,s.timeFilter],()=>{b()},{immediate:!0,deep:!0}),(x,r)=>(o(),k("div",vs,[n.value?(o(),C(e(oe),{key:0,text:"正在分析数据..."})):a.value&&a.value.streakRank.length>0?(o(),C(e(E),{key:1,title:d.value,description:p.value},{headerRight:M(()=>[t("div",hs,[u.showTopNSelect?(o(),C(e(re),{key:0,modelValue:l.value,"onUpdate:modelValue":r[0]||(r[0]=i=>l.value=i)},null,8,["modelValue"])):D("",!0),h.value?(o(),C(e(ie),{key:1,modelValue:m.value,"onUpdate:modelValue":r[1]||(r[1]=i=>m.value=i),items:[{label:"最长连续",value:"max"},{label:"当前连续",value:"current"}],size:"sm"},null,8,["modelValue"])):D("",!0)])]),default:M(()=>[y(e(ts),{items:a.value.streakRank,title:d.value,mode:m.value,"top-n":l.value,bare:""},null,8,["items","title","mode","top-n"])]),_:1},8,["title","description"])):(o(),C(e(E),{key:2,title:"🔥 火花榜"},{default:M(()=>[y(e(le),{text:"暂无连续发言数据"})]),_:1}))]))}}),gs={class:"flex items-center gap-3"},fs={key:1,class:"py-8 text-center text-sm text-gray-400"},ys={key:1,class:"py-8 text-center text-sm text-gray-400"},xs=B({__name:"MemeBattleRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(u){const s=u,a=I(null),n=I(!1),m=I("count"),l=I(s.globalTopN??10);O(()=>s.globalTopN,f=>{f!==void 0&&(l.value=f)});async function d(){if(s.sessionId){n.value=!0;try{a.value=await Z().getMemeBattleAnalysis(s.sessionId,s.timeFilter)}catch(f){console.error("加载斗图分析失败:",f)}finally{n.value=!1}}}const p=$(()=>a.value?a.value.rankByCount.map(f=>({id:f.memberId.toString(),name:f.name,value:f.count,percentage:f.percentage})):[]),h=$(()=>a.value?a.value.rankByImageCount.map(f=>({id:f.memberId.toString(),name:f.name,value:f.count,percentage:f.percentage})):[]),b=$(()=>m.value==="count"?p.value:h.value),x=$(()=>m.value==="count"?"场":"张"),r=$(()=>{switch(m.value){case"battle":return"⚔️ 斗图榜 - 史诗级战役";case"count":return"⚔️ 斗图榜 - 按场次";case"image":return"⚔️ 斗图榜 - 按图量";default:return"⚔️ 斗图榜"}}),i=$(()=>{switch(m.value){case"battle":return"记录最激烈的斗图大战";case"count":return"参与斗图次数最多的人";case"image":return"在斗图中发送图片最多的人";default:return""}});return O(()=>[s.sessionId,s.timeFilter],()=>d(),{immediate:!0,deep:!0}),(f,w)=>n.value?(o(),C(e(oe),{key:0,text:"正在统计斗图数据..."})):a.value?(o(),C(e(E),{key:1,title:r.value,description:i.value},{headerRight:M(()=>[t("div",gs,[u.showTopNSelect?(o(),C(e(re),{key:0,modelValue:l.value,"onUpdate:modelValue":w[0]||(w[0]=g=>l.value=g)},null,8,["modelValue"])):D("",!0),y(e(ie),{modelValue:m.value,"onUpdate:modelValue":w[1]||(w[1]=g=>m.value=g),items:[{label:"按场次",value:"count"},{label:"按图量",value:"image"},{label:"史诗级战役",value:"battle"}],size:"sm"},null,8,["modelValue"])])]),default:M(()=>[m.value==="battle"?(o(),k(W,{key:0},[a.value.topBattles.length>0?(o(),C(e(ss),{key:0,battles:a.value.topBattles,title:"","top-n":l.value,bare:""},null,8,["battles","top-n"])):(o(),k("div",fs,"暂无史诗级战役数据"))],64)):(o(),k(W,{key:1},[b.value.length>0?(o(),C(e(be),{key:0,members:b.value,title:r.value,unit:x.value,"top-n":l.value,bare:""},null,8,["members","title","unit","top-n"])):(o(),k("div",ys,"暂无斗图数据"))],64))]),_:1},8,["title","description"])):D("",!0)}}),bs={class:"space-y-6"},ks={class:"flex items-center gap-3"},_s={class:"flex items-center gap-3"},ws={key:1,class:"px-3 py-2"},$s=B({__name:"RepeatSection",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(u){const s=u,a=I(null),n=I(!1),m=I("originator"),l=I("fastest"),d=I(s.globalTopN??10),p=I(s.globalTopN??10);O(()=>s.globalTopN,S=>{S!==void 0&&(d.value=S,p.value=S)});async function h(){if(s.sessionId){n.value=!0;try{a.value=await Z().getRepeatAnalysis(s.sessionId,s.timeFilter)}catch(S){console.error("加载复读分析失败:",S)}finally{n.value=!1}}}const b=$(()=>a.value?a.value.originators.map(S=>({id:S.memberId.toString(),name:S.name,value:S.count,percentage:S.percentage})):[]),x=$(()=>a.value?a.value.initiators.map(S=>({id:S.memberId.toString(),name:S.name,value:S.count,percentage:S.percentage})):[]),r=$(()=>a.value?a.value.breakers.map(S=>({id:S.memberId.toString(),name:S.name,value:S.count,percentage:S.percentage})):[]),i=$(()=>{switch(m.value){case"originator":return b.value;case"initiator":return x.value;case"breaker":return r.value;default:return b.value}}),f=$(()=>{switch(m.value){case"originator":return"🔁 复读榜 - 被复读";case"initiator":return"🔁 复读榜 - 挑起";case"breaker":return"🔁 复读榜 - 打断";default:return"🔁 复读榜"}}),w=$(()=>{switch(m.value){case"originator":return"发出的消息被别人复读的次数";case"initiator":return"第二个发送相同消息、带起节奏的人";case"breaker":return"终结复读链的人";default:return""}}),g=$(()=>{if(!a.value)return{labels:[],values:[]};const S=a.value.chainLengthDistribution;return{labels:S.map(T=>`${T.length}人`),values:S.map(T=>T.count)}}),v=$(()=>l.value==="fastest"?"📊 复读统计 - 最快反应":"📊 复读统计 - 链长分布"),_=$(()=>{if(l.value==="fastest")return"平均复读反应时间(至少参与5次复读)";const S=a.value?.totalRepeatChains??0,T=a.value?.avgChainLength??0;return`共 ${S} 次复读,平均 ${T} 人参与`});return O(()=>[s.sessionId,s.timeFilter],()=>h(),{immediate:!0,deep:!0}),(S,T)=>(o(),k("div",bs,[n.value?(o(),C(e(oe),{key:0,text:"正在分析复读数据..."})):a.value&&a.value.totalRepeatChains>0?(o(),k(W,{key:1},[y(e(E),{title:f.value,description:w.value},{headerRight:M(()=>[t("div",ks,[u.showTopNSelect?(o(),C(e(re),{key:0,modelValue:d.value,"onUpdate:modelValue":T[0]||(T[0]=z=>d.value=z)},null,8,["modelValue"])):D("",!0),y(e(ie),{modelValue:m.value,"onUpdate:modelValue":T[1]||(T[1]=z=>m.value=z),items:[{label:"被复读",value:"originator"},{label:"挑起",value:"initiator"},{label:"打断",value:"breaker"}],size:"sm"},null,8,["modelValue"])])]),default:M(()=>[i.value.length>0?(o(),C(e(be),{key:0,members:i.value,title:f.value,unit:"次","top-n":d.value,bare:""},null,8,["members","title","top-n"])):(o(),C(e(le),{key:1,text:"暂无数据"}))]),_:1},8,["title","description"]),y(e(E),{title:v.value,description:_.value},{headerRight:M(()=>[t("div",_s,[u.showTopNSelect&&l.value==="fastest"?(o(),C(e(re),{key:0,modelValue:p.value,"onUpdate:modelValue":T[2]||(T[2]=z=>p.value=z)},null,8,["modelValue"])):D("",!0),y(e(ie),{modelValue:l.value,"onUpdate:modelValue":T[3]||(T[3]=z=>l.value=z),items:[{label:"最快反应",value:"fastest"},{label:"链长分布",value:"distribution"}],size:"sm"},null,8,["modelValue"])])]),default:M(()=>[l.value==="fastest"?(o(),k(W,{key:0},[a.value.fastestRepeaters&&a.value.fastestRepeaters.length>0?(o(),C(e(ns),{key:0,items:a.value.fastestRepeaters,"top-n":p.value,title:"",bare:""},null,8,["items","top-n"])):(o(),C(e(le),{key:1,text:"暂无最快复读数据"}))],64)):(o(),k("div",ws,[g.value.labels.length>0?(o(),C(e(It),{key:0,data:g.value,height:200},null,8,["data"])):(o(),C(e(le),{key:1,text:"暂无分布数据"}))]))]),_:1},8,["title","description"])],64)):(o(),C(e(E),{key:2,title:"🔁 复读榜"},{default:M(()=>[y(e(le),{text:"该群组暂无复读记录"})]),_:1}))]))}}),Cs=B({__name:"DivingRank",props:{sessionId:{},timeFilter:{},globalTopN:{}},setup(u){const s=u,a=I(null),n=I(!1);async function m(){if(s.sessionId){n.value=!0;try{a.value=await Z().getDivingAnalysis(s.sessionId,s.timeFilter)}catch(l){console.error("加载潜水分析失败:",l)}finally{n.value=!1}}}return O(()=>[s.sessionId,s.timeFilter],()=>m(),{immediate:!0,deep:!0}),(l,d)=>n.value?(o(),C(e(oe),{key:0,text:"正在统计潜水数据..."})):a.value&&a.value.rank.length>0?(o(),C(e(rs),{key:1,items:a.value.rank,"global-top-n":u.globalTopN},null,8,["items","global-top-n"])):D("",!0)}}),Is={class:"space-y-6"},Ss={class:"flex items-center gap-3"},Ms={key:1,class:"py-8 text-center text-sm text-gray-400"},Ts={key:1,class:"py-8 text-center text-sm text-gray-400"},Vs={class:"flex items-center gap-3"},Rs={key:1,class:"py-8 text-center text-sm text-gray-400"},Ls=B({__name:"NightOwlRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(u){const s=u,a=I(null),n=I(!1),m=I("first"),l=I("distribution"),d=I(s.globalTopN??10),p=I(s.globalTopN??10);O(()=>s.globalTopN,v=>{v!==void 0&&(d.value=v,p.value=v)});async function h(){if(s.sessionId){n.value=!0;try{a.value=await Z().getNightOwlAnalysis(s.sessionId,s.timeFilter)}catch(v){console.error("加载出勤分析失败:",v)}finally{n.value=!1}}}const b=$(()=>a.value?a.value.lastSpeakerRank.map(v=>({id:String(v.memberId),name:v.name,value:v.count,percentage:v.percentage})):[]),x=$(()=>a.value?a.value.firstSpeakerRank.map(v=>({id:String(v.memberId),name:v.name,value:v.count,percentage:v.percentage})):[]),r=$(()=>m.value==="last"?b.value:x.value),i=$(()=>m.value==="last"?"⏰ 出勤排行 - 最晚下班":"⏰ 出勤排行 - 最早上班"),f=$(()=>{const v=a.value?.totalDays??0;return m.value==="last"?`每天最后一个发言的人(共 ${v} 天)`:`每天第一个发言的人(共 ${v} 天)`}),w=$(()=>l.value==="distribution"?"🦉 修仙统计 - 发言分布":"🦉 修仙统计 - 连续记录"),g=$(()=>l.value==="distribution"?"深夜时段(23:00-05:00)各时段发言分布":"连续在深夜时段发言的天数");return O(()=>[s.sessionId,s.timeFilter],()=>h(),{immediate:!0,deep:!0}),(v,_)=>(o(),k("div",Is,[n.value?(o(),C(e(oe),{key:0,text:"正在加载出勤分析..."})):a.value?(o(),k(W,{key:1},[y(e(E),{title:w.value,description:g.value},{headerRight:M(()=>[t("div",Ss,[u.showTopNSelect?(o(),C(e(re),{key:0,modelValue:d.value,"onUpdate:modelValue":_[0]||(_[0]=S=>d.value=S)},null,8,["modelValue"])):D("",!0),y(e(ie),{modelValue:l.value,"onUpdate:modelValue":_[1]||(_[1]=S=>l.value=S),items:[{label:"发言分布",value:"distribution"},{label:"连续记录",value:"consecutive"}],size:"sm"},null,8,["modelValue"])])]),default:M(()=>[l.value==="distribution"?(o(),k(W,{key:0},[a.value.nightOwlRank.length>0?(o(),C(e(ms),{key:0,items:a.value.nightOwlRank,"top-n":d.value,title:"",bare:""},null,8,["items","top-n"])):(o(),k("div",Ms,"暂无深夜发言数据"))],64)):(o(),k(W,{key:1},[a.value.consecutiveRecords.length>0?(o(),C(e(us),{key:0,items:a.value.consecutiveRecords,"top-n":d.value,title:"",bare:""},null,8,["items","top-n"])):(o(),k("div",Ts,"暂无连续记录"))],64))]),_:1},8,["title","description"]),y(e(E),{title:i.value,description:f.value},{headerRight:M(()=>[t("div",Vs,[u.showTopNSelect?(o(),C(e(re),{key:0,modelValue:p.value,"onUpdate:modelValue":_[2]||(_[2]=S=>p.value=S)},null,8,["modelValue"])):D("",!0),y(e(ie),{modelValue:m.value,"onUpdate:modelValue":_[3]||(_[3]=S=>m.value=S),items:[{label:"最早上班",value:"first"},{label:"最晚下班",value:"last"}],size:"sm"},null,8,["modelValue"])])]),default:M(()=>[r.value.length>0?(o(),C(e(be),{key:0,members:r.value,title:i.value,"top-n":p.value,unit:"次",bare:""},null,8,["members","title","top-n"])):(o(),k("div",Rs,"暂无数据"))]),_:1},8,["title","description"])],64)):D("",!0)]))}}),Ds={class:"mb-8 mt-4"},Ns={class:"text-5xl tracking-wider",style:{"font-weight":"800",background:"linear-gradient(to right, #f59e0b, #ec4899, #9333ea)","-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"}},As={id:"activity-rank",class:"scroll-mt-24"},zs={id:"meme-battle",class:"scroll-mt-24"},Us={id:"repeat",class:"scroll-mt-24"},Fs={id:"night-owl",class:"scroll-mt-24"},Hs={id:"diving",class:"scroll-mt-24"},Bs={class:"border-l border-gray-200 pl-4 dark:border-gray-800"},Ws={class:"mt-4 border-l border-gray-200 pl-4 dark:border-gray-800"},Os={class:"flex rounded-lg border border-gray-200 bg-white p-0.5 text-xs dark:border-gray-700 dark:bg-gray-900"},js=["onClick"],Es=B({__name:"RankingView",props:{sessionId:{},timeFilter:{}},setup(u){const s=u,a=I([]),n=I([]);async function m(){if(!s.sessionId)return;const g=Z(),[v,_]=await Promise.all([g.getMemberActivity(s.sessionId,s.timeFilter),g.getAvailableYears(s.sessionId)]);a.value=v,n.value=_}O(()=>[s.sessionId,s.timeFilter],()=>m(),{immediate:!0,deep:!0});const l=$(()=>{if(s.timeFilter?.startTs&&s.timeFilter?.endTs){const g=new Date(s.timeFilter.startTs*1e3).getFullYear(),v=new Date(s.timeFilter.endTs*1e3).getFullYear();return g===v?`${g} 赛季`:`${g}-${v} 赛季`}if(n.value.length>0){const g=[...n.value].sort((S,T)=>S-T),v=g[0],_=g[g.length-1];return v===_?`${v} 赛季`:`${v}-${_} 赛季`}return"全部赛季"}),d=$(()=>({startTs:s.timeFilter?.startTs,endTs:s.timeFilter?.endTs})),p=[{id:"activity-rank",label:"🏆 活跃榜"},{id:"streak-rank",label:"🔥 火花榜"},{id:"meme-battle",label:"⚔️ 斗图榜"},{id:"repeat",label:"🔁 复读榜"},{id:"night-owl",label:"⏰ 出勤榜"},{id:"diving",label:"🤿 潜水榜"}],{contentRef:h,activeAnchor:b,scrollToAnchor:x}=Jt(p,{threshold:350}),r=I(10),i=I("standard");mt(Xe,i);const f=[{value:"standard",label:"标准"},{value:"wide",label:"宽屏"},{value:"full",label:"全宽"}],w=$(()=>et[i.value].contentClass);return(g,v)=>(o(),k("div",{ref_key:"contentRef",ref:h,class:"flex gap-6 p-6"},[t("div",{class:J(["main-content min-w-0 flex-1 px-8 mx-auto space-y-6",w.value])},[t("div",Ds,[t("h1",Ns," 🏆 "+c(l.value),1),v[1]||(v[1]=t("p",{class:"mt-4 text-sm text-gray-500 dark:text-gray-400"},"各榜单前三名请找群主领取奖励 🎁",-1))]),t("div",As,[y(e(Qa),{"session-id":s.sessionId,"member-activity":a.value,"time-filter":d.value,"global-top-n":r.value},null,8,["session-id","member-activity","time-filter","global-top-n"])]),y(e(ps),{"session-id":s.sessionId,"time-filter":d.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"]),t("div",zs,[y(e(xs),{"session-id":s.sessionId,"time-filter":d.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),t("div",Us,[y(e($s),{"session-id":s.sessionId,"time-filter":d.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),t("div",Fs,[y(e(Ls),{"session-id":s.sessionId,"time-filter":d.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),t("div",Hs,[y(e(Cs),{"session-id":s.sessionId,"time-filter":d.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),v[2]||(v[2]=t("div",{class:"h-48 no-capture"},null,-1))],2),y(e(ea),{anchors:p,"active-anchor":e(b),onClick:e(x)},{default:M(()=>[t("div",Bs,[v[3]||(v[3]=t("div",{class:"text-xs text-gray-400 mb-2"},"显示数量",-1)),y(e(re),{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=_=>r.value=_)},null,8,["modelValue"])]),t("div",Ws,[v[4]||(v[4]=t("div",{class:"mb-2 text-xs text-gray-400"},"榜单宽度",-1)),t("div",Os,[(o(),k(W,null,ee(f,_=>t("button",{key:_.value,type:"button",class:J(["rounded-md px-2 py-1 transition",i.value===_.value?"bg-pink-500 text-white shadow-sm":"text-gray-500 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800"]),onClick:S=>i.value=_.value},c(_.label),11,js)),64))])])]),_:1},8,["active-anchor","onClick"])],512))}}),Ps={class:"flex h-full flex-col"},qs={class:"flex items-center justify-end px-4 py-2"},Gs={class:"flex items-center gap-4"},Ys={class:"flex items-center gap-2"},Ks={class:"text-xs text-gray-400"},Js={class:"flex items-center gap-2"},Qs={class:"text-xs text-gray-400"},Zs={class:"flex-1 min-h-0 relative"},Xs={key:0,class:"absolute inset-0 flex items-center justify-center"},eo={key:0,class:"h-full"},to={class:"absolute bottom-2 left-1/2 -translate-x-1/2 rounded-full bg-gray-100/80 px-3 py-1 text-xs text-gray-500 backdrop-blur-sm dark:bg-gray-800/80 dark:text-gray-400"},ao={key:1,class:"flex h-full items-center justify-center text-gray-400"},so={class:"text-center"},oo={class:"mt-2 text-sm"},no=B({__name:"InteractionView",props:{sessionId:{},timeFilter:{}},setup(u){const s=u,{t:a}=te(),n=I(!0),m=I({nodes:[],links:[],maxLinkValue:0}),l=I("circular"),d=I(!1),p=I(null);function h(){p.value?.resetView()}async function b(){if(s.sessionId){n.value=!0;try{const x=await Z().getMentionGraph(s.sessionId,s.timeFilter);m.value={nodes:x.nodes,links:x.links,maxLinkValue:x.maxLinkValue}}catch(x){console.error("[chart-interaction] 加载互动关系图数据失败:",x)}finally{n.value=!1}}}return O(()=>[s.sessionId,s.timeFilter],()=>{b()},{immediate:!0,deep:!0}),(x,r)=>{const i=ce,f=qe("UButtonGroup"),w=at,g=Me;return o(),k("div",Ps,[t("div",qs,[t("div",Gs,[t("div",Ys,[t("span",Ks,c(e(a)("views.interaction.layout"))+":",1),y(f,{size:"xs"},{default:M(()=>[y(i,{color:l.value==="circular"?"primary":"neutral",variant:l.value==="circular"?"solid":"ghost",onClick:r[0]||(r[0]=v=>l.value="circular")},{default:M(()=>[K(c(e(a)("views.interaction.circular")),1)]),_:1},8,["color","variant"]),y(i,{color:l.value==="force"?"primary":"neutral",variant:l.value==="force"?"solid":"ghost",onClick:r[1]||(r[1]=v=>l.value="force")},{default:M(()=>[K(c(e(a)("views.interaction.force")),1)]),_:1},8,["color","variant"])]),_:1})]),t("div",Js,[t("span",Qs,c(e(a)("views.interaction.directed"))+":",1),y(w,{modelValue:d.value,"onUpdate:modelValue":r[2]||(r[2]=v=>d.value=v),size:"xs"},null,8,["modelValue"])]),y(i,{size:"xs",color:"neutral",variant:"ghost",icon:"i-heroicons-arrow-path",onClick:h},{default:M(()=>[K(c(e(a)("views.interaction.reset")),1)]),_:1})])]),t("div",Zs,[n.value?(o(),k("div",Xs,[y(g,{name:"i-heroicons-arrow-path",class:"h-8 w-8 animate-spin text-pink-500"})])):(o(),k(W,{key:1},[m.value.nodes.length>0?(o(),k("div",eo,[y(e(ta),{ref_key:"graphRef",ref:p,data:m.value,layout:l.value,directed:d.value,height:"100%"},null,8,["data","layout","directed"]),t("div",to,c(e(a)("views.interaction.graphHint",{nodes:m.value.nodes.length,links:m.value.links.length})),1)])):(o(),k("div",ao,[t("div",so,[y(g,{name:"i-heroicons-user-group",class:"mx-auto h-10 w-10 text-gray-300 dark:text-gray-600"}),t("p",oo,c(e(a)("views.interaction.noInteraction")),1)])]))],64))])])}}}),lo={class:"main-content mx-auto max-w-[920px] space-y-6 p-6"},io={class:"grid grid-cols-1 gap-6 lg:grid-cols-2"},ro={class:"grid grid-cols-1 gap-6 lg:grid-cols-2"},co={class:"divide-y divide-gray-100 dark:divide-gray-800"},uo={class:"flex flex-1 items-center gap-2"},mo=["onClick"],vo={class:"flex items-center gap-1 text-pink-500"},ho={class:"text-xs"},po=["onClick"],go={class:"shrink-0 text-right text-sm text-gray-500"},fo={key:0,class:"text-red-500"},yo={key:1},xo={class:"divide-y divide-gray-100 dark:divide-gray-800"},bo={class:"flex flex-1 items-center gap-2"},ko=["onClick"],_o={class:"flex items-center gap-1"},wo={class:"text-xs text-gray-400"},$o={class:"text-xs text-gray-400"},Co=["onClick"],Io={class:"shrink-0 text-right"},So={class:"text-lg font-bold text-pink-600"},Mo={class:"ml-1 text-sm text-gray-500"},To={key:0,class:"p-5"},Vo={class:"mb-4 text-lg font-semibold text-gray-900 dark:text-white"},Ro={key:0,class:"mb-4"},Lo={class:"mb-2 text-sm font-medium text-gray-700 dark:text-gray-300"},Do={class:"space-y-2"},No={class:"text-sm font-medium text-gray-900 dark:text-white"},Ao={class:"text-xs text-gray-500"},zo={key:1},Uo={class:"mb-2 text-sm font-medium text-gray-700 dark:text-gray-300"},Fo={class:"space-y-2"},Ho={class:"text-sm font-medium text-gray-900 dark:text-white"},Bo={class:"text-xs text-gray-500"},Wo={class:"mt-4 flex justify-end"},Oo=B({__name:"Relationships",props:{sessionId:{},timeFilter:{}},setup(u){const{t:s}=te(),a=u,n=I(null),m=I(!1),l=I(null),d=I(!1);async function p(){if(a.sessionId){m.value=!0;try{n.value=await Z().getMentionAnalysis(a.sessionId,a.timeFilter)}catch(r){console.error("加载 @ 互动分析失败:",r)}finally{m.value=!1}}}const h=$(()=>n.value?n.value.topMentioners.map(r=>({id:r.memberId.toString(),name:r.name,value:r.count,percentage:r.percentage})):[]),b=$(()=>n.value?n.value.topMentioned.map(r=>({id:r.memberId.toString(),name:r.name,value:r.count,percentage:r.percentage})):[]);function x(r){if(!n.value)return;const i=n.value.memberDetails.find(f=>f.memberId===r);i&&(l.value=i,d.value=!0)}return O(()=>[a.sessionId,a.timeFilter],()=>{p()},{immediate:!0,deep:!0}),(r,i)=>{const f=Be,w=ce,g=ge;return o(),k("div",lo,[m.value?(o(),C(e(oe),{key:0,text:e(s)("members.relationships.loading")},null,8,["text"])):n.value&&n.value.totalMentions>0?(o(),k(W,{key:1},[t("div",io,[h.value.length>0?(o(),C(e(Fe),{key:0,members:h.value,title:e(s)("members.relationships.topMentioners"),description:e(s)("members.relationships.totalMentions",{count:n.value.totalMentions}),unit:e(s)("members.relationships.times")},null,8,["members","title","description","unit"])):D("",!0),b.value.length>0?(o(),C(e(Fe),{key:1,members:b.value,title:e(s)("members.relationships.topMentioned"),description:e(s)("members.relationships.popularMember"),unit:e(s)("members.relationships.times")},null,8,["members","title","description","unit"])):D("",!0)]),t("div",ro,[n.value.oneWay.length>0?(o(),C(e(E),{key:0,class:"hidden",title:e(s)("members.relationships.oneWay.title"),description:e(s)("members.relationships.oneWay.description",{count:n.value.oneWay.length})},{default:M(()=>[t("div",co,[(o(!0),k(W,null,ee(n.value.oneWay.slice(0,10),(v,_)=>(o(),k("div",{key:_,class:"flex items-center gap-4 px-5 py-3 transition-colors hover:bg-gray-50 dark:hover:bg-gray-800/50"},[t("span",{class:J(["flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-bold",_===0?"bg-pink-100 text-pink-600 dark:bg-pink-900/30 dark:text-pink-400":"bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-500"])},c(_+1),3),t("div",uo,[t("button",{class:"font-medium text-gray-900 hover:text-pink-600 dark:text-white dark:hover:text-pink-600",onClick:S=>x(v.fromMemberId)},c(v.fromName),9,mo),t("div",vo,[i[2]||(i[2]=t("span",{class:"text-lg"},"→",-1)),t("span",ho,c(v.fromToCount)+"次",1)]),t("button",{class:"font-medium text-gray-900 hover:text-pink-600 dark:text-white dark:hover:text-pink-600",onClick:S=>x(v.toMemberId)},c(v.toName),9,po)]),t("div",go,[v.toFromCount===0?(o(),k("span",fo,c(e(s)("members.relationships.oneWay.neverRespond")),1)):(o(),k("span",yo,c(e(s)("members.relationships.oneWay.reverse",{count:v.toFromCount})),1))]),y(f,{color:"pink",variant:"soft",size:"xs"},{default:M(()=>[K(c(e(s)("members.relationships.oneWay.ratio",{value:Math.round(v.ratio*100)})),1)]),_:2},1024)]))),128))])]),_:1},8,["title","description"])):D("",!0),n.value.twoWay.length>0?(o(),C(e(E),{key:1,title:e(s)("members.relationships.twoWay.title"),description:e(s)("members.relationships.twoWay.description",{count:n.value.twoWay.length})},{default:M(()=>[t("div",xo,[(o(!0),k(W,null,ee(n.value.twoWay.slice(0,10),(v,_)=>(o(),k("div",{key:_,class:"flex items-center gap-4 px-5 py-3 transition-colors hover:bg-gray-50 dark:hover:bg-gray-800/50"},[t("span",{class:J(["flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-bold",_===0?"bg-linear-to-r from-pink-400 to-red-400 text-white":_===1?"bg-linear-to-r from-pink-300 to-red-300 text-white":_===2?"bg-linear-to-r from-pink-200 to-red-200 text-pink-700":"bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-500"])},c(_+1),3),t("div",bo,[t("button",{class:"font-medium text-gray-900 hover:text-pink-600 dark:text-white dark:hover:text-pink-600",onClick:S=>x(v.member1Id)},c(v.member1Name),9,ko),t("div",_o,[t("span",wo,c(v.member1To2),1),i[3]||(i[3]=t("span",{class:"text-lg text-pink-500"},"⇄",-1)),t("span",$o,c(v.member2To1),1)]),t("button",{class:"font-medium text-gray-900 hover:text-pink-600 dark:text-white dark:hover:text-pink-600",onClick:S=>x(v.member2Id)},c(v.member2Name),9,Co)]),t("div",Io,[t("span",So,c(v.total),1),t("span",Mo,c(e(s)("members.relationships.twoWay.interactions")),1)]),y(f,{color:v.balance>=.7?"green":v.balance>=.5?"blue":"gray",variant:"soft",size:"xs"},{default:M(()=>[K(c(e(s)("members.relationships.twoWay.balance",{value:Math.round(v.balance*100)})),1)]),_:2},1032,["color"])]))),128))])]),_:1},8,["title","description"])):D("",!0)])],64)):m.value?D("",!0):(o(),C(e(E),{key:2,title:e(s)("members.relationships.emptyTitle")},{default:M(()=>[y(e(le),{text:e(s)("members.relationships.empty")},null,8,["text"])]),_:1},8,["title"])),y(g,{open:d.value,"onUpdate:open":i[1]||(i[1]=v=>d.value=v)},{content:M(()=>[l.value?(o(),k("div",To,[t("h3",Vo,c(e(s)("members.relationships.modal.title",{name:l.value.name})),1),l.value.topMentioned.length>0?(o(),k("div",Ro,[t("h4",Lo,c(e(s)("members.relationships.modal.topMentioned")),1),t("div",Do,[(o(!0),k(W,null,ee(l.value.topMentioned,(v,_)=>(o(),k("div",{key:_,class:"flex items-center gap-3 rounded-lg bg-gray-50 px-3 py-2 dark:bg-gray-800"},[t("span",No,c(v.toName),1),t("span",Ao,c(e(s)("members.relationships.modal.timesCount",{count:v.count})),1)]))),128))])])):D("",!0),l.value.topMentioners.length>0?(o(),k("div",zo,[t("h4",Uo,c(e(s)("members.relationships.modal.topMentioners")),1),t("div",Fo,[(o(!0),k(W,null,ee(l.value.topMentioners,(v,_)=>(o(),k("div",{key:_,class:"flex items-center gap-3 rounded-lg bg-gray-50 px-3 py-2 dark:bg-gray-800"},[t("span",Ho,c(v.fromName),1),t("span",Bo,c(e(s)("members.relationships.modal.timesCount",{count:v.count})),1)]))),128))])])):D("",!0),t("div",Wo,[y(w,{variant:"soft",onClick:i[0]||(i[0]=v=>d.value=!1)},{default:M(()=>[K(c(e(s)("members.relationships.modal.close")),1)]),_:1})])])):D("",!0)]),_:1},8,["open"])])}}}),jo={class:"mx-auto max-w-[920px] p-4 h-full"},Eo={class:"flex h-full flex-col rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900 shadow-sm overflow-hidden"},Po={class:"flex items-center justify-between px-4 py-3 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/50"},qo={class:"flex items-center gap-3"},Go={class:"flex items-center gap-3"},Yo={class:"p-3 w-64"},Ko={class:"text-sm font-medium mb-3"},Jo={class:"space-y-3"},Qo={class:"text-xs text-gray-500 mb-1 block"},Zo={class:"text-xs text-gray-400 mt-1"},Xo={class:"text-xs text-gray-500 mb-1 block"},en={class:"text-xs text-gray-400 mt-1"},tn={class:"flex-1 min-h-0 overflow-hidden"},an={key:0,class:"h-full flex items-center justify-center"},sn={key:1,class:"h-full flex items-center justify-center"},on={class:"text-center text-gray-400"},nn={key:2,class:"h-full"},ln={key:3,class:"h-full flex overflow-hidden"},rn={class:"w-64 border-r border-gray-200 dark:border-gray-700 flex flex-col overflow-hidden"},cn={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},un={class:"text-sm font-medium flex items-center gap-2"},dn={class:"flex-1 overflow-y-auto"},mn=["onClick"],vn={class:"flex items-center justify-between"},hn={class:"text-sm truncate"},pn={class:"text-xs text-gray-400"},gn={class:"flex-1 overflow-hidden flex flex-col"},fn={key:0,class:"flex-1 flex items-center justify-center"},yn={class:"text-center text-gray-400"},xn={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 flex items-center gap-3"},bn={class:"w-10 h-10 rounded-full flex items-center justify-center text-white font-bold bg-primary-500"},kn={class:"font-medium"},_n={class:"text-xs text-gray-400"},wn={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},$n={class:"text-sm font-medium flex items-center gap-2"},Cn={class:"flex-1 overflow-y-auto"},In={key:0,class:"p-4 text-center text-gray-400"},Sn={class:"flex items-center gap-3"},Mn={class:"flex-1 min-w-0"},Tn={class:"text-sm font-medium truncate"},Vn={class:"flex items-center gap-3 mt-0.5 text-xs text-gray-400"},Rn={class:"w-20 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},Ln={key:4,class:"h-full flex flex-col overflow-hidden"},Dn={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},Nn={class:"text-sm font-medium flex items-center gap-2"},An={class:"flex-1 overflow-y-auto"},zn={class:"flex items-center gap-3"},Un={class:"flex-1 min-w-0"},Fn={class:"flex items-center gap-2 text-sm"},Hn={class:"font-medium truncate"},Bn={class:"font-medium truncate"},Wn={class:"flex items-center gap-3 mt-1 text-xs text-gray-400"},On={class:"w-24 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},jn={key:0,class:"px-4 py-2 border-t border-gray-200 dark:border-gray-700 text-xs text-gray-400 flex items-center gap-4 bg-gray-50 dark:bg-gray-800/50"},En=B({__name:"ClusterView",props:{sessionId:{},timeFilter:{}},setup(u){Ke([Gt,Je,Yt,Kt,Qe]);const s=u,{t:a}=te(),n=ht(),m=$(()=>n.value==="dark"),l=I(!0),d=I(null),p=I("matrix"),h=I(null),b=I({lookAhead:3,decaySeconds:120,topEdges:150}),x=I(null);let r=null;async function i(){if(s.sessionId){l.value=!0;try{d.value=await Z().getClusterGraph(s.sessionId,s.timeFilter,{lookAhead:b.value.lookAhead,decaySeconds:b.value.decaySeconds,topEdges:b.value.topEdges})}catch(V){console.error("[chart-cluster] 加载小团体关系数据失败:",V),d.value=null}finally{l.value=!1}}}const f=$(()=>{if(!d.value||d.value.nodes.length===0)return null;const{nodes:V,links:N,maxLinkValue:U}=d.value,q=[...V].sort((R,G)=>G.messageCount-R.messageCount).slice(0,20).map(R=>R.name),X=new Map;for(const R of N)X.set(`${R.source}-${R.target}`,R.value),X.set(`${R.target}-${R.source}`,R.value);const Q=[];for(let R=0;R<q.length;R++)for(let G=0;G<q.length;G++)if(R===G)Q.push([R,G,-1]);else{const he=X.get(`${q[R]}-${q[G]}`)||0;Q.push([R,G,he])}return{names:q,data:Q,maxValue:U}});function w(){if(!f.value)return{graphic:{type:"text",style:{text:a("views.cluster.noData"),fill:"#999"}}};const{names:V,data:N,maxValue:U}=f.value;return{tooltip:{position:"top",formatter:se=>{const[q,X,Q]=se.data;return Q<0?`${V[q]}`:Q===0?`${V[q]} ↔ ${V[X]}<br/>暂无关系数据`:`${V[q]} ↔ ${V[X]}<br/>临近度: ${Q.toFixed(2)}`}},grid:{left:120,right:40,top:40,bottom:120},xAxis:{type:"category",data:V,splitArea:{show:!0},axisLabel:{rotate:45,fontSize:10,color:m.value?"#ccc":"#333"}},yAxis:{type:"category",data:V,splitArea:{show:!0},axisLabel:{fontSize:10,color:m.value?"#ccc":"#333"}},visualMap:{min:0,max:U||1,calculable:!0,orient:"horizontal",left:"center",bottom:10,inRange:{color:m.value?["#1a1a2e","#16213e","#0f3460","#e94560"]:["#f7f7f7","#fce4ec","#f8bbd9","#ee4567"]},textStyle:{color:m.value?"#ccc":"#333"}},series:[{type:"heatmap",data:N.filter(se=>se[2]>=0),label:{show:!1},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}],backgroundColor:"transparent"}}const g=$(()=>d.value?[...d.value.nodes].sort((V,N)=>N.messageCount-V.messageCount):[]),v=$(()=>!d.value||h.value===null?null:d.value.nodes.find(V=>V.id===h.value)||null),_=$(()=>{if(!d.value||!v.value)return[];const V=v.value.name,N=[];for(const U of d.value.links)U.source===V?N.push({otherName:U.target,value:U.value,coOccurrenceCount:U.coOccurrenceCount}):U.target===V&&N.push({otherName:U.source,value:U.value,coOccurrenceCount:U.coOccurrenceCount});return N.sort((U,se)=>se.value-U.value),N}),S=$(()=>d.value?d.value.links.slice(0,50):[]);function T(){r&&p.value==="matrix"&&r.setOption(w(),{notMerge:!0})}function z(){x.value&&(r=Ze(x.value,m.value?"dark":void 0),T())}function P(){r?.resize()}return O(p,async(V,N)=>{N==="matrix"&&r&&(r.dispose(),r=null),V==="matrix"&&(await Ce(),z())}),O([d,()=>m.value],()=>{p.value==="matrix"&&T()},{deep:!0}),O(l,async(V,N)=>{N&&!V&&p.value==="matrix"&&(r&&(r.dispose(),r=null),await Ce(),z())}),O(()=>[s.sessionId,s.timeFilter],()=>i(),{immediate:!0,deep:!0}),fe(()=>{window.addEventListener("resize",P),p.value==="matrix"&&Ce(()=>z())}),Te(()=>{window.removeEventListener("resize",P),r?.dispose(),r=null}),(V,N)=>{const U=ce,se=qe("UButtonGroup"),q=We,X=st,Q=Me;return o(),k("div",jo,[t("div",Eo,[t("div",Po,[t("div",qo,[y(se,{size:"xs"},{default:M(()=>[y(U,{color:p.value==="matrix"?"primary":"neutral",variant:p.value==="matrix"?"solid":"ghost",onClick:N[0]||(N[0]=R=>p.value="matrix")},{default:M(()=>[K(c(e(a)("views.cluster.matrixView")),1)]),_:1},8,["color","variant"]),y(U,{color:p.value==="member"?"primary":"neutral",variant:p.value==="member"?"solid":"ghost",onClick:N[1]||(N[1]=R=>p.value="member")},{default:M(()=>[K(c(e(a)("views.cluster.memberView")),1)]),_:1},8,["color","variant"]),y(U,{color:p.value==="circle"?"primary":"neutral",variant:p.value==="circle"?"solid":"ghost",onClick:N[2]||(N[2]=R=>p.value="circle")},{default:M(()=>[K(c(e(a)("views.cluster.rankingView")),1)]),_:1},8,["color","variant"])]),_:1})]),t("div",Go,[y(X,null,{content:M(()=>[t("div",Yo,[t("h4",Ko,c(e(a)("views.cluster.modelSettings")),1),t("div",Jo,[t("div",null,[t("label",Qo,c(e(a)("views.cluster.lookAhead")),1),y(q,{modelValue:b.value.lookAhead,"onUpdate:modelValue":N[3]||(N[3]=R=>b.value.lookAhead=R),modelModifiers:{number:!0},type:"number",min:1,max:10,size:"xs",placeholder:"1-10"},null,8,["modelValue"]),t("p",Zo,c(e(a)("views.cluster.lookAheadDesc")),1)]),t("div",null,[t("label",Xo,c(e(a)("views.cluster.decaySeconds")),1),y(q,{modelValue:b.value.decaySeconds,"onUpdate:modelValue":N[4]||(N[4]=R=>b.value.decaySeconds=R),modelModifiers:{number:!0},type:"number",min:30,max:3600,size:"xs",placeholder:"30-3600"},null,8,["modelValue"]),t("p",en,c(e(a)("views.cluster.decaySecondsDesc")),1)]),y(U,{size:"xs",color:"primary",class:"w-full mt-2",onClick:i},{default:M(()=>[K(c(e(a)("views.cluster.applySettings")),1)]),_:1})])])]),default:M(()=>[y(U,{variant:"ghost",size:"xs",icon:"i-heroicons-adjustments-horizontal"})]),_:1}),y(U,{variant:"ghost",size:"xs",icon:"i-heroicons-arrow-path",onClick:i})])]),t("div",tn,[l.value?(o(),k("div",an,[y(Q,{name:"i-heroicons-arrow-path",class:"w-6 h-6 animate-spin text-gray-400"})])):!d.value||d.value.nodes.length===0?(o(),k("div",sn,[t("div",on,[y(Q,{name:"i-heroicons-user-group",class:"w-12 h-12 mx-auto mb-2 opacity-50"}),t("p",null,c(e(a)("views.cluster.noData")),1)])])):p.value==="matrix"?(o(),k("div",nn,[t("div",{ref_key:"chartRef",ref:x,class:"w-full h-full"},null,512)])):p.value==="member"?(o(),k("div",ln,[t("div",rn,[t("div",cn,[t("h3",un,[y(Q,{name:"i-heroicons-users",class:"w-4 h-4"}),K(" "+c(e(a)("views.cluster.selectMember")),1)])]),t("div",dn,[(o(!0),k(W,null,ee(g.value,R=>(o(),k("div",{key:R.id,class:J(["px-4 py-2 cursor-pointer border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",{"bg-primary-50 dark:bg-primary-900/30":h.value===R.id}]),onClick:G=>h.value=R.id},[t("div",vn,[t("span",hn,c(R.name),1),t("span",pn,c(R.messageCount),1)])],10,mn))),128))])]),t("div",gn,[v.value?(o(),k(W,{key:1},[t("div",xn,[t("div",bn,c(v.value.name.charAt(0)),1),t("div",null,[t("div",kn,c(v.value.name),1),t("div",_n,c(e(a)("views.cluster.msgCount"))+": "+c(v.value.messageCount)+" | "+c(e(a)("views.cluster.relationCount"))+": "+c(_.value.length),1)])]),t("div",wn,[t("h3",$n,[y(Q,{name:"i-heroicons-heart",class:"w-4 h-4 text-pink-500"}),K(" "+c(e(a)("views.cluster.relationsByIntimacy")),1)])]),t("div",Cn,[_.value.length===0?(o(),k("div",In,c(e(a)("views.cluster.noRelations")),1)):D("",!0),(o(!0),k(W,null,ee(_.value,(R,G)=>(o(),k("div",{key:R.otherName,class:"px-4 py-3 border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50"},[t("div",Sn,[t("span",{class:J(["w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold",G<3?"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400":"bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400"])},c(G+1),3),t("div",Mn,[t("div",Tn,c(R.otherName),1),t("div",Vn,[t("span",null,c(e(a)("views.cluster.intimacy"))+": "+c((R.value*100).toFixed(0))+"%",1),t("span",null,c(e(a)("views.cluster.coOccurrence"))+": "+c(R.coOccurrenceCount)+c(e(a)("views.cluster.times")),1)])]),t("div",Rn,[t("div",{class:"h-full bg-linear-to-r from-pink-400 to-pink-600",style:pe({width:`${_.value[0]?.value?R.value/_.value[0].value*100:0}%`})},null,4)])])]))),128))])],64)):(o(),k("div",fn,[t("div",yn,[y(Q,{name:"i-heroicons-cursor-arrow-rays",class:"w-12 h-12 mx-auto mb-2 opacity-50"}),t("p",null,c(e(a)("views.cluster.selectMemberHint")),1)])]))])])):(o(),k("div",Ln,[t("div",Dn,[t("h3",Nn,[y(Q,{name:"i-heroicons-trophy",class:"w-4 h-4 text-yellow-500"}),K(" "+c(e(a)("views.cluster.interactionRanking")),1)])]),t("div",An,[(o(!0),k(W,null,ee(S.value,(R,G)=>(o(),k("div",{key:G,class:"px-4 py-3 border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50"},[t("div",zn,[t("span",{class:J(["w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold",G<3?"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400":"bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400"])},c(G+1),3),t("div",Un,[t("div",Fn,[t("span",Hn,c(R.source),1),N[5]||(N[5]=t("span",{class:"text-gray-400"},"↔",-1)),t("span",Bn,c(R.target),1)]),t("div",Wn,[t("span",null,c(e(a)("views.cluster.score"))+": "+c(R.value.toFixed(2)),1),t("span",null,c(e(a)("views.cluster.coOccurrence"))+": "+c(R.coOccurrenceCount)+c(e(a)("views.cluster.times")),1)])]),t("div",On,[t("div",{class:"h-full bg-linear-to-r from-yellow-400 to-orange-500",style:pe({width:`${S.value[0]?.value?R.value/S.value[0].value*100:0}%`})},null,4)])])]))),128))])]))]),d.value?(o(),k("div",jn,[t("span",null,c(e(a)("views.cluster.totalMembers"))+": "+c(d.value.stats.totalMembers),1),t("span",null,c(e(a)("views.cluster.totalMessages"))+": "+c(d.value.stats.totalMessages.toLocaleString()),1),t("span",null,c(e(a)("views.cluster.involvedMembers"))+": "+c(d.value.stats.involvedMembers),1),t("span",null,c(e(a)("views.cluster.edgeCount"))+": "+c(d.value.stats.edgeCount),1)])):D("",!0)])])}}}),Pn={class:"flex h-full flex-col"},qn={class:"min-h-0 flex-1 overflow-y-auto"},Gn=B({__name:"GroupRelationships",props:{sessionId:{},timeFilter:{}},setup(u){const{t:s}=te(),a=u,n=I("mention-graph"),m=$(()=>[{id:"mention-graph",label:s("analysis.subTabs.groupRelationships.mentionGraph"),icon:"i-heroicons-arrows-right-left"},{id:"mention-ranking",label:s("analysis.subTabs.groupRelationships.mentionRanking"),icon:"i-heroicons-heart"},{id:"proximity",label:s("analysis.subTabs.groupRelationships.proximity"),icon:"i-heroicons-user-group"}]);return(l,d)=>(o(),k("div",Pn,[y(e(Ge),{modelValue:n.value,"onUpdate:modelValue":d[0]||(d[0]=p=>n.value=p),items:m.value,"persist-key":"groupRelationshipsTab",size:"sm"},null,8,["modelValue","items"]),t("div",qn,[y(Ve,{name:"fade",mode:"out-in"},{default:M(()=>[n.value==="mention-graph"?(o(),C(no,{key:0,"session-id":a.sessionId,"time-filter":a.timeFilter},null,8,["session-id","time-filter"])):n.value==="mention-ranking"?(o(),C(Oo,{key:1,"session-id":a.sessionId,"time-filter":a.timeFilter},null,8,["session-id","time-filter"])):n.value==="proximity"?(o(),C(En,{key:2,"session-id":a.sessionId,"time-filter":a.timeFilter},null,8,["session-id","time-filter"])):D("",!0)]),_:1})])]))}}),Yn=Le(Gn,[["__scopeId","data-v-531340f2"]]),Kn={class:"flex h-full flex-col"},Jn={class:"flex-1 min-h-0 overflow-y-auto"},Qn=B({__name:"ViewTab",props:{sessionId:{},sessionName:{},timeFilter:{}},setup(u){const{t:s,locale:a}=te(),n=u,m=$(()=>{const h=[{id:"type-analysis",label:s("analysis.subTabs.view.typeAnalysis"),icon:"i-heroicons-chart-pie"},{id:"time-analysis",label:s("analysis.subTabs.view.timeAnalysis"),icon:"i-heroicons-clock"},{id:"topic",label:s("analysis.subTabs.view.topic"),icon:"i-heroicons-cloud"},{id:"group-relationships",label:s("analysis.subTabs.view.groupRelationships"),icon:"i-heroicons-heart"},{id:"hot-repeat",label:s("analysis.subTabs.quotes.hotRepeat"),icon:"i-heroicons-fire"},{id:"catchphrase",label:s("analysis.subTabs.quotes.catchphrase"),icon:"i-heroicons-chat-bubble-bottom-center-text"}];return pt("groupRanking",a.value)&&h.splice(2,0,{id:"ranking",label:s("analysis.subTabs.view.ranking"),icon:"i-heroicons-trophy"}),h}),l=I("type-analysis"),d=I(null),p=$(()=>({...n.timeFilter,memberId:d.value}));return(h,b)=>(o(),k("div",Kn,[y(e(Ge),{modelValue:l.value,"onUpdate:modelValue":b[1]||(b[1]=x=>l.value=x),items:m.value,"persist-key":"groupViewTab"},{right:M(()=>[l.value!=="topic"?(o(),C(St,{key:0,modelValue:d.value,"onUpdate:modelValue":b[0]||(b[0]=x=>d.value=x),"session-id":n.sessionId},null,8,["modelValue","session-id"])):D("",!0)]),_:1},8,["modelValue","items"]),t("div",Jn,[y(Ve,{name:"fade",mode:"out-in"},{default:M(()=>[l.value==="type-analysis"?(o(),C(Mt,{key:0,"session-id":n.sessionId,"session-name":n.sessionName,"time-filter":p.value},null,8,["session-id","session-name","time-filter"])):l.value==="time-analysis"?(o(),C(Tt,{key:1,"session-id":n.sessionId,"session-name":n.sessionName,"time-filter":p.value},null,8,["session-id","session-name","time-filter"])):l.value==="topic"?(o(),C(e(Vt),{key:2,"session-id":n.sessionId,"time-filter":n.timeFilter},null,8,["session-id","time-filter"])):l.value==="group-relationships"?(o(),C(Yn,{key:3,"session-id":n.sessionId,"time-filter":p.value},null,8,["session-id","time-filter"])):l.value==="ranking"?(o(),C(Es,{key:4,"session-id":n.sessionId,"time-filter":p.value},null,8,["session-id","time-filter"])):l.value==="hot-repeat"?(o(),C(e(ja),{key:5,"session-id":n.sessionId,"time-filter":n.timeFilter},null,8,["session-id","time-filter"])):l.value==="catchphrase"?(o(),C(e(Aa),{key:6,"session-id":n.sessionId,"time-filter":n.timeFilter},null,8,["session-id","time-filter"])):D("",!0)]),_:1})])]))}}),Zn=Le(Qn,[["__scopeId","data-v-ab94305e"]]),Xn={key:0,class:"mb-6"},el={class:"flex items-center gap-3"},tl={class:"text-xl font-bold text-gray-900 dark:text-white"},al={class:"text-sm text-gray-500 dark:text-gray-400"},sl={class:"mb-4 flex flex-wrap items-center justify-between gap-3"},ol={class:"flex items-center gap-2"},nl={class:"text-xs text-gray-500 dark:text-gray-400"},ll={key:0,class:"flex h-60 items-center justify-center"},il={key:1,class:"flex h-60 flex-col items-center justify-center"},rl={class:"text-gray-500 dark:text-gray-400"},cl={key:2,class:"flex min-h-0 flex-1 flex-col"},ul={class:"w-full"},dl={class:"sticky top-0 bg-gray-50 dark:bg-gray-800"},ml={class:"text-left text-xs font-medium uppercase text-gray-500 dark:text-gray-400"},vl={class:"px-4 py-4"},hl={class:"px-4 py-4"},pl={class:"px-4 py-4"},gl={class:"w-64 px-4 py-4"},fl={class:"inline-flex items-center gap-1.5"},yl={class:"px-4 py-4 text-right"},xl={class:"divide-y divide-gray-200 dark:divide-gray-700"},bl={class:"px-4 py-4"},kl={class:"px-4 py-4"},_l={class:"flex items-center gap-2"},wl=["src","alt"],$l={key:1,class:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-pink-400 to-pink-600 text-xs font-medium text-white"},Cl={class:"text-sm font-medium text-gray-900 dark:text-white"},Il={class:"ml-1 text-sm text-gray-500 dark:text-gray-400"},Sl={class:"px-4 py-4"},Ml={key:0,class:"text-sm font-medium text-gray-900 dark:text-white"},Tl={key:1,class:"text-sm text-gray-400 dark:text-gray-500"},Vl={class:"px-4 py-4"},Rl={class:"text-sm font-semibold text-gray-900 dark:text-white"},Ll={class:"px-4 py-4"},Dl={class:"max-w-xs"},Nl={key:0,class:"absolute right-2 top-1/2 -translate-y-1/2"},Al={class:"px-4 py-4 text-right"},zl={key:0,class:"flex items-center justify-between border-t border-gray-200 px-6 py-4 dark:border-gray-700"},Ul={class:"text-sm text-gray-500 dark:text-gray-400"},Fl={class:"flex items-center gap-2"},Hl={class:"text-sm font-medium text-gray-600 dark:text-gray-300"},Bl={class:"p-6 text-center"},Wl={class:"mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-full bg-red-100 dark:bg-red-900/30"},Ol={class:"mb-2 text-lg font-semibold text-gray-900 dark:text-white"},jl={class:"mb-6 text-sm text-gray-500 dark:text-gray-400"},El={class:"flex justify-center gap-3"},Pl={class:"p-6"},ql={class:"mb-4 flex items-center gap-3"},Gl={class:"flex h-10 w-10 items-center justify-center rounded-full bg-amber-100 dark:bg-amber-900/30"},Yl={class:"text-lg font-semibold text-gray-900 dark:text-white"},Kl={class:"mb-2 text-sm text-gray-600 dark:text-gray-400"},Jl={class:"mb-6 text-xs text-amber-700 dark:text-amber-300"},Ql={class:"flex justify-end gap-2"},Ie=20,Zl=B({__name:"MemberList",props:{sessionId:{},showHeader:{type:Boolean,default:!0}},emits:["data-changed"],setup(u,{emit:s}){const{t:a}=te(),n=u,m=s,l=I([]),d=I([]),p=I(!1),h=I(""),b=I(null),x=I(!1),r=I(new Set),i=I(!1),f=I(!1),w=I(1),g=I(0),v=I(0),_=I("desc"),S=I(null);let T=null;function z(A){return A.groupNickname||A.accountName||A.platformId}function P(A){return z(A).slice(0,1)}const V=$(()=>d.value.filter(A=>r.value.has(A.id))),N=$(()=>V.value.length===2),U=$(()=>{if(V.value.length!==2)return null;const[A,H]=V.value;return H.messageCount>A.messageCount||H.messageCount===A.messageCount&&H.id<A.id?{primary:H,secondary:A}:{primary:A,secondary:H}});function se(){_.value=_.value==="desc"?"asc":"desc",w.value=1,q()}async function q(){if(n.sessionId){p.value=!0;try{const A=await Z().getMembersPaginated(n.sessionId,{page:w.value,pageSize:Ie,search:h.value.trim(),sortOrder:_.value});l.value=A.items,g.value=A.total,v.value=A.totalPages}catch(A){console.error("加载成员列表失败:",A)}finally{p.value=!1}}}async function X(){if(n.sessionId)try{d.value=await Z().getMembers(n.sessionId)}catch(A){console.error("加载所有成员失败:",A)}}async function Q(A,H){const Y=JSON.parse(JSON.stringify(H)),L=JSON.stringify(A.aliases),ne=JSON.stringify(Y);if(L!==ne){S.value=A.id;try{if(await Z().updateMemberAliases(n.sessionId,A.id,Y)){const F=l.value.findIndex(we=>we.id===A.id);F!==-1&&(l.value[F]={...l.value[F],aliases:Y})}}catch(ue){console.error("保存别名失败:",ue)}finally{S.value=null}}}function R(A){b.value=A}function G(){b.value=null}async function he(){if(b.value){x.value=!0;try{await Z().deleteMember(n.sessionId,b.value.id)&&(await q(),await X(),m("data-changed"))}catch(A){console.error("删除成员失败:",A)}finally{x.value=!1,b.value=null}}}function ke(A){const H=new Set(r.value);H.has(A)?H.delete(A):H.add(A),r.value=H}function ye(){N.value&&(i.value=!0)}function xe(){r.value=new Set}async function _e(){if(U.value){f.value=!0;try{await Z().mergeMembers(n.sessionId,U.value.primary.id,U.value.secondary.id)&&(i.value=!1,xe(),await q(),await X(),m("data-changed"))}catch(A){console.error("合并成员失败:",A)}finally{f.value=!1}}}return O(h,()=>{w.value=1,T&&clearTimeout(T),T=setTimeout(()=>{q()},300)}),O(w,()=>{q()}),O(()=>n.sessionId,()=>{h.value="",w.value=1,xe(),q(),X()},{immediate:!0}),fe(()=>{q(),X()}),(A,H)=>{const Y=ce,L=We,ne=Me,ue=ot,F=nt,we=lt,De=ge;return o(),k("div",{class:J(["main-content",n.showHeader?"max-w-5xl p-6":"flex h-full max-w-none flex-col overflow-hidden p-4"])},[n.showHeader?(o(),k("div",Xn,[t("div",el,[t("div",null,[t("h2",tl,c(e(a)("members.list.title")),1),t("p",al,c(e(a)("members.list.description",{count:g.value})),1)])])])):D("",!0),y(Rt,{class:"mb-6","session-id":u.sessionId,members:d.value,"chat-type":"group"},null,8,["session-id","members"]),t("div",sl,[y(L,{modelValue:h.value,"onUpdate:modelValue":H[1]||(H[1]=j=>h.value=j),placeholder:e(a)("members.list.searchPlaceholder"),icon:"i-heroicons-magnifying-glass",class:"w-full md:w-100"},Pe({_:2},[h.value?{name:"trailing",fn:M(()=>[y(Y,{icon:"i-heroicons-x-mark",variant:"link",color:"neutral",size:"xs",onClick:H[0]||(H[0]=j=>h.value="")})]),key:"0"}:void 0]),1032,["modelValue","placeholder"]),t("div",ol,[t("span",nl,c(e(a)("members.list.mergeSelectedCount",{count:r.value.size})),1),y(Y,{icon:"i-heroicons-link",size:"sm",color:"primary",disabled:!N.value,onClick:ye},{default:M(()=>[K(c(e(a)("members.list.mergeSelected")),1)]),_:1},8,["disabled"])])]),t("div",{class:J(["rounded-xl border border-gray-200 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-900",n.showHeader?"":"flex min-h-0 flex-1 flex-col"])},[p.value?(o(),k("div",ll,[y(ne,{name:"i-heroicons-arrow-path",class:"h-8 w-8 animate-spin text-pink-500"})])):l.value.length===0?(o(),k("div",il,[y(ne,{name:"i-heroicons-user-group",class:"mb-3 h-12 w-12 text-gray-300 dark:text-gray-600"}),t("p",rl,c(h.value?e(a)("members.list.noMatch"):e(a)("members.list.empty")),1)])):(o(),k("div",cl,[t("div",{class:J(["max-h-[500px] overflow-y-auto",n.showHeader?"":"max-h-none min-h-0 flex-1"])},[t("table",ul,[t("thead",dl,[t("tr",ml,[H[7]||(H[7]=t("th",{class:"w-12 px-4 py-4"},null,-1)),t("th",vl,c(e(a)("members.list.table.accountName")),1),t("th",hl,c(e(a)("members.list.table.groupNickname")),1),t("th",pl,[t("button",{class:"flex items-center gap-1.5 hover:text-gray-700 dark:hover:text-gray-200",onClick:se},[K(c(e(a)("members.list.table.messageCount"))+" ",1),y(ne,{name:_.value==="desc"?"i-heroicons-arrow-down":"i-heroicons-arrow-up",class:"h-3.5 w-3.5"},null,8,["name"])])]),t("th",gl,[t("div",fl,[t("span",null,c(e(a)("members.list.table.customAlias")),1),y(ue,{text:e(a)("members.list.tip"),popper:{placement:"top"}},{default:M(()=>[y(ne,{name:"i-heroicons-question-mark-circle",class:"h-4 w-4 text-gray-400 dark:text-gray-500"})]),_:1},8,["text"])])]),t("th",yl,c(e(a)("members.list.table.actions")),1)])]),t("tbody",xl,[(o(!0),k(W,null,ee(l.value,j=>(o(),k("tr",{key:j.id,class:"hover:bg-gray-50 dark:hover:bg-gray-800/50"},[t("td",bl,[y(F,{"model-value":r.value.has(j.id),onClick:Ee($e=>ke(j.id),["stop"])},null,8,["model-value","onClick"])]),t("td",kl,[t("div",_l,[j.avatar?(o(),k("img",{key:0,src:j.avatar,alt:z(j),class:"h-8 w-8 shrink-0 rounded-full object-cover"},null,8,wl)):(o(),k("div",$l,c(P(j)),1)),t("div",null,[t("span",Cl,c(j.accountName||"-"),1),t("span",Il,"("+c(j.platformId)+")",1)])])]),t("td",Sl,[j.groupNickname?(o(),k("span",Ml,c(j.groupNickname),1)):(o(),k("span",Tl,"-"))]),t("td",Vl,[t("span",Rl,c(j.messageCount.toLocaleString()),1)]),t("td",Ll,[t("div",Dl,[y(we,{"model-value":j.aliases,placeholder:e(a)("members.list.aliasPlaceholder"),class:"w-80","onUpdate:modelValue":$e=>Q(j,$e)},null,8,["model-value","placeholder","onUpdate:modelValue"]),S.value===j.id?(o(),k("div",Nl,[y(ne,{name:"i-heroicons-arrow-path",class:"h-4 w-4 animate-spin text-pink-500"})])):D("",!0)])]),t("td",Al,[y(Y,{label:e(a)("members.list.delete"),size:"xs",onClick:$e=>R(j)},null,8,["label","onClick"])])]))),128))])])],2),v.value>1?(o(),k("div",zl,[t("p",Ul,c(e(a)("members.list.pagination",{start:(w.value-1)*Ie+1,end:Math.min(w.value*Ie,g.value),total:g.value})),1),t("div",Fl,[y(Y,{icon:"i-heroicons-chevron-left",variant:"outline",size:"sm",disabled:w.value===1||p.value,onClick:H[2]||(H[2]=j=>w.value--)},null,8,["disabled"]),t("span",Hl,c(w.value)+" / "+c(v.value),1),y(Y,{icon:"i-heroicons-chevron-right",variant:"outline",size:"sm",disabled:w.value>=v.value||p.value,onClick:H[3]||(H[3]=j=>w.value++)},null,8,["disabled"])])])):D("",!0)]))],2),y(De,{open:!!b.value,ui:{content:"max-w-sm"},"onUpdate:open":H[4]||(H[4]=j=>b.value=null)},{content:M(()=>[t("div",Bl,[t("div",Wl,[y(ne,{name:"i-heroicons-exclamation-triangle",class:"h-7 w-7 text-red-500"})]),t("h3",Ol,c(e(a)("members.list.modal.title")),1),t("p",jl,c(e(a)("members.list.modal.content",{name:b.value?z(b.value):"",count:b.value?.messageCount.toLocaleString()})),1),t("div",El,[y(Y,{variant:"outline",onClick:G},{default:M(()=>[K(c(e(a)("members.list.modal.cancel")),1)]),_:1}),y(Y,{color:"error",loading:x.value,onClick:he},{default:M(()=>[K(c(e(a)("members.list.modal.confirm")),1)]),_:1},8,["loading"])])])]),_:1},8,["open"]),y(De,{open:i.value,ui:{content:"max-w-md"},"onUpdate:open":H[6]||(H[6]=j=>i.value=j)},{content:M(()=>[t("div",Pl,[t("div",ql,[t("div",Gl,[y(ne,{name:"i-heroicons-link",class:"h-5 w-5 text-amber-600 dark:text-amber-400"})]),t("h3",Yl,c(e(a)("members.list.mergeModal.title")),1)]),t("p",Kl,c(e(a)("members.list.mergeModal.content",{source:U.value?z(U.value.secondary):"",sourceCount:U.value?U.value.secondary.messageCount.toLocaleString():"0",target:U.value?z(U.value.primary):"",targetCount:U.value?U.value.primary.messageCount.toLocaleString():"0"})),1),t("p",Jl,c(e(a)("members.list.mergeModal.hint")),1),t("div",Ql,[y(Y,{variant:"outline",disabled:f.value,onClick:H[5]||(H[5]=j=>i.value=!1)},{default:M(()=>[K(c(e(a)("members.list.mergeModal.cancel")),1)]),_:1},8,["disabled"]),y(Y,{color:"primary",loading:f.value,onClick:_e},{default:M(()=>[K(c(e(a)("members.list.mergeModal.confirm")),1)]),_:1},8,["loading"])])])]),_:1},8,["open"])],2)}}}),Xl={class:"main-content max-w-5xl p-6"},ei={class:"mb-4 text-sm text-gray-500 dark:text-gray-400 no-capture"},ti={key:0,class:"divide-y divide-gray-100 dark:divide-gray-800"},ai={class:"w-32 shrink-0 pt-0.5 font-medium text-gray-900 dark:text-white"},si={class:"flex flex-1 flex-wrap items-center gap-2"},oi={class:"flex items-center gap-1.5 rounded-lg bg-gray-50 px-3 py-1.5 dark:bg-gray-800"},ni={class:"text-xs text-gray-400"},li={key:0,class:"text-gray-300 dark:text-gray-600"},ii=B({__name:"NicknameHistory",props:{sessionId:{}},setup(u){const{t:s}=te(),a=u,n=I([]),m=I([]),l=I(!1);function d(b){return b.groupNickname||b.accountName||b.platformId}async function p(){if(a.sessionId)try{n.value=await Z().getMembers(a.sessionId)}catch(b){console.error("加载成员列表失败:",b)}}async function h(){if(!a.sessionId||n.value.length===0)return;l.value=!0;const b=[];try{const x=n.value.map(i=>Z().getMemberNameHistory(a.sessionId,i.id)),r=await Promise.all(x);n.value.forEach((i,f)=>{const w=r[f];w.length>2&&b.push({memberId:i.id,name:d(i),history:w})}),m.value=b}catch(x){console.error("加载昵称变更记录失败:",x)}finally{l.value=!1}}return O(()=>a.sessionId,async()=>{await p()},{immediate:!0}),O(()=>n.value.length,()=>{n.value.length>0&&h()}),fe(async()=>{n.value.length===0&&await p()}),(b,x)=>{const r=Be;return o(),k("div",Xl,[t("p",ei,c(e(s)("members.nicknameHistory.note")),1),y(e(E),{title:e(s)("members.nicknameHistory.title"),description:l.value?e(s)("members.nicknameHistory.loading"):m.value.length>0?e(s)("members.nicknameHistory.hasChanges",{count:m.value.length}):e(s)("members.nicknameHistory.noChanges")},{default:M(()=>[!l.value&&m.value.length>0?(o(),k("div",ti,[(o(!0),k(W,null,ee(m.value,i=>(o(),k("div",{key:i.memberId,class:"flex items-start gap-3 px-5 py-3"},[t("div",ai,c(i.name),1),t("div",si,[(o(!0),k(W,null,ee(i.history,(f,w)=>(o(),k(W,{key:w},[t("div",oi,[t("span",{class:J(["text-sm",f.endTs===null?"font-semibold text-pink-600":"text-gray-700 dark:text-gray-300"])},c(f.name),3),f.endTs===null?(o(),C(r,{key:0,color:"primary",variant:"soft",size:"xs"},{default:M(()=>[K(c(e(s)("members.nicknameHistory.current")),1)]),_:1})):D("",!0),t("span",ni,"("+c(e(Lt)(f.startTs,f.endTs))+")",1)]),w<i.history.length-1?(o(),k("span",li,"→")):D("",!0)],64))),128))])]))),128))])):l.value?(o(),C(e(oe),{key:2,text:e(s)("members.nicknameHistory.loadingText")},null,8,["text"])):(o(),C(e(le),{key:1,text:e(s)("members.nicknameHistory.empty")},null,8,["text"]))]),_:1},8,["title","description"])])}}}),ri={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-gray-900"},ci={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},ui={class:"text-lg font-semibold text-gray-900 dark:text-white"},di={class:"flex-1 overflow-auto"},mi=B({__name:"NicknameHistoryEntry",props:{sessionId:{}},setup(u){const{t:s}=te(),a=u,n=I(!1);return(m,l)=>{const d=ce,p=ge;return o(),k(W,null,[y(d,{variant:"ghost",icon:"i-heroicons-clock",size:"sm",onClick:l[0]||(l[0]=h=>n.value=!0)},{default:M(()=>[K(c(e(s)("analysis.subTabs.member.nicknameHistory")),1)]),_:1}),a.sessionId?(o(),C(p,{key:0,open:n.value,"onUpdate:open":l[2]||(l[2]=h=>n.value=h),ui:{content:"max-w-6xl h-[85vh]"}},{content:M(()=>[t("div",ri,[t("div",ci,[t("h2",ui,c(e(s)("analysis.subTabs.member.nicknameHistory")),1),y(d,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:l[1]||(l[1]=h=>n.value=!1)})]),t("div",di,[y(ii,{"session-id":a.sessionId},null,8,["session-id"])])])]),_:1},8,["open"])):D("",!0)],64)}}}),vi={class:"flex h-full flex-col bg-white dark:bg-gray-900",style:{"padding-top":"var(--titlebar-area-height)"}},hi={class:"relative flex-1 overflow-y-auto"},pi={class:"h-full"},gi={key:2,class:"flex h-full items-center justify-center"},fi={class:"text-gray-500"},yi={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-gray-900"},xi={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},bi={class:"text-lg font-semibold text-gray-900 dark:text-white"},ki={class:"text-sm text-gray-500 dark:text-gray-400"},_i={class:"flex items-center gap-2"},wi={class:"flex-1 overflow-hidden"},$i=B({__name:"index",setup(u){const s=je(()=>He(()=>import("./MessageExportModal-rijqUusq.js"),__vite__mapDeps([5,6,4,7,8,9]))),{t:a}=te(),n=it(),m=rt(),l=gt(),d=Re(),p=ft(),{currentSessionId:h}=yt(l),b=I(!1),x=I(!1),r=I(!1),i=I(!1),f=I(!1),w=I(!1);function g(){d.openChatRecordDrawer({})}const v=[{id:"overview",labelKey:"analysis.tabs.overview",icon:"i-heroicons-chart-pie"},{id:"view",labelKey:"analysis.tabs.view",icon:"i-heroicons-presentation-chart-bar"},{id:"ai-chat",labelKey:"analysis.tabs.aiChat",icon:"i-heroicons-chat-bubble-left-ellipsis"},{id:"lab",labelKey:"analysis.tabs.lab",icon:"i-heroicons-beaker"}],_=$(()=>p.debugMode?[...v,{id:"debug",labelKey:"analysis.tabs.debug",icon:"i-heroicons-bug-ant"}]:v),S=$(()=>_.value.map(Y=>Y.id)),{activeTab:T,isLoading:z,isInitialLoad:P,session:V,memberActivity:N,hourlyActivity:U,dailyActivity:se,messageTypes:q,timeRangeValue:X,fullTimeRange:Q,availableYears:R,timeFilter:G,selectedYearForOverview:he,initialTimeState:ke,loadData:ye}=Dt({route:n,router:m,currentSessionId:h,selectSession:l.selectSession,defaultTab:p.defaultSessionTab,validTabIds:S.value}),xe=$(()=>N.value.slice(0,3)),_e=$(()=>N.value.length<=1?[]:[...N.value].sort((Y,L)=>Y.messageCount-L.messageCount).slice(0,1)),A=$(()=>N.value.reduce((Y,L)=>Y+L.messageCount,0)),H=$(()=>N.value.filter(Y=>Y.messageCount>0).length);return(Y,L)=>{const ne=ce,ue=ge;return o(),k("div",vi,[e(P)?(o(),C(oe,{key:0,variant:"page",text:e(a)("analysis.groupChat.loading")},null,8,["text"])):e(V)?(o(),k(W,{key:1},[y(Nt,{"active-tab":e(T),"onUpdate:activeTab":L[0]||(L[0]=F=>Ne(T)?T.value=F:null),"time-range-value":e(X),"onUpdate:timeRangeValue":L[1]||(L[1]=F=>Ne(X)?X.value=F:null),title:e(V).name,avatar:e(V).groupAvatar,icon:"i-heroicons-chat-bubble-left-right","icon-class":"bg-primary-600 text-white dark:bg-primary-500 dark:text-white",tabs:_.value,"current-session-id":e(h),"initial-time-state":e(ke),onOpenIncrementalImport:L[2]||(L[2]=F=>i.value=!0),onOpenMemberManagement:L[3]||(L[3]=F=>w.value=!0),onOpenChatRecord:g,"onUpdate:fullRange":L[4]||(L[4]=F=>Q.value=F),"onUpdate:availableYears":L[5]||(L[5]=F=>R.value=F)},null,8,["active-tab","time-range-value","title","avatar","tabs","current-session-id","initial-time-state"]),t("div",hi,[e(z)?(o(),C(oe,{key:0,variant:"overlay"})):D("",!0),t("div",pi,[y(Ve,{name:"tab-slide",mode:"out-in"},{default:M(()=>[e(T)==="overview"?(o(),C(Ya,{key:"overview-"+e(h),session:e(V),"member-activity":e(N),"top-members":xe.value,"bottom-members":_e.value,"message-types":e(q),"hourly-activity":e(U),"daily-activity":e(se),"time-range":e(Q),"selected-year":e(he),"filtered-message-count":A.value,"filtered-member-count":H.value,"time-filter":e(G)},null,8,["session","member-activity","top-members","bottom-members","message-types","hourly-activity","daily-activity","time-range","selected-year","filtered-message-count","filtered-member-count","time-filter"])):e(T)==="view"?(o(),C(Zn,{key:"view-"+e(h),"session-id":e(h),"session-name":e(V).name,"time-filter":e(G)},null,8,["session-id","session-name","time-filter"])):e(T)==="ai-chat"?(o(),C(e(Bt),{key:"ai-chat-"+e(h),"session-id":e(h),"session-name":e(V).name,"chat-type":"group"},null,8,["session-id","session-name"])):e(T)==="memory"?(o(),C(Wt,{key:"memory-"+e(h),"session-id":e(h),"session-name":e(V).name},null,8,["session-id","session-name"])):e(T)==="lab"?(o(),C(Ot,{key:"lab-"+e(h),"session-id":e(h),"session-name":e(V).name,"time-filter":e(G),"chat-type":"group",mode:"sql-only"},null,8,["session-id","session-name","time-filter"])):e(T)==="debug"?(o(),C(e(jt),{key:"debug-"+e(h),"session-id":e(h)},null,8,["session-id"])):D("",!0)]),_:1})])]),y(At,{onOpenIncrementalImport:L[6]||(L[6]=F=>i.value=!0),onOpenSessionIndex:L[7]||(L[7]=F=>b.value=!0),onOpenSemanticIndex:L[8]||(L[8]=F=>x.value=!0),onOpenMemberManagement:L[9]||(L[9]=F=>w.value=!0),onOpenChatRecord:g,onOpenMessageExport:L[10]||(L[10]=F=>f.value=!0)}),e(p).debugMode?(o(),C(Et,{key:0})):D("",!0)],64)):(o(),k("div",gi,[t("p",fi,c(e(a)("analysis.groupChat.loadError")),1)])),e(h)&&e(V)&&e(V).messageCount>0?(o(),C(zt,{key:3,modelValue:b.value,"onUpdate:modelValue":L[11]||(L[11]=F=>b.value=F),"session-id":e(h),"message-count":e(V).messageCount},null,8,["modelValue","session-id","message-count"])):D("",!0),e(h)&&e(V)?(o(),C(Ut,{key:4,modelValue:x.value,"onUpdate:modelValue":L[12]||(L[12]=F=>x.value=F),"session-id":e(h),"message-count":e(V).messageCount},null,8,["modelValue","session-id","message-count"])):D("",!0),e(h)&&e(V)&&!b.value?(o(),C(Ft,{key:5,modelValue:r.value,"onUpdate:modelValue":L[13]||(L[13]=F=>r.value=F),"session-id":e(h),"chat-type":"group","auto-check":""},null,8,["modelValue","session-id"])):D("",!0),e(h)&&e(V)?(o(),C(Ht,{key:6,modelValue:i.value,"onUpdate:modelValue":L[14]||(L[14]=F=>i.value=F),"session-id":e(h),"session-name":e(V).name,onImported:L[15]||(L[15]=()=>{e(ye)(),e(l).loadSessions()})},null,8,["modelValue","session-id","session-name"])):D("",!0),e(h)?(o(),C(e(s),{key:7,modelValue:f.value,"onUpdate:modelValue":L[16]||(L[16]=F=>f.value=F)},null,8,["modelValue"])):D("",!0),e(h)?(o(),C(ue,{key:8,open:w.value,"onUpdate:open":L[18]||(L[18]=F=>w.value=F),ui:{content:"max-w-6xl h-[85vh]"}},{content:M(()=>[t("div",yi,[t("div",xi,[t("div",null,[t("h2",bi,c(e(a)("analysis.tooltip.memberManagement")),1),t("p",ki,c(e(a)("members.list.description",{count:e(V)?.memberCount??0})),1)]),t("div",_i,[y(mi,{"session-id":e(h)},null,8,["session-id"]),y(ne,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:L[17]||(L[17]=F=>w.value=!1)})])]),t("div",wi,[y(Zl,{"session-id":e(h),"show-header":!1,onDataChanged:e(ye)},null,8,["session-id","onDataChanged"])])])]),_:1},8,["open"])):D("",!0)])}}}),Ni=Le($i,[["__scopeId","data-v-171dcd94"]]);export{Ni as default};
|