chatlab-cli 0.36.0 → 0.36.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 (193) hide show
  1. package/README.md +7 -7
  2. package/dist/{chat-command-SXW67RF7.mjs → chat-command-XPJ43KSW.mjs} +10 -10
  3. package/dist/chat-command-XPJ43KSW.mjs.map +1 -0
  4. package/dist/{chunk-BSGLH6G3.mjs → chunk-2JPFBIAG.mjs} +144 -79
  5. package/dist/chunk-2JPFBIAG.mjs.map +1 -0
  6. package/dist/{chunk-VDWI4A4U.mjs → chunk-5MJO4AJB.mjs} +2 -2
  7. package/dist/{chunk-GVW3BDGZ.mjs → chunk-67HNPYZJ.mjs} +3 -3
  8. package/dist/{chunk-UNIKQFI5.mjs → chunk-6QP47LID.mjs} +2 -2
  9. package/dist/{chunk-4YPNYQSP.mjs → chunk-FJOGBUXU.mjs} +390 -96
  10. package/dist/chunk-FJOGBUXU.mjs.map +1 -0
  11. package/dist/{chunk-XDF6PMVZ.mjs → chunk-JOVL7OTW.mjs} +2 -2
  12. package/dist/{chunk-CNEWMCGX.mjs → chunk-L7TIIVAY.mjs} +57 -57
  13. package/dist/chunk-L7TIIVAY.mjs.map +1 -0
  14. package/dist/{chunk-U2NXHIJK.mjs → chunk-NFTCEJBJ.mjs} +3 -3
  15. package/dist/{chunk-AAGDVTP2.mjs → chunk-NQHZPSW2.mjs} +2 -2
  16. package/dist/{chunk-OWOEWZIC.mjs → chunk-Q3NEL2KK.mjs} +82 -28
  17. package/dist/chunk-Q3NEL2KK.mjs.map +1 -0
  18. package/dist/{chunk-LZGOIRLV.mjs → chunk-R73XMAB2.mjs} +9 -5
  19. package/dist/chunk-R73XMAB2.mjs.map +1 -0
  20. package/dist/{chunk-JHON5FN7.mjs → chunk-X2QBH24F.mjs} +8 -3
  21. package/dist/chunk-X2QBH24F.mjs.map +1 -0
  22. package/dist/cli.mjs +9 -9
  23. package/dist/contacts-worker.mjs +2 -2
  24. package/dist/global-insight-worker.mjs +1 -1
  25. package/dist/{http-LVOGJFDL.mjs → http-5RVY5J5U.mjs} +12 -12
  26. package/dist/{import-7OU57ZHM.mjs → import-ILTWVHKU.mjs} +7 -7
  27. package/dist/index.mjs +12 -12
  28. package/dist/{mcp-CUKHTTII.mjs → mcp-Y2YXOFB4.mjs} +8 -8
  29. package/dist/people-relationships-worker.mjs +2 -2
  30. package/dist/semantic-index-worker.mjs +1 -1
  31. package/dist/{service-KZTHBDQ5.mjs → service-ZAHXRSFD.mjs} +6 -6
  32. package/dist/service-ZAHXRSFD.mjs.map +1 -0
  33. package/dist/{src-LORFXAUE.mjs → src-OV5ZNE3Z.mjs} +10 -6
  34. package/dist/{stream-import-7YUWIAD6.mjs → stream-import-XOUM3Z5W.mjs} +7 -7
  35. package/dist/{undici-MU5I3L6Q.mjs → undici-UGXDRJLV.mjs} +193 -193
  36. package/dist/undici-UGXDRJLV.mjs.map +1 -0
  37. package/dist/{update-checker-3N7HQEP2.mjs → update-checker-UL2FBLXH.mjs} +3 -5
  38. package/dist/{update-checker-3N7HQEP2.mjs.map → update-checker-UL2FBLXH.mjs.map} +1 -1
  39. package/dist/{worker-runtime-GQ5SY7E3.mjs → worker-runtime-JNGURHDM.mjs} +5 -5
  40. package/dist-cli-web/assets/AISettingsTab-vvjijrc5.js +1 -0
  41. package/dist-cli-web/assets/AboutTab-CxI8zJNz.js +1 -0
  42. package/dist-cli-web/assets/ActionToolsPanel.vue_vue_type_script_setup_true_lang-w0hHEodr.js +110 -0
  43. package/dist-cli-web/assets/{Alert-DJzXKcec.js → Alert-_MYcI_E2.js} +1 -1
  44. package/dist-cli-web/assets/ApiSettingsTab-CK7U6dVA.js +2 -0
  45. package/dist-cli-web/assets/BatchManageTab-1WnEqqpB.js +1 -0
  46. package/dist-cli-web/assets/{BufferResource-DY3P-dGs.js → BufferResource-i64DlwQT.js} +1 -1
  47. package/dist-cli-web/assets/{CanvasRenderer-As2MJTWZ.js → CanvasRenderer-B76mEt9A.js} +1 -1
  48. package/dist-cli-web/assets/ChatRecordDrawer-Bp6OSCrz.js +1 -0
  49. package/dist-cli-web/assets/{ChatRecordWorkspace-CVDPBmcl.js → ChatRecordWorkspace-CyfPIlIy.js} +1 -1
  50. package/dist-cli-web/assets/{Checkbox-4F1WAuVF.js → Checkbox-Ci7IeRw1.js} +1 -1
  51. package/dist-cli-web/assets/DataDirCleanupNotice-Dh63pOLt.js +1 -0
  52. package/dist-cli-web/assets/DatePicker.vue_vue_type_script_setup_true_lang-DqNBNa1D.js +1 -0
  53. package/dist-cli-web/assets/{DebugToolsPanel-BLU6SY8a.js → DebugToolsPanel-CbNsD9co.js} +1 -1
  54. package/dist-cli-web/assets/EChart.vue_vue_type_script_setup_true_lang-YeqmodwE.js +1 -0
  55. package/dist-cli-web/assets/EChartBar.vue_vue_type_script_setup_true_lang-C3pZmq0v.js +1 -0
  56. package/dist-cli-web/assets/{EChartLine.vue_vue_type_script_setup_true_lang-BYhukELX.js → EChartLine.vue_vue_type_script_setup_true_lang-Co6olfwv.js} +1 -1
  57. package/dist-cli-web/assets/{EChartWordcloud-C16xh7Tx.js → EChartWordcloud-rDusZwSq.js} +1 -1
  58. package/dist-cli-web/assets/{Filter-BEtPORqF.js → Filter-yxkeHO78.js} +1 -1
  59. package/dist-cli-web/assets/GlobalTaskBar-BlZ-fFiq.js +1 -0
  60. package/dist-cli-web/assets/GroupRelationshipGalaxyView-BXQBX0zJ.js +1 -0
  61. package/dist-cli-web/assets/{Label-Dgl3ghzT.js → Label-CFAZFBQX.js} +1 -1
  62. package/dist-cli-web/assets/LoadingState.vue_vue_type_script_setup_true_lang-CwgpqtMZ.js +1 -0
  63. package/dist-cli-web/assets/MessageExportModal-DU71grc7.js +1 -0
  64. package/dist-cli-web/assets/{PageHeader-CL9AFfvl.js → PageHeader-BDPf4NuI.js} +1 -1
  65. package/dist-cli-web/assets/{PageTabs.vue_vue_type_script_setup_true_lang-C22kOxIK.js → PageTabs.vue_vue_type_script_setup_true_lang-_j82asQU.js} +1 -1
  66. package/dist-cli-web/assets/{RelationshipGalaxyCanvas-BnkcrIpk.js → RelationshipGalaxyCanvas-BODk18aA.js} +14 -14
  67. package/dist-cli-web/assets/RelationshipGalaxyThreeCanvas-BJyuRiC-.js +4168 -0
  68. package/dist-cli-web/assets/RelationshipGalaxyThreeCanvas-CCasBcBQ.css +1 -0
  69. package/dist-cli-web/assets/{RenderTargetSystem-CPwnC2X3.js → RenderTargetSystem-CVMvAUSv.js} +1 -1
  70. package/dist-cli-web/assets/RovingFocusItem-DC_06OmN.js +1 -0
  71. package/dist-cli-web/assets/{ScreenCaptureModal-ByKxzNQe.js → ScreenCaptureModal-DrBFDOtC.js} +1 -1
  72. package/dist-cli-web/assets/SectionTabs.vue_vue_type_script_setup_true_lang-C-Zj2biH.js +1 -0
  73. package/dist-cli-web/assets/{Select-jVtfc_xc.js → Select-DLK2LYhO.js} +1 -1
  74. package/dist-cli-web/assets/SettingsModal-BFkxzo0Y.css +1 -0
  75. package/dist-cli-web/assets/SettingsModal-DqaR4Dx5.js +2 -0
  76. package/dist-cli-web/assets/{StorageTab-QdcDqA6Q.js → StorageTab-B0ebN0f8.js} +1 -1
  77. package/dist-cli-web/assets/{Switch-DYHM64k9.js → Switch-CokhQWxm.js} +1 -1
  78. package/dist-cli-web/assets/{Tabs-B6Nzq2NQ.js → Tabs-D1UiZNaZ.js} +1 -1
  79. package/dist-cli-web/assets/Tabs-N3Q-Mpqi.js +1 -0
  80. package/dist-cli-web/assets/{ThemeCard.vue_vue_type_script_setup_true_lang-Bsq7gpC0.js → ThemeCard.vue_vue_type_script_setup_true_lang-OT-I0mbU.js} +1 -1
  81. package/dist-cli-web/assets/TimeSelect.vue_vue_type_script_setup_true_lang-Ccunouyf.js +1 -0
  82. package/dist-cli-web/assets/{VisuallyHiddenInput-IQpmK9yR.js → VisuallyHiddenInput-OAJEt_Y5.js} +1 -1
  83. package/dist-cli-web/assets/{WebGLRenderer-8JHbnkTc.js → WebGLRenderer-DuUeftYD.js} +1 -1
  84. package/dist-cli-web/assets/{WebGPURenderer-CLWfB4CC.js → WebGPURenderer-DoWQxiWZ.js} +1 -1
  85. package/dist-cli-web/assets/aiChat-CdADfRnU.js +8 -0
  86. package/dist-cli-web/assets/{browserAll-Cin6ghNg.js → browserAll-Cb-mtR2y.js} +1 -1
  87. package/dist-cli-web/assets/{cli-web-D7IBc3AX.js → cli-web-BHQCZLLg.js} +1 -1
  88. package/dist-cli-web/assets/{fetch-B7kuohCt.js → fetch-AvsnJLWJ.js} +1 -1
  89. package/dist-cli-web/assets/{fetch-BR71C0K9.js → fetch-B-6tyYWu.js} +1 -1
  90. package/dist-cli-web/assets/{fetch-OnnCjzee.js → fetch-B4PYy5JS.js} +1 -1
  91. package/dist-cli-web/assets/{fetch-_CN1EVMt.js → fetch-BbcFaCRB.js} +1 -1
  92. package/dist-cli-web/assets/{fetch-C8tTTsCm.js → fetch-BkA_so1e.js} +1 -1
  93. package/dist-cli-web/assets/{fetch-2QEQPA9q.js → fetch-BzXuAaT3.js} +1 -1
  94. package/dist-cli-web/assets/fetch-CW2fKvGp.js +1 -0
  95. package/dist-cli-web/assets/{fetch-CuUeyk0N.js → fetch-DEub4tOo.js} +1 -1
  96. package/dist-cli-web/assets/{fetch-1NiXh-_B.js → fetch-DLTlYnDB.js} +1 -1
  97. package/dist-cli-web/assets/{fetch-B2agy1hy.js → fetch-Qs38Hx1V.js} +1 -1
  98. package/dist-cli-web/assets/{fetch-Bk-7vxHV.js → fetch-sYDJ-Zs8.js} +1 -1
  99. package/dist-cli-web/assets/{fetch-DPRDSI39.js → fetch-ul8-uQIb.js} +1 -1
  100. package/dist-cli-web/assets/host-B6SQ6OGo.js +1 -0
  101. package/dist-cli-web/assets/host-DYIkQqvY.js +1 -0
  102. package/dist-cli-web/assets/{index-BCEk6ZpL.js → index--IEkRjKe.js} +10 -10
  103. package/dist-cli-web/assets/index-9iaY_EWG.js +1 -0
  104. package/dist-cli-web/assets/index-BnaLj2dx.css +1 -0
  105. package/dist-cli-web/assets/index-C7omDgiJ.js +2 -0
  106. package/dist-cli-web/assets/index-CHsM84U1.js +2 -0
  107. package/dist-cli-web/assets/index-CL8u01Pf.js +137 -0
  108. package/dist-cli-web/assets/{index-BIHFuCJK.js → index-CShh95fU.js} +1 -1
  109. package/dist-cli-web/assets/index-C_OS8Y8W.js +1 -0
  110. package/dist-cli-web/assets/{index-Colc58j-.js → index-D64XYYts.js} +1 -1
  111. package/dist-cli-web/assets/index-DrCc8p_I.css +1 -0
  112. package/dist-cli-web/assets/index-Dz_ddyZS.css +1 -0
  113. package/dist-cli-web/assets/index-UpTe1KzQ.js +1 -0
  114. package/dist-cli-web/assets/index-a8Hw6eD8.js +1 -0
  115. package/dist-cli-web/assets/index-jwjzZNKm.js +1 -0
  116. package/dist-cli-web/assets/index-pkxlF8Ee.js +1 -0
  117. package/dist-cli-web/assets/index-sWxuTsa7.js +36 -0
  118. package/dist-cli-web/assets/{people-page-header-DNPjaSt4.js → people-page-header-0jvXFFnh.js} +1 -1
  119. package/dist-cli-web/assets/{prompt-BgywZQ_g.js → prompt-BPYj29Vq.js} +1 -1
  120. package/dist-cli-web/assets/{semantic-index-config-builder-bji_UxYE.js → semantic-index-config-builder-vO37z355.js} +1 -1
  121. package/dist-cli-web/assets/service-CVoA9yNf.js +1 -0
  122. package/dist-cli-web/assets/{service-DpU9fa-l.js → service-D29Vftq9.js} +1 -1
  123. package/dist-cli-web/assets/service-DMysyLCa.js +1 -0
  124. package/dist-cli-web/assets/{useFormControl-De24E2zT.js → useFormControl-DVawP2DO.js} +1 -1
  125. package/dist-cli-web/assets/useTable-Bv3R_Hux.js +1 -0
  126. package/dist-cli-web/assets/useToast-BA0EwImD.js +1 -0
  127. package/dist-cli-web/assets/{vendor-echarts-DfAMQxdr.js → vendor-echarts-hTLhTs52.js} +5 -5
  128. package/dist-cli-web/assets/{vendor-echarts-wordcloud-BsaEJTPY.js → vendor-echarts-wordcloud-B8CF_NgP.js} +1 -1
  129. package/dist-cli-web/assets/{vendor-zrender-PFmZe1EY.js → vendor-zrender-D8psf1AA.js} +2 -2
  130. package/dist-cli-web/assets/{webworkerAll-BRnv6GvJ.js → webworkerAll-ZPE_yGnC.js} +1 -1
  131. package/dist-cli-web/index.html +2 -2
  132. package/package.json +4 -4
  133. package/dist/chat-command-SXW67RF7.mjs.map +0 -1
  134. package/dist/chunk-4YPNYQSP.mjs.map +0 -1
  135. package/dist/chunk-BSGLH6G3.mjs.map +0 -1
  136. package/dist/chunk-CNEWMCGX.mjs.map +0 -1
  137. package/dist/chunk-JHON5FN7.mjs.map +0 -1
  138. package/dist/chunk-LZGOIRLV.mjs.map +0 -1
  139. package/dist/chunk-OWOEWZIC.mjs.map +0 -1
  140. package/dist/service-KZTHBDQ5.mjs.map +0 -1
  141. package/dist/undici-MU5I3L6Q.mjs.map +0 -1
  142. package/dist-cli-web/assets/AISettingsTab-BmhNcUEh.js +0 -1
  143. package/dist-cli-web/assets/AboutTab-CFklrZt8.js +0 -1
  144. package/dist-cli-web/assets/ActionToolsPanel.vue_vue_type_script_setup_true_lang-B-dIPvcs.js +0 -110
  145. package/dist-cli-web/assets/ApiSettingsTab-DvDm421U.js +0 -2
  146. package/dist-cli-web/assets/BatchManageTab-DhIDH3Q1.js +0 -1
  147. package/dist-cli-web/assets/ChatRecordDrawer-DHdas7Jp.js +0 -1
  148. package/dist-cli-web/assets/DataDirCleanupNotice-jebQ9il3.js +0 -1
  149. package/dist-cli-web/assets/DatePicker.vue_vue_type_script_setup_true_lang-Cal624eP.js +0 -1
  150. package/dist-cli-web/assets/EChart.vue_vue_type_script_setup_true_lang-CsgJ-Xn3.js +0 -1
  151. package/dist-cli-web/assets/GlobalTaskBar-BvNmFO7q.js +0 -1
  152. package/dist-cli-web/assets/GroupRelationshipGalaxyView-DEUIrvgz.js +0 -1
  153. package/dist-cli-web/assets/LoadingState.vue_vue_type_script_setup_true_lang-CwDIA0UP.js +0 -1
  154. package/dist-cli-web/assets/MessageExportModal-DYjhBuzO.js +0 -1
  155. package/dist-cli-web/assets/RelationshipGalaxyThreeCanvas-CqdqveEJ.js +0 -4108
  156. package/dist-cli-web/assets/RelationshipGalaxyThreeCanvas-TYGOUDiv.css +0 -1
  157. package/dist-cli-web/assets/RovingFocusItem-j33Nsbbn.js +0 -1
  158. package/dist-cli-web/assets/SectionTabs.vue_vue_type_script_setup_true_lang-C6EHKB_i.js +0 -1
  159. package/dist-cli-web/assets/SettingsModal-CjVax3I6.css +0 -1
  160. package/dist-cli-web/assets/SettingsModal-Dg27piEO.js +0 -2
  161. package/dist-cli-web/assets/Tabs-CRZdCcU4.js +0 -1
  162. package/dist-cli-web/assets/TimeSelect.vue_vue_type_script_setup_true_lang-BLpQds4F.js +0 -1
  163. package/dist-cli-web/assets/aiChat-4JvxWGXZ.js +0 -8
  164. package/dist-cli-web/assets/base-D6fxqD_X.js +0 -1
  165. package/dist-cli-web/assets/dateFormat-Bu4-Ux3L.js +0 -1
  166. package/dist-cli-web/assets/index-BUz_Vl9U.js +0 -2
  167. package/dist-cli-web/assets/index-BWZIoPV3.css +0 -1
  168. package/dist-cli-web/assets/index-BYQV3OA5.js +0 -1
  169. package/dist-cli-web/assets/index-CVVv_6qu.js +0 -2
  170. package/dist-cli-web/assets/index-CacwXQL4.js +0 -1
  171. package/dist-cli-web/assets/index-DImo7TQN.js +0 -1
  172. package/dist-cli-web/assets/index-DV9zQVPV.js +0 -137
  173. package/dist-cli-web/assets/index-DXKS-q-w.css +0 -1
  174. package/dist-cli-web/assets/index-DZc5A4_J.js +0 -1
  175. package/dist-cli-web/assets/index-DkWTvE7d.js +0 -36
  176. package/dist-cli-web/assets/index-DmEn0PAI.js +0 -1
  177. package/dist-cli-web/assets/index-b9eEQeVt.js +0 -1
  178. package/dist-cli-web/assets/index-waDxab2e.css +0 -1
  179. package/dist-cli-web/assets/insight-time-range-MJxLEu6o.js +0 -1
  180. package/dist-cli-web/assets/useTable-C7BH94MF.js +0 -1
  181. package/dist-cli-web/assets/useToast-CxhJkhXK.js +0 -1
  182. /package/dist/{chunk-VDWI4A4U.mjs.map → chunk-5MJO4AJB.mjs.map} +0 -0
  183. /package/dist/{chunk-GVW3BDGZ.mjs.map → chunk-67HNPYZJ.mjs.map} +0 -0
  184. /package/dist/{chunk-UNIKQFI5.mjs.map → chunk-6QP47LID.mjs.map} +0 -0
  185. /package/dist/{chunk-XDF6PMVZ.mjs.map → chunk-JOVL7OTW.mjs.map} +0 -0
  186. /package/dist/{chunk-U2NXHIJK.mjs.map → chunk-NFTCEJBJ.mjs.map} +0 -0
  187. /package/dist/{chunk-AAGDVTP2.mjs.map → chunk-NQHZPSW2.mjs.map} +0 -0
  188. /package/dist/{http-LVOGJFDL.mjs.map → http-5RVY5J5U.mjs.map} +0 -0
  189. /package/dist/{import-7OU57ZHM.mjs.map → import-ILTWVHKU.mjs.map} +0 -0
  190. /package/dist/{mcp-CUKHTTII.mjs.map → mcp-Y2YXOFB4.mjs.map} +0 -0
  191. /package/dist/{src-LORFXAUE.mjs.map → src-OV5ZNE3Z.mjs.map} +0 -0
  192. /package/dist/{stream-import-7YUWIAD6.mjs.map → stream-import-XOUM3Z5W.mjs.map} +0 -0
  193. /package/dist/{worker-runtime-GQ5SY7E3.mjs.map → worker-runtime-JNGURHDM.mjs.map} +0 -0
