chatlab-cli 0.37.0 → 0.37.1

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.
Files changed (148) hide show
  1. package/dist/{chat-command-WBAJBKIE.mjs → chat-command-YAFRLHMQ.mjs} +8 -8
  2. package/dist/{chunk-N2WGG3MS.mjs → chunk-2PY4XCH3.mjs} +6 -3
  3. package/dist/chunk-2PY4XCH3.mjs.map +1 -0
  4. package/dist/{chunk-FM3GXNEO.mjs → chunk-73TJ2S7W.mjs} +2 -2
  5. package/dist/{chunk-MSMDLDPB.mjs → chunk-ARIBCH47.mjs} +4 -4
  6. package/dist/{chunk-CR2MU7LN.mjs → chunk-FPVRSXQ4.mjs} +12 -12
  7. package/dist/{chunk-DQR2YS3I.mjs → chunk-GKCIRKOH.mjs} +8 -6
  8. package/dist/{chunk-DQR2YS3I.mjs.map → chunk-GKCIRKOH.mjs.map} +1 -1
  9. package/dist/{chunk-5YOHLJFB.mjs → chunk-JWJREWVN.mjs} +24 -7
  10. package/dist/chunk-JWJREWVN.mjs.map +1 -0
  11. package/dist/{chunk-RXMSZIYD.mjs → chunk-MMTEGUQA.mjs} +3 -3
  12. package/dist/{chunk-EJBBVLUN.mjs → chunk-N4SB6QZV.mjs} +2 -2
  13. package/dist/{chunk-4J4MA3RC.mjs → chunk-OTYNMDDL.mjs} +83 -55
  14. package/dist/chunk-OTYNMDDL.mjs.map +1 -0
  15. package/dist/{chunk-SQWN4GTQ.mjs → chunk-PDQV4RUA.mjs} +2 -2
  16. package/dist/{chunk-DKIYHA3O.mjs → chunk-UP6JIV3S.mjs} +15 -22
  17. package/dist/chunk-UP6JIV3S.mjs.map +1 -0
  18. package/dist/{chunk-2TV7M4CC.mjs → chunk-WDLO7OLX.mjs} +2 -2
  19. package/dist/cli.mjs +9 -9
  20. package/dist/contacts-worker.mjs +2 -2
  21. package/dist/global-insight-worker.mjs +1 -1
  22. package/dist/{http-X6OEOOSH.mjs → http-LPFPVTBC.mjs} +12 -12
  23. package/dist/{import-WBJ6YIQ7.mjs → import-T4WX2ZJL.mjs} +7 -7
  24. package/dist/index.mjs +12 -12
  25. package/dist/{mcp-FR6OKWKL.mjs → mcp-SMF3NWIN.mjs} +8 -8
  26. package/dist/people-relationships-worker.mjs +2 -2
  27. package/dist/semantic-index-worker.mjs +1 -1
  28. package/dist/{src-WE5HNN2O.mjs → src-EGLLMTAU.mjs} +6 -6
  29. package/dist/{stream-import-YYQVZDGQ.mjs → stream-import-2BXJTTCE.mjs} +7 -7
  30. package/dist/{worker-runtime-YGB5ZDE4.mjs → worker-runtime-RDLSPXFT.mjs} +5 -5
  31. package/dist-cli-web/assets/{AISettingsTab-Co2sM1iY.js → AISettingsTab-CEhrXlYR.js} +1 -1
  32. package/dist-cli-web/assets/{AboutTab-DQ8r6mYE.js → AboutTab-Bbu0SsMM.js} +1 -1
  33. package/dist-cli-web/assets/{ActionToolsPanel-CmYpw8Mt.css → ActionToolsPanel-DDNXXH8v.css} +1 -1
  34. package/dist-cli-web/assets/ActionToolsPanel.vue_vue_type_script_setup_true_lang-IB1yZxCE.js +75 -0
  35. package/dist-cli-web/assets/{Alert-DU1tLAAg.js → Alert-510jTN3l.js} +1 -1
  36. package/dist-cli-web/assets/{ApiSettingsTab-D5g5b79L.js → ApiSettingsTab-Bi1GRMN4.js} +1 -1
  37. package/dist-cli-web/assets/{BatchManageTab-BFUyVaGU.js → BatchManageTab-DhnqMCSM.js} +1 -1
  38. package/dist-cli-web/assets/{BufferResource-C-RfYwQW.js → BufferResource-CKZxnACp.js} +1 -1
  39. package/dist-cli-web/assets/{CanvasRenderer-Dz7JAMrR.js → CanvasRenderer-BeK5POBy.js} +1 -1
  40. package/dist-cli-web/assets/{CardDecoration-D28DI1G9.js → CardDecoration-RuBA3N2j.js} +1 -1
  41. package/dist-cli-web/assets/{ChatRecordDrawer-Cph819yY.js → ChatRecordDrawer-BY_-lIEj.js} +1 -1
  42. package/dist-cli-web/assets/{ChatRecordWorkspace-BAfERdPc.js → ChatRecordWorkspace-7prKd-Tq.js} +1 -1
  43. package/dist-cli-web/assets/{Checkbox-B8uqt13j.js → Checkbox-_eH64bb0.js} +1 -1
  44. package/dist-cli-web/assets/{DataDirCleanupNotice-3sGBE5vU.js → DataDirCleanupNotice-BHaXwlfr.js} +1 -1
  45. package/dist-cli-web/assets/{DatePicker.vue_vue_type_script_setup_true_lang-CQuub8-f.js → DatePicker.vue_vue_type_script_setup_true_lang-D9Ul_GYz.js} +1 -1
  46. package/dist-cli-web/assets/{DebugToolsPanel-Cwkr0BOY.js → DebugToolsPanel-ByKItGrS.js} +1 -1
  47. package/dist-cli-web/assets/{EChart.vue_vue_type_script_setup_true_lang-BuLujQCF.js → EChart.vue_vue_type_script_setup_true_lang-DubnuUXI.js} +1 -1
  48. package/dist-cli-web/assets/{EChartBar.vue_vue_type_script_setup_true_lang-DuA5xbcC.js → EChartBar.vue_vue_type_script_setup_true_lang-DKNCZuFm.js} +1 -1
  49. package/dist-cli-web/assets/{EChartLine.vue_vue_type_script_setup_true_lang-CvmMEfYq.js → EChartLine.vue_vue_type_script_setup_true_lang-Fl7xAOSR.js} +1 -1
  50. package/dist-cli-web/assets/{EChartWordcloud-CHVtyPR7.js → EChartWordcloud-C6XM4KOX.js} +1 -1
  51. package/dist-cli-web/assets/{FileDropZone.vue_vue_type_script_setup_true_lang-BKPy9Qv-.js → FileDropZone.vue_vue_type_script_setup_true_lang-DYDdRSNE.js} +1 -1
  52. package/dist-cli-web/assets/{Filter-CMfRHIoK.js → Filter-CByj_rCR.js} +1 -1
  53. package/dist-cli-web/assets/{GlobalTaskBar-Jz6MASCu.js → GlobalTaskBar-BdELjzrs.js} +1 -1
  54. package/dist-cli-web/assets/{GroupRelationshipGalaxyView-Ch4obfEq.js → GroupRelationshipGalaxyView-CnzPEgUS.js} +1 -1
  55. package/dist-cli-web/assets/{Label-CuryuymO.js → Label-DCIcxkhU.js} +1 -1
  56. package/dist-cli-web/assets/{LoadingState.vue_vue_type_script_setup_true_lang-CoeQsaiL.js → LoadingState.vue_vue_type_script_setup_true_lang-BBcCt_Qm.js} +1 -1
  57. package/dist-cli-web/assets/{MessageExportModal-JqGZ-iLr.js → MessageExportModal-DNU16Bs8.js} +1 -1
  58. package/dist-cli-web/assets/{PageHeader-D4up77TB.js → PageHeader-CKeZjNNR.js} +1 -1
  59. package/dist-cli-web/assets/{PageTabs.vue_vue_type_script_setup_true_lang-DYQRFk9s.js → PageTabs.vue_vue_type_script_setup_true_lang-C8M3wNNH.js} +1 -1
  60. package/dist-cli-web/assets/{RelationshipGalaxyCanvas-Cn7Eta5U.js → RelationshipGalaxyCanvas-CDhljGyJ.js} +3 -3
  61. package/dist-cli-web/assets/{RelationshipGalaxyThreeCanvas-LlaX57z6.js → RelationshipGalaxyThreeCanvas-BP8fsvvf.js} +1 -1
  62. package/dist-cli-web/assets/{RenderTargetSystem-JhA2PUFi.js → RenderTargetSystem-D76QrDT_.js} +1 -1
  63. package/dist-cli-web/assets/{RovingFocusItem-DHaiTb4j.js → RovingFocusItem-BJMUQ5DJ.js} +1 -1
  64. package/dist-cli-web/assets/{ScreenCaptureModal-Bxhyt5g1.js → ScreenCaptureModal-DkX4z-M1.js} +1 -1
  65. package/dist-cli-web/assets/{SectionTabs.vue_vue_type_script_setup_true_lang-BlAje3Tf.js → SectionTabs.vue_vue_type_script_setup_true_lang-qFhJO5B0.js} +1 -1
  66. package/dist-cli-web/assets/{Select-Beeqv0wU.js → Select-B5oJc5y1.js} +1 -1
  67. package/dist-cli-web/assets/SettingsModal-BO-QKQ2h.js +2 -0
  68. package/dist-cli-web/assets/{StorageTab-B7GHadia.js → StorageTab-CPPXXaRm.js} +1 -1
  69. package/dist-cli-web/assets/{Switch-u4zlvUMa.js → Switch-CDk3LZ4_.js} +1 -1
  70. package/dist-cli-web/assets/{Tabs-RWKHwtfM.js → Tabs-BMq9wODW.js} +1 -1
  71. package/dist-cli-web/assets/{Tabs-B7-Koq3x.js → Tabs-DqWTBV8x.js} +1 -1
  72. package/dist-cli-web/assets/{ThemeCard.vue_vue_type_script_setup_true_lang-ndsa3-aT.js → ThemeCard.vue_vue_type_script_setup_true_lang-D2outEOV.js} +1 -1
  73. package/dist-cli-web/assets/{TimeSelect.vue_vue_type_script_setup_true_lang-DKa1flT-.js → TimeSelect.vue_vue_type_script_setup_true_lang-BcflxP_U.js} +1 -1
  74. package/dist-cli-web/assets/{VisuallyHiddenInput-DGDqcvUy.js → VisuallyHiddenInput-BAFpkxMI.js} +1 -1
  75. package/dist-cli-web/assets/{WebGLRenderer-ifvgA1fe.js → WebGLRenderer-DjCPvR_O.js} +1 -1
  76. package/dist-cli-web/assets/{WebGPURenderer-DwzmuWF0.js → WebGPURenderer-C2B_u03z.js} +1 -1
  77. package/dist-cli-web/assets/aiChat--CR4g2M7.js +8 -0
  78. package/dist-cli-web/assets/{base-BWDX-164.js → base-F6s0vTrr.js} +1 -1
  79. package/dist-cli-web/assets/{browserAll-CSIIETeE.js → browserAll-DiUAZg4L.js} +1 -1
  80. package/dist-cli-web/assets/{chatMessages--r0obAVw.css → chatMessages-BGRbSlvD.css} +1 -1
  81. package/dist-cli-web/assets/{chatMessages-Zywjea1n.js → chatMessages-Bd33SSXI.js} +20 -20
  82. package/dist-cli-web/assets/{cli-web-BRY49NWe.js → cli-web-DoibEdj2.js} +1 -1
  83. package/dist-cli-web/assets/{fetch-jx1VdM9j.js → fetch-4nh1LaVF.js} +1 -1
  84. package/dist-cli-web/assets/{fetch-qBaUXqFt.js → fetch-7lUvXbhU.js} +1 -1
  85. package/dist-cli-web/assets/{fetch-DNSDHSqQ.js → fetch-BEaW1j5H.js} +1 -1
  86. package/dist-cli-web/assets/{fetch-wzv71PYy.js → fetch-B_YFABxI.js} +1 -1
  87. package/dist-cli-web/assets/{fetch-D3nLtFBi.js → fetch-BeX69kpS.js} +1 -1
  88. package/dist-cli-web/assets/{fetch-Bf4cqeM3.js → fetch-CRocA-4C.js} +1 -1
  89. package/dist-cli-web/assets/{fetch-BiXab0IF.js → fetch-CXM-cjDS.js} +1 -1
  90. package/dist-cli-web/assets/{fetch-Co2vLmiE.js → fetch-CXqeAbnY.js} +1 -1
  91. package/dist-cli-web/assets/{fetch-r6mhEGrP.js → fetch-CxVcHNid.js} +1 -1
  92. package/dist-cli-web/assets/fetch-DBpDMy29.js +1 -0
  93. package/dist-cli-web/assets/{fetch-mYSeL4Ki.js → fetch-DKBBS9Op.js} +1 -1
  94. package/dist-cli-web/assets/{fetch-DeHqF6yL.js → fetch-epFXmPIQ.js} +1 -1
  95. package/dist-cli-web/assets/{host-jXJHyyOX.js → host-C4rU8pKA.js} +1 -1
  96. package/dist-cli-web/assets/{host-1emQf9_4.js → host-CtSqR_Zm.js} +1 -1
  97. package/dist-cli-web/assets/{index-Cw0IhKZ6.js → index-4DVZ2g0M.js} +1 -1
  98. package/dist-cli-web/assets/{index-DnpnIyle.js → index-B1oj9KDv.js} +33 -33
  99. package/dist-cli-web/assets/{index-slDUxib2.js → index-BFH1j_R9.js} +1 -1
  100. package/dist-cli-web/assets/{index-DOqbUvhA.js → index-BvMAw3Zd.js} +1 -1
  101. package/dist-cli-web/assets/{index-2dJCozDq.js → index-CaYtkONV.js} +4 -4
  102. package/dist-cli-web/assets/{index-B4mJkX_d.js → index-CuCQ1d9f.js} +1 -1
  103. package/dist-cli-web/assets/index-D3Hyjv4e.js +137 -0
  104. package/dist-cli-web/assets/{index-ClHMs0-a.js → index-D8cHMqV-.js} +2 -2
  105. package/dist-cli-web/assets/{index-BQ463TS7.js → index-DlHuILT_.js} +1 -1
  106. package/dist-cli-web/assets/{index-6ejRbH3h.js → index-R4LqAnx9.js} +2 -2
  107. package/dist-cli-web/assets/{index-LV9LfFNu.js → index-_m1mf1jm.js} +1 -1
  108. package/dist-cli-web/assets/{index-CYc_VLgK.js → index-ekvsNmfe.js} +1 -1
  109. package/dist-cli-web/assets/{index-B7biznha.js → index-mXe1LssU.js} +1 -1
  110. package/dist-cli-web/assets/{index-BOcFyPCa.js → index-mbLXPIyC.js} +1 -1
  111. package/dist-cli-web/assets/{people-page-header-Cx5r9Bk2.js → people-page-header-BbYSSpsO.js} +1 -1
  112. package/dist-cli-web/assets/{prompt-BggEDxxi.js → prompt-C-ofJ7t_.js} +1 -1
  113. package/dist-cli-web/assets/{semantic-index-config-builder-1sO0aEc1.js → semantic-index-config-builder-D3TYVYC-.js} +1 -1
  114. package/dist-cli-web/assets/service-BYOUkk7V.js +1 -0
  115. package/dist-cli-web/assets/{service-Bvq1fRkC.js → service-CppETV4a.js} +1 -1
  116. package/dist-cli-web/assets/service-tEx-5LUL.js +1 -0
  117. package/dist-cli-web/assets/useFormControl-CrWi_6Hn.js +1 -0
  118. package/dist-cli-web/assets/{useTable-DC7oxmBl.js → useTable-Clk7ecq-.js} +1 -1
  119. package/dist-cli-web/assets/{useToast-CCPBE-Sy.js → useToast-B5LaA6c-.js} +1 -1
  120. package/dist-cli-web/assets/{webworkerAll-FCJk6reG.js → webworkerAll-CyA4b4LT.js} +1 -1
  121. package/dist-cli-web/index.html +1 -1
  122. package/package.json +3 -3
  123. package/dist/chunk-4J4MA3RC.mjs.map +0 -1
  124. package/dist/chunk-5YOHLJFB.mjs.map +0 -1
  125. package/dist/chunk-DKIYHA3O.mjs.map +0 -1
  126. package/dist/chunk-N2WGG3MS.mjs.map +0 -1
  127. package/dist-cli-web/assets/ActionToolsPanel.vue_vue_type_script_setup_true_lang--RPlmfIu.js +0 -75
  128. package/dist-cli-web/assets/SettingsModal-DV8yDBJs.js +0 -2
  129. package/dist-cli-web/assets/aiChat-BY4C3UQe.js +0 -8
  130. package/dist-cli-web/assets/fetch-C8CcoTWY.js +0 -1
  131. package/dist-cli-web/assets/index-kePiJ3ca.js +0 -137
  132. package/dist-cli-web/assets/service-DkPheDt8.js +0 -1
  133. package/dist-cli-web/assets/service-DvI8O_7K.js +0 -1
  134. package/dist-cli-web/assets/useFormControl-B0aShtLp.js +0 -1
  135. /package/dist/{chat-command-WBAJBKIE.mjs.map → chat-command-YAFRLHMQ.mjs.map} +0 -0
  136. /package/dist/{chunk-FM3GXNEO.mjs.map → chunk-73TJ2S7W.mjs.map} +0 -0
  137. /package/dist/{chunk-MSMDLDPB.mjs.map → chunk-ARIBCH47.mjs.map} +0 -0
  138. /package/dist/{chunk-CR2MU7LN.mjs.map → chunk-FPVRSXQ4.mjs.map} +0 -0
  139. /package/dist/{chunk-RXMSZIYD.mjs.map → chunk-MMTEGUQA.mjs.map} +0 -0
  140. /package/dist/{chunk-EJBBVLUN.mjs.map → chunk-N4SB6QZV.mjs.map} +0 -0
  141. /package/dist/{chunk-SQWN4GTQ.mjs.map → chunk-PDQV4RUA.mjs.map} +0 -0
  142. /package/dist/{chunk-2TV7M4CC.mjs.map → chunk-WDLO7OLX.mjs.map} +0 -0
  143. /package/dist/{http-X6OEOOSH.mjs.map → http-LPFPVTBC.mjs.map} +0 -0
  144. /package/dist/{import-WBJ6YIQ7.mjs.map → import-T4WX2ZJL.mjs.map} +0 -0
  145. /package/dist/{mcp-FR6OKWKL.mjs.map → mcp-SMF3NWIN.mjs.map} +0 -0
  146. /package/dist/{src-WE5HNN2O.mjs.map → src-EGLLMTAU.mjs.map} +0 -0
  147. /package/dist/{stream-import-YYQVZDGQ.mjs.map → stream-import-2BXJTTCE.mjs.map} +0 -0
  148. /package/dist/{worker-runtime-YGB5ZDE4.mjs.map → worker-runtime-RDLSPXFT.mjs.map} +0 -0
@@ -1,10 +1,10 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GroupRelationshipGalaxyView-Ch4obfEq.js","assets/index-DnpnIyle.js","assets/vendor-snapdom--nZvo8Sg.js","assets/index-BZpR015e.css","assets/LoadingState.vue_vue_type_script_setup_true_lang-CoeQsaiL.js","assets/RelationshipGalaxyThreeCanvas-LlaX57z6.js","assets/relationship-galaxy-connections-Cg4G5yYE.js","assets/relationship-galaxy-viewport-Cwfa51ER.js","assets/RelationshipGalaxyThreeCanvas-CCasBcBQ.css","assets/MessageExportModal-JqGZ-iLr.js","assets/useToast-CCPBE-Sy.js","assets/Tabs-B7-Koq3x.js","assets/Tabs-RWKHwtfM.js","assets/RovingFocusItem-DHaiTb4j.js"])))=>i.map(i=>d[i]);
2
- import{b as C,x as Oe,y as at,d as q,o as l,c as _,n as W,a as o,F as E,j as Q,p as y,r as ne,a0 as kt,f as k,O as _e,e as b,c0 as wt,E as st,g as t,w as $,z as x,a6 as te,aN as Me,l as D,aa as Ve,a8 as Ie,a9 as J,a7 as Se,J as je,K as z,L as ee,bs as ot,bt as nt,cE as _t,aq as lt,aQ as Ye,aR as Xe,cF as $t,a1 as Tt,H as Ke,I as Ct,C as Be,bO as It,aE as it,G as St,cG as Rt,ah as rt,aD as Mt,ay as Lt,ap as Vt,ab as At,aA as Nt,be as Qe}from"./index-DnpnIyle.js";import{b as j,a as le,c as Dt,d as Ft,u as qt,e as ut,I as Bt,f as Ut,g as Ht,h as Et,i as Pt,j as zt,C as Ot,k as jt,M as Kt,l as Wt,m as Gt,n as Yt,o as Xt}from"./ActionToolsPanel.vue_vue_type_script_setup_true_lang--RPlmfIu.js";import{_ as ct}from"./SectionTabs.vue_vue_type_script_setup_true_lang-BlAje3Tf.js";import"./vendor-echarts-wordcloud-DNiU8Psq.js";import{g as Qt}from"./base-BWDX-164.js";import{i as Ze}from"./chatMessages-Zywjea1n.js";import{_ as he,L as dt,u as Zt}from"./LoadingState.vue_vue_type_script_setup_true_lang-CoeQsaiL.js";import{_ as Jt}from"./index-Cw0IhKZ6.js";import{f as ze,a as ea,b as ta}from"./TimeSelect.vue_vue_type_script_setup_true_lang-DKa1flT-.js";import{_ as aa}from"./Switch-u4zlvUMa.js";import{a as mt}from"./Tabs-RWKHwtfM.js";import{u as sa}from"./prompt-BggEDxxi.js";import{_ as oa}from"./Select-Beeqv0wU.js";import{_ as ae}from"./EChart.vue_vue_type_script_setup_true_lang-BuLujQCF.js";import{T as ie}from"./Tabs-B7-Koq3x.js";import{_ as na}from"./EChartBar.vue_vue_type_script_setup_true_lang-DuA5xbcC.js";import{_ as la}from"./ThemeCard.vue_vue_type_script_setup_true_lang-ndsa3-aT.js";import{u as ia,o as ra,q as ua,t as ca,v as da,j as ma,i as va}from"./vendor-echarts-C9ugTmum.js";import{_ as pa}from"./useTable-DC7oxmBl.js";import"./vendor-snapdom--nZvo8Sg.js";import"./Checkbox-B8uqt13j.js";import"./useFormControl-B0aShtLp.js";import"./VisuallyHiddenInput-DGDqcvUy.js";import"./RovingFocusItem-DHaiTb4j.js";import"./Label-CuryuymO.js";import"./useToast-CCPBE-Sy.js";import"./service-Bvq1fRkC.js";import"./aiChat-BY4C3UQe.js";import"./chatlabSiteLocale-CrCNb8QP.js";import"./ChatRecordWorkspace-BAfERdPc.js";import"./DatePicker.vue_vue_type_script_setup_true_lang-CQuub8-f.js";import"./clamp-jFYhBC76.js";import"./semantic-index-config-builder-1sO0aEc1.js";import"./CardDecoration-D28DI1G9.js";import"./EChartLine.vue_vue_type_script_setup_true_lang-CvmMEfYq.js";import"./PageHeader-D4up77TB.js";import"./PageTabs.vue_vue_type_script_setup_true_lang-DYQRFk9s.js";import"./Alert-DU1tLAAg.js";import"./FileDropZone.vue_vue_type_script_setup_true_lang-BKPy9Qv-.js";import"./vendor-zrender-D8psf1AA.js";function ga(n,e={}){const{threshold:a=300,containerSelector:s=".overflow-y-auto",scrollLockDuration:u=800}=e,i=C(n[0]?.id||"");let c=!1;const g=C(null);let m=null;function f(){if(c)return;const v=[];n.forEach(d=>{const w=document.getElementById(d.id);if(w){const I=w.getBoundingClientRect();v.push({id:d.id,top:Math.round(I.top)})}});let r=0;for(let d=0;d<v.length;d++){if(v[d].top>a){r=Math.max(0,d-1);break}r=d}i.value=n[r]?.id||""}function h(v){const r=document.getElementById(v);r&&(i.value=v,c=!0,r.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{c=!1,f()},u))}return Oe(()=>{m=g.value?.closest(s)||null,m&&(m.addEventListener("scroll",f,{passive:!0}),f())}),at(()=>{m&&m.removeEventListener("scroll",f)}),{contentRef:g,activeAnchor:i,scrollToAnchor:h,updateActiveAnchor:f}}function $e(n){return n===0?"text-amber-500 dark:text-amber-400":n===1?"text-gray-500 dark:text-gray-300":n===2?"text-orange-600 dark:text-orange-400":"text-gray-400 dark:text-gray-500"}function Te(n){return String(n+1).padStart(2,"0")}function ha(n){return n===0?"from-amber-400 to-orange-500":n===1?"from-gray-300 to-gray-400":n===2?"from-orange-400 to-amber-600":"from-primary-300 to-primary-500"}const fa={class:"sticky top-24 space-y-6"},ya={class:"border-l border-gray-200 dark:border-gray-800"},ba=["onClick"],xa=q({__name:"PageAnchorsNav",props:{anchors:{},activeAnchor:{},width:{default:"w-44"},hideOnMobile:{type:Boolean,default:!0}},emits:["click"],setup(n,{emit:e}){const a=e;function s(u){a("click",u)}return(u,i)=>(l(),_("div",{class:W([n.width,"shrink-0",n.hideOnMobile?"hidden lg:block":""])},[o("div",fa,[o("nav",null,[o("div",ya,[(l(!0),_(E,null,Q(n.anchors,c=>(l(),_("button",{key:c.id,class:W(["-ml-px block border-l-2 py-1.5 pl-4 text-left text-sm transition-colors",[n.activeAnchor===c.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:g=>s(c.id)},y(c.label),11,ba))),128))])]),ne(u.$slots,"default")])],2))}}),re=q({__name:"TopNSelect",props:{modelValue:{default:10},modelModifiers:{}},emits:["update:modelValue"],setup(n){const e=kt(n,"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(s,u)=>{const i=oa;return l(),k(i,{modelValue:e.value,"onUpdate:modelValue":u[0]||(u[0]=c=>e.value=c),items:a,"value-key":"value",class:"w-25"},null,8,["modelValue"])}}}),fe=q({__name:"ScrollableChart",props:{contentHeight:{},maxHeightVh:{default:60},paddingClass:{default:"px-3 py-2"}},setup(n){const e=n,a=b(()=>typeof window>"u"?500:Math.round(window.innerHeight*e.maxHeightVh/100)),s=b(()=>e.contentHeight>a.value),u=b(()=>({maxHeight:`${e.maxHeightVh}vh`,overflowY:s.value?"auto":"hidden"}));return(i,c)=>(l(),_("div",{class:W(n.paddingClass),style:_e(u.value)},[ne(i.$slots,"default")],6))}}),vt=Symbol("ranking-avatar-map"),ka=new Map,wa={byId:ka,byName:new Map},_a=36,Ue=new Map,He=new Set,Je=new Set,et=C(0);function $a(n){const e=new Map;for(const a of n){const s=a.avatar?.trim();e.set(a.id,s||null)}return e}function Ta(n){const e=n?.trim();return e||null}function we(n,e,a){const s=e?.trim();!s||n.get(s)||(a?n.set(s,a):n.has(s)||n.set(s,null))}function Ca(n){const e=new Map;for(const a of n){const s=Ta(a.avatar);we(e,a.groupNickname,s),we(e,a.accountName,s),we(e,a.platformId,s),we(e,a.groupNickname||a.accountName||a.platformId,s);for(const u of a.aliases??[])we(e,u,s)}return e}function Ia(n){return{byId:$a(n),byName:Ca(n)}}function ve(n,e,a,s){const u=e?.trim();if(u)return u;if(n!=null&&n!==""){const g=typeof n=="number"?n:Number(n);if(Number.isFinite(g)){const m=a.get(g);if(m)return m}}const i=s?.name?.trim();if(i&&s?.byName)return s.byName.get(i)??null;if(n==null||n==="")return null;const c=typeof n=="number"?n:Number(n);return Number.isFinite(c)?a.get(c)??null:null}function Ce(n){const e=n.trim();return e?e.slice(0,1):"?"}function pt(){const n=st(vt,null);return b(()=>n?.value??wa)}function We(){const n=pt();return b(()=>n.value.byId)}function Sa(n,e){return n?e.get(n)??null:null}function Ra(n,e=_a){return typeof Image>"u"||typeof document>"u"?Promise.resolve(null):new Promise(a=>{const s=new Image;/^https?:/i.test(n)&&(s.crossOrigin="anonymous"),s.onload=()=>{try{const u=document.createElement("canvas");u.width=e,u.height=e;const i=u.getContext("2d");if(!i){a(null);return}i.beginPath(),i.arc(e/2,e/2,e/2,0,Math.PI*2),i.closePath(),i.clip();const c=s.naturalWidth||s.width,g=s.naturalHeight||s.height;if(c<=0||g<=0){a(null);return}const m=Math.max(e/c,e/g),f=c*m,h=g*m;i.drawImage(s,(e-f)/2,(e-h)/2,f,h),a(u.toDataURL("image/png"))}catch{a(null)}},s.onerror=()=>a(null),s.src=n})}function ye(n){const e=We();return wt(()=>{const a=e.value;for(const s of n()){const u=ve(s.memberId??s.id,s.avatar,a);!u||Ue.has(u)||Je.has(u)||He.has(u)||(He.add(u),Ra(u).then(i=>{He.delete(u),i?Ue.set(u,i):Je.add(u),et.value+=1}))}}),b(()=>{et.value;const a=e.value,s=new Map;for(const u of n()){const i=u.memberId??u.id,c=typeof i=="number"?i:Number(i);if(!Number.isFinite(c))continue;const g=ve(i,u.avatar,a);s.set(c,Sa(g,Ue))}return s})}const Ee=28,me=18,Pe="#4b5563",gt=Symbol("ranking-width-mode"),ht={standard:{contentClass:"max-w-3xl",gridLeft:110+Ee,labelMaxLength:8},wide:{contentClass:"max-w-5xl",gridLeft:180+Ee,labelMaxLength:16},full:{contentClass:"max-w-none",gridLeft:260+Ee,labelMaxLength:28}};function Ma(n){return n===1?"🥇":n===2?"🥈":n===3?"🥉":`${n}.`}function be(){const n=st(gt,null);return b(()=>ht[n?.value??"standard"])}function La(n,e){return n.length<=e?n:`${n.slice(0,e)}…`}function Va(n){return n?{width:me,height:me,borderRadius:me/2,backgroundColor:{image:n},align:"center",verticalAlign:"middle"}:{width:me,height:me,borderRadius:me/2,backgroundColor:"#fce7f3",color:"#db2777",fontSize:10,fontWeight:600,align:"center",verticalAlign:"middle",lineHeight:me}}function xe(n,e){const a=n.map(u=>La(u.name,e.labelMaxLength)),s={rank:{fontSize:12,color:Pe,padding:[0,4,0,4]},name:{fontSize:12,color:Pe}};return n.forEach((u,i)=>{const c=ve(u.memberId??u.id,void 0,e.avatars);s[`av${i}`]=Va(c)}),{data:a,axisLabel:{fontSize:12,color:Pe,margin:8,formatter:(u,i)=>{const c=n[i];if(!c)return"";const g=e.totalCount-i,f=ve(c.memberId??c.id,void 0,e.avatars)?"":Ce(c.name);return`{av${i}|${f}}{rank|${Ma(g)}}{name|${a[i]??""}}`},rich:s}}}const Aa={class:"px-3 py-2"},Ae=q({__name:"EChartRank",props:{members:{},title:{},description:{},topN:{default:10},unit:{default:"条"},height:{default:"auto"},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(n){const e=n,a=be(),s=b(()=>e.members.slice(0,e.topN)),u=ye(()=>s.value),i=b(()=>{if(e.height!=="auto")return e.height;const m=s.value.length*36;return Math.max(m+30,180)}),c={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]},g=b(()=>{const m=[...s.value].reverse(),f=xe(m,{totalCount:s.value.length,labelMaxLength:a.value.labelMaxLength,avatars:u.value}),h=m.map(d=>d.value),v=Math.max(...h,1),r=m.map(d=>({value:d.value,itemStyle:{color:c,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:d=>{const w=d[0];if(!w)return"";const I=s.value.length-1-w.dataIndex,p=s.value[I];return`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GroupRelationshipGalaxyView-CnzPEgUS.js","assets/index-B1oj9KDv.js","assets/vendor-snapdom--nZvo8Sg.js","assets/index-BZpR015e.css","assets/LoadingState.vue_vue_type_script_setup_true_lang-BBcCt_Qm.js","assets/RelationshipGalaxyThreeCanvas-BP8fsvvf.js","assets/relationship-galaxy-connections-Cg4G5yYE.js","assets/relationship-galaxy-viewport-Cwfa51ER.js","assets/RelationshipGalaxyThreeCanvas-CCasBcBQ.css","assets/MessageExportModal-DNU16Bs8.js","assets/useToast-B5LaA6c-.js","assets/Tabs-DqWTBV8x.js","assets/Tabs-BMq9wODW.js","assets/RovingFocusItem-BJMUQ5DJ.js"])))=>i.map(i=>d[i]);
2
+ import{b as C,x as Oe,y as at,d as q,o as l,c as _,n as W,a as o,F as E,j as Q,p as y,r as ne,a0 as kt,f as k,O as _e,e as b,c0 as wt,E as st,g as t,w as $,z as x,a6 as te,aN as Me,l as D,aa as Ve,a8 as Ie,a9 as J,a7 as Se,J as je,K as z,L as ee,bs as ot,bt as nt,cE as _t,aq as lt,aQ as Ye,aR as Xe,cF as $t,a1 as Tt,H as Ke,I as Ct,C as Be,bO as It,aE as it,G as St,cG as Rt,ah as rt,aD as Mt,ay as Lt,ap as Vt,ab as At,aA as Nt,be as Qe}from"./index-B1oj9KDv.js";import{b as j,a as le,c as Dt,d as Ft,u as qt,e as ut,I as Bt,f as Ut,g as Ht,h as Et,i as Pt,j as zt,C as Ot,k as jt,M as Kt,l as Wt,m as Gt,n as Yt,o as Xt}from"./ActionToolsPanel.vue_vue_type_script_setup_true_lang-IB1yZxCE.js";import{_ as ct}from"./SectionTabs.vue_vue_type_script_setup_true_lang-qFhJO5B0.js";import"./vendor-echarts-wordcloud-DNiU8Psq.js";import{g as Qt}from"./base-F6s0vTrr.js";import{i as Ze}from"./chatMessages-Bd33SSXI.js";import{_ as he,L as dt,u as Zt}from"./LoadingState.vue_vue_type_script_setup_true_lang-BBcCt_Qm.js";import{_ as Jt}from"./index-4DVZ2g0M.js";import{f as ze,a as ea,b as ta}from"./TimeSelect.vue_vue_type_script_setup_true_lang-BcflxP_U.js";import{_ as aa}from"./Switch-CDk3LZ4_.js";import{a as mt}from"./Tabs-BMq9wODW.js";import{u as sa}from"./prompt-C-ofJ7t_.js";import{_ as oa}from"./Select-B5oJc5y1.js";import{_ as ae}from"./EChart.vue_vue_type_script_setup_true_lang-DubnuUXI.js";import{T as ie}from"./Tabs-DqWTBV8x.js";import{_ as na}from"./EChartBar.vue_vue_type_script_setup_true_lang-DKNCZuFm.js";import{_ as la}from"./ThemeCard.vue_vue_type_script_setup_true_lang-D2outEOV.js";import{u as ia,o as ra,q as ua,t as ca,v as da,j as ma,i as va}from"./vendor-echarts-C9ugTmum.js";import{_ as pa}from"./useTable-Clk7ecq-.js";import"./vendor-snapdom--nZvo8Sg.js";import"./Checkbox-_eH64bb0.js";import"./useFormControl-CrWi_6Hn.js";import"./VisuallyHiddenInput-BAFpkxMI.js";import"./RovingFocusItem-BJMUQ5DJ.js";import"./Label-DCIcxkhU.js";import"./useToast-B5LaA6c-.js";import"./service-CppETV4a.js";import"./aiChat--CR4g2M7.js";import"./chatlabSiteLocale-CrCNb8QP.js";import"./ChatRecordWorkspace-7prKd-Tq.js";import"./DatePicker.vue_vue_type_script_setup_true_lang-D9Ul_GYz.js";import"./clamp-jFYhBC76.js";import"./semantic-index-config-builder-D3TYVYC-.js";import"./CardDecoration-RuBA3N2j.js";import"./EChartLine.vue_vue_type_script_setup_true_lang-Fl7xAOSR.js";import"./PageHeader-CKeZjNNR.js";import"./PageTabs.vue_vue_type_script_setup_true_lang-C8M3wNNH.js";import"./Alert-510jTN3l.js";import"./FileDropZone.vue_vue_type_script_setup_true_lang-DYDdRSNE.js";import"./vendor-zrender-D8psf1AA.js";function ga(n,e={}){const{threshold:a=300,containerSelector:s=".overflow-y-auto",scrollLockDuration:u=800}=e,i=C(n[0]?.id||"");let c=!1;const g=C(null);let m=null;function f(){if(c)return;const v=[];n.forEach(d=>{const w=document.getElementById(d.id);if(w){const I=w.getBoundingClientRect();v.push({id:d.id,top:Math.round(I.top)})}});let r=0;for(let d=0;d<v.length;d++){if(v[d].top>a){r=Math.max(0,d-1);break}r=d}i.value=n[r]?.id||""}function h(v){const r=document.getElementById(v);r&&(i.value=v,c=!0,r.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{c=!1,f()},u))}return Oe(()=>{m=g.value?.closest(s)||null,m&&(m.addEventListener("scroll",f,{passive:!0}),f())}),at(()=>{m&&m.removeEventListener("scroll",f)}),{contentRef:g,activeAnchor:i,scrollToAnchor:h,updateActiveAnchor:f}}function $e(n){return n===0?"text-amber-500 dark:text-amber-400":n===1?"text-gray-500 dark:text-gray-300":n===2?"text-orange-600 dark:text-orange-400":"text-gray-400 dark:text-gray-500"}function Te(n){return String(n+1).padStart(2,"0")}function ha(n){return n===0?"from-amber-400 to-orange-500":n===1?"from-gray-300 to-gray-400":n===2?"from-orange-400 to-amber-600":"from-primary-300 to-primary-500"}const fa={class:"sticky top-24 space-y-6"},ya={class:"border-l border-gray-200 dark:border-gray-800"},ba=["onClick"],xa=q({__name:"PageAnchorsNav",props:{anchors:{},activeAnchor:{},width:{default:"w-44"},hideOnMobile:{type:Boolean,default:!0}},emits:["click"],setup(n,{emit:e}){const a=e;function s(u){a("click",u)}return(u,i)=>(l(),_("div",{class:W([n.width,"shrink-0",n.hideOnMobile?"hidden lg:block":""])},[o("div",fa,[o("nav",null,[o("div",ya,[(l(!0),_(E,null,Q(n.anchors,c=>(l(),_("button",{key:c.id,class:W(["-ml-px block border-l-2 py-1.5 pl-4 text-left text-sm transition-colors",[n.activeAnchor===c.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:g=>s(c.id)},y(c.label),11,ba))),128))])]),ne(u.$slots,"default")])],2))}}),re=q({__name:"TopNSelect",props:{modelValue:{default:10},modelModifiers:{}},emits:["update:modelValue"],setup(n){const e=kt(n,"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(s,u)=>{const i=oa;return l(),k(i,{modelValue:e.value,"onUpdate:modelValue":u[0]||(u[0]=c=>e.value=c),items:a,"value-key":"value",class:"w-25"},null,8,["modelValue"])}}}),fe=q({__name:"ScrollableChart",props:{contentHeight:{},maxHeightVh:{default:60},paddingClass:{default:"px-3 py-2"}},setup(n){const e=n,a=b(()=>typeof window>"u"?500:Math.round(window.innerHeight*e.maxHeightVh/100)),s=b(()=>e.contentHeight>a.value),u=b(()=>({maxHeight:`${e.maxHeightVh}vh`,overflowY:s.value?"auto":"hidden"}));return(i,c)=>(l(),_("div",{class:W(n.paddingClass),style:_e(u.value)},[ne(i.$slots,"default")],6))}}),vt=Symbol("ranking-avatar-map"),ka=new Map,wa={byId:ka,byName:new Map},_a=36,Ue=new Map,He=new Set,Je=new Set,et=C(0);function $a(n){const e=new Map;for(const a of n){const s=a.avatar?.trim();e.set(a.id,s||null)}return e}function Ta(n){const e=n?.trim();return e||null}function we(n,e,a){const s=e?.trim();!s||n.get(s)||(a?n.set(s,a):n.has(s)||n.set(s,null))}function Ca(n){const e=new Map;for(const a of n){const s=Ta(a.avatar);we(e,a.groupNickname,s),we(e,a.accountName,s),we(e,a.platformId,s),we(e,a.groupNickname||a.accountName||a.platformId,s);for(const u of a.aliases??[])we(e,u,s)}return e}function Ia(n){return{byId:$a(n),byName:Ca(n)}}function ve(n,e,a,s){const u=e?.trim();if(u)return u;if(n!=null&&n!==""){const g=typeof n=="number"?n:Number(n);if(Number.isFinite(g)){const m=a.get(g);if(m)return m}}const i=s?.name?.trim();if(i&&s?.byName)return s.byName.get(i)??null;if(n==null||n==="")return null;const c=typeof n=="number"?n:Number(n);return Number.isFinite(c)?a.get(c)??null:null}function Ce(n){const e=n.trim();return e?e.slice(0,1):"?"}function pt(){const n=st(vt,null);return b(()=>n?.value??wa)}function We(){const n=pt();return b(()=>n.value.byId)}function Sa(n,e){return n?e.get(n)??null:null}function Ra(n,e=_a){return typeof Image>"u"||typeof document>"u"?Promise.resolve(null):new Promise(a=>{const s=new Image;/^https?:/i.test(n)&&(s.crossOrigin="anonymous"),s.onload=()=>{try{const u=document.createElement("canvas");u.width=e,u.height=e;const i=u.getContext("2d");if(!i){a(null);return}i.beginPath(),i.arc(e/2,e/2,e/2,0,Math.PI*2),i.closePath(),i.clip();const c=s.naturalWidth||s.width,g=s.naturalHeight||s.height;if(c<=0||g<=0){a(null);return}const m=Math.max(e/c,e/g),f=c*m,h=g*m;i.drawImage(s,(e-f)/2,(e-h)/2,f,h),a(u.toDataURL("image/png"))}catch{a(null)}},s.onerror=()=>a(null),s.src=n})}function ye(n){const e=We();return wt(()=>{const a=e.value;for(const s of n()){const u=ve(s.memberId??s.id,s.avatar,a);!u||Ue.has(u)||Je.has(u)||He.has(u)||(He.add(u),Ra(u).then(i=>{He.delete(u),i?Ue.set(u,i):Je.add(u),et.value+=1}))}}),b(()=>{et.value;const a=e.value,s=new Map;for(const u of n()){const i=u.memberId??u.id,c=typeof i=="number"?i:Number(i);if(!Number.isFinite(c))continue;const g=ve(i,u.avatar,a);s.set(c,Sa(g,Ue))}return s})}const Ee=28,me=18,Pe="#4b5563",gt=Symbol("ranking-width-mode"),ht={standard:{contentClass:"max-w-3xl",gridLeft:110+Ee,labelMaxLength:8},wide:{contentClass:"max-w-5xl",gridLeft:180+Ee,labelMaxLength:16},full:{contentClass:"max-w-none",gridLeft:260+Ee,labelMaxLength:28}};function Ma(n){return n===1?"🥇":n===2?"🥈":n===3?"🥉":`${n}.`}function be(){const n=st(gt,null);return b(()=>ht[n?.value??"standard"])}function La(n,e){return n.length<=e?n:`${n.slice(0,e)}…`}function Va(n){return n?{width:me,height:me,borderRadius:me/2,backgroundColor:{image:n},align:"center",verticalAlign:"middle"}:{width:me,height:me,borderRadius:me/2,backgroundColor:"#fce7f3",color:"#db2777",fontSize:10,fontWeight:600,align:"center",verticalAlign:"middle",lineHeight:me}}function xe(n,e){const a=n.map(u=>La(u.name,e.labelMaxLength)),s={rank:{fontSize:12,color:Pe,padding:[0,4,0,4]},name:{fontSize:12,color:Pe}};return n.forEach((u,i)=>{const c=ve(u.memberId??u.id,void 0,e.avatars);s[`av${i}`]=Va(c)}),{data:a,axisLabel:{fontSize:12,color:Pe,margin:8,formatter:(u,i)=>{const c=n[i];if(!c)return"";const g=e.totalCount-i,f=ve(c.memberId??c.id,void 0,e.avatars)?"":Ce(c.name);return`{av${i}|${f}}{rank|${Ma(g)}}{name|${a[i]??""}}`},rich:s}}}const Aa={class:"px-3 py-2"},Ae=q({__name:"EChartRank",props:{members:{},title:{},description:{},topN:{default:10},unit:{default:"条"},height:{default:"auto"},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(n){const e=n,a=be(),s=b(()=>e.members.slice(0,e.topN)),u=ye(()=>s.value),i=b(()=>{if(e.height!=="auto")return e.height;const m=s.value.length*36;return Math.max(m+30,180)}),c={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]},g=b(()=>{const m=[...s.value].reverse(),f=xe(m,{totalCount:s.value.length,labelMaxLength:a.value.labelMaxLength,avatars:u.value}),h=m.map(d=>d.value),v=Math.max(...h,1),r=m.map(d=>({value:d.value,itemStyle:{color:c,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:d=>{const w=d[0];if(!w)return"";const I=s.value.length-1-w.dataIndex,p=s.value[I];return`
3
3
  <div style="padding: 4px 8px;">
4
4
  <div style="font-weight: bold; margin-bottom: 4px;">${p.name}</div>
5
5
  <div>${p.value} ${e.unit} (${p.percentage}%)</div>
6
6
  </div>
7
- `}},grid:{left:a.value.gridLeft,right:70,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:v*1.1,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:f.data,axisLine:{show:!1},axisTick:{show:!1},axisLabel:f.axisLabel},series:[{type:"bar",data:r,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:d=>{const w=s.value.length-1-d.dataIndex;return`${s.value[w].value} ${e.unit}`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(238, 69, 103, 0.3)"}}}]}});return(m,f)=>n.bare?(l(),k(t(fe),{key:0,"content-height":i.value,"max-height-vh":n.maxHeightVh},{default:$(()=>[x(ae,{option:g.value,height:i.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(l(),k(t(j),{key:1,title:n.title,description:n.description,scrollable:"","max-height-vh":n.maxHeightVh},{default:$(()=>[o("div",Aa,[x(ae,{option:g.value,height:i.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Na={class:"min-w-0 flex-1"},Da={class:"flex items-baseline justify-between gap-3"},Fa=["title"],qa={class:"flex shrink-0 items-baseline gap-1.5 whitespace-nowrap"},Ba={class:"font-mono text-base font-black tabular-nums text-gray-900 dark:text-white"},Ua={class:"text-xs text-gray-500 dark:text-gray-400"},Ha={class:"mt-2 flex items-center gap-2.5"},Ea={class:"h-1.5 flex-1 overflow-hidden rounded-full bg-gray-100 dark:bg-white/5"},Pa={class:"w-10 shrink-0 text-right font-mono text-[11px] tabular-nums text-gray-400 dark:text-gray-500"},tt=q({__name:"RankList",props:{members:{},showAvatar:{type:Boolean,default:!1},rankLimit:{default:0},unit:{}},setup(n){const{t:e}=te(),a=n,s=b(()=>a.unit||e("views.charts.rankList.unit")),u=We(),i=b(()=>a.rankLimit>0?a.members.slice(0,a.rankLimit):a.members);function c(m){return ve(m.id,m.avatar,u.value)}function g(m){if(i.value.length===0)return 0;const f=i.value[0].value;return f===0?0:Math.round(i.value[m].value/f*100)}return(m,f)=>(l(),_("div",null,[(l(!0),_(E,null,Q(i.value,(h,v)=>(l(),_("div",{key:h.id,class:"flex items-start gap-3 px-5 py-3.5 transition-colors hover:bg-gray-50/70 dark:hover:bg-white/5"},[o("span",{class:W(["w-8 shrink-0 pt-0.5 text-center font-mono text-sm font-black tabular-nums",t($e)(v)])},y(t(Te)(v)),3),n.showAvatar?(l(),k(Me,{key:0,src:c(h),alt:h.name,text:t(Ce)(h.name),"root-class":"h-10 w-10 shrink-0","image-class":"h-10 w-10 rounded-full object-cover","fallback-class":"flex h-10 w-10 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"},null,8,["src","alt","text"])):D("",!0),o("div",Na,[o("div",Da,[o("p",{class:"truncate text-sm font-medium text-gray-900 dark:text-white",title:h.name},y(h.name),9,Fa),o("div",qa,[o("span",Ba,y(h.value),1),o("span",Ua,y(s.value),1)])]),o("div",Ha,[o("div",Ea,[o("div",{class:W(["h-full rounded-full bg-linear-to-r transition-all",t(ha)(v)]),style:_e({width:`${g(v)}%`})},null,6)]),o("span",Pa,y(h.percentage)+"% ",1)])])]))),128))]))}}),za={class:"flex items-center gap-2"},Oa={class:"shrink-0 whitespace-nowrap rounded-full bg-gray-100 px-2.5 py-1 text-[11px] font-medium text-gray-500 dark:bg-white/5 dark:text-gray-400"},ja={class:"no-capture"},Ka={key:0,class:"no-capture px-3 pb-3 pt-1"},Wa={class:"flex items-center gap-1.5"},Ga={class:"flex w-full items-center justify-between border-b border-gray-100 px-6 py-5 dark:border-white/5"},Ya={class:"min-w-0"},Xa={class:"truncate text-base font-semibold text-gray-900 dark:text-white"},Qa={class:"mt-1 text-xs text-gray-500 dark:text-gray-400"},Za={class:"max-h-[70vh] overflow-y-auto"},ft=q({__name:"ExpandableListCard",props:{title:{},description:{},showViewAll:{type:Boolean},viewAllLabel:{},countLabel:{}},setup(n){const e=C(!1),a=C(null);return(s,u)=>{const i=Se,c=Ie,g=Ve;return l(),k(t(j),{title:n.title,description:n.description,"show-divider":!1},{headerRight:$(()=>[o("div",za,[o("span",Oa,y(n.countLabel),1),o("div",ja,[ne(s.$slots,"headerRight")])])]),default:$(()=>[o("div",null,[ne(s.$slots,"default")]),n.showViewAll?(l(),_("div",Ka,[x(g,{open:e.value,"onUpdate:open":u[0]||(u[0]=m=>e.value=m),ui:{content:"md:w-full max-w-4xl"}},{content:$(()=>[o("div",{ref_key:"modalBodyRef",ref:a,class:"section-content flex flex-col overflow-hidden"},[o("div",Ga,[o("div",Ya,[o("h3",Xa,y(n.title),1),o("p",Qa,y(n.countLabel),1)]),x(Jt,{size:"xs",type:"element","target-element":a.value},null,8,["target-element"])]),o("div",Za,[ne(s.$slots,"full")])],512)]),default:$(()=>[x(c,{color:"neutral",variant:"ghost",class:"w-full justify-center rounded-lg py-2.5 text-xs font-medium text-gray-500 dark:text-gray-400"},{default:$(()=>[o("span",Wa,[J(y(n.viewAllLabel)+" ",1),x(i,{name:"i-heroicons-arrow-right",class:"h-3.5 w-3.5"})])]),_:1})]),_:3},8,["open"])])):D("",!0)]),_:3},8,["title","description"])}}}),Ja=q({__name:"RankListPro",props:{members:{},title:{},description:{},topN:{default:10},unit:{}},setup(n){const{t:e}=te(),a=n,s=b(()=>a.members.slice(0,a.topN)),u=b(()=>a.members.length>a.topN);return(i,c)=>(l(),k(ft,{title:n.title,description:n.description,"show-view-all":u.value,"view-all-label":t(e)("views.charts.rankListPro.fullRanking"),"count-label":t(e)("views.charts.rankListPro.memberCount",{count:n.members.length})},{headerRight:$(()=>[ne(i.$slots,"headerRight")]),full:$(()=>[x(tt,{members:n.members,unit:n.unit,"show-avatar":""},null,8,["members","unit"])]),default:$(()=>[x(tt,{members:s.value,unit:n.unit,"show-avatar":""},null,8,["members","unit"])]),_:3},8,["title","description","show-view-all","view-all-label","count-label"]))}}),es={key:0},ts={class:"px-5 py-8 text-center text-sm text-gray-400"},Le=q({__name:"ListPro",props:{items:{},title:{},description:{},topN:{default:10},countLabel:{}},setup(n){const{t:e}=te(),a=n,s=b(()=>a.items.slice(0,a.topN)),u=b(()=>a.items.length>a.topN),i=b(()=>a.countLabel?a.countLabel:e("views.charts.listPro.countTemplate",{count:a.items.length}));return(c,g)=>(l(),k(ft,{title:n.title,description:n.description,"show-view-all":u.value,"view-all-label":t(e)("views.charts.listPro.fullRanking"),"count-label":i.value},{headerRight:$(()=>[ne(c.$slots,"headerRight")]),full:$(()=>[o("div",null,[(l(!0),_(E,null,Q(n.items,(m,f)=>(l(),_("div",{key:f,class:"group/list-row px-5 py-3.5 transition-colors hover:bg-gray-50/70 dark:hover:bg-white/5"},[ne(c.$slots,"item",{item:m,index:f})]))),128))])]),default:$(()=>[ne(c.$slots,"config"),o("div",null,[(l(!0),_(E,null,Q(s.value,(m,f)=>(l(),_("div",{key:f,class:"group/list-row px-5 py-3.5 transition-colors hover:bg-gray-50/70 dark:hover:bg-white/5"},[ne(c.$slots,"item",{item:m,index:f})]))),128))]),n.items.length===0?(l(),_("div",es,[ne(c.$slots,"empty",{},()=>[o("div",ts,y(t(e)("views.charts.listPro.empty")),1)])])):D("",!0)]),_:3},8,["title","description","show-view-all","view-all-label","count-label"]))}});function as(n,e){return{keywords:[n],...e?.memberId!=null?{memberId:e.memberId}:{}}}const ss={class:"main-content mx-auto max-w-3xl p-6"},os=["aria-label","onClick"],ns=["title"],ls={class:"flex shrink-0 items-center gap-3 pl-2"},is={class:"font-mono text-sm font-black tabular-nums text-primary-600 dark:text-primary-400"},rs={class:"grid w-full grid-cols-[2rem_2rem_minmax(0,1fr)] items-start gap-x-3 sm:grid-cols-[2rem_2rem_minmax(7.5rem,0.65fr)_minmax(0,1.35fr)]"},us=["title"],cs={class:"col-start-3 row-start-2 mt-1.5 flex min-w-0 flex-wrap items-center gap-x-4 gap-y-1.5 sm:col-start-4 sm:row-start-1 sm:mt-0"},ds=["title","aria-label","onClick"],ms={class:"max-w-40 truncate text-sm text-gray-700 transition-colors group-hover/phrase:text-primary-600 dark:text-gray-200 dark:group-hover/phrase:text-primary-400"},vs={class:"shrink-0 font-mono text-[11px] tabular-nums text-gray-400 dark:text-gray-500"},ps=q({__name:"CatchphraseTab",props:{sessionId:{},timeFilter:{}},setup(n){const{t:e}=te(),a=je(),s=We();function u(p){return ve(p.memberId,void 0,s.value)}const i=n,c=C(null),g=C(!1),m=b(()=>c.value?.members??[]),f=b(()=>i.timeFilter?.memberId!=null),h=b(()=>f.value?m.value[0]??null:null),v=b(()=>h.value?e("quotes.catchphrase.memberTitle",{name:h.value.name}):e("quotes.catchphrase.title")),r=b(()=>f.value?e("quotes.catchphrase.memberDescription"):e("quotes.catchphrase.description"));async function d(){if(i.sessionId){g.value=!0;try{c.value=await ee().getCatchphraseAnalysis(i.sessionId,i.timeFilter)}catch(p){console.error("Failed to load catchphrase analysis:",p)}finally{g.value=!1}}}function w(p){a.openChatRecordDrawer(as(p,i.timeFilter))}function I(p){return p.catchphrases.slice(0,5)}return z(()=>[i.sessionId,i.timeFilter],()=>{d()},{immediate:!0,deep:!0}),(p,S)=>{const T=Se;return l(),_("div",ss,[g.value?(l(),k(t(he),{key:0,text:t(e)("quotes.catchphrase.loading")},null,8,["text"])):h.value?(l(),k(t(Le),{key:1,items:h.value.catchphrases,title:v.value,description:r.value,"top-n":10,"count-label":t(e)("quotes.catchphrase.phraseCount",{count:h.value.catchphrases.length})},{headerRight:$(()=>[h.value?(l(),k(Me,{key:0,src:u(h.value),alt:h.value.name,text:t(Ce)(h.value.name),"root-class":"h-8 w-8 shrink-0","image-class":"h-8 w-8 rounded-full object-cover","fallback-class":"flex h-8 w-8 items-center justify-center rounded-full bg-linear-to-br from-pink-100 to-rose-100 text-[10px] font-medium text-pink-600 dark:from-pink-900/30 dark:to-rose-900/30 dark:text-pink-400"},null,8,["src","alt","text"])):D("",!0)]),item:$(({item:R,index:L})=>[o("button",{type:"button",class:"group/item grid w-full grid-cols-[2rem_minmax(0,1fr)_auto] items-center gap-3 rounded-lg text-left outline-none focus-visible:ring-2 focus-visible:ring-primary-500/40","aria-label":`${t(e)("quotes.catchphrase.viewChat")}: ${R.content}`,onClick:K=>w(R.content)},[o("span",{class:W(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",t($e)(L)])},y(t(Te)(L)),3),o("p",{class:"line-clamp-2 min-w-0 text-sm font-medium leading-5 text-gray-900 dark:text-white",title:R.content},y(R.content),9,ns),o("div",ls,[o("span",is,y(t(e)("quotes.catchphrase.times",{count:R.count})),1),x(T,{name:"i-heroicons-chevron-right",class:"h-4 w-4 text-gray-300 transition-colors group-hover/item:text-gray-500 dark:text-gray-600 dark:group-hover/item:text-gray-400"})])],8,os)]),_:1},8,["items","title","description","count-label"])):m.value.length>0?(l(),k(t(Le),{key:2,items:m.value,title:v.value,description:r.value,"top-n":10,"count-label":t(e)("quotes.catchphrase.memberCount",{count:m.value.length})},{item:$(({item:R,index:L})=>[o("div",rs,[o("span",{class:W(["row-span-2 w-8 shrink-0 pt-0.5 text-center font-mono text-sm font-black tabular-nums sm:row-span-1",t($e)(L)])},y(t(Te)(L)),3),x(Me,{src:u(R),alt:R.name,text:t(Ce)(R.name),"root-class":"col-start-2 row-span-2 h-8 w-8 shrink-0 sm:row-span-1","image-class":"h-8 w-8 rounded-full object-cover","fallback-class":"flex h-8 w-8 items-center justify-center rounded-full bg-linear-to-br from-pink-100 to-rose-100 text-[10px] font-medium text-pink-600 dark:from-pink-900/30 dark:to-rose-900/30 dark:text-pink-400"},null,8,["src","alt","text"]),o("p",{class:"col-start-3 row-start-1 min-w-0 truncate pt-0.5 text-sm font-semibold text-gray-900 dark:text-white",title:R.name},y(R.name),9,us),o("div",cs,[(l(!0),_(E,null,Q(I(R),K=>(l(),_("button",{key:K.content,type:"button",class:"group/phrase inline-flex max-w-full items-baseline gap-1 rounded text-left outline-none focus-visible:ring-2 focus-visible:ring-primary-500/40",title:K.content,"aria-label":`${t(e)("quotes.catchphrase.viewChat")}: ${K.content}`,onClick:U=>w(K.content)},[o("span",ms," “"+y(K.content)+"” ",1),o("span",vs,y(t(e)("quotes.catchphrase.times",{count:K.count})),1)],8,ds))),128))])])]),_:1},8,["items","title","description","count-label"])):(l(),k(t(j),{key:3,title:v.value,description:r.value,"show-divider":!1},{default:$(()=>[x(t(le),{text:t(e)("quotes.catchphrase.empty.title")},null,8,["text"])]),_:1},8,["title","description"]))])}}}),gs={class:"main-content mx-auto max-w-3xl p-6"},hs=["aria-label","onClick"],fs={class:"min-w-0"},ys=["title"],bs={class:"mt-1 flex min-w-0 items-center gap-1.5 text-xs text-gray-400 dark:text-gray-500"},xs={class:"truncate"},ks={class:"shrink-0"},ws={class:"flex shrink-0 items-center gap-3 pl-2"},_s={class:"text-right"},$s={class:"font-mono text-sm font-black tabular-nums text-primary-600 dark:text-primary-400"},Ts={class:"mt-0.5 text-[11px] text-gray-400 dark:text-gray-500"},Cs=q({__name:"HotRepeatTab",props:{sessionId:{},timeFilter:{}},setup(n){const{t:e}=te(),a=n,s=je(),u=pt();function i(h){return ve(h.originatorId,void 0,u.value.byId,{name:h.originatorName,byName:u.value.byName})}const c=C(null),g=C(!1);async function m(){if(a.sessionId){g.value=!0;try{c.value=await ee().getRepeatAnalysis(a.sessionId,a.timeFilter)}catch(h){console.error("Failed to load repeat analysis:",h)}finally{g.value=!1}}}function f(h){s.openChatRecordDrawer({scrollToMessageId:h.firstMessageId,highlightKeywords:[h.content]})}return z(()=>[a.sessionId,a.timeFilter],()=>{m()},{immediate:!0,deep:!0}),(h,v)=>{const r=Se;return l(),_("div",gs,[g.value?(l(),k(t(he),{key:0,text:t(e)("quotes.hotRepeat.loading")},null,8,["text"])):c.value&&c.value.hotContents.length>0?(l(),k(t(Le),{key:1,items:c.value.hotContents,title:t(e)("quotes.hotRepeat.title"),description:t(e)("quotes.hotRepeat.description"),"top-n":10,"count-label":t(e)("quotes.hotRepeat.countTemplate",{count:c.value.hotContents.length})},{item:$(({item:d,index:w})=>[o("button",{type:"button",class:"group/item grid w-full grid-cols-[2rem_2rem_minmax(0,1fr)_auto] items-start gap-3 rounded-lg text-left outline-none focus-visible:ring-2 focus-visible:ring-primary-500/40","aria-label":`${t(e)("quotes.hotRepeat.viewChat")}: ${d.content}`,onClick:I=>f(d)},[o("span",{class:W(["w-8 shrink-0 pt-0.5 text-center font-mono text-sm font-black tabular-nums",t($e)(w)])},y(t(Te)(w)),3),x(Me,{src:i(d),alt:d.originatorName,text:t(Ce)(d.originatorName),"root-class":"h-8 w-8 shrink-0","image-class":"h-8 w-8 rounded-full object-cover","fallback-class":"flex h-8 w-8 items-center justify-center rounded-full bg-linear-to-br from-pink-100 to-rose-100 text-[10px] font-medium text-pink-600 dark:from-pink-900/30 dark:to-rose-900/30 dark:text-pink-400"},null,8,["src","alt","text"]),o("div",fs,[o("p",{class:"line-clamp-2 text-sm font-medium leading-5 text-gray-900 dark:text-white",title:d.content},y(d.content),9,ys),o("div",bs,[o("span",xs,y(d.originatorName),1),v[0]||(v[0]=o("span",{"aria-hidden":"true"},"·",-1)),o("span",ks,y(t(ze)(d.lastTs)),1)])]),o("div",ws,[o("div",_s,[o("p",$s,y(t(e)("quotes.hotRepeat.people",{count:d.maxChainLength})),1),o("p",Ts,y(t(e)("quotes.hotRepeat.times",{count:d.count})),1)]),x(r,{name:"i-heroicons-chevron-right",class:"h-4 w-4 text-gray-300 transition-colors group-hover/item:text-gray-500 dark:text-gray-600 dark:group-hover/item:text-gray-400"})])],8,hs)]),_:1},8,["items","title","description","count-label"])):(l(),k(t(j),{key:2,title:t(e)("quotes.hotRepeat.title")},{default:$(()=>[x(t(le),{text:t(e)("quotes.hotRepeat.empty")},null,8,["text"])]),_:1},8,["title"]))])}}}),Is={class:"main-content mx-auto max-w-[920px] space-y-4 p-4 sm:space-y-6 sm:p-6"},Ss={class:"grid grid-cols-1 gap-6 lg:grid-cols-2"},Rs={class:"p-3 sm:p-5"},Ms={class:"p-3 sm:p-5"},Ls=q({__name:"GroupChatOverview",props:{session:{},memberActivity:{},messageTypes:{},hourlyActivity:{},dailyActivity:{},timeRange:{},filteredMessageCount:{},filteredMemberCount:{},timeFilter:{}},setup(n){const{t:e}=te(),a=n,{dailyChartData:s}=qt(()=>a.dailyActivity),u=b(()=>({labels:a.messageTypes.map(c=>Qt(c.type,e)),values:a.messageTypes.map(c=>c.count)})),i=b(()=>{const c=[...a.memberActivity].sort((v,r)=>r.messageCount-v.messageCount),g=c.slice(0,10),m=c.slice(10).reduce((v,r)=>v+r.messageCount,0),f=g.map(v=>v.name),h=g.map(v=>v.messageCount);return m>0&&(f.push(e("analysis.overview.others")),h.push(m)),{labels:f,values:h}});return(c,g)=>(l(),_("div",Is,[x(Dt,{session:n.session,"daily-activity":n.dailyActivity,"message-types":n.messageTypes,"hourly-activity":n.hourlyActivity,"time-range":n.timeRange,"filtered-message-count":n.filteredMessageCount,"filtered-member-count":n.filteredMemberCount,"time-filter":n.timeFilter},null,8,["session","daily-activity","message-types","hourly-activity","time-range","filtered-message-count","filtered-member-count","time-filter"]),o("div",Ss,[x(t(j),{title:t(e)("analysis.overview.messageTypeDistribution"),"show-divider":!1},{default:$(()=>[o("div",Rs,[x(t(Ze),{data:u.value,height:280},null,8,["data"])])]),_:1},8,["title"]),x(t(j),{title:t(e)("analysis.overview.memberDistribution"),"show-divider":!1},{default:$(()=>[o("div",Ms,[x(t(Ze),{data:i.value,height:280},null,8,["data"])])]),_:1},8,["title"])]),x(Ft,{"daily-activity":n.dailyActivity,"daily-chart-data":t(s)},null,8,["daily-activity","daily-chart-data"])]))}}),Vs={class:"flex h-full flex-col"},As={class:"min-h-0 flex-1 overflow-y-auto"},Ns=q({__name:"GroupChatInsights",props:{sessionId:{},session:{},memberActivity:{},messageTypes:{},hourlyActivity:{},dailyActivity:{},timeRange:{},filteredMessageCount:{},filteredMemberCount:{},timeFilter:{}},setup(n){const e=ot(()=>nt(()=>import("./GroupRelationshipGalaxyView-Ch4obfEq.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))),{t:a}=te(),s=n,u=b(()=>[{id:"overview",label:a("analysis.tabs.overview"),icon:"i-heroicons-squares-2x2"},{id:"type-analysis",label:a("analysis.subTabs.insights.typeAnalysis"),icon:"i-heroicons-chart-pie"},{id:"time-analysis",label:a("analysis.subTabs.insights.timeAnalysis"),icon:"i-heroicons-clock"},{id:"topic",label:a("analysis.subTabs.insights.topic"),icon:"i-heroicons-cloud"},{id:"relationship",label:a("analysis.subTabs.insights.relationship"),icon:"i-heroicons-heart"}]),i=C("overview"),c=C(null),g=b(()=>({...s.timeFilter,memberId:c.value}));return(m,f)=>(l(),_("div",Vs,[x(t(ct),{modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=h=>i.value=h),items:u.value,"persist-key":"groupInsightsTab"},{right:$(()=>[i.value==="type-analysis"||i.value==="time-analysis"?(l(),k(ut,{key:0,modelValue:c.value,"onUpdate:modelValue":f[0]||(f[0]=h=>c.value=h),"session-id":s.sessionId},null,8,["modelValue","session-id"])):D("",!0)]),_:1},8,["modelValue","items"]),o("div",As,[x(t(Bt),{"active-key":i.value},{default:$(({viewKey:h})=>[h==="overview"?(l(),k(Ls,{key:0,session:s.session,"member-activity":s.memberActivity,"message-types":s.messageTypes,"hourly-activity":s.hourlyActivity,"daily-activity":s.dailyActivity,"time-range":s.timeRange,"filtered-message-count":s.filteredMessageCount,"filtered-member-count":s.filteredMemberCount,"time-filter":s.timeFilter},null,8,["session","member-activity","message-types","hourly-activity","daily-activity","time-range","filtered-message-count","filtered-member-count","time-filter"])):h==="type-analysis"?(l(),k(Ut,{key:1,"session-id":s.sessionId,"session-name":s.session.name,"time-filter":g.value},null,8,["session-id","session-name","time-filter"])):h==="time-analysis"?(l(),k(Ht,{key:2,"session-id":s.sessionId,"session-name":s.session.name,"time-filter":g.value},null,8,["session-id","session-name","time-filter"])):h==="topic"?(l(),k(t(Et),{key:3,"session-id":s.sessionId,"time-filter":s.timeFilter},null,8,["session-id","time-filter"])):h==="relationship"?(l(),k(t(e),{key:4,"session-id":s.sessionId,"time-filter":s.timeFilter},null,8,["session-id","time-filter"])):D("",!0)]),_:1},8,["active-key"])])]))}}),Ds={class:"border-b border-gray-100 p-4 dark:border-gray-800"},Fs={class:"mb-3 flex flex-wrap items-center gap-2"},qs={class:"text-xs text-gray-500 dark:text-gray-400"},Bs=["onClick"],Us={class:"p-4"},Hs={class:"mb-3 font-semibold text-gray-900 dark:text-white"},Es={class:"space-y-3"},Ps={class:"mb-1 block text-xs text-gray-500"},zs={class:"mb-1 block text-xs text-gray-500"},Os={class:"flex flex-wrap items-center gap-2"},js={class:"mt-4 flex justify-end gap-2"},Ks={class:"flex flex-wrap items-center gap-2"},Ws={class:"mt-1.5 text-xs text-gray-400"},Gs={key:0,class:"border-b border-gray-100 px-5 py-4 dark:border-gray-800"},Ys={class:"mb-3 flex items-center justify-between"},Xs={class:"text-base font-medium text-gray-700 dark:text-gray-300"},Qs={class:"flex cursor-pointer items-center gap-1.5 text-xs text-gray-500"},Zs={class:"flex flex-wrap gap-2"},Js={class:"text-xs text-gray-500"},eo={class:"flex items-center gap-3"},to={class:"w-32 shrink-0"},ao={class:"truncate font-medium text-gray-900 dark:text-white"},so={class:"flex flex-1 items-center"},oo={class:"flex h-2 w-full overflow-hidden rounded-full bg-gray-100 dark:bg-white/5"},no=["title"],lo={class:"flex shrink-0 items-baseline gap-2"},io={class:"font-mono text-base font-black tabular-nums text-gray-900 dark:text-white"},ro={class:"text-xs text-gray-500"},uo={key:0,class:"flex h-64 flex-col items-center justify-center text-gray-400"},co={class:"text-sm"},mo={key:1,class:"h-64"},vo=q({__name:"KeywordRankingTab",props:{sessionId:{},timeFilter:{}},setup(n){const{t:e}=te(),a=n,s=sa(),u=C(!1),i={bg:"bg-pink-400",text:"text-pink-700",badge:"pink",wrapBg:"bg-pink-50 dark:bg-pink-900/20"},c=[{bg:"bg-amber-400",text:"text-amber-700",badge:"amber",wrapBg:"bg-amber-50 dark:bg-amber-900/20"},{bg:"bg-pink-400",text:"text-pink-700",badge:"pink",wrapBg:"bg-pink-50 dark:bg-pink-900/20"},{bg:"bg-blue-400",text:"text-blue-700",badge:"blue",wrapBg:"bg-blue-50 dark:bg-blue-900/20"},{bg:"bg-green-400",text:"text-green-700",badge:"green",wrapBg:"bg-green-50 dark:bg-green-900/20"},{bg:"bg-purple-400",text:"text-purple-700",badge:"purple",wrapBg:"bg-purple-50 dark:bg-purple-900/20"},{bg:"bg-red-400",text:"text-red-700",badge:"red",wrapBg:"bg-red-50 dark:bg-red-900/20"},{bg:"bg-cyan-400",text:"text-cyan-700",badge:"cyan",wrapBg:"bg-cyan-50 dark:bg-cyan-900/20"},{bg:"bg-orange-400",text:"text-orange-700",badge:"orange",wrapBg:"bg-orange-50 dark:bg-orange-900/20"}];function g(M){if(!u.value)return i;const F=r.value.indexOf(M);if(F>=0)return c[F%c.length];let se=0;for(let oe=0;oe<M.length;oe++)se=se*31+M.charCodeAt(oe)>>>0;return c[se%c.length]}const m=["laugh","sad","praise","slacker","gossip","polite","curious"],f=b(()=>[{id:"laugh",name:e("quotes.keywords.templates.laugh.name"),keywords:e("quotes.keywords.templates.laugh.keywords").split(","),description:e("quotes.keywords.templates.laugh.description")},{id:"sad",name:e("quotes.keywords.templates.sad.name"),keywords:e("quotes.keywords.templates.sad.keywords").split(","),description:e("quotes.keywords.templates.sad.description")},{id:"praise",name:e("quotes.keywords.templates.praise.name"),keywords:e("quotes.keywords.templates.praise.keywords").split(","),description:e("quotes.keywords.templates.praise.description")},{id:"slacker",name:e("quotes.keywords.templates.slacker.name"),keywords:e("quotes.keywords.templates.slacker.keywords").split(","),description:e("quotes.keywords.templates.slacker.description")},{id:"gossip",name:e("quotes.keywords.templates.gossip.name"),keywords:e("quotes.keywords.templates.gossip.keywords").split(","),description:e("quotes.keywords.templates.gossip.description")},{id:"polite",name:e("quotes.keywords.templates.polite.name"),keywords:e("quotes.keywords.templates.polite.keywords").split(","),description:e("quotes.keywords.templates.polite.description")},{id:"curious",name:e("quotes.keywords.templates.curious.name"),keywords:e("quotes.keywords.templates.curious.keywords").split(","),description:e("quotes.keywords.templates.curious.description")}]),h=b(()=>{const M=s.customKeywordTemplates.map(se=>({...se,isCustom:!0}));return[...f.value.filter(se=>!s.deletedPresetTemplateIds.includes(se.id)),...M]}),v=C("laugh"),r=C([]);z(f,M=>{M.length>0&&r.value.length===0&&(r.value=[...M[0].keywords])},{immediate:!0});const d=b(()=>{const M=h.value.find(F=>F.id===v.value);return M?M.name:""}),w=C(null),I=C(!1);let p=0;const S=C(!1),T=C(null),R=C(""),L=C([]),K=C(""),U=b(()=>T.value!==null),B=b(()=>U.value?e("quotes.keywords.modal.editTitle"):e("quotes.keywords.modal.createTitle"));function O(){T.value=null,R.value="",L.value=[],K.value="",S.value=!0}function Z(M){T.value=M.id,R.value=M.name,L.value=[...M.keywords],S.value=!0}function Y(){const M=K.value.trim();M&&!L.value.includes(M)&&(L.value=[...L.value,M]),K.value=""}function G(M){L.value=L.value.filter(F=>F!==M)}function N(M){v.value=M.id,r.value=[...M.keywords],w.value=null,V()}function H(){p++,r.value=[],w.value=null,I.value=!1,v.value=""}const X=C("");function pe(){const M=X.value.trim();M&&!r.value.includes(M)&&(r.value=[...r.value,M],V()),X.value=""}function Ne(M){r.value=r.value.filter(F=>F!==M),V()}function Re(M){return m.includes(M)}function De(){if(R.value.trim()){if(U.value&&T.value)if(Re(T.value)){const M={id:`custom_${Date.now()}`,name:R.value.trim(),keywords:[...L.value]};s.addCustomKeywordTemplate(M),v.value=M.id,r.value=[...M.keywords],V()}else s.updateCustomKeywordTemplate(T.value,{name:R.value.trim(),keywords:[...L.value]}),v.value===T.value&&(r.value=[...L.value],V());else{const M={id:`custom_${Date.now()}`,name:R.value.trim(),keywords:[...L.value]};s.addCustomKeywordTemplate(M),v.value=M.id,r.value=[...M.keywords],V()}S.value=!1}}function ue(M){Re(M)?s.addDeletedPresetTemplateId(M):s.removeCustomKeywordTemplate(M),v.value===M&&(h.value.length>0?N(h.value[0]):H())}async function V(){const M=++p;if(!a.sessionId||r.value.length===0){w.value=null,I.value=!1;return}I.value=!0;try{const F=await ee().getLaughAnalysis(a.sessionId,a.timeFilter,[...r.value]);if(M!==p)return;w.value=F}catch(F){if(M!==p)return;console.error("Failed to load keyword ranking:",F),w.value=null}finally{M===p&&(I.value=!1)}}const ce=b(()=>w.value?w.value.rankByCount.map(M=>({id:M.memberId.toString(),name:M.name,value:M.laughCount,percentage:M.percentage,keywordDistribution:M.keywordDistribution||[]})):[]);function Fe(M){if(ce.value.length===0)return 0;const F=ce.value[0].value;return F===0?0:Math.round(ce.value[M].value/F*100)}function P(M,F){const se=Fe(F);return!M.keywordDistribution||M.keywordDistribution.length===0?[{keyword:"default",width:se,bg:"bg-amber-400"}]:M.keywordDistribution.map(oe=>({keyword:oe.keyword,width:oe.percentage/100*se,bg:g(oe.keyword).bg}))}return z(()=>[a.sessionId,a.timeFilter],()=>{V()},{immediate:!0,deep:!0}),(M,F)=>{const se=_t,oe=lt,qe=mt,Ge=Ie,yt=Ve,bt=aa,xt=Se;return l(),k(t(Le),{items:ce.value,title:t(e)("quotes.keywords.title"),description:t(e)("quotes.keywords.description"),"top-n":10,"count-label":t(e)("quotes.keywords.countTemplate",{count:ce.value.length})},{config:$(()=>[o("div",Ds,[o("div",Fs,[o("span",qs,y(t(e)("quotes.keywords.templateLabel")),1),(l(!0),_(E,null,Q(h.value,A=>(l(),k(se,{key:A.id,items:[[{label:t(e)("quotes.keywords.contextMenu.edit"),icon:"i-lucide-pencil",disabled:!A.isCustom,onSelect:()=>Z(A)},{label:t(e)("quotes.keywords.contextMenu.delete"),icon:"i-lucide-trash",color:"error",onSelect:()=>ue(A.id)}]]},{default:$(()=>[o("button",{class:W(["rounded-md border px-2.5 py-1 text-sm transition-all",v.value===A.id?"border-pink-500 bg-pink-50 text-pink-600 dark:border-pink-400 dark:bg-pink-900/20 dark:text-pink-400":"border-gray-200 text-gray-600 hover:border-gray-300 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-600"]),onClick:ge=>N(A)},y(A.name),11,Bs)]),_:2},1032,["items"]))),128)),x(yt,{open:S.value,"onUpdate:open":F[3]||(F[3]=A=>S.value=A)},{content:$(()=>[o("div",Us,[o("h3",Hs,y(B.value),1),o("div",Es,[o("div",null,[o("label",Ps,y(t(e)("quotes.keywords.modal.templateName")),1),x(oe,{modelValue:R.value,"onUpdate:modelValue":F[0]||(F[0]=A=>R.value=A),placeholder:t(e)("quotes.keywords.modal.templateNamePlaceholder")},null,8,["modelValue","placeholder"])]),o("div",null,[o("label",zs,y(t(e)("quotes.keywords.modal.keywords")),1),o("div",Os,[(l(!0),_(E,null,Q(L.value,A=>(l(),k(qe,{key:A,variant:"soft",class:"cursor-pointer",onClick:ge=>G(A)},{default:$(()=>[J(y(A)+" ",1),F[6]||(F[6]=o("span",{class:"ml-0.5 hover:text-red-500"},"×",-1))]),_:2},1032,["onClick"]))),128)),x(oe,{modelValue:K.value,"onUpdate:modelValue":F[1]||(F[1]=A=>K.value=A),placeholder:t(e)("quotes.keywords.modal.keywordPlaceholder"),class:"w-full",onKeydown:Ye(Xe(Y,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"])])])]),o("div",js,[x(Ge,{variant:"soft",onClick:F[2]||(F[2]=A=>S.value=!1)},{default:$(()=>[J(y(t(e)("common.cancel")),1)]),_:1}),x(Ge,{color:"primary",disabled:!R.value.trim()||L.value.length===0,onClick:De},{default:$(()=>[J(y(U.value?t(e)("quotes.keywords.modal.update"):t(e)("common.save")),1)]),_:1},8,["disabled"])])])]),default:$(()=>[o("button",{class:"rounded-md border border-dashed border-gray-300 px-2.5 py-1 text-sm text-gray-500 transition-all hover:border-pink-400 hover:text-pink-500 dark:border-gray-600",onClick:O},y(t(e)("quotes.keywords.newTemplate")),1)]),_:1},8,["open"])]),o("div",Ks,[(l(!0),_(E,null,Q(r.value,A=>(l(),k(qe,{key:A,class:"cursor-pointer",onClick:ge=>Ne(A)},{default:$(()=>[J(y(A)+" ",1),F[7]||(F[7]=o("span",{class:"ml-0.5 hover:text-red-500"},"×",-1))]),_:2},1032,["onClick"]))),128)),x(oe,{modelValue:X.value,"onUpdate:modelValue":F[4]||(F[4]=A=>X.value=A),placeholder:t(e)("quotes.keywords.searchPlaceholder"),class:"w-32",onKeydown:Ye(Xe(pe,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"]),r.value.length>0?(l(),_("button",{key:0,class:"text-sm text-pink-500 hover:text-red-500",onClick:H},y(t(e)("quotes.keywords.clear")),1)):D("",!0)]),o("div",Ws,y(t(e)("quotes.keywords.templateHint")),1)]),w.value&&w.value.typeDistribution.length>0?(l(),_("div",Gs,[o("div",Ys,[o("span",Xs,y(d.value?d.value:r.value.length===1?r.value[0]:t(e)("quotes.keywords.keyword"))+y(t(e)("quotes.keywords.ranking")),1),o("label",Qs,[o("span",null,y(t(e)("quotes.keywords.multiColorMode")),1),x(bt,{modelValue:u.value,"onUpdate:modelValue":F[5]||(F[5]=A=>u.value=A),size:"md"},null,8,["modelValue"])])]),o("div",Zs,[(l(!0),_(E,null,Q(w.value.typeDistribution,A=>(l(),_("div",{key:A.type,class:W(["flex items-center gap-2 rounded-lg px-2 py-2 text-xs",g(A.type).wrapBg])},[o("span",{class:W(["h-2.5 w-2.5 shrink-0 rounded-full",g(A.type).bg])},null,2),o("span",{class:W(["font-medium",g(A.type).text])},y(A.type),3),o("span",Js,y(t(e)("quotes.keywords.times",{count:A.count})),1),x(qe,{color:g(A.type).badge,variant:"soft",size:"xs"},{default:$(()=>[J(y(A.percentage)+"%",1)]),_:2},1032,["color"])],2))),128))])])):D("",!0),I.value&&ce.value.length===0?(l(),k(t(he),{key:1,text:t(e)("quotes.keywords.loading")},null,8,["text"])):D("",!0)]),item:$(({item:A,index:ge})=>[o("div",eo,[o("span",{class:W(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",t($e)(ge)])},y(t(Te)(ge)),3),o("div",to,[o("p",ao,y(A.name),1)]),o("div",so,[o("div",oo,[(l(!0),_(E,null,Q(P(A,ge),ke=>(l(),_("div",{key:ke.keyword,class:W(["h-full transition-all first:rounded-l-full last:rounded-r-full",ke.bg]),style:_e({width:`${ke.width}%`}),title:`${ke.keyword}: ${ke.width.toFixed(1)}%`},null,14,no))),128))])]),o("div",lo,[o("span",io,y(A.value),1),o("span",ro,y(t(e)("quotes.keywords.timesWithPercent",{count:A.value,percent:A.percentage})),1)])])]),empty:$(()=>[I.value?(l(),_("div",mo)):(l(),_("div",uo,[x(xt,{name:"i-heroicons-magnifying-glass",class:"mb-2 h-8 w-8 opacity-50"}),o("p",co,y(t(e)("quotes.keywords.empty")),1)]))]),_:1},8,["items","title","description","count-label"])}}}),po={class:"flex h-56 items-center justify-center",role:"status","aria-live":"polite"},go={class:"sr-only"},de=q({__name:"RankingLoadingBody",setup(n){const{t:e}=te();return(a,s)=>(l(),_("div",po,[o("span",go,y(t(e)("common.loading")),1),x(t(dt))]))}}),ho={class:"flex items-center gap-3"},fo={key:1,class:"py-8 text-center text-sm text-gray-400"},yo=q({__name:"ActivityRank",props:{sessionId:{},memberActivity:{},baseLoading:{type:Boolean},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(n){const e=n,a=C(null),s=C(null),u=C(!1),i=C("activity"),c=C(e.globalTopN??10);z(()=>e.globalTopN,p=>{p!==void 0&&(c.value=p)});async function g(){if(e.sessionId){u.value=!0;try{const p=ee(),[S,T]=await Promise.all([p.getDragonKingAnalysis(e.sessionId,e.timeFilter),p.getCheckInAnalysis(e.sessionId,e.timeFilter)]);a.value=S,s.value=T}catch(p){console.error("加载活跃数据失败:",p)}finally{u.value=!1}}}const m=b(()=>e.memberActivity.map(p=>({id:p.memberId.toString(),name:p.name,value:p.messageCount,percentage:p.percentage}))),f=b(()=>a.value?a.value.rank.map(p=>({id:p.memberId.toString(),name:p.name,value:p.count,percentage:p.percentage})):[]),h=b(()=>s.value?s.value.loyaltyRank.map(p=>({id:p.memberId.toString(),name:p.name,value:p.totalDays,percentage:p.percentage})):[]),v=b(()=>i.value==="activity"?!!e.baseLoading&&e.memberActivity.length===0:u.value),r=b(()=>{switch(i.value){case"activity":return m.value;case"dragon":return f.value;case"loyalty":return h.value;default:return m.value}}),d=b(()=>{switch(i.value){case"activity":return"条";case"dragon":case"loyalty":return"天";default:return"条"}}),w=b(()=>{switch(i.value){case"activity":return"🏆 活跃榜 - 发言数量";case"dragon":return"🏆 活跃榜 - 龙王";case"loyalty":return"🏆 活跃榜 - 累计发言";default:return"🏆 活跃榜"}}),I=b(()=>{switch(i.value){case"activity":return"按消息发送数量排名";case"dragon":{const p=a.value?.totalDays;return p==null?"每天发言最多的人+1":`每天发言最多的人+1(共 ${p} 天)`}case"loyalty":{const p=s.value?.totalDays;return p==null?"累计发言天数排名":`累计发言天数排名(共 ${p} 天)`}default:return""}});return z(()=>[e.sessionId,e.timeFilter],()=>g(),{immediate:!0,deep:!0}),(p,S)=>(l(),k(t(j),{title:w.value,description:I.value},{headerRight:$(()=>[o("div",ho,[n.showTopNSelect?(l(),k(t(re),{key:0,modelValue:c.value,"onUpdate:modelValue":S[0]||(S[0]=T=>c.value=T)},null,8,["modelValue"])):D("",!0),x(t(ie),{modelValue:i.value,"onUpdate:modelValue":S[1]||(S[1]=T=>i.value=T),items:[{label:"发言数量",value:"activity"},{label:"龙王",value:"dragon"},{label:"累计发言",value:"loyalty"}],size:"sm"},null,8,["modelValue"])])]),default:$(()=>[v.value?(l(),k(de,{key:0})):(l(),_(E,{key:1},[r.value.length>0?(l(),k(t(Ae),{key:0,members:r.value,title:w.value,unit:d.value,"top-n":c.value,bare:""},null,8,["members","title","unit","top-n"])):(l(),_("div",fo,"暂无数据"))],64))]),_:1},8,["title","description"]))}}),bo={key:0},xo={key:0,class:"flex items-center justify-center gap-6 border-t border-gray-100 px-5 py-3 dark:border-gray-800"},ko={class:"px-3 py-2"},wo=q({__name:"EChartStreakRank",props:{items:{},title:{},description:{},topN:{default:10},mode:{default:"max"},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(n){const e=n,a=be(),s=b(()=>e.mode==="current"?e.items.filter(v=>v.currentStreak>0).sort((v,r)=>r.currentStreak-v.currentStreak).slice(0,e.topN):e.items.slice(0,e.topN)),u=ye(()=>s.value),i=b(()=>{const v=s.value.length*36;return Math.max(v+30,180)}),c={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]},g={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f97316"},{offset:1,color:"#fb923c"}]};function m(v,r){return`${v} ~ ${r}`}function f(v){return e.mode==="current"?v.currentStreak:v.maxStreak}const h=b(()=>{const v=[...s.value].reverse(),r=xe(v,{totalCount:s.value.length,labelMaxLength:a.value.labelMaxLength,avatars:u.value}),d=v.map(p=>f(p)),w=Math.max(...d,1),I=v.map(p=>({value:f(p),itemStyle:{color:e.mode==="current"||p.currentStreak>0?g:c,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:p=>{const S=p[0];if(!S)return"";const T=s.value.length-1-S.dataIndex,R=s.value[T];if(e.mode==="current")return`
7
+ `}},grid:{left:a.value.gridLeft,right:70,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:v*1.1,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:f.data,axisLine:{show:!1},axisTick:{show:!1},axisLabel:f.axisLabel},series:[{type:"bar",data:r,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:d=>{const w=s.value.length-1-d.dataIndex;return`${s.value[w].value} ${e.unit}`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(238, 69, 103, 0.3)"}}}]}});return(m,f)=>n.bare?(l(),k(t(fe),{key:0,"content-height":i.value,"max-height-vh":n.maxHeightVh},{default:$(()=>[x(ae,{option:g.value,height:i.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(l(),k(t(j),{key:1,title:n.title,description:n.description,scrollable:"","max-height-vh":n.maxHeightVh},{default:$(()=>[o("div",Aa,[x(ae,{option:g.value,height:i.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Na={class:"min-w-0 flex-1"},Da={class:"flex items-baseline justify-between gap-3"},Fa=["title"],qa={class:"flex shrink-0 items-baseline gap-1.5 whitespace-nowrap"},Ba={class:"font-mono text-base font-black tabular-nums text-gray-900 dark:text-white"},Ua={class:"text-xs text-gray-500 dark:text-gray-400"},Ha={class:"mt-2 flex items-center gap-2.5"},Ea={class:"h-1.5 flex-1 overflow-hidden rounded-full bg-gray-100 dark:bg-white/5"},Pa={class:"w-10 shrink-0 text-right font-mono text-[11px] tabular-nums text-gray-400 dark:text-gray-500"},tt=q({__name:"RankList",props:{members:{},showAvatar:{type:Boolean,default:!1},rankLimit:{default:0},unit:{}},setup(n){const{t:e}=te(),a=n,s=b(()=>a.unit||e("views.charts.rankList.unit")),u=We(),i=b(()=>a.rankLimit>0?a.members.slice(0,a.rankLimit):a.members);function c(m){return ve(m.id,m.avatar,u.value)}function g(m){if(i.value.length===0)return 0;const f=i.value[0].value;return f===0?0:Math.round(i.value[m].value/f*100)}return(m,f)=>(l(),_("div",null,[(l(!0),_(E,null,Q(i.value,(h,v)=>(l(),_("div",{key:h.id,class:"flex items-start gap-3 px-5 py-3.5 transition-colors hover:bg-gray-50/70 dark:hover:bg-white/5"},[o("span",{class:W(["w-8 shrink-0 pt-0.5 text-center font-mono text-sm font-black tabular-nums",t($e)(v)])},y(t(Te)(v)),3),n.showAvatar?(l(),k(Me,{key:0,src:c(h),alt:h.name,text:t(Ce)(h.name),"root-class":"h-10 w-10 shrink-0","image-class":"h-10 w-10 rounded-full object-cover","fallback-class":"flex h-10 w-10 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"},null,8,["src","alt","text"])):D("",!0),o("div",Na,[o("div",Da,[o("p",{class:"truncate text-sm font-medium text-gray-900 dark:text-white",title:h.name},y(h.name),9,Fa),o("div",qa,[o("span",Ba,y(h.value),1),o("span",Ua,y(s.value),1)])]),o("div",Ha,[o("div",Ea,[o("div",{class:W(["h-full rounded-full bg-linear-to-r transition-all",t(ha)(v)]),style:_e({width:`${g(v)}%`})},null,6)]),o("span",Pa,y(h.percentage)+"% ",1)])])]))),128))]))}}),za={class:"flex items-center gap-2"},Oa={class:"shrink-0 whitespace-nowrap rounded-full bg-gray-100 px-2.5 py-1 text-[11px] font-medium text-gray-500 dark:bg-white/5 dark:text-gray-400"},ja={class:"no-capture"},Ka={key:0,class:"no-capture px-3 pb-3 pt-1"},Wa={class:"flex items-center gap-1.5"},Ga={class:"flex w-full items-center justify-between border-b border-gray-100 px-6 py-5 dark:border-white/5"},Ya={class:"min-w-0"},Xa={class:"truncate text-base font-semibold text-gray-900 dark:text-white"},Qa={class:"mt-1 text-xs text-gray-500 dark:text-gray-400"},Za={class:"max-h-[70vh] overflow-y-auto"},ft=q({__name:"ExpandableListCard",props:{title:{},description:{},showViewAll:{type:Boolean},viewAllLabel:{},countLabel:{}},setup(n){const e=C(!1),a=C(null);return(s,u)=>{const i=Se,c=Ie,g=Ve;return l(),k(t(j),{title:n.title,description:n.description,"show-divider":!1},{headerRight:$(()=>[o("div",za,[o("span",Oa,y(n.countLabel),1),o("div",ja,[ne(s.$slots,"headerRight")])])]),default:$(()=>[o("div",null,[ne(s.$slots,"default")]),n.showViewAll?(l(),_("div",Ka,[x(g,{open:e.value,"onUpdate:open":u[0]||(u[0]=m=>e.value=m),ui:{content:"md:w-full max-w-4xl"}},{content:$(()=>[o("div",{ref_key:"modalBodyRef",ref:a,class:"section-content flex flex-col overflow-hidden"},[o("div",Ga,[o("div",Ya,[o("h3",Xa,y(n.title),1),o("p",Qa,y(n.countLabel),1)]),x(Jt,{size:"xs",type:"element","target-element":a.value},null,8,["target-element"])]),o("div",Za,[ne(s.$slots,"full")])],512)]),default:$(()=>[x(c,{color:"neutral",variant:"ghost",class:"w-full justify-center rounded-lg py-2.5 text-xs font-medium text-gray-500 dark:text-gray-400"},{default:$(()=>[o("span",Wa,[J(y(n.viewAllLabel)+" ",1),x(i,{name:"i-heroicons-arrow-right",class:"h-3.5 w-3.5"})])]),_:1})]),_:3},8,["open"])])):D("",!0)]),_:3},8,["title","description"])}}}),Ja=q({__name:"RankListPro",props:{members:{},title:{},description:{},topN:{default:10},unit:{}},setup(n){const{t:e}=te(),a=n,s=b(()=>a.members.slice(0,a.topN)),u=b(()=>a.members.length>a.topN);return(i,c)=>(l(),k(ft,{title:n.title,description:n.description,"show-view-all":u.value,"view-all-label":t(e)("views.charts.rankListPro.fullRanking"),"count-label":t(e)("views.charts.rankListPro.memberCount",{count:n.members.length})},{headerRight:$(()=>[ne(i.$slots,"headerRight")]),full:$(()=>[x(tt,{members:n.members,unit:n.unit,"show-avatar":""},null,8,["members","unit"])]),default:$(()=>[x(tt,{members:s.value,unit:n.unit,"show-avatar":""},null,8,["members","unit"])]),_:3},8,["title","description","show-view-all","view-all-label","count-label"]))}}),es={key:0},ts={class:"px-5 py-8 text-center text-sm text-gray-400"},Le=q({__name:"ListPro",props:{items:{},title:{},description:{},topN:{default:10},countLabel:{}},setup(n){const{t:e}=te(),a=n,s=b(()=>a.items.slice(0,a.topN)),u=b(()=>a.items.length>a.topN),i=b(()=>a.countLabel?a.countLabel:e("views.charts.listPro.countTemplate",{count:a.items.length}));return(c,g)=>(l(),k(ft,{title:n.title,description:n.description,"show-view-all":u.value,"view-all-label":t(e)("views.charts.listPro.fullRanking"),"count-label":i.value},{headerRight:$(()=>[ne(c.$slots,"headerRight")]),full:$(()=>[o("div",null,[(l(!0),_(E,null,Q(n.items,(m,f)=>(l(),_("div",{key:f,class:"group/list-row px-5 py-3.5 transition-colors hover:bg-gray-50/70 dark:hover:bg-white/5"},[ne(c.$slots,"item",{item:m,index:f})]))),128))])]),default:$(()=>[ne(c.$slots,"config"),o("div",null,[(l(!0),_(E,null,Q(s.value,(m,f)=>(l(),_("div",{key:f,class:"group/list-row px-5 py-3.5 transition-colors hover:bg-gray-50/70 dark:hover:bg-white/5"},[ne(c.$slots,"item",{item:m,index:f})]))),128))]),n.items.length===0?(l(),_("div",es,[ne(c.$slots,"empty",{},()=>[o("div",ts,y(t(e)("views.charts.listPro.empty")),1)])])):D("",!0)]),_:3},8,["title","description","show-view-all","view-all-label","count-label"]))}});function as(n,e){return{keywords:[n],...e?.memberId!=null?{memberId:e.memberId}:{}}}const ss={class:"main-content mx-auto max-w-3xl p-6"},os=["aria-label","onClick"],ns=["title"],ls={class:"flex shrink-0 items-center gap-3 pl-2"},is={class:"font-mono text-sm font-black tabular-nums text-primary-600 dark:text-primary-400"},rs={class:"grid w-full grid-cols-[2rem_2rem_minmax(0,1fr)] items-start gap-x-3 sm:grid-cols-[2rem_2rem_minmax(7.5rem,0.65fr)_minmax(0,1.35fr)]"},us=["title"],cs={class:"col-start-3 row-start-2 mt-1.5 flex min-w-0 flex-wrap items-center gap-x-4 gap-y-1.5 sm:col-start-4 sm:row-start-1 sm:mt-0"},ds=["title","aria-label","onClick"],ms={class:"max-w-40 truncate text-sm text-gray-700 transition-colors group-hover/phrase:text-primary-600 dark:text-gray-200 dark:group-hover/phrase:text-primary-400"},vs={class:"shrink-0 font-mono text-[11px] tabular-nums text-gray-400 dark:text-gray-500"},ps=q({__name:"CatchphraseTab",props:{sessionId:{},timeFilter:{}},setup(n){const{t:e}=te(),a=je(),s=We();function u(p){return ve(p.memberId,void 0,s.value)}const i=n,c=C(null),g=C(!1),m=b(()=>c.value?.members??[]),f=b(()=>i.timeFilter?.memberId!=null),h=b(()=>f.value?m.value[0]??null:null),v=b(()=>h.value?e("quotes.catchphrase.memberTitle",{name:h.value.name}):e("quotes.catchphrase.title")),r=b(()=>f.value?e("quotes.catchphrase.memberDescription"):e("quotes.catchphrase.description"));async function d(){if(i.sessionId){g.value=!0;try{c.value=await ee().getCatchphraseAnalysis(i.sessionId,i.timeFilter)}catch(p){console.error("Failed to load catchphrase analysis:",p)}finally{g.value=!1}}}function w(p){a.openChatRecordDrawer(as(p,i.timeFilter))}function I(p){return p.catchphrases.slice(0,5)}return z(()=>[i.sessionId,i.timeFilter],()=>{d()},{immediate:!0,deep:!0}),(p,S)=>{const T=Se;return l(),_("div",ss,[g.value?(l(),k(t(he),{key:0,text:t(e)("quotes.catchphrase.loading")},null,8,["text"])):h.value?(l(),k(t(Le),{key:1,items:h.value.catchphrases,title:v.value,description:r.value,"top-n":10,"count-label":t(e)("quotes.catchphrase.phraseCount",{count:h.value.catchphrases.length})},{headerRight:$(()=>[h.value?(l(),k(Me,{key:0,src:u(h.value),alt:h.value.name,text:t(Ce)(h.value.name),"root-class":"h-8 w-8 shrink-0","image-class":"h-8 w-8 rounded-full object-cover","fallback-class":"flex h-8 w-8 items-center justify-center rounded-full bg-linear-to-br from-pink-100 to-rose-100 text-[10px] font-medium text-pink-600 dark:from-pink-900/30 dark:to-rose-900/30 dark:text-pink-400"},null,8,["src","alt","text"])):D("",!0)]),item:$(({item:R,index:L})=>[o("button",{type:"button",class:"group/item grid w-full grid-cols-[2rem_minmax(0,1fr)_auto] items-center gap-3 rounded-lg text-left outline-none focus-visible:ring-2 focus-visible:ring-primary-500/40","aria-label":`${t(e)("quotes.catchphrase.viewChat")}: ${R.content}`,onClick:K=>w(R.content)},[o("span",{class:W(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",t($e)(L)])},y(t(Te)(L)),3),o("p",{class:"line-clamp-2 min-w-0 text-sm font-medium leading-5 text-gray-900 dark:text-white",title:R.content},y(R.content),9,ns),o("div",ls,[o("span",is,y(t(e)("quotes.catchphrase.times",{count:R.count})),1),x(T,{name:"i-heroicons-chevron-right",class:"h-4 w-4 text-gray-300 transition-colors group-hover/item:text-gray-500 dark:text-gray-600 dark:group-hover/item:text-gray-400"})])],8,os)]),_:1},8,["items","title","description","count-label"])):m.value.length>0?(l(),k(t(Le),{key:2,items:m.value,title:v.value,description:r.value,"top-n":10,"count-label":t(e)("quotes.catchphrase.memberCount",{count:m.value.length})},{item:$(({item:R,index:L})=>[o("div",rs,[o("span",{class:W(["row-span-2 w-8 shrink-0 pt-0.5 text-center font-mono text-sm font-black tabular-nums sm:row-span-1",t($e)(L)])},y(t(Te)(L)),3),x(Me,{src:u(R),alt:R.name,text:t(Ce)(R.name),"root-class":"col-start-2 row-span-2 h-8 w-8 shrink-0 sm:row-span-1","image-class":"h-8 w-8 rounded-full object-cover","fallback-class":"flex h-8 w-8 items-center justify-center rounded-full bg-linear-to-br from-pink-100 to-rose-100 text-[10px] font-medium text-pink-600 dark:from-pink-900/30 dark:to-rose-900/30 dark:text-pink-400"},null,8,["src","alt","text"]),o("p",{class:"col-start-3 row-start-1 min-w-0 truncate pt-0.5 text-sm font-semibold text-gray-900 dark:text-white",title:R.name},y(R.name),9,us),o("div",cs,[(l(!0),_(E,null,Q(I(R),K=>(l(),_("button",{key:K.content,type:"button",class:"group/phrase inline-flex max-w-full items-baseline gap-1 rounded text-left outline-none focus-visible:ring-2 focus-visible:ring-primary-500/40",title:K.content,"aria-label":`${t(e)("quotes.catchphrase.viewChat")}: ${K.content}`,onClick:U=>w(K.content)},[o("span",ms," “"+y(K.content)+"” ",1),o("span",vs,y(t(e)("quotes.catchphrase.times",{count:K.count})),1)],8,ds))),128))])])]),_:1},8,["items","title","description","count-label"])):(l(),k(t(j),{key:3,title:v.value,description:r.value,"show-divider":!1},{default:$(()=>[x(t(le),{text:t(e)("quotes.catchphrase.empty.title")},null,8,["text"])]),_:1},8,["title","description"]))])}}}),gs={class:"main-content mx-auto max-w-3xl p-6"},hs=["aria-label","onClick"],fs={class:"min-w-0"},ys=["title"],bs={class:"mt-1 flex min-w-0 items-center gap-1.5 text-xs text-gray-400 dark:text-gray-500"},xs={class:"truncate"},ks={class:"shrink-0"},ws={class:"flex shrink-0 items-center gap-3 pl-2"},_s={class:"text-right"},$s={class:"font-mono text-sm font-black tabular-nums text-primary-600 dark:text-primary-400"},Ts={class:"mt-0.5 text-[11px] text-gray-400 dark:text-gray-500"},Cs=q({__name:"HotRepeatTab",props:{sessionId:{},timeFilter:{}},setup(n){const{t:e}=te(),a=n,s=je(),u=pt();function i(h){return ve(h.originatorId,void 0,u.value.byId,{name:h.originatorName,byName:u.value.byName})}const c=C(null),g=C(!1);async function m(){if(a.sessionId){g.value=!0;try{c.value=await ee().getRepeatAnalysis(a.sessionId,a.timeFilter)}catch(h){console.error("Failed to load repeat analysis:",h)}finally{g.value=!1}}}function f(h){s.openChatRecordDrawer({scrollToMessageId:h.firstMessageId,highlightKeywords:[h.content]})}return z(()=>[a.sessionId,a.timeFilter],()=>{m()},{immediate:!0,deep:!0}),(h,v)=>{const r=Se;return l(),_("div",gs,[g.value?(l(),k(t(he),{key:0,text:t(e)("quotes.hotRepeat.loading")},null,8,["text"])):c.value&&c.value.hotContents.length>0?(l(),k(t(Le),{key:1,items:c.value.hotContents,title:t(e)("quotes.hotRepeat.title"),description:t(e)("quotes.hotRepeat.description"),"top-n":10,"count-label":t(e)("quotes.hotRepeat.countTemplate",{count:c.value.hotContents.length})},{item:$(({item:d,index:w})=>[o("button",{type:"button",class:"group/item grid w-full grid-cols-[2rem_2rem_minmax(0,1fr)_auto] items-start gap-3 rounded-lg text-left outline-none focus-visible:ring-2 focus-visible:ring-primary-500/40","aria-label":`${t(e)("quotes.hotRepeat.viewChat")}: ${d.content}`,onClick:I=>f(d)},[o("span",{class:W(["w-8 shrink-0 pt-0.5 text-center font-mono text-sm font-black tabular-nums",t($e)(w)])},y(t(Te)(w)),3),x(Me,{src:i(d),alt:d.originatorName,text:t(Ce)(d.originatorName),"root-class":"h-8 w-8 shrink-0","image-class":"h-8 w-8 rounded-full object-cover","fallback-class":"flex h-8 w-8 items-center justify-center rounded-full bg-linear-to-br from-pink-100 to-rose-100 text-[10px] font-medium text-pink-600 dark:from-pink-900/30 dark:to-rose-900/30 dark:text-pink-400"},null,8,["src","alt","text"]),o("div",fs,[o("p",{class:"line-clamp-2 text-sm font-medium leading-5 text-gray-900 dark:text-white",title:d.content},y(d.content),9,ys),o("div",bs,[o("span",xs,y(d.originatorName),1),v[0]||(v[0]=o("span",{"aria-hidden":"true"},"·",-1)),o("span",ks,y(t(ze)(d.lastTs)),1)])]),o("div",ws,[o("div",_s,[o("p",$s,y(t(e)("quotes.hotRepeat.people",{count:d.maxChainLength})),1),o("p",Ts,y(t(e)("quotes.hotRepeat.times",{count:d.count})),1)]),x(r,{name:"i-heroicons-chevron-right",class:"h-4 w-4 text-gray-300 transition-colors group-hover/item:text-gray-500 dark:text-gray-600 dark:group-hover/item:text-gray-400"})])],8,hs)]),_:1},8,["items","title","description","count-label"])):(l(),k(t(j),{key:2,title:t(e)("quotes.hotRepeat.title")},{default:$(()=>[x(t(le),{text:t(e)("quotes.hotRepeat.empty")},null,8,["text"])]),_:1},8,["title"]))])}}}),Is={class:"main-content mx-auto max-w-[920px] space-y-4 p-4 sm:space-y-6 sm:p-6"},Ss={class:"grid grid-cols-1 gap-6 lg:grid-cols-2"},Rs={class:"p-3 sm:p-5"},Ms={class:"p-3 sm:p-5"},Ls=q({__name:"GroupChatOverview",props:{session:{},memberActivity:{},messageTypes:{},hourlyActivity:{},dailyActivity:{},timeRange:{},filteredMessageCount:{},filteredMemberCount:{},timeFilter:{}},setup(n){const{t:e}=te(),a=n,{dailyChartData:s}=qt(()=>a.dailyActivity),u=b(()=>({labels:a.messageTypes.map(c=>Qt(c.type,e)),values:a.messageTypes.map(c=>c.count)})),i=b(()=>{const c=[...a.memberActivity].sort((v,r)=>r.messageCount-v.messageCount),g=c.slice(0,10),m=c.slice(10).reduce((v,r)=>v+r.messageCount,0),f=g.map(v=>v.name),h=g.map(v=>v.messageCount);return m>0&&(f.push(e("analysis.overview.others")),h.push(m)),{labels:f,values:h}});return(c,g)=>(l(),_("div",Is,[x(Dt,{session:n.session,"daily-activity":n.dailyActivity,"message-types":n.messageTypes,"hourly-activity":n.hourlyActivity,"time-range":n.timeRange,"filtered-message-count":n.filteredMessageCount,"filtered-member-count":n.filteredMemberCount,"time-filter":n.timeFilter},null,8,["session","daily-activity","message-types","hourly-activity","time-range","filtered-message-count","filtered-member-count","time-filter"]),o("div",Ss,[x(t(j),{title:t(e)("analysis.overview.messageTypeDistribution"),"show-divider":!1},{default:$(()=>[o("div",Rs,[x(t(Ze),{data:u.value,height:280},null,8,["data"])])]),_:1},8,["title"]),x(t(j),{title:t(e)("analysis.overview.memberDistribution"),"show-divider":!1},{default:$(()=>[o("div",Ms,[x(t(Ze),{data:i.value,height:280},null,8,["data"])])]),_:1},8,["title"])]),x(Ft,{"daily-activity":n.dailyActivity,"daily-chart-data":t(s)},null,8,["daily-activity","daily-chart-data"])]))}}),Vs={class:"flex h-full flex-col"},As={class:"min-h-0 flex-1 overflow-y-auto"},Ns=q({__name:"GroupChatInsights",props:{sessionId:{},session:{},memberActivity:{},messageTypes:{},hourlyActivity:{},dailyActivity:{},timeRange:{},filteredMessageCount:{},filteredMemberCount:{},timeFilter:{}},setup(n){const e=ot(()=>nt(()=>import("./GroupRelationshipGalaxyView-CnzPEgUS.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))),{t:a}=te(),s=n,u=b(()=>[{id:"overview",label:a("analysis.tabs.overview"),icon:"i-heroicons-squares-2x2"},{id:"type-analysis",label:a("analysis.subTabs.insights.typeAnalysis"),icon:"i-heroicons-chart-pie"},{id:"time-analysis",label:a("analysis.subTabs.insights.timeAnalysis"),icon:"i-heroicons-clock"},{id:"topic",label:a("analysis.subTabs.insights.topic"),icon:"i-heroicons-cloud"},{id:"relationship",label:a("analysis.subTabs.insights.relationship"),icon:"i-heroicons-heart"}]),i=C("overview"),c=C(null),g=b(()=>({...s.timeFilter,memberId:c.value}));return(m,f)=>(l(),_("div",Vs,[x(t(ct),{modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=h=>i.value=h),items:u.value,"persist-key":"groupInsightsTab"},{right:$(()=>[i.value==="type-analysis"||i.value==="time-analysis"?(l(),k(ut,{key:0,modelValue:c.value,"onUpdate:modelValue":f[0]||(f[0]=h=>c.value=h),"session-id":s.sessionId},null,8,["modelValue","session-id"])):D("",!0)]),_:1},8,["modelValue","items"]),o("div",As,[x(t(Bt),{"active-key":i.value},{default:$(({viewKey:h})=>[h==="overview"?(l(),k(Ls,{key:0,session:s.session,"member-activity":s.memberActivity,"message-types":s.messageTypes,"hourly-activity":s.hourlyActivity,"daily-activity":s.dailyActivity,"time-range":s.timeRange,"filtered-message-count":s.filteredMessageCount,"filtered-member-count":s.filteredMemberCount,"time-filter":s.timeFilter},null,8,["session","member-activity","message-types","hourly-activity","daily-activity","time-range","filtered-message-count","filtered-member-count","time-filter"])):h==="type-analysis"?(l(),k(Ut,{key:1,"session-id":s.sessionId,"session-name":s.session.name,"time-filter":g.value},null,8,["session-id","session-name","time-filter"])):h==="time-analysis"?(l(),k(Ht,{key:2,"session-id":s.sessionId,"session-name":s.session.name,"time-filter":g.value},null,8,["session-id","session-name","time-filter"])):h==="topic"?(l(),k(t(Et),{key:3,"session-id":s.sessionId,"time-filter":s.timeFilter},null,8,["session-id","time-filter"])):h==="relationship"?(l(),k(t(e),{key:4,"session-id":s.sessionId,"time-filter":s.timeFilter},null,8,["session-id","time-filter"])):D("",!0)]),_:1},8,["active-key"])])]))}}),Ds={class:"border-b border-gray-100 p-4 dark:border-gray-800"},Fs={class:"mb-3 flex flex-wrap items-center gap-2"},qs={class:"text-xs text-gray-500 dark:text-gray-400"},Bs=["onClick"],Us={class:"p-4"},Hs={class:"mb-3 font-semibold text-gray-900 dark:text-white"},Es={class:"space-y-3"},Ps={class:"mb-1 block text-xs text-gray-500"},zs={class:"mb-1 block text-xs text-gray-500"},Os={class:"flex flex-wrap items-center gap-2"},js={class:"mt-4 flex justify-end gap-2"},Ks={class:"flex flex-wrap items-center gap-2"},Ws={class:"mt-1.5 text-xs text-gray-400"},Gs={key:0,class:"border-b border-gray-100 px-5 py-4 dark:border-gray-800"},Ys={class:"mb-3 flex items-center justify-between"},Xs={class:"text-base font-medium text-gray-700 dark:text-gray-300"},Qs={class:"flex cursor-pointer items-center gap-1.5 text-xs text-gray-500"},Zs={class:"flex flex-wrap gap-2"},Js={class:"text-xs text-gray-500"},eo={class:"flex items-center gap-3"},to={class:"w-32 shrink-0"},ao={class:"truncate font-medium text-gray-900 dark:text-white"},so={class:"flex flex-1 items-center"},oo={class:"flex h-2 w-full overflow-hidden rounded-full bg-gray-100 dark:bg-white/5"},no=["title"],lo={class:"flex shrink-0 items-baseline gap-2"},io={class:"font-mono text-base font-black tabular-nums text-gray-900 dark:text-white"},ro={class:"text-xs text-gray-500"},uo={key:0,class:"flex h-64 flex-col items-center justify-center text-gray-400"},co={class:"text-sm"},mo={key:1,class:"h-64"},vo=q({__name:"KeywordRankingTab",props:{sessionId:{},timeFilter:{}},setup(n){const{t:e}=te(),a=n,s=sa(),u=C(!1),i={bg:"bg-pink-400",text:"text-pink-700",badge:"pink",wrapBg:"bg-pink-50 dark:bg-pink-900/20"},c=[{bg:"bg-amber-400",text:"text-amber-700",badge:"amber",wrapBg:"bg-amber-50 dark:bg-amber-900/20"},{bg:"bg-pink-400",text:"text-pink-700",badge:"pink",wrapBg:"bg-pink-50 dark:bg-pink-900/20"},{bg:"bg-blue-400",text:"text-blue-700",badge:"blue",wrapBg:"bg-blue-50 dark:bg-blue-900/20"},{bg:"bg-green-400",text:"text-green-700",badge:"green",wrapBg:"bg-green-50 dark:bg-green-900/20"},{bg:"bg-purple-400",text:"text-purple-700",badge:"purple",wrapBg:"bg-purple-50 dark:bg-purple-900/20"},{bg:"bg-red-400",text:"text-red-700",badge:"red",wrapBg:"bg-red-50 dark:bg-red-900/20"},{bg:"bg-cyan-400",text:"text-cyan-700",badge:"cyan",wrapBg:"bg-cyan-50 dark:bg-cyan-900/20"},{bg:"bg-orange-400",text:"text-orange-700",badge:"orange",wrapBg:"bg-orange-50 dark:bg-orange-900/20"}];function g(M){if(!u.value)return i;const F=r.value.indexOf(M);if(F>=0)return c[F%c.length];let se=0;for(let oe=0;oe<M.length;oe++)se=se*31+M.charCodeAt(oe)>>>0;return c[se%c.length]}const m=["laugh","sad","praise","slacker","gossip","polite","curious"],f=b(()=>[{id:"laugh",name:e("quotes.keywords.templates.laugh.name"),keywords:e("quotes.keywords.templates.laugh.keywords").split(","),description:e("quotes.keywords.templates.laugh.description")},{id:"sad",name:e("quotes.keywords.templates.sad.name"),keywords:e("quotes.keywords.templates.sad.keywords").split(","),description:e("quotes.keywords.templates.sad.description")},{id:"praise",name:e("quotes.keywords.templates.praise.name"),keywords:e("quotes.keywords.templates.praise.keywords").split(","),description:e("quotes.keywords.templates.praise.description")},{id:"slacker",name:e("quotes.keywords.templates.slacker.name"),keywords:e("quotes.keywords.templates.slacker.keywords").split(","),description:e("quotes.keywords.templates.slacker.description")},{id:"gossip",name:e("quotes.keywords.templates.gossip.name"),keywords:e("quotes.keywords.templates.gossip.keywords").split(","),description:e("quotes.keywords.templates.gossip.description")},{id:"polite",name:e("quotes.keywords.templates.polite.name"),keywords:e("quotes.keywords.templates.polite.keywords").split(","),description:e("quotes.keywords.templates.polite.description")},{id:"curious",name:e("quotes.keywords.templates.curious.name"),keywords:e("quotes.keywords.templates.curious.keywords").split(","),description:e("quotes.keywords.templates.curious.description")}]),h=b(()=>{const M=s.customKeywordTemplates.map(se=>({...se,isCustom:!0}));return[...f.value.filter(se=>!s.deletedPresetTemplateIds.includes(se.id)),...M]}),v=C("laugh"),r=C([]);z(f,M=>{M.length>0&&r.value.length===0&&(r.value=[...M[0].keywords])},{immediate:!0});const d=b(()=>{const M=h.value.find(F=>F.id===v.value);return M?M.name:""}),w=C(null),I=C(!1);let p=0;const S=C(!1),T=C(null),R=C(""),L=C([]),K=C(""),U=b(()=>T.value!==null),B=b(()=>U.value?e("quotes.keywords.modal.editTitle"):e("quotes.keywords.modal.createTitle"));function O(){T.value=null,R.value="",L.value=[],K.value="",S.value=!0}function Z(M){T.value=M.id,R.value=M.name,L.value=[...M.keywords],S.value=!0}function Y(){const M=K.value.trim();M&&!L.value.includes(M)&&(L.value=[...L.value,M]),K.value=""}function G(M){L.value=L.value.filter(F=>F!==M)}function N(M){v.value=M.id,r.value=[...M.keywords],w.value=null,V()}function H(){p++,r.value=[],w.value=null,I.value=!1,v.value=""}const X=C("");function pe(){const M=X.value.trim();M&&!r.value.includes(M)&&(r.value=[...r.value,M],V()),X.value=""}function Ne(M){r.value=r.value.filter(F=>F!==M),V()}function Re(M){return m.includes(M)}function De(){if(R.value.trim()){if(U.value&&T.value)if(Re(T.value)){const M={id:`custom_${Date.now()}`,name:R.value.trim(),keywords:[...L.value]};s.addCustomKeywordTemplate(M),v.value=M.id,r.value=[...M.keywords],V()}else s.updateCustomKeywordTemplate(T.value,{name:R.value.trim(),keywords:[...L.value]}),v.value===T.value&&(r.value=[...L.value],V());else{const M={id:`custom_${Date.now()}`,name:R.value.trim(),keywords:[...L.value]};s.addCustomKeywordTemplate(M),v.value=M.id,r.value=[...M.keywords],V()}S.value=!1}}function ue(M){Re(M)?s.addDeletedPresetTemplateId(M):s.removeCustomKeywordTemplate(M),v.value===M&&(h.value.length>0?N(h.value[0]):H())}async function V(){const M=++p;if(!a.sessionId||r.value.length===0){w.value=null,I.value=!1;return}I.value=!0;try{const F=await ee().getLaughAnalysis(a.sessionId,a.timeFilter,[...r.value]);if(M!==p)return;w.value=F}catch(F){if(M!==p)return;console.error("Failed to load keyword ranking:",F),w.value=null}finally{M===p&&(I.value=!1)}}const ce=b(()=>w.value?w.value.rankByCount.map(M=>({id:M.memberId.toString(),name:M.name,value:M.laughCount,percentage:M.percentage,keywordDistribution:M.keywordDistribution||[]})):[]);function Fe(M){if(ce.value.length===0)return 0;const F=ce.value[0].value;return F===0?0:Math.round(ce.value[M].value/F*100)}function P(M,F){const se=Fe(F);return!M.keywordDistribution||M.keywordDistribution.length===0?[{keyword:"default",width:se,bg:"bg-amber-400"}]:M.keywordDistribution.map(oe=>({keyword:oe.keyword,width:oe.percentage/100*se,bg:g(oe.keyword).bg}))}return z(()=>[a.sessionId,a.timeFilter],()=>{V()},{immediate:!0,deep:!0}),(M,F)=>{const se=_t,oe=lt,qe=mt,Ge=Ie,yt=Ve,bt=aa,xt=Se;return l(),k(t(Le),{items:ce.value,title:t(e)("quotes.keywords.title"),description:t(e)("quotes.keywords.description"),"top-n":10,"count-label":t(e)("quotes.keywords.countTemplate",{count:ce.value.length})},{config:$(()=>[o("div",Ds,[o("div",Fs,[o("span",qs,y(t(e)("quotes.keywords.templateLabel")),1),(l(!0),_(E,null,Q(h.value,A=>(l(),k(se,{key:A.id,items:[[{label:t(e)("quotes.keywords.contextMenu.edit"),icon:"i-lucide-pencil",disabled:!A.isCustom,onSelect:()=>Z(A)},{label:t(e)("quotes.keywords.contextMenu.delete"),icon:"i-lucide-trash",color:"error",onSelect:()=>ue(A.id)}]]},{default:$(()=>[o("button",{class:W(["rounded-md border px-2.5 py-1 text-sm transition-all",v.value===A.id?"border-pink-500 bg-pink-50 text-pink-600 dark:border-pink-400 dark:bg-pink-900/20 dark:text-pink-400":"border-gray-200 text-gray-600 hover:border-gray-300 dark:border-gray-700 dark:text-gray-400 dark:hover:border-gray-600"]),onClick:ge=>N(A)},y(A.name),11,Bs)]),_:2},1032,["items"]))),128)),x(yt,{open:S.value,"onUpdate:open":F[3]||(F[3]=A=>S.value=A)},{content:$(()=>[o("div",Us,[o("h3",Hs,y(B.value),1),o("div",Es,[o("div",null,[o("label",Ps,y(t(e)("quotes.keywords.modal.templateName")),1),x(oe,{modelValue:R.value,"onUpdate:modelValue":F[0]||(F[0]=A=>R.value=A),placeholder:t(e)("quotes.keywords.modal.templateNamePlaceholder")},null,8,["modelValue","placeholder"])]),o("div",null,[o("label",zs,y(t(e)("quotes.keywords.modal.keywords")),1),o("div",Os,[(l(!0),_(E,null,Q(L.value,A=>(l(),k(qe,{key:A,variant:"soft",class:"cursor-pointer",onClick:ge=>G(A)},{default:$(()=>[J(y(A)+" ",1),F[6]||(F[6]=o("span",{class:"ml-0.5 hover:text-red-500"},"×",-1))]),_:2},1032,["onClick"]))),128)),x(oe,{modelValue:K.value,"onUpdate:modelValue":F[1]||(F[1]=A=>K.value=A),placeholder:t(e)("quotes.keywords.modal.keywordPlaceholder"),class:"w-full",onKeydown:Ye(Xe(Y,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"])])])]),o("div",js,[x(Ge,{variant:"soft",onClick:F[2]||(F[2]=A=>S.value=!1)},{default:$(()=>[J(y(t(e)("common.cancel")),1)]),_:1}),x(Ge,{color:"primary",disabled:!R.value.trim()||L.value.length===0,onClick:De},{default:$(()=>[J(y(U.value?t(e)("quotes.keywords.modal.update"):t(e)("common.save")),1)]),_:1},8,["disabled"])])])]),default:$(()=>[o("button",{class:"rounded-md border border-dashed border-gray-300 px-2.5 py-1 text-sm text-gray-500 transition-all hover:border-pink-400 hover:text-pink-500 dark:border-gray-600",onClick:O},y(t(e)("quotes.keywords.newTemplate")),1)]),_:1},8,["open"])]),o("div",Ks,[(l(!0),_(E,null,Q(r.value,A=>(l(),k(qe,{key:A,class:"cursor-pointer",onClick:ge=>Ne(A)},{default:$(()=>[J(y(A)+" ",1),F[7]||(F[7]=o("span",{class:"ml-0.5 hover:text-red-500"},"×",-1))]),_:2},1032,["onClick"]))),128)),x(oe,{modelValue:X.value,"onUpdate:modelValue":F[4]||(F[4]=A=>X.value=A),placeholder:t(e)("quotes.keywords.searchPlaceholder"),class:"w-32",onKeydown:Ye(Xe(pe,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"]),r.value.length>0?(l(),_("button",{key:0,class:"text-sm text-pink-500 hover:text-red-500",onClick:H},y(t(e)("quotes.keywords.clear")),1)):D("",!0)]),o("div",Ws,y(t(e)("quotes.keywords.templateHint")),1)]),w.value&&w.value.typeDistribution.length>0?(l(),_("div",Gs,[o("div",Ys,[o("span",Xs,y(d.value?d.value:r.value.length===1?r.value[0]:t(e)("quotes.keywords.keyword"))+y(t(e)("quotes.keywords.ranking")),1),o("label",Qs,[o("span",null,y(t(e)("quotes.keywords.multiColorMode")),1),x(bt,{modelValue:u.value,"onUpdate:modelValue":F[5]||(F[5]=A=>u.value=A),size:"md"},null,8,["modelValue"])])]),o("div",Zs,[(l(!0),_(E,null,Q(w.value.typeDistribution,A=>(l(),_("div",{key:A.type,class:W(["flex items-center gap-2 rounded-lg px-2 py-2 text-xs",g(A.type).wrapBg])},[o("span",{class:W(["h-2.5 w-2.5 shrink-0 rounded-full",g(A.type).bg])},null,2),o("span",{class:W(["font-medium",g(A.type).text])},y(A.type),3),o("span",Js,y(t(e)("quotes.keywords.times",{count:A.count})),1),x(qe,{color:g(A.type).badge,variant:"soft",size:"xs"},{default:$(()=>[J(y(A.percentage)+"%",1)]),_:2},1032,["color"])],2))),128))])])):D("",!0),I.value&&ce.value.length===0?(l(),k(t(he),{key:1,text:t(e)("quotes.keywords.loading")},null,8,["text"])):D("",!0)]),item:$(({item:A,index:ge})=>[o("div",eo,[o("span",{class:W(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",t($e)(ge)])},y(t(Te)(ge)),3),o("div",to,[o("p",ao,y(A.name),1)]),o("div",so,[o("div",oo,[(l(!0),_(E,null,Q(P(A,ge),ke=>(l(),_("div",{key:ke.keyword,class:W(["h-full transition-all first:rounded-l-full last:rounded-r-full",ke.bg]),style:_e({width:`${ke.width}%`}),title:`${ke.keyword}: ${ke.width.toFixed(1)}%`},null,14,no))),128))])]),o("div",lo,[o("span",io,y(A.value),1),o("span",ro,y(t(e)("quotes.keywords.timesWithPercent",{count:A.value,percent:A.percentage})),1)])])]),empty:$(()=>[I.value?(l(),_("div",mo)):(l(),_("div",uo,[x(xt,{name:"i-heroicons-magnifying-glass",class:"mb-2 h-8 w-8 opacity-50"}),o("p",co,y(t(e)("quotes.keywords.empty")),1)]))]),_:1},8,["items","title","description","count-label"])}}}),po={class:"flex h-56 items-center justify-center",role:"status","aria-live":"polite"},go={class:"sr-only"},de=q({__name:"RankingLoadingBody",setup(n){const{t:e}=te();return(a,s)=>(l(),_("div",po,[o("span",go,y(t(e)("common.loading")),1),x(t(dt))]))}}),ho={class:"flex items-center gap-3"},fo={key:1,class:"py-8 text-center text-sm text-gray-400"},yo=q({__name:"ActivityRank",props:{sessionId:{},memberActivity:{},baseLoading:{type:Boolean},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(n){const e=n,a=C(null),s=C(null),u=C(!1),i=C("activity"),c=C(e.globalTopN??10);z(()=>e.globalTopN,p=>{p!==void 0&&(c.value=p)});async function g(){if(e.sessionId){u.value=!0;try{const p=ee(),[S,T]=await Promise.all([p.getDragonKingAnalysis(e.sessionId,e.timeFilter),p.getCheckInAnalysis(e.sessionId,e.timeFilter)]);a.value=S,s.value=T}catch(p){console.error("加载活跃数据失败:",p)}finally{u.value=!1}}}const m=b(()=>e.memberActivity.map(p=>({id:p.memberId.toString(),name:p.name,value:p.messageCount,percentage:p.percentage}))),f=b(()=>a.value?a.value.rank.map(p=>({id:p.memberId.toString(),name:p.name,value:p.count,percentage:p.percentage})):[]),h=b(()=>s.value?s.value.loyaltyRank.map(p=>({id:p.memberId.toString(),name:p.name,value:p.totalDays,percentage:p.percentage})):[]),v=b(()=>i.value==="activity"?!!e.baseLoading&&e.memberActivity.length===0:u.value),r=b(()=>{switch(i.value){case"activity":return m.value;case"dragon":return f.value;case"loyalty":return h.value;default:return m.value}}),d=b(()=>{switch(i.value){case"activity":return"条";case"dragon":case"loyalty":return"天";default:return"条"}}),w=b(()=>{switch(i.value){case"activity":return"🏆 活跃榜 - 发言数量";case"dragon":return"🏆 活跃榜 - 龙王";case"loyalty":return"🏆 活跃榜 - 累计发言";default:return"🏆 活跃榜"}}),I=b(()=>{switch(i.value){case"activity":return"按消息发送数量排名";case"dragon":{const p=a.value?.totalDays;return p==null?"每天发言最多的人+1":`每天发言最多的人+1(共 ${p} 天)`}case"loyalty":{const p=s.value?.totalDays;return p==null?"累计发言天数排名":`累计发言天数排名(共 ${p} 天)`}default:return""}});return z(()=>[e.sessionId,e.timeFilter],()=>g(),{immediate:!0,deep:!0}),(p,S)=>(l(),k(t(j),{title:w.value,description:I.value},{headerRight:$(()=>[o("div",ho,[n.showTopNSelect?(l(),k(t(re),{key:0,modelValue:c.value,"onUpdate:modelValue":S[0]||(S[0]=T=>c.value=T)},null,8,["modelValue"])):D("",!0),x(t(ie),{modelValue:i.value,"onUpdate:modelValue":S[1]||(S[1]=T=>i.value=T),items:[{label:"发言数量",value:"activity"},{label:"龙王",value:"dragon"},{label:"累计发言",value:"loyalty"}],size:"sm"},null,8,["modelValue"])])]),default:$(()=>[v.value?(l(),k(de,{key:0})):(l(),_(E,{key:1},[r.value.length>0?(l(),k(t(Ae),{key:0,members:r.value,title:w.value,unit:d.value,"top-n":c.value,bare:""},null,8,["members","title","unit","top-n"])):(l(),_("div",fo,"暂无数据"))],64))]),_:1},8,["title","description"]))}}),bo={key:0},xo={key:0,class:"flex items-center justify-center gap-6 border-t border-gray-100 px-5 py-3 dark:border-gray-800"},ko={class:"px-3 py-2"},wo=q({__name:"EChartStreakRank",props:{items:{},title:{},description:{},topN:{default:10},mode:{default:"max"},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(n){const e=n,a=be(),s=b(()=>e.mode==="current"?e.items.filter(v=>v.currentStreak>0).sort((v,r)=>r.currentStreak-v.currentStreak).slice(0,e.topN):e.items.slice(0,e.topN)),u=ye(()=>s.value),i=b(()=>{const v=s.value.length*36;return Math.max(v+30,180)}),c={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]},g={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f97316"},{offset:1,color:"#fb923c"}]};function m(v,r){return`${v} ~ ${r}`}function f(v){return e.mode==="current"?v.currentStreak:v.maxStreak}const h=b(()=>{const v=[...s.value].reverse(),r=xe(v,{totalCount:s.value.length,labelMaxLength:a.value.labelMaxLength,avatars:u.value}),d=v.map(p=>f(p)),w=Math.max(...d,1),I=v.map(p=>({value:f(p),itemStyle:{color:e.mode==="current"||p.currentStreak>0?g:c,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:p=>{const S=p[0];if(!S)return"";const T=s.value.length-1-S.dataIndex,R=s.value[T];if(e.mode==="current")return`
8
8
  <div style="padding: 4px 8px;">
9
9
  <div style="font-weight: bold; margin-bottom: 6px;">${R.name}</div>
10
10
  <div style="color: #fb923c;">🔥 当前连续 <b>${R.currentStreak}</b> 天</div>
@@ -61,4 +61,4 @@ import{b as C,x as Oe,y as at,d as q,o as l,c as _,n as W,a as o,F as E,j as Q,p
61
61
  <div><span style="color: ${c.h3to4};">●</span> 3-4点: ${I.h3to4} 条</div>
62
62
  </div>
63
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:h*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:f.data,axisLine:{show:!1},axisTick:{show:!1},axisLabel:f.axisLabel},series:[{name:"23点",type:"bar",stack:"total",data:m.map(v=>v.hourlyBreakdown.h23),itemStyle:{color:c.h23},barWidth:18},{name:"0点",type:"bar",stack:"total",data:m.map(v=>v.hourlyBreakdown.h0),itemStyle:{color:c.h0},barWidth:18},{name:"1点",type:"bar",stack:"total",data:m.map(v=>v.hourlyBreakdown.h1),itemStyle:{color:c.h1},barWidth:18},{name:"2点",type:"bar",stack:"total",data:m.map(v=>v.hourlyBreakdown.h2),itemStyle:{color:c.h2},barWidth:18},{name:"3-4点",type:"bar",stack:"total",data:m.map(v=>v.hourlyBreakdown.h3to4),itemStyle:{color:c.h3to4,borderRadius:[0,4,4,0]},barWidth:18,label:{show:!0,position:"right",distance:8,formatter:v=>{const r=s.value.length-1-v.dataIndex;return`${s.value[r].totalNightMessages} 条`},fontSize:11,fontWeight:500,color:"#6b7280"}}]}});return(m,f)=>n.bare?(l(),k(t(fe),{key:0,"content-height":i.value,"max-height-vh":n.maxHeightVh},{default:$(()=>[x(t(ae),{option:g.value,height:i.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(l(),k(t(j),{key:1,title:n.title,description:n.description,scrollable:"","max-height-vh":n.maxHeightVh},{default:$(()=>[o("div",Vo,[x(t(ae),{option:g.value,height:i.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),No={id:"streak-rank",class:"scroll-mt-24"},Do={class:"flex items-center gap-3"},Fo=q({__name:"CheckInRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(n){const e=n,a=C(null),s=C(!1),u=C("max"),i=C(e.globalTopN??10);z(()=>e.globalTopN,h=>{h!==void 0&&(i.value=h)});const c=b(()=>u.value==="max"?"🔥 火花榜 - 最长连续":"🔥 火花榜 - 当前连续"),g=b(()=>u.value==="max"?"历史最长连续发言天数":"正在持续连续发言的成员"),m=b(()=>a.value?a.value.streakRank.some(h=>h.currentStreak>0):!1);async function f(){if(e.sessionId){s.value=!0;try{a.value=await ee().getCheckInAnalysis(e.sessionId,e.timeFilter)}catch(h){console.error("加载打卡分析失败:",h)}finally{s.value=!1}}}return z(()=>[e.sessionId,e.timeFilter],()=>{f()},{immediate:!0,deep:!0}),(h,v)=>(l(),_("div",No,[x(t(j),{title:c.value,description:g.value},{headerRight:$(()=>[o("div",Do,[n.showTopNSelect?(l(),k(t(re),{key:0,modelValue:i.value,"onUpdate:modelValue":v[0]||(v[0]=r=>i.value=r)},null,8,["modelValue"])):D("",!0),m.value?(l(),k(t(ie),{key:1,modelValue:u.value,"onUpdate:modelValue":v[1]||(v[1]=r=>u.value=r),items:[{label:"最长连续",value:"max"},{label:"当前连续",value:"current"}],size:"sm"},null,8,["modelValue"])):D("",!0)])]),default:$(()=>[s.value?(l(),k(de,{key:0})):a.value&&a.value.streakRank.length>0?(l(),k(t(wo),{key:1,items:a.value.streakRank,title:c.value,mode:u.value,"top-n":i.value,bare:""},null,8,["items","title","mode","top-n"])):(l(),k(t(le),{key:2,text:"暂无连续发言数据"}))]),_:1},8,["title","description"])]))}}),qo={class:"flex items-center gap-3"},Bo={key:1,class:"py-8 text-center text-sm text-gray-400"},Uo={key:1,class:"py-8 text-center text-sm text-gray-400"},Ho=q({__name:"MemeBattleRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(n){const e=n,a=C(null),s=C(!1),u=C("count"),i=C(e.globalTopN??10);z(()=>e.globalTopN,d=>{d!==void 0&&(i.value=d)});async function c(){if(e.sessionId){s.value=!0;try{a.value=await ee().getMemeBattleAnalysis(e.sessionId,e.timeFilter)}catch(d){console.error("加载斗图分析失败:",d)}finally{s.value=!1}}}const g=b(()=>a.value?a.value.rankByCount.map(d=>({id:d.memberId.toString(),name:d.name,value:d.count,percentage:d.percentage})):[]),m=b(()=>a.value?a.value.rankByImageCount.map(d=>({id:d.memberId.toString(),name:d.name,value:d.count,percentage:d.percentage})):[]),f=b(()=>u.value==="count"?g.value:m.value),h=b(()=>u.value==="count"?"场":"张"),v=b(()=>{switch(u.value){case"battle":return"⚔️ 斗图榜 - 史诗级战役";case"count":return"⚔️ 斗图榜 - 按场次";case"image":return"⚔️ 斗图榜 - 按图量";default:return"⚔️ 斗图榜"}}),r=b(()=>{switch(u.value){case"battle":return"记录最激烈的斗图大战";case"count":return"参与斗图次数最多的人";case"image":return"在斗图中发送图片最多的人";default:return""}});return z(()=>[e.sessionId,e.timeFilter],()=>c(),{immediate:!0,deep:!0}),(d,w)=>s.value||a.value?(l(),k(t(j),{key:0,title:v.value,description:r.value},{headerRight:$(()=>[o("div",qo,[n.showTopNSelect?(l(),k(t(re),{key:0,modelValue:i.value,"onUpdate:modelValue":w[0]||(w[0]=I=>i.value=I)},null,8,["modelValue"])):D("",!0),x(t(ie),{modelValue:u.value,"onUpdate:modelValue":w[1]||(w[1]=I=>u.value=I),items:[{label:"按场次",value:"count"},{label:"按图量",value:"image"},{label:"史诗级战役",value:"battle"}],size:"sm"},null,8,["modelValue"])])]),default:$(()=>[s.value?(l(),k(de,{key:0})):a.value&&u.value==="battle"?(l(),_(E,{key:1},[a.value.topBattles.length>0?(l(),k(t($o),{key:0,battles:a.value.topBattles,title:"","top-n":i.value,bare:""},null,8,["battles","top-n"])):(l(),_("div",Bo,"暂无史诗级战役数据"))],64)):a.value?(l(),_(E,{key:2},[f.value.length>0?(l(),k(t(Ae),{key:0,members:f.value,title:v.value,unit:h.value,"top-n":i.value,bare:""},null,8,["members","title","unit","top-n"])):(l(),_("div",Uo,"暂无斗图数据"))],64)):D("",!0)]),_:1},8,["title","description"])):D("",!0)}}),Eo={class:"space-y-6"},Po={class:"flex items-center gap-3"},zo={class:"flex items-center gap-3"},Oo={key:2,class:"px-3 py-2"},jo=q({__name:"RepeatSection",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(n){const e=n,a=C(null),s=C(!1),u=C("originator"),i=C("fastest"),c=C(e.globalTopN??10),g=C(e.globalTopN??10);z(()=>e.globalTopN,T=>{T!==void 0&&(c.value=T,g.value=T)});async function m(){if(e.sessionId){s.value=!0;try{a.value=await ee().getRepeatAnalysis(e.sessionId,e.timeFilter)}catch(T){console.error("加载复读分析失败:",T)}finally{s.value=!1}}}const f=b(()=>a.value?a.value.originators.map(T=>({id:T.memberId.toString(),name:T.name,value:T.count,percentage:T.percentage})):[]),h=b(()=>a.value?a.value.initiators.map(T=>({id:T.memberId.toString(),name:T.name,value:T.count,percentage:T.percentage})):[]),v=b(()=>a.value?a.value.breakers.map(T=>({id:T.memberId.toString(),name:T.name,value:T.count,percentage:T.percentage})):[]),r=b(()=>{switch(u.value){case"originator":return f.value;case"initiator":return h.value;case"breaker":return v.value;default:return f.value}}),d=b(()=>{switch(u.value){case"originator":return"🔁 复读榜 - 被复读";case"initiator":return"🔁 复读榜 - 挑起";case"breaker":return"🔁 复读榜 - 打断";default:return"🔁 复读榜"}}),w=b(()=>{switch(u.value){case"originator":return"发出的消息被别人复读的次数";case"initiator":return"第二个发送相同消息、带起节奏的人";case"breaker":return"终结复读链的人";default:return""}}),I=b(()=>{if(!a.value)return{labels:[],values:[]};const T=a.value.chainLengthDistribution;return{labels:T.map(R=>`${R.length}人`),values:T.map(R=>R.count)}}),p=b(()=>i.value==="fastest"?"📊 复读统计 - 最快反应":"📊 复读统计 - 链长分布"),S=b(()=>{if(i.value==="fastest")return"平均复读反应时间(至少参与5次复读)";const T=a.value?.totalRepeatChains??0,R=a.value?.avgChainLength??0;return`共 ${T} 次复读,平均 ${R} 人参与`});return z(()=>[e.sessionId,e.timeFilter],()=>m(),{immediate:!0,deep:!0}),(T,R)=>(l(),_("div",Eo,[s.value||a.value&&a.value.totalRepeatChains>0?(l(),_(E,{key:0},[x(t(j),{title:d.value,description:w.value},{headerRight:$(()=>[o("div",Po,[n.showTopNSelect?(l(),k(t(re),{key:0,modelValue:c.value,"onUpdate:modelValue":R[0]||(R[0]=L=>c.value=L)},null,8,["modelValue"])):D("",!0),x(t(ie),{modelValue:u.value,"onUpdate:modelValue":R[1]||(R[1]=L=>u.value=L),items:[{label:"被复读",value:"originator"},{label:"挑起",value:"initiator"},{label:"打断",value:"breaker"}],size:"sm"},null,8,["modelValue"])])]),default:$(()=>[s.value?(l(),k(de,{key:0})):r.value.length>0?(l(),k(t(Ae),{key:1,members:r.value,title:d.value,unit:"次","top-n":c.value,bare:""},null,8,["members","title","top-n"])):(l(),k(t(le),{key:2,text:"暂无数据"}))]),_:1},8,["title","description"]),x(t(j),{title:p.value,description:S.value},{headerRight:$(()=>[o("div",zo,[n.showTopNSelect&&i.value==="fastest"?(l(),k(t(re),{key:0,modelValue:g.value,"onUpdate:modelValue":R[2]||(R[2]=L=>g.value=L)},null,8,["modelValue"])):D("",!0),x(t(ie),{modelValue:i.value,"onUpdate:modelValue":R[3]||(R[3]=L=>i.value=L),items:[{label:"最快反应",value:"fastest"},{label:"链长分布",value:"distribution"}],size:"sm"},null,8,["modelValue"])])]),default:$(()=>[s.value?(l(),k(de,{key:0})):i.value==="fastest"?(l(),_(E,{key:1},[a.value?.fastestRepeaters&&a.value.fastestRepeaters.length>0?(l(),k(t(Co),{key:0,items:a.value.fastestRepeaters,"top-n":g.value,title:"",bare:""},null,8,["items","top-n"])):(l(),k(t(le),{key:1,text:"暂无最快复读数据"}))],64)):(l(),_("div",Oo,[I.value.labels.length>0?(l(),k(t(na),{key:0,data:I.value,height:200},null,8,["data"])):(l(),k(t(le),{key:1,text:"暂无分布数据"}))]))]),_:1},8,["title","description"])],64)):(l(),k(t(j),{key:1,title:"🔁 复读榜"},{default:$(()=>[x(t(le),{text:"该群组暂无复读记录"})]),_:1}))]))}}),Ko=q({__name:"DivingRank",props:{sessionId:{},timeFilter:{},globalTopN:{}},setup(n){const e=n,a=C(null),s=C(!1);async function u(){if(e.sessionId){s.value=!0;try{a.value=await ee().getDivingAnalysis(e.sessionId,e.timeFilter)}catch(i){console.error("加载潜水分析失败:",i)}finally{s.value=!1}}}return z(()=>[e.sessionId,e.timeFilter],()=>u(),{immediate:!0,deep:!0}),(i,c)=>s.value?(l(),k(t(j),{key:0,title:"🤿 潜水榜 - 潜水最久",description:"距离上次发言时间最久的成员"},{default:$(()=>[x(de)]),_:1})):a.value&&a.value.rank.length>0?(l(),k(t(Ro),{key:1,items:a.value.rank,"global-top-n":n.globalTopN},null,8,["items","global-top-n"])):(l(),k(t(j),{key:2,title:"🤿 潜水榜"},{default:$(()=>[x(t(le),{text:"暂无潜水数据"})]),_:1}))}}),Wo={class:"space-y-6"},Go={class:"flex items-center gap-3"},Yo={key:1,class:"py-8 text-center text-sm text-gray-400"},Xo={key:1,class:"py-8 text-center text-sm text-gray-400"},Qo={class:"flex items-center gap-3"},Zo={key:2,class:"py-8 text-center text-sm text-gray-400"},Jo=q({__name:"NightOwlRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(n){const e=n,a=C(null),s=C(!1),u=C("first"),i=C("distribution"),c=C(e.globalTopN??10),g=C(e.globalTopN??10);z(()=>e.globalTopN,p=>{p!==void 0&&(c.value=p,g.value=p)});async function m(){if(e.sessionId){s.value=!0;try{a.value=await ee().getNightOwlAnalysis(e.sessionId,e.timeFilter)}catch(p){console.error("加载出勤分析失败:",p)}finally{s.value=!1}}}const f=b(()=>a.value?a.value.lastSpeakerRank.map(p=>({id:String(p.memberId),name:p.name,value:p.count,percentage:p.percentage})):[]),h=b(()=>a.value?a.value.firstSpeakerRank.map(p=>({id:String(p.memberId),name:p.name,value:p.count,percentage:p.percentage})):[]),v=b(()=>u.value==="last"?f.value:h.value),r=b(()=>u.value==="last"?"⏰ 出勤排行 - 最晚下班":"⏰ 出勤排行 - 最早上班"),d=b(()=>{const p=u.value==="last"?"每天最后一个发言的人":"每天第一个发言的人",S=a.value?.totalDays;return S==null?p:`${p}(共 ${S} 天)`}),w=b(()=>i.value==="distribution"?"🦉 修仙统计 - 发言分布":"🦉 修仙统计 - 连续记录"),I=b(()=>i.value==="distribution"?"深夜时段(23:00-05:00)各时段发言分布":"连续在深夜时段发言的天数");return z(()=>[e.sessionId,e.timeFilter],()=>m(),{immediate:!0,deep:!0}),(p,S)=>(l(),_("div",Wo,[s.value||a.value?(l(),_(E,{key:0},[x(t(j),{title:w.value,description:I.value},{headerRight:$(()=>[o("div",Go,[n.showTopNSelect?(l(),k(t(re),{key:0,modelValue:c.value,"onUpdate:modelValue":S[0]||(S[0]=T=>c.value=T)},null,8,["modelValue"])):D("",!0),x(t(ie),{modelValue:i.value,"onUpdate:modelValue":S[1]||(S[1]=T=>i.value=T),items:[{label:"发言分布",value:"distribution"},{label:"连续记录",value:"consecutive"}],size:"sm"},null,8,["modelValue"])])]),default:$(()=>[s.value?(l(),k(de,{key:0})):i.value==="distribution"?(l(),_(E,{key:1},[a.value&&a.value.nightOwlRank.length>0?(l(),k(t(Ao),{key:0,items:a.value.nightOwlRank,"top-n":c.value,title:"",bare:""},null,8,["items","top-n"])):(l(),_("div",Yo,"暂无深夜发言数据"))],64)):(l(),_(E,{key:2},[a.value&&a.value.consecutiveRecords.length>0?(l(),k(t(Lo),{key:0,items:a.value.consecutiveRecords,"top-n":c.value,title:"",bare:""},null,8,["items","top-n"])):(l(),_("div",Xo,"暂无连续记录"))],64))]),_:1},8,["title","description"]),x(t(j),{title:r.value,description:d.value},{headerRight:$(()=>[o("div",Qo,[n.showTopNSelect?(l(),k(t(re),{key:0,modelValue:g.value,"onUpdate:modelValue":S[2]||(S[2]=T=>g.value=T)},null,8,["modelValue"])):D("",!0),x(t(ie),{modelValue:u.value,"onUpdate:modelValue":S[3]||(S[3]=T=>u.value=T),items:[{label:"最早上班",value:"first"},{label:"最晚下班",value:"last"}],size:"sm"},null,8,["modelValue"])])]),default:$(()=>[s.value?(l(),k(de,{key:0})):v.value.length>0?(l(),k(t(Ae),{key:1,members:v.value,title:r.value,"top-n":g.value,unit:"次",bare:""},null,8,["members","title","top-n"])):(l(),_("div",Zo,"暂无数据"))]),_:1},8,["title","description"])],64)):D("",!0)]))}}),en={class:"mb-8 mt-4"},tn={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"}},an={id:"activity-rank",class:"scroll-mt-24"},sn={id:"meme-battle",class:"scroll-mt-24"},on={id:"repeat",class:"scroll-mt-24"},nn={id:"night-owl",class:"scroll-mt-24"},ln={id:"diving",class:"scroll-mt-24"},rn={class:"border-l border-gray-200 pl-4 dark:border-gray-800"},un={class:"mt-4 border-l border-gray-200 pl-4 dark:border-gray-800"},cn={class:"flex rounded-lg border border-gray-200 bg-white p-0.5 text-xs dark:border-gray-700 dark:bg-page-dark"},dn=["onClick"],mn=q({__name:"OverallRankingTab",props:{sessionId:{},timeFilter:{}},setup(n){const e=n,a=C([]),s=C([]),u=C(!1);async function i(){if(e.sessionId){u.value=!0;try{const p=ee(),[S,T]=await Promise.all([p.getMemberActivity(e.sessionId,e.timeFilter),p.getAvailableYears(e.sessionId)]);a.value=S,s.value=T}finally{u.value=!1}}}z(()=>[e.sessionId,e.timeFilter],()=>i(),{immediate:!0,deep:!0});const c=b(()=>{if(e.timeFilter?.startTs&&e.timeFilter?.endTs){const p=new Date(e.timeFilter.startTs*1e3).getFullYear(),S=new Date(e.timeFilter.endTs*1e3).getFullYear();return p===S?`${p} 赛季`:`${p}-${S} 赛季`}if(s.value.length>0){const p=[...s.value].sort((R,L)=>R-L),S=p[0],T=p[p.length-1];return S===T?`${S} 赛季`:`${S}-${T} 赛季`}return u.value?"赛季":"全部赛季"}),g=b(()=>({startTs:e.timeFilter?.startTs,endTs:e.timeFilter?.endTs})),m=[{id:"activity-rank",label:"🏆 活跃榜"},{id:"streak-rank",label:"🔥 火花榜"},{id:"meme-battle",label:"⚔️ 斗图榜"},{id:"repeat",label:"🔁 复读榜"},{id:"night-owl",label:"⏰ 出勤榜"},{id:"diving",label:"🤿 潜水榜"}],{contentRef:f,activeAnchor:h,scrollToAnchor:v}=ga(m,{threshold:350}),r=C(10),d=C("standard");Ke(gt,d);const w=[{value:"standard",label:"标准"},{value:"wide",label:"宽屏"},{value:"full",label:"全宽"}],I=b(()=>ht[d.value].contentClass);return(p,S)=>(l(),_("div",{ref_key:"contentRef",ref:f,class:"flex gap-6 p-6"},[o("div",{class:W(["main-content mx-auto min-w-0 flex-1 space-y-6 px-8",I.value])},[o("div",en,[o("h1",tn," 🏆 "+y(c.value),1),S[1]||(S[1]=o("p",{class:"mt-4 text-sm text-gray-500 dark:text-gray-400"},"各榜单前三名请找群主领取奖励 🎁",-1))]),o("div",an,[x(t(yo),{"session-id":e.sessionId,"member-activity":a.value,"base-loading":u.value,"time-filter":g.value,"global-top-n":r.value},null,8,["session-id","member-activity","base-loading","time-filter","global-top-n"])]),x(t(Fo),{"session-id":e.sessionId,"time-filter":g.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"]),o("div",sn,[x(t(Ho),{"session-id":e.sessionId,"time-filter":g.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),o("div",on,[x(t(jo),{"session-id":e.sessionId,"time-filter":g.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),o("div",nn,[x(t(Jo),{"session-id":e.sessionId,"time-filter":g.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),o("div",ln,[x(t(Ko),{"session-id":e.sessionId,"time-filter":g.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),S[2]||(S[2]=o("div",{class:"h-48 no-capture"},null,-1))],2),x(t(xa),{anchors:m,"active-anchor":t(h),onClick:t(v)},{default:$(()=>[o("div",rn,[S[3]||(S[3]=o("div",{class:"mb-2 text-xs text-gray-400"},"显示数量",-1)),x(t(re),{modelValue:r.value,"onUpdate:modelValue":S[0]||(S[0]=T=>r.value=T)},null,8,["modelValue"])]),o("div",un,[S[4]||(S[4]=o("div",{class:"mb-2 text-xs text-gray-400"},"榜单宽度",-1)),o("div",cn,[(l(),_(E,null,Q(w,T=>o("button",{key:T.value,type:"button",class:W(["rounded-md px-2 py-1 transition",d.value===T.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:R=>d.value=T.value},y(T.label),11,dn)),64))])])]),_:1},8,["active-anchor","onClick"])],512))}}),vn={class:"main-content mx-auto max-w-3xl p-4 sm:p-6"},pn=q({__name:"InteractionRankingTab",props:{sessionId:{},timeFilter:{}},setup(n){const{t:e}=te(),a=n,s=C(null),u=C(!1);async function i(){if(a.sessionId){u.value=!0;try{s.value=await ee().getMentionAnalysis(a.sessionId,a.timeFilter)}catch(r){console.error("加载 @ 互动分析失败:",r)}finally{u.value=!1}}}const c=b(()=>s.value?s.value.topMentioners.map(r=>({id:r.memberId.toString(),name:r.name,value:r.count,percentage:r.percentage})):[]),g=b(()=>s.value?s.value.topMentioned.map(r=>({id:r.memberId.toString(),name:r.name,value:r.count,percentage:r.percentage})):[]),m=C("mentioners"),f=b(()=>[{label:e("members.relationships.rankModes.mentioners"),value:"mentioners"},{label:e("members.relationships.rankModes.mentioned"),value:"mentioned"}]),h=b(()=>m.value==="mentioners"?c.value:g.value),v=b(()=>m.value==="mentioners"?e("members.relationships.topMentionersDescription"):e("members.relationships.topMentionedDescription"));return z(()=>[a.sessionId,a.timeFilter],()=>{i()},{immediate:!0,deep:!0}),(r,d)=>(l(),_("div",vn,[u.value?(l(),k(t(he),{key:0,text:t(e)("members.relationships.loading")},null,8,["text"])):s.value&&s.value.totalMentions>0&&h.value.length>0?(l(),k(t(Ja),{key:1,members:h.value,title:t(e)("members.relationships.rankingTitle"),description:v.value,unit:t(e)("members.relationships.times")},{headerRight:$(()=>[x(t(ie),{modelValue:m.value,"onUpdate:modelValue":d[0]||(d[0]=w=>m.value=w),items:f.value,size:"sm"},null,8,["modelValue","items"])]),_:1},8,["members","title","description","unit"])):(l(),k(t(j),{key:2,title:t(e)("members.relationships.emptyTitle")},{default:$(()=>[x(t(le),{text:t(e)("members.relationships.empty")},null,8,["text"])]),_:1},8,["title"]))]))}}),gn={class:"mx-auto h-full max-w-[920px] p-2 sm:p-4"},hn={class:"flex flex-wrap items-center justify-between gap-2 border-b border-gray-200 bg-gray-50 px-3 py-3 dark:border-gray-700 dark:bg-page-dark/50 sm:px-4"},fn={class:"flex items-center gap-3"},yn={class:"inline-flex items-center",role:"group"},bn={class:"flex items-center gap-3"},xn={class:"p-3 w-64"},kn={class:"text-sm font-medium mb-3"},wn={class:"space-y-3"},_n={class:"text-xs text-gray-500 mb-1 block"},$n={class:"text-xs text-gray-400 mt-1"},Tn={class:"text-xs text-gray-500 mb-1 block"},Cn={class:"text-xs text-gray-400 mt-1"},In={class:"flex-1 min-h-0 overflow-hidden"},Sn={key:0,class:"h-full flex items-center justify-center"},Rn={key:1,class:"h-full flex items-center justify-center"},Mn={class:"text-center text-gray-400"},Ln={key:2,class:"h-full"},Vn={key:3,class:"h-full flex overflow-hidden"},An={class:"w-64 border-r border-gray-200 dark:border-gray-700 flex flex-col overflow-hidden"},Nn={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},Dn={class:"text-sm font-medium flex items-center gap-2"},Fn={class:"flex-1 overflow-y-auto"},qn=["onClick"],Bn={class:"flex items-center justify-between"},Un={class:"text-sm truncate"},Hn={class:"text-xs text-gray-400"},En={class:"flex-1 overflow-hidden flex flex-col"},Pn={key:0,class:"flex-1 flex items-center justify-center"},zn={class:"text-center text-gray-400"},On={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 flex items-center gap-3"},jn={class:"w-10 h-10 rounded-full flex items-center justify-center text-white font-bold bg-primary-500"},Kn={class:"font-medium"},Wn={class:"text-xs text-gray-400"},Gn={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},Yn={class:"text-sm font-medium flex items-center gap-2"},Xn={class:"flex-1 overflow-y-auto"},Qn={key:0,class:"p-4 text-center text-gray-400"},Zn={class:"flex items-center gap-3"},Jn={class:"flex-1 min-w-0"},el={class:"text-sm font-medium truncate"},tl={class:"flex items-center gap-3 mt-0.5 text-xs text-gray-400"},al={class:"w-20 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},sl={key:4,class:"h-full flex flex-col overflow-hidden"},ol={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},nl={class:"text-sm font-medium flex items-center gap-2"},ll={class:"flex-1 overflow-y-auto"},il={class:"flex items-center gap-3"},rl={class:"flex-1 min-w-0"},ul={class:"flex items-center gap-2 text-sm"},cl={class:"font-medium truncate"},dl={class:"font-medium truncate"},ml={class:"flex items-center gap-3 mt-1 text-xs text-gray-400"},vl={class:"w-24 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},pl={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-page-dark/50"},gl=q({__name:"ProximityRankingTab",props:{sessionId:{},timeFilter:{}},setup(n){ia([ra,ua,ca,da,ma]);const e=n,{t:a}=te(),s=Ct(),u=b(()=>s.value==="dark"),i=C(!0);Zt(i);const c=C(null),g=C("matrix"),m=C(null),f=C({lookAhead:3,decaySeconds:120,topEdges:150}),h=C(null);let v=null;async function r(){if(e.sessionId){i.value=!0;try{c.value=await ee().getClusterGraph(e.sessionId,e.timeFilter,{lookAhead:f.value.lookAhead,decaySeconds:f.value.decaySeconds,topEdges:f.value.topEdges})}catch(U){console.error("[chart-cluster] 加载小团体关系数据失败:",U),c.value=null}finally{i.value=!1}}}const d=b(()=>{if(!c.value||c.value.nodes.length===0)return null;const{nodes:U,links:B,maxLinkValue:O}=c.value,Y=[...U].sort((H,X)=>X.messageCount-H.messageCount).slice(0,20).map(H=>H.name),G=new Map;for(const H of B)G.set(`${H.source}-${H.target}`,H.value),G.set(`${H.target}-${H.source}`,H.value);const N=[];for(let H=0;H<Y.length;H++)for(let X=0;X<Y.length;X++)if(H===X)N.push([H,X,-1]);else{const pe=G.get(`${Y[H]}-${Y[X]}`)||0;N.push([H,X,pe])}return{names:Y,data:N,maxValue:O}});function w(){if(!d.value)return{graphic:{type:"text",style:{text:a("views.cluster.noData"),fill:"#999"}}};const{names:U,data:B,maxValue:O}=d.value;return{tooltip:{position:"top",formatter:Z=>{const[Y,G,N]=Z.data;return N<0?`${U[Y]}`:N===0?`${U[Y]} ↔ ${U[G]}<br/>暂无关系数据`:`${U[Y]} ↔ ${U[G]}<br/>临近度: ${N.toFixed(2)}`}},grid:{left:120,right:40,top:40,bottom:120},xAxis:{type:"category",data:U,splitArea:{show:!0},axisLabel:{rotate:45,fontSize:10,color:u.value?"#ccc":"#333"}},yAxis:{type:"category",data:U,splitArea:{show:!0},axisLabel:{fontSize:10,color:u.value?"#ccc":"#333"}},visualMap:{min:0,max:O||1,calculable:!0,orient:"horizontal",left:"center",bottom:10,inRange:{color:u.value?["#1a1a2e","#16213e","#0f3460","#e94560"]:["#f7f7f7","#fce4ec","#f8bbd9","#ee4567"]},textStyle:{color:u.value?"#ccc":"#333"}},series:[{type:"heatmap",data:B.filter(Z=>Z[2]>=0),label:{show:!1},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}],backgroundColor:"transparent"}}const I=b(()=>c.value?[...c.value.nodes].sort((U,B)=>B.messageCount-U.messageCount):[]),p=b(()=>!c.value||m.value===null?null:c.value.nodes.find(U=>U.id===m.value)||null),S=b(()=>{if(!c.value||!p.value)return[];const U=p.value.name,B=[];for(const O of c.value.links)O.source===U?B.push({otherName:O.target,value:O.value,coOccurrenceCount:O.coOccurrenceCount}):O.target===U&&B.push({otherName:O.source,value:O.value,coOccurrenceCount:O.coOccurrenceCount});return B.sort((O,Z)=>Z.value-O.value),B}),T=b(()=>c.value?c.value.links.slice(0,50):[]);function R(){v&&g.value==="matrix"&&v.setOption(w(),{notMerge:!0})}function L(){h.value&&(v=va(h.value,u.value?"dark":void 0),R())}function K(){v?.resize()}return z(g,async(U,B)=>{B==="matrix"&&v&&(v.dispose(),v=null),U==="matrix"&&(await Be(),L())}),z([c,()=>u.value],()=>{g.value==="matrix"&&R()},{deep:!0}),z(i,async(U,B)=>{B&&!U&&g.value==="matrix"&&(v&&(v.dispose(),v=null),await Be(),L())}),z(()=>[e.sessionId,e.timeFilter],()=>r(),{immediate:!0,deep:!0}),Oe(()=>{window.addEventListener("resize",K),g.value==="matrix"&&Be(()=>L())}),at(()=>{window.removeEventListener("resize",K),v?.dispose(),v=null}),(U,B)=>{const O=Ie,Z=lt,Y=It,G=Se;return l(),_("div",gn,[x(t(la),{class:"flex h-full flex-col"},{default:$(()=>[o("div",hn,[o("div",fn,[o("div",yn,[x(O,{size:"xs",color:g.value==="matrix"?"primary":"neutral",variant:g.value==="matrix"?"solid":"ghost",onClick:B[0]||(B[0]=N=>g.value="matrix")},{default:$(()=>[J(y(t(a)("views.cluster.matrixView")),1)]),_:1},8,["color","variant"]),x(O,{size:"xs",color:g.value==="member"?"primary":"neutral",variant:g.value==="member"?"solid":"ghost",onClick:B[1]||(B[1]=N=>g.value="member")},{default:$(()=>[J(y(t(a)("views.cluster.memberView")),1)]),_:1},8,["color","variant"]),x(O,{size:"xs",color:g.value==="circle"?"primary":"neutral",variant:g.value==="circle"?"solid":"ghost",onClick:B[2]||(B[2]=N=>g.value="circle")},{default:$(()=>[J(y(t(a)("views.cluster.rankingView")),1)]),_:1},8,["color","variant"])])]),o("div",bn,[x(Y,null,{content:$(()=>[o("div",xn,[o("h4",kn,y(t(a)("views.cluster.modelSettings")),1),o("div",wn,[o("div",null,[o("label",_n,y(t(a)("views.cluster.lookAhead")),1),x(Z,{modelValue:f.value.lookAhead,"onUpdate:modelValue":B[3]||(B[3]=N=>f.value.lookAhead=N),modelModifiers:{number:!0},type:"number",min:1,max:10,size:"xs",placeholder:"1-10"},null,8,["modelValue"]),o("p",$n,y(t(a)("views.cluster.lookAheadDesc")),1)]),o("div",null,[o("label",Tn,y(t(a)("views.cluster.decaySeconds")),1),x(Z,{modelValue:f.value.decaySeconds,"onUpdate:modelValue":B[4]||(B[4]=N=>f.value.decaySeconds=N),modelModifiers:{number:!0},type:"number",min:30,max:3600,size:"xs",placeholder:"30-3600"},null,8,["modelValue"]),o("p",Cn,y(t(a)("views.cluster.decaySecondsDesc")),1)]),x(O,{size:"xs",color:"primary",class:"w-full mt-2",onClick:r},{default:$(()=>[J(y(t(a)("views.cluster.applySettings")),1)]),_:1})])])]),default:$(()=>[x(O,{variant:"ghost",size:"xs",icon:"i-heroicons-adjustments-horizontal"})]),_:1}),x(O,{variant:"ghost",size:"xs",icon:"i-heroicons-arrow-path",onClick:r})])]),o("div",In,[i.value?(l(),_("div",Sn,[x(G,{name:"i-heroicons-arrow-path",class:"w-6 h-6 animate-spin text-gray-400"})])):!c.value||c.value.nodes.length===0?(l(),_("div",Rn,[o("div",Mn,[x(G,{name:"i-heroicons-user-group",class:"w-12 h-12 mx-auto mb-2 opacity-50"}),o("p",null,y(t(a)("views.cluster.noData")),1)])])):g.value==="matrix"?(l(),_("div",Ln,[o("div",{ref_key:"chartRef",ref:h,class:"w-full h-full"},null,512)])):g.value==="member"?(l(),_("div",Vn,[o("div",An,[o("div",Nn,[o("h3",Dn,[x(G,{name:"i-heroicons-users",class:"w-4 h-4"}),J(" "+y(t(a)("views.cluster.selectMember")),1)])]),o("div",Fn,[(l(!0),_(E,null,Q(I.value,N=>(l(),_("div",{key:N.id,class:W(["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":m.value===N.id}]),onClick:H=>m.value=N.id},[o("div",Bn,[o("span",Un,y(N.name),1),o("span",Hn,y(N.messageCount),1)])],10,qn))),128))])]),o("div",En,[p.value?(l(),_(E,{key:1},[o("div",On,[o("div",jn,y(p.value.name.charAt(0)),1),o("div",null,[o("div",Kn,y(p.value.name),1),o("div",Wn,y(t(a)("views.cluster.msgCount"))+": "+y(p.value.messageCount)+" | "+y(t(a)("views.cluster.relationCount"))+": "+y(S.value.length),1)])]),o("div",Gn,[o("h3",Yn,[x(G,{name:"i-heroicons-heart",class:"w-4 h-4 text-pink-500"}),J(" "+y(t(a)("views.cluster.relationsByIntimacy")),1)])]),o("div",Xn,[S.value.length===0?(l(),_("div",Qn,y(t(a)("views.cluster.noRelations")),1)):D("",!0),(l(!0),_(E,null,Q(S.value,(N,H)=>(l(),_("div",{key:N.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"},[o("div",Zn,[o("span",{class:W(["w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold",H<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"])},y(H+1),3),o("div",Jn,[o("div",el,y(N.otherName),1),o("div",tl,[o("span",null,y(t(a)("views.cluster.intimacy"))+": "+y((N.value*100).toFixed(0))+"%",1),o("span",null,y(t(a)("views.cluster.coOccurrence"))+": "+y(N.coOccurrenceCount)+y(t(a)("views.cluster.times")),1)])]),o("div",al,[o("div",{class:"h-full bg-linear-to-r from-pink-400 to-pink-600",style:_e({width:`${S.value[0]?.value?N.value/S.value[0].value*100:0}%`})},null,4)])])]))),128))])],64)):(l(),_("div",Pn,[o("div",zn,[x(G,{name:"i-heroicons-cursor-arrow-rays",class:"w-12 h-12 mx-auto mb-2 opacity-50"}),o("p",null,y(t(a)("views.cluster.selectMemberHint")),1)])]))])])):(l(),_("div",sl,[o("div",ol,[o("h3",nl,[x(G,{name:"i-heroicons-trophy",class:"w-4 h-4 text-yellow-500"}),J(" "+y(t(a)("views.cluster.interactionRanking")),1)])]),o("div",ll,[(l(!0),_(E,null,Q(T.value,(N,H)=>(l(),_("div",{key:H,class:"px-4 py-3 border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50"},[o("div",il,[o("span",{class:W(["w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold",H<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"])},y(H+1),3),o("div",rl,[o("div",ul,[o("span",cl,y(N.source),1),B[5]||(B[5]=o("span",{class:"text-gray-400"},"↔",-1)),o("span",dl,y(N.target),1)]),o("div",ml,[o("span",null,y(t(a)("views.cluster.score"))+": "+y(N.value.toFixed(2)),1),o("span",null,y(t(a)("views.cluster.coOccurrence"))+": "+y(N.coOccurrenceCount)+y(t(a)("views.cluster.times")),1)])]),o("div",vl,[o("div",{class:"h-full bg-linear-to-r from-yellow-400 to-orange-500",style:_e({width:`${T.value[0]?.value?N.value/T.value[0].value*100:0}%`})},null,4)])])]))),128))])]))]),c.value?(l(),_("div",pl,[o("span",null,y(t(a)("views.cluster.totalMembers"))+": "+y(c.value.stats.totalMembers),1),o("span",null,y(t(a)("views.cluster.totalMessages"))+": "+y(c.value.stats.totalMessages.toLocaleString()),1),o("span",null,y(t(a)("views.cluster.involvedMembers"))+": "+y(c.value.stats.involvedMembers),1),o("span",null,y(t(a)("views.cluster.edgeCount"))+": "+y(c.value.stats.edgeCount),1)])):D("",!0)]),_:1})])}}}),hl={class:"flex h-full flex-col"},fl={class:"min-h-0 flex-1 overflow-y-auto"},yl={key:3,class:"main-content mx-auto w-full max-w-3xl p-6"},bl=q({__name:"RankingView",props:{sessionId:{},timeFilter:{},visibleTabIds:{}},setup(n){const e=n,{t:a,locale:s}=te(),u=C("overall"),i=C(null),c=St({byId:new Map,byName:new Map});Ke(vt,c),z(()=>e.sessionId,async r=>{if(c.value={byId:new Map,byName:new Map},!!r)try{const d=await ee().getMembers(r);if(e.sessionId!==r)return;c.value=Ia(d)}catch(d){console.error("Failed to load ranking avatars:",d)}},{immediate:!0});const g=b(()=>Rt("groupRanking",s.value)),m=r=>!e.visibleTabIds||e.visibleTabIds.includes(r),f=b(()=>[...g.value&&m("overall")?[{id:"overall",label:a("analysis.subTabs.ranking.overall"),icon:"i-heroicons-trophy"}]:[],{id:"interaction",label:a("analysis.subTabs.ranking.interaction"),icon:"i-heroicons-heart"},{id:"proximity",label:a("analysis.subTabs.ranking.proximity"),icon:"i-heroicons-user-group"},{id:"hot-repeat",label:a("analysis.subTabs.quotes.hotRepeat"),icon:"i-heroicons-sparkles"},{id:"catchphrase",label:a("analysis.subTabs.quotes.catchphrase"),icon:"i-heroicons-chat-bubble-bottom-center-text"},{id:"keyword",label:a("analysis.subTabs.ranking.keyword"),icon:"i-heroicons-magnifying-glass"}].filter(d=>m(d.id))),h=b(()=>({startTs:e.timeFilter?.startTs,endTs:e.timeFilter?.endTs})),v=b(()=>({...h.value,memberId:i.value}));return z(f,r=>{r.some(d=>d.id===u.value)||(u.value=r[0]?.id??"hot-repeat")},{immediate:!0}),(r,d)=>(l(),_("div",hl,[x(t(ct),{modelValue:u.value,"onUpdate:modelValue":d[1]||(d[1]=w=>u.value=w),items:f.value,"persist-key":"groupRankingTab"},{right:$(()=>[u.value==="catchphrase"?(l(),k(ut,{key:0,modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=w=>i.value=w),"session-id":e.sessionId},null,8,["modelValue","session-id"])):D("",!0)]),_:1},8,["modelValue","items"]),o("div",fl,[x(it,{name:"fade",mode:"out-in"},{default:$(()=>[u.value==="overall"?(l(),k(mn,{key:0,"session-id":e.sessionId,"time-filter":h.value},null,8,["session-id","time-filter"])):u.value==="interaction"?(l(),k(pn,{key:1,"session-id":e.sessionId,"time-filter":h.value},null,8,["session-id","time-filter"])):u.value==="proximity"?(l(),k(gl,{key:2,"session-id":e.sessionId,"time-filter":h.value},null,8,["session-id","time-filter"])):u.value==="keyword"?(l(),_("div",yl,[x(vo,{"session-id":e.sessionId,"time-filter":h.value},null,8,["session-id","time-filter"])])):u.value==="hot-repeat"?(l(),k(t(Cs),{key:4,"session-id":e.sessionId,"time-filter":h.value},null,8,["session-id","time-filter"])):u.value==="catchphrase"?(l(),k(t(ps),{key:5,"session-id":e.sessionId,"time-filter":v.value},null,8,["session-id","time-filter"])):D("",!0)]),_:1})])]))}}),xl=rt(bl,[["__scopeId","data-v-8da082e6"]]),kl={class:"main-content max-w-5xl p-6"},wl={class:"mb-4 text-sm text-gray-500 dark:text-gray-400 no-capture"},_l={key:0,class:"divide-y divide-gray-100 dark:divide-gray-800"},$l={class:"w-32 shrink-0 pt-0.5 font-medium text-gray-900 dark:text-white"},Tl={class:"flex flex-1 flex-wrap items-center gap-2"},Cl={class:"flex items-center gap-1.5 rounded-lg bg-gray-50 px-3 py-1.5 dark:bg-gray-800"},Il={class:"text-xs text-gray-400"},Sl={key:0,class:"text-gray-300 dark:text-gray-600"},Rl=q({__name:"NicknameHistory",props:{sessionId:{}},setup(n){const{t:e}=te(),a=n,s=C([]),u=C([]),i=C(!1);function c(f){return f.groupNickname||f.accountName||f.platformId}async function g(){if(a.sessionId)try{s.value=await ee().getMembers(a.sessionId)}catch(f){console.error("加载成员列表失败:",f)}}async function m(){if(!a.sessionId||s.value.length===0)return;i.value=!0;const f=[];try{const h=s.value.map(r=>ee().getMemberNameHistory(a.sessionId,r.id)),v=await Promise.all(h);s.value.forEach((r,d)=>{const w=v[d];w.length>2&&f.push({memberId:r.id,name:c(r),history:w})}),u.value=f}catch(h){console.error("加载昵称变更记录失败:",h)}finally{i.value=!1}}return z(()=>a.sessionId,async()=>{await g()},{immediate:!0}),z(()=>s.value.length,()=>{s.value.length>0&&m()}),Oe(async()=>{s.value.length===0&&await g()}),(f,h)=>{const v=mt;return l(),_("div",kl,[o("p",wl,y(t(e)("members.nicknameHistory.note")),1),x(t(j),{title:t(e)("members.nicknameHistory.title"),description:i.value?t(e)("members.nicknameHistory.loading"):u.value.length>0?t(e)("members.nicknameHistory.hasChanges",{count:u.value.length}):t(e)("members.nicknameHistory.noChanges")},{default:$(()=>[!i.value&&u.value.length>0?(l(),_("div",_l,[(l(!0),_(E,null,Q(u.value,r=>(l(),_("div",{key:r.memberId,class:"flex items-start gap-3 px-5 py-3"},[o("div",$l,y(r.name),1),o("div",Tl,[(l(!0),_(E,null,Q(r.history,(d,w)=>(l(),_(E,{key:w},[o("div",Cl,[o("span",{class:W(["text-sm",d.endTs===null?"font-semibold text-pink-600":"text-gray-700 dark:text-gray-300"])},y(d.name),3),d.endTs===null?(l(),k(v,{key:0,color:"primary",variant:"soft",size:"xs"},{default:$(()=>[J(y(t(e)("members.nicknameHistory.current")),1)]),_:1})):D("",!0),o("span",Il,"("+y(t(ta)(d.startTs,d.endTs))+")",1)]),w<r.history.length-1?(l(),_("span",Sl,"→")):D("",!0)],64))),128))])]))),128))])):i.value?(l(),k(t(he),{key:2,text:t(e)("members.nicknameHistory.loadingText")},null,8,["text"])):(l(),k(t(le),{key:1,text:t(e)("members.nicknameHistory.empty")},null,8,["text"]))]),_:1},8,["title","description"])])}}}),Ml={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-page-dark"},Ll={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},Vl={class:"text-lg font-semibold text-gray-900 dark:text-white"},Al={class:"flex-1 overflow-auto"},Nl=q({__name:"NicknameHistoryEntry",props:{sessionId:{}},setup(n){const{t:e}=te(),a=n,s=C(!1);return(u,i)=>{const c=Ie,g=Ve;return l(),_(E,null,[x(c,{variant:"ghost",icon:"i-heroicons-clock",size:"sm",onClick:i[0]||(i[0]=m=>s.value=!0)},{default:$(()=>[J(y(t(e)("analysis.subTabs.member.nicknameHistory")),1)]),_:1}),a.sessionId?(l(),k(g,{key:0,open:s.value,"onUpdate:open":i[2]||(i[2]=m=>s.value=m),ui:{content:"max-w-6xl h-[85vh]"}},{content:$(()=>[o("div",Ml,[o("div",Ll,[o("h2",Vl,y(t(e)("analysis.subTabs.member.nicknameHistory")),1),x(c,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:i[1]||(i[1]=m=>s.value=!1)})]),o("div",Al,[x(Rl,{"session-id":a.sessionId},null,8,["session-id"])])])]),_:1},8,["open"])):D("",!0)],64)}}}),Dl={class:"relative flex h-full flex-col dark:bg-page-dark",style:{"padding-top":"var(--titlebar-area-height)"}},Fl=["aria-label"],ql={class:"relative flex-1 overflow-y-auto"},Bl={class:"h-full"},Ul={key:2,class:"flex h-full items-center justify-center"},Hl={class:"text-gray-500"},El={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-page-dark"},Pl={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},zl={class:"text-lg font-semibold text-gray-900 dark:text-white"},Ol={class:"text-sm text-gray-500 dark:text-gray-400"},jl={class:"flex items-center gap-2"},Kl={class:"flex-1 overflow-hidden"},Wl=q({__name:"index",setup(n){const e=ot(()=>nt(()=>import("./MessageExportModal-JqGZ-iLr.js"),__vite__mapDeps([9,1,2,3,10,11,12,13]))),{t:a}=te(),s=Mt(),u=Lt(),i=Vt(),c=je(),g=At(),{currentSessionId:m}=Nt(i),f=C(!1),h=C(!1),v=C(!1),r=C(!1),d=C(!1);function w(){c.openChatRecordDrawer({})}const I=[{id:"insights",labelKey:"analysis.tabs.insights",icon:"i-heroicons-presentation-chart-bar"},{id:"ranking",labelKey:"analysis.tabs.ranking",icon:"i-heroicons-trophy"},{id:"ai-chat",labelKey:"analysis.tabs.aiChat",icon:"i-heroicons-chat-bubble-left-ellipsis"},{id:"memory",labelKey:"analysis.tabs.memory",icon:"i-heroicons-light-bulb"},{id:"more",labelKey:"analysis.tabs.more",icon:"i-heroicons-squares-2x2"}],{activeTab:p,isLoading:S,isInitialLoad:T,isSessionSwitching:R,session:L,memberActivity:K,hourlyActivity:U,dailyActivity:B,messageTypes:O,timeRangeValue:Z,fullTimeRange:Y,availableYears:G,timeFilter:N,initialTimeState:H,loadData:X,invalidateAnalysisData:pe,handleTimeRangeInitialized:Ne}=Pt({route:s,router:u,currentSessionId:m,selectSession:i.selectSession,defaultTab:g.defaultSessionTab,validTabIds:I.map(ue=>ue.id)});Ke("session-switch-loading",R);const Re=b(()=>K.value.reduce((ue,V)=>ue+V.messageCount,0)),De=b(()=>K.value.filter(ue=>ue.messageCount>0).length);return(ue,V)=>{const ce=Ie,Fe=Ve;return l(),_("div",Dl,[t(R)?(l(),_("div",{key:0,"data-testid":"group-chat-switch-loading",class:"absolute inset-0 z-20 flex cursor-wait items-center justify-center bg-page-bg dark:bg-page-dark",style:{paddingTop:"var(--titlebar-area-height)"},role:"status","aria-live":"polite","aria-label":t(a)("common.loading")},[x(t(dt))],8,Fl)):D("",!0),t(L)?(l(),_(E,{key:1},[x(zt,{"active-tab":t(p),"onUpdate:activeTab":V[0]||(V[0]=P=>Qe(p)?p.value=P:null),"time-range-value":t(Z),"onUpdate:timeRangeValue":V[1]||(V[1]=P=>Qe(Z)?Z.value=P:null),title:t(L).name,avatar:t(L).groupAvatar,icon:"i-heroicons-chat-bubble-left-right","icon-class":"bg-primary-600 text-white dark:bg-primary-500 dark:text-white",tabs:I,"current-session-id":t(m),"initial-time-state":t(H),onOpenIncrementalImport:V[2]||(V[2]=P=>v.value=!0),onOpenMemberManagement:V[3]||(V[3]=P=>d.value=!0),onOpenChatRecord:w,"onUpdate:fullRange":V[4]||(V[4]=P=>Y.value=P),"onUpdate:availableYears":V[5]||(V[5]=P=>G.value=P),onTimeRangeInitialized:t(Ne)},null,8,["active-tab","time-range-value","title","avatar","current-session-id","initial-time-state","onTimeRangeInitialized"]),o("div",ql,[t(S)&&!t(R)?(l(),k(t(he),{key:0,variant:"overlay",text:t(a)("common.loading")},null,8,["text"])):D("",!0),o("div",Bl,[x(it,{name:"tab-slide",mode:"out-in"},{default:$(()=>[t(p)==="insights"?(l(),k(Ns,{key:"insights-"+t(m),"session-id":t(m),session:t(L),"member-activity":t(K),"message-types":t(O),"hourly-activity":t(U),"daily-activity":t(B),"time-range":t(Y),"filtered-message-count":Re.value,"filtered-member-count":De.value,"time-filter":t(N)},null,8,["session-id","session","member-activity","message-types","hourly-activity","daily-activity","time-range","filtered-message-count","filtered-member-count","time-filter"])):t(p)==="ranking"?(l(),k(xl,{key:"ranking-"+t(m),"session-id":t(m),"time-filter":t(N)},null,8,["session-id","time-filter"])):t(p)==="ai-chat"?(l(),k(t(Ot),{key:"ai-chat-"+t(m),"session-id":t(m),"session-name":t(L).name,"chat-type":"group"},null,8,["session-id","session-name"])):t(p)==="memory"?(l(),k(jt,{key:"memory-"+t(m),"session-id":t(m),"session-name":t(L).name},null,8,["session-id","session-name"])):t(p)==="more"?(l(),k(Kt,{key:"more-"+t(m),"session-id":t(m),"chat-type":"group"},null,8,["session-id"])):D("",!0)]),_:1})])]),x(Wt,{onOpenIncrementalImport:V[6]||(V[6]=P=>v.value=!0),onOpenSemanticIndex:V[7]||(V[7]=P=>f.value=!0),onOpenMemberManagement:V[8]||(V[8]=P=>d.value=!0),onOpenChatRecord:w,onOpenMessageExport:V[9]||(V[9]=P=>r.value=!0)})],64)):t(T)?D("",!0):(l(),_("div",Ul,[o("p",Hl,y(t(a)("analysis.groupChat.loadError")),1)])),t(m)&&t(L)?(l(),k(Gt,{key:3,modelValue:f.value,"onUpdate:modelValue":V[10]||(V[10]=P=>f.value=P),"session-id":t(m),"message-count":t(L).messageCount},null,8,["modelValue","session-id","message-count"])):D("",!0),t(m)&&t(L)?(l(),k(pa,{key:4,modelValue:h.value,"onUpdate:modelValue":V[11]||(V[11]=P=>h.value=P),"session-id":t(m),"chat-type":"group","auto-check":""},null,8,["modelValue","session-id"])):D("",!0),t(m)&&t(L)?(l(),k(Yt,{key:5,modelValue:v.value,"onUpdate:modelValue":V[12]||(V[12]=P=>v.value=P),"session-id":t(m),"session-name":t(L).name,onImported:V[13]||(V[13]=()=>{t(X)(),t(pe)(),t(i).loadSessions()})},null,8,["modelValue","session-id","session-name"])):D("",!0),t(m)?(l(),k(t(e),{key:6,modelValue:r.value,"onUpdate:modelValue":V[14]||(V[14]=P=>r.value=P)},null,8,["modelValue"])):D("",!0),t(m)?(l(),k(Fe,{key:7,open:d.value,"onUpdate:open":V[17]||(V[17]=P=>d.value=P),ui:{content:"max-w-6xl h-[85vh]"}},{content:$(()=>[o("div",El,[o("div",Pl,[o("div",null,[o("h2",zl,y(t(a)("analysis.tooltip.memberManagement")),1),o("p",Ol,y(t(a)("members.list.description",{count:t(L)?.memberCount??0})),1)]),o("div",jl,[x(Nl,{"session-id":t(m)},null,8,["session-id"]),x(ce,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:V[15]||(V[15]=P=>d.value=!1)})])]),o("div",Kl,[x(Xt,{"session-id":t(m),"show-header":!1,"chat-type":"group",onDataChanged:V[16]||(V[16]=()=>{t(X)(),t(pe)()})},null,8,["session-id"])])])]),_:1},8,["open"])):D("",!0)])}}}),Ni=rt(Wl,[["__scopeId","data-v-b0a4ab03"]]);export{Ni as default};
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:h*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:f.data,axisLine:{show:!1},axisTick:{show:!1},axisLabel:f.axisLabel},series:[{name:"23点",type:"bar",stack:"total",data:m.map(v=>v.hourlyBreakdown.h23),itemStyle:{color:c.h23},barWidth:18},{name:"0点",type:"bar",stack:"total",data:m.map(v=>v.hourlyBreakdown.h0),itemStyle:{color:c.h0},barWidth:18},{name:"1点",type:"bar",stack:"total",data:m.map(v=>v.hourlyBreakdown.h1),itemStyle:{color:c.h1},barWidth:18},{name:"2点",type:"bar",stack:"total",data:m.map(v=>v.hourlyBreakdown.h2),itemStyle:{color:c.h2},barWidth:18},{name:"3-4点",type:"bar",stack:"total",data:m.map(v=>v.hourlyBreakdown.h3to4),itemStyle:{color:c.h3to4,borderRadius:[0,4,4,0]},barWidth:18,label:{show:!0,position:"right",distance:8,formatter:v=>{const r=s.value.length-1-v.dataIndex;return`${s.value[r].totalNightMessages} 条`},fontSize:11,fontWeight:500,color:"#6b7280"}}]}});return(m,f)=>n.bare?(l(),k(t(fe),{key:0,"content-height":i.value,"max-height-vh":n.maxHeightVh},{default:$(()=>[x(t(ae),{option:g.value,height:i.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(l(),k(t(j),{key:1,title:n.title,description:n.description,scrollable:"","max-height-vh":n.maxHeightVh},{default:$(()=>[o("div",Vo,[x(t(ae),{option:g.value,height:i.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),No={id:"streak-rank",class:"scroll-mt-24"},Do={class:"flex items-center gap-3"},Fo=q({__name:"CheckInRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(n){const e=n,a=C(null),s=C(!1),u=C("max"),i=C(e.globalTopN??10);z(()=>e.globalTopN,h=>{h!==void 0&&(i.value=h)});const c=b(()=>u.value==="max"?"🔥 火花榜 - 最长连续":"🔥 火花榜 - 当前连续"),g=b(()=>u.value==="max"?"历史最长连续发言天数":"正在持续连续发言的成员"),m=b(()=>a.value?a.value.streakRank.some(h=>h.currentStreak>0):!1);async function f(){if(e.sessionId){s.value=!0;try{a.value=await ee().getCheckInAnalysis(e.sessionId,e.timeFilter)}catch(h){console.error("加载打卡分析失败:",h)}finally{s.value=!1}}}return z(()=>[e.sessionId,e.timeFilter],()=>{f()},{immediate:!0,deep:!0}),(h,v)=>(l(),_("div",No,[x(t(j),{title:c.value,description:g.value},{headerRight:$(()=>[o("div",Do,[n.showTopNSelect?(l(),k(t(re),{key:0,modelValue:i.value,"onUpdate:modelValue":v[0]||(v[0]=r=>i.value=r)},null,8,["modelValue"])):D("",!0),m.value?(l(),k(t(ie),{key:1,modelValue:u.value,"onUpdate:modelValue":v[1]||(v[1]=r=>u.value=r),items:[{label:"最长连续",value:"max"},{label:"当前连续",value:"current"}],size:"sm"},null,8,["modelValue"])):D("",!0)])]),default:$(()=>[s.value?(l(),k(de,{key:0})):a.value&&a.value.streakRank.length>0?(l(),k(t(wo),{key:1,items:a.value.streakRank,title:c.value,mode:u.value,"top-n":i.value,bare:""},null,8,["items","title","mode","top-n"])):(l(),k(t(le),{key:2,text:"暂无连续发言数据"}))]),_:1},8,["title","description"])]))}}),qo={class:"flex items-center gap-3"},Bo={key:1,class:"py-8 text-center text-sm text-gray-400"},Uo={key:1,class:"py-8 text-center text-sm text-gray-400"},Ho=q({__name:"MemeBattleRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(n){const e=n,a=C(null),s=C(!1),u=C("count"),i=C(e.globalTopN??10);z(()=>e.globalTopN,d=>{d!==void 0&&(i.value=d)});async function c(){if(e.sessionId){s.value=!0;try{a.value=await ee().getMemeBattleAnalysis(e.sessionId,e.timeFilter)}catch(d){console.error("加载斗图分析失败:",d)}finally{s.value=!1}}}const g=b(()=>a.value?a.value.rankByCount.map(d=>({id:d.memberId.toString(),name:d.name,value:d.count,percentage:d.percentage})):[]),m=b(()=>a.value?a.value.rankByImageCount.map(d=>({id:d.memberId.toString(),name:d.name,value:d.count,percentage:d.percentage})):[]),f=b(()=>u.value==="count"?g.value:m.value),h=b(()=>u.value==="count"?"场":"张"),v=b(()=>{switch(u.value){case"battle":return"⚔️ 斗图榜 - 史诗级战役";case"count":return"⚔️ 斗图榜 - 按场次";case"image":return"⚔️ 斗图榜 - 按图量";default:return"⚔️ 斗图榜"}}),r=b(()=>{switch(u.value){case"battle":return"记录最激烈的斗图大战";case"count":return"参与斗图次数最多的人";case"image":return"在斗图中发送图片最多的人";default:return""}});return z(()=>[e.sessionId,e.timeFilter],()=>c(),{immediate:!0,deep:!0}),(d,w)=>s.value||a.value?(l(),k(t(j),{key:0,title:v.value,description:r.value},{headerRight:$(()=>[o("div",qo,[n.showTopNSelect?(l(),k(t(re),{key:0,modelValue:i.value,"onUpdate:modelValue":w[0]||(w[0]=I=>i.value=I)},null,8,["modelValue"])):D("",!0),x(t(ie),{modelValue:u.value,"onUpdate:modelValue":w[1]||(w[1]=I=>u.value=I),items:[{label:"按场次",value:"count"},{label:"按图量",value:"image"},{label:"史诗级战役",value:"battle"}],size:"sm"},null,8,["modelValue"])])]),default:$(()=>[s.value?(l(),k(de,{key:0})):a.value&&u.value==="battle"?(l(),_(E,{key:1},[a.value.topBattles.length>0?(l(),k(t($o),{key:0,battles:a.value.topBattles,title:"","top-n":i.value,bare:""},null,8,["battles","top-n"])):(l(),_("div",Bo,"暂无史诗级战役数据"))],64)):a.value?(l(),_(E,{key:2},[f.value.length>0?(l(),k(t(Ae),{key:0,members:f.value,title:v.value,unit:h.value,"top-n":i.value,bare:""},null,8,["members","title","unit","top-n"])):(l(),_("div",Uo,"暂无斗图数据"))],64)):D("",!0)]),_:1},8,["title","description"])):D("",!0)}}),Eo={class:"space-y-6"},Po={class:"flex items-center gap-3"},zo={class:"flex items-center gap-3"},Oo={key:2,class:"px-3 py-2"},jo=q({__name:"RepeatSection",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(n){const e=n,a=C(null),s=C(!1),u=C("originator"),i=C("fastest"),c=C(e.globalTopN??10),g=C(e.globalTopN??10);z(()=>e.globalTopN,T=>{T!==void 0&&(c.value=T,g.value=T)});async function m(){if(e.sessionId){s.value=!0;try{a.value=await ee().getRepeatAnalysis(e.sessionId,e.timeFilter)}catch(T){console.error("加载复读分析失败:",T)}finally{s.value=!1}}}const f=b(()=>a.value?a.value.originators.map(T=>({id:T.memberId.toString(),name:T.name,value:T.count,percentage:T.percentage})):[]),h=b(()=>a.value?a.value.initiators.map(T=>({id:T.memberId.toString(),name:T.name,value:T.count,percentage:T.percentage})):[]),v=b(()=>a.value?a.value.breakers.map(T=>({id:T.memberId.toString(),name:T.name,value:T.count,percentage:T.percentage})):[]),r=b(()=>{switch(u.value){case"originator":return f.value;case"initiator":return h.value;case"breaker":return v.value;default:return f.value}}),d=b(()=>{switch(u.value){case"originator":return"🔁 复读榜 - 被复读";case"initiator":return"🔁 复读榜 - 挑起";case"breaker":return"🔁 复读榜 - 打断";default:return"🔁 复读榜"}}),w=b(()=>{switch(u.value){case"originator":return"发出的消息被别人复读的次数";case"initiator":return"第二个发送相同消息、带起节奏的人";case"breaker":return"终结复读链的人";default:return""}}),I=b(()=>{if(!a.value)return{labels:[],values:[]};const T=a.value.chainLengthDistribution;return{labels:T.map(R=>`${R.length}人`),values:T.map(R=>R.count)}}),p=b(()=>i.value==="fastest"?"📊 复读统计 - 最快反应":"📊 复读统计 - 链长分布"),S=b(()=>{if(i.value==="fastest")return"平均复读反应时间(至少参与5次复读)";const T=a.value?.totalRepeatChains??0,R=a.value?.avgChainLength??0;return`共 ${T} 次复读,平均 ${R} 人参与`});return z(()=>[e.sessionId,e.timeFilter],()=>m(),{immediate:!0,deep:!0}),(T,R)=>(l(),_("div",Eo,[s.value||a.value&&a.value.totalRepeatChains>0?(l(),_(E,{key:0},[x(t(j),{title:d.value,description:w.value},{headerRight:$(()=>[o("div",Po,[n.showTopNSelect?(l(),k(t(re),{key:0,modelValue:c.value,"onUpdate:modelValue":R[0]||(R[0]=L=>c.value=L)},null,8,["modelValue"])):D("",!0),x(t(ie),{modelValue:u.value,"onUpdate:modelValue":R[1]||(R[1]=L=>u.value=L),items:[{label:"被复读",value:"originator"},{label:"挑起",value:"initiator"},{label:"打断",value:"breaker"}],size:"sm"},null,8,["modelValue"])])]),default:$(()=>[s.value?(l(),k(de,{key:0})):r.value.length>0?(l(),k(t(Ae),{key:1,members:r.value,title:d.value,unit:"次","top-n":c.value,bare:""},null,8,["members","title","top-n"])):(l(),k(t(le),{key:2,text:"暂无数据"}))]),_:1},8,["title","description"]),x(t(j),{title:p.value,description:S.value},{headerRight:$(()=>[o("div",zo,[n.showTopNSelect&&i.value==="fastest"?(l(),k(t(re),{key:0,modelValue:g.value,"onUpdate:modelValue":R[2]||(R[2]=L=>g.value=L)},null,8,["modelValue"])):D("",!0),x(t(ie),{modelValue:i.value,"onUpdate:modelValue":R[3]||(R[3]=L=>i.value=L),items:[{label:"最快反应",value:"fastest"},{label:"链长分布",value:"distribution"}],size:"sm"},null,8,["modelValue"])])]),default:$(()=>[s.value?(l(),k(de,{key:0})):i.value==="fastest"?(l(),_(E,{key:1},[a.value?.fastestRepeaters&&a.value.fastestRepeaters.length>0?(l(),k(t(Co),{key:0,items:a.value.fastestRepeaters,"top-n":g.value,title:"",bare:""},null,8,["items","top-n"])):(l(),k(t(le),{key:1,text:"暂无最快复读数据"}))],64)):(l(),_("div",Oo,[I.value.labels.length>0?(l(),k(t(na),{key:0,data:I.value,height:200},null,8,["data"])):(l(),k(t(le),{key:1,text:"暂无分布数据"}))]))]),_:1},8,["title","description"])],64)):(l(),k(t(j),{key:1,title:"🔁 复读榜"},{default:$(()=>[x(t(le),{text:"该群组暂无复读记录"})]),_:1}))]))}}),Ko=q({__name:"DivingRank",props:{sessionId:{},timeFilter:{},globalTopN:{}},setup(n){const e=n,a=C(null),s=C(!1);async function u(){if(e.sessionId){s.value=!0;try{a.value=await ee().getDivingAnalysis(e.sessionId,e.timeFilter)}catch(i){console.error("加载潜水分析失败:",i)}finally{s.value=!1}}}return z(()=>[e.sessionId,e.timeFilter],()=>u(),{immediate:!0,deep:!0}),(i,c)=>s.value?(l(),k(t(j),{key:0,title:"🤿 潜水榜 - 潜水最久",description:"距离上次发言时间最久的成员"},{default:$(()=>[x(de)]),_:1})):a.value&&a.value.rank.length>0?(l(),k(t(Ro),{key:1,items:a.value.rank,"global-top-n":n.globalTopN},null,8,["items","global-top-n"])):(l(),k(t(j),{key:2,title:"🤿 潜水榜"},{default:$(()=>[x(t(le),{text:"暂无潜水数据"})]),_:1}))}}),Wo={class:"space-y-6"},Go={class:"flex items-center gap-3"},Yo={key:1,class:"py-8 text-center text-sm text-gray-400"},Xo={key:1,class:"py-8 text-center text-sm text-gray-400"},Qo={class:"flex items-center gap-3"},Zo={key:2,class:"py-8 text-center text-sm text-gray-400"},Jo=q({__name:"NightOwlRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(n){const e=n,a=C(null),s=C(!1),u=C("first"),i=C("distribution"),c=C(e.globalTopN??10),g=C(e.globalTopN??10);z(()=>e.globalTopN,p=>{p!==void 0&&(c.value=p,g.value=p)});async function m(){if(e.sessionId){s.value=!0;try{a.value=await ee().getNightOwlAnalysis(e.sessionId,e.timeFilter)}catch(p){console.error("加载出勤分析失败:",p)}finally{s.value=!1}}}const f=b(()=>a.value?a.value.lastSpeakerRank.map(p=>({id:String(p.memberId),name:p.name,value:p.count,percentage:p.percentage})):[]),h=b(()=>a.value?a.value.firstSpeakerRank.map(p=>({id:String(p.memberId),name:p.name,value:p.count,percentage:p.percentage})):[]),v=b(()=>u.value==="last"?f.value:h.value),r=b(()=>u.value==="last"?"⏰ 出勤排行 - 最晚下班":"⏰ 出勤排行 - 最早上班"),d=b(()=>{const p=u.value==="last"?"每天最后一个发言的人":"每天第一个发言的人",S=a.value?.totalDays;return S==null?p:`${p}(共 ${S} 天)`}),w=b(()=>i.value==="distribution"?"🦉 修仙统计 - 发言分布":"🦉 修仙统计 - 连续记录"),I=b(()=>i.value==="distribution"?"深夜时段(23:00-05:00)各时段发言分布":"连续在深夜时段发言的天数");return z(()=>[e.sessionId,e.timeFilter],()=>m(),{immediate:!0,deep:!0}),(p,S)=>(l(),_("div",Wo,[s.value||a.value?(l(),_(E,{key:0},[x(t(j),{title:w.value,description:I.value},{headerRight:$(()=>[o("div",Go,[n.showTopNSelect?(l(),k(t(re),{key:0,modelValue:c.value,"onUpdate:modelValue":S[0]||(S[0]=T=>c.value=T)},null,8,["modelValue"])):D("",!0),x(t(ie),{modelValue:i.value,"onUpdate:modelValue":S[1]||(S[1]=T=>i.value=T),items:[{label:"发言分布",value:"distribution"},{label:"连续记录",value:"consecutive"}],size:"sm"},null,8,["modelValue"])])]),default:$(()=>[s.value?(l(),k(de,{key:0})):i.value==="distribution"?(l(),_(E,{key:1},[a.value&&a.value.nightOwlRank.length>0?(l(),k(t(Ao),{key:0,items:a.value.nightOwlRank,"top-n":c.value,title:"",bare:""},null,8,["items","top-n"])):(l(),_("div",Yo,"暂无深夜发言数据"))],64)):(l(),_(E,{key:2},[a.value&&a.value.consecutiveRecords.length>0?(l(),k(t(Lo),{key:0,items:a.value.consecutiveRecords,"top-n":c.value,title:"",bare:""},null,8,["items","top-n"])):(l(),_("div",Xo,"暂无连续记录"))],64))]),_:1},8,["title","description"]),x(t(j),{title:r.value,description:d.value},{headerRight:$(()=>[o("div",Qo,[n.showTopNSelect?(l(),k(t(re),{key:0,modelValue:g.value,"onUpdate:modelValue":S[2]||(S[2]=T=>g.value=T)},null,8,["modelValue"])):D("",!0),x(t(ie),{modelValue:u.value,"onUpdate:modelValue":S[3]||(S[3]=T=>u.value=T),items:[{label:"最早上班",value:"first"},{label:"最晚下班",value:"last"}],size:"sm"},null,8,["modelValue"])])]),default:$(()=>[s.value?(l(),k(de,{key:0})):v.value.length>0?(l(),k(t(Ae),{key:1,members:v.value,title:r.value,"top-n":g.value,unit:"次",bare:""},null,8,["members","title","top-n"])):(l(),_("div",Zo,"暂无数据"))]),_:1},8,["title","description"])],64)):D("",!0)]))}}),en={class:"mb-8 mt-4"},tn={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"}},an={id:"activity-rank",class:"scroll-mt-24"},sn={id:"meme-battle",class:"scroll-mt-24"},on={id:"repeat",class:"scroll-mt-24"},nn={id:"night-owl",class:"scroll-mt-24"},ln={id:"diving",class:"scroll-mt-24"},rn={class:"border-l border-gray-200 pl-4 dark:border-gray-800"},un={class:"mt-4 border-l border-gray-200 pl-4 dark:border-gray-800"},cn={class:"flex rounded-lg border border-gray-200 bg-white p-0.5 text-xs dark:border-gray-700 dark:bg-page-dark"},dn=["onClick"],mn=q({__name:"OverallRankingTab",props:{sessionId:{},timeFilter:{}},setup(n){const e=n,a=C([]),s=C([]),u=C(!1);async function i(){if(e.sessionId){u.value=!0;try{const p=ee(),[S,T]=await Promise.all([p.getMemberActivity(e.sessionId,e.timeFilter),p.getAvailableYears(e.sessionId)]);a.value=S,s.value=T}finally{u.value=!1}}}z(()=>[e.sessionId,e.timeFilter],()=>i(),{immediate:!0,deep:!0});const c=b(()=>{if(e.timeFilter?.startTs&&e.timeFilter?.endTs){const p=new Date(e.timeFilter.startTs*1e3).getFullYear(),S=new Date(e.timeFilter.endTs*1e3).getFullYear();return p===S?`${p} 赛季`:`${p}-${S} 赛季`}if(s.value.length>0){const p=[...s.value].sort((R,L)=>R-L),S=p[0],T=p[p.length-1];return S===T?`${S} 赛季`:`${S}-${T} 赛季`}return u.value?"赛季":"全部赛季"}),g=b(()=>({startTs:e.timeFilter?.startTs,endTs:e.timeFilter?.endTs})),m=[{id:"activity-rank",label:"🏆 活跃榜"},{id:"streak-rank",label:"🔥 火花榜"},{id:"meme-battle",label:"⚔️ 斗图榜"},{id:"repeat",label:"🔁 复读榜"},{id:"night-owl",label:"⏰ 出勤榜"},{id:"diving",label:"🤿 潜水榜"}],{contentRef:f,activeAnchor:h,scrollToAnchor:v}=ga(m,{threshold:350}),r=C(10),d=C("standard");Ke(gt,d);const w=[{value:"standard",label:"标准"},{value:"wide",label:"宽屏"},{value:"full",label:"全宽"}],I=b(()=>ht[d.value].contentClass);return(p,S)=>(l(),_("div",{ref_key:"contentRef",ref:f,class:"flex gap-6 p-6"},[o("div",{class:W(["main-content mx-auto min-w-0 flex-1 space-y-6 px-8",I.value])},[o("div",en,[o("h1",tn," 🏆 "+y(c.value),1),S[1]||(S[1]=o("p",{class:"mt-4 text-sm text-gray-500 dark:text-gray-400"},"各榜单前三名请找群主领取奖励 🎁",-1))]),o("div",an,[x(t(yo),{"session-id":e.sessionId,"member-activity":a.value,"base-loading":u.value,"time-filter":g.value,"global-top-n":r.value},null,8,["session-id","member-activity","base-loading","time-filter","global-top-n"])]),x(t(Fo),{"session-id":e.sessionId,"time-filter":g.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"]),o("div",sn,[x(t(Ho),{"session-id":e.sessionId,"time-filter":g.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),o("div",on,[x(t(jo),{"session-id":e.sessionId,"time-filter":g.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),o("div",nn,[x(t(Jo),{"session-id":e.sessionId,"time-filter":g.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),o("div",ln,[x(t(Ko),{"session-id":e.sessionId,"time-filter":g.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),S[2]||(S[2]=o("div",{class:"h-48 no-capture"},null,-1))],2),x(t(xa),{anchors:m,"active-anchor":t(h),onClick:t(v)},{default:$(()=>[o("div",rn,[S[3]||(S[3]=o("div",{class:"mb-2 text-xs text-gray-400"},"显示数量",-1)),x(t(re),{modelValue:r.value,"onUpdate:modelValue":S[0]||(S[0]=T=>r.value=T)},null,8,["modelValue"])]),o("div",un,[S[4]||(S[4]=o("div",{class:"mb-2 text-xs text-gray-400"},"榜单宽度",-1)),o("div",cn,[(l(),_(E,null,Q(w,T=>o("button",{key:T.value,type:"button",class:W(["rounded-md px-2 py-1 transition",d.value===T.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:R=>d.value=T.value},y(T.label),11,dn)),64))])])]),_:1},8,["active-anchor","onClick"])],512))}}),vn={class:"main-content mx-auto max-w-3xl p-4 sm:p-6"},pn=q({__name:"InteractionRankingTab",props:{sessionId:{},timeFilter:{}},setup(n){const{t:e}=te(),a=n,s=C(null),u=C(!1);async function i(){if(a.sessionId){u.value=!0;try{s.value=await ee().getMentionAnalysis(a.sessionId,a.timeFilter)}catch(r){console.error("加载 @ 互动分析失败:",r)}finally{u.value=!1}}}const c=b(()=>s.value?s.value.topMentioners.map(r=>({id:r.memberId.toString(),name:r.name,value:r.count,percentage:r.percentage})):[]),g=b(()=>s.value?s.value.topMentioned.map(r=>({id:r.memberId.toString(),name:r.name,value:r.count,percentage:r.percentage})):[]),m=C("mentioners"),f=b(()=>[{label:e("members.relationships.rankModes.mentioners"),value:"mentioners"},{label:e("members.relationships.rankModes.mentioned"),value:"mentioned"}]),h=b(()=>m.value==="mentioners"?c.value:g.value),v=b(()=>m.value==="mentioners"?e("members.relationships.topMentionersDescription"):e("members.relationships.topMentionedDescription"));return z(()=>[a.sessionId,a.timeFilter],()=>{i()},{immediate:!0,deep:!0}),(r,d)=>(l(),_("div",vn,[u.value?(l(),k(t(he),{key:0,text:t(e)("members.relationships.loading")},null,8,["text"])):s.value&&s.value.totalMentions>0&&h.value.length>0?(l(),k(t(Ja),{key:1,members:h.value,title:t(e)("members.relationships.rankingTitle"),description:v.value,unit:t(e)("members.relationships.times")},{headerRight:$(()=>[x(t(ie),{modelValue:m.value,"onUpdate:modelValue":d[0]||(d[0]=w=>m.value=w),items:f.value,size:"sm"},null,8,["modelValue","items"])]),_:1},8,["members","title","description","unit"])):(l(),k(t(j),{key:2,title:t(e)("members.relationships.emptyTitle")},{default:$(()=>[x(t(le),{text:t(e)("members.relationships.empty")},null,8,["text"])]),_:1},8,["title"]))]))}}),gn={class:"mx-auto h-full max-w-[920px] p-2 sm:p-4"},hn={class:"flex flex-wrap items-center justify-between gap-2 border-b border-gray-200 bg-gray-50 px-3 py-3 dark:border-gray-700 dark:bg-page-dark/50 sm:px-4"},fn={class:"flex items-center gap-3"},yn={class:"inline-flex items-center",role:"group"},bn={class:"flex items-center gap-3"},xn={class:"p-3 w-64"},kn={class:"text-sm font-medium mb-3"},wn={class:"space-y-3"},_n={class:"text-xs text-gray-500 mb-1 block"},$n={class:"text-xs text-gray-400 mt-1"},Tn={class:"text-xs text-gray-500 mb-1 block"},Cn={class:"text-xs text-gray-400 mt-1"},In={class:"flex-1 min-h-0 overflow-hidden"},Sn={key:0,class:"h-full flex items-center justify-center"},Rn={key:1,class:"h-full flex items-center justify-center"},Mn={class:"text-center text-gray-400"},Ln={key:2,class:"h-full"},Vn={key:3,class:"h-full flex overflow-hidden"},An={class:"w-64 border-r border-gray-200 dark:border-gray-700 flex flex-col overflow-hidden"},Nn={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},Dn={class:"text-sm font-medium flex items-center gap-2"},Fn={class:"flex-1 overflow-y-auto"},qn=["onClick"],Bn={class:"flex items-center justify-between"},Un={class:"text-sm truncate"},Hn={class:"text-xs text-gray-400"},En={class:"flex-1 overflow-hidden flex flex-col"},Pn={key:0,class:"flex-1 flex items-center justify-center"},zn={class:"text-center text-gray-400"},On={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 flex items-center gap-3"},jn={class:"w-10 h-10 rounded-full flex items-center justify-center text-white font-bold bg-primary-500"},Kn={class:"font-medium"},Wn={class:"text-xs text-gray-400"},Gn={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},Yn={class:"text-sm font-medium flex items-center gap-2"},Xn={class:"flex-1 overflow-y-auto"},Qn={key:0,class:"p-4 text-center text-gray-400"},Zn={class:"flex items-center gap-3"},Jn={class:"flex-1 min-w-0"},el={class:"text-sm font-medium truncate"},tl={class:"flex items-center gap-3 mt-0.5 text-xs text-gray-400"},al={class:"w-20 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},sl={key:4,class:"h-full flex flex-col overflow-hidden"},ol={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},nl={class:"text-sm font-medium flex items-center gap-2"},ll={class:"flex-1 overflow-y-auto"},il={class:"flex items-center gap-3"},rl={class:"flex-1 min-w-0"},ul={class:"flex items-center gap-2 text-sm"},cl={class:"font-medium truncate"},dl={class:"font-medium truncate"},ml={class:"flex items-center gap-3 mt-1 text-xs text-gray-400"},vl={class:"w-24 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},pl={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-page-dark/50"},gl=q({__name:"ProximityRankingTab",props:{sessionId:{},timeFilter:{}},setup(n){ia([ra,ua,ca,da,ma]);const e=n,{t:a}=te(),s=Ct(),u=b(()=>s.value==="dark"),i=C(!0);Zt(i);const c=C(null),g=C("matrix"),m=C(null),f=C({lookAhead:3,decaySeconds:120,topEdges:150}),h=C(null);let v=null;async function r(){if(e.sessionId){i.value=!0;try{c.value=await ee().getClusterGraph(e.sessionId,e.timeFilter,{lookAhead:f.value.lookAhead,decaySeconds:f.value.decaySeconds,topEdges:f.value.topEdges})}catch(U){console.error("[chart-cluster] 加载小团体关系数据失败:",U),c.value=null}finally{i.value=!1}}}const d=b(()=>{if(!c.value||c.value.nodes.length===0)return null;const{nodes:U,links:B,maxLinkValue:O}=c.value,Y=[...U].sort((H,X)=>X.messageCount-H.messageCount).slice(0,20).map(H=>H.name),G=new Map;for(const H of B)G.set(`${H.source}-${H.target}`,H.value),G.set(`${H.target}-${H.source}`,H.value);const N=[];for(let H=0;H<Y.length;H++)for(let X=0;X<Y.length;X++)if(H===X)N.push([H,X,-1]);else{const pe=G.get(`${Y[H]}-${Y[X]}`)||0;N.push([H,X,pe])}return{names:Y,data:N,maxValue:O}});function w(){if(!d.value)return{graphic:{type:"text",style:{text:a("views.cluster.noData"),fill:"#999"}}};const{names:U,data:B,maxValue:O}=d.value;return{tooltip:{position:"top",formatter:Z=>{const[Y,G,N]=Z.data;return N<0?`${U[Y]}`:N===0?`${U[Y]} ↔ ${U[G]}<br/>暂无关系数据`:`${U[Y]} ↔ ${U[G]}<br/>临近度: ${N.toFixed(2)}`}},grid:{left:120,right:40,top:40,bottom:120},xAxis:{type:"category",data:U,splitArea:{show:!0},axisLabel:{rotate:45,fontSize:10,color:u.value?"#ccc":"#333"}},yAxis:{type:"category",data:U,splitArea:{show:!0},axisLabel:{fontSize:10,color:u.value?"#ccc":"#333"}},visualMap:{min:0,max:O||1,calculable:!0,orient:"horizontal",left:"center",bottom:10,inRange:{color:u.value?["#1a1a2e","#16213e","#0f3460","#e94560"]:["#f7f7f7","#fce4ec","#f8bbd9","#ee4567"]},textStyle:{color:u.value?"#ccc":"#333"}},series:[{type:"heatmap",data:B.filter(Z=>Z[2]>=0),label:{show:!1},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}],backgroundColor:"transparent"}}const I=b(()=>c.value?[...c.value.nodes].sort((U,B)=>B.messageCount-U.messageCount):[]),p=b(()=>!c.value||m.value===null?null:c.value.nodes.find(U=>U.id===m.value)||null),S=b(()=>{if(!c.value||!p.value)return[];const U=p.value.name,B=[];for(const O of c.value.links)O.source===U?B.push({otherName:O.target,value:O.value,coOccurrenceCount:O.coOccurrenceCount}):O.target===U&&B.push({otherName:O.source,value:O.value,coOccurrenceCount:O.coOccurrenceCount});return B.sort((O,Z)=>Z.value-O.value),B}),T=b(()=>c.value?c.value.links.slice(0,50):[]);function R(){v&&g.value==="matrix"&&v.setOption(w(),{notMerge:!0})}function L(){h.value&&(v=va(h.value,u.value?"dark":void 0),R())}function K(){v?.resize()}return z(g,async(U,B)=>{B==="matrix"&&v&&(v.dispose(),v=null),U==="matrix"&&(await Be(),L())}),z([c,()=>u.value],()=>{g.value==="matrix"&&R()},{deep:!0}),z(i,async(U,B)=>{B&&!U&&g.value==="matrix"&&(v&&(v.dispose(),v=null),await Be(),L())}),z(()=>[e.sessionId,e.timeFilter],()=>r(),{immediate:!0,deep:!0}),Oe(()=>{window.addEventListener("resize",K),g.value==="matrix"&&Be(()=>L())}),at(()=>{window.removeEventListener("resize",K),v?.dispose(),v=null}),(U,B)=>{const O=Ie,Z=lt,Y=It,G=Se;return l(),_("div",gn,[x(t(la),{class:"flex h-full flex-col"},{default:$(()=>[o("div",hn,[o("div",fn,[o("div",yn,[x(O,{size:"xs",color:g.value==="matrix"?"primary":"neutral",variant:g.value==="matrix"?"solid":"ghost",onClick:B[0]||(B[0]=N=>g.value="matrix")},{default:$(()=>[J(y(t(a)("views.cluster.matrixView")),1)]),_:1},8,["color","variant"]),x(O,{size:"xs",color:g.value==="member"?"primary":"neutral",variant:g.value==="member"?"solid":"ghost",onClick:B[1]||(B[1]=N=>g.value="member")},{default:$(()=>[J(y(t(a)("views.cluster.memberView")),1)]),_:1},8,["color","variant"]),x(O,{size:"xs",color:g.value==="circle"?"primary":"neutral",variant:g.value==="circle"?"solid":"ghost",onClick:B[2]||(B[2]=N=>g.value="circle")},{default:$(()=>[J(y(t(a)("views.cluster.rankingView")),1)]),_:1},8,["color","variant"])])]),o("div",bn,[x(Y,null,{content:$(()=>[o("div",xn,[o("h4",kn,y(t(a)("views.cluster.modelSettings")),1),o("div",wn,[o("div",null,[o("label",_n,y(t(a)("views.cluster.lookAhead")),1),x(Z,{modelValue:f.value.lookAhead,"onUpdate:modelValue":B[3]||(B[3]=N=>f.value.lookAhead=N),modelModifiers:{number:!0},type:"number",min:1,max:10,size:"xs",placeholder:"1-10"},null,8,["modelValue"]),o("p",$n,y(t(a)("views.cluster.lookAheadDesc")),1)]),o("div",null,[o("label",Tn,y(t(a)("views.cluster.decaySeconds")),1),x(Z,{modelValue:f.value.decaySeconds,"onUpdate:modelValue":B[4]||(B[4]=N=>f.value.decaySeconds=N),modelModifiers:{number:!0},type:"number",min:30,max:3600,size:"xs",placeholder:"30-3600"},null,8,["modelValue"]),o("p",Cn,y(t(a)("views.cluster.decaySecondsDesc")),1)]),x(O,{size:"xs",color:"primary",class:"w-full mt-2",onClick:r},{default:$(()=>[J(y(t(a)("views.cluster.applySettings")),1)]),_:1})])])]),default:$(()=>[x(O,{variant:"ghost",size:"xs",icon:"i-heroicons-adjustments-horizontal"})]),_:1}),x(O,{variant:"ghost",size:"xs",icon:"i-heroicons-arrow-path",onClick:r})])]),o("div",In,[i.value?(l(),_("div",Sn,[x(G,{name:"i-heroicons-arrow-path",class:"w-6 h-6 animate-spin text-gray-400"})])):!c.value||c.value.nodes.length===0?(l(),_("div",Rn,[o("div",Mn,[x(G,{name:"i-heroicons-user-group",class:"w-12 h-12 mx-auto mb-2 opacity-50"}),o("p",null,y(t(a)("views.cluster.noData")),1)])])):g.value==="matrix"?(l(),_("div",Ln,[o("div",{ref_key:"chartRef",ref:h,class:"w-full h-full"},null,512)])):g.value==="member"?(l(),_("div",Vn,[o("div",An,[o("div",Nn,[o("h3",Dn,[x(G,{name:"i-heroicons-users",class:"w-4 h-4"}),J(" "+y(t(a)("views.cluster.selectMember")),1)])]),o("div",Fn,[(l(!0),_(E,null,Q(I.value,N=>(l(),_("div",{key:N.id,class:W(["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":m.value===N.id}]),onClick:H=>m.value=N.id},[o("div",Bn,[o("span",Un,y(N.name),1),o("span",Hn,y(N.messageCount),1)])],10,qn))),128))])]),o("div",En,[p.value?(l(),_(E,{key:1},[o("div",On,[o("div",jn,y(p.value.name.charAt(0)),1),o("div",null,[o("div",Kn,y(p.value.name),1),o("div",Wn,y(t(a)("views.cluster.msgCount"))+": "+y(p.value.messageCount)+" | "+y(t(a)("views.cluster.relationCount"))+": "+y(S.value.length),1)])]),o("div",Gn,[o("h3",Yn,[x(G,{name:"i-heroicons-heart",class:"w-4 h-4 text-pink-500"}),J(" "+y(t(a)("views.cluster.relationsByIntimacy")),1)])]),o("div",Xn,[S.value.length===0?(l(),_("div",Qn,y(t(a)("views.cluster.noRelations")),1)):D("",!0),(l(!0),_(E,null,Q(S.value,(N,H)=>(l(),_("div",{key:N.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"},[o("div",Zn,[o("span",{class:W(["w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold",H<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"])},y(H+1),3),o("div",Jn,[o("div",el,y(N.otherName),1),o("div",tl,[o("span",null,y(t(a)("views.cluster.intimacy"))+": "+y((N.value*100).toFixed(0))+"%",1),o("span",null,y(t(a)("views.cluster.coOccurrence"))+": "+y(N.coOccurrenceCount)+y(t(a)("views.cluster.times")),1)])]),o("div",al,[o("div",{class:"h-full bg-linear-to-r from-pink-400 to-pink-600",style:_e({width:`${S.value[0]?.value?N.value/S.value[0].value*100:0}%`})},null,4)])])]))),128))])],64)):(l(),_("div",Pn,[o("div",zn,[x(G,{name:"i-heroicons-cursor-arrow-rays",class:"w-12 h-12 mx-auto mb-2 opacity-50"}),o("p",null,y(t(a)("views.cluster.selectMemberHint")),1)])]))])])):(l(),_("div",sl,[o("div",ol,[o("h3",nl,[x(G,{name:"i-heroicons-trophy",class:"w-4 h-4 text-yellow-500"}),J(" "+y(t(a)("views.cluster.interactionRanking")),1)])]),o("div",ll,[(l(!0),_(E,null,Q(T.value,(N,H)=>(l(),_("div",{key:H,class:"px-4 py-3 border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50"},[o("div",il,[o("span",{class:W(["w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold",H<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"])},y(H+1),3),o("div",rl,[o("div",ul,[o("span",cl,y(N.source),1),B[5]||(B[5]=o("span",{class:"text-gray-400"},"↔",-1)),o("span",dl,y(N.target),1)]),o("div",ml,[o("span",null,y(t(a)("views.cluster.score"))+": "+y(N.value.toFixed(2)),1),o("span",null,y(t(a)("views.cluster.coOccurrence"))+": "+y(N.coOccurrenceCount)+y(t(a)("views.cluster.times")),1)])]),o("div",vl,[o("div",{class:"h-full bg-linear-to-r from-yellow-400 to-orange-500",style:_e({width:`${T.value[0]?.value?N.value/T.value[0].value*100:0}%`})},null,4)])])]))),128))])]))]),c.value?(l(),_("div",pl,[o("span",null,y(t(a)("views.cluster.totalMembers"))+": "+y(c.value.stats.totalMembers),1),o("span",null,y(t(a)("views.cluster.totalMessages"))+": "+y(c.value.stats.totalMessages.toLocaleString()),1),o("span",null,y(t(a)("views.cluster.involvedMembers"))+": "+y(c.value.stats.involvedMembers),1),o("span",null,y(t(a)("views.cluster.edgeCount"))+": "+y(c.value.stats.edgeCount),1)])):D("",!0)]),_:1})])}}}),hl={class:"flex h-full flex-col"},fl={class:"min-h-0 flex-1 overflow-y-auto"},yl={key:3,class:"main-content mx-auto w-full max-w-3xl p-6"},bl=q({__name:"RankingView",props:{sessionId:{},timeFilter:{},visibleTabIds:{}},setup(n){const e=n,{t:a,locale:s}=te(),u=C("overall"),i=C(null),c=St({byId:new Map,byName:new Map});Ke(vt,c),z(()=>e.sessionId,async r=>{if(c.value={byId:new Map,byName:new Map},!!r)try{const d=await ee().getMembers(r);if(e.sessionId!==r)return;c.value=Ia(d)}catch(d){console.error("Failed to load ranking avatars:",d)}},{immediate:!0});const g=b(()=>Rt("groupRanking",s.value)),m=r=>!e.visibleTabIds||e.visibleTabIds.includes(r),f=b(()=>[...g.value&&m("overall")?[{id:"overall",label:a("analysis.subTabs.ranking.overall"),icon:"i-heroicons-trophy"}]:[],{id:"interaction",label:a("analysis.subTabs.ranking.interaction"),icon:"i-heroicons-heart"},{id:"proximity",label:a("analysis.subTabs.ranking.proximity"),icon:"i-heroicons-user-group"},{id:"hot-repeat",label:a("analysis.subTabs.quotes.hotRepeat"),icon:"i-heroicons-sparkles"},{id:"catchphrase",label:a("analysis.subTabs.quotes.catchphrase"),icon:"i-heroicons-chat-bubble-bottom-center-text"},{id:"keyword",label:a("analysis.subTabs.ranking.keyword"),icon:"i-heroicons-magnifying-glass"}].filter(d=>m(d.id))),h=b(()=>({startTs:e.timeFilter?.startTs,endTs:e.timeFilter?.endTs})),v=b(()=>({...h.value,memberId:i.value}));return z(f,r=>{r.some(d=>d.id===u.value)||(u.value=r[0]?.id??"hot-repeat")},{immediate:!0}),(r,d)=>(l(),_("div",hl,[x(t(ct),{modelValue:u.value,"onUpdate:modelValue":d[1]||(d[1]=w=>u.value=w),items:f.value,"persist-key":"groupRankingTab"},{right:$(()=>[u.value==="catchphrase"?(l(),k(ut,{key:0,modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=w=>i.value=w),"session-id":e.sessionId},null,8,["modelValue","session-id"])):D("",!0)]),_:1},8,["modelValue","items"]),o("div",fl,[x(it,{name:"fade",mode:"out-in"},{default:$(()=>[u.value==="overall"?(l(),k(mn,{key:0,"session-id":e.sessionId,"time-filter":h.value},null,8,["session-id","time-filter"])):u.value==="interaction"?(l(),k(pn,{key:1,"session-id":e.sessionId,"time-filter":h.value},null,8,["session-id","time-filter"])):u.value==="proximity"?(l(),k(gl,{key:2,"session-id":e.sessionId,"time-filter":h.value},null,8,["session-id","time-filter"])):u.value==="keyword"?(l(),_("div",yl,[x(vo,{"session-id":e.sessionId,"time-filter":h.value},null,8,["session-id","time-filter"])])):u.value==="hot-repeat"?(l(),k(t(Cs),{key:4,"session-id":e.sessionId,"time-filter":h.value},null,8,["session-id","time-filter"])):u.value==="catchphrase"?(l(),k(t(ps),{key:5,"session-id":e.sessionId,"time-filter":v.value},null,8,["session-id","time-filter"])):D("",!0)]),_:1})])]))}}),xl=rt(bl,[["__scopeId","data-v-8da082e6"]]),kl={class:"main-content max-w-5xl p-6"},wl={class:"mb-4 text-sm text-gray-500 dark:text-gray-400 no-capture"},_l={key:0,class:"divide-y divide-gray-100 dark:divide-gray-800"},$l={class:"w-32 shrink-0 pt-0.5 font-medium text-gray-900 dark:text-white"},Tl={class:"flex flex-1 flex-wrap items-center gap-2"},Cl={class:"flex items-center gap-1.5 rounded-lg bg-gray-50 px-3 py-1.5 dark:bg-gray-800"},Il={class:"text-xs text-gray-400"},Sl={key:0,class:"text-gray-300 dark:text-gray-600"},Rl=q({__name:"NicknameHistory",props:{sessionId:{}},setup(n){const{t:e}=te(),a=n,s=C([]),u=C([]),i=C(!1);function c(f){return f.groupNickname||f.accountName||f.platformId}async function g(){if(a.sessionId)try{s.value=await ee().getMembers(a.sessionId)}catch(f){console.error("加载成员列表失败:",f)}}async function m(){if(!a.sessionId||s.value.length===0)return;i.value=!0;const f=[];try{const h=s.value.map(r=>ee().getMemberNameHistory(a.sessionId,r.id)),v=await Promise.all(h);s.value.forEach((r,d)=>{const w=v[d];w.length>2&&f.push({memberId:r.id,name:c(r),history:w})}),u.value=f}catch(h){console.error("加载昵称变更记录失败:",h)}finally{i.value=!1}}return z(()=>a.sessionId,async()=>{await g()},{immediate:!0}),z(()=>s.value.length,()=>{s.value.length>0&&m()}),Oe(async()=>{s.value.length===0&&await g()}),(f,h)=>{const v=mt;return l(),_("div",kl,[o("p",wl,y(t(e)("members.nicknameHistory.note")),1),x(t(j),{title:t(e)("members.nicknameHistory.title"),description:i.value?t(e)("members.nicknameHistory.loading"):u.value.length>0?t(e)("members.nicknameHistory.hasChanges",{count:u.value.length}):t(e)("members.nicknameHistory.noChanges")},{default:$(()=>[!i.value&&u.value.length>0?(l(),_("div",_l,[(l(!0),_(E,null,Q(u.value,r=>(l(),_("div",{key:r.memberId,class:"flex items-start gap-3 px-5 py-3"},[o("div",$l,y(r.name),1),o("div",Tl,[(l(!0),_(E,null,Q(r.history,(d,w)=>(l(),_(E,{key:w},[o("div",Cl,[o("span",{class:W(["text-sm",d.endTs===null?"font-semibold text-pink-600":"text-gray-700 dark:text-gray-300"])},y(d.name),3),d.endTs===null?(l(),k(v,{key:0,color:"primary",variant:"soft",size:"xs"},{default:$(()=>[J(y(t(e)("members.nicknameHistory.current")),1)]),_:1})):D("",!0),o("span",Il,"("+y(t(ta)(d.startTs,d.endTs))+")",1)]),w<r.history.length-1?(l(),_("span",Sl,"→")):D("",!0)],64))),128))])]))),128))])):i.value?(l(),k(t(he),{key:2,text:t(e)("members.nicknameHistory.loadingText")},null,8,["text"])):(l(),k(t(le),{key:1,text:t(e)("members.nicknameHistory.empty")},null,8,["text"]))]),_:1},8,["title","description"])])}}}),Ml={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-page-dark"},Ll={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},Vl={class:"text-lg font-semibold text-gray-900 dark:text-white"},Al={class:"flex-1 overflow-auto"},Nl=q({__name:"NicknameHistoryEntry",props:{sessionId:{}},setup(n){const{t:e}=te(),a=n,s=C(!1);return(u,i)=>{const c=Ie,g=Ve;return l(),_(E,null,[x(c,{variant:"ghost",icon:"i-heroicons-clock",size:"sm",onClick:i[0]||(i[0]=m=>s.value=!0)},{default:$(()=>[J(y(t(e)("analysis.subTabs.member.nicknameHistory")),1)]),_:1}),a.sessionId?(l(),k(g,{key:0,open:s.value,"onUpdate:open":i[2]||(i[2]=m=>s.value=m),ui:{content:"max-w-6xl h-[85vh]"}},{content:$(()=>[o("div",Ml,[o("div",Ll,[o("h2",Vl,y(t(e)("analysis.subTabs.member.nicknameHistory")),1),x(c,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:i[1]||(i[1]=m=>s.value=!1)})]),o("div",Al,[x(Rl,{"session-id":a.sessionId},null,8,["session-id"])])])]),_:1},8,["open"])):D("",!0)],64)}}}),Dl={class:"relative flex h-full flex-col dark:bg-page-dark",style:{"padding-top":"var(--titlebar-area-height)"}},Fl=["aria-label"],ql={class:"relative flex-1 overflow-y-auto"},Bl={class:"h-full"},Ul={key:2,class:"flex h-full items-center justify-center"},Hl={class:"text-gray-500"},El={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-page-dark"},Pl={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},zl={class:"text-lg font-semibold text-gray-900 dark:text-white"},Ol={class:"text-sm text-gray-500 dark:text-gray-400"},jl={class:"flex items-center gap-2"},Kl={class:"flex-1 overflow-hidden"},Wl=q({__name:"index",setup(n){const e=ot(()=>nt(()=>import("./MessageExportModal-DNU16Bs8.js"),__vite__mapDeps([9,1,2,3,10,11,12,13]))),{t:a}=te(),s=Mt(),u=Lt(),i=Vt(),c=je(),g=At(),{currentSessionId:m}=Nt(i),f=C(!1),h=C(!1),v=C(!1),r=C(!1),d=C(!1);function w(){c.openChatRecordDrawer({})}const I=[{id:"insights",labelKey:"analysis.tabs.insights",icon:"i-heroicons-presentation-chart-bar"},{id:"ranking",labelKey:"analysis.tabs.ranking",icon:"i-heroicons-trophy"},{id:"ai-chat",labelKey:"analysis.tabs.aiChat",icon:"i-heroicons-chat-bubble-left-ellipsis"},{id:"memory",labelKey:"analysis.tabs.memory",icon:"i-heroicons-light-bulb"},{id:"more",labelKey:"analysis.tabs.more",icon:"i-heroicons-squares-2x2"}],{activeTab:p,isLoading:S,isInitialLoad:T,isSessionSwitching:R,session:L,memberActivity:K,hourlyActivity:U,dailyActivity:B,messageTypes:O,timeRangeValue:Z,fullTimeRange:Y,availableYears:G,timeFilter:N,initialTimeState:H,loadData:X,invalidateAnalysisData:pe,handleTimeRangeInitialized:Ne}=Pt({route:s,router:u,currentSessionId:m,selectSession:i.selectSession,defaultTab:g.defaultSessionTab,validTabIds:I.map(ue=>ue.id)});Ke("session-switch-loading",R);const Re=b(()=>K.value.reduce((ue,V)=>ue+V.messageCount,0)),De=b(()=>K.value.filter(ue=>ue.messageCount>0).length);return(ue,V)=>{const ce=Ie,Fe=Ve;return l(),_("div",Dl,[t(R)?(l(),_("div",{key:0,"data-testid":"group-chat-switch-loading",class:"absolute inset-0 z-20 flex cursor-wait items-center justify-center bg-page-bg dark:bg-page-dark",style:{paddingTop:"var(--titlebar-area-height)"},role:"status","aria-live":"polite","aria-label":t(a)("common.loading")},[x(t(dt))],8,Fl)):D("",!0),t(L)?(l(),_(E,{key:1},[x(zt,{"active-tab":t(p),"onUpdate:activeTab":V[0]||(V[0]=P=>Qe(p)?p.value=P:null),"time-range-value":t(Z),"onUpdate:timeRangeValue":V[1]||(V[1]=P=>Qe(Z)?Z.value=P:null),title:t(L).name,avatar:t(L).groupAvatar,icon:"i-heroicons-chat-bubble-left-right","icon-class":"bg-primary-600 text-white dark:bg-primary-500 dark:text-white",tabs:I,"current-session-id":t(m),"initial-time-state":t(H),onOpenIncrementalImport:V[2]||(V[2]=P=>v.value=!0),onOpenMemberManagement:V[3]||(V[3]=P=>d.value=!0),onOpenChatRecord:w,"onUpdate:fullRange":V[4]||(V[4]=P=>Y.value=P),"onUpdate:availableYears":V[5]||(V[5]=P=>G.value=P),onTimeRangeInitialized:t(Ne)},null,8,["active-tab","time-range-value","title","avatar","current-session-id","initial-time-state","onTimeRangeInitialized"]),o("div",ql,[t(S)&&!t(R)?(l(),k(t(he),{key:0,variant:"overlay",text:t(a)("common.loading")},null,8,["text"])):D("",!0),o("div",Bl,[x(it,{name:"tab-slide",mode:"out-in"},{default:$(()=>[t(p)==="insights"?(l(),k(Ns,{key:"insights-"+t(m),"session-id":t(m),session:t(L),"member-activity":t(K),"message-types":t(O),"hourly-activity":t(U),"daily-activity":t(B),"time-range":t(Y),"filtered-message-count":Re.value,"filtered-member-count":De.value,"time-filter":t(N)},null,8,["session-id","session","member-activity","message-types","hourly-activity","daily-activity","time-range","filtered-message-count","filtered-member-count","time-filter"])):t(p)==="ranking"?(l(),k(xl,{key:"ranking-"+t(m),"session-id":t(m),"time-filter":t(N)},null,8,["session-id","time-filter"])):t(p)==="ai-chat"?(l(),k(t(Ot),{key:"ai-chat-"+t(m),"session-id":t(m),"session-name":t(L).name,"chat-type":"group"},null,8,["session-id","session-name"])):t(p)==="memory"?(l(),k(jt,{key:"memory-"+t(m),"session-id":t(m),"session-name":t(L).name},null,8,["session-id","session-name"])):t(p)==="more"?(l(),k(Kt,{key:"more-"+t(m),"session-id":t(m),"chat-type":"group"},null,8,["session-id"])):D("",!0)]),_:1})])]),x(Wt,{onOpenIncrementalImport:V[6]||(V[6]=P=>v.value=!0),onOpenSemanticIndex:V[7]||(V[7]=P=>f.value=!0),onOpenMemberManagement:V[8]||(V[8]=P=>d.value=!0),onOpenChatRecord:w,onOpenMessageExport:V[9]||(V[9]=P=>r.value=!0)})],64)):t(T)?D("",!0):(l(),_("div",Ul,[o("p",Hl,y(t(a)("analysis.groupChat.loadError")),1)])),t(m)&&t(L)?(l(),k(Gt,{key:3,modelValue:f.value,"onUpdate:modelValue":V[10]||(V[10]=P=>f.value=P),"session-id":t(m),"message-count":t(L).messageCount},null,8,["modelValue","session-id","message-count"])):D("",!0),t(m)&&t(L)?(l(),k(pa,{key:4,modelValue:h.value,"onUpdate:modelValue":V[11]||(V[11]=P=>h.value=P),"session-id":t(m),"chat-type":"group","auto-check":""},null,8,["modelValue","session-id"])):D("",!0),t(m)&&t(L)?(l(),k(Yt,{key:5,modelValue:v.value,"onUpdate:modelValue":V[12]||(V[12]=P=>v.value=P),"session-id":t(m),"session-name":t(L).name,onImported:V[13]||(V[13]=()=>{t(X)(),t(pe)(),t(i).loadSessions()})},null,8,["modelValue","session-id","session-name"])):D("",!0),t(m)?(l(),k(t(e),{key:6,modelValue:r.value,"onUpdate:modelValue":V[14]||(V[14]=P=>r.value=P)},null,8,["modelValue"])):D("",!0),t(m)?(l(),k(Fe,{key:7,open:d.value,"onUpdate:open":V[17]||(V[17]=P=>d.value=P),ui:{content:"max-w-6xl h-[85vh]"}},{content:$(()=>[o("div",El,[o("div",Pl,[o("div",null,[o("h2",zl,y(t(a)("analysis.tooltip.memberManagement")),1),o("p",Ol,y(t(a)("members.list.description",{count:t(L)?.memberCount??0})),1)]),o("div",jl,[x(Nl,{"session-id":t(m)},null,8,["session-id"]),x(ce,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:V[15]||(V[15]=P=>d.value=!1)})])]),o("div",Kl,[x(Xt,{"session-id":t(m),"show-header":!1,"chat-type":"group",onDataChanged:V[16]||(V[16]=()=>{t(X)(),t(pe)()})},null,8,["session-id"])])])]),_:1},8,["open"])):D("",!0)])}}}),Ni=rt(Wl,[["__scopeId","data-v-b0a4ab03"]]);export{Ni as default};
@@ -1 +1 @@
1
- import{d as k,a6 as b,aD as y,o as s,c as n,z as l,w as o,g as e,F as u,j as v,l as r,a as d,p,f as _,a8 as w,n as C,a9 as B,aE as V,k as z,aJ as N,e as m,ah as P}from"./index-DnpnIyle.js";import{P as D}from"./PageHeader-D4up77TB.js";import{_ as H}from"./PageTabs.vue_vue_type_script_setup_true_lang-DYQRFk9s.js";import{p as I}from"./people-page-header-Cx5r9Bk2.js";import"./vendor-snapdom--nZvo8Sg.js";const E={class:"flex h-full flex-col text-gray-900 dark:bg-page-dark dark:text-gray-100",style:{"padding-top":"var(--titlebar-area-height)"}},F={key:0,class:"hidden items-center gap-5 text-[11px] sm:flex"},R={key:0,class:"h-3 w-px bg-gray-250 dark:bg-white/10"},S={class:"flex items-center gap-1.5"},T={class:"text-gray-400 dark:text-gray-500"},$={class:"font-mono font-bold text-gray-900 dark:text-white"},j=k({__name:"index",setup(J){const{t:a}=b(),h=y(),c=m(()=>h.name==="people-relationships"?"relationships":"contacts"),g=m(()=>[{id:"contacts",label:a("contacts.title"),icon:"i-lucide-users",to:{name:"people-contacts"}},{id:"relationships",label:a("relationships.title"),icon:"i-lucide-git-fork",to:{name:"people-relationships"}}]),f=m(()=>c.value==="relationships"?{title:a("layout.relationships"),description:a("relationships.subtitle"),icon:"i-lucide-git-fork",iconClass:"bg-primary-600 text-white dark:bg-primary-500 dark:text-white shadow-sm"}:{title:a("layout.relationships"),description:a("contacts.subtitle",{count:0}),icon:"i-lucide-users",iconClass:"bg-primary-600 text-white dark:bg-primary-500 dark:text-white shadow-sm"}),{header:t}=I(f);return(L,U)=>{const x=w;return s(),n("div",E,[l(D,{title:e(t).title,description:e(t).description,size:"compact",icon:e(t).icon,"icon-class":e(t).iconClass},{actions:o(()=>[e(t).action?(s(),_(x,{key:0,icon:e(t).action.icon,color:"primary",variant:"soft",size:"sm",class:C(["rounded-xl",e(t).action.class]),loading:e(t).action.loading,disabled:e(t).action.disabled,onClick:e(t).action.onClick},{default:o(()=>[B(p(e(t).action.label),1)]),_:1},8,["icon","class","loading","disabled","onClick"])):r("",!0)]),default:o(()=>[l(e(H),{class:"mt-3 pb-1.5","model-value":c.value,items:g.value,"aria-label":e(a)("relationships.nav")},{right:o(()=>[e(t).stats?.length?(s(),n("div",F,[(s(!0),n(u,null,v(e(t).stats,i=>(s(),n(u,{key:i.id},[i.dividerBefore?(s(),n("div",R)):r("",!0),d("div",S,[d("span",T,p(i.label),1),d("span",$,p(i.value),1)])],64))),128))])):r("",!0)]),_:1},8,["model-value","items","aria-label"])]),_:1},8,["title","description","icon","icon-class"]),l(e(N),null,{default:o(({Component:i})=>[l(V,{name:"people-tab-slide",mode:"out-in"},{default:o(()=>[(s(),_(z(i),{key:c.value}))]),_:2},1024)]),_:1})])}}}),O=P(j,[["__scopeId","data-v-06450f37"]]);export{O as default};
1
+ import{d as k,a6 as b,aD as y,o as s,c as n,z as l,w as o,g as e,F as u,j as v,l as r,a as d,p,f as _,a8 as w,n as C,a9 as B,aE as V,k as z,aJ as N,e as m,ah as P}from"./index-B1oj9KDv.js";import{P as D}from"./PageHeader-CKeZjNNR.js";import{_ as H}from"./PageTabs.vue_vue_type_script_setup_true_lang-C8M3wNNH.js";import{p as I}from"./people-page-header-BbYSSpsO.js";import"./vendor-snapdom--nZvo8Sg.js";const E={class:"flex h-full flex-col text-gray-900 dark:bg-page-dark dark:text-gray-100",style:{"padding-top":"var(--titlebar-area-height)"}},F={key:0,class:"hidden items-center gap-5 text-[11px] sm:flex"},R={key:0,class:"h-3 w-px bg-gray-250 dark:bg-white/10"},S={class:"flex items-center gap-1.5"},T={class:"text-gray-400 dark:text-gray-500"},$={class:"font-mono font-bold text-gray-900 dark:text-white"},j=k({__name:"index",setup(J){const{t:a}=b(),h=y(),c=m(()=>h.name==="people-relationships"?"relationships":"contacts"),g=m(()=>[{id:"contacts",label:a("contacts.title"),icon:"i-lucide-users",to:{name:"people-contacts"}},{id:"relationships",label:a("relationships.title"),icon:"i-lucide-git-fork",to:{name:"people-relationships"}}]),f=m(()=>c.value==="relationships"?{title:a("layout.relationships"),description:a("relationships.subtitle"),icon:"i-lucide-git-fork",iconClass:"bg-primary-600 text-white dark:bg-primary-500 dark:text-white shadow-sm"}:{title:a("layout.relationships"),description:a("contacts.subtitle",{count:0}),icon:"i-lucide-users",iconClass:"bg-primary-600 text-white dark:bg-primary-500 dark:text-white shadow-sm"}),{header:t}=I(f);return(L,U)=>{const x=w;return s(),n("div",E,[l(D,{title:e(t).title,description:e(t).description,size:"compact",icon:e(t).icon,"icon-class":e(t).iconClass},{actions:o(()=>[e(t).action?(s(),_(x,{key:0,icon:e(t).action.icon,color:"primary",variant:"soft",size:"sm",class:C(["rounded-xl",e(t).action.class]),loading:e(t).action.loading,disabled:e(t).action.disabled,onClick:e(t).action.onClick},{default:o(()=>[B(p(e(t).action.label),1)]),_:1},8,["icon","class","loading","disabled","onClick"])):r("",!0)]),default:o(()=>[l(e(H),{class:"mt-3 pb-1.5","model-value":c.value,items:g.value,"aria-label":e(a)("relationships.nav")},{right:o(()=>[e(t).stats?.length?(s(),n("div",F,[(s(!0),n(u,null,v(e(t).stats,i=>(s(),n(u,{key:i.id},[i.dividerBefore?(s(),n("div",R)):r("",!0),d("div",S,[d("span",T,p(i.label),1),d("span",$,p(i.value),1)])],64))),128))])):r("",!0)]),_:1},8,["model-value","items","aria-label"])]),_:1},8,["title","description","icon","icon-class"]),l(e(N),null,{default:o(({Component:i})=>[l(V,{name:"people-tab-slide",mode:"out-in"},{default:o(()=>[(s(),_(z(i),{key:c.value}))]),_:2},1024)]),_:1})])}}}),O=P(j,[["__scopeId","data-v-06450f37"]]);export{O as default};