@@ -1,10 +1,10 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GroupRelationshipGalaxyView-DEUIrvgz.js","assets/index-DkWTvE7d.js","assets/vendor-snapdom--nZvo8Sg.js","assets/index-BWZIoPV3.css","assets/LoadingState.vue_vue_type_script_setup_true_lang-CwDIA0UP.js","assets/RelationshipGalaxyThreeCanvas-CqdqveEJ.js","assets/relationship-galaxy-connections-Cg4G5yYE.js","assets/relationship-galaxy-viewport-Cwfa51ER.js","assets/RelationshipGalaxyThreeCanvas-TYGOUDiv.css","assets/MessageExportModal-DYjhBuzO.js","assets/useToast-CxhJkhXK.js","assets/Tabs-CRZdCcU4.js","assets/Tabs-B6Nzq2NQ.js","assets/RovingFocusItem-j33Nsbbn.js"])))=>i.map(i=>d[i]);
2
- import{r as S,B as De,C as He,a as B,o,h as C,n as W,l as a,F as H,q as Y,v as f,b as ne,W as st,c as k,aj as he,f as y,j as ot,e,w as I,D as x,a0 as Z,s as A,a5 as $e,a3 as be,a4 as Q,a2 as xe,a1 as Ne,i as E,ad as J,bt as Pe,bu as Ee,cv as lt,an as Oe,aX as qe,aY as Fe,cw as nt,Y as it,p as We,af as rt,H as Me,aN as ut,az as Ke,cx as dt,ae as je,am as ct,a6 as mt,ah as vt,aA as Be,ay as pt,au as gt}from"./index-DkWTvE7d.js";import{b as O,a as ie,c as ht,d as Ue,e as ft,u as yt,f as Ye,I as bt,g as xt,h as kt,i as wt,j as _t,k as $t,l as Tt,m as Ct,n as It,C as St,o as Rt,L as Vt,D as Mt,M as Lt}from"./ActionToolsPanel.vue_vue_type_script_setup_true_lang-B-dIPvcs.js";import{_ as Ge}from"./SectionTabs.vue_vue_type_script_setup_true_lang-C6EHKB_i.js";import"./vendor-echarts-wordcloud-BsaEJTPY.js";import{g as Dt,_ as Nt}from"./base-D6fxqD_X.js";import{_ as oe,u as At,L as qt}from"./LoadingState.vue_vue_type_script_setup_true_lang-CwDIA0UP.js";import{a as Ft}from"./index-Colc58j-.js";import{a as Le,b as Bt,c as Ut}from"./dateFormat-Bu4-Ux3L.js";import{_ as zt}from"./Switch-DYHM64k9.js";import{a as Qe}from"./Tabs-B6Nzq2NQ.js";import{u as Ht}from"./prompt-BgywZQ_g.js";import{_ as Pt}from"./Select-jVtfc_xc.js";import{_ as te}from"./EChart.vue_vue_type_script_setup_true_lang-CsgJ-Xn3.js";import{T as re}from"./Tabs-CRZdCcU4.js";import{_ as Et}from"./ThemeCard.vue_vue_type_script_setup_true_lang-Bsq7gpC0.js";import{u as Ot,p as Wt,j as Kt,t as jt,v as Yt,i as Gt,k as Qt}from"./vendor-echarts-DfAMQxdr.js";import{_ as Xt}from"./useTable-C7BH94MF.js";import"./vendor-snapdom--nZvo8Sg.js";import"./Checkbox-4F1WAuVF.js";import"./useFormControl-De24E2zT.js";import"./VisuallyHiddenInput-IQpmK9yR.js";import"./RovingFocusItem-j33Nsbbn.js";import"./Label-Dgl3ghzT.js";import"./useToast-CxhJkhXK.js";import"./service-DpU9fa-l.js";import"./aiChat-4JvxWGXZ.js";import"./chatlabSiteLocale-CrCNb8QP.js";import"./ChatRecordWorkspace-CVDPBmcl.js";import"./DatePicker.vue_vue_type_script_setup_true_lang-Cal624eP.js";import"./clamp-jFYhBC76.js";import"./EChartLine.vue_vue_type_script_setup_true_lang-BYhukELX.js";import"./semantic-index-config-builder-bji_UxYE.js";import"./TimeSelect.vue_vue_type_script_setup_true_lang-BLpQds4F.js";import"./PageHeader-CL9AFfvl.js";import"./PageTabs.vue_vue_type_script_setup_true_lang-C22kOxIK.js";import"./Alert-DJzXKcec.js";import"./vendor-zrender-PFmZe1EY.js";function Jt(i,t={}){const{threshold:s=300,containerSelector:l=".overflow-y-auto",scrollLockDuration:u=800}=t,d=S(i[0]?.id||"");let c=!1;const p=S(null);let m=null;function b(){if(c)return;const r=[];i.forEach(v=>{const w=document.getElementById(v.id);if(w){const g=w.getBoundingClientRect();r.push({id:v.id,top:Math.round(g.top)})}});let n=0;for(let v=0;v<r.length;v++){if(r[v].top>s){n=Math.max(0,v-1);break}n=v}d.value=i[n]?.id||""}function h(r){const n=document.getElementById(r);n&&(d.value=r,c=!0,n.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{c=!1,b()},u))}return De(()=>{m=p.value?.closest(l)||null,m&&(m.addEventListener("scroll",b,{passive:!0}),b())}),He(()=>{m&&m.removeEventListener("scroll",b)}),{contentRef:p,activeAnchor:d,scrollToAnchor:h,updateActiveAnchor:b}}function fe(i){return i===0?"text-amber-500 dark:text-amber-400":i===1?"text-gray-500 dark:text-gray-300":i===2?"text-orange-600 dark:text-orange-400":"text-gray-400 dark:text-gray-500"}function ye(i){return String(i+1).padStart(2,"0")}function Zt(i){return i===0?"from-amber-400 to-orange-500":i===1?"from-gray-300 to-gray-400":i===2?"from-orange-400 to-amber-600":"from-primary-300 to-primary-500"}const ea={class:"sticky top-24 space-y-6"},ta={class:"border-l border-gray-200 dark:border-gray-800"},aa=["onClick"],sa=B({__name:"PageAnchorsNav",props:{anchors:{},activeAnchor:{},width:{default:"w-44"},hideOnMobile:{type:Boolean,default:!0}},emits:["click"],setup(i,{emit:t}){const s=t;function l(u){s("click",u)}return(u,d)=>(o(),C("div",{class:W([i.width,"shrink-0",i.hideOnMobile?"hidden lg:block":""])},[a("div",ea,[a("nav",null,[a("div",ta,[(o(!0),C(H,null,Y(i.anchors,c=>(o(),C("button",{key:c.id,class:W(["-ml-px block border-l-2 py-1.5 pl-4 text-left text-sm transition-colors",[i.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:p=>l(c.id)},f(c.label),11,aa))),128))])]),ne(u.$slots,"default")])],2))}}),ue=B({__name:"TopNSelect",props:{modelValue:{default:10},modelModifiers:{}},emits:["update:modelValue"],setup(i){const t=st(i,"modelValue"),s=[{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(l,u)=>{const d=Pt;return o(),k(d,{modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=c=>t.value=c),items:s,"value-key":"value",class:"w-25"},null,8,["modelValue"])}}}),ce=B({__name:"ScrollableChart",props:{contentHeight:{},maxHeightVh:{default:60},paddingClass:{default:"px-3 py-2"}},setup(i){const t=i,s=y(()=>typeof window>"u"?500:Math.round(window.innerHeight*t.maxHeightVh/100)),l=y(()=>t.contentHeight>s.value),u=y(()=>({maxHeight:`${t.maxHeightVh}vh`,overflowY:l.value?"auto":"hidden"}));return(d,c)=>(o(),C("div",{class:W(i.paddingClass),style:he(u.value)},[ne(d.$slots,"default")],6))}}),Xe=Symbol("ranking-width-mode"),Je={standard:{contentClass:"max-w-3xl",gridLeft:110,labelMaxLength:8},wide:{contentClass:"max-w-5xl",gridLeft:180,labelMaxLength:16},full:{contentClass:"max-w-none",gridLeft:260,labelMaxLength:28}};function me(){const i=ot(Xe,null);return y(()=>Je[i?.value??"standard"])}function ve(i,t){return i.length<=t?i:`${i.slice(0,t)}…`}const oa={class:"px-3 py-2"},Te=B({__name:"EChartRank",props:{members:{},title:{},description:{},topN:{default:10},unit:{default:"条"},height:{default:"auto"},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(i){const t=i,s=me(),l=y(()=>t.members.slice(0,t.topN)),u=y(()=>{if(t.height!=="auto")return t.height;const p=l.value.length*36;return Math.max(p+30,180)}),d={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]},c=y(()=>{const p=[...l.value].reverse(),m=p.map(n=>ve(n.name,s.value.labelMaxLength)),b=p.map(n=>n.value),h=Math.max(...b,1),r=p.map(n=>({value:n.value,itemStyle:{color:d,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:n=>{const v=n[0];if(!v)return"";const w=l.value.length-1-v.dataIndex,g=l.value[w];return`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GroupRelationshipGalaxyView-BXQBX0zJ.js","assets/index-sWxuTsa7.js","assets/vendor-snapdom--nZvo8Sg.js","assets/index-DrCc8p_I.css","assets/LoadingState.vue_vue_type_script_setup_true_lang-CwgpqtMZ.js","assets/RelationshipGalaxyThreeCanvas-BJyuRiC-.js","assets/relationship-galaxy-connections-Cg4G5yYE.js","assets/relationship-galaxy-viewport-Cwfa51ER.js","assets/RelationshipGalaxyThreeCanvas-CCasBcBQ.css","assets/MessageExportModal-DU71grc7.js","assets/useToast-BA0EwImD.js","assets/Tabs-N3Q-Mpqi.js","assets/Tabs-D1UiZNaZ.js","assets/RovingFocusItem-DC_06OmN.js"])))=>i.map(i=>d[i]);
2
+ import{r as S,x as De,y as He,a as U,o,h as C,n as K,i as a,F as H,j as G,p as f,b as ne,Z as st,c as k,am as he,f as y,E as ot,e,w as I,z as x,a3 as X,l as A,a7 as $e,a5 as be,a6 as J,a4 as xe,I as Ne,J as E,K as Z,br as Pe,bs as Ee,cE as lt,ap as Oe,aO as Fe,aP as qe,cF as nt,$ as it,H as Ke,ag as rt,C as Me,bN as ut,aD as We,cG as dt,ae as je,aC as ct,ax as mt,ao as vt,a8 as pt,az as gt,bd as Ue}from"./index-sWxuTsa7.js";import{b as O,a as ie,c as ht,d as Be,e as ft,u as yt,f as Ge,I as bt,g as xt,h as kt,i as wt,j as _t,k as $t,C as Tt,l as Ct,L as It,D as St,m as Rt,n as Vt,o as Mt,M as Lt}from"./ActionToolsPanel.vue_vue_type_script_setup_true_lang-w0hHEodr.js";import{_ as Ye}from"./SectionTabs.vue_vue_type_script_setup_true_lang-C-Zj2biH.js";import"./vendor-echarts-wordcloud-B8CF_NgP.js";import{g as Dt,_ as Nt}from"./EChartBar.vue_vue_type_script_setup_true_lang-C3pZmq0v.js";import{_ as oe,u as At,L as Ft}from"./LoadingState.vue_vue_type_script_setup_true_lang-CwgpqtMZ.js";import{a as qt}from"./index-D64XYYts.js";import{f as Le,a as Ut,b as Bt}from"./TimeSelect.vue_vue_type_script_setup_true_lang-Ccunouyf.js";import{_ as zt}from"./Switch-CokhQWxm.js";import{a as Je}from"./Tabs-D1UiZNaZ.js";import{u as Ht}from"./prompt-BPYj29Vq.js";import{_ as Pt}from"./Select-DLK2LYhO.js";import{_ as te}from"./EChart.vue_vue_type_script_setup_true_lang-YeqmodwE.js";import{T as re}from"./Tabs-N3Q-Mpqi.js";import{_ as Et}from"./ThemeCard.vue_vue_type_script_setup_true_lang-OT-I0mbU.js";import{u as Ot,p as Kt,j as Wt,t as jt,v as Gt,i as Yt,k as Jt}from"./vendor-echarts-hTLhTs52.js";import{_ as Qt}from"./useTable-Bv3R_Hux.js";import"./vendor-snapdom--nZvo8Sg.js";import"./Checkbox-Ci7IeRw1.js";import"./useFormControl-DVawP2DO.js";import"./VisuallyHiddenInput-OAJEt_Y5.js";import"./RovingFocusItem-DC_06OmN.js";import"./Label-CFAZFBQX.js";import"./useToast-BA0EwImD.js";import"./service-D29Vftq9.js";import"./aiChat-CdADfRnU.js";import"./chatlabSiteLocale-CrCNb8QP.js";import"./ChatRecordWorkspace-CyfPIlIy.js";import"./DatePicker.vue_vue_type_script_setup_true_lang-DqNBNa1D.js";import"./clamp-jFYhBC76.js";import"./EChartLine.vue_vue_type_script_setup_true_lang-Co6olfwv.js";import"./semantic-index-config-builder-vO37z355.js";import"./PageHeader-BDPf4NuI.js";import"./PageTabs.vue_vue_type_script_setup_true_lang-_j82asQU.js";import"./Alert-_MYcI_E2.js";import"./vendor-zrender-D8psf1AA.js";function Zt(i,t={}){const{threshold:s=300,containerSelector:l=".overflow-y-auto",scrollLockDuration:u=800}=t,d=S(i[0]?.id||"");let c=!1;const p=S(null);let m=null;function b(){if(c)return;const r=[];i.forEach(v=>{const w=document.getElementById(v.id);if(w){const g=w.getBoundingClientRect();r.push({id:v.id,top:Math.round(g.top)})}});let n=0;for(let v=0;v<r.length;v++){if(r[v].top>s){n=Math.max(0,v-1);break}n=v}d.value=i[n]?.id||""}function h(r){const n=document.getElementById(r);n&&(d.value=r,c=!0,n.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{c=!1,b()},u))}return De(()=>{m=p.value?.closest(l)||null,m&&(m.addEventListener("scroll",b,{passive:!0}),b())}),He(()=>{m&&m.removeEventListener("scroll",b)}),{contentRef:p,activeAnchor:d,scrollToAnchor:h,updateActiveAnchor:b}}function fe(i){return i===0?"text-amber-500 dark:text-amber-400":i===1?"text-gray-500 dark:text-gray-300":i===2?"text-orange-600 dark:text-orange-400":"text-gray-400 dark:text-gray-500"}function ye(i){return String(i+1).padStart(2,"0")}function Xt(i){return i===0?"from-amber-400 to-orange-500":i===1?"from-gray-300 to-gray-400":i===2?"from-orange-400 to-amber-600":"from-primary-300 to-primary-500"}const ea={class:"sticky top-24 space-y-6"},ta={class:"border-l border-gray-200 dark:border-gray-800"},aa=["onClick"],sa=U({__name:"PageAnchorsNav",props:{anchors:{},activeAnchor:{},width:{default:"w-44"},hideOnMobile:{type:Boolean,default:!0}},emits:["click"],setup(i,{emit:t}){const s=t;function l(u){s("click",u)}return(u,d)=>(o(),C("div",{class:K([i.width,"shrink-0",i.hideOnMobile?"hidden lg:block":""])},[a("div",ea,[a("nav",null,[a("div",ta,[(o(!0),C(H,null,G(i.anchors,c=>(o(),C("button",{key:c.id,class:K(["-ml-px block border-l-2 py-1.5 pl-4 text-left text-sm transition-colors",[i.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:p=>l(c.id)},f(c.label),11,aa))),128))])]),ne(u.$slots,"default")])],2))}}),ue=U({__name:"TopNSelect",props:{modelValue:{default:10},modelModifiers:{}},emits:["update:modelValue"],setup(i){const t=st(i,"modelValue"),s=[{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(l,u)=>{const d=Pt;return o(),k(d,{modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=c=>t.value=c),items:s,"value-key":"value",class:"w-25"},null,8,["modelValue"])}}}),ce=U({__name:"ScrollableChart",props:{contentHeight:{},maxHeightVh:{default:60},paddingClass:{default:"px-3 py-2"}},setup(i){const t=i,s=y(()=>typeof window>"u"?500:Math.round(window.innerHeight*t.maxHeightVh/100)),l=y(()=>t.contentHeight>s.value),u=y(()=>({maxHeight:`${t.maxHeightVh}vh`,overflowY:l.value?"auto":"hidden"}));return(d,c)=>(o(),C("div",{class:K(i.paddingClass),style:he(u.value)},[ne(d.$slots,"default")],6))}}),Qe=Symbol("ranking-width-mode"),Ze={standard:{contentClass:"max-w-3xl",gridLeft:110,labelMaxLength:8},wide:{contentClass:"max-w-5xl",gridLeft:180,labelMaxLength:16},full:{contentClass:"max-w-none",gridLeft:260,labelMaxLength:28}};function me(){const i=ot(Qe,null);return y(()=>Ze[i?.value??"standard"])}function ve(i,t){return i.length<=t?i:`${i.slice(0,t)}…`}const oa={class:"px-3 py-2"},Te=U({__name:"EChartRank",props:{members:{},title:{},description:{},topN:{default:10},unit:{default:"条"},height:{default:"auto"},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(i){const t=i,s=me(),l=y(()=>t.members.slice(0,t.topN)),u=y(()=>{if(t.height!=="auto")return t.height;const p=l.value.length*36;return Math.max(p+30,180)}),d={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]},c=y(()=>{const p=[...l.value].reverse(),m=p.map(n=>ve(n.name,s.value.labelMaxLength)),b=p.map(n=>n.value),h=Math.max(...b,1),r=p.map(n=>({value:n.value,itemStyle:{color:d,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:n=>{const v=n[0];if(!v)return"";const w=l.value.length-1-v.dataIndex,g=l.value[w];return`
3
3
  <div style="padding: 4px 8px;">
4
4
  <div style="font-weight: bold; margin-bottom: 4px;">${g.name}</div>
5
5
  <div>${g.value} ${t.unit} (${g.percentage}%)</div>
6
6
  </div>
7
- `}},grid:{left:s.value.gridLeft,right:70,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:h*1.1,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:m,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(n,v)=>{const g=l.value.length-1-v+1;return`${g===1?"🥇":g===2?"🥈":g===3?"🥉":`${g}.`} ${n}`}}},series:[{type:"bar",data:r,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:n=>{const v=l.value.length-1-n.dataIndex;return`${l.value[v].value} ${t.unit}`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(238, 69, 103, 0.3)"}}}]}});return(p,m)=>i.bare?(o(),k(e(ce),{key:0,"content-height":u.value,"max-height-vh":i.maxHeightVh},{default:I(()=>[x(te,{option:c.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),k(e(O),{key:1,title:i.title,description:i.description,scrollable:"","max-height-vh":i.maxHeightVh},{default:I(()=>[a("div",oa,[x(te,{option:c.value,height:u.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),la={key:0,class:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-linear-to-br from-pink-100 to-rose-100 text-sm font-medium text-pink-600 dark:from-pink-900/30 dark:to-rose-900/30 dark:text-pink-400"},na={class:"min-w-0 flex-1"},ia={class:"flex items-baseline justify-between gap-3"},ra=["title"],ua={class:"flex shrink-0 items-baseline gap-1.5 whitespace-nowrap"},da={class:"font-mono text-base font-black tabular-nums text-gray-900 dark:text-white"},ca={class:"text-xs text-gray-500 dark:text-gray-400"},ma={class:"mt-2 flex items-center gap-2.5"},va={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"},ze=B({__name:"RankList",props:{members:{},showAvatar:{type:Boolean,default:!1},rankLimit:{default:0},unit:{}},setup(i){const{t}=Z(),s=i,l=y(()=>s.unit||t("views.charts.rankList.unit")),u=y(()=>s.rankLimit>0?s.members.slice(0,s.rankLimit):s.members);function d(c){if(u.value.length===0)return 0;const p=u.value[0].value;return p===0?0:Math.round(u.value[c].value/p*100)}return(c,p)=>(o(),C("div",null,[(o(!0),C(H,null,Y(u.value,(m,b)=>(o(),C("div",{key:m.id,class:"flex items-start gap-3 px-5 py-3.5 transition-colors hover:bg-gray-50/70 dark:hover:bg-white/5"},[a("span",{class:W(["w-8 shrink-0 pt-0.5 text-center font-mono text-sm font-black tabular-nums",e(fe)(b)])},f(e(ye)(b)),3),i.showAvatar?(o(),C("div",la,f(m.name.slice(0,1)),1)):A("",!0),a("div",na,[a("div",ia,[a("p",{class:"truncate text-sm font-medium text-gray-900 dark:text-white",title:m.name},f(m.name),9,ra),a("div",ua,[a("span",da,f(m.value),1),a("span",ca,f(l.value),1)])]),a("div",ma,[a("div",va,[a("div",{class:W(["h-full rounded-full bg-linear-to-r transition-all",e(Zt)(b)]),style:he({width:`${d(b)}%`})},null,6)]),a("span",pa,f(m.percentage)+"% ",1)])])]))),128))]))}}),ga={class:"flex items-center gap-2"},ha={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"},fa={class:"no-capture"},ya={key:0,class:"no-capture px-3 pb-3 pt-1"},ba={class:"flex items-center gap-1.5"},xa={class:"flex w-full items-center justify-between border-b border-gray-100 px-6 py-5 dark:border-white/5"},ka={class:"min-w-0"},wa={class:"truncate text-base font-semibold text-gray-900 dark:text-white"},_a={class:"mt-1 text-xs text-gray-500 dark:text-gray-400"},$a={class:"max-h-[70vh] overflow-y-auto"},Ze=B({__name:"ExpandableListCard",props:{title:{},description:{},showViewAll:{type:Boolean},viewAllLabel:{},countLabel:{}},setup(i){const t=S(!1),s=S(null);return(l,u)=>{const d=xe,c=be,p=$e;return o(),k(e(O),{title:i.title,description:i.description,"show-divider":!1},{headerRight:I(()=>[a("div",ga,[a("span",ha,f(i.countLabel),1),a("div",fa,[ne(l.$slots,"headerRight")])])]),default:I(()=>[a("div",null,[ne(l.$slots,"default")]),i.showViewAll?(o(),C("div",ya,[x(p,{open:t.value,"onUpdate:open":u[0]||(u[0]=m=>t.value=m),ui:{content:"md:w-full max-w-4xl"}},{content:I(()=>[a("div",{ref_key:"modalBodyRef",ref:s,class:"section-content flex flex-col overflow-hidden"},[a("div",xa,[a("div",ka,[a("h3",wa,f(i.title),1),a("p",_a,f(i.countLabel),1)]),x(Ft,{size:"xs",type:"element","target-element":s.value},null,8,["target-element"])]),a("div",$a,[ne(l.$slots,"full")])],512)]),default:I(()=>[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:I(()=>[a("span",ba,[Q(f(i.viewAllLabel)+" ",1),x(d,{name:"i-heroicons-arrow-right",class:"h-3.5 w-3.5"})])]),_:1})]),_:3},8,["open"])])):A("",!0)]),_:3},8,["title","description"])}}}),Ta=B({__name:"RankListPro",props:{members:{},title:{},description:{},topN:{default:10},unit:{}},setup(i){const{t}=Z(),s=i,l=y(()=>s.members.slice(0,s.topN)),u=y(()=>s.members.length>s.topN);return(d,c)=>(o(),k(Ze,{title:i.title,description:i.description,"show-view-all":u.value,"view-all-label":e(t)("views.charts.rankListPro.fullRanking"),"count-label":e(t)("views.charts.rankListPro.memberCount",{count:i.members.length})},{headerRight:I(()=>[ne(d.$slots,"headerRight")]),full:I(()=>[x(ze,{members:i.members,unit:i.unit},null,8,["members","unit"])]),default:I(()=>[x(ze,{members:l.value,unit:i.unit},null,8,["members","unit"])]),_:3},8,["title","description","show-view-all","view-all-label","count-label"]))}}),Ca={key:0},Ia={class:"px-5 py-8 text-center text-sm text-gray-400"},_e=B({__name:"ListPro",props:{items:{},title:{},description:{},topN:{default:10},countLabel:{}},setup(i){const{t}=Z(),s=i,l=y(()=>s.items.slice(0,s.topN)),u=y(()=>s.items.length>s.topN),d=y(()=>s.countLabel?s.countLabel:t("views.charts.listPro.countTemplate",{count:s.items.length}));return(c,p)=>(o(),k(Ze,{title:i.title,description:i.description,"show-view-all":u.value,"view-all-label":e(t)("views.charts.listPro.fullRanking"),"count-label":d.value},{headerRight:I(()=>[ne(c.$slots,"headerRight")]),full:I(()=>[a("div",null,[(o(!0),C(H,null,Y(i.items,(m,b)=>(o(),C("div",{key:b,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:b})]))),128))])]),default:I(()=>[ne(c.$slots,"config"),a("div",null,[(o(!0),C(H,null,Y(l.value,(m,b)=>(o(),C("div",{key:b,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:b})]))),128))]),i.items.length===0?(o(),C("div",Ca,[ne(c.$slots,"empty",{},()=>[a("div",Ia,f(e(t)("views.charts.listPro.empty")),1)])])):A("",!0)]),_:3},8,["title","description","show-view-all","view-all-label","count-label"]))}});function Sa(i,t){return{keywords:[i],...t?.memberId!=null?{memberId:t.memberId}:{}}}const Ra={class:"main-content mx-auto max-w-3xl p-6"},Va=["aria-label","onClick"],Ma=["title"],La={class:"flex shrink-0 items-center gap-3 pl-2"},Da={class:"font-mono text-sm font-black tabular-nums text-primary-600 dark:text-primary-400"},Na={class:"grid w-full grid-cols-[2rem_minmax(0,1fr)] items-start gap-x-3 sm:grid-cols-[2rem_minmax(7.5rem,0.65fr)_minmax(0,1.35fr)]"},Aa=["title"],qa={class:"col-start-2 row-start-2 mt-1.5 flex min-w-0 flex-wrap items-center gap-x-4 gap-y-1.5 sm:col-start-3 sm:row-start-1 sm:mt-0"},Fa=["title","aria-label","onClick"],Ba={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"},Ua={class:"shrink-0 font-mono text-[11px] tabular-nums text-gray-400 dark:text-gray-500"},za=B({__name:"CatchphraseTab",props:{sessionId:{},timeFilter:{}},setup(i){const{t}=Z(),s=Ne(),l=i,u=S(null),d=S(!1),c=y(()=>u.value?.members??[]),p=y(()=>l.timeFilter?.memberId!=null),m=y(()=>p.value?c.value[0]??null:null),b=y(()=>m.value?t("quotes.catchphrase.memberTitle",{name:m.value.name}):t("quotes.catchphrase.title")),h=y(()=>p.value?t("quotes.catchphrase.memberDescription"):t("quotes.catchphrase.description"));async function r(){if(l.sessionId){d.value=!0;try{u.value=await J().getCatchphraseAnalysis(l.sessionId,l.timeFilter)}catch(w){console.error("Failed to load catchphrase analysis:",w)}finally{d.value=!1}}}function n(w){s.openChatRecordDrawer(Sa(w,l.timeFilter))}function v(w){return w.catchphrases.slice(0,5)}return E(()=>[l.sessionId,l.timeFilter],()=>{r()},{immediate:!0,deep:!0}),(w,g)=>{const _=xe;return o(),C("div",Ra,[d.value?(o(),k(e(oe),{key:0,text:e(t)("quotes.catchphrase.loading")},null,8,["text"])):m.value?(o(),k(e(_e),{key:1,items:m.value.catchphrases,title:b.value,description:h.value,"top-n":10,"count-label":e(t)("quotes.catchphrase.phraseCount",{count:m.value.catchphrases.length})},{item:I(({item:R,index:$})=>[a("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":`${e(t)("quotes.catchphrase.viewChat")}: ${R.content}`,onClick:V=>n(R.content)},[a("span",{class:W(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",e(fe)($)])},f(e(ye)($)),3),a("p",{class:"line-clamp-2 min-w-0 text-sm font-medium leading-5 text-gray-900 dark:text-white",title:R.content},f(R.content),9,Ma),a("div",La,[a("span",Da,f(e(t)("quotes.catchphrase.times",{count:R.count})),1),x(_,{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,Va)]),_:1},8,["items","title","description","count-label"])):c.value.length>0?(o(),k(e(_e),{key:2,items:c.value,title:b.value,description:h.value,"top-n":10,"count-label":e(t)("quotes.catchphrase.memberCount",{count:c.value.length})},{item:I(({item:R,index:$})=>[a("div",Na,[a("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",e(fe)($)])},f(e(ye)($)),3),a("p",{class:"col-start-2 row-start-1 min-w-0 truncate pt-0.5 text-sm font-semibold text-gray-900 dark:text-white",title:R.name},f(R.name),9,Aa),a("div",qa,[(o(!0),C(H,null,Y(v(R),V=>(o(),C("button",{key:V.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:V.content,"aria-label":`${e(t)("quotes.catchphrase.viewChat")}: ${V.content}`,onClick:z=>n(V.content)},[a("span",Ba," “"+f(V.content)+"” ",1),a("span",Ua,f(e(t)("quotes.catchphrase.times",{count:V.count})),1)],8,Fa))),128))])])]),_:1},8,["items","title","description","count-label"])):(o(),k(e(O),{key:3,title:b.value,description:h.value,"show-divider":!1},{default:I(()=>[x(e(ie),{text:e(t)("quotes.catchphrase.empty.title")},null,8,["text"])]),_:1},8,["title","description"]))])}}}),Ha={class:"main-content mx-auto max-w-3xl p-6"},Pa=["aria-label","onClick"],Ea={class:"min-w-0"},Oa=["title"],Wa={class:"mt-1 flex min-w-0 items-center gap-1.5 text-xs text-gray-400 dark:text-gray-500"},Ka={class:"truncate"},ja={class:"shrink-0"},Ya={class:"flex shrink-0 items-center gap-3 pl-2"},Ga={class:"text-right"},Qa={class:"font-mono text-sm font-black tabular-nums text-primary-600 dark:text-primary-400"},Xa={class:"mt-0.5 text-[11px] text-gray-400 dark:text-gray-500"},Ja=B({__name:"HotRepeatTab",props:{sessionId:{},timeFilter:{}},setup(i){const{t}=Z(),s=i,l=Ne(),u=S(null),d=S(!1);async function c(){if(s.sessionId){d.value=!0;try{u.value=await J().getRepeatAnalysis(s.sessionId,s.timeFilter)}catch(m){console.error("Failed to load repeat analysis:",m)}finally{d.value=!1}}}function p(m){l.openChatRecordDrawer({scrollToMessageId:m.firstMessageId,highlightKeywords:[m.content]})}return E(()=>[s.sessionId,s.timeFilter],()=>{c()},{immediate:!0,deep:!0}),(m,b)=>{const h=xe;return o(),C("div",Ha,[d.value?(o(),k(e(oe),{key:0,text:e(t)("quotes.hotRepeat.loading")},null,8,["text"])):u.value&&u.value.hotContents.length>0?(o(),k(e(_e),{key:1,items:u.value.hotContents,title:e(t)("quotes.hotRepeat.title"),description:e(t)("quotes.hotRepeat.description"),"top-n":10,"count-label":e(t)("quotes.hotRepeat.countTemplate",{count:u.value.hotContents.length})},{item:I(({item:r,index:n})=>[a("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":`${e(t)("quotes.hotRepeat.viewChat")}: ${r.content}`,onClick:v=>p(r)},[a("span",{class:W(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",e(fe)(n)])},f(e(ye)(n)),3),a("div",Ea,[a("p",{class:"line-clamp-2 text-sm font-medium leading-5 text-gray-900 dark:text-white",title:r.content},f(r.content),9,Oa),a("div",Wa,[a("span",Ka,f(r.originatorName),1),b[0]||(b[0]=a("span",{"aria-hidden":"true"},"·",-1)),a("span",ja,f(e(Le)(r.lastTs)),1)])]),a("div",Ya,[a("div",Ga,[a("p",Qa,f(e(t)("quotes.hotRepeat.people",{count:r.maxChainLength})),1),a("p",Xa,f(e(t)("quotes.hotRepeat.times",{count:r.count})),1)]),x(h,{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,Pa)]),_:1},8,["items","title","description","count-label"])):(o(),k(e(O),{key:2,title:e(t)("quotes.hotRepeat.title")},{default:I(()=>[x(e(ie),{text:e(t)("quotes.hotRepeat.empty")},null,8,["text"])]),_:1},8,["title"]))])}}}),Za={class:"main-content mx-auto max-w-[920px] space-y-4 p-4 sm:space-y-6 sm:p-6"},es={class:"grid grid-cols-1 gap-6 lg:grid-cols-2"},ts={class:"p-3 sm:p-5"},as={class:"p-3 sm:p-5"},ss=B({__name:"GroupChatOverview",props:{session:{},memberActivity:{},messageTypes:{},hourlyActivity:{},dailyActivity:{},timeRange:{},filteredMessageCount:{},filteredMemberCount:{},timeFilter:{}},setup(i){const{t}=Z(),s=i,{dailyChartData:l}=yt(()=>s.dailyActivity),u=y(()=>({labels:s.messageTypes.map(c=>Dt(c.type,t)),values:s.messageTypes.map(c=>c.count)})),d=y(()=>{const c=[...s.memberActivity].sort((r,n)=>n.messageCount-r.messageCount),p=c.slice(0,10),m=c.slice(10).reduce((r,n)=>r+n.messageCount,0),b=p.map(r=>r.name),h=p.map(r=>r.messageCount);return m>0&&(b.push(t("analysis.overview.others")),h.push(m)),{labels:b,values:h}});return(c,p)=>(o(),C("div",Za,[x(ht,{session:i.session,"daily-activity":i.dailyActivity,"message-types":i.messageTypes,"hourly-activity":i.hourlyActivity,"time-range":i.timeRange,"filtered-message-count":i.filteredMessageCount,"filtered-member-count":i.filteredMemberCount,"time-filter":i.timeFilter},null,8,["session","daily-activity","message-types","hourly-activity","time-range","filtered-message-count","filtered-member-count","time-filter"]),a("div",es,[x(e(O),{title:e(t)("analysis.overview.messageTypeDistribution"),"show-divider":!1},{default:I(()=>[a("div",ts,[x(e(Ue),{data:u.value,height:280},null,8,["data"])])]),_:1},8,["title"]),x(e(O),{title:e(t)("analysis.overview.memberDistribution"),"show-divider":!1},{default:I(()=>[a("div",as,[x(e(Ue),{data:d.value,height:280},null,8,["data"])])]),_:1},8,["title"])]),x(ft,{"daily-activity":i.dailyActivity,"daily-chart-data":e(l)},null,8,["daily-activity","daily-chart-data"])]))}}),os={class:"flex h-full flex-col"},ls={class:"min-h-0 flex-1 overflow-y-auto"},ns=B({__name:"GroupChatInsights",props:{sessionId:{},session:{},memberActivity:{},messageTypes:{},hourlyActivity:{},dailyActivity:{},timeRange:{},filteredMessageCount:{},filteredMemberCount:{},timeFilter:{}},setup(i){const t=Pe(()=>Ee(()=>import("./GroupRelationshipGalaxyView-DEUIrvgz.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))),{t:s}=Z(),l=i,u=y(()=>[{id:"overview",label:s("analysis.tabs.overview"),icon:"i-heroicons-squares-2x2"},{id:"type-analysis",label:s("analysis.subTabs.insights.typeAnalysis"),icon:"i-heroicons-chart-pie"},{id:"time-analysis",label:s("analysis.subTabs.insights.timeAnalysis"),icon:"i-heroicons-clock"},{id:"topic",label:s("analysis.subTabs.insights.topic"),icon:"i-heroicons-cloud"},{id:"relationship",label:s("analysis.subTabs.insights.relationship"),icon:"i-heroicons-heart"}]),d=S("overview"),c=S(null),p=y(()=>({...l.timeFilter,memberId:c.value}));return(m,b)=>(o(),C("div",os,[x(e(Ge),{modelValue:d.value,"onUpdate:modelValue":b[1]||(b[1]=h=>d.value=h),items:u.value,"persist-key":"groupInsightsTab"},{right:I(()=>[d.value==="type-analysis"||d.value==="time-analysis"?(o(),k(Ye,{key:0,modelValue:c.value,"onUpdate:modelValue":b[0]||(b[0]=h=>c.value=h),"session-id":l.sessionId},null,8,["modelValue","session-id"])):A("",!0)]),_:1},8,["modelValue","items"]),a("div",ls,[x(e(bt),{"active-key":d.value},{default:I(({viewKey:h})=>[h==="overview"?(o(),k(ss,{key:0,session:l.session,"member-activity":l.memberActivity,"message-types":l.messageTypes,"hourly-activity":l.hourlyActivity,"daily-activity":l.dailyActivity,"time-range":l.timeRange,"filtered-message-count":l.filteredMessageCount,"filtered-member-count":l.filteredMemberCount,"time-filter":l.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"?(o(),k(xt,{key:1,"session-id":l.sessionId,"session-name":l.session.name,"time-filter":p.value},null,8,["session-id","session-name","time-filter"])):h==="time-analysis"?(o(),k(kt,{key:2,"session-id":l.sessionId,"session-name":l.session.name,"time-filter":p.value},null,8,["session-id","session-name","time-filter"])):h==="topic"?(o(),k(e(wt),{key:3,"session-id":l.sessionId,"time-filter":l.timeFilter},null,8,["session-id","time-filter"])):h==="relationship"?(o(),k(e(t),{key:4,"session-id":l.sessionId,"time-filter":l.timeFilter},null,8,["session-id","time-filter"])):A("",!0)]),_:1},8,["active-key"])])]))}}),is={class:"border-b border-gray-100 p-4 dark:border-gray-800"},rs={class:"mb-3 flex flex-wrap items-center gap-2"},us={class:"text-xs text-gray-500 dark:text-gray-400"},ds=["onClick"],cs={class:"p-4"},ms={class:"mb-3 font-semibold text-gray-900 dark:text-white"},vs={class:"space-y-3"},ps={class:"mb-1 block text-xs text-gray-500"},gs={class:"mb-1 block text-xs text-gray-500"},hs={class:"flex flex-wrap items-center gap-2"},fs={class:"mt-4 flex justify-end gap-2"},ys={class:"flex flex-wrap items-center gap-2"},bs={class:"mt-1.5 text-xs text-gray-400"},xs={key:0,class:"border-b border-gray-100 px-5 py-4 dark:border-gray-800"},ks={class:"mb-3 flex items-center justify-between"},ws={class:"text-base font-medium text-gray-700 dark:text-gray-300"},_s={class:"flex cursor-pointer items-center gap-1.5 text-xs text-gray-500"},$s={class:"flex flex-wrap gap-2"},Ts={class:"text-xs text-gray-500"},Cs={class:"flex items-center gap-3"},Is={class:"w-32 shrink-0"},Ss={class:"truncate font-medium text-gray-900 dark:text-white"},Rs={class:"flex flex-1 items-center"},Vs={class:"flex h-2 w-full overflow-hidden rounded-full bg-gray-100 dark:bg-white/5"},Ms=["title"],Ls={class:"flex shrink-0 items-baseline gap-2"},Ds={class:"font-mono text-base font-black tabular-nums text-gray-900 dark:text-white"},Ns={class:"text-xs text-gray-500"},As={key:0,class:"flex h-64 flex-col items-center justify-center text-gray-400"},qs={class:"text-sm"},Fs={key:1,class:"h-64"},Bs=B({__name:"KeywordRankingTab",props:{sessionId:{},timeFilter:{}},setup(i){const{t}=Z(),s=i,l=Ht(),u=S(!1),d={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 p(T){if(!u.value)return d;const q=n.value.indexOf(T);if(q>=0)return c[q%c.length];let se=0;for(let le=0;le<T.length;le++)se=se*31+T.charCodeAt(le)>>>0;return c[se%c.length]}const m=["laugh","sad","praise","slacker","gossip","polite","curious"],b=y(()=>[{id:"laugh",name:t("quotes.keywords.templates.laugh.name"),keywords:t("quotes.keywords.templates.laugh.keywords").split(","),description:t("quotes.keywords.templates.laugh.description")},{id:"sad",name:t("quotes.keywords.templates.sad.name"),keywords:t("quotes.keywords.templates.sad.keywords").split(","),description:t("quotes.keywords.templates.sad.description")},{id:"praise",name:t("quotes.keywords.templates.praise.name"),keywords:t("quotes.keywords.templates.praise.keywords").split(","),description:t("quotes.keywords.templates.praise.description")},{id:"slacker",name:t("quotes.keywords.templates.slacker.name"),keywords:t("quotes.keywords.templates.slacker.keywords").split(","),description:t("quotes.keywords.templates.slacker.description")},{id:"gossip",name:t("quotes.keywords.templates.gossip.name"),keywords:t("quotes.keywords.templates.gossip.keywords").split(","),description:t("quotes.keywords.templates.gossip.description")},{id:"polite",name:t("quotes.keywords.templates.polite.name"),keywords:t("quotes.keywords.templates.polite.keywords").split(","),description:t("quotes.keywords.templates.polite.description")},{id:"curious",name:t("quotes.keywords.templates.curious.name"),keywords:t("quotes.keywords.templates.curious.keywords").split(","),description:t("quotes.keywords.templates.curious.description")}]),h=y(()=>{const T=l.customKeywordTemplates.map(se=>({...se,isCustom:!0}));return[...b.value.filter(se=>!l.deletedPresetTemplateIds.includes(se.id)),...T]}),r=S("laugh"),n=S([]);E(b,T=>{T.length>0&&n.value.length===0&&(n.value=[...T[0].keywords])},{immediate:!0});const v=y(()=>{const T=h.value.find(q=>q.id===r.value);return T?T.name:""}),w=S(null),g=S(!1);let _=0;const R=S(!1),$=S(null),V=S(""),z=S([]),ae=S(""),D=y(()=>$.value!==null),F=y(()=>D.value?t("quotes.keywords.modal.editTitle"):t("quotes.keywords.modal.createTitle"));function P(){$.value=null,V.value="",z.value=[],ae.value="",R.value=!0}function ee(T){$.value=T.id,V.value=T.name,z.value=[...T.keywords],R.value=!0}function G(){const T=ae.value.trim();T&&!z.value.includes(T)&&(z.value=[...z.value,T]),ae.value=""}function K(T){z.value=z.value.filter(q=>q!==T)}function N(T){r.value=T.id,n.value=[...T.keywords],w.value=null,X()}function U(){_++,n.value=[],w.value=null,g.value=!1,r.value=""}const j=S("");function pe(){const T=j.value.trim();T&&!n.value.includes(T)&&(n.value=[...n.value,T],X()),j.value=""}function ke(T){n.value=n.value.filter(q=>q!==T),X()}function we(T){return m.includes(T)}function Ce(){if(V.value.trim()){if(D.value&&$.value)if(we($.value)){const T={id:`custom_${Date.now()}`,name:V.value.trim(),keywords:[...z.value]};l.addCustomKeywordTemplate(T),r.value=T.id,n.value=[...T.keywords],X()}else l.updateCustomKeywordTemplate($.value,{name:V.value.trim(),keywords:[...z.value]}),r.value===$.value&&(n.value=[...z.value],X());else{const T={id:`custom_${Date.now()}`,name:V.value.trim(),keywords:[...z.value]};l.addCustomKeywordTemplate(T),r.value=T.id,n.value=[...T.keywords],X()}R.value=!1}}function Ie(T){we(T)?l.addDeletedPresetTemplateId(T):l.removeCustomKeywordTemplate(T),r.value===T&&(h.value.length>0?N(h.value[0]):U())}async function X(){const T=++_;if(!s.sessionId||n.value.length===0){w.value=null,g.value=!1;return}g.value=!0;try{const q=await J().getLaughAnalysis(s.sessionId,s.timeFilter,[...n.value]);if(T!==_)return;w.value=q}catch(q){if(T!==_)return;console.error("Failed to load keyword ranking:",q),w.value=null}finally{T===_&&(g.value=!1)}}const M=y(()=>w.value?w.value.rankByCount.map(T=>({id:T.memberId.toString(),name:T.name,value:T.laughCount,percentage:T.percentage,keywordDistribution:T.keywordDistribution||[]})):[]);function Se(T){if(M.value.length===0)return 0;const q=M.value[0].value;return q===0?0:Math.round(M.value[T].value/q*100)}function Re(T,q){const se=Se(q);return!T.keywordDistribution||T.keywordDistribution.length===0?[{keyword:"default",width:se,bg:"bg-amber-400"}]:T.keywordDistribution.map(le=>({keyword:le.keyword,width:le.percentage/100*se,bg:p(le.keyword).bg}))}return E(()=>[s.sessionId,s.timeFilter],()=>{X()},{immediate:!0,deep:!0}),(T,q)=>{const se=lt,le=Oe,Ve=Qe,Ae=be,et=$e,tt=zt,at=xe;return o(),k(e(_e),{items:M.value,title:e(t)("quotes.keywords.title"),description:e(t)("quotes.keywords.description"),"top-n":10,"count-label":e(t)("quotes.keywords.countTemplate",{count:M.value.length})},{config:I(()=>[a("div",is,[a("div",rs,[a("span",us,f(e(t)("quotes.keywords.templateLabel")),1),(o(!0),C(H,null,Y(h.value,L=>(o(),k(se,{key:L.id,items:[[{label:e(t)("quotes.keywords.contextMenu.edit"),icon:"i-lucide-pencil",disabled:!L.isCustom,onSelect:()=>ee(L)},{label:e(t)("quotes.keywords.contextMenu.delete"),icon:"i-lucide-trash",color:"error",onSelect:()=>Ie(L.id)}]]},{default:I(()=>[a("button",{class:W(["rounded-md border px-2.5 py-1 text-sm transition-all",r.value===L.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:de=>N(L)},f(L.name),11,ds)]),_:2},1032,["items"]))),128)),x(et,{open:R.value,"onUpdate:open":q[3]||(q[3]=L=>R.value=L)},{content:I(()=>[a("div",cs,[a("h3",ms,f(F.value),1),a("div",vs,[a("div",null,[a("label",ps,f(e(t)("quotes.keywords.modal.templateName")),1),x(le,{modelValue:V.value,"onUpdate:modelValue":q[0]||(q[0]=L=>V.value=L),placeholder:e(t)("quotes.keywords.modal.templateNamePlaceholder")},null,8,["modelValue","placeholder"])]),a("div",null,[a("label",gs,f(e(t)("quotes.keywords.modal.keywords")),1),a("div",hs,[(o(!0),C(H,null,Y(z.value,L=>(o(),k(Ve,{key:L,variant:"soft",class:"cursor-pointer",onClick:de=>K(L)},{default:I(()=>[Q(f(L)+" ",1),q[6]||(q[6]=a("span",{class:"ml-0.5 hover:text-red-500"},"×",-1))]),_:2},1032,["onClick"]))),128)),x(le,{modelValue:ae.value,"onUpdate:modelValue":q[1]||(q[1]=L=>ae.value=L),placeholder:e(t)("quotes.keywords.modal.keywordPlaceholder"),class:"w-full",onKeydown:qe(Fe(G,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"])])])]),a("div",fs,[x(Ae,{variant:"soft",onClick:q[2]||(q[2]=L=>R.value=!1)},{default:I(()=>[Q(f(e(t)("common.cancel")),1)]),_:1}),x(Ae,{color:"primary",disabled:!V.value.trim()||z.value.length===0,onClick:Ce},{default:I(()=>[Q(f(D.value?e(t)("quotes.keywords.modal.update"):e(t)("common.save")),1)]),_:1},8,["disabled"])])])]),default:I(()=>[a("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:P},f(e(t)("quotes.keywords.newTemplate")),1)]),_:1},8,["open"])]),a("div",ys,[(o(!0),C(H,null,Y(n.value,L=>(o(),k(Ve,{key:L,class:"cursor-pointer",onClick:de=>ke(L)},{default:I(()=>[Q(f(L)+" ",1),q[7]||(q[7]=a("span",{class:"ml-0.5 hover:text-red-500"},"×",-1))]),_:2},1032,["onClick"]))),128)),x(le,{modelValue:j.value,"onUpdate:modelValue":q[4]||(q[4]=L=>j.value=L),placeholder:e(t)("quotes.keywords.searchPlaceholder"),class:"w-32",onKeydown:qe(Fe(pe,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"]),n.value.length>0?(o(),C("button",{key:0,class:"text-sm text-pink-500 hover:text-red-500",onClick:U},f(e(t)("quotes.keywords.clear")),1)):A("",!0)]),a("div",bs,f(e(t)("quotes.keywords.templateHint")),1)]),w.value&&w.value.typeDistribution.length>0?(o(),C("div",xs,[a("div",ks,[a("span",ws,f(v.value?v.value:n.value.length===1?n.value[0]:e(t)("quotes.keywords.keyword"))+f(e(t)("quotes.keywords.ranking")),1),a("label",_s,[a("span",null,f(e(t)("quotes.keywords.multiColorMode")),1),x(tt,{modelValue:u.value,"onUpdate:modelValue":q[5]||(q[5]=L=>u.value=L),size:"md"},null,8,["modelValue"])])]),a("div",$s,[(o(!0),C(H,null,Y(w.value.typeDistribution,L=>(o(),C("div",{key:L.type,class:W(["flex items-center gap-2 rounded-lg px-2 py-2 text-xs",p(L.type).wrapBg])},[a("span",{class:W(["h-2.5 w-2.5 shrink-0 rounded-full",p(L.type).bg])},null,2),a("span",{class:W(["font-medium",p(L.type).text])},f(L.type),3),a("span",Ts,f(e(t)("quotes.keywords.times",{count:L.count})),1),x(Ve,{color:p(L.type).badge,variant:"soft",size:"xs"},{default:I(()=>[Q(f(L.percentage)+"%",1)]),_:2},1032,["color"])],2))),128))])])):A("",!0),g.value&&M.value.length===0?(o(),k(e(oe),{key:1,text:e(t)("quotes.keywords.loading")},null,8,["text"])):A("",!0)]),item:I(({item:L,index:de})=>[a("div",Cs,[a("span",{class:W(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",e(fe)(de)])},f(e(ye)(de)),3),a("div",Is,[a("p",Ss,f(L.name),1)]),a("div",Rs,[a("div",Vs,[(o(!0),C(H,null,Y(Re(L,de),ge=>(o(),C("div",{key:ge.keyword,class:W(["h-full transition-all first:rounded-l-full last:rounded-r-full",ge.bg]),style:he({width:`${ge.width}%`}),title:`${ge.keyword}: ${ge.width.toFixed(1)}%`},null,14,Ms))),128))])]),a("div",Ls,[a("span",Ds,f(L.value),1),a("span",Ns,f(e(t)("quotes.keywords.timesWithPercent",{count:L.value,percent:L.percentage})),1)])])]),empty:I(()=>[g.value?(o(),C("div",Fs)):(o(),C("div",As,[x(at,{name:"i-heroicons-magnifying-glass",class:"mb-2 h-8 w-8 opacity-50"}),a("p",qs,f(e(t)("quotes.keywords.empty")),1)]))]),_:1},8,["items","title","description","count-label"])}}}),Us={class:"flex items-center gap-3"},zs={key:1,class:"py-8 text-center text-sm text-gray-400"},Hs=B({__name:"ActivityRank",props:{sessionId:{},memberActivity:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(i){const t=i,s=S(null),l=S(null),u=S(!1),d=S("activity"),c=S(t.globalTopN??10);E(()=>t.globalTopN,g=>{g!==void 0&&(c.value=g)});async function p(){if(t.sessionId){u.value=!0;try{const g=J(),[_,R]=await Promise.all([g.getDragonKingAnalysis(t.sessionId,t.timeFilter),g.getCheckInAnalysis(t.sessionId,t.timeFilter)]);s.value=_,l.value=R}catch(g){console.error("加载活跃数据失败:",g)}finally{u.value=!1}}}const m=y(()=>t.memberActivity.map(g=>({id:g.memberId.toString(),name:g.name,value:g.messageCount,percentage:g.percentage}))),b=y(()=>s.value?s.value.rank.map(g=>({id:g.memberId.toString(),name:g.name,value:g.count,percentage:g.percentage})):[]),h=y(()=>l.value?l.value.loyaltyRank.map(g=>({id:g.memberId.toString(),name:g.name,value:g.totalDays,percentage:g.percentage})):[]),r=y(()=>{switch(d.value){case"activity":return m.value;case"dragon":return b.value;case"loyalty":return h.value;default:return m.value}}),n=y(()=>{switch(d.value){case"activity":return"条";case"dragon":case"loyalty":return"天";default:return"条"}}),v=y(()=>{switch(d.value){case"activity":return"🏆 活跃榜 - 发言数量";case"dragon":return"🏆 活跃榜 - 龙王";case"loyalty":return"🏆 活跃榜 - 累计发言";default:return"🏆 活跃榜"}}),w=y(()=>{switch(d.value){case"activity":return"按消息发送数量排名";case"dragon":return`每天发言最多的人+1(共 ${s.value?.totalDays??0} 天)`;case"loyalty":return`累计发言天数排名(共 ${l.value?.totalDays??0} 天)`;default:return""}});return E(()=>[t.sessionId,t.timeFilter],()=>p(),{immediate:!0,deep:!0}),(g,_)=>(o(),k(e(O),{title:v.value,description:w.value},{headerRight:I(()=>[a("div",Us,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:c.value,"onUpdate:modelValue":_[0]||(_[0]=R=>c.value=R)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:d.value,"onUpdate:modelValue":_[1]||(_[1]=R=>d.value=R),items:[{label:"发言数量",value:"activity"},{label:"龙王",value:"dragon"},{label:"累计发言",value:"loyalty"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[u.value&&(d.value==="dragon"||d.value==="loyalty")?(o(),k(e(oe),{key:0,text:"正在加载数据..."})):(o(),C(H,{key:1},[r.value.length>0?(o(),k(e(Te),{key:0,members:r.value,title:v.value,unit:n.value,"top-n":c.value,bare:""},null,8,["members","title","unit","top-n"])):(o(),C("div",zs,"暂无数据"))],64))]),_:1},8,["title","description"]))}}),Ps={key:0},Es={key:0,class:"flex items-center justify-center gap-6 border-t border-gray-100 px-5 py-3 dark:border-gray-800"},Os={class:"px-3 py-2"},Ws=B({__name:"EChartStreakRank",props:{items:{},title:{},description:{},topN:{default:10},mode:{default:"max"},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(i){const t=i,s=me(),l=y(()=>t.mode==="current"?t.items.filter(h=>h.currentStreak>0).sort((h,r)=>r.currentStreak-h.currentStreak).slice(0,t.topN):t.items.slice(0,t.topN)),u=y(()=>{const h=l.value.length*36;return Math.max(h+30,180)}),d={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]},c={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f97316"},{offset:1,color:"#fb923c"}]};function p(h,r){return`${h} ~ ${r}`}function m(h){return t.mode==="current"?h.currentStreak:h.maxStreak}const b=y(()=>{const h=[...l.value].reverse(),r=h.map(g=>ve(g.name,s.value.labelMaxLength)),n=h.map(g=>m(g)),v=Math.max(...n,1),w=h.map(g=>({value:m(g),itemStyle:{color:t.mode==="current"||g.currentStreak>0?c:d,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"transparent",textStyle:{color:"#fff"},formatter:g=>{const _=g[0];if(!_)return"";const R=l.value.length-1-_.dataIndex,$=l.value[R];if(t.mode==="current")return`
7
+ `}},grid:{left:s.value.gridLeft,right:70,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:h*1.1,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:m,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(n,v)=>{const g=l.value.length-1-v+1;return`${g===1?"🥇":g===2?"🥈":g===3?"🥉":`${g}.`} ${n}`}}},series:[{type:"bar",data:r,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:n=>{const v=l.value.length-1-n.dataIndex;return`${l.value[v].value} ${t.unit}`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(238, 69, 103, 0.3)"}}}]}});return(p,m)=>i.bare?(o(),k(e(ce),{key:0,"content-height":u.value,"max-height-vh":i.maxHeightVh},{default:I(()=>[x(te,{option:c.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),k(e(O),{key:1,title:i.title,description:i.description,scrollable:"","max-height-vh":i.maxHeightVh},{default:I(()=>[a("div",oa,[x(te,{option:c.value,height:u.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),la={key:0,class:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-linear-to-br from-pink-100 to-rose-100 text-sm font-medium text-pink-600 dark:from-pink-900/30 dark:to-rose-900/30 dark:text-pink-400"},na={class:"min-w-0 flex-1"},ia={class:"flex items-baseline justify-between gap-3"},ra=["title"],ua={class:"flex shrink-0 items-baseline gap-1.5 whitespace-nowrap"},da={class:"font-mono text-base font-black tabular-nums text-gray-900 dark:text-white"},ca={class:"text-xs text-gray-500 dark:text-gray-400"},ma={class:"mt-2 flex items-center gap-2.5"},va={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"},ze=U({__name:"RankList",props:{members:{},showAvatar:{type:Boolean,default:!1},rankLimit:{default:0},unit:{}},setup(i){const{t}=X(),s=i,l=y(()=>s.unit||t("views.charts.rankList.unit")),u=y(()=>s.rankLimit>0?s.members.slice(0,s.rankLimit):s.members);function d(c){if(u.value.length===0)return 0;const p=u.value[0].value;return p===0?0:Math.round(u.value[c].value/p*100)}return(c,p)=>(o(),C("div",null,[(o(!0),C(H,null,G(u.value,(m,b)=>(o(),C("div",{key:m.id,class:"flex items-start gap-3 px-5 py-3.5 transition-colors hover:bg-gray-50/70 dark:hover:bg-white/5"},[a("span",{class:K(["w-8 shrink-0 pt-0.5 text-center font-mono text-sm font-black tabular-nums",e(fe)(b)])},f(e(ye)(b)),3),i.showAvatar?(o(),C("div",la,f(m.name.slice(0,1)),1)):A("",!0),a("div",na,[a("div",ia,[a("p",{class:"truncate text-sm font-medium text-gray-900 dark:text-white",title:m.name},f(m.name),9,ra),a("div",ua,[a("span",da,f(m.value),1),a("span",ca,f(l.value),1)])]),a("div",ma,[a("div",va,[a("div",{class:K(["h-full rounded-full bg-linear-to-r transition-all",e(Xt)(b)]),style:he({width:`${d(b)}%`})},null,6)]),a("span",pa,f(m.percentage)+"% ",1)])])]))),128))]))}}),ga={class:"flex items-center gap-2"},ha={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"},fa={class:"no-capture"},ya={key:0,class:"no-capture px-3 pb-3 pt-1"},ba={class:"flex items-center gap-1.5"},xa={class:"flex w-full items-center justify-between border-b border-gray-100 px-6 py-5 dark:border-white/5"},ka={class:"min-w-0"},wa={class:"truncate text-base font-semibold text-gray-900 dark:text-white"},_a={class:"mt-1 text-xs text-gray-500 dark:text-gray-400"},$a={class:"max-h-[70vh] overflow-y-auto"},Xe=U({__name:"ExpandableListCard",props:{title:{},description:{},showViewAll:{type:Boolean},viewAllLabel:{},countLabel:{}},setup(i){const t=S(!1),s=S(null);return(l,u)=>{const d=xe,c=be,p=$e;return o(),k(e(O),{title:i.title,description:i.description,"show-divider":!1},{headerRight:I(()=>[a("div",ga,[a("span",ha,f(i.countLabel),1),a("div",fa,[ne(l.$slots,"headerRight")])])]),default:I(()=>[a("div",null,[ne(l.$slots,"default")]),i.showViewAll?(o(),C("div",ya,[x(p,{open:t.value,"onUpdate:open":u[0]||(u[0]=m=>t.value=m),ui:{content:"md:w-full max-w-4xl"}},{content:I(()=>[a("div",{ref_key:"modalBodyRef",ref:s,class:"section-content flex flex-col overflow-hidden"},[a("div",xa,[a("div",ka,[a("h3",wa,f(i.title),1),a("p",_a,f(i.countLabel),1)]),x(qt,{size:"xs",type:"element","target-element":s.value},null,8,["target-element"])]),a("div",$a,[ne(l.$slots,"full")])],512)]),default:I(()=>[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:I(()=>[a("span",ba,[J(f(i.viewAllLabel)+" ",1),x(d,{name:"i-heroicons-arrow-right",class:"h-3.5 w-3.5"})])]),_:1})]),_:3},8,["open"])])):A("",!0)]),_:3},8,["title","description"])}}}),Ta=U({__name:"RankListPro",props:{members:{},title:{},description:{},topN:{default:10},unit:{}},setup(i){const{t}=X(),s=i,l=y(()=>s.members.slice(0,s.topN)),u=y(()=>s.members.length>s.topN);return(d,c)=>(o(),k(Xe,{title:i.title,description:i.description,"show-view-all":u.value,"view-all-label":e(t)("views.charts.rankListPro.fullRanking"),"count-label":e(t)("views.charts.rankListPro.memberCount",{count:i.members.length})},{headerRight:I(()=>[ne(d.$slots,"headerRight")]),full:I(()=>[x(ze,{members:i.members,unit:i.unit},null,8,["members","unit"])]),default:I(()=>[x(ze,{members:l.value,unit:i.unit},null,8,["members","unit"])]),_:3},8,["title","description","show-view-all","view-all-label","count-label"]))}}),Ca={key:0},Ia={class:"px-5 py-8 text-center text-sm text-gray-400"},_e=U({__name:"ListPro",props:{items:{},title:{},description:{},topN:{default:10},countLabel:{}},setup(i){const{t}=X(),s=i,l=y(()=>s.items.slice(0,s.topN)),u=y(()=>s.items.length>s.topN),d=y(()=>s.countLabel?s.countLabel:t("views.charts.listPro.countTemplate",{count:s.items.length}));return(c,p)=>(o(),k(Xe,{title:i.title,description:i.description,"show-view-all":u.value,"view-all-label":e(t)("views.charts.listPro.fullRanking"),"count-label":d.value},{headerRight:I(()=>[ne(c.$slots,"headerRight")]),full:I(()=>[a("div",null,[(o(!0),C(H,null,G(i.items,(m,b)=>(o(),C("div",{key:b,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:b})]))),128))])]),default:I(()=>[ne(c.$slots,"config"),a("div",null,[(o(!0),C(H,null,G(l.value,(m,b)=>(o(),C("div",{key:b,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:b})]))),128))]),i.items.length===0?(o(),C("div",Ca,[ne(c.$slots,"empty",{},()=>[a("div",Ia,f(e(t)("views.charts.listPro.empty")),1)])])):A("",!0)]),_:3},8,["title","description","show-view-all","view-all-label","count-label"]))}});function Sa(i,t){return{keywords:[i],...t?.memberId!=null?{memberId:t.memberId}:{}}}const Ra={class:"main-content mx-auto max-w-3xl p-6"},Va=["aria-label","onClick"],Ma=["title"],La={class:"flex shrink-0 items-center gap-3 pl-2"},Da={class:"font-mono text-sm font-black tabular-nums text-primary-600 dark:text-primary-400"},Na={class:"grid w-full grid-cols-[2rem_minmax(0,1fr)] items-start gap-x-3 sm:grid-cols-[2rem_minmax(7.5rem,0.65fr)_minmax(0,1.35fr)]"},Aa=["title"],Fa={class:"col-start-2 row-start-2 mt-1.5 flex min-w-0 flex-wrap items-center gap-x-4 gap-y-1.5 sm:col-start-3 sm:row-start-1 sm:mt-0"},qa=["title","aria-label","onClick"],Ua={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"},Ba={class:"shrink-0 font-mono text-[11px] tabular-nums text-gray-400 dark:text-gray-500"},za=U({__name:"CatchphraseTab",props:{sessionId:{},timeFilter:{}},setup(i){const{t}=X(),s=Ne(),l=i,u=S(null),d=S(!1),c=y(()=>u.value?.members??[]),p=y(()=>l.timeFilter?.memberId!=null),m=y(()=>p.value?c.value[0]??null:null),b=y(()=>m.value?t("quotes.catchphrase.memberTitle",{name:m.value.name}):t("quotes.catchphrase.title")),h=y(()=>p.value?t("quotes.catchphrase.memberDescription"):t("quotes.catchphrase.description"));async function r(){if(l.sessionId){d.value=!0;try{u.value=await Z().getCatchphraseAnalysis(l.sessionId,l.timeFilter)}catch(w){console.error("Failed to load catchphrase analysis:",w)}finally{d.value=!1}}}function n(w){s.openChatRecordDrawer(Sa(w,l.timeFilter))}function v(w){return w.catchphrases.slice(0,5)}return E(()=>[l.sessionId,l.timeFilter],()=>{r()},{immediate:!0,deep:!0}),(w,g)=>{const _=xe;return o(),C("div",Ra,[d.value?(o(),k(e(oe),{key:0,text:e(t)("quotes.catchphrase.loading")},null,8,["text"])):m.value?(o(),k(e(_e),{key:1,items:m.value.catchphrases,title:b.value,description:h.value,"top-n":10,"count-label":e(t)("quotes.catchphrase.phraseCount",{count:m.value.catchphrases.length})},{item:I(({item:R,index:$})=>[a("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":`${e(t)("quotes.catchphrase.viewChat")}: ${R.content}`,onClick:V=>n(R.content)},[a("span",{class:K(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",e(fe)($)])},f(e(ye)($)),3),a("p",{class:"line-clamp-2 min-w-0 text-sm font-medium leading-5 text-gray-900 dark:text-white",title:R.content},f(R.content),9,Ma),a("div",La,[a("span",Da,f(e(t)("quotes.catchphrase.times",{count:R.count})),1),x(_,{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,Va)]),_:1},8,["items","title","description","count-label"])):c.value.length>0?(o(),k(e(_e),{key:2,items:c.value,title:b.value,description:h.value,"top-n":10,"count-label":e(t)("quotes.catchphrase.memberCount",{count:c.value.length})},{item:I(({item:R,index:$})=>[a("div",Na,[a("span",{class:K(["row-span-2 w-8 shrink-0 pt-0.5 text-center font-mono text-sm font-black tabular-nums sm:row-span-1",e(fe)($)])},f(e(ye)($)),3),a("p",{class:"col-start-2 row-start-1 min-w-0 truncate pt-0.5 text-sm font-semibold text-gray-900 dark:text-white",title:R.name},f(R.name),9,Aa),a("div",Fa,[(o(!0),C(H,null,G(v(R),V=>(o(),C("button",{key:V.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:V.content,"aria-label":`${e(t)("quotes.catchphrase.viewChat")}: ${V.content}`,onClick:z=>n(V.content)},[a("span",Ua," “"+f(V.content)+"” ",1),a("span",Ba,f(e(t)("quotes.catchphrase.times",{count:V.count})),1)],8,qa))),128))])])]),_:1},8,["items","title","description","count-label"])):(o(),k(e(O),{key:3,title:b.value,description:h.value,"show-divider":!1},{default:I(()=>[x(e(ie),{text:e(t)("quotes.catchphrase.empty.title")},null,8,["text"])]),_:1},8,["title","description"]))])}}}),Ha={class:"main-content mx-auto max-w-3xl p-6"},Pa=["aria-label","onClick"],Ea={class:"min-w-0"},Oa=["title"],Ka={class:"mt-1 flex min-w-0 items-center gap-1.5 text-xs text-gray-400 dark:text-gray-500"},Wa={class:"truncate"},ja={class:"shrink-0"},Ga={class:"flex shrink-0 items-center gap-3 pl-2"},Ya={class:"text-right"},Ja={class:"font-mono text-sm font-black tabular-nums text-primary-600 dark:text-primary-400"},Qa={class:"mt-0.5 text-[11px] text-gray-400 dark:text-gray-500"},Za=U({__name:"HotRepeatTab",props:{sessionId:{},timeFilter:{}},setup(i){const{t}=X(),s=i,l=Ne(),u=S(null),d=S(!1);async function c(){if(s.sessionId){d.value=!0;try{u.value=await Z().getRepeatAnalysis(s.sessionId,s.timeFilter)}catch(m){console.error("Failed to load repeat analysis:",m)}finally{d.value=!1}}}function p(m){l.openChatRecordDrawer({scrollToMessageId:m.firstMessageId,highlightKeywords:[m.content]})}return E(()=>[s.sessionId,s.timeFilter],()=>{c()},{immediate:!0,deep:!0}),(m,b)=>{const h=xe;return o(),C("div",Ha,[d.value?(o(),k(e(oe),{key:0,text:e(t)("quotes.hotRepeat.loading")},null,8,["text"])):u.value&&u.value.hotContents.length>0?(o(),k(e(_e),{key:1,items:u.value.hotContents,title:e(t)("quotes.hotRepeat.title"),description:e(t)("quotes.hotRepeat.description"),"top-n":10,"count-label":e(t)("quotes.hotRepeat.countTemplate",{count:u.value.hotContents.length})},{item:I(({item:r,index:n})=>[a("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":`${e(t)("quotes.hotRepeat.viewChat")}: ${r.content}`,onClick:v=>p(r)},[a("span",{class:K(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",e(fe)(n)])},f(e(ye)(n)),3),a("div",Ea,[a("p",{class:"line-clamp-2 text-sm font-medium leading-5 text-gray-900 dark:text-white",title:r.content},f(r.content),9,Oa),a("div",Ka,[a("span",Wa,f(r.originatorName),1),b[0]||(b[0]=a("span",{"aria-hidden":"true"},"·",-1)),a("span",ja,f(e(Le)(r.lastTs)),1)])]),a("div",Ga,[a("div",Ya,[a("p",Ja,f(e(t)("quotes.hotRepeat.people",{count:r.maxChainLength})),1),a("p",Qa,f(e(t)("quotes.hotRepeat.times",{count:r.count})),1)]),x(h,{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,Pa)]),_:1},8,["items","title","description","count-label"])):(o(),k(e(O),{key:2,title:e(t)("quotes.hotRepeat.title")},{default:I(()=>[x(e(ie),{text:e(t)("quotes.hotRepeat.empty")},null,8,["text"])]),_:1},8,["title"]))])}}}),Xa={class:"main-content mx-auto max-w-[920px] space-y-4 p-4 sm:space-y-6 sm:p-6"},es={class:"grid grid-cols-1 gap-6 lg:grid-cols-2"},ts={class:"p-3 sm:p-5"},as={class:"p-3 sm:p-5"},ss=U({__name:"GroupChatOverview",props:{session:{},memberActivity:{},messageTypes:{},hourlyActivity:{},dailyActivity:{},timeRange:{},filteredMessageCount:{},filteredMemberCount:{},timeFilter:{}},setup(i){const{t}=X(),s=i,{dailyChartData:l}=yt(()=>s.dailyActivity),u=y(()=>({labels:s.messageTypes.map(c=>Dt(c.type,t)),values:s.messageTypes.map(c=>c.count)})),d=y(()=>{const c=[...s.memberActivity].sort((r,n)=>n.messageCount-r.messageCount),p=c.slice(0,10),m=c.slice(10).reduce((r,n)=>r+n.messageCount,0),b=p.map(r=>r.name),h=p.map(r=>r.messageCount);return m>0&&(b.push(t("analysis.overview.others")),h.push(m)),{labels:b,values:h}});return(c,p)=>(o(),C("div",Xa,[x(ht,{session:i.session,"daily-activity":i.dailyActivity,"message-types":i.messageTypes,"hourly-activity":i.hourlyActivity,"time-range":i.timeRange,"filtered-message-count":i.filteredMessageCount,"filtered-member-count":i.filteredMemberCount,"time-filter":i.timeFilter},null,8,["session","daily-activity","message-types","hourly-activity","time-range","filtered-message-count","filtered-member-count","time-filter"]),a("div",es,[x(e(O),{title:e(t)("analysis.overview.messageTypeDistribution"),"show-divider":!1},{default:I(()=>[a("div",ts,[x(e(Be),{data:u.value,height:280},null,8,["data"])])]),_:1},8,["title"]),x(e(O),{title:e(t)("analysis.overview.memberDistribution"),"show-divider":!1},{default:I(()=>[a("div",as,[x(e(Be),{data:d.value,height:280},null,8,["data"])])]),_:1},8,["title"])]),x(ft,{"daily-activity":i.dailyActivity,"daily-chart-data":e(l)},null,8,["daily-activity","daily-chart-data"])]))}}),os={class:"flex h-full flex-col"},ls={class:"min-h-0 flex-1 overflow-y-auto"},ns=U({__name:"GroupChatInsights",props:{sessionId:{},session:{},memberActivity:{},messageTypes:{},hourlyActivity:{},dailyActivity:{},timeRange:{},filteredMessageCount:{},filteredMemberCount:{},timeFilter:{}},setup(i){const t=Pe(()=>Ee(()=>import("./GroupRelationshipGalaxyView-BXQBX0zJ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))),{t:s}=X(),l=i,u=y(()=>[{id:"overview",label:s("analysis.tabs.overview"),icon:"i-heroicons-squares-2x2"},{id:"type-analysis",label:s("analysis.subTabs.insights.typeAnalysis"),icon:"i-heroicons-chart-pie"},{id:"time-analysis",label:s("analysis.subTabs.insights.timeAnalysis"),icon:"i-heroicons-clock"},{id:"topic",label:s("analysis.subTabs.insights.topic"),icon:"i-heroicons-cloud"},{id:"relationship",label:s("analysis.subTabs.insights.relationship"),icon:"i-heroicons-heart"}]),d=S("overview"),c=S(null),p=y(()=>({...l.timeFilter,memberId:c.value}));return(m,b)=>(o(),C("div",os,[x(e(Ye),{modelValue:d.value,"onUpdate:modelValue":b[1]||(b[1]=h=>d.value=h),items:u.value,"persist-key":"groupInsightsTab"},{right:I(()=>[d.value==="type-analysis"||d.value==="time-analysis"?(o(),k(Ge,{key:0,modelValue:c.value,"onUpdate:modelValue":b[0]||(b[0]=h=>c.value=h),"session-id":l.sessionId},null,8,["modelValue","session-id"])):A("",!0)]),_:1},8,["modelValue","items"]),a("div",ls,[x(e(bt),{"active-key":d.value},{default:I(({viewKey:h})=>[h==="overview"?(o(),k(ss,{key:0,session:l.session,"member-activity":l.memberActivity,"message-types":l.messageTypes,"hourly-activity":l.hourlyActivity,"daily-activity":l.dailyActivity,"time-range":l.timeRange,"filtered-message-count":l.filteredMessageCount,"filtered-member-count":l.filteredMemberCount,"time-filter":l.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"?(o(),k(xt,{key:1,"session-id":l.sessionId,"session-name":l.session.name,"time-filter":p.value},null,8,["session-id","session-name","time-filter"])):h==="time-analysis"?(o(),k(kt,{key:2,"session-id":l.sessionId,"session-name":l.session.name,"time-filter":p.value},null,8,["session-id","session-name","time-filter"])):h==="topic"?(o(),k(e(wt),{key:3,"session-id":l.sessionId,"time-filter":l.timeFilter},null,8,["session-id","time-filter"])):h==="relationship"?(o(),k(e(t),{key:4,"session-id":l.sessionId,"time-filter":l.timeFilter},null,8,["session-id","time-filter"])):A("",!0)]),_:1},8,["active-key"])])]))}}),is={class:"border-b border-gray-100 p-4 dark:border-gray-800"},rs={class:"mb-3 flex flex-wrap items-center gap-2"},us={class:"text-xs text-gray-500 dark:text-gray-400"},ds=["onClick"],cs={class:"p-4"},ms={class:"mb-3 font-semibold text-gray-900 dark:text-white"},vs={class:"space-y-3"},ps={class:"mb-1 block text-xs text-gray-500"},gs={class:"mb-1 block text-xs text-gray-500"},hs={class:"flex flex-wrap items-center gap-2"},fs={class:"mt-4 flex justify-end gap-2"},ys={class:"flex flex-wrap items-center gap-2"},bs={class:"mt-1.5 text-xs text-gray-400"},xs={key:0,class:"border-b border-gray-100 px-5 py-4 dark:border-gray-800"},ks={class:"mb-3 flex items-center justify-between"},ws={class:"text-base font-medium text-gray-700 dark:text-gray-300"},_s={class:"flex cursor-pointer items-center gap-1.5 text-xs text-gray-500"},$s={class:"flex flex-wrap gap-2"},Ts={class:"text-xs text-gray-500"},Cs={class:"flex items-center gap-3"},Is={class:"w-32 shrink-0"},Ss={class:"truncate font-medium text-gray-900 dark:text-white"},Rs={class:"flex flex-1 items-center"},Vs={class:"flex h-2 w-full overflow-hidden rounded-full bg-gray-100 dark:bg-white/5"},Ms=["title"],Ls={class:"flex shrink-0 items-baseline gap-2"},Ds={class:"font-mono text-base font-black tabular-nums text-gray-900 dark:text-white"},Ns={class:"text-xs text-gray-500"},As={key:0,class:"flex h-64 flex-col items-center justify-center text-gray-400"},Fs={class:"text-sm"},qs={key:1,class:"h-64"},Us=U({__name:"KeywordRankingTab",props:{sessionId:{},timeFilter:{}},setup(i){const{t}=X(),s=i,l=Ht(),u=S(!1),d={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 p(T){if(!u.value)return d;const F=n.value.indexOf(T);if(F>=0)return c[F%c.length];let se=0;for(let le=0;le<T.length;le++)se=se*31+T.charCodeAt(le)>>>0;return c[se%c.length]}const m=["laugh","sad","praise","slacker","gossip","polite","curious"],b=y(()=>[{id:"laugh",name:t("quotes.keywords.templates.laugh.name"),keywords:t("quotes.keywords.templates.laugh.keywords").split(","),description:t("quotes.keywords.templates.laugh.description")},{id:"sad",name:t("quotes.keywords.templates.sad.name"),keywords:t("quotes.keywords.templates.sad.keywords").split(","),description:t("quotes.keywords.templates.sad.description")},{id:"praise",name:t("quotes.keywords.templates.praise.name"),keywords:t("quotes.keywords.templates.praise.keywords").split(","),description:t("quotes.keywords.templates.praise.description")},{id:"slacker",name:t("quotes.keywords.templates.slacker.name"),keywords:t("quotes.keywords.templates.slacker.keywords").split(","),description:t("quotes.keywords.templates.slacker.description")},{id:"gossip",name:t("quotes.keywords.templates.gossip.name"),keywords:t("quotes.keywords.templates.gossip.keywords").split(","),description:t("quotes.keywords.templates.gossip.description")},{id:"polite",name:t("quotes.keywords.templates.polite.name"),keywords:t("quotes.keywords.templates.polite.keywords").split(","),description:t("quotes.keywords.templates.polite.description")},{id:"curious",name:t("quotes.keywords.templates.curious.name"),keywords:t("quotes.keywords.templates.curious.keywords").split(","),description:t("quotes.keywords.templates.curious.description")}]),h=y(()=>{const T=l.customKeywordTemplates.map(se=>({...se,isCustom:!0}));return[...b.value.filter(se=>!l.deletedPresetTemplateIds.includes(se.id)),...T]}),r=S("laugh"),n=S([]);E(b,T=>{T.length>0&&n.value.length===0&&(n.value=[...T[0].keywords])},{immediate:!0});const v=y(()=>{const T=h.value.find(F=>F.id===r.value);return T?T.name:""}),w=S(null),g=S(!1);let _=0;const R=S(!1),$=S(null),V=S(""),z=S([]),ae=S(""),D=y(()=>$.value!==null),q=y(()=>D.value?t("quotes.keywords.modal.editTitle"):t("quotes.keywords.modal.createTitle"));function P(){$.value=null,V.value="",z.value=[],ae.value="",R.value=!0}function ee(T){$.value=T.id,V.value=T.name,z.value=[...T.keywords],R.value=!0}function Y(){const T=ae.value.trim();T&&!z.value.includes(T)&&(z.value=[...z.value,T]),ae.value=""}function W(T){z.value=z.value.filter(F=>F!==T)}function N(T){r.value=T.id,n.value=[...T.keywords],w.value=null,Q()}function B(){_++,n.value=[],w.value=null,g.value=!1,r.value=""}const j=S("");function pe(){const T=j.value.trim();T&&!n.value.includes(T)&&(n.value=[...n.value,T],Q()),j.value=""}function ke(T){n.value=n.value.filter(F=>F!==T),Q()}function we(T){return m.includes(T)}function Ce(){if(V.value.trim()){if(D.value&&$.value)if(we($.value)){const T={id:`custom_${Date.now()}`,name:V.value.trim(),keywords:[...z.value]};l.addCustomKeywordTemplate(T),r.value=T.id,n.value=[...T.keywords],Q()}else l.updateCustomKeywordTemplate($.value,{name:V.value.trim(),keywords:[...z.value]}),r.value===$.value&&(n.value=[...z.value],Q());else{const T={id:`custom_${Date.now()}`,name:V.value.trim(),keywords:[...z.value]};l.addCustomKeywordTemplate(T),r.value=T.id,n.value=[...T.keywords],Q()}R.value=!1}}function Ie(T){we(T)?l.addDeletedPresetTemplateId(T):l.removeCustomKeywordTemplate(T),r.value===T&&(h.value.length>0?N(h.value[0]):B())}async function Q(){const T=++_;if(!s.sessionId||n.value.length===0){w.value=null,g.value=!1;return}g.value=!0;try{const F=await Z().getLaughAnalysis(s.sessionId,s.timeFilter,[...n.value]);if(T!==_)return;w.value=F}catch(F){if(T!==_)return;console.error("Failed to load keyword ranking:",F),w.value=null}finally{T===_&&(g.value=!1)}}const M=y(()=>w.value?w.value.rankByCount.map(T=>({id:T.memberId.toString(),name:T.name,value:T.laughCount,percentage:T.percentage,keywordDistribution:T.keywordDistribution||[]})):[]);function Se(T){if(M.value.length===0)return 0;const F=M.value[0].value;return F===0?0:Math.round(M.value[T].value/F*100)}function Re(T,F){const se=Se(F);return!T.keywordDistribution||T.keywordDistribution.length===0?[{keyword:"default",width:se,bg:"bg-amber-400"}]:T.keywordDistribution.map(le=>({keyword:le.keyword,width:le.percentage/100*se,bg:p(le.keyword).bg}))}return E(()=>[s.sessionId,s.timeFilter],()=>{Q()},{immediate:!0,deep:!0}),(T,F)=>{const se=lt,le=Oe,Ve=Je,Ae=be,et=$e,tt=zt,at=xe;return o(),k(e(_e),{items:M.value,title:e(t)("quotes.keywords.title"),description:e(t)("quotes.keywords.description"),"top-n":10,"count-label":e(t)("quotes.keywords.countTemplate",{count:M.value.length})},{config:I(()=>[a("div",is,[a("div",rs,[a("span",us,f(e(t)("quotes.keywords.templateLabel")),1),(o(!0),C(H,null,G(h.value,L=>(o(),k(se,{key:L.id,items:[[{label:e(t)("quotes.keywords.contextMenu.edit"),icon:"i-lucide-pencil",disabled:!L.isCustom,onSelect:()=>ee(L)},{label:e(t)("quotes.keywords.contextMenu.delete"),icon:"i-lucide-trash",color:"error",onSelect:()=>Ie(L.id)}]]},{default:I(()=>[a("button",{class:K(["rounded-md border px-2.5 py-1 text-sm transition-all",r.value===L.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:de=>N(L)},f(L.name),11,ds)]),_:2},1032,["items"]))),128)),x(et,{open:R.value,"onUpdate:open":F[3]||(F[3]=L=>R.value=L)},{content:I(()=>[a("div",cs,[a("h3",ms,f(q.value),1),a("div",vs,[a("div",null,[a("label",ps,f(e(t)("quotes.keywords.modal.templateName")),1),x(le,{modelValue:V.value,"onUpdate:modelValue":F[0]||(F[0]=L=>V.value=L),placeholder:e(t)("quotes.keywords.modal.templateNamePlaceholder")},null,8,["modelValue","placeholder"])]),a("div",null,[a("label",gs,f(e(t)("quotes.keywords.modal.keywords")),1),a("div",hs,[(o(!0),C(H,null,G(z.value,L=>(o(),k(Ve,{key:L,variant:"soft",class:"cursor-pointer",onClick:de=>W(L)},{default:I(()=>[J(f(L)+" ",1),F[6]||(F[6]=a("span",{class:"ml-0.5 hover:text-red-500"},"×",-1))]),_:2},1032,["onClick"]))),128)),x(le,{modelValue:ae.value,"onUpdate:modelValue":F[1]||(F[1]=L=>ae.value=L),placeholder:e(t)("quotes.keywords.modal.keywordPlaceholder"),class:"w-full",onKeydown:Fe(qe(Y,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"])])])]),a("div",fs,[x(Ae,{variant:"soft",onClick:F[2]||(F[2]=L=>R.value=!1)},{default:I(()=>[J(f(e(t)("common.cancel")),1)]),_:1}),x(Ae,{color:"primary",disabled:!V.value.trim()||z.value.length===0,onClick:Ce},{default:I(()=>[J(f(D.value?e(t)("quotes.keywords.modal.update"):e(t)("common.save")),1)]),_:1},8,["disabled"])])])]),default:I(()=>[a("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:P},f(e(t)("quotes.keywords.newTemplate")),1)]),_:1},8,["open"])]),a("div",ys,[(o(!0),C(H,null,G(n.value,L=>(o(),k(Ve,{key:L,class:"cursor-pointer",onClick:de=>ke(L)},{default:I(()=>[J(f(L)+" ",1),F[7]||(F[7]=a("span",{class:"ml-0.5 hover:text-red-500"},"×",-1))]),_:2},1032,["onClick"]))),128)),x(le,{modelValue:j.value,"onUpdate:modelValue":F[4]||(F[4]=L=>j.value=L),placeholder:e(t)("quotes.keywords.searchPlaceholder"),class:"w-32",onKeydown:Fe(qe(pe,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"]),n.value.length>0?(o(),C("button",{key:0,class:"text-sm text-pink-500 hover:text-red-500",onClick:B},f(e(t)("quotes.keywords.clear")),1)):A("",!0)]),a("div",bs,f(e(t)("quotes.keywords.templateHint")),1)]),w.value&&w.value.typeDistribution.length>0?(o(),C("div",xs,[a("div",ks,[a("span",ws,f(v.value?v.value:n.value.length===1?n.value[0]:e(t)("quotes.keywords.keyword"))+f(e(t)("quotes.keywords.ranking")),1),a("label",_s,[a("span",null,f(e(t)("quotes.keywords.multiColorMode")),1),x(tt,{modelValue:u.value,"onUpdate:modelValue":F[5]||(F[5]=L=>u.value=L),size:"md"},null,8,["modelValue"])])]),a("div",$s,[(o(!0),C(H,null,G(w.value.typeDistribution,L=>(o(),C("div",{key:L.type,class:K(["flex items-center gap-2 rounded-lg px-2 py-2 text-xs",p(L.type).wrapBg])},[a("span",{class:K(["h-2.5 w-2.5 shrink-0 rounded-full",p(L.type).bg])},null,2),a("span",{class:K(["font-medium",p(L.type).text])},f(L.type),3),a("span",Ts,f(e(t)("quotes.keywords.times",{count:L.count})),1),x(Ve,{color:p(L.type).badge,variant:"soft",size:"xs"},{default:I(()=>[J(f(L.percentage)+"%",1)]),_:2},1032,["color"])],2))),128))])])):A("",!0),g.value&&M.value.length===0?(o(),k(e(oe),{key:1,text:e(t)("quotes.keywords.loading")},null,8,["text"])):A("",!0)]),item:I(({item:L,index:de})=>[a("div",Cs,[a("span",{class:K(["w-8 shrink-0 text-center font-mono text-sm font-black tabular-nums",e(fe)(de)])},f(e(ye)(de)),3),a("div",Is,[a("p",Ss,f(L.name),1)]),a("div",Rs,[a("div",Vs,[(o(!0),C(H,null,G(Re(L,de),ge=>(o(),C("div",{key:ge.keyword,class:K(["h-full transition-all first:rounded-l-full last:rounded-r-full",ge.bg]),style:he({width:`${ge.width}%`}),title:`${ge.keyword}: ${ge.width.toFixed(1)}%`},null,14,Ms))),128))])]),a("div",Ls,[a("span",Ds,f(L.value),1),a("span",Ns,f(e(t)("quotes.keywords.timesWithPercent",{count:L.value,percent:L.percentage})),1)])])]),empty:I(()=>[g.value?(o(),C("div",qs)):(o(),C("div",As,[x(at,{name:"i-heroicons-magnifying-glass",class:"mb-2 h-8 w-8 opacity-50"}),a("p",Fs,f(e(t)("quotes.keywords.empty")),1)]))]),_:1},8,["items","title","description","count-label"])}}}),Bs={class:"flex items-center gap-3"},zs={key:1,class:"py-8 text-center text-sm text-gray-400"},Hs=U({__name:"ActivityRank",props:{sessionId:{},memberActivity:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(i){const t=i,s=S(null),l=S(null),u=S(!1),d=S("activity"),c=S(t.globalTopN??10);E(()=>t.globalTopN,g=>{g!==void 0&&(c.value=g)});async function p(){if(t.sessionId){u.value=!0;try{const g=Z(),[_,R]=await Promise.all([g.getDragonKingAnalysis(t.sessionId,t.timeFilter),g.getCheckInAnalysis(t.sessionId,t.timeFilter)]);s.value=_,l.value=R}catch(g){console.error("加载活跃数据失败:",g)}finally{u.value=!1}}}const m=y(()=>t.memberActivity.map(g=>({id:g.memberId.toString(),name:g.name,value:g.messageCount,percentage:g.percentage}))),b=y(()=>s.value?s.value.rank.map(g=>({id:g.memberId.toString(),name:g.name,value:g.count,percentage:g.percentage})):[]),h=y(()=>l.value?l.value.loyaltyRank.map(g=>({id:g.memberId.toString(),name:g.name,value:g.totalDays,percentage:g.percentage})):[]),r=y(()=>{switch(d.value){case"activity":return m.value;case"dragon":return b.value;case"loyalty":return h.value;default:return m.value}}),n=y(()=>{switch(d.value){case"activity":return"条";case"dragon":case"loyalty":return"天";default:return"条"}}),v=y(()=>{switch(d.value){case"activity":return"🏆 活跃榜 - 发言数量";case"dragon":return"🏆 活跃榜 - 龙王";case"loyalty":return"🏆 活跃榜 - 累计发言";default:return"🏆 活跃榜"}}),w=y(()=>{switch(d.value){case"activity":return"按消息发送数量排名";case"dragon":return`每天发言最多的人+1(共 ${s.value?.totalDays??0} 天)`;case"loyalty":return`累计发言天数排名(共 ${l.value?.totalDays??0} 天)`;default:return""}});return E(()=>[t.sessionId,t.timeFilter],()=>p(),{immediate:!0,deep:!0}),(g,_)=>(o(),k(e(O),{title:v.value,description:w.value},{headerRight:I(()=>[a("div",Bs,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:c.value,"onUpdate:modelValue":_[0]||(_[0]=R=>c.value=R)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:d.value,"onUpdate:modelValue":_[1]||(_[1]=R=>d.value=R),items:[{label:"发言数量",value:"activity"},{label:"龙王",value:"dragon"},{label:"累计发言",value:"loyalty"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[u.value&&(d.value==="dragon"||d.value==="loyalty")?(o(),k(e(oe),{key:0,text:"正在加载数据..."})):(o(),C(H,{key:1},[r.value.length>0?(o(),k(e(Te),{key:0,members:r.value,title:v.value,unit:n.value,"top-n":c.value,bare:""},null,8,["members","title","unit","top-n"])):(o(),C("div",zs,"暂无数据"))],64))]),_:1},8,["title","description"]))}}),Ps={key:0},Es={key:0,class:"flex items-center justify-center gap-6 border-t border-gray-100 px-5 py-3 dark:border-gray-800"},Os={class:"px-3 py-2"},Ks=U({__name:"EChartStreakRank",props:{items:{},title:{},description:{},topN:{default:10},mode:{default:"max"},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(i){const t=i,s=me(),l=y(()=>t.mode==="current"?t.items.filter(h=>h.currentStreak>0).sort((h,r)=>r.currentStreak-h.currentStreak).slice(0,t.topN):t.items.slice(0,t.topN)),u=y(()=>{const h=l.value.length*36;return Math.max(h+30,180)}),d={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]},c={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f97316"},{offset:1,color:"#fb923c"}]};function p(h,r){return`${h} ~ ${r}`}function m(h){return t.mode==="current"?h.currentStreak:h.maxStreak}const b=y(()=>{const h=[...l.value].reverse(),r=h.map(g=>ve(g.name,s.value.labelMaxLength)),n=h.map(g=>m(g)),v=Math.max(...n,1),w=h.map(g=>({value:m(g),itemStyle:{color:t.mode==="current"||g.currentStreak>0?c:d,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"transparent",textStyle:{color:"#fff"},formatter:g=>{const _=g[0];if(!_)return"";const R=l.value.length-1-_.dataIndex,$=l.value[R];if(t.mode==="current")return`
8
8
  <div style="padding: 4px 8px;">
9
9
  <div style="font-weight: bold; margin-bottom: 6px;">${$.name}</div>
10
10
  <div style="color: #fb923c;">🔥 当前连续 <b>${$.currentStreak}</b> 天</div>
@@ -15,7 +15,7 @@ import{r as S,B as De,C as He,a as B,o,h as C,n as W,l as a,F as H,q as Y,v as f
15
15
  <div style="font-weight: bold; margin-bottom: 6px;">${$.name}</div>
16
16
  <div style="margin-bottom: 4px;">🔥 最长连续: <b>${$.maxStreak}</b> 天</div>
17
17
  <div style="font-size: 12px; color: #9ca3af;">${p($.maxStreakStart,$.maxStreakEnd)}</div>
18
- `;return $.currentStreak>0&&(V+=`<div style="margin-top: 6px; color: #fb923c;">🔥 当前连续 ${$.currentStreak} 天</div>`),V+="</div>",V}},grid:{left:s.value.gridLeft,right:70,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:v*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:r,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(g,_)=>{const $=l.value.length-1-_+1;return`${$===1?"🥇":$===2?"🥈":$===3?"🥉":`${$}.`} ${g}`}}},series:[{type:"bar",data:w,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:g=>{const _=l.value.length-1-g.dataIndex,R=l.value[_],$=m(R),V=t.mode==="current"||R.currentStreak>0?" 🔥":"";return`${$} 天${V}`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(249, 115, 22, 0.3)"}}}]}});return(h,r)=>i.bare?(o(),C("div",Ps,[x(e(ce),{"content-height":u.value,"max-height-vh":i.maxHeightVh},{default:I(()=>[x(e(te),{option:b.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"]),i.mode==="max"?(o(),C("div",Es,[...r[0]||(r[0]=[nt('<div class="flex items-center gap-1.5"><div class="h-3 w-6 rounded bg-linear-to-r from-orange-500 to-orange-400"></div><span class="text-xs text-gray-500">当前连续中 🔥</span></div><div class="flex items-center gap-1.5"><div class="h-3 w-6 rounded bg-linear-to-r from-pink-500 to-pink-400"></div><span class="text-xs text-gray-500">已中断</span></div>',2)])])):A("",!0)])):(o(),k(e(O),{key:1,title:i.title,description:i.description,scrollable:"","max-height-vh":i.maxHeightVh},it({default:I(()=>[a("div",Os,[x(e(te),{option:b.value,height:u.value},null,8,["option","height"])])]),_:2},[i.mode==="max"?{name:"footer",fn:I(()=>[r[1]||(r[1]=a("div",{class:"flex items-center justify-center gap-6 border-t border-gray-100 px-5 py-3 dark:border-gray-800"},[a("div",{class:"flex items-center gap-1.5"},[a("div",{class:"h-3 w-6 rounded bg-linear-to-r from-orange-500 to-orange-400"}),a("span",{class:"text-xs text-gray-500"},"当前连续中 🔥")]),a("div",{class:"flex items-center gap-1.5"},[a("div",{class:"h-3 w-6 rounded bg-linear-to-r from-pink-500 to-pink-400"}),a("span",{class:"text-xs text-gray-500"},"已中断")])],-1))]),key:"0"}:void 0]),1032,["title","description","max-height-vh"]))}}),Ks={class:"px-3 py-2"},js=B({__name:"EChartBattleRank",props:{battles:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(i){const t=i,s=y(()=>t.battles.slice(0,t.topN)),l=y(()=>{const p=s.value.length*36;return Math.max(p+30,180)}),u={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]};function d(p){return`${p.participantCount} 人参战`}const c=y(()=>{const p=[...s.value].reverse(),m=p.map(n=>d(n)),b=p.map(n=>n.totalImages),h=Math.max(...b,1),r=p.map(n=>({value:n.totalImages,itemStyle:{color:u,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.85)",borderColor:"transparent",textStyle:{color:"#fff",fontSize:12},extraCssText:"max-width: 300px;",formatter:n=>{const v=n[0];if(!v)return"";const w=s.value.length-1-v.dataIndex,g=s.value[w],_=g.participants.slice(0,5).map($=>`<span style="color: #d1d5db;">${$.name}</span> <b>${$.imageCount}</b>张`).join("、"),R=g.participants.length>5?`、+${g.participants.length-5}`:"";return`
18
+ `;return $.currentStreak>0&&(V+=`<div style="margin-top: 6px; color: #fb923c;">🔥 当前连续 ${$.currentStreak} 天</div>`),V+="</div>",V}},grid:{left:s.value.gridLeft,right:70,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:v*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:r,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(g,_)=>{const $=l.value.length-1-_+1;return`${$===1?"🥇":$===2?"🥈":$===3?"🥉":`${$}.`} ${g}`}}},series:[{type:"bar",data:w,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:g=>{const _=l.value.length-1-g.dataIndex,R=l.value[_],$=m(R),V=t.mode==="current"||R.currentStreak>0?" 🔥":"";return`${$} 天${V}`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(249, 115, 22, 0.3)"}}}]}});return(h,r)=>i.bare?(o(),C("div",Ps,[x(e(ce),{"content-height":u.value,"max-height-vh":i.maxHeightVh},{default:I(()=>[x(e(te),{option:b.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"]),i.mode==="max"?(o(),C("div",Es,[...r[0]||(r[0]=[nt('<div class="flex items-center gap-1.5"><div class="h-3 w-6 rounded bg-linear-to-r from-orange-500 to-orange-400"></div><span class="text-xs text-gray-500">当前连续中 🔥</span></div><div class="flex items-center gap-1.5"><div class="h-3 w-6 rounded bg-linear-to-r from-pink-500 to-pink-400"></div><span class="text-xs text-gray-500">已中断</span></div>',2)])])):A("",!0)])):(o(),k(e(O),{key:1,title:i.title,description:i.description,scrollable:"","max-height-vh":i.maxHeightVh},it({default:I(()=>[a("div",Os,[x(e(te),{option:b.value,height:u.value},null,8,["option","height"])])]),_:2},[i.mode==="max"?{name:"footer",fn:I(()=>[r[1]||(r[1]=a("div",{class:"flex items-center justify-center gap-6 border-t border-gray-100 px-5 py-3 dark:border-gray-800"},[a("div",{class:"flex items-center gap-1.5"},[a("div",{class:"h-3 w-6 rounded bg-linear-to-r from-orange-500 to-orange-400"}),a("span",{class:"text-xs text-gray-500"},"当前连续中 🔥")]),a("div",{class:"flex items-center gap-1.5"},[a("div",{class:"h-3 w-6 rounded bg-linear-to-r from-pink-500 to-pink-400"}),a("span",{class:"text-xs text-gray-500"},"已中断")])],-1))]),key:"0"}:void 0]),1032,["title","description","max-height-vh"]))}}),Ws={class:"px-3 py-2"},js=U({__name:"EChartBattleRank",props:{battles:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(i){const t=i,s=y(()=>t.battles.slice(0,t.topN)),l=y(()=>{const p=s.value.length*36;return Math.max(p+30,180)}),u={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ee4567"},{offset:1,color:"#f7758c"}]};function d(p){return`${p.participantCount} 人参战`}const c=y(()=>{const p=[...s.value].reverse(),m=p.map(n=>d(n)),b=p.map(n=>n.totalImages),h=Math.max(...b,1),r=p.map(n=>({value:n.totalImages,itemStyle:{color:u,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.85)",borderColor:"transparent",textStyle:{color:"#fff",fontSize:12},extraCssText:"max-width: 300px;",formatter:n=>{const v=n[0];if(!v)return"";const w=s.value.length-1-v.dataIndex,g=s.value[w],_=g.participants.slice(0,5).map($=>`<span style="color: #d1d5db;">${$.name}</span> <b>${$.imageCount}</b>张`).join("、"),R=g.participants.length>5?`、+${g.participants.length-5}`:"";return`
19
19
  <div style="padding: 6px 8px;">
20
20
  <div style="font-weight: bold; margin-bottom: 8px; font-size: 13px;">
21
21
  ⚔️ ${Le(g.startTime)}
@@ -30,23 +30,23 @@ import{r as S,B as De,C as He,a as B,o,h as C,n as W,l as a,F as H,q as Y,v as f
30
30
  ${_}${R}
31
31
  </div>
32
32
  </div>
33
- `}},grid:{left:95,right:125,top:15,bottom:15,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:m,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:11,color:"#4b5563",margin:12,formatter:(n,v)=>{const g=s.value.length-1-v+1;return`${g===1?"🥇":g===2?"🥈":g===3?"🥉":`${g}.`} ${n}`}}},series:[{type:"bar",data:r,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:n=>{const v=s.value.length-1-n.dataIndex,w=s.value[v],g=Le(w.startTime);return`${w.totalImages} 张 (${g})`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(238, 69, 103, 0.3)"}}}]}});return(p,m)=>i.bare?(o(),k(e(ce),{key:0,"content-height":l.value,"max-height-vh":i.maxHeightVh},{default:I(()=>[x(e(te),{option:c.value,height:l.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),k(e(O),{key:1,title:i.title,description:i.description,scrollable:"","max-height-vh":i.maxHeightVh},{default:I(()=>[a("div",Ks,[x(e(te),{option:c.value,height:l.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Ys={class:"px-3 py-2"},Gs=B({__name:"EChartTimeRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(i){const t=i,s=me(),l=y(()=>t.items.slice(0,t.topN)),u=y(()=>{const m=l.value.length*36;return Math.max(m+30,180)}),d={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f59e0b"},{offset:1,color:"#fbbf24"}]};function c(m){return(m/1e3).toFixed(2)+"s"}const p=y(()=>{if(l.value.length===0)return{};const m=[...l.value].reverse(),b=m.map(n=>ve(n.name,s.value.labelMaxLength)),h=l.value[0].avgTimeDiff,r=m.map(n=>({value:Math.round(h/n.avgTimeDiff*100),itemStyle:{color:d,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:n=>{const v=n[0];if(!v)return"";const w=l.value.length-1-v.dataIndex,g=l.value[w];return`
33
+ `}},grid:{left:95,right:125,top:15,bottom:15,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:m,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:11,color:"#4b5563",margin:12,formatter:(n,v)=>{const g=s.value.length-1-v+1;return`${g===1?"🥇":g===2?"🥈":g===3?"🥉":`${g}.`} ${n}`}}},series:[{type:"bar",data:r,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:n=>{const v=s.value.length-1-n.dataIndex,w=s.value[v],g=Le(w.startTime);return`${w.totalImages} 张 (${g})`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(238, 69, 103, 0.3)"}}}]}});return(p,m)=>i.bare?(o(),k(e(ce),{key:0,"content-height":l.value,"max-height-vh":i.maxHeightVh},{default:I(()=>[x(e(te),{option:c.value,height:l.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),k(e(O),{key:1,title:i.title,description:i.description,scrollable:"","max-height-vh":i.maxHeightVh},{default:I(()=>[a("div",Ws,[x(e(te),{option:c.value,height:l.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Gs={class:"px-3 py-2"},Ys=U({__name:"EChartTimeRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(i){const t=i,s=me(),l=y(()=>t.items.slice(0,t.topN)),u=y(()=>{const m=l.value.length*36;return Math.max(m+30,180)}),d={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f59e0b"},{offset:1,color:"#fbbf24"}]};function c(m){return(m/1e3).toFixed(2)+"s"}const p=y(()=>{if(l.value.length===0)return{};const m=[...l.value].reverse(),b=m.map(n=>ve(n.name,s.value.labelMaxLength)),h=l.value[0].avgTimeDiff,r=m.map(n=>({value:Math.round(h/n.avgTimeDiff*100),itemStyle:{color:d,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:n=>{const v=n[0];if(!v)return"";const w=l.value.length-1-v.dataIndex,g=l.value[w];return`
34
34
  <div style="padding: 4px 8px;">
35
35
  <div style="font-weight: bold; margin-bottom: 6px;">${g.name}</div>
36
36
  <div style="margin-bottom: 4px;">⚡️ 平均反应时间: <b>${c(g.avgTimeDiff)}</b></div>
37
37
  <div style="font-size: 12px; color: #9ca3af;">参与复读 ${g.count} 次</div>
38
38
  </div>
39
- `}},grid:{left:s.value.gridLeft,right:100,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:105,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:b,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(n,v)=>{const g=l.value.length-1-v+1;return`${g===1?"🥇":g===2?"🥈":g===3?"🥉":`${g}.`} ${n}`}}},series:[{type:"bar",data:r,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:n=>{const v=l.value.length-1-n.dataIndex,w=l.value[v];return`${c(w.avgTimeDiff)} · ${w.count}次`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(245, 158, 11, 0.3)"}}}]}});return(m,b)=>i.bare?(o(),k(e(ce),{key:0,"content-height":u.value,"max-height-vh":i.maxHeightVh},{default:I(()=>[x(e(te),{option:p.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),k(e(O),{key:1,title:i.title,description:i.description,scrollable:"","max-height-vh":i.maxHeightVh},{default:I(()=>[a("div",Ys,[x(e(te),{option:p.value,height:u.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Qs={class:"flex items-center gap-3"},Xs={class:"px-3 py-2"},Js=B({__name:"EChartDivingRank",props:{items:{},showTopNSelect:{type:Boolean,default:!0},maxHeightVh:{default:60},globalTopN:{}},setup(i){const t=i,s=me(),l=S("desc"),u=S(t.globalTopN??10);E(()=>t.globalTopN,n=>{n!==void 0&&(u.value=n)});const d=y(()=>[...t.items].sort((v,w)=>l.value==="desc"?w.daysSinceLastMessage-v.daysSinceLastMessage:v.daysSinceLastMessage-w.daysSinceLastMessage).slice(0,u.value)),c=y(()=>l.value==="desc"?"🤿 潜水榜 - 潜水最久":"🤿 潜水榜 - 最近冒泡"),p=y(()=>l.value==="desc"?"距离上次发言时间最久的成员":"最近发言过的成员"),m=y(()=>{const n=d.value.length*36;return Math.max(n+30,180)}),b={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#06b6d4"},{offset:1,color:"#22d3ee"}]};function h(n){return n===0?"今天":n===1?"昨天":`${n} 天前`}const r=y(()=>{if(d.value.length===0)return{};const n=[...d.value].reverse(),v=n.map(_=>ve(_.name,s.value.labelMaxLength)),w=Math.max(...d.value.map(_=>_.daysSinceLastMessage),1),g=n.map(_=>({value:_.daysSinceLastMessage,itemStyle:{color:b,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"transparent",textStyle:{color:"#fff"},formatter:_=>{const R=_[0];if(!R)return"";const $=d.value.length-1-R.dataIndex,V=d.value[$];return`
39
+ `}},grid:{left:s.value.gridLeft,right:100,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:105,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:b,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(n,v)=>{const g=l.value.length-1-v+1;return`${g===1?"🥇":g===2?"🥈":g===3?"🥉":`${g}.`} ${n}`}}},series:[{type:"bar",data:r,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:n=>{const v=l.value.length-1-n.dataIndex,w=l.value[v];return`${c(w.avgTimeDiff)} · ${w.count}次`},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(245, 158, 11, 0.3)"}}}]}});return(m,b)=>i.bare?(o(),k(e(ce),{key:0,"content-height":u.value,"max-height-vh":i.maxHeightVh},{default:I(()=>[x(e(te),{option:p.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),k(e(O),{key:1,title:i.title,description:i.description,scrollable:"","max-height-vh":i.maxHeightVh},{default:I(()=>[a("div",Gs,[x(e(te),{option:p.value,height:u.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Js={class:"flex items-center gap-3"},Qs={class:"px-3 py-2"},Zs=U({__name:"EChartDivingRank",props:{items:{},showTopNSelect:{type:Boolean,default:!0},maxHeightVh:{default:60},globalTopN:{}},setup(i){const t=i,s=me(),l=S("desc"),u=S(t.globalTopN??10);E(()=>t.globalTopN,n=>{n!==void 0&&(u.value=n)});const d=y(()=>[...t.items].sort((v,w)=>l.value==="desc"?w.daysSinceLastMessage-v.daysSinceLastMessage:v.daysSinceLastMessage-w.daysSinceLastMessage).slice(0,u.value)),c=y(()=>l.value==="desc"?"🤿 潜水榜 - 潜水最久":"🤿 潜水榜 - 最近冒泡"),p=y(()=>l.value==="desc"?"距离上次发言时间最久的成员":"最近发言过的成员"),m=y(()=>{const n=d.value.length*36;return Math.max(n+30,180)}),b={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#06b6d4"},{offset:1,color:"#22d3ee"}]};function h(n){return n===0?"今天":n===1?"昨天":`${n} 天前`}const r=y(()=>{if(d.value.length===0)return{};const n=[...d.value].reverse(),v=n.map(_=>ve(_.name,s.value.labelMaxLength)),w=Math.max(...d.value.map(_=>_.daysSinceLastMessage),1),g=n.map(_=>({value:_.daysSinceLastMessage,itemStyle:{color:b,borderRadius:[0,4,4,0]}}));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"transparent",textStyle:{color:"#fff"},formatter:_=>{const R=_[0];if(!R)return"";const $=d.value.length-1-R.dataIndex,V=d.value[$];return`
40
40
  <div style="padding: 4px 8px;">
41
41
  <div style="font-weight: bold; margin-bottom: 6px;">${V.name}</div>
42
42
  <div style="margin-bottom: 4px;">🤿 ${h(V.daysSinceLastMessage)}</div>
43
- <div style="font-size: 12px; color: #9ca3af;">最后发言: ${Bt(V.lastMessageTs)}</div>
43
+ <div style="font-size: 12px; color: #9ca3af;">最后发言: ${Ut(V.lastMessageTs)}</div>
44
44
  </div>
45
- `}},grid:{left:s.value.gridLeft,right:100,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:w*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:v,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(_,R)=>{const V=d.value.length-1-R+1;return`${V===1?"🥇":V===2?"🥈":V===3?"🥉":`${V}.`} ${_}`}}},series:[{type:"bar",data:g,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:_=>{const R=d.value.length-1-_.dataIndex,$=d.value[R];return h($.daysSinceLastMessage)},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(0, 0, 0, 0.2)"}}}]}});return(n,v)=>(o(),k(e(O),{title:c.value,description:p.value,scrollable:"","max-height-vh":i.maxHeightVh},{headerRight:I(()=>[a("div",Qs,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:u.value,"onUpdate:modelValue":v[0]||(v[0]=w=>u.value=w)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:l.value,"onUpdate:modelValue":v[1]||(v[1]=w=>l.value=w),items:[{label:"潜水最久",value:"desc"},{label:"最近冒泡",value:"asc"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[a("div",Xs,[x(e(te),{option:r.value,height:m.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Zs={class:"px-3 py-2"},eo=B({__name:"EChartConsecutiveRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(i){const t=i,s=me(),l=y(()=>[...t.items].sort((m,b)=>b.maxConsecutiveDays-m.maxConsecutiveDays).slice(0,t.topN)),u=y(()=>{const m=l.value.length*36;return Math.max(m+30,180)}),d={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f97316"},{offset:1,color:"#fb923c"}]},c={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ec4899"},{offset:1,color:"#f472b6"}]},p=y(()=>{if(l.value.length===0)return{};const m=[...l.value].reverse(),b=m.map(r=>ve(r.name,s.value.labelMaxLength)),h=Math.max(...l.value.map(r=>r.maxConsecutiveDays),1);return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.85)",borderColor:"transparent",textStyle:{color:"#fff",fontSize:12},formatter:r=>{if(!r||r.length===0)return"";const n=r[0].dataIndex,v=l.value.length-1-n,w=l.value[v];let g=`
45
+ `}},grid:{left:s.value.gridLeft,right:100,top:15,bottom:15,containLabel:!1},xAxis:{type:"value",max:w*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:v,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(_,R)=>{const V=d.value.length-1-R+1;return`${V===1?"🥇":V===2?"🥈":V===3?"🥉":`${V}.`} ${_}`}}},series:[{type:"bar",data:g,barWidth:18,barCategoryGap:"30%",label:{show:!0,position:"right",distance:8,formatter:_=>{const R=d.value.length-1-_.dataIndex,$=d.value[R];return h($.daysSinceLastMessage)},fontSize:11,fontWeight:500,color:"#6b7280"},emphasis:{itemStyle:{shadowBlur:6,shadowColor:"rgba(0, 0, 0, 0.2)"}}}]}});return(n,v)=>(o(),k(e(O),{title:c.value,description:p.value,scrollable:"","max-height-vh":i.maxHeightVh},{headerRight:I(()=>[a("div",Js,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:u.value,"onUpdate:modelValue":v[0]||(v[0]=w=>u.value=w)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:l.value,"onUpdate:modelValue":v[1]||(v[1]=w=>l.value=w),items:[{label:"潜水最久",value:"desc"},{label:"最近冒泡",value:"asc"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[a("div",Qs,[x(e(te),{option:r.value,height:m.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),Xs={class:"px-3 py-2"},eo=U({__name:"EChartConsecutiveRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(i){const t=i,s=me(),l=y(()=>[...t.items].sort((m,b)=>b.maxConsecutiveDays-m.maxConsecutiveDays).slice(0,t.topN)),u=y(()=>{const m=l.value.length*36;return Math.max(m+30,180)}),d={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#f97316"},{offset:1,color:"#fb923c"}]},c={type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#ec4899"},{offset:1,color:"#f472b6"}]},p=y(()=>{if(l.value.length===0)return{};const m=[...l.value].reverse(),b=m.map(r=>ve(r.name,s.value.labelMaxLength)),h=Math.max(...l.value.map(r=>r.maxConsecutiveDays),1);return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.85)",borderColor:"transparent",textStyle:{color:"#fff",fontSize:12},formatter:r=>{if(!r||r.length===0)return"";const n=r[0].dataIndex,v=l.value.length-1-n,w=l.value[v];let g=`
46
46
  <div style="padding: 6px 8px;">
47
47
  <div style="font-weight: bold; margin-bottom: 6px;">${w.name}</div>
48
48
  <div>最长连续: <b style="color: #f472b6;">${w.maxConsecutiveDays}</b> 天</div>
49
- `;return w.currentStreak>0&&(g+=`<div style="color: #f97316;">🔥 当前连续 ${w.currentStreak} 天</div>`),g+="</div>",g}},legend:{show:!1},grid:{left:s.value.gridLeft,right:75,top:15,bottom:15,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:b,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(r,n)=>{const w=l.value.length-1-n+1;return`${w===1?"🥇":w===2?"🥈":w===3?"🥉":`${w}.`} ${r}`}}},series:[{name:"当前连续",type:"bar",data:m.map(r=>({value:r.currentStreak>0?r.maxConsecutiveDays:0,itemStyle:{color:d,borderRadius:[0,4,4,0]}})),barWidth:18,barGap:"-100%",label:{show:!0,position:"right",distance:8,formatter:r=>{const n=l.value.length-1-r.dataIndex,v=l.value[n];return v.currentStreak>0?`${v.maxConsecutiveDays} 天`:""},fontSize:11,fontWeight:500,color:"#6b7280"}},{name:"已中断",type:"bar",data:m.map(r=>({value:r.currentStreak===0?r.maxConsecutiveDays:0,itemStyle:{color:c,borderRadius:[0,4,4,0]}})),barWidth:18,label:{show:!0,position:"right",distance:8,formatter:r=>{const n=l.value.length-1-r.dataIndex,v=l.value[n];return v.currentStreak===0?`${v.maxConsecutiveDays} 天`:""},fontSize:11,fontWeight:500,color:"#6b7280"}}]}});return(m,b)=>i.bare?(o(),k(e(ce),{key:0,"content-height":u.value,"max-height-vh":i.maxHeightVh},{default:I(()=>[x(e(te),{option:p.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),k(e(O),{key:1,title:i.title,description:i.description,scrollable:"","max-height-vh":i.maxHeightVh},{default:I(()=>[a("div",Zs,[x(e(te),{option:p.value,height:u.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),to={class:"px-3 py-2"},ao=B({__name:"EChartNightOwlRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(i){const t=i,s=me(),l=y(()=>t.items.slice(0,t.topN)),u=y(()=>{const p=l.value.length*36;return Math.max(p+50,200)}),d={h23:"#8b5cf6",h0:"#3b82f6",h1:"#06b6d4",h2:"#f59e0b",h3to4:"#ef4444"},c=y(()=>{if(l.value.length===0)return{};const p=[...l.value].reverse(),m=p.map(h=>ve(h.name,s.value.labelMaxLength)),b=Math.max(...l.value.map(h=>h.totalNightMessages),1);return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.85)",borderColor:"transparent",textStyle:{color:"#fff",fontSize:12},formatter:h=>{if(!h||h.length===0)return"";const r=h[0].dataIndex,n=l.value.length-1-r,v=l.value[n],w=v.hourlyBreakdown;return`
49
+ `;return w.currentStreak>0&&(g+=`<div style="color: #f97316;">🔥 当前连续 ${w.currentStreak} 天</div>`),g+="</div>",g}},legend:{show:!1},grid:{left:s.value.gridLeft,right:75,top:15,bottom:15,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:b,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(r,n)=>{const w=l.value.length-1-n+1;return`${w===1?"🥇":w===2?"🥈":w===3?"🥉":`${w}.`} ${r}`}}},series:[{name:"当前连续",type:"bar",data:m.map(r=>({value:r.currentStreak>0?r.maxConsecutiveDays:0,itemStyle:{color:d,borderRadius:[0,4,4,0]}})),barWidth:18,barGap:"-100%",label:{show:!0,position:"right",distance:8,formatter:r=>{const n=l.value.length-1-r.dataIndex,v=l.value[n];return v.currentStreak>0?`${v.maxConsecutiveDays} 天`:""},fontSize:11,fontWeight:500,color:"#6b7280"}},{name:"已中断",type:"bar",data:m.map(r=>({value:r.currentStreak===0?r.maxConsecutiveDays:0,itemStyle:{color:c,borderRadius:[0,4,4,0]}})),barWidth:18,label:{show:!0,position:"right",distance:8,formatter:r=>{const n=l.value.length-1-r.dataIndex,v=l.value[n];return v.currentStreak===0?`${v.maxConsecutiveDays} 天`:""},fontSize:11,fontWeight:500,color:"#6b7280"}}]}});return(m,b)=>i.bare?(o(),k(e(ce),{key:0,"content-height":u.value,"max-height-vh":i.maxHeightVh},{default:I(()=>[x(e(te),{option:p.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),k(e(O),{key:1,title:i.title,description:i.description,scrollable:"","max-height-vh":i.maxHeightVh},{default:I(()=>[a("div",Xs,[x(e(te),{option:p.value,height:u.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),to={class:"px-3 py-2"},ao=U({__name:"EChartNightOwlRank",props:{items:{},title:{},description:{},topN:{default:10},maxHeightVh:{default:60},bare:{type:Boolean,default:!1}},setup(i){const t=i,s=me(),l=y(()=>t.items.slice(0,t.topN)),u=y(()=>{const p=l.value.length*36;return Math.max(p+50,200)}),d={h23:"#8b5cf6",h0:"#3b82f6",h1:"#06b6d4",h2:"#f59e0b",h3to4:"#ef4444"},c=y(()=>{if(l.value.length===0)return{};const p=[...l.value].reverse(),m=p.map(h=>ve(h.name,s.value.labelMaxLength)),b=Math.max(...l.value.map(h=>h.totalNightMessages),1);return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(0, 0, 0, 0.85)",borderColor:"transparent",textStyle:{color:"#fff",fontSize:12},formatter:h=>{if(!h||h.length===0)return"";const r=h[0].dataIndex,n=l.value.length-1-r,v=l.value[n],w=v.hourlyBreakdown;return`
50
50
  <div style="padding: 6px 8px;">
51
51
  <div style="font-weight: bold; margin-bottom: 6px;">${v.name}</div>
52
52
  <div style="margin-bottom: 4px;">
@@ -61,4 +61,4 @@ import{r as S,B as De,C as He,a as B,o,h as C,n as W,l as a,F as H,q as Y,v as f
61
61
  <div><span style="color: ${d.h3to4};">●</span> 3-4点: ${w.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:s.value.gridLeft,right:70,top:15,bottom:35,containLabel:!1},xAxis:{type:"value",max:b*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:m,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(h,r)=>{const v=l.value.length-1-r+1;return`${v===1?"🥇":v===2?"🥈":v===3?"🥉":`${v}.`} ${h}`}}},series:[{name:"23点",type:"bar",stack:"total",data:p.map(h=>h.hourlyBreakdown.h23),itemStyle:{color:d.h23},barWidth:18},{name:"0点",type:"bar",stack:"total",data:p.map(h=>h.hourlyBreakdown.h0),itemStyle:{color:d.h0},barWidth:18},{name:"1点",type:"bar",stack:"total",data:p.map(h=>h.hourlyBreakdown.h1),itemStyle:{color:d.h1},barWidth:18},{name:"2点",type:"bar",stack:"total",data:p.map(h=>h.hourlyBreakdown.h2),itemStyle:{color:d.h2},barWidth:18},{name:"3-4点",type:"bar",stack:"total",data:p.map(h=>h.hourlyBreakdown.h3to4),itemStyle:{color:d.h3to4,borderRadius:[0,4,4,0]},barWidth:18,label:{show:!0,position:"right",distance:8,formatter:h=>{const r=l.value.length-1-h.dataIndex;return`${l.value[r].totalNightMessages} 条`},fontSize:11,fontWeight:500,color:"#6b7280"}}]}});return(p,m)=>i.bare?(o(),k(e(ce),{key:0,"content-height":u.value,"max-height-vh":i.maxHeightVh},{default:I(()=>[x(e(te),{option:c.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),k(e(O),{key:1,title:i.title,description:i.description,scrollable:"","max-height-vh":i.maxHeightVh},{default:I(()=>[a("div",to,[x(e(te),{option:c.value,height:u.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),so={id:"streak-rank",class:"scroll-mt-24"},oo={class:"flex items-center gap-3"},lo=B({__name:"CheckInRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(i){const t=i,s=S(null),l=S(!1),u=S("max"),d=S(t.globalTopN??10);E(()=>t.globalTopN,h=>{h!==void 0&&(d.value=h)});const c=y(()=>u.value==="max"?"🔥 火花榜 - 最长连续":"🔥 火花榜 - 当前连续"),p=y(()=>u.value==="max"?"历史最长连续发言天数":"正在持续连续发言的成员"),m=y(()=>s.value?s.value.streakRank.some(h=>h.currentStreak>0):!1);async function b(){if(t.sessionId){l.value=!0;try{s.value=await J().getCheckInAnalysis(t.sessionId,t.timeFilter)}catch(h){console.error("加载打卡分析失败:",h)}finally{l.value=!1}}}return E(()=>[t.sessionId,t.timeFilter],()=>{b()},{immediate:!0,deep:!0}),(h,r)=>(o(),C("div",so,[l.value?(o(),k(e(oe),{key:0,text:"正在分析数据..."})):s.value&&s.value.streakRank.length>0?(o(),k(e(O),{key:1,title:c.value,description:p.value},{headerRight:I(()=>[a("div",oo,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:d.value,"onUpdate:modelValue":r[0]||(r[0]=n=>d.value=n)},null,8,["modelValue"])):A("",!0),m.value?(o(),k(e(re),{key:1,modelValue:u.value,"onUpdate:modelValue":r[1]||(r[1]=n=>u.value=n),items:[{label:"最长连续",value:"max"},{label:"当前连续",value:"current"}],size:"sm"},null,8,["modelValue"])):A("",!0)])]),default:I(()=>[x(e(Ws),{items:s.value.streakRank,title:c.value,mode:u.value,"top-n":d.value,bare:""},null,8,["items","title","mode","top-n"])]),_:1},8,["title","description"])):(o(),k(e(O),{key:2,title:"🔥 火花榜"},{default:I(()=>[x(e(ie),{text:"暂无连续发言数据"})]),_:1}))]))}}),no={class:"flex items-center gap-3"},io={key:1,class:"py-8 text-center text-sm text-gray-400"},ro={key:1,class:"py-8 text-center text-sm text-gray-400"},uo=B({__name:"MemeBattleRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(i){const t=i,s=S(null),l=S(!1),u=S("count"),d=S(t.globalTopN??10);E(()=>t.globalTopN,v=>{v!==void 0&&(d.value=v)});async function c(){if(t.sessionId){l.value=!0;try{s.value=await J().getMemeBattleAnalysis(t.sessionId,t.timeFilter)}catch(v){console.error("加载斗图分析失败:",v)}finally{l.value=!1}}}const p=y(()=>s.value?s.value.rankByCount.map(v=>({id:v.memberId.toString(),name:v.name,value:v.count,percentage:v.percentage})):[]),m=y(()=>s.value?s.value.rankByImageCount.map(v=>({id:v.memberId.toString(),name:v.name,value:v.count,percentage:v.percentage})):[]),b=y(()=>u.value==="count"?p.value:m.value),h=y(()=>u.value==="count"?"场":"张"),r=y(()=>{switch(u.value){case"battle":return"⚔️ 斗图榜 - 史诗级战役";case"count":return"⚔️ 斗图榜 - 按场次";case"image":return"⚔️ 斗图榜 - 按图量";default:return"⚔️ 斗图榜"}}),n=y(()=>{switch(u.value){case"battle":return"记录最激烈的斗图大战";case"count":return"参与斗图次数最多的人";case"image":return"在斗图中发送图片最多的人";default:return""}});return E(()=>[t.sessionId,t.timeFilter],()=>c(),{immediate:!0,deep:!0}),(v,w)=>l.value?(o(),k(e(oe),{key:0,text:"正在统计斗图数据..."})):s.value?(o(),k(e(O),{key:1,title:r.value,description:n.value},{headerRight:I(()=>[a("div",no,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:d.value,"onUpdate:modelValue":w[0]||(w[0]=g=>d.value=g)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:u.value,"onUpdate:modelValue":w[1]||(w[1]=g=>u.value=g),items:[{label:"按场次",value:"count"},{label:"按图量",value:"image"},{label:"史诗级战役",value:"battle"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[u.value==="battle"?(o(),C(H,{key:0},[s.value.topBattles.length>0?(o(),k(e(js),{key:0,battles:s.value.topBattles,title:"","top-n":d.value,bare:""},null,8,["battles","top-n"])):(o(),C("div",io,"暂无史诗级战役数据"))],64)):(o(),C(H,{key:1},[b.value.length>0?(o(),k(e(Te),{key:0,members:b.value,title:r.value,unit:h.value,"top-n":d.value,bare:""},null,8,["members","title","unit","top-n"])):(o(),C("div",ro,"暂无斗图数据"))],64))]),_:1},8,["title","description"])):A("",!0)}}),co={class:"space-y-6"},mo={class:"flex items-center gap-3"},vo={class:"flex items-center gap-3"},po={key:1,class:"px-3 py-2"},go=B({__name:"RepeatSection",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(i){const t=i,s=S(null),l=S(!1),u=S("originator"),d=S("fastest"),c=S(t.globalTopN??10),p=S(t.globalTopN??10);E(()=>t.globalTopN,$=>{$!==void 0&&(c.value=$,p.value=$)});async function m(){if(t.sessionId){l.value=!0;try{s.value=await J().getRepeatAnalysis(t.sessionId,t.timeFilter)}catch($){console.error("加载复读分析失败:",$)}finally{l.value=!1}}}const b=y(()=>s.value?s.value.originators.map($=>({id:$.memberId.toString(),name:$.name,value:$.count,percentage:$.percentage})):[]),h=y(()=>s.value?s.value.initiators.map($=>({id:$.memberId.toString(),name:$.name,value:$.count,percentage:$.percentage})):[]),r=y(()=>s.value?s.value.breakers.map($=>({id:$.memberId.toString(),name:$.name,value:$.count,percentage:$.percentage})):[]),n=y(()=>{switch(u.value){case"originator":return b.value;case"initiator":return h.value;case"breaker":return r.value;default:return b.value}}),v=y(()=>{switch(u.value){case"originator":return"🔁 复读榜 - 被复读";case"initiator":return"🔁 复读榜 - 挑起";case"breaker":return"🔁 复读榜 - 打断";default:return"🔁 复读榜"}}),w=y(()=>{switch(u.value){case"originator":return"发出的消息被别人复读的次数";case"initiator":return"第二个发送相同消息、带起节奏的人";case"breaker":return"终结复读链的人";default:return""}}),g=y(()=>{if(!s.value)return{labels:[],values:[]};const $=s.value.chainLengthDistribution;return{labels:$.map(V=>`${V.length}人`),values:$.map(V=>V.count)}}),_=y(()=>d.value==="fastest"?"📊 复读统计 - 最快反应":"📊 复读统计 - 链长分布"),R=y(()=>{if(d.value==="fastest")return"平均复读反应时间(至少参与5次复读)";const $=s.value?.totalRepeatChains??0,V=s.value?.avgChainLength??0;return`共 ${$} 次复读,平均 ${V} 人参与`});return E(()=>[t.sessionId,t.timeFilter],()=>m(),{immediate:!0,deep:!0}),($,V)=>(o(),C("div",co,[l.value?(o(),k(e(oe),{key:0,text:"正在分析复读数据..."})):s.value&&s.value.totalRepeatChains>0?(o(),C(H,{key:1},[x(e(O),{title:v.value,description:w.value},{headerRight:I(()=>[a("div",mo,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:c.value,"onUpdate:modelValue":V[0]||(V[0]=z=>c.value=z)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:u.value,"onUpdate:modelValue":V[1]||(V[1]=z=>u.value=z),items:[{label:"被复读",value:"originator"},{label:"挑起",value:"initiator"},{label:"打断",value:"breaker"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[n.value.length>0?(o(),k(e(Te),{key:0,members:n.value,title:v.value,unit:"次","top-n":c.value,bare:""},null,8,["members","title","top-n"])):(o(),k(e(ie),{key:1,text:"暂无数据"}))]),_:1},8,["title","description"]),x(e(O),{title:_.value,description:R.value},{headerRight:I(()=>[a("div",vo,[i.showTopNSelect&&d.value==="fastest"?(o(),k(e(ue),{key:0,modelValue:p.value,"onUpdate:modelValue":V[2]||(V[2]=z=>p.value=z)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:d.value,"onUpdate:modelValue":V[3]||(V[3]=z=>d.value=z),items:[{label:"最快反应",value:"fastest"},{label:"链长分布",value:"distribution"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[d.value==="fastest"?(o(),C(H,{key:0},[s.value.fastestRepeaters&&s.value.fastestRepeaters.length>0?(o(),k(e(Gs),{key:0,items:s.value.fastestRepeaters,"top-n":p.value,title:"",bare:""},null,8,["items","top-n"])):(o(),k(e(ie),{key:1,text:"暂无最快复读数据"}))],64)):(o(),C("div",po,[g.value.labels.length>0?(o(),k(e(Nt),{key:0,data:g.value,height:200},null,8,["data"])):(o(),k(e(ie),{key:1,text:"暂无分布数据"}))]))]),_:1},8,["title","description"])],64)):(o(),k(e(O),{key:2,title:"🔁 复读榜"},{default:I(()=>[x(e(ie),{text:"该群组暂无复读记录"})]),_:1}))]))}}),ho=B({__name:"DivingRank",props:{sessionId:{},timeFilter:{},globalTopN:{}},setup(i){const t=i,s=S(null),l=S(!1);async function u(){if(t.sessionId){l.value=!0;try{s.value=await J().getDivingAnalysis(t.sessionId,t.timeFilter)}catch(d){console.error("加载潜水分析失败:",d)}finally{l.value=!1}}}return E(()=>[t.sessionId,t.timeFilter],()=>u(),{immediate:!0,deep:!0}),(d,c)=>l.value?(o(),k(e(oe),{key:0,text:"正在统计潜水数据..."})):s.value&&s.value.rank.length>0?(o(),k(e(Js),{key:1,items:s.value.rank,"global-top-n":i.globalTopN},null,8,["items","global-top-n"])):A("",!0)}}),fo={class:"space-y-6"},yo={class:"flex items-center gap-3"},bo={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"},ko={class:"flex items-center gap-3"},wo={key:1,class:"py-8 text-center text-sm text-gray-400"},_o=B({__name:"NightOwlRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(i){const t=i,s=S(null),l=S(!1),u=S("first"),d=S("distribution"),c=S(t.globalTopN??10),p=S(t.globalTopN??10);E(()=>t.globalTopN,_=>{_!==void 0&&(c.value=_,p.value=_)});async function m(){if(t.sessionId){l.value=!0;try{s.value=await J().getNightOwlAnalysis(t.sessionId,t.timeFilter)}catch(_){console.error("加载出勤分析失败:",_)}finally{l.value=!1}}}const b=y(()=>s.value?s.value.lastSpeakerRank.map(_=>({id:String(_.memberId),name:_.name,value:_.count,percentage:_.percentage})):[]),h=y(()=>s.value?s.value.firstSpeakerRank.map(_=>({id:String(_.memberId),name:_.name,value:_.count,percentage:_.percentage})):[]),r=y(()=>u.value==="last"?b.value:h.value),n=y(()=>u.value==="last"?"⏰ 出勤排行 - 最晚下班":"⏰ 出勤排行 - 最早上班"),v=y(()=>{const _=s.value?.totalDays??0;return u.value==="last"?`每天最后一个发言的人(共 ${_} 天)`:`每天第一个发言的人(共 ${_} 天)`}),w=y(()=>d.value==="distribution"?"🦉 修仙统计 - 发言分布":"🦉 修仙统计 - 连续记录"),g=y(()=>d.value==="distribution"?"深夜时段(23:00-05:00)各时段发言分布":"连续在深夜时段发言的天数");return E(()=>[t.sessionId,t.timeFilter],()=>m(),{immediate:!0,deep:!0}),(_,R)=>(o(),C("div",fo,[l.value?(o(),k(e(oe),{key:0,text:"正在加载出勤分析..."})):s.value?(o(),C(H,{key:1},[x(e(O),{title:w.value,description:g.value},{headerRight:I(()=>[a("div",yo,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:c.value,"onUpdate:modelValue":R[0]||(R[0]=$=>c.value=$)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:d.value,"onUpdate:modelValue":R[1]||(R[1]=$=>d.value=$),items:[{label:"发言分布",value:"distribution"},{label:"连续记录",value:"consecutive"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[d.value==="distribution"?(o(),C(H,{key:0},[s.value.nightOwlRank.length>0?(o(),k(e(ao),{key:0,items:s.value.nightOwlRank,"top-n":c.value,title:"",bare:""},null,8,["items","top-n"])):(o(),C("div",bo,"暂无深夜发言数据"))],64)):(o(),C(H,{key:1},[s.value.consecutiveRecords.length>0?(o(),k(e(eo),{key:0,items:s.value.consecutiveRecords,"top-n":c.value,title:"",bare:""},null,8,["items","top-n"])):(o(),C("div",xo,"暂无连续记录"))],64))]),_:1},8,["title","description"]),x(e(O),{title:n.value,description:v.value},{headerRight:I(()=>[a("div",ko,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:p.value,"onUpdate:modelValue":R[2]||(R[2]=$=>p.value=$)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:u.value,"onUpdate:modelValue":R[3]||(R[3]=$=>u.value=$),items:[{label:"最早上班",value:"first"},{label:"最晚下班",value:"last"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[r.value.length>0?(o(),k(e(Te),{key:0,members:r.value,title:n.value,"top-n":p.value,unit:"次",bare:""},null,8,["members","title","top-n"])):(o(),C("div",wo,"暂无数据"))]),_:1},8,["title","description"])],64)):A("",!0)]))}}),$o={class:"mb-8 mt-4"},To={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"}},Co={id:"activity-rank",class:"scroll-mt-24"},Io={id:"meme-battle",class:"scroll-mt-24"},So={id:"repeat",class:"scroll-mt-24"},Ro={id:"night-owl",class:"scroll-mt-24"},Vo={id:"diving",class:"scroll-mt-24"},Mo={class:"border-l border-gray-200 pl-4 dark:border-gray-800"},Lo={class:"mt-4 border-l border-gray-200 pl-4 dark:border-gray-800"},Do={class:"flex rounded-lg border border-gray-200 bg-white p-0.5 text-xs dark:border-gray-700 dark:bg-page-dark"},No=["onClick"],Ao=B({__name:"OverallRankingTab",props:{sessionId:{},timeFilter:{}},setup(i){const t=i,s=S([]),l=S([]);async function u(){if(!t.sessionId)return;const g=J(),[_,R]=await Promise.all([g.getMemberActivity(t.sessionId,t.timeFilter),g.getAvailableYears(t.sessionId)]);s.value=_,l.value=R}E(()=>[t.sessionId,t.timeFilter],()=>u(),{immediate:!0,deep:!0});const d=y(()=>{if(t.timeFilter?.startTs&&t.timeFilter?.endTs){const g=new Date(t.timeFilter.startTs*1e3).getFullYear(),_=new Date(t.timeFilter.endTs*1e3).getFullYear();return g===_?`${g} 赛季`:`${g}-${_} 赛季`}if(l.value.length>0){const g=[...l.value].sort(($,V)=>$-V),_=g[0],R=g[g.length-1];return _===R?`${_} 赛季`:`${_}-${R} 赛季`}return"全部赛季"}),c=y(()=>({startTs:t.timeFilter?.startTs,endTs:t.timeFilter?.endTs})),p=[{id:"activity-rank",label:"🏆 活跃榜"},{id:"streak-rank",label:"🔥 火花榜"},{id:"meme-battle",label:"⚔️ 斗图榜"},{id:"repeat",label:"🔁 复读榜"},{id:"night-owl",label:"⏰ 出勤榜"},{id:"diving",label:"🤿 潜水榜"}],{contentRef:m,activeAnchor:b,scrollToAnchor:h}=Jt(p,{threshold:350}),r=S(10),n=S("standard");We(Xe,n);const v=[{value:"standard",label:"标准"},{value:"wide",label:"宽屏"},{value:"full",label:"全宽"}],w=y(()=>Je[n.value].contentClass);return(g,_)=>(o(),C("div",{ref_key:"contentRef",ref:m,class:"flex gap-6 p-6"},[a("div",{class:W(["main-content mx-auto min-w-0 flex-1 space-y-6 px-8",w.value])},[a("div",$o,[a("h1",To," 🏆 "+f(d.value),1),_[1]||(_[1]=a("p",{class:"mt-4 text-sm text-gray-500 dark:text-gray-400"},"各榜单前三名请找群主领取奖励 🎁",-1))]),a("div",Co,[x(e(Hs),{"session-id":t.sessionId,"member-activity":s.value,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","member-activity","time-filter","global-top-n"])]),x(e(lo),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"]),a("div",Io,[x(e(uo),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),a("div",So,[x(e(go),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),a("div",Ro,[x(e(_o),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),a("div",Vo,[x(e(ho),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),_[2]||(_[2]=a("div",{class:"h-48 no-capture"},null,-1))],2),x(e(sa),{anchors:p,"active-anchor":e(b),onClick:e(h)},{default:I(()=>[a("div",Mo,[_[3]||(_[3]=a("div",{class:"mb-2 text-xs text-gray-400"},"显示数量",-1)),x(e(ue),{modelValue:r.value,"onUpdate:modelValue":_[0]||(_[0]=R=>r.value=R)},null,8,["modelValue"])]),a("div",Lo,[_[4]||(_[4]=a("div",{class:"mb-2 text-xs text-gray-400"},"榜单宽度",-1)),a("div",Do,[(o(),C(H,null,Y(v,R=>a("button",{key:R.value,type:"button",class:W(["rounded-md px-2 py-1 transition",n.value===R.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:$=>n.value=R.value},f(R.label),11,No)),64))])])]),_:1},8,["active-anchor","onClick"])],512))}}),qo={class:"main-content mx-auto max-w-3xl p-4 sm:p-6"},Fo=B({__name:"InteractionRankingTab",props:{sessionId:{},timeFilter:{}},setup(i){const{t}=Z(),s=i,l=S(null),u=S(!1);async function d(){if(s.sessionId){u.value=!0;try{l.value=await J().getMentionAnalysis(s.sessionId,s.timeFilter)}catch(n){console.error("加载 @ 互动分析失败:",n)}finally{u.value=!1}}}const c=y(()=>l.value?l.value.topMentioners.map(n=>({id:n.memberId.toString(),name:n.name,value:n.count,percentage:n.percentage})):[]),p=y(()=>l.value?l.value.topMentioned.map(n=>({id:n.memberId.toString(),name:n.name,value:n.count,percentage:n.percentage})):[]),m=S("mentioners"),b=y(()=>[{label:t("members.relationships.rankModes.mentioners"),value:"mentioners"},{label:t("members.relationships.rankModes.mentioned"),value:"mentioned"}]),h=y(()=>m.value==="mentioners"?c.value:p.value),r=y(()=>m.value==="mentioners"?t("members.relationships.topMentionersDescription"):t("members.relationships.topMentionedDescription"));return E(()=>[s.sessionId,s.timeFilter],()=>{d()},{immediate:!0,deep:!0}),(n,v)=>(o(),C("div",qo,[u.value?(o(),k(e(oe),{key:0,text:e(t)("members.relationships.loading")},null,8,["text"])):l.value&&l.value.totalMentions>0&&h.value.length>0?(o(),k(e(Ta),{key:1,members:h.value,title:e(t)("members.relationships.rankingTitle"),description:r.value,unit:e(t)("members.relationships.times")},{headerRight:I(()=>[x(e(re),{modelValue:m.value,"onUpdate:modelValue":v[0]||(v[0]=w=>m.value=w),items:b.value,size:"sm"},null,8,["modelValue","items"])]),_:1},8,["members","title","description","unit"])):(o(),k(e(O),{key:2,title:e(t)("members.relationships.emptyTitle")},{default:I(()=>[x(e(ie),{text:e(t)("members.relationships.empty")},null,8,["text"])]),_:1},8,["title"]))]))}}),Bo={class:"mx-auto h-full max-w-[920px] p-2 sm:p-4"},Uo={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"},zo={class:"flex items-center gap-3"},Ho={class:"inline-flex items-center",role:"group"},Po={class:"flex items-center gap-3"},Eo={class:"p-3 w-64"},Oo={class:"text-sm font-medium mb-3"},Wo={class:"space-y-3"},Ko={class:"text-xs text-gray-500 mb-1 block"},jo={class:"text-xs text-gray-400 mt-1"},Yo={class:"text-xs text-gray-500 mb-1 block"},Go={class:"text-xs text-gray-400 mt-1"},Qo={class:"flex-1 min-h-0 overflow-hidden"},Xo={key:0,class:"h-full flex items-center justify-center"},Jo={key:1,class:"h-full flex items-center justify-center"},Zo={class:"text-center text-gray-400"},el={key:2,class:"h-full"},tl={key:3,class:"h-full flex overflow-hidden"},al={class:"w-64 border-r border-gray-200 dark:border-gray-700 flex flex-col overflow-hidden"},sl={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},ol={class:"text-sm font-medium flex items-center gap-2"},ll={class:"flex-1 overflow-y-auto"},nl=["onClick"],il={class:"flex items-center justify-between"},rl={class:"text-sm truncate"},ul={class:"text-xs text-gray-400"},dl={class:"flex-1 overflow-hidden flex flex-col"},cl={key:0,class:"flex-1 flex items-center justify-center"},ml={class:"text-center text-gray-400"},vl={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 flex items-center gap-3"},pl={class:"w-10 h-10 rounded-full flex items-center justify-center text-white font-bold bg-primary-500"},gl={class:"font-medium"},hl={class:"text-xs text-gray-400"},fl={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},yl={class:"text-sm font-medium flex items-center gap-2"},bl={class:"flex-1 overflow-y-auto"},xl={key:0,class:"p-4 text-center text-gray-400"},kl={class:"flex items-center gap-3"},wl={class:"flex-1 min-w-0"},_l={class:"text-sm font-medium truncate"},$l={class:"flex items-center gap-3 mt-0.5 text-xs text-gray-400"},Tl={class:"w-20 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},Cl={key:4,class:"h-full flex flex-col overflow-hidden"},Il={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},Sl={class:"text-sm font-medium flex items-center gap-2"},Rl={class:"flex-1 overflow-y-auto"},Vl={class:"flex items-center gap-3"},Ml={class:"flex-1 min-w-0"},Ll={class:"flex items-center gap-2 text-sm"},Dl={class:"font-medium truncate"},Nl={class:"font-medium truncate"},Al={class:"flex items-center gap-3 mt-1 text-xs text-gray-400"},ql={class:"w-24 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},Fl={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"},Bl=B({__name:"ProximityRankingTab",props:{sessionId:{},timeFilter:{}},setup(i){Ot([Wt,Kt,jt,Yt,Gt]);const t=i,{t:s}=Z(),l=rt(),u=y(()=>l.value==="dark"),d=S(!0);At(d);const c=S(null),p=S("matrix"),m=S(null),b=S({lookAhead:3,decaySeconds:120,topEdges:150}),h=S(null);let r=null;async function n(){if(t.sessionId){d.value=!0;try{c.value=await J().getClusterGraph(t.sessionId,t.timeFilter,{lookAhead:b.value.lookAhead,decaySeconds:b.value.decaySeconds,topEdges:b.value.topEdges})}catch(D){console.error("[chart-cluster] 加载小团体关系数据失败:",D),c.value=null}finally{d.value=!1}}}const v=y(()=>{if(!c.value||c.value.nodes.length===0)return null;const{nodes:D,links:F,maxLinkValue:P}=c.value,G=[...D].sort((U,j)=>j.messageCount-U.messageCount).slice(0,20).map(U=>U.name),K=new Map;for(const U of F)K.set(`${U.source}-${U.target}`,U.value),K.set(`${U.target}-${U.source}`,U.value);const N=[];for(let U=0;U<G.length;U++)for(let j=0;j<G.length;j++)if(U===j)N.push([U,j,-1]);else{const pe=K.get(`${G[U]}-${G[j]}`)||0;N.push([U,j,pe])}return{names:G,data:N,maxValue:P}});function w(){if(!v.value)return{graphic:{type:"text",style:{text:s("views.cluster.noData"),fill:"#999"}}};const{names:D,data:F,maxValue:P}=v.value;return{tooltip:{position:"top",formatter:ee=>{const[G,K,N]=ee.data;return N<0?`${D[G]}`:N===0?`${D[G]} ↔ ${D[K]}<br/>暂无关系数据`:`${D[G]} ↔ ${D[K]}<br/>临近度: ${N.toFixed(2)}`}},grid:{left:120,right:40,top:40,bottom:120},xAxis:{type:"category",data:D,splitArea:{show:!0},axisLabel:{rotate:45,fontSize:10,color:u.value?"#ccc":"#333"}},yAxis:{type:"category",data:D,splitArea:{show:!0},axisLabel:{fontSize:10,color:u.value?"#ccc":"#333"}},visualMap:{min:0,max:P||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:F.filter(ee=>ee[2]>=0),label:{show:!1},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}],backgroundColor:"transparent"}}const g=y(()=>c.value?[...c.value.nodes].sort((D,F)=>F.messageCount-D.messageCount):[]),_=y(()=>!c.value||m.value===null?null:c.value.nodes.find(D=>D.id===m.value)||null),R=y(()=>{if(!c.value||!_.value)return[];const D=_.value.name,F=[];for(const P of c.value.links)P.source===D?F.push({otherName:P.target,value:P.value,coOccurrenceCount:P.coOccurrenceCount}):P.target===D&&F.push({otherName:P.source,value:P.value,coOccurrenceCount:P.coOccurrenceCount});return F.sort((P,ee)=>ee.value-P.value),F}),$=y(()=>c.value?c.value.links.slice(0,50):[]);function V(){r&&p.value==="matrix"&&r.setOption(w(),{notMerge:!0})}function z(){h.value&&(r=Qt(h.value,u.value?"dark":void 0),V())}function ae(){r?.resize()}return E(p,async(D,F)=>{F==="matrix"&&r&&(r.dispose(),r=null),D==="matrix"&&(await Me(),z())}),E([c,()=>u.value],()=>{p.value==="matrix"&&V()},{deep:!0}),E(d,async(D,F)=>{F&&!D&&p.value==="matrix"&&(r&&(r.dispose(),r=null),await Me(),z())}),E(()=>[t.sessionId,t.timeFilter],()=>n(),{immediate:!0,deep:!0}),De(()=>{window.addEventListener("resize",ae),p.value==="matrix"&&Me(()=>z())}),He(()=>{window.removeEventListener("resize",ae),r?.dispose(),r=null}),(D,F)=>{const P=be,ee=Oe,G=ut,K=xe;return o(),C("div",Bo,[x(e(Et),{class:"flex h-full flex-col"},{default:I(()=>[a("div",Uo,[a("div",zo,[a("div",Ho,[x(P,{size:"xs",color:p.value==="matrix"?"primary":"neutral",variant:p.value==="matrix"?"solid":"ghost",onClick:F[0]||(F[0]=N=>p.value="matrix")},{default:I(()=>[Q(f(e(s)("views.cluster.matrixView")),1)]),_:1},8,["color","variant"]),x(P,{size:"xs",color:p.value==="member"?"primary":"neutral",variant:p.value==="member"?"solid":"ghost",onClick:F[1]||(F[1]=N=>p.value="member")},{default:I(()=>[Q(f(e(s)("views.cluster.memberView")),1)]),_:1},8,["color","variant"]),x(P,{size:"xs",color:p.value==="circle"?"primary":"neutral",variant:p.value==="circle"?"solid":"ghost",onClick:F[2]||(F[2]=N=>p.value="circle")},{default:I(()=>[Q(f(e(s)("views.cluster.rankingView")),1)]),_:1},8,["color","variant"])])]),a("div",Po,[x(G,null,{content:I(()=>[a("div",Eo,[a("h4",Oo,f(e(s)("views.cluster.modelSettings")),1),a("div",Wo,[a("div",null,[a("label",Ko,f(e(s)("views.cluster.lookAhead")),1),x(ee,{modelValue:b.value.lookAhead,"onUpdate:modelValue":F[3]||(F[3]=N=>b.value.lookAhead=N),modelModifiers:{number:!0},type:"number",min:1,max:10,size:"xs",placeholder:"1-10"},null,8,["modelValue"]),a("p",jo,f(e(s)("views.cluster.lookAheadDesc")),1)]),a("div",null,[a("label",Yo,f(e(s)("views.cluster.decaySeconds")),1),x(ee,{modelValue:b.value.decaySeconds,"onUpdate:modelValue":F[4]||(F[4]=N=>b.value.decaySeconds=N),modelModifiers:{number:!0},type:"number",min:30,max:3600,size:"xs",placeholder:"30-3600"},null,8,["modelValue"]),a("p",Go,f(e(s)("views.cluster.decaySecondsDesc")),1)]),x(P,{size:"xs",color:"primary",class:"w-full mt-2",onClick:n},{default:I(()=>[Q(f(e(s)("views.cluster.applySettings")),1)]),_:1})])])]),default:I(()=>[x(P,{variant:"ghost",size:"xs",icon:"i-heroicons-adjustments-horizontal"})]),_:1}),x(P,{variant:"ghost",size:"xs",icon:"i-heroicons-arrow-path",onClick:n})])]),a("div",Qo,[d.value?(o(),C("div",Xo,[x(K,{name:"i-heroicons-arrow-path",class:"w-6 h-6 animate-spin text-gray-400"})])):!c.value||c.value.nodes.length===0?(o(),C("div",Jo,[a("div",Zo,[x(K,{name:"i-heroicons-user-group",class:"w-12 h-12 mx-auto mb-2 opacity-50"}),a("p",null,f(e(s)("views.cluster.noData")),1)])])):p.value==="matrix"?(o(),C("div",el,[a("div",{ref_key:"chartRef",ref:h,class:"w-full h-full"},null,512)])):p.value==="member"?(o(),C("div",tl,[a("div",al,[a("div",sl,[a("h3",ol,[x(K,{name:"i-heroicons-users",class:"w-4 h-4"}),Q(" "+f(e(s)("views.cluster.selectMember")),1)])]),a("div",ll,[(o(!0),C(H,null,Y(g.value,N=>(o(),C("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:U=>m.value=N.id},[a("div",il,[a("span",rl,f(N.name),1),a("span",ul,f(N.messageCount),1)])],10,nl))),128))])]),a("div",dl,[_.value?(o(),C(H,{key:1},[a("div",vl,[a("div",pl,f(_.value.name.charAt(0)),1),a("div",null,[a("div",gl,f(_.value.name),1),a("div",hl,f(e(s)("views.cluster.msgCount"))+": "+f(_.value.messageCount)+" | "+f(e(s)("views.cluster.relationCount"))+": "+f(R.value.length),1)])]),a("div",fl,[a("h3",yl,[x(K,{name:"i-heroicons-heart",class:"w-4 h-4 text-pink-500"}),Q(" "+f(e(s)("views.cluster.relationsByIntimacy")),1)])]),a("div",bl,[R.value.length===0?(o(),C("div",xl,f(e(s)("views.cluster.noRelations")),1)):A("",!0),(o(!0),C(H,null,Y(R.value,(N,U)=>(o(),C("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"},[a("div",kl,[a("span",{class:W(["w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold",U<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"])},f(U+1),3),a("div",wl,[a("div",_l,f(N.otherName),1),a("div",$l,[a("span",null,f(e(s)("views.cluster.intimacy"))+": "+f((N.value*100).toFixed(0))+"%",1),a("span",null,f(e(s)("views.cluster.coOccurrence"))+": "+f(N.coOccurrenceCount)+f(e(s)("views.cluster.times")),1)])]),a("div",Tl,[a("div",{class:"h-full bg-linear-to-r from-pink-400 to-pink-600",style:he({width:`${R.value[0]?.value?N.value/R.value[0].value*100:0}%`})},null,4)])])]))),128))])],64)):(o(),C("div",cl,[a("div",ml,[x(K,{name:"i-heroicons-cursor-arrow-rays",class:"w-12 h-12 mx-auto mb-2 opacity-50"}),a("p",null,f(e(s)("views.cluster.selectMemberHint")),1)])]))])])):(o(),C("div",Cl,[a("div",Il,[a("h3",Sl,[x(K,{name:"i-heroicons-trophy",class:"w-4 h-4 text-yellow-500"}),Q(" "+f(e(s)("views.cluster.interactionRanking")),1)])]),a("div",Rl,[(o(!0),C(H,null,Y($.value,(N,U)=>(o(),C("div",{key:U,class:"px-4 py-3 border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50"},[a("div",Vl,[a("span",{class:W(["w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold",U<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"])},f(U+1),3),a("div",Ml,[a("div",Ll,[a("span",Dl,f(N.source),1),F[5]||(F[5]=a("span",{class:"text-gray-400"},"↔",-1)),a("span",Nl,f(N.target),1)]),a("div",Al,[a("span",null,f(e(s)("views.cluster.score"))+": "+f(N.value.toFixed(2)),1),a("span",null,f(e(s)("views.cluster.coOccurrence"))+": "+f(N.coOccurrenceCount)+f(e(s)("views.cluster.times")),1)])]),a("div",ql,[a("div",{class:"h-full bg-linear-to-r from-yellow-400 to-orange-500",style:he({width:`${$.value[0]?.value?N.value/$.value[0].value*100:0}%`})},null,4)])])]))),128))])]))]),c.value?(o(),C("div",Fl,[a("span",null,f(e(s)("views.cluster.totalMembers"))+": "+f(c.value.stats.totalMembers),1),a("span",null,f(e(s)("views.cluster.totalMessages"))+": "+f(c.value.stats.totalMessages.toLocaleString()),1),a("span",null,f(e(s)("views.cluster.involvedMembers"))+": "+f(c.value.stats.involvedMembers),1),a("span",null,f(e(s)("views.cluster.edgeCount"))+": "+f(c.value.stats.edgeCount),1)])):A("",!0)]),_:1})])}}}),Ul={class:"flex h-full flex-col"},zl={class:"min-h-0 flex-1 overflow-y-auto"},Hl={key:3,class:"main-content mx-auto w-full max-w-3xl p-6"},Pl=B({__name:"RankingView",props:{sessionId:{},timeFilter:{},visibleTabIds:{}},setup(i){const t=i,{t:s,locale:l}=Z(),u=S("overall"),d=S(null),c=y(()=>dt("groupRanking",l.value)),p=r=>!t.visibleTabIds||t.visibleTabIds.includes(r),m=y(()=>[...c.value&&p("overall")?[{id:"overall",label:s("analysis.subTabs.ranking.overall"),icon:"i-heroicons-trophy"}]:[],{id:"interaction",label:s("analysis.subTabs.ranking.interaction"),icon:"i-heroicons-heart"},{id:"proximity",label:s("analysis.subTabs.ranking.proximity"),icon:"i-heroicons-user-group"},{id:"hot-repeat",label:s("analysis.subTabs.quotes.hotRepeat"),icon:"i-heroicons-sparkles"},{id:"catchphrase",label:s("analysis.subTabs.quotes.catchphrase"),icon:"i-heroicons-chat-bubble-bottom-center-text"},{id:"keyword",label:s("analysis.subTabs.ranking.keyword"),icon:"i-heroicons-magnifying-glass"}].filter(n=>p(n.id))),b=y(()=>({startTs:t.timeFilter?.startTs,endTs:t.timeFilter?.endTs})),h=y(()=>({...b.value,memberId:d.value}));return E(m,r=>{r.some(n=>n.id===u.value)||(u.value=r[0]?.id??"hot-repeat")},{immediate:!0}),(r,n)=>(o(),C("div",Ul,[x(e(Ge),{modelValue:u.value,"onUpdate:modelValue":n[1]||(n[1]=v=>u.value=v),items:m.value,"persist-key":"groupRankingTab"},{right:I(()=>[u.value==="catchphrase"?(o(),k(Ye,{key:0,modelValue:d.value,"onUpdate:modelValue":n[0]||(n[0]=v=>d.value=v),"session-id":t.sessionId},null,8,["modelValue","session-id"])):A("",!0)]),_:1},8,["modelValue","items"]),a("div",zl,[x(Ke,{name:"fade",mode:"out-in"},{default:I(()=>[u.value==="overall"?(o(),k(Ao,{key:0,"session-id":t.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])):u.value==="interaction"?(o(),k(Fo,{key:1,"session-id":t.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])):u.value==="proximity"?(o(),k(Bl,{key:2,"session-id":t.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])):u.value==="keyword"?(o(),C("div",Hl,[x(Bs,{"session-id":t.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])])):u.value==="hot-repeat"?(o(),k(e(Ja),{key:4,"session-id":t.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])):u.value==="catchphrase"?(o(),k(e(za),{key:5,"session-id":t.sessionId,"time-filter":h.value},null,8,["session-id","time-filter"])):A("",!0)]),_:1})])]))}}),El=je(Pl,[["__scopeId","data-v-616e92db"]]),Ol={class:"main-content max-w-5xl p-6"},Wl={class:"mb-4 text-sm text-gray-500 dark:text-gray-400 no-capture"},Kl={key:0,class:"divide-y divide-gray-100 dark:divide-gray-800"},jl={class:"w-32 shrink-0 pt-0.5 font-medium text-gray-900 dark:text-white"},Yl={class:"flex flex-1 flex-wrap items-center gap-2"},Gl={class:"flex items-center gap-1.5 rounded-lg bg-gray-50 px-3 py-1.5 dark:bg-gray-800"},Ql={class:"text-xs text-gray-400"},Xl={key:0,class:"text-gray-300 dark:text-gray-600"},Jl=B({__name:"NicknameHistory",props:{sessionId:{}},setup(i){const{t}=Z(),s=i,l=S([]),u=S([]),d=S(!1);function c(b){return b.groupNickname||b.accountName||b.platformId}async function p(){if(s.sessionId)try{l.value=await J().getMembers(s.sessionId)}catch(b){console.error("加载成员列表失败:",b)}}async function m(){if(!s.sessionId||l.value.length===0)return;d.value=!0;const b=[];try{const h=l.value.map(n=>J().getMemberNameHistory(s.sessionId,n.id)),r=await Promise.all(h);l.value.forEach((n,v)=>{const w=r[v];w.length>2&&b.push({memberId:n.id,name:c(n),history:w})}),u.value=b}catch(h){console.error("加载昵称变更记录失败:",h)}finally{d.value=!1}}return E(()=>s.sessionId,async()=>{await p()},{immediate:!0}),E(()=>l.value.length,()=>{l.value.length>0&&m()}),De(async()=>{l.value.length===0&&await p()}),(b,h)=>{const r=Qe;return o(),C("div",Ol,[a("p",Wl,f(e(t)("members.nicknameHistory.note")),1),x(e(O),{title:e(t)("members.nicknameHistory.title"),description:d.value?e(t)("members.nicknameHistory.loading"):u.value.length>0?e(t)("members.nicknameHistory.hasChanges",{count:u.value.length}):e(t)("members.nicknameHistory.noChanges")},{default:I(()=>[!d.value&&u.value.length>0?(o(),C("div",Kl,[(o(!0),C(H,null,Y(u.value,n=>(o(),C("div",{key:n.memberId,class:"flex items-start gap-3 px-5 py-3"},[a("div",jl,f(n.name),1),a("div",Yl,[(o(!0),C(H,null,Y(n.history,(v,w)=>(o(),C(H,{key:w},[a("div",Gl,[a("span",{class:W(["text-sm",v.endTs===null?"font-semibold text-pink-600":"text-gray-700 dark:text-gray-300"])},f(v.name),3),v.endTs===null?(o(),k(r,{key:0,color:"primary",variant:"soft",size:"xs"},{default:I(()=>[Q(f(e(t)("members.nicknameHistory.current")),1)]),_:1})):A("",!0),a("span",Ql,"("+f(e(Ut)(v.startTs,v.endTs))+")",1)]),w<n.history.length-1?(o(),C("span",Xl,"→")):A("",!0)],64))),128))])]))),128))])):d.value?(o(),k(e(oe),{key:2,text:e(t)("members.nicknameHistory.loadingText")},null,8,["text"])):(o(),k(e(ie),{key:1,text:e(t)("members.nicknameHistory.empty")},null,8,["text"]))]),_:1},8,["title","description"])])}}}),Zl={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-page-dark"},en={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},tn={class:"text-lg font-semibold text-gray-900 dark:text-white"},an={class:"flex-1 overflow-auto"},sn=B({__name:"NicknameHistoryEntry",props:{sessionId:{}},setup(i){const{t}=Z(),s=i,l=S(!1);return(u,d)=>{const c=be,p=$e;return o(),C(H,null,[x(c,{variant:"ghost",icon:"i-heroicons-clock",size:"sm",onClick:d[0]||(d[0]=m=>l.value=!0)},{default:I(()=>[Q(f(e(t)("analysis.subTabs.member.nicknameHistory")),1)]),_:1}),s.sessionId?(o(),k(p,{key:0,open:l.value,"onUpdate:open":d[2]||(d[2]=m=>l.value=m),ui:{content:"max-w-6xl h-[85vh]"}},{content:I(()=>[a("div",Zl,[a("div",en,[a("h2",tn,f(e(t)("analysis.subTabs.member.nicknameHistory")),1),x(c,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:d[1]||(d[1]=m=>l.value=!1)})]),a("div",an,[x(Jl,{"session-id":s.sessionId},null,8,["session-id"])])])]),_:1},8,["open"])):A("",!0)],64)}}}),on={class:"relative flex h-full flex-col dark:bg-page-dark",style:{"padding-top":"var(--titlebar-area-height)"}},ln=["aria-label"],nn={class:"relative flex-1 overflow-y-auto"},rn={class:"h-full"},un={key:2,class:"flex h-full items-center justify-center"},dn={class:"text-gray-500"},cn={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-page-dark"},mn={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},vn={class:"text-lg font-semibold text-gray-900 dark:text-white"},pn={class:"text-sm text-gray-500 dark:text-gray-400"},gn={class:"flex items-center gap-2"},hn={class:"flex-1 overflow-hidden"},fn=B({__name:"index",setup(i){const t=Pe(()=>Ee(()=>import("./MessageExportModal-DYjhBuzO.js"),__vite__mapDeps([9,1,2,3,10,11,12,13]))),{t:s}=Z(),l=pt(),u=gt(),d=ct(),c=Ne(),p=mt(),{currentSessionId:m}=vt(d),b=S(!1),h=S(!1),r=S(!1),n=S(!1),v=S(!1);function w(){c.openChatRecordDrawer({})}const g=[{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:"lab",labelKey:"analysis.tabs.lab",icon:"i-heroicons-beaker"}],_=y(()=>p.debugMode?[...g,{id:"debug",labelKey:"analysis.tabs.debug",icon:"i-heroicons-bug-ant"}]:g),R=y(()=>_.value.map(X=>X.id)),{activeTab:$,isLoading:V,isInitialLoad:z,isSessionSwitching:ae,session:D,memberActivity:F,hourlyActivity:P,dailyActivity:ee,messageTypes:G,timeRangeValue:K,fullTimeRange:N,availableYears:U,timeFilter:j,initialTimeState:pe,loadData:ke,handleTimeRangeInitialized:we}=_t({route:l,router:u,currentSessionId:m,selectSession:d.selectSession,defaultTab:p.defaultSessionTab,validTabIds:R.value});We("session-switch-loading",ae);const Ce=y(()=>F.value.reduce((X,M)=>X+M.messageCount,0)),Ie=y(()=>F.value.filter(X=>X.messageCount>0).length);return(X,M)=>{const Se=be,Re=$e;return o(),C("div",on,[e(ae)?(o(),C("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":e(s)("common.loading")},[x(e(qt))],8,ln)):A("",!0),e(D)?(o(),C(H,{key:1},[x($t,{"active-tab":e($),"onUpdate:activeTab":M[0]||(M[0]=T=>Be($)?$.value=T:null),"time-range-value":e(K),"onUpdate:timeRangeValue":M[1]||(M[1]=T=>Be(K)?K.value=T:null),title:e(D).name,avatar:e(D).groupAvatar,icon:"i-heroicons-chat-bubble-left-right","icon-class":"bg-primary-600 text-white dark:bg-primary-500 dark:text-white",tabs:_.value,"current-session-id":e(m),"initial-time-state":e(pe),onOpenIncrementalImport:M[2]||(M[2]=T=>r.value=!0),onOpenMemberManagement:M[3]||(M[3]=T=>v.value=!0),onOpenChatRecord:w,"onUpdate:fullRange":M[4]||(M[4]=T=>N.value=T),"onUpdate:availableYears":M[5]||(M[5]=T=>U.value=T),onTimeRangeInitialized:e(we)},null,8,["active-tab","time-range-value","title","avatar","tabs","current-session-id","initial-time-state","onTimeRangeInitialized"]),a("div",nn,[e(V)&&!e(ae)?(o(),k(e(oe),{key:0,variant:"overlay",text:e(s)("common.loading")},null,8,["text"])):A("",!0),a("div",rn,[x(Ke,{name:"tab-slide",mode:"out-in"},{default:I(()=>[e($)==="insights"?(o(),k(ns,{key:"insights-"+e(m),"session-id":e(m),session:e(D),"member-activity":e(F),"message-types":e(G),"hourly-activity":e(P),"daily-activity":e(ee),"time-range":e(N),"filtered-message-count":Ce.value,"filtered-member-count":Ie.value,"time-filter":e(j)},null,8,["session-id","session","member-activity","message-types","hourly-activity","daily-activity","time-range","filtered-message-count","filtered-member-count","time-filter"])):e($)==="ranking"?(o(),k(El,{key:"ranking-"+e(m),"session-id":e(m),"time-filter":e(j)},null,8,["session-id","time-filter"])):e($)==="ai-chat"?(o(),k(e(St),{key:"ai-chat-"+e(m),"session-id":e(m),"session-name":e(D).name,"chat-type":"group"},null,8,["session-id","session-name"])):e($)==="memory"?(o(),k(Rt,{key:"memory-"+e(m),"session-id":e(m),"session-name":e(D).name},null,8,["session-id","session-name"])):e($)==="lab"?(o(),k(Vt,{key:"lab-"+e(m),"session-id":e(m),"chat-type":"group"},null,8,["session-id"])):e($)==="debug"?(o(),k(e(Mt),{key:"debug-"+e(m),"session-id":e(m)},null,8,["session-id"])):A("",!0)]),_:1})])]),x(Tt,{onOpenIncrementalImport:M[6]||(M[6]=T=>r.value=!0),onOpenSemanticIndex:M[7]||(M[7]=T=>b.value=!0),onOpenMemberManagement:M[8]||(M[8]=T=>v.value=!0),onOpenChatRecord:w,onOpenMessageExport:M[9]||(M[9]=T=>n.value=!0)})],64)):e(z)?A("",!0):(o(),C("div",un,[a("p",dn,f(e(s)("analysis.groupChat.loadError")),1)])),e(m)&&e(D)?(o(),k(Ct,{key:3,modelValue:b.value,"onUpdate:modelValue":M[10]||(M[10]=T=>b.value=T),"session-id":e(m),"message-count":e(D).messageCount},null,8,["modelValue","session-id","message-count"])):A("",!0),e(m)&&e(D)?(o(),k(Xt,{key:4,modelValue:h.value,"onUpdate:modelValue":M[11]||(M[11]=T=>h.value=T),"session-id":e(m),"chat-type":"group","auto-check":""},null,8,["modelValue","session-id"])):A("",!0),e(m)&&e(D)?(o(),k(It,{key:5,modelValue:r.value,"onUpdate:modelValue":M[12]||(M[12]=T=>r.value=T),"session-id":e(m),"session-name":e(D).name,onImported:M[13]||(M[13]=()=>{e(ke)(),e(d).loadSessions()})},null,8,["modelValue","session-id","session-name"])):A("",!0),e(m)?(o(),k(e(t),{key:6,modelValue:n.value,"onUpdate:modelValue":M[14]||(M[14]=T=>n.value=T)},null,8,["modelValue"])):A("",!0),e(m)?(o(),k(Re,{key:7,open:v.value,"onUpdate:open":M[16]||(M[16]=T=>v.value=T),ui:{content:"max-w-6xl h-[85vh]"}},{content:I(()=>[a("div",cn,[a("div",mn,[a("div",null,[a("h2",vn,f(e(s)("analysis.tooltip.memberManagement")),1),a("p",pn,f(e(s)("members.list.description",{count:e(D)?.memberCount??0})),1)]),a("div",gn,[x(sn,{"session-id":e(m)},null,8,["session-id"]),x(Se,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:M[15]||(M[15]=T=>v.value=!1)})])]),a("div",hn,[x(Lt,{"session-id":e(m),"show-header":!1,"chat-type":"group",onDataChanged:e(ke)},null,8,["session-id","onDataChanged"])])])]),_:1},8,["open"])):A("",!0)])}}}),ti=je(fn,[["__scopeId","data-v-1e621d59"]]);export{ti as default};
64
+ `}},legend:{show:!0,bottom:0,itemWidth:12,itemHeight:12,textStyle:{color:"#6b7280",fontSize:10}},grid:{left:s.value.gridLeft,right:70,top:15,bottom:35,containLabel:!1},xAxis:{type:"value",max:b*1.15,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",data:m,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,color:"#4b5563",margin:12,formatter:(h,r)=>{const v=l.value.length-1-r+1;return`${v===1?"🥇":v===2?"🥈":v===3?"🥉":`${v}.`} ${h}`}}},series:[{name:"23点",type:"bar",stack:"total",data:p.map(h=>h.hourlyBreakdown.h23),itemStyle:{color:d.h23},barWidth:18},{name:"0点",type:"bar",stack:"total",data:p.map(h=>h.hourlyBreakdown.h0),itemStyle:{color:d.h0},barWidth:18},{name:"1点",type:"bar",stack:"total",data:p.map(h=>h.hourlyBreakdown.h1),itemStyle:{color:d.h1},barWidth:18},{name:"2点",type:"bar",stack:"total",data:p.map(h=>h.hourlyBreakdown.h2),itemStyle:{color:d.h2},barWidth:18},{name:"3-4点",type:"bar",stack:"total",data:p.map(h=>h.hourlyBreakdown.h3to4),itemStyle:{color:d.h3to4,borderRadius:[0,4,4,0]},barWidth:18,label:{show:!0,position:"right",distance:8,formatter:h=>{const r=l.value.length-1-h.dataIndex;return`${l.value[r].totalNightMessages} 条`},fontSize:11,fontWeight:500,color:"#6b7280"}}]}});return(p,m)=>i.bare?(o(),k(e(ce),{key:0,"content-height":u.value,"max-height-vh":i.maxHeightVh},{default:I(()=>[x(e(te),{option:c.value,height:u.value},null,8,["option","height"])]),_:1},8,["content-height","max-height-vh"])):(o(),k(e(O),{key:1,title:i.title,description:i.description,scrollable:"","max-height-vh":i.maxHeightVh},{default:I(()=>[a("div",to,[x(e(te),{option:c.value,height:u.value},null,8,["option","height"])])]),_:1},8,["title","description","max-height-vh"]))}}),so={id:"streak-rank",class:"scroll-mt-24"},oo={class:"flex items-center gap-3"},lo=U({__name:"CheckInRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(i){const t=i,s=S(null),l=S(!1),u=S("max"),d=S(t.globalTopN??10);E(()=>t.globalTopN,h=>{h!==void 0&&(d.value=h)});const c=y(()=>u.value==="max"?"🔥 火花榜 - 最长连续":"🔥 火花榜 - 当前连续"),p=y(()=>u.value==="max"?"历史最长连续发言天数":"正在持续连续发言的成员"),m=y(()=>s.value?s.value.streakRank.some(h=>h.currentStreak>0):!1);async function b(){if(t.sessionId){l.value=!0;try{s.value=await Z().getCheckInAnalysis(t.sessionId,t.timeFilter)}catch(h){console.error("加载打卡分析失败:",h)}finally{l.value=!1}}}return E(()=>[t.sessionId,t.timeFilter],()=>{b()},{immediate:!0,deep:!0}),(h,r)=>(o(),C("div",so,[l.value?(o(),k(e(oe),{key:0,text:"正在分析数据..."})):s.value&&s.value.streakRank.length>0?(o(),k(e(O),{key:1,title:c.value,description:p.value},{headerRight:I(()=>[a("div",oo,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:d.value,"onUpdate:modelValue":r[0]||(r[0]=n=>d.value=n)},null,8,["modelValue"])):A("",!0),m.value?(o(),k(e(re),{key:1,modelValue:u.value,"onUpdate:modelValue":r[1]||(r[1]=n=>u.value=n),items:[{label:"最长连续",value:"max"},{label:"当前连续",value:"current"}],size:"sm"},null,8,["modelValue"])):A("",!0)])]),default:I(()=>[x(e(Ks),{items:s.value.streakRank,title:c.value,mode:u.value,"top-n":d.value,bare:""},null,8,["items","title","mode","top-n"])]),_:1},8,["title","description"])):(o(),k(e(O),{key:2,title:"🔥 火花榜"},{default:I(()=>[x(e(ie),{text:"暂无连续发言数据"})]),_:1}))]))}}),no={class:"flex items-center gap-3"},io={key:1,class:"py-8 text-center text-sm text-gray-400"},ro={key:1,class:"py-8 text-center text-sm text-gray-400"},uo=U({__name:"MemeBattleRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(i){const t=i,s=S(null),l=S(!1),u=S("count"),d=S(t.globalTopN??10);E(()=>t.globalTopN,v=>{v!==void 0&&(d.value=v)});async function c(){if(t.sessionId){l.value=!0;try{s.value=await Z().getMemeBattleAnalysis(t.sessionId,t.timeFilter)}catch(v){console.error("加载斗图分析失败:",v)}finally{l.value=!1}}}const p=y(()=>s.value?s.value.rankByCount.map(v=>({id:v.memberId.toString(),name:v.name,value:v.count,percentage:v.percentage})):[]),m=y(()=>s.value?s.value.rankByImageCount.map(v=>({id:v.memberId.toString(),name:v.name,value:v.count,percentage:v.percentage})):[]),b=y(()=>u.value==="count"?p.value:m.value),h=y(()=>u.value==="count"?"场":"张"),r=y(()=>{switch(u.value){case"battle":return"⚔️ 斗图榜 - 史诗级战役";case"count":return"⚔️ 斗图榜 - 按场次";case"image":return"⚔️ 斗图榜 - 按图量";default:return"⚔️ 斗图榜"}}),n=y(()=>{switch(u.value){case"battle":return"记录最激烈的斗图大战";case"count":return"参与斗图次数最多的人";case"image":return"在斗图中发送图片最多的人";default:return""}});return E(()=>[t.sessionId,t.timeFilter],()=>c(),{immediate:!0,deep:!0}),(v,w)=>l.value?(o(),k(e(oe),{key:0,text:"正在统计斗图数据..."})):s.value?(o(),k(e(O),{key:1,title:r.value,description:n.value},{headerRight:I(()=>[a("div",no,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:d.value,"onUpdate:modelValue":w[0]||(w[0]=g=>d.value=g)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:u.value,"onUpdate:modelValue":w[1]||(w[1]=g=>u.value=g),items:[{label:"按场次",value:"count"},{label:"按图量",value:"image"},{label:"史诗级战役",value:"battle"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[u.value==="battle"?(o(),C(H,{key:0},[s.value.topBattles.length>0?(o(),k(e(js),{key:0,battles:s.value.topBattles,title:"","top-n":d.value,bare:""},null,8,["battles","top-n"])):(o(),C("div",io,"暂无史诗级战役数据"))],64)):(o(),C(H,{key:1},[b.value.length>0?(o(),k(e(Te),{key:0,members:b.value,title:r.value,unit:h.value,"top-n":d.value,bare:""},null,8,["members","title","unit","top-n"])):(o(),C("div",ro,"暂无斗图数据"))],64))]),_:1},8,["title","description"])):A("",!0)}}),co={class:"space-y-6"},mo={class:"flex items-center gap-3"},vo={class:"flex items-center gap-3"},po={key:1,class:"px-3 py-2"},go=U({__name:"RepeatSection",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(i){const t=i,s=S(null),l=S(!1),u=S("originator"),d=S("fastest"),c=S(t.globalTopN??10),p=S(t.globalTopN??10);E(()=>t.globalTopN,$=>{$!==void 0&&(c.value=$,p.value=$)});async function m(){if(t.sessionId){l.value=!0;try{s.value=await Z().getRepeatAnalysis(t.sessionId,t.timeFilter)}catch($){console.error("加载复读分析失败:",$)}finally{l.value=!1}}}const b=y(()=>s.value?s.value.originators.map($=>({id:$.memberId.toString(),name:$.name,value:$.count,percentage:$.percentage})):[]),h=y(()=>s.value?s.value.initiators.map($=>({id:$.memberId.toString(),name:$.name,value:$.count,percentage:$.percentage})):[]),r=y(()=>s.value?s.value.breakers.map($=>({id:$.memberId.toString(),name:$.name,value:$.count,percentage:$.percentage})):[]),n=y(()=>{switch(u.value){case"originator":return b.value;case"initiator":return h.value;case"breaker":return r.value;default:return b.value}}),v=y(()=>{switch(u.value){case"originator":return"🔁 复读榜 - 被复读";case"initiator":return"🔁 复读榜 - 挑起";case"breaker":return"🔁 复读榜 - 打断";default:return"🔁 复读榜"}}),w=y(()=>{switch(u.value){case"originator":return"发出的消息被别人复读的次数";case"initiator":return"第二个发送相同消息、带起节奏的人";case"breaker":return"终结复读链的人";default:return""}}),g=y(()=>{if(!s.value)return{labels:[],values:[]};const $=s.value.chainLengthDistribution;return{labels:$.map(V=>`${V.length}人`),values:$.map(V=>V.count)}}),_=y(()=>d.value==="fastest"?"📊 复读统计 - 最快反应":"📊 复读统计 - 链长分布"),R=y(()=>{if(d.value==="fastest")return"平均复读反应时间(至少参与5次复读)";const $=s.value?.totalRepeatChains??0,V=s.value?.avgChainLength??0;return`共 ${$} 次复读,平均 ${V} 人参与`});return E(()=>[t.sessionId,t.timeFilter],()=>m(),{immediate:!0,deep:!0}),($,V)=>(o(),C("div",co,[l.value?(o(),k(e(oe),{key:0,text:"正在分析复读数据..."})):s.value&&s.value.totalRepeatChains>0?(o(),C(H,{key:1},[x(e(O),{title:v.value,description:w.value},{headerRight:I(()=>[a("div",mo,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:c.value,"onUpdate:modelValue":V[0]||(V[0]=z=>c.value=z)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:u.value,"onUpdate:modelValue":V[1]||(V[1]=z=>u.value=z),items:[{label:"被复读",value:"originator"},{label:"挑起",value:"initiator"},{label:"打断",value:"breaker"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[n.value.length>0?(o(),k(e(Te),{key:0,members:n.value,title:v.value,unit:"次","top-n":c.value,bare:""},null,8,["members","title","top-n"])):(o(),k(e(ie),{key:1,text:"暂无数据"}))]),_:1},8,["title","description"]),x(e(O),{title:_.value,description:R.value},{headerRight:I(()=>[a("div",vo,[i.showTopNSelect&&d.value==="fastest"?(o(),k(e(ue),{key:0,modelValue:p.value,"onUpdate:modelValue":V[2]||(V[2]=z=>p.value=z)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:d.value,"onUpdate:modelValue":V[3]||(V[3]=z=>d.value=z),items:[{label:"最快反应",value:"fastest"},{label:"链长分布",value:"distribution"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[d.value==="fastest"?(o(),C(H,{key:0},[s.value.fastestRepeaters&&s.value.fastestRepeaters.length>0?(o(),k(e(Ys),{key:0,items:s.value.fastestRepeaters,"top-n":p.value,title:"",bare:""},null,8,["items","top-n"])):(o(),k(e(ie),{key:1,text:"暂无最快复读数据"}))],64)):(o(),C("div",po,[g.value.labels.length>0?(o(),k(e(Nt),{key:0,data:g.value,height:200},null,8,["data"])):(o(),k(e(ie),{key:1,text:"暂无分布数据"}))]))]),_:1},8,["title","description"])],64)):(o(),k(e(O),{key:2,title:"🔁 复读榜"},{default:I(()=>[x(e(ie),{text:"该群组暂无复读记录"})]),_:1}))]))}}),ho=U({__name:"DivingRank",props:{sessionId:{},timeFilter:{},globalTopN:{}},setup(i){const t=i,s=S(null),l=S(!1);async function u(){if(t.sessionId){l.value=!0;try{s.value=await Z().getDivingAnalysis(t.sessionId,t.timeFilter)}catch(d){console.error("加载潜水分析失败:",d)}finally{l.value=!1}}}return E(()=>[t.sessionId,t.timeFilter],()=>u(),{immediate:!0,deep:!0}),(d,c)=>l.value?(o(),k(e(oe),{key:0,text:"正在统计潜水数据..."})):s.value&&s.value.rank.length>0?(o(),k(e(Zs),{key:1,items:s.value.rank,"global-top-n":i.globalTopN},null,8,["items","global-top-n"])):A("",!0)}}),fo={class:"space-y-6"},yo={class:"flex items-center gap-3"},bo={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"},ko={class:"flex items-center gap-3"},wo={key:1,class:"py-8 text-center text-sm text-gray-400"},_o=U({__name:"NightOwlRank",props:{sessionId:{},timeFilter:{},showTopNSelect:{type:Boolean,default:!0},globalTopN:{}},setup(i){const t=i,s=S(null),l=S(!1),u=S("first"),d=S("distribution"),c=S(t.globalTopN??10),p=S(t.globalTopN??10);E(()=>t.globalTopN,_=>{_!==void 0&&(c.value=_,p.value=_)});async function m(){if(t.sessionId){l.value=!0;try{s.value=await Z().getNightOwlAnalysis(t.sessionId,t.timeFilter)}catch(_){console.error("加载出勤分析失败:",_)}finally{l.value=!1}}}const b=y(()=>s.value?s.value.lastSpeakerRank.map(_=>({id:String(_.memberId),name:_.name,value:_.count,percentage:_.percentage})):[]),h=y(()=>s.value?s.value.firstSpeakerRank.map(_=>({id:String(_.memberId),name:_.name,value:_.count,percentage:_.percentage})):[]),r=y(()=>u.value==="last"?b.value:h.value),n=y(()=>u.value==="last"?"⏰ 出勤排行 - 最晚下班":"⏰ 出勤排行 - 最早上班"),v=y(()=>{const _=s.value?.totalDays??0;return u.value==="last"?`每天最后一个发言的人(共 ${_} 天)`:`每天第一个发言的人(共 ${_} 天)`}),w=y(()=>d.value==="distribution"?"🦉 修仙统计 - 发言分布":"🦉 修仙统计 - 连续记录"),g=y(()=>d.value==="distribution"?"深夜时段(23:00-05:00)各时段发言分布":"连续在深夜时段发言的天数");return E(()=>[t.sessionId,t.timeFilter],()=>m(),{immediate:!0,deep:!0}),(_,R)=>(o(),C("div",fo,[l.value?(o(),k(e(oe),{key:0,text:"正在加载出勤分析..."})):s.value?(o(),C(H,{key:1},[x(e(O),{title:w.value,description:g.value},{headerRight:I(()=>[a("div",yo,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:c.value,"onUpdate:modelValue":R[0]||(R[0]=$=>c.value=$)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:d.value,"onUpdate:modelValue":R[1]||(R[1]=$=>d.value=$),items:[{label:"发言分布",value:"distribution"},{label:"连续记录",value:"consecutive"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[d.value==="distribution"?(o(),C(H,{key:0},[s.value.nightOwlRank.length>0?(o(),k(e(ao),{key:0,items:s.value.nightOwlRank,"top-n":c.value,title:"",bare:""},null,8,["items","top-n"])):(o(),C("div",bo,"暂无深夜发言数据"))],64)):(o(),C(H,{key:1},[s.value.consecutiveRecords.length>0?(o(),k(e(eo),{key:0,items:s.value.consecutiveRecords,"top-n":c.value,title:"",bare:""},null,8,["items","top-n"])):(o(),C("div",xo,"暂无连续记录"))],64))]),_:1},8,["title","description"]),x(e(O),{title:n.value,description:v.value},{headerRight:I(()=>[a("div",ko,[i.showTopNSelect?(o(),k(e(ue),{key:0,modelValue:p.value,"onUpdate:modelValue":R[2]||(R[2]=$=>p.value=$)},null,8,["modelValue"])):A("",!0),x(e(re),{modelValue:u.value,"onUpdate:modelValue":R[3]||(R[3]=$=>u.value=$),items:[{label:"最早上班",value:"first"},{label:"最晚下班",value:"last"}],size:"sm"},null,8,["modelValue"])])]),default:I(()=>[r.value.length>0?(o(),k(e(Te),{key:0,members:r.value,title:n.value,"top-n":p.value,unit:"次",bare:""},null,8,["members","title","top-n"])):(o(),C("div",wo,"暂无数据"))]),_:1},8,["title","description"])],64)):A("",!0)]))}}),$o={class:"mb-8 mt-4"},To={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"}},Co={id:"activity-rank",class:"scroll-mt-24"},Io={id:"meme-battle",class:"scroll-mt-24"},So={id:"repeat",class:"scroll-mt-24"},Ro={id:"night-owl",class:"scroll-mt-24"},Vo={id:"diving",class:"scroll-mt-24"},Mo={class:"border-l border-gray-200 pl-4 dark:border-gray-800"},Lo={class:"mt-4 border-l border-gray-200 pl-4 dark:border-gray-800"},Do={class:"flex rounded-lg border border-gray-200 bg-white p-0.5 text-xs dark:border-gray-700 dark:bg-page-dark"},No=["onClick"],Ao=U({__name:"OverallRankingTab",props:{sessionId:{},timeFilter:{}},setup(i){const t=i,s=S([]),l=S([]);async function u(){if(!t.sessionId)return;const g=Z(),[_,R]=await Promise.all([g.getMemberActivity(t.sessionId,t.timeFilter),g.getAvailableYears(t.sessionId)]);s.value=_,l.value=R}E(()=>[t.sessionId,t.timeFilter],()=>u(),{immediate:!0,deep:!0});const d=y(()=>{if(t.timeFilter?.startTs&&t.timeFilter?.endTs){const g=new Date(t.timeFilter.startTs*1e3).getFullYear(),_=new Date(t.timeFilter.endTs*1e3).getFullYear();return g===_?`${g} 赛季`:`${g}-${_} 赛季`}if(l.value.length>0){const g=[...l.value].sort(($,V)=>$-V),_=g[0],R=g[g.length-1];return _===R?`${_} 赛季`:`${_}-${R} 赛季`}return"全部赛季"}),c=y(()=>({startTs:t.timeFilter?.startTs,endTs:t.timeFilter?.endTs})),p=[{id:"activity-rank",label:"🏆 活跃榜"},{id:"streak-rank",label:"🔥 火花榜"},{id:"meme-battle",label:"⚔️ 斗图榜"},{id:"repeat",label:"🔁 复读榜"},{id:"night-owl",label:"⏰ 出勤榜"},{id:"diving",label:"🤿 潜水榜"}],{contentRef:m,activeAnchor:b,scrollToAnchor:h}=Zt(p,{threshold:350}),r=S(10),n=S("standard");Ke(Qe,n);const v=[{value:"standard",label:"标准"},{value:"wide",label:"宽屏"},{value:"full",label:"全宽"}],w=y(()=>Ze[n.value].contentClass);return(g,_)=>(o(),C("div",{ref_key:"contentRef",ref:m,class:"flex gap-6 p-6"},[a("div",{class:K(["main-content mx-auto min-w-0 flex-1 space-y-6 px-8",w.value])},[a("div",$o,[a("h1",To," 🏆 "+f(d.value),1),_[1]||(_[1]=a("p",{class:"mt-4 text-sm text-gray-500 dark:text-gray-400"},"各榜单前三名请找群主领取奖励 🎁",-1))]),a("div",Co,[x(e(Hs),{"session-id":t.sessionId,"member-activity":s.value,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","member-activity","time-filter","global-top-n"])]),x(e(lo),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"]),a("div",Io,[x(e(uo),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),a("div",So,[x(e(go),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),a("div",Ro,[x(e(_o),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),a("div",Vo,[x(e(ho),{"session-id":t.sessionId,"time-filter":c.value,"global-top-n":r.value},null,8,["session-id","time-filter","global-top-n"])]),_[2]||(_[2]=a("div",{class:"h-48 no-capture"},null,-1))],2),x(e(sa),{anchors:p,"active-anchor":e(b),onClick:e(h)},{default:I(()=>[a("div",Mo,[_[3]||(_[3]=a("div",{class:"mb-2 text-xs text-gray-400"},"显示数量",-1)),x(e(ue),{modelValue:r.value,"onUpdate:modelValue":_[0]||(_[0]=R=>r.value=R)},null,8,["modelValue"])]),a("div",Lo,[_[4]||(_[4]=a("div",{class:"mb-2 text-xs text-gray-400"},"榜单宽度",-1)),a("div",Do,[(o(),C(H,null,G(v,R=>a("button",{key:R.value,type:"button",class:K(["rounded-md px-2 py-1 transition",n.value===R.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:$=>n.value=R.value},f(R.label),11,No)),64))])])]),_:1},8,["active-anchor","onClick"])],512))}}),Fo={class:"main-content mx-auto max-w-3xl p-4 sm:p-6"},qo=U({__name:"InteractionRankingTab",props:{sessionId:{},timeFilter:{}},setup(i){const{t}=X(),s=i,l=S(null),u=S(!1);async function d(){if(s.sessionId){u.value=!0;try{l.value=await Z().getMentionAnalysis(s.sessionId,s.timeFilter)}catch(n){console.error("加载 @ 互动分析失败:",n)}finally{u.value=!1}}}const c=y(()=>l.value?l.value.topMentioners.map(n=>({id:n.memberId.toString(),name:n.name,value:n.count,percentage:n.percentage})):[]),p=y(()=>l.value?l.value.topMentioned.map(n=>({id:n.memberId.toString(),name:n.name,value:n.count,percentage:n.percentage})):[]),m=S("mentioners"),b=y(()=>[{label:t("members.relationships.rankModes.mentioners"),value:"mentioners"},{label:t("members.relationships.rankModes.mentioned"),value:"mentioned"}]),h=y(()=>m.value==="mentioners"?c.value:p.value),r=y(()=>m.value==="mentioners"?t("members.relationships.topMentionersDescription"):t("members.relationships.topMentionedDescription"));return E(()=>[s.sessionId,s.timeFilter],()=>{d()},{immediate:!0,deep:!0}),(n,v)=>(o(),C("div",Fo,[u.value?(o(),k(e(oe),{key:0,text:e(t)("members.relationships.loading")},null,8,["text"])):l.value&&l.value.totalMentions>0&&h.value.length>0?(o(),k(e(Ta),{key:1,members:h.value,title:e(t)("members.relationships.rankingTitle"),description:r.value,unit:e(t)("members.relationships.times")},{headerRight:I(()=>[x(e(re),{modelValue:m.value,"onUpdate:modelValue":v[0]||(v[0]=w=>m.value=w),items:b.value,size:"sm"},null,8,["modelValue","items"])]),_:1},8,["members","title","description","unit"])):(o(),k(e(O),{key:2,title:e(t)("members.relationships.emptyTitle")},{default:I(()=>[x(e(ie),{text:e(t)("members.relationships.empty")},null,8,["text"])]),_:1},8,["title"]))]))}}),Uo={class:"mx-auto h-full max-w-[920px] p-2 sm:p-4"},Bo={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"},zo={class:"flex items-center gap-3"},Ho={class:"inline-flex items-center",role:"group"},Po={class:"flex items-center gap-3"},Eo={class:"p-3 w-64"},Oo={class:"text-sm font-medium mb-3"},Ko={class:"space-y-3"},Wo={class:"text-xs text-gray-500 mb-1 block"},jo={class:"text-xs text-gray-400 mt-1"},Go={class:"text-xs text-gray-500 mb-1 block"},Yo={class:"text-xs text-gray-400 mt-1"},Jo={class:"flex-1 min-h-0 overflow-hidden"},Qo={key:0,class:"h-full flex items-center justify-center"},Zo={key:1,class:"h-full flex items-center justify-center"},Xo={class:"text-center text-gray-400"},el={key:2,class:"h-full"},tl={key:3,class:"h-full flex overflow-hidden"},al={class:"w-64 border-r border-gray-200 dark:border-gray-700 flex flex-col overflow-hidden"},sl={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},ol={class:"text-sm font-medium flex items-center gap-2"},ll={class:"flex-1 overflow-y-auto"},nl=["onClick"],il={class:"flex items-center justify-between"},rl={class:"text-sm truncate"},ul={class:"text-xs text-gray-400"},dl={class:"flex-1 overflow-hidden flex flex-col"},cl={key:0,class:"flex-1 flex items-center justify-center"},ml={class:"text-center text-gray-400"},vl={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 flex items-center gap-3"},pl={class:"w-10 h-10 rounded-full flex items-center justify-center text-white font-bold bg-primary-500"},gl={class:"font-medium"},hl={class:"text-xs text-gray-400"},fl={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},yl={class:"text-sm font-medium flex items-center gap-2"},bl={class:"flex-1 overflow-y-auto"},xl={key:0,class:"p-4 text-center text-gray-400"},kl={class:"flex items-center gap-3"},wl={class:"flex-1 min-w-0"},_l={class:"text-sm font-medium truncate"},$l={class:"flex items-center gap-3 mt-0.5 text-xs text-gray-400"},Tl={class:"w-20 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},Cl={key:4,class:"h-full flex flex-col overflow-hidden"},Il={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},Sl={class:"text-sm font-medium flex items-center gap-2"},Rl={class:"flex-1 overflow-y-auto"},Vl={class:"flex items-center gap-3"},Ml={class:"flex-1 min-w-0"},Ll={class:"flex items-center gap-2 text-sm"},Dl={class:"font-medium truncate"},Nl={class:"font-medium truncate"},Al={class:"flex items-center gap-3 mt-1 text-xs text-gray-400"},Fl={class:"w-24 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},ql={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"},Ul=U({__name:"ProximityRankingTab",props:{sessionId:{},timeFilter:{}},setup(i){Ot([Kt,Wt,jt,Gt,Yt]);const t=i,{t:s}=X(),l=rt(),u=y(()=>l.value==="dark"),d=S(!0);At(d);const c=S(null),p=S("matrix"),m=S(null),b=S({lookAhead:3,decaySeconds:120,topEdges:150}),h=S(null);let r=null;async function n(){if(t.sessionId){d.value=!0;try{c.value=await Z().getClusterGraph(t.sessionId,t.timeFilter,{lookAhead:b.value.lookAhead,decaySeconds:b.value.decaySeconds,topEdges:b.value.topEdges})}catch(D){console.error("[chart-cluster] 加载小团体关系数据失败:",D),c.value=null}finally{d.value=!1}}}const v=y(()=>{if(!c.value||c.value.nodes.length===0)return null;const{nodes:D,links:q,maxLinkValue:P}=c.value,Y=[...D].sort((B,j)=>j.messageCount-B.messageCount).slice(0,20).map(B=>B.name),W=new Map;for(const B of q)W.set(`${B.source}-${B.target}`,B.value),W.set(`${B.target}-${B.source}`,B.value);const N=[];for(let B=0;B<Y.length;B++)for(let j=0;j<Y.length;j++)if(B===j)N.push([B,j,-1]);else{const pe=W.get(`${Y[B]}-${Y[j]}`)||0;N.push([B,j,pe])}return{names:Y,data:N,maxValue:P}});function w(){if(!v.value)return{graphic:{type:"text",style:{text:s("views.cluster.noData"),fill:"#999"}}};const{names:D,data:q,maxValue:P}=v.value;return{tooltip:{position:"top",formatter:ee=>{const[Y,W,N]=ee.data;return N<0?`${D[Y]}`:N===0?`${D[Y]} ↔ ${D[W]}<br/>暂无关系数据`:`${D[Y]} ↔ ${D[W]}<br/>临近度: ${N.toFixed(2)}`}},grid:{left:120,right:40,top:40,bottom:120},xAxis:{type:"category",data:D,splitArea:{show:!0},axisLabel:{rotate:45,fontSize:10,color:u.value?"#ccc":"#333"}},yAxis:{type:"category",data:D,splitArea:{show:!0},axisLabel:{fontSize:10,color:u.value?"#ccc":"#333"}},visualMap:{min:0,max:P||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:q.filter(ee=>ee[2]>=0),label:{show:!1},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}],backgroundColor:"transparent"}}const g=y(()=>c.value?[...c.value.nodes].sort((D,q)=>q.messageCount-D.messageCount):[]),_=y(()=>!c.value||m.value===null?null:c.value.nodes.find(D=>D.id===m.value)||null),R=y(()=>{if(!c.value||!_.value)return[];const D=_.value.name,q=[];for(const P of c.value.links)P.source===D?q.push({otherName:P.target,value:P.value,coOccurrenceCount:P.coOccurrenceCount}):P.target===D&&q.push({otherName:P.source,value:P.value,coOccurrenceCount:P.coOccurrenceCount});return q.sort((P,ee)=>ee.value-P.value),q}),$=y(()=>c.value?c.value.links.slice(0,50):[]);function V(){r&&p.value==="matrix"&&r.setOption(w(),{notMerge:!0})}function z(){h.value&&(r=Jt(h.value,u.value?"dark":void 0),V())}function ae(){r?.resize()}return E(p,async(D,q)=>{q==="matrix"&&r&&(r.dispose(),r=null),D==="matrix"&&(await Me(),z())}),E([c,()=>u.value],()=>{p.value==="matrix"&&V()},{deep:!0}),E(d,async(D,q)=>{q&&!D&&p.value==="matrix"&&(r&&(r.dispose(),r=null),await Me(),z())}),E(()=>[t.sessionId,t.timeFilter],()=>n(),{immediate:!0,deep:!0}),De(()=>{window.addEventListener("resize",ae),p.value==="matrix"&&Me(()=>z())}),He(()=>{window.removeEventListener("resize",ae),r?.dispose(),r=null}),(D,q)=>{const P=be,ee=Oe,Y=ut,W=xe;return o(),C("div",Uo,[x(e(Et),{class:"flex h-full flex-col"},{default:I(()=>[a("div",Bo,[a("div",zo,[a("div",Ho,[x(P,{size:"xs",color:p.value==="matrix"?"primary":"neutral",variant:p.value==="matrix"?"solid":"ghost",onClick:q[0]||(q[0]=N=>p.value="matrix")},{default:I(()=>[J(f(e(s)("views.cluster.matrixView")),1)]),_:1},8,["color","variant"]),x(P,{size:"xs",color:p.value==="member"?"primary":"neutral",variant:p.value==="member"?"solid":"ghost",onClick:q[1]||(q[1]=N=>p.value="member")},{default:I(()=>[J(f(e(s)("views.cluster.memberView")),1)]),_:1},8,["color","variant"]),x(P,{size:"xs",color:p.value==="circle"?"primary":"neutral",variant:p.value==="circle"?"solid":"ghost",onClick:q[2]||(q[2]=N=>p.value="circle")},{default:I(()=>[J(f(e(s)("views.cluster.rankingView")),1)]),_:1},8,["color","variant"])])]),a("div",Po,[x(Y,null,{content:I(()=>[a("div",Eo,[a("h4",Oo,f(e(s)("views.cluster.modelSettings")),1),a("div",Ko,[a("div",null,[a("label",Wo,f(e(s)("views.cluster.lookAhead")),1),x(ee,{modelValue:b.value.lookAhead,"onUpdate:modelValue":q[3]||(q[3]=N=>b.value.lookAhead=N),modelModifiers:{number:!0},type:"number",min:1,max:10,size:"xs",placeholder:"1-10"},null,8,["modelValue"]),a("p",jo,f(e(s)("views.cluster.lookAheadDesc")),1)]),a("div",null,[a("label",Go,f(e(s)("views.cluster.decaySeconds")),1),x(ee,{modelValue:b.value.decaySeconds,"onUpdate:modelValue":q[4]||(q[4]=N=>b.value.decaySeconds=N),modelModifiers:{number:!0},type:"number",min:30,max:3600,size:"xs",placeholder:"30-3600"},null,8,["modelValue"]),a("p",Yo,f(e(s)("views.cluster.decaySecondsDesc")),1)]),x(P,{size:"xs",color:"primary",class:"w-full mt-2",onClick:n},{default:I(()=>[J(f(e(s)("views.cluster.applySettings")),1)]),_:1})])])]),default:I(()=>[x(P,{variant:"ghost",size:"xs",icon:"i-heroicons-adjustments-horizontal"})]),_:1}),x(P,{variant:"ghost",size:"xs",icon:"i-heroicons-arrow-path",onClick:n})])]),a("div",Jo,[d.value?(o(),C("div",Qo,[x(W,{name:"i-heroicons-arrow-path",class:"w-6 h-6 animate-spin text-gray-400"})])):!c.value||c.value.nodes.length===0?(o(),C("div",Zo,[a("div",Xo,[x(W,{name:"i-heroicons-user-group",class:"w-12 h-12 mx-auto mb-2 opacity-50"}),a("p",null,f(e(s)("views.cluster.noData")),1)])])):p.value==="matrix"?(o(),C("div",el,[a("div",{ref_key:"chartRef",ref:h,class:"w-full h-full"},null,512)])):p.value==="member"?(o(),C("div",tl,[a("div",al,[a("div",sl,[a("h3",ol,[x(W,{name:"i-heroicons-users",class:"w-4 h-4"}),J(" "+f(e(s)("views.cluster.selectMember")),1)])]),a("div",ll,[(o(!0),C(H,null,G(g.value,N=>(o(),C("div",{key:N.id,class:K(["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:B=>m.value=N.id},[a("div",il,[a("span",rl,f(N.name),1),a("span",ul,f(N.messageCount),1)])],10,nl))),128))])]),a("div",dl,[_.value?(o(),C(H,{key:1},[a("div",vl,[a("div",pl,f(_.value.name.charAt(0)),1),a("div",null,[a("div",gl,f(_.value.name),1),a("div",hl,f(e(s)("views.cluster.msgCount"))+": "+f(_.value.messageCount)+" | "+f(e(s)("views.cluster.relationCount"))+": "+f(R.value.length),1)])]),a("div",fl,[a("h3",yl,[x(W,{name:"i-heroicons-heart",class:"w-4 h-4 text-pink-500"}),J(" "+f(e(s)("views.cluster.relationsByIntimacy")),1)])]),a("div",bl,[R.value.length===0?(o(),C("div",xl,f(e(s)("views.cluster.noRelations")),1)):A("",!0),(o(!0),C(H,null,G(R.value,(N,B)=>(o(),C("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"},[a("div",kl,[a("span",{class:K(["w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold",B<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"])},f(B+1),3),a("div",wl,[a("div",_l,f(N.otherName),1),a("div",$l,[a("span",null,f(e(s)("views.cluster.intimacy"))+": "+f((N.value*100).toFixed(0))+"%",1),a("span",null,f(e(s)("views.cluster.coOccurrence"))+": "+f(N.coOccurrenceCount)+f(e(s)("views.cluster.times")),1)])]),a("div",Tl,[a("div",{class:"h-full bg-linear-to-r from-pink-400 to-pink-600",style:he({width:`${R.value[0]?.value?N.value/R.value[0].value*100:0}%`})},null,4)])])]))),128))])],64)):(o(),C("div",cl,[a("div",ml,[x(W,{name:"i-heroicons-cursor-arrow-rays",class:"w-12 h-12 mx-auto mb-2 opacity-50"}),a("p",null,f(e(s)("views.cluster.selectMemberHint")),1)])]))])])):(o(),C("div",Cl,[a("div",Il,[a("h3",Sl,[x(W,{name:"i-heroicons-trophy",class:"w-4 h-4 text-yellow-500"}),J(" "+f(e(s)("views.cluster.interactionRanking")),1)])]),a("div",Rl,[(o(!0),C(H,null,G($.value,(N,B)=>(o(),C("div",{key:B,class:"px-4 py-3 border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50"},[a("div",Vl,[a("span",{class:K(["w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold",B<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"])},f(B+1),3),a("div",Ml,[a("div",Ll,[a("span",Dl,f(N.source),1),q[5]||(q[5]=a("span",{class:"text-gray-400"},"↔",-1)),a("span",Nl,f(N.target),1)]),a("div",Al,[a("span",null,f(e(s)("views.cluster.score"))+": "+f(N.value.toFixed(2)),1),a("span",null,f(e(s)("views.cluster.coOccurrence"))+": "+f(N.coOccurrenceCount)+f(e(s)("views.cluster.times")),1)])]),a("div",Fl,[a("div",{class:"h-full bg-linear-to-r from-yellow-400 to-orange-500",style:he({width:`${$.value[0]?.value?N.value/$.value[0].value*100:0}%`})},null,4)])])]))),128))])]))]),c.value?(o(),C("div",ql,[a("span",null,f(e(s)("views.cluster.totalMembers"))+": "+f(c.value.stats.totalMembers),1),a("span",null,f(e(s)("views.cluster.totalMessages"))+": "+f(c.value.stats.totalMessages.toLocaleString()),1),a("span",null,f(e(s)("views.cluster.involvedMembers"))+": "+f(c.value.stats.involvedMembers),1),a("span",null,f(e(s)("views.cluster.edgeCount"))+": "+f(c.value.stats.edgeCount),1)])):A("",!0)]),_:1})])}}}),Bl={class:"flex h-full flex-col"},zl={class:"min-h-0 flex-1 overflow-y-auto"},Hl={key:3,class:"main-content mx-auto w-full max-w-3xl p-6"},Pl=U({__name:"RankingView",props:{sessionId:{},timeFilter:{},visibleTabIds:{}},setup(i){const t=i,{t:s,locale:l}=X(),u=S("overall"),d=S(null),c=y(()=>dt("groupRanking",l.value)),p=r=>!t.visibleTabIds||t.visibleTabIds.includes(r),m=y(()=>[...c.value&&p("overall")?[{id:"overall",label:s("analysis.subTabs.ranking.overall"),icon:"i-heroicons-trophy"}]:[],{id:"interaction",label:s("analysis.subTabs.ranking.interaction"),icon:"i-heroicons-heart"},{id:"proximity",label:s("analysis.subTabs.ranking.proximity"),icon:"i-heroicons-user-group"},{id:"hot-repeat",label:s("analysis.subTabs.quotes.hotRepeat"),icon:"i-heroicons-sparkles"},{id:"catchphrase",label:s("analysis.subTabs.quotes.catchphrase"),icon:"i-heroicons-chat-bubble-bottom-center-text"},{id:"keyword",label:s("analysis.subTabs.ranking.keyword"),icon:"i-heroicons-magnifying-glass"}].filter(n=>p(n.id))),b=y(()=>({startTs:t.timeFilter?.startTs,endTs:t.timeFilter?.endTs})),h=y(()=>({...b.value,memberId:d.value}));return E(m,r=>{r.some(n=>n.id===u.value)||(u.value=r[0]?.id??"hot-repeat")},{immediate:!0}),(r,n)=>(o(),C("div",Bl,[x(e(Ye),{modelValue:u.value,"onUpdate:modelValue":n[1]||(n[1]=v=>u.value=v),items:m.value,"persist-key":"groupRankingTab"},{right:I(()=>[u.value==="catchphrase"?(o(),k(Ge,{key:0,modelValue:d.value,"onUpdate:modelValue":n[0]||(n[0]=v=>d.value=v),"session-id":t.sessionId},null,8,["modelValue","session-id"])):A("",!0)]),_:1},8,["modelValue","items"]),a("div",zl,[x(We,{name:"fade",mode:"out-in"},{default:I(()=>[u.value==="overall"?(o(),k(Ao,{key:0,"session-id":t.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])):u.value==="interaction"?(o(),k(qo,{key:1,"session-id":t.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])):u.value==="proximity"?(o(),k(Ul,{key:2,"session-id":t.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])):u.value==="keyword"?(o(),C("div",Hl,[x(Us,{"session-id":t.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])])):u.value==="hot-repeat"?(o(),k(e(Za),{key:4,"session-id":t.sessionId,"time-filter":b.value},null,8,["session-id","time-filter"])):u.value==="catchphrase"?(o(),k(e(za),{key:5,"session-id":t.sessionId,"time-filter":h.value},null,8,["session-id","time-filter"])):A("",!0)]),_:1})])]))}}),El=je(Pl,[["__scopeId","data-v-616e92db"]]),Ol={class:"main-content max-w-5xl p-6"},Kl={class:"mb-4 text-sm text-gray-500 dark:text-gray-400 no-capture"},Wl={key:0,class:"divide-y divide-gray-100 dark:divide-gray-800"},jl={class:"w-32 shrink-0 pt-0.5 font-medium text-gray-900 dark:text-white"},Gl={class:"flex flex-1 flex-wrap items-center gap-2"},Yl={class:"flex items-center gap-1.5 rounded-lg bg-gray-50 px-3 py-1.5 dark:bg-gray-800"},Jl={class:"text-xs text-gray-400"},Ql={key:0,class:"text-gray-300 dark:text-gray-600"},Zl=U({__name:"NicknameHistory",props:{sessionId:{}},setup(i){const{t}=X(),s=i,l=S([]),u=S([]),d=S(!1);function c(b){return b.groupNickname||b.accountName||b.platformId}async function p(){if(s.sessionId)try{l.value=await Z().getMembers(s.sessionId)}catch(b){console.error("加载成员列表失败:",b)}}async function m(){if(!s.sessionId||l.value.length===0)return;d.value=!0;const b=[];try{const h=l.value.map(n=>Z().getMemberNameHistory(s.sessionId,n.id)),r=await Promise.all(h);l.value.forEach((n,v)=>{const w=r[v];w.length>2&&b.push({memberId:n.id,name:c(n),history:w})}),u.value=b}catch(h){console.error("加载昵称变更记录失败:",h)}finally{d.value=!1}}return E(()=>s.sessionId,async()=>{await p()},{immediate:!0}),E(()=>l.value.length,()=>{l.value.length>0&&m()}),De(async()=>{l.value.length===0&&await p()}),(b,h)=>{const r=Je;return o(),C("div",Ol,[a("p",Kl,f(e(t)("members.nicknameHistory.note")),1),x(e(O),{title:e(t)("members.nicknameHistory.title"),description:d.value?e(t)("members.nicknameHistory.loading"):u.value.length>0?e(t)("members.nicknameHistory.hasChanges",{count:u.value.length}):e(t)("members.nicknameHistory.noChanges")},{default:I(()=>[!d.value&&u.value.length>0?(o(),C("div",Wl,[(o(!0),C(H,null,G(u.value,n=>(o(),C("div",{key:n.memberId,class:"flex items-start gap-3 px-5 py-3"},[a("div",jl,f(n.name),1),a("div",Gl,[(o(!0),C(H,null,G(n.history,(v,w)=>(o(),C(H,{key:w},[a("div",Yl,[a("span",{class:K(["text-sm",v.endTs===null?"font-semibold text-pink-600":"text-gray-700 dark:text-gray-300"])},f(v.name),3),v.endTs===null?(o(),k(r,{key:0,color:"primary",variant:"soft",size:"xs"},{default:I(()=>[J(f(e(t)("members.nicknameHistory.current")),1)]),_:1})):A("",!0),a("span",Jl,"("+f(e(Bt)(v.startTs,v.endTs))+")",1)]),w<n.history.length-1?(o(),C("span",Ql,"→")):A("",!0)],64))),128))])]))),128))])):d.value?(o(),k(e(oe),{key:2,text:e(t)("members.nicknameHistory.loadingText")},null,8,["text"])):(o(),k(e(ie),{key:1,text:e(t)("members.nicknameHistory.empty")},null,8,["text"]))]),_:1},8,["title","description"])])}}}),Xl={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-page-dark"},en={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},tn={class:"text-lg font-semibold text-gray-900 dark:text-white"},an={class:"flex-1 overflow-auto"},sn=U({__name:"NicknameHistoryEntry",props:{sessionId:{}},setup(i){const{t}=X(),s=i,l=S(!1);return(u,d)=>{const c=be,p=$e;return o(),C(H,null,[x(c,{variant:"ghost",icon:"i-heroicons-clock",size:"sm",onClick:d[0]||(d[0]=m=>l.value=!0)},{default:I(()=>[J(f(e(t)("analysis.subTabs.member.nicknameHistory")),1)]),_:1}),s.sessionId?(o(),k(p,{key:0,open:l.value,"onUpdate:open":d[2]||(d[2]=m=>l.value=m),ui:{content:"max-w-6xl h-[85vh]"}},{content:I(()=>[a("div",Xl,[a("div",en,[a("h2",tn,f(e(t)("analysis.subTabs.member.nicknameHistory")),1),x(c,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:d[1]||(d[1]=m=>l.value=!1)})]),a("div",an,[x(Zl,{"session-id":s.sessionId},null,8,["session-id"])])])]),_:1},8,["open"])):A("",!0)],64)}}}),on={class:"relative flex h-full flex-col dark:bg-page-dark",style:{"padding-top":"var(--titlebar-area-height)"}},ln=["aria-label"],nn={class:"relative flex-1 overflow-y-auto"},rn={class:"h-full"},un={key:2,class:"flex h-full items-center justify-center"},dn={class:"text-gray-500"},cn={class:"flex h-full flex-col overflow-hidden bg-white dark:bg-page-dark"},mn={class:"flex flex-none items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},vn={class:"text-lg font-semibold text-gray-900 dark:text-white"},pn={class:"text-sm text-gray-500 dark:text-gray-400"},gn={class:"flex items-center gap-2"},hn={class:"flex-1 overflow-hidden"},fn=U({__name:"index",setup(i){const t=Pe(()=>Ee(()=>import("./MessageExportModal-DU71grc7.js"),__vite__mapDeps([9,1,2,3,10,11,12,13]))),{t:s}=X(),l=ct(),u=mt(),d=vt(),c=Ne(),p=pt(),{currentSessionId:m}=gt(d),b=S(!1),h=S(!1),r=S(!1),n=S(!1),v=S(!1);function w(){c.openChatRecordDrawer({})}const g=[{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:"lab",labelKey:"analysis.tabs.lab",icon:"i-heroicons-beaker"}],_=y(()=>p.debugMode?[...g,{id:"debug",labelKey:"analysis.tabs.debug",icon:"i-heroicons-bug-ant"}]:g),R=y(()=>_.value.map(Q=>Q.id)),{activeTab:$,isLoading:V,isInitialLoad:z,isSessionSwitching:ae,session:D,memberActivity:q,hourlyActivity:P,dailyActivity:ee,messageTypes:Y,timeRangeValue:W,fullTimeRange:N,availableYears:B,timeFilter:j,initialTimeState:pe,loadData:ke,handleTimeRangeInitialized:we}=_t({route:l,router:u,currentSessionId:m,selectSession:d.selectSession,defaultTab:p.defaultSessionTab,validTabIds:R.value});Ke("session-switch-loading",ae);const Ce=y(()=>q.value.reduce((Q,M)=>Q+M.messageCount,0)),Ie=y(()=>q.value.filter(Q=>Q.messageCount>0).length);return(Q,M)=>{const Se=be,Re=$e;return o(),C("div",on,[e(ae)?(o(),C("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":e(s)("common.loading")},[x(e(Ft))],8,ln)):A("",!0),e(D)?(o(),C(H,{key:1},[x($t,{"active-tab":e($),"onUpdate:activeTab":M[0]||(M[0]=T=>Ue($)?$.value=T:null),"time-range-value":e(W),"onUpdate:timeRangeValue":M[1]||(M[1]=T=>Ue(W)?W.value=T:null),title:e(D).name,avatar:e(D).groupAvatar,icon:"i-heroicons-chat-bubble-left-right","icon-class":"bg-primary-600 text-white dark:bg-primary-500 dark:text-white",tabs:_.value,"current-session-id":e(m),"initial-time-state":e(pe),onOpenIncrementalImport:M[2]||(M[2]=T=>r.value=!0),onOpenMemberManagement:M[3]||(M[3]=T=>v.value=!0),onOpenChatRecord:w,"onUpdate:fullRange":M[4]||(M[4]=T=>N.value=T),"onUpdate:availableYears":M[5]||(M[5]=T=>B.value=T),onTimeRangeInitialized:e(we)},null,8,["active-tab","time-range-value","title","avatar","tabs","current-session-id","initial-time-state","onTimeRangeInitialized"]),a("div",nn,[e(V)&&!e(ae)?(o(),k(e(oe),{key:0,variant:"overlay",text:e(s)("common.loading")},null,8,["text"])):A("",!0),a("div",rn,[x(We,{name:"tab-slide",mode:"out-in"},{default:I(()=>[e($)==="insights"?(o(),k(ns,{key:"insights-"+e(m),"session-id":e(m),session:e(D),"member-activity":e(q),"message-types":e(Y),"hourly-activity":e(P),"daily-activity":e(ee),"time-range":e(N),"filtered-message-count":Ce.value,"filtered-member-count":Ie.value,"time-filter":e(j)},null,8,["session-id","session","member-activity","message-types","hourly-activity","daily-activity","time-range","filtered-message-count","filtered-member-count","time-filter"])):e($)==="ranking"?(o(),k(El,{key:"ranking-"+e(m),"session-id":e(m),"time-filter":e(j)},null,8,["session-id","time-filter"])):e($)==="ai-chat"?(o(),k(e(Tt),{key:"ai-chat-"+e(m),"session-id":e(m),"session-name":e(D).name,"chat-type":"group"},null,8,["session-id","session-name"])):e($)==="memory"?(o(),k(Ct,{key:"memory-"+e(m),"session-id":e(m),"session-name":e(D).name},null,8,["session-id","session-name"])):e($)==="lab"?(o(),k(It,{key:"lab-"+e(m),"session-id":e(m),"chat-type":"group"},null,8,["session-id"])):e($)==="debug"?(o(),k(e(St),{key:"debug-"+e(m),"session-id":e(m)},null,8,["session-id"])):A("",!0)]),_:1})])]),x(Rt,{onOpenIncrementalImport:M[6]||(M[6]=T=>r.value=!0),onOpenSemanticIndex:M[7]||(M[7]=T=>b.value=!0),onOpenMemberManagement:M[8]||(M[8]=T=>v.value=!0),onOpenChatRecord:w,onOpenMessageExport:M[9]||(M[9]=T=>n.value=!0)})],64)):e(z)?A("",!0):(o(),C("div",un,[a("p",dn,f(e(s)("analysis.groupChat.loadError")),1)])),e(m)&&e(D)?(o(),k(Vt,{key:3,modelValue:b.value,"onUpdate:modelValue":M[10]||(M[10]=T=>b.value=T),"session-id":e(m),"message-count":e(D).messageCount},null,8,["modelValue","session-id","message-count"])):A("",!0),e(m)&&e(D)?(o(),k(Qt,{key:4,modelValue:h.value,"onUpdate:modelValue":M[11]||(M[11]=T=>h.value=T),"session-id":e(m),"chat-type":"group","auto-check":""},null,8,["modelValue","session-id"])):A("",!0),e(m)&&e(D)?(o(),k(Mt,{key:5,modelValue:r.value,"onUpdate:modelValue":M[12]||(M[12]=T=>r.value=T),"session-id":e(m),"session-name":e(D).name,onImported:M[13]||(M[13]=()=>{e(ke)(),e(d).loadSessions()})},null,8,["modelValue","session-id","session-name"])):A("",!0),e(m)?(o(),k(e(t),{key:6,modelValue:n.value,"onUpdate:modelValue":M[14]||(M[14]=T=>n.value=T)},null,8,["modelValue"])):A("",!0),e(m)?(o(),k(Re,{key:7,open:v.value,"onUpdate:open":M[16]||(M[16]=T=>v.value=T),ui:{content:"max-w-6xl h-[85vh]"}},{content:I(()=>[a("div",cn,[a("div",mn,[a("div",null,[a("h2",vn,f(e(s)("analysis.tooltip.memberManagement")),1),a("p",pn,f(e(s)("members.list.description",{count:e(D)?.memberCount??0})),1)]),a("div",gn,[x(sn,{"session-id":e(m)},null,8,["session-id"]),x(Se,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:M[15]||(M[15]=T=>v.value=!1)})])]),a("div",hn,[x(Lt,{"session-id":e(m),"show-header":!1,"chat-type":"group",onDataChanged:e(ke)},null,8,["session-id","onDataChanged"])])])]),_:1},8,["open"])):A("",!0)])}}}),ei=je(fn,[["__scopeId","data-v-1e621d59"]]);export{ei as default};