chatlab-cli 0.30.2-beta.1 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/dist/{chat-command-VBDMWOKL.mjs → chat-command-CHV7RLBH.mjs} +9 -8
  2. package/dist/{chat-command-VBDMWOKL.mjs.map → chat-command-CHV7RLBH.mjs.map} +1 -1
  3. package/dist/{chunk-326OCJOT.mjs → chunk-DA5T64RY.mjs} +2 -2
  4. package/dist/{chunk-M2PXDX4G.mjs → chunk-DBBL74RK.mjs} +31 -22
  5. package/dist/chunk-DBBL74RK.mjs.map +1 -0
  6. package/dist/{chunk-KBSAVUFV.mjs → chunk-EXD2SXWL.mjs} +89 -15
  7. package/dist/chunk-EXD2SXWL.mjs.map +1 -0
  8. package/dist/{chunk-D3DPCDII.mjs → chunk-JH5RAJT2.mjs} +83 -34
  9. package/dist/chunk-JH5RAJT2.mjs.map +1 -0
  10. package/dist/{chunk-5EE2EFPE.mjs → chunk-RD335EMA.mjs} +4 -4
  11. package/dist/{chunk-WV5GSRQM.mjs → chunk-RDCUGC24.mjs} +5 -15
  12. package/dist/chunk-RDCUGC24.mjs.map +1 -0
  13. package/dist/{chunk-TEX44HNL.mjs → chunk-SNCXU2QL.mjs} +5 -15
  14. package/dist/chunk-SNCXU2QL.mjs.map +1 -0
  15. package/dist/{chunk-36JGKW6K.mjs → chunk-T64GA5HP.mjs} +1134 -364
  16. package/dist/chunk-T64GA5HP.mjs.map +1 -0
  17. package/dist/{chunk-LVEJHB3X.mjs → chunk-UWWFOEGF.mjs} +494 -97
  18. package/dist/chunk-UWWFOEGF.mjs.map +1 -0
  19. package/dist/{chunk-ULNRUS55.mjs → chunk-WQCY45U2.mjs} +3 -3
  20. package/dist/chunk-YAQLYL52.mjs +14 -0
  21. package/dist/chunk-YAQLYL52.mjs.map +1 -0
  22. package/dist/{chunk-TCZHG3G7.mjs → chunk-YPQ72HMX.mjs} +2 -2
  23. package/dist/cli.mjs +8 -7
  24. package/dist/contacts-worker.mjs +2 -2
  25. package/dist/global-insight-worker.mjs +179 -0
  26. package/dist/global-insight-worker.mjs.map +1 -0
  27. package/dist/{http-L4AMELPZ.mjs → http-3B5ARN7A.mjs} +12 -11
  28. package/dist/{import-WWCSXGVS.mjs → import-2DZGNSEX.mjs} +10 -7
  29. package/dist/index.mjs +12 -11
  30. package/dist/{mcp-A4M3LT5O.mjs → mcp-44I6FUUQ.mjs} +12 -11
  31. package/dist/{mcp-A4M3LT5O.mjs.map → mcp-44I6FUUQ.mjs.map} +1 -1
  32. package/dist/people-relationships-worker.mjs +2 -2
  33. package/dist/semantic-index-worker.mjs +1 -1
  34. package/dist/{src-MPNBTFOE.mjs → src-R3QX6L3L.mjs} +26 -6
  35. package/dist/{stream-import-HIE7PNL4.mjs → stream-import-VUEL2TTU.mjs} +10 -7
  36. package/dist/{worker-runtime-BJXO24XX.mjs → worker-runtime-GJAOIIZW.mjs} +6 -5
  37. package/dist/{worker-runtime-BJXO24XX.mjs.map → worker-runtime-GJAOIIZW.mjs.map} +1 -1
  38. package/dist-web/assets/ActionToolsPanel-fAio70bI.css +1 -0
  39. package/dist-web/assets/ActionToolsPanel.vue_vue_type_script_setup_true_lang-CdJT0t2f.js +110 -0
  40. package/dist-web/assets/{BufferResource-CYSOCeE0.js → BufferResource-BPGkshPa.js} +1 -1
  41. package/dist-web/assets/{CanvasRenderer-j7Z_ij_m.js → CanvasRenderer-DTKkZhq4.js} +1 -1
  42. package/dist-web/assets/{EChartWordcloud-Clg60FMo.js → EChartWordcloud-DU3ZYdgz.js} +1 -1
  43. package/dist-web/assets/{Filter-BgGyBeXz.js → Filter-CHXKzS2l.js} +1 -1
  44. package/dist-web/assets/{LoadingState.vue_vue_type_script_setup_true_lang-D_dJuLWJ.js → LoadingState.vue_vue_type_script_setup_true_lang-DACMroOe.js} +1 -1
  45. package/dist-web/assets/MessageExportModal-h-zl0dx1.js +1 -0
  46. package/dist-web/assets/PageHeader-CK0hTsdx.js +1 -0
  47. package/dist-web/assets/PageHeader-XIXMTomn.css +1 -0
  48. package/dist-web/assets/{RelationshipGalaxyCanvas-D2owKyDp.js → RelationshipGalaxyCanvas-Dwdy5flh.js} +3 -3
  49. package/dist-web/assets/{RelationshipGalaxyThreeCanvas-DfJ2x8y9.js → RelationshipGalaxyThreeCanvas-CtY4TGen.js} +1 -1
  50. package/dist-web/assets/{RenderTargetSystem-BQ__RbzR.js → RenderTargetSystem-BE56mKRG.js} +1 -1
  51. package/dist-web/assets/ThemeCard.vue_vue_type_script_setup_true_lang-BoZyssJF.js +1 -0
  52. package/dist-web/assets/TimeSelect.vue_vue_type_script_setup_true_lang-27hMyAUE.js +1 -0
  53. package/dist-web/assets/{WebGLRenderer-DuThUm1R.js → WebGLRenderer-Dm18dxOf.js} +1 -1
  54. package/dist-web/assets/{WebGPURenderer-d8BwTpxP.js → WebGPURenderer-BF6TF-is.js} +1 -1
  55. package/dist-web/assets/annual-summary-time-range-DVLXK1r4.js +1 -0
  56. package/dist-web/assets/base-CFPyD9Gy.js +1 -0
  57. package/dist-web/assets/{browserAll-t_tpJM2L.js → browserAll-Cn_CfkXl.js} +1 -1
  58. package/dist-web/assets/dateFormat-BcqNKTQ1.js +1 -0
  59. package/dist-web/assets/{electron-6T3FvCfK.js → electron-B6xOabTq.js} +1 -1
  60. package/dist-web/assets/electron-hcWiB7Gg.js +1 -0
  61. package/dist-web/assets/fetch-BPkgnY0R.js +1 -0
  62. package/dist-web/assets/{fetch-DFifsv8L.js → fetch-BRXmDI_2.js} +1 -1
  63. package/dist-web/assets/{fetch-BgeRLaoA.js → fetch-BUm1isWe.js} +1 -1
  64. package/dist-web/assets/{fetch-Y-LYZmiT.js → fetch-CBOJwwJp.js} +3 -3
  65. package/dist-web/assets/{fetch-C7rlHKE7.js → fetch-CEhUu1Yu.js} +1 -1
  66. package/dist-web/assets/fetch-C_EfVFJi.js +3 -0
  67. package/dist-web/assets/{fetch-BVM5kQ6-.js → fetch-DL_u25Ui.js} +1 -1
  68. package/dist-web/assets/{fetch-BLTlXcRA.js → fetch-DMLq3xPG.js} +1 -1
  69. package/dist-web/assets/{fetch-BgIWhYDV.js → fetch-DylpNKCR.js} +1 -1
  70. package/dist-web/assets/fetch-etgwVKIw.js +1 -0
  71. package/dist-web/assets/index-0x1QPzKZ.js +1 -0
  72. package/dist-web/assets/index-B5S9FnfP.js +1 -0
  73. package/dist-web/assets/index-BS6loLHW.js +1 -0
  74. package/dist-web/assets/index-BfO_LpDv.css +1 -0
  75. package/dist-web/assets/index-BrTlAl8b.js +1 -0
  76. package/dist-web/assets/index-ByUaiVQK.css +1 -0
  77. package/dist-web/assets/{index-BA87rT8F.js → index-C3TnydSt.js} +1 -1
  78. package/dist-web/assets/index-CAWO10k1.js +2 -0
  79. package/dist-web/assets/index-C_0GHEcb.css +1 -0
  80. package/dist-web/assets/index-Chm17wNe.js +2 -0
  81. package/dist-web/assets/index-DAr_2DlV.js +173 -0
  82. package/dist-web/assets/index-Em6upenM.js +64 -0
  83. package/dist-web/assets/index-FoTy2Cce.js +1 -0
  84. package/dist-web/assets/index-YADL4XIp.js +22 -0
  85. package/dist-web/assets/index-ZsZwPLWy.css +1 -0
  86. package/dist-web/assets/index-_6lck7Bv.css +1 -0
  87. package/dist-web/assets/index-aMIgqj43.js +1 -0
  88. package/dist-web/assets/index-y7cxH1Et.css +1 -0
  89. package/dist-web/assets/index-zZVsV5HB.js +1 -0
  90. package/dist-web/assets/{people-page-header-Mupn-U_b.js → people-page-header-BdKM1qhX.js} +1 -1
  91. package/dist-web/assets/types-CZnACqaB.js +1 -0
  92. package/dist-web/assets/{vendor-echarts-hJVnODyU.js → vendor-echarts-B-i_56Av.js} +1 -1
  93. package/dist-web/assets/{vendor-echarts-wordcloud-k5ih2Jl4.js → vendor-echarts-wordcloud-Ca8n6qS6.js} +1 -1
  94. package/dist-web/assets/{vendor-nuxt-ui-DaLxYaC4.js → vendor-nuxt-ui-CS1uxE9C.js} +2 -2
  95. package/dist-web/assets/{vendor-reka-ui-CzM4kDQ7.js → vendor-reka-ui-Cta6JPvN.js} +1 -1
  96. package/dist-web/assets/web-BUZ-dZy0.js +1 -0
  97. package/dist-web/assets/{webworkerAll-CoXPTsvw.js → webworkerAll-BKGP--A4.js} +1 -1
  98. package/dist-web/index.html +4 -4
  99. package/package.json +1 -1
  100. package/dist/chunk-36JGKW6K.mjs.map +0 -1
  101. package/dist/chunk-D3DPCDII.mjs.map +0 -1
  102. package/dist/chunk-KBSAVUFV.mjs.map +0 -1
  103. package/dist/chunk-LVEJHB3X.mjs.map +0 -1
  104. package/dist/chunk-M2PXDX4G.mjs.map +0 -1
  105. package/dist/chunk-TEX44HNL.mjs.map +0 -1
  106. package/dist/chunk-WV5GSRQM.mjs.map +0 -1
  107. package/dist-web/assets/DebugToolsPanel-D_lFIW6j.css +0 -1
  108. package/dist-web/assets/DebugToolsPanel.vue_vue_type_script_setup_true_lang-Bk9RvIsW.js +0 -110
  109. package/dist-web/assets/MessageExportModal-BkEhC8s3.js +0 -1
  110. package/dist-web/assets/PageHeader-Bbn87QZS.css +0 -1
  111. package/dist-web/assets/PageHeader-CUwv2AFR.js +0 -1
  112. package/dist-web/assets/electron-D9vE5t3H.js +0 -1
  113. package/dist-web/assets/fetch-D0ccqGk_.js +0 -1
  114. package/dist-web/assets/fetch-DdoIAbX4.js +0 -1
  115. package/dist-web/assets/fetch-HpiZrx8C.js +0 -3
  116. package/dist-web/assets/index---rXG1hZ.css +0 -1
  117. package/dist-web/assets/index-B4l3rHie.css +0 -1
  118. package/dist-web/assets/index-B5YKZflT.js +0 -2
  119. package/dist-web/assets/index-C1p9CbmN.css +0 -1
  120. package/dist-web/assets/index-COpza1A4.css +0 -1
  121. package/dist-web/assets/index-CQsrsY5d.js +0 -64
  122. package/dist-web/assets/index-CdsKtFEJ.js +0 -22
  123. package/dist-web/assets/index-DosG7LmJ.css +0 -1
  124. package/dist-web/assets/index-DraLHiEK.js +0 -173
  125. package/dist-web/assets/index-IL5tkxhM.js +0 -2
  126. package/dist-web/assets/index-Tgk7RCvc.js +0 -1
  127. package/dist-web/assets/index-cyh3gOBe.js +0 -1
  128. package/dist-web/assets/index-g8yqhgfj.js +0 -1
  129. package/dist-web/assets/web-DAgXT8gQ.js +0 -1
  130. /package/dist/{chunk-326OCJOT.mjs.map → chunk-DA5T64RY.mjs.map} +0 -0
  131. /package/dist/{chunk-5EE2EFPE.mjs.map → chunk-RD335EMA.mjs.map} +0 -0
  132. /package/dist/{chunk-ULNRUS55.mjs.map → chunk-WQCY45U2.mjs.map} +0 -0
  133. /package/dist/{chunk-TCZHG3G7.mjs.map → chunk-YPQ72HMX.mjs.map} +0 -0
  134. /package/dist/{http-L4AMELPZ.mjs.map → http-3B5ARN7A.mjs.map} +0 -0
  135. /package/dist/{import-WWCSXGVS.mjs.map → import-2DZGNSEX.mjs.map} +0 -0
  136. /package/dist/{src-MPNBTFOE.mjs.map → src-R3QX6L3L.mjs.map} +0 -0
  137. /package/dist/{stream-import-HIE7PNL4.mjs.map → stream-import-VUEL2TTU.mjs.map} +0 -0
@@ -0,0 +1 @@
1
+ import{a as $,b as B,c as C,d as N,u as I,e as L}from"./vendor-nuxt-ui-CS1uxE9C.js";import{p as R,b as i,P as _,L as l,K as f,u as o,G as x,a5 as s,T as r,U as v,R as S,a9 as D}from"./vendor-reka-ui-Cta6JPvN.js";import{u as W,j}from"./index-YADL4XIp.js";import{_ as z}from"./ThemeCard.vue_vue_type_script_setup_true_lang-BoZyssJF.js";import"./vendor-snapdom-XnBoh1gd.js";const A={class:"flex min-h-screen items-center justify-center bg-gray-50 dark:bg-page-dark"},E={class:"text-center"},F={class:"mt-2 text-sm text-gray-500 dark:text-gray-400"},M={key:0,class:"text-sm text-red-500"},P={class:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400"},T={class:"text-center text-xs text-gray-400 dark:text-gray-500"},q={key:0,class:"text-center text-xs text-amber-500 dark:text-amber-400"},X=R({__name:"index",setup(G){const{t:e}=W(),h=I(),y=L(),g=j(),m=i(""),c=i(g.rememberDevice),n=i(""),u=i(!1);function b(t){return!t||!t.startsWith("/")||t.startsWith("/login")?"/":t}async function k(){const t=m.value.trim();if(!t){n.value=e("common.login.errorEmpty");return}u.value=!0,n.value="";try{if(!(await fetch("/api/v1/status",{headers:{Authorization:`Bearer ${t}`}})).ok){n.value=e("common.login.errorInvalid");return}g.login(t,c.value);const d=b(y.query.redirect);h.replace(d)}catch{n.value=e("common.login.errorNetwork")}finally{u.value=!1}}return(t,a)=>{const d=B,V=$,U=C,w=N;return x(),_("div",A,[l(o(z),{class:"w-full max-w-sm space-y-6 p-8"},{default:f(()=>[s("div",E,[a[2]||(a[2]=s("h1",{class:"text-2xl font-bold text-gray-900 dark:text-white"},"ChatLab",-1)),s("p",F,r(o(e)("common.login.description")),1)]),s("form",{class:"space-y-4",onSubmit:D(k,["prevent"])},[l(V,{label:o(e)("common.login.tokenLabel")},{default:f(()=>[l(d,{modelValue:m.value,"onUpdate:modelValue":a[0]||(a[0]=p=>m.value=p),type:"password",placeholder:o(e)("common.login.tokenPlaceholder"),autocomplete:"off",class:"w-full"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),n.value?(x(),_("p",M,r(n.value),1)):v("",!0),s("label",P,[l(U,{modelValue:c.value,"onUpdate:modelValue":a[1]||(a[1]=p=>c.value=p)},null,8,["modelValue"]),s("span",null,r(o(e)("common.login.rememberDevice")),1)]),l(w,{type:"submit",block:"",loading:u.value,color:"primary"},{default:f(()=>[S(r(o(e)("common.login.submit")),1)]),_:1},8,["loading"])],32),s("p",T,r(o(e)("common.login.hint")),1),c.value?(x(),_("p",q,r(o(e)("common.login.rememberWarning")),1)):v("",!0)]),_:1})])}}});export{X as default};
@@ -0,0 +1 @@
1
+ .fade-enter-active[data-v-a5aec593],.fade-leave-active[data-v-a5aec593]{transition:opacity .15s ease}.fade-enter-from[data-v-a5aec593],.fade-leave-to[data-v-a5aec593]{opacity:0}.fade-enter-active[data-v-5787d95d],.fade-leave-active[data-v-5787d95d]{transition:opacity .15s ease}.fade-enter-from[data-v-5787d95d],.fade-leave-to[data-v-5787d95d]{opacity:0}.tab-slide-enter-active[data-v-df05ebc3],.tab-slide-leave-active[data-v-df05ebc3]{transition:opacity .2s ease,transform .2s ease}.tab-slide-enter-from[data-v-df05ebc3]{opacity:0;transform:translateY(10px)}.tab-slide-leave-to[data-v-df05ebc3]{opacity:0;transform:translateY(-10px)}
@@ -0,0 +1 @@
1
+ import{_ as Z,d as H}from"./vendor-nuxt-ui-CS1uxE9C.js";import{u as V,M as J,r as Q,s as W,k as E,t as X}from"./index-YADL4XIp.js";import{_ as tt}from"./LoadingState.vue_vue_type_script_setup_true_lang-DACMroOe.js";import{u as et,w as st}from"./annual-summary-time-range-DVLXK1r4.js";import{_ as at,C as nt,g as it}from"./base-CFPyD9Gy.js";import{f as ot}from"./dateFormat-BcqNKTQ1.js";import{_ as F}from"./ThemeCard.vue_vue_type_script_setup_true_lang-BoZyssJF.js";import{p as P,G as r,P as l,Z as z,a3 as R,a5 as t,T as s,u as n,Q as rt,h as c,H as q,L as p,K as A,a0 as G,w as lt,z as ct,U as N,R as U,b as K}from"./vendor-reka-ui-Cta6JPvN.js";import"./vendor-echarts-wordcloud-Ca8n6qS6.js";import"./vendor-snapdom-XnBoh1gd.js";import"./vendor-echarts-B-i_56Av.js";import"./vendor-zrender-5DcYjSZk.js";const ut={class:"grid grid-cols-2 gap-x-3 gap-y-4 sm:grid-cols-3 lg:grid-cols-4"},dt={class:"mb-1.5 text-[10px] font-semibold text-gray-500 dark:text-zinc-400"},gt={class:"grid grid-cols-7 gap-0.5","aria-hidden":"true"},mt=["title"],ht=P({__name:"AnnualCalendarGrid",props:{range:{},data:{}},setup(h){const e=h,{t:o}=V(),Y=c(()=>Math.max(...e.data.map(d=>d.messageCount),1)),k=c(()=>new Map(e.data.map(d=>[d.date,d.messageCount]))),b=c(()=>new Date(e.range.startTs*1e3)),i=c(()=>new Date(e.range.endTs*1e3)),M=c(()=>{const d=b.value,D=i.value,f=[],m=e.range.year??d.getFullYear(),$=e.range.mode==="year"?new Date(m,0,1):new Date(d.getFullYear(),d.getMonth(),1),L=e.range.mode==="year"?new Date(m,11,1):new Date(D.getFullYear(),D.getMonth(),1);for(;$<=L;){const _=$.getFullYear(),S=$.getMonth(),C=`${_}-${String(S+1).padStart(2,"0")}`,a=new Date(_,S+1,0).getDate(),g=Array.from({length:a},(j,u)=>{const B=u+1,I=`${C}-${String(B).padStart(2,"0")}`,x=new Date(_,S,B),v=k.value.get(I)??0,T=x>=w(d)&&x<=w(D);return{key:I,day:B,count:v,inRange:T,level:T&&v>0?Math.max(1,Math.ceil(v/Y.value*4)):0}});f.push({key:C,label:e.range.mode==="year"?o("insight.monthLabel",{month:S+1}):C.replace("-","/"),leadingDays:(new Date(_,S,1).getDay()+6)%7,days:g}),$.setMonth($.getMonth()+1)}return f});function w(d){return new Date(d.getFullYear(),d.getMonth(),d.getDate())}return(d,D)=>(r(),l("div",ut,[(r(!0),l(z,null,R(M.value,f=>(r(),l("div",{key:f.key,class:"min-w-0"},[t("div",dt,s(f.label),1),t("div",gt,[(r(!0),l(z,null,R(f.leadingDays,m=>(r(),l("span",{key:`blank-${m}`,class:"aspect-square"}))),128)),(r(!0),l(z,null,R(f.days,m=>(r(),l("span",{key:m.key,class:rt(["aspect-square min-h-[5px] rounded-[2px] bg-gray-100 dark:bg-zinc-800",{"opacity-30":!m.inRange,"bg-pink-200 dark:bg-pink-950":m.level===1,"bg-pink-300 dark:bg-pink-800":m.level===2,"bg-pink-500 dark:bg-pink-600":m.level===3,"bg-pink-700 dark:bg-pink-400":m.level===4}]),title:`${m.key}: ${m.count} ${n(o)("insight.messages")}`},null,10,mt))),128))])]))),128))]))}}),xt=P({__name:"AnnualMessageTrend",props:{range:{},data:{},height:{}},setup(h){const e=h,{t:o}=V(),Y=c(()=>({labels:e.data.map(k=>e.range.mode==="year"?o("insight.monthLabel",{month:Number(k.month.slice(5))}):k.month.replace("-","/")),values:e.data.map(k=>k.messageCount)}));return(k,b)=>(r(),q(n(at),{data:Y.value,height:h.height??260,"border-radius":3},null,8,["data","height"]))}}),vt={class:"grid gap-4 lg:grid-cols-12"},pt={class:"relative z-10 min-w-0 p-5 sm:p-6"},yt={class:"flex flex-col gap-5 xl:flex-row xl:items-start xl:justify-between"},_t={class:"min-w-0"},kt={class:"text-2xl font-bold text-gray-900 dark:text-white sm:text-3xl"},ft={class:"mt-3 space-y-1.5 text-xs font-medium text-gray-500 dark:text-zinc-400"},bt={class:"flex items-center gap-2"},wt={class:"font-mono"},Dt={class:"flex flex-wrap items-center gap-x-2 gap-y-1"},Ct={class:"grid grid-cols-2 gap-x-6 gap-y-4 sm:grid-cols-4 xl:shrink-0"},Mt={class:"font-mono text-xl font-black tabular-nums text-gray-900 dark:text-white"},$t={class:"mt-1 truncate text-[10px] font-medium text-gray-500 dark:text-zinc-400"},St={class:"mt-7 flex items-center justify-between gap-3"},Tt={class:"text-[11px] font-bold uppercase text-pink-600 dark:text-pink-400"},zt={class:"text-[10px] text-gray-400 dark:text-zinc-500"},Yt={class:"mt-2"},Lt={class:"min-w-0 p-5 sm:p-6"},At={class:"flex items-start justify-between gap-4"},Rt={class:"text-[11px] font-bold uppercase text-pink-600 dark:text-pink-400"},Nt={class:"mt-1 text-[10px] text-gray-400 dark:text-zinc-500"},jt={class:"shrink-0 text-right"},Bt={class:"font-mono text-lg font-black tabular-nums text-gray-900 dark:text-white"},Ft={class:"text-[9px] text-gray-400 dark:text-zinc-500"},It={class:"mt-5"},Vt={class:"min-w-0 p-5 sm:p-6"},Pt={class:"text-[11px] font-bold uppercase text-pink-600 dark:text-pink-400"},Ot={class:"mt-1 text-[10px] text-gray-400 dark:text-zinc-500"},Ut={key:0,class:"mt-5 grid grid-cols-2 gap-x-5 gap-y-4 sm:grid-cols-3"},qt={class:"flex items-end justify-between gap-2"},Et={class:"truncate text-xs font-medium text-gray-600 dark:text-zinc-300"},Gt={class:"font-mono text-xs font-black tabular-nums text-gray-900 dark:text-white"},Kt={class:"mt-2 h-1 overflow-hidden rounded-full bg-gray-100 dark:bg-zinc-800"},Zt={class:"mt-1.5 font-mono text-[9px] text-gray-400 dark:text-zinc-500"},Ht={key:1,class:"flex h-28 items-center justify-center text-xs text-gray-400 dark:text-zinc-600"},Jt={class:"min-w-0 p-5 sm:p-6"},Qt={class:"flex items-start justify-between gap-3"},Wt={class:"text-[11px] font-bold uppercase text-pink-600 dark:text-pink-400"},Xt={class:"mt-1 text-[10px] text-gray-400 dark:text-zinc-500"},te={class:"flex shrink-0 gap-3 text-right"},ee={class:"font-mono text-sm font-black text-gray-900 dark:text-white"},se={class:"text-[9px] text-gray-400 dark:text-zinc-500"},ae={class:"font-mono text-sm font-black text-gray-900 dark:text-white"},ne={key:0,class:"mt-5 flex h-24 items-end gap-2"},ie={class:"flex h-16 w-full items-end rounded-sm bg-gray-100 dark:bg-zinc-800"},oe=["title"],re={class:"w-full truncate text-center font-mono text-[8px] text-gray-400 dark:text-zinc-500"},le={key:1,class:"flex h-24 items-center justify-center text-xs text-gray-400 dark:text-zinc-600"},ce={class:"min-w-0 p-5 sm:p-6"},ue={class:"text-[11px] font-bold uppercase text-pink-600 dark:text-pink-400"},de={class:"mt-4 grid grid-cols-3 divide-x divide-gray-200 dark:divide-white/10"},ge={class:"truncate font-mono text-sm font-black tabular-nums text-gray-900 dark:text-white"},me={class:"mt-1 truncate text-[9px] font-medium text-gray-500 dark:text-zinc-400"},he={class:"mt-0.5 truncate text-[8px] text-gray-400 dark:text-zinc-500"},xe=P({__name:"AnnualInsightBoard",props:{range:{},metrics:{},coverage:{},monthlyActivity:{},dailyActivity:{},messageTypes:{},textLength:{}},setup(h){const e=h,{t:o}=V(),Y=c(()=>e.range.mode==="year"?o("insight.overviewCard.yearTitle",{year:e.range.year}):o("insight.overviewCard.recentTitle")),k=c(()=>ot(e.range.startTs,e.range.endTs,"YYYY/MM/DD")),b=c(()=>[{key:"messages",value:e.metrics.sentMessageCount},{key:"activeDays",value:e.metrics.activeDayCount},{key:"contacts",value:e.metrics.directContactCount},{key:"dailyMessages",value:e.metrics.averageMessagesPerDay}]),i=c(()=>e.monthlyActivity.reduce((a,g)=>!a||g.messageCount>a.messageCount?g:a,null)),M=c(()=>e.dailyActivity.reduce((a,g)=>!a||g.messageCount>a.messageCount?g:a,null)),w=c(()=>[...e.messageTypes].sort((a,g)=>g.count-a.count).slice(0,6)),d=c(()=>e.messageTypes.reduce((a,g)=>a+g.count,0)),D=c(()=>e.messageTypes.find(a=>a.type===J.TEXT)?.count??0),f=c(()=>C(D.value,d.value)),m=c(()=>Math.max(...e.textLength.buckets.map(a=>a.count),1)),$=c(()=>{const a=Math.max(1,Math.round((e.range.endTs-e.range.startTs)/86400)+1);return C(e.metrics.activeDayCount,a)}),L=c(()=>[{key:"dailyContacts",value:_(e.metrics.averageDirectContactsPerDay),detail:o("insight.overviewCard.perDay")},{key:"peakMonth",value:S(i.value?.month),detail:o("insight.overviewCard.messagesCount",{count:_(i.value?.messageCount??0)})},{key:"peakDay",value:M.value?.date.slice(5).replace("-","/")??"-",detail:o("insight.overviewCard.messagesCount",{count:_(M.value?.messageCount??0)})}]);function _(a){return Number.isInteger(a)?a.toLocaleString():a.toLocaleString(void 0,{maximumFractionDigits:1})}function S(a){return a?e.range.mode==="year"?o("insight.monthLabel",{month:Number(a.slice(5))}):a.replace("-","/"):"-"}function C(a,g){return g>0?Math.round(a/g*100):0}return(a,g)=>{const j=Z;return r(),l("div",vt,[p(n(F),{class:"relative isolate lg:col-span-8"},{default:A(()=>[p(n(nt)),t("section",pt,[t("div",yt,[t("div",_t,[t("h2",kt,s(Y.value),1),t("div",ft,[t("div",bt,[p(j,{name:"i-heroicons-calendar",class:"h-4 w-4 opacity-70"}),t("span",wt,s(k.value),1)]),t("div",Dt,[p(j,{name:"i-heroicons-circle-stack",class:"h-4 w-4 opacity-70"}),t("span",null,s(n(o)("insight.status.coverage",{analyzed:h.coverage.analyzedSessions,total:h.coverage.totalSessions})),1)])])]),t("div",Ct,[(r(!0),l(z,null,R(b.value,u=>(r(),l("div",{key:u.key,class:"min-w-0"},[t("div",Mt,s(_(u.value)),1),t("div",$t,s(n(o)(`insight.kpis.${u.key}`)),1)]))),128))])]),t("div",St,[t("h3",Tt,s(n(o)("insight.sections.overview")),1),t("span",zt,s(n(o)("insight.sections.overviewDescription")),1)]),t("div",Yt,[p(xt,{range:h.range,data:h.monthlyActivity,height:210},null,8,["range","data"])])])]),_:1}),p(n(F),{class:"lg:col-span-4"},{default:A(()=>[t("section",Lt,[t("div",At,[t("div",null,[t("h3",Rt,s(n(o)("insight.overviewCard.activity")),1),t("p",Nt,s(n(o)("insight.sections.activityDescription")),1)]),t("div",jt,[t("div",Bt,s(h.metrics.activeDayCount),1),t("div",Ft,s(n(o)("insight.overviewCard.activeRate",{rate:$.value})),1)])]),t("div",It,[p(ht,{range:h.range,data:h.dailyActivity},null,8,["range","data"])])])]),_:1}),p(n(F),{class:"lg:col-span-5"},{default:A(()=>[t("section",Vt,[t("h3",Pt,s(n(o)("insight.sections.messageTypes")),1),t("p",Ot,s(n(o)("insight.sections.messageTypesDescription")),1),w.value.length?(r(),l("div",Ut,[(r(!0),l(z,null,R(w.value,u=>(r(),l("div",{key:u.type,class:"min-w-0"},[t("div",qt,[t("span",Et,s(n(it)(u.type,n(o))),1),t("span",Gt,s(C(u.count,d.value))+"% ",1)]),t("div",Kt,[t("div",{class:"h-full rounded-full bg-pink-500",style:G({width:`${C(u.count,d.value)}%`})},null,4)]),t("div",Zt,s(_(u.count)),1)]))),128))])):(r(),l("div",Ht,s(n(o)("insight.noData")),1))])]),_:1}),p(n(F),{class:"lg:col-span-3"},{default:A(()=>[t("section",Jt,[t("div",Qt,[t("div",null,[t("h3",Wt,s(n(o)("insight.sections.textLength")),1),t("p",Xt,s(n(o)("insight.overviewCard.textRatio"))+" "+s(f.value)+"% ",1)]),t("div",te,[t("div",null,[t("div",ee,s(h.textLength.median??"-"),1),t("div",se,s(n(o)("insight.length.median")),1)]),t("div",null,[t("div",ae,s(h.textLength.p90??"-"),1),g[0]||(g[0]=t("div",{class:"text-[9px] text-gray-400 dark:text-zinc-500"},"P90",-1))])])]),h.textLength.textMessageCount?(r(),l("div",ne,[(r(!0),l(z,null,R(h.textLength.buckets,u=>(r(),l("div",{key:u.key,class:"flex min-w-0 flex-1 flex-col items-center gap-2"},[t("div",ie,[t("div",{class:"w-full rounded-sm bg-blue-500/80 dark:bg-blue-400/80",style:G({height:`${Math.max(4,u.count/m.value*100)}%`}),title:`${u.key}: ${u.count}`},null,12,oe)]),t("span",re,s(u.key),1)]))),128))])):(r(),l("div",le,s(n(o)("insight.noTextData")),1))])]),_:1}),p(n(F),{class:"lg:col-span-4"},{default:A(()=>[t("section",ce,[t("h3",ue,s(n(o)("insight.overviewCard.keyMetrics")),1),t("div",de,[(r(!0),l(z,null,R(L.value,u=>(r(),l("div",{key:u.key,class:"min-w-0 px-3 first:pl-0 last:pr-0"},[t("div",ge,s(u.value),1),t("div",me,s(n(o)(`insight.overviewCard.${u.key}`)),1),t("div",he,s(u.detail),1)]))),128))])])]),_:1})])}}}),ve={class:"min-h-0 flex-1 overflow-y-auto"},pe={class:"mx-auto w-full max-w-[1120px] space-y-6 px-4 py-5 sm:px-6 sm:py-6"},ye={class:"min-w-0"},_e={key:1,class:"flex items-center gap-2 rounded-xl border border-amber-100 bg-amber-50/50 px-4 py-2.5 text-xs text-amber-800 backdrop-blur-sm dark:border-amber-950/40 dark:bg-amber-950/20 dark:text-amber-300"},ke={key:2,class:"flex flex-wrap items-center justify-between gap-3 rounded-xl border border-red-200 bg-red-50/50 px-4 py-2.5 text-xs text-red-800 backdrop-blur-sm dark:border-red-950/40 dark:bg-red-950/20 dark:text-red-300"},fe={key:0,class:"flex flex-wrap items-center justify-between gap-3 rounded-xl border border-gray-200 bg-white p-4 text-xs text-gray-600 dark:border-zinc-800 dark:bg-zinc-900/50 dark:text-zinc-300"},be={key:0},we={key:1},je=P({__name:"index",setup(h){const{t:e}=V(),o=Q(),{showSettings:Y}=W(o),k=new Date().getFullYear(),b=et(),i=K(null),M=K("");let w=null,d=0;const D=c(()=>{const x=b.modelValue.value?.state;return x?x.mode==="recent"?{mode:"recent",days:365,acceptStale:!0}:{mode:"year",year:x.year??k,acceptStale:!0}:null}),f=c(()=>JSON.stringify(D.value)),m=c(()=>(i.value?.coverage.missingOwnerSessions??0)+(i.value?.coverage.unresolvedOwnerSessions??0)),$=c(()=>i.value?.task.status==="running"),L=c(()=>i.value?.metrics!==null&&i.value?.metrics!==void 0),_=c(()=>L.value&&i.value?.metrics?.sentMessageCount===0),S=c(()=>(i.value?.coverage.totalSessions??0)>0&&i.value?.coverage.analyzedSessions===0&&m.value>0),C=c(()=>b.modelValue.value?.state.mode==="year"?b.modelValue.value.state.year:void 0),a=c(()=>{const x=C.value,v=i.value?.latestDataYear;return x===void 0||v===null||v===void 0||x===v?null:{year:x,latestYear:v}});lt(f,()=>{u(),D.value&&(i.value=null,g(!1))},{immediate:!0}),st(Y,()=>{g(!1)}),ct(u);async function g(x){const v=D.value;if(!v)return;const T=++d;M.value="";try{const y=x?await E().recomputeAnnualSummary(v):await E().getAnnualSummary(v);if(T!==d)return;i.value=y,y.metrics&&b.setAvailableYears(y.availableDataYears),y.task.status==="running"&&j()}catch(y){if(T!==d)return;const O=y instanceof Error?y.message:String(y);M.value=O,X(`Global insight annual summary failed: ${O}`,y instanceof Error?y.stack:void 0)}}function j(){u(),w=setTimeout(()=>{g(!1)},900)}function u(){w&&(clearTimeout(w),w=null)}function B(){const x=i.value?.latestDataYear;x&&b.switchToYear(x)}function I(){o.openSettings("data","missing-owner")}return(x,v)=>{const T=Z,y=H;return r(),l("main",ve,[t("div",pe,[m.value>0?(r(),l("button",{key:0,type:"button",class:"inline-flex w-fit max-w-full items-center gap-2 rounded-lg bg-amber-50 px-3 py-2 text-left text-xs text-amber-800 transition-colors hover:bg-amber-100 dark:bg-amber-950/20 dark:text-amber-300 dark:hover:bg-amber-950/30",onClick:I},[p(T,{name:"i-heroicons-user-circle",class:"h-4 w-4 shrink-0"}),t("span",ye,s(n(e)("insight.status.ownerIssues",{count:m.value})),1),p(T,{name:"i-heroicons-arrow-right",class:"h-3.5 w-3.5 shrink-0 opacity-70"})])):N("",!0),i.value?.cache.status==="stale"||$.value&&L.value?(r(),l("div",_e,[p(T,{name:"i-heroicons-arrow-path",class:"h-4 w-4 shrink-0 animate-spin text-amber-600 dark:text-amber-400"}),U(" "+s(n(e)("insight.status.updating")),1)])):N("",!0),M.value||i.value?.task.status==="failed"?(r(),l("div",ke,[t("span",null,s(n(e)("insight.status.failed")),1),p(y,{size:"xs",color:"error",variant:"soft",icon:"i-heroicons-arrow-path",onClick:v[0]||(v[0]=O=>g(!0))},{default:A(()=>[U(s(n(e)("insight.actions.retry")),1)]),_:1})])):N("",!0),!L.value&&!M.value&&i.value?.task.status!=="failed"?(r(),q(tt,{key:3,height:"min(52vh, 420px)",text:i.value?.task.status==="running"?n(e)("insight.status.computingProgress",{processed:i.value.task.processedSessions,total:i.value.task.totalSessions}):n(e)("insight.status.loading")},null,8,["text"])):i.value?.metrics&&i.value.textLength?(r(),l(z,{key:4},[_.value&&!S.value?(r(),l("div",fe,[a.value?(r(),l("span",be,s(n(e)("insight.status.noDataWithLatest",a.value)),1)):(r(),l("span",we,s(n(e)("insight.noData")),1)),a.value?(r(),q(y,{key:2,size:"xs",variant:"soft",color:"neutral",icon:"i-heroicons-arrow-right",onClick:B},{default:A(()=>[U(s(n(e)("insight.actions.switchYear",{year:a.value.latestYear})),1)]),_:1})):N("",!0)])):N("",!0),p(xe,{range:i.value.range,metrics:i.value.metrics,coverage:i.value.coverage,"monthly-activity":i.value.monthlyActivity,"daily-activity":i.value.dailyActivity,"message-types":i.value.messageTypes,"text-length":i.value.textLength},null,8,["range","metrics","coverage","monthly-activity","daily-activity","message-types","text-length"])],64)):N("",!0)])])}}});export{je as default};
@@ -1 +1 @@
1
- import{m as l,h as n,s as u,E as d}from"./vendor-reka-ui-CzM4kDQ7.js";const o=Symbol("PeoplePageHeader");function P(e){const a=u(null),r=n(()=>a.value?.value??e.value);function s(t){a.value=t}return d(o,{setHeader:s}),{header:r}}function c(e){l(o)?.setHeader(e)}export{P as p,c as u};
1
+ import{m as l,h as n,s as u,E as d}from"./vendor-reka-ui-Cta6JPvN.js";const o=Symbol("PeoplePageHeader");function P(e){const a=u(null),r=n(()=>a.value?.value??e.value);function s(t){a.value=t}return d(o,{setHeader:s}),{header:r}}function c(e){l(o)?.setHeader(e)}export{P as p,c as u};
@@ -0,0 +1 @@
1
+ function o(e){return{success:e.success,sessionId:e.sessionId,error:e.error,importMode:e.importMode,matchedBy:e.matchedBy,createReason:e.createReason,newMessageCount:e.newMessageCount,duplicateCount:e.duplicateCount,messageCount:e.messageCount,memberCount:e.memberCount,diagnostics:e.diagnostics}}export{o as n};
@@ -8,4 +8,4 @@ import{r as gn,m as X,i as $,a as N,b as le,e as we,c as K,d as q,f as T,g as Qs
8
8
 
9
9
  `:"<br/>",g=c.join(y);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,g,u,Math.random()+"",o[0],o[1],v,null,h)})},t.prototype._showSeriesItemTooltip=function(e,a,n){var i=this._ecModel,o=te(a),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,c=o.dataType,h=u.getData(c),v=this._renderMode,d=e.positionDefault,p=Ka([h.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),y=p.get("trigger");if(!(y!=null&&y!=="item")){var g=u.getDataParams(f,c),m=new ts;g.marker=m.makeTooltipMarker("item",Br(g.color),v);var _=yc(u.formatTooltip(f,!1,c)),S=p.get("order"),b=p.get("valueFormatter"),x=_.frag,w=x?wc(b?F({valueFormatter:b},x):x,m,v,S,i.get("useUTC"),p.get("textStyle")):_.text,D="item_"+u.name+"_"+f;this._showOrMove(p,function(){this._showTooltipContent(p,w,g,D,e.offsetX,e.offsetY,e.position,e.target,m)}),n({type:"showTip",dataIndexInside:f,dataIndex:h.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,a,n){var i=this._renderMode==="html",o=te(a),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if($(l)){var f=l;l={content:f,formatter:f},u=!0}u&&i&&l.content&&(l=j(l),l.content=Xe(l.content));var c=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&c.push(h),c.push({formatter:l.content});var v=e.positionDefault,d=Ka(c,this._tooltipModel,v?{position:v}:null),p=d.get("content"),y=Math.random()+"",g=new ts;this._showOrMove(d,function(){var m=j(d.get("formatterParams")||{});this._showTooltipContent(d,p,m,y,e.offsetX,e.offsetY,e.position,a,g)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,a,n,i,o,s,l,u,f){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var c=this._tooltipContent;c.setEnterable(e.get("enterable"));var h=e.get("formatter");l=l||e.get("position");var v=a,d=this._getNearestPoint([o,s],n,e.get("trigger"),e.get("borderColor"),e.get("defaultBorderColor",!0)),p=d.color;if(h)if($(h)){var y=e.ecModel.get("useUTC"),g=N(n)?n[0]:n,m=g&&g.axisType&&g.axisType.indexOf("time")>=0;v=h,m&&(v=Lo(g.axisValue,v,y)),v=sp(v,n,!0)}else if(Q(h)){var _=Z(function(S,b){S===this._ticket&&(c.setContent(b,f,e,p,l),this._updatePosition(e,l,o,s,c,n,u))},this);this._ticket=i,v=h(n,i,_)}else v=h;c.setContent(v,f,e,p,l),c.show(e,p),this._updatePosition(e,l,o,s,c,n,u)}},t.prototype._getNearestPoint=function(e,a,n,i,o){if(n==="axis"||N(a))return{color:i||o};if(!N(a))return{color:i||a.color||a.borderColor}},t.prototype._updatePosition=function(e,a,n,i,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();a=a||e.get("position");var c=o.getSize(),h=e.get("align"),v=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),Q(a)&&(a=a([n,i],s,o.el,d,{viewSize:[u,f],contentSize:c.slice()})),N(a))n=re(a[0],u),i=re(a[1],f);else if(K(a)){var p=a;p.width=c[0],p.height=c[1];var y=Ke(p,{width:u,height:f});n=y.x,i=y.y,h=null,v=null}else if($(a)&&l){var g=ID(a,d,c,e.get("borderWidth"));n=g[0],i=g[1]}else{var g=AD(n,i,o,u,f,h?null:20,v?null:20);n=g[0],i=g[1]}if(h&&(n-=Eh(h)?c[0]/2:h==="right"?c[0]:0),v&&(i-=Eh(v)?c[1]/2:v==="bottom"?c[1]:0),im(e)){var g=LD(n,i,o,u,f);n=g[0],i=g[1]}o.moveTo(n,i)},t.prototype._updateContentNotChangedOnAxis=function(e,a){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===e.length;return o&&T(n,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},c=f.dataByAxis||[];o=o&&u.length===c.length,o&&T(u,function(h,v){var d=c[v]||{},p=h.seriesDataIndices||[],y=d.seriesDataIndices||[];o=o&&h.value===d.value&&h.axisType===d.axisType&&h.axisId===d.axisId&&p.length===y.length,o&&T(p,function(g,m){var _=y[m];o=o&&g.seriesIndex===_.seriesIndex&&g.dataIndex===_.dataIndex}),i&&T(h.seriesDataIndices,function(g){var m=g.seriesIndex,_=a[m],S=i[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=a,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,a){we.node||!a.getDom()||(to(this,"_updatePosition"),this._tooltipContent.dispose(),ql("itemTooltip",a))},t.type="tooltip",t})(We);function Ka(r,t,e){var a=t.ecModel,n;e?(n=new ye(e,a,a),n=new ye(t.option,n,a)):n=t;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof ye&&(o=o.get("tooltip",!0)),$(o)&&(o={formatter:o}),o&&(n=new ye(o,n,a)))}return n}function Rh(r,t){return r.dispatchAction||Z(t.dispatchAction,t)}function AD(r,t,e,a,n,i,o){var s=e.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>a?r-=l+i:r+=i),o!=null&&(t+u+o>n?t-=u+o:t+=o),[r,t]}function LD(r,t,e,a,n){var i=e.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,a)-o,t=Math.min(t+s,n)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function ID(r,t,e,a){var n=e[0],i=e[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=t.width,f=t.height;switch(r){case"inside":s=t.x+u/2-n/2,l=t.y+f/2-i/2;break;case"top":s=t.x+u/2-n/2,l=t.y-i-o;break;case"bottom":s=t.x+u/2-n/2,l=t.y+f+o;break;case"left":s=t.x-n-o,l=t.y+f/2-i/2;break;case"right":s=t.x+u+o,l=t.y+f/2-i/2}return[s,l]}function Eh(r){return r==="center"||r==="middle"}function PD(r,t,e){var a=su(r).queryOptionMap,n=a.keys()[0];if(!(!n||n==="series")){var i=Ma(t,n,a.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=te(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}function jA(r){qe(tm),r.registerComponentModel(dD),r.registerComponentView(DD),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},st),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},st)}var Oh=T;function Bh(r){if(r){for(var t in r)if(r.hasOwnProperty(t))return!0}}function Nh(r,t,e){var a={};return Oh(t,function(i){var o=a[i]=n();Oh(r[i],function(s,l){if(Fe.isValidType(l)){var u={type:l,visual:s};e&&e(u,i),o[l]=new Fe(u),l==="opacity"&&(u=j(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Fe(u))}})}),a;function n(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function kD(r,t,e){var a;T(e,function(n){t.hasOwnProperty(n)&&Bh(t[n])&&(a=!0)}),a&&T(e,function(n){t.hasOwnProperty(n)&&Bh(t[n])?r[n]=j(t[n]):delete r[n]})}function RD(r,t,e,a){var n={};return T(r,function(i){var o=Fe.prepareVisualTypes(t[i]);n[i]=o}),{progress:function(o,s){var l;a!=null&&(l=s.getDimensionIndex(a));function u(b){return Yp(s,c,b)}function f(b,x){Gx(s,c,b,x)}for(var c,h=s.getStore();(c=o.next())!=null;){var v=s.getRawDataItem(c);if(!(v&&v.visualMap===!1))for(var d=a!=null?h.get(l,c):c,p=e(d),y=t[p],g=n[p],m=0,_=g.length;m<_;m++){var S=g[m];y[S]&&y[S].applyVisual(d,u,f)}}}}}var ED=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:O.size.m,backgroundColor:O.color.transparent,borderColor:O.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:O.color.primary},subtextStyle:{fontSize:12,color:O.color.quaternary}},t})(ne),OD=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){if(this.group.removeAll(),!!e.get("show")){var i=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=J(e.get("textBaseline"),e.get("textVerticalAlign")),f=new pe({style:De(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=f.getBoundingRect(),h=e.get("subtext"),v=new pe({style:De(s,{text:h,fill:s.getTextColor(),y:c.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),p=e.get("sublink"),y=e.get("triggerEvent",!0);f.silent=!d&&!y,v.silent=!p&&!y,d&&f.on("click",function(){Qf(d,"_"+e.get("target"))}),p&&v.on("click",function(){Qf(p,"_"+e.get("subtarget"))}),te(f).eventData=te(v).eventData=y?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(f),h&&i.add(v);var g=i.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var _=dr(e,n),S=Ke(m,_.refContainer,e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?S.x+=S.width:l==="center"&&(S.x+=S.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?S.y+=S.height:u==="middle"&&(S.y+=S.height/2),u=u||"top"),i.x=S.x,i.y=S.y,i.markRedraw();var b={align:l,verticalAlign:u};f.setStyle(b),v.setStyle(b),g=i.getBoundingRect();var x=S.margin,w=e.getItemStyle(["color","opacity"]);w.fill=e.get("backgroundColor");var D=new fe({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:e.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});i.add(D)}},t.type="title",t})(We);function QA(r){r.registerComponentModel(ED),r.registerComponentView(OD)}var BD=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},jl=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),this._updateSelector(e)},t.prototype._updateSelector=function(e){var a=e.selector,n=this.ecModel;a===!0&&(a=e.selector=["all","inverse"]),N(a)&&T(a,function(i,o){$(i)&&(i={type:i}),a[o]=se(i,BD(n,i.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var a=!1,n=0;n<e.length;n++){var i=e[n].get("name");if(this.isSelected(i)){this.select(i),a=!0;break}}!a&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var a=[],n=[];e.eachRawSeries(function(l){var u=l.name;n.push(u);var f;if(l.legendVisualProvider){var c=l.legendVisualProvider,h=c.getAllNames();e.isSeriesFiltered(l)||(n=n.concat(h)),h.length?a=a.concat(h):f=!0}else f=!0;f&&ou(l)&&a.push(l.name)}),this._availableNames=n;var i=this.get("data")||a,o=q(),s=X(i,function(l){return($(l)||le(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new ye(l,this,this.ecModel))},this);this._data=Me(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var a=this.option.selected,n=this.get("selectedMode");if(n==="single"){var i=this._data;T(i,function(o){a[o.get("name")]=!1})}a[e]=!0},t.prototype.unSelect=function(e){this.get("selectedMode")!=="single"&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var a=this.option.selected;a.hasOwnProperty(e)||(a[e]=!0),this[a[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,a=this.option.selected;T(e,function(n){a[n.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,a=this.option.selected;T(e,function(n){var i=n.get("name",!0);a.hasOwnProperty(i)||(a[i]=!0),a[i]=!a[i]})},t.prototype.isSelected=function(e){var a=this.option.selected;return!(a.hasOwnProperty(e)&&!a[e])&&ue(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:O.size.m,align:"auto",backgroundColor:O.color.transparent,borderColor:O.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:O.color.disabled,inactiveBorderColor:O.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:O.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:O.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:O.color.tertiary,borderWidth:1,borderColor:O.color.border},emphasis:{selectorLabel:{show:!0,color:O.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t})(ne),oa=de,Ql=T,Ai=oe,um=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new Ai),this.group.add(this._selectorGroup=new Ai),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,a,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,a,n,l,s,u);var f=dr(e,n).refContainer,c=e.getBoxLayoutParams(),h=e.get("padding"),v=Ke(c,f,h),d=this.layoutInner(e,o,v,i,l,u),p=Ke(ie({width:d.width,height:d.height},c),f,h);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=hD(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,a,n,i,o,s,l){var u=this.getContentGroup(),f=q(),c=a.get("selectedMode"),h=a.get("triggerEvent"),v=[];n.eachRawSeries(function(d){!d.get("legendHoverLink")&&v.push(d.id)}),Ql(a.getData(),function(d,p){var y=this,g=d.get("name");if(!this.newlineDisabled&&(g===""||g===`
10
10
  `)){var m=new Ai;m.newline=!0,u.add(m);return}var _=n.getSeriesByName(g)[0];if(!f.get(g))if(_){var S=_.getData(),b=S.getVisual("legendLineStyle")||{},x=S.getVisual("legendIcon"),w=S.getVisual("style"),D=this._createItem(_,g,p,d,a,e,b,w,x,c,i);D.on("click",oa(Vh,g,null,i,v)).on("mouseover",oa(Jl,_.name,null,i,v)).on("mouseout",oa(eu,_.name,null,i,v)),n.ssr&&D.eachChild(function(M){var A=te(M);A.seriesIndex=_.seriesIndex,A.dataIndex=p,A.ssrType="legend"}),h&&D.eachChild(function(M){y.packEventData(M,a,_,p,g)}),f.set(g,!0)}else n.eachRawSeries(function(M){var A=this;if(!f.get(g)&&M.legendVisualProvider){var C=M.legendVisualProvider;if(!C.containName(g))return;var I=C.indexOfName(g),L=C.getItemVisual(I,"style"),E=C.getItemVisual(I,"legendIcon"),P=hd(L.fill);P&&P[3]===0&&(P[3]=.2,L=F(F({},L),{fill:Li(P,"rgba")}));var k=this._createItem(M,g,p,d,a,e,{},L,E,c,i);k.on("click",oa(Vh,null,g,i,v)).on("mouseover",oa(Jl,null,g,i,v)).on("mouseout",oa(eu,null,g,i,v)),n.ssr&&k.eachChild(function(V){var R=te(V);R.seriesIndex=M.seriesIndex,R.dataIndex=p,R.ssrType="legend"}),h&&k.eachChild(function(V){A.packEventData(V,a,M,p,g)}),f.set(g,!0)}},this)},this),o&&this._createSelector(o,a,i,s,l)},t.prototype.packEventData=function(e,a,n,i,o){var s={componentType:"legend",componentIndex:a.componentIndex,dataIndex:i,value:o,seriesIndex:n.seriesIndex};te(e).eventData=s},t.prototype._createSelector=function(e,a,n,i,o){var s=this.getSelectorGroup();Ql(e,function(u){var f=u.type,c=new pe({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:a.id})}});s.add(c);var h=a.getModel("selectorLabel"),v=a.getModel(["emphasis","selectorLabel"]);hr(c,{normal:h,emphasis:v},{defaultText:u.title}),$i(c)})},t.prototype._createItem=function(e,a,n,i,o,s,l,u,f,c,h){var v=e.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),y=o.isSelected(a),g=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");f=_||f||"roundRect";var S=ND(f,i,l,u,v,y,h),b=new Ai,x=i.getModel("textStyle");if(Q(e.getLegendIcon)&&(!_||_==="inherit"))b.add(e.getLegendIcon({itemWidth:d,itemHeight:p,icon:f,iconRotate:g,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var w=_==="inherit"&&e.getData().getVisual("symbol")?g==="inherit"?e.getData().getVisual("symbolRotate"):g:0;b.add(VD({itemWidth:d,itemHeight:p,icon:f,iconRotate:w,itemStyle:S.itemStyle,symbolKeepAspect:m}))}var D=s==="left"?d+5:-5,M=s,A=o.get("formatter"),C=a;$(A)&&A?C=A.replace("{name}",a??""):Q(A)&&(C=A(a));var I=y?x.getTextColor():i.get("inactiveColor");b.add(new pe({style:De(x,{text:C,x:D,y:p/2,fill:I,align:M,verticalAlign:"middle"},{inheritColor:I})}));var L=new fe({shape:b.getBoundingRect(),style:{fill:"transparent"}}),E=i.getModel("tooltip");return E.get("show")&&Mo({el:L,componentModel:o,itemName:a,itemTooltipOption:E.option}),b.add(L),b.eachChild(function(P){P.silent=!0}),L.silent=!c,this.getContentGroup().add(b),$i(b),b.__legendDataIndex=n,b},t.prototype.layoutInner=function(e,a,n,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();ga(e.get("orient"),l,e.get("itemGap"),n.width,n.height);var f=l.getBoundingRect(),c=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){ga("horizontal",u,e.get("selectorItemGap",!0));var h=u.getBoundingRect(),v=[-h.x,-h.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,y=p===0?"width":"height",g=p===0?"height":"width",m=p===0?"y":"x";s==="end"?v[p]+=f[y]+d:c[p]+=h[y]+d,v[1-p]+=f[g]/2-h[g]/2,u.x=v[0],u.y=v[1],l.x=c[0],l.y=c[1];var _={x:0,y:0};return _[y]=f[y]+d+h[y],_[g]=Math.max(f[g],h[g]),_[m]=Math.min(0,h[m]+v[1-p]),_}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t})(We);function ND(r,t,e,a,n,i,o){function s(y,g){y.lineWidth==="auto"&&(y.lineWidth=g.lineWidth>0?2:0),Ql(y,function(m,_){y[_]==="inherit"&&(y[_]=g[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",c=l.getShallow("decal");u.decal=!c||c==="inherit"?a.decal:no(c,o),u.fill==="inherit"&&(u.fill=a[n]),u.stroke==="inherit"&&(u.stroke=a[f]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?a:e).opacity),s(u,a);var h=t.getModel("lineStyle"),v=h.getLineStyle();if(s(v,e),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),v.stroke==="auto"&&(v.stroke=a.fill),!i){var d=t.get("inactiveBorderWidth"),p=u[f];u.lineWidth=d==="auto"?a.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),v.stroke=h.get("inactiveColor"),v.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function VD(r){var t=r.icon||"roundRect",e=Je(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill=O.color.neutral00,e.style.lineWidth=2),e}function Vh(r,t,e,a){eu(r,t,e,a),e.dispatchAction({type:"legendToggleSelect",name:r??t}),Jl(r,t,e,a)}function fm(r){for(var t=r.getZr().storage.getDisplayList(),e,a=0,n=t.length;a<n&&!(e=t[a].states.emphasis);)a++;return e&&e.hoverLayer}function Jl(r,t,e,a){fm(e)||e.dispatchAction({type:"highlight",seriesName:r,name:t,excludeSeriesId:a})}function eu(r,t,e,a){fm(e)||e.dispatchAction({type:"downplay",seriesName:r,name:t,excludeSeriesId:a})}function zD(r){var t=r.findComponents({mainType:"legend"});t&&t.length&&r.filterSeries(function(e){for(var a=0;a<t.length;a++)if(!t[a].isSelected(e.name))return!1;return!0})}function qa(r,t,e){var a=r==="allSelect"||r==="inverseSelect",n={},i=[];e.eachComponent({mainType:"legend",query:t},function(s){a?s[r]():s[r](t.name),zh(s,n),i.push(s.componentIndex)});var o={};return e.eachComponent("legend",function(s){T(n,function(l,u){s[l?"select":"unSelect"](u)}),zh(s,o)}),a?{selected:o,legendIndex:i}:{name:t.name,selected:o}}function zh(r,t){var e=t||{};return T(r.getData(),function(a){var n=a.get("name");if(!(n===`
11
- `||n==="")){var i=r.isSelected(n);G(e,n)?e[n]=e[n]&&i:e[n]=i}}),e}function GD(r){r.registerAction("legendToggleSelect","legendselectchanged",de(qa,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",de(qa,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",de(qa,"inverseSelect")),r.registerAction("legendSelect","legendselected",de(qa,"select")),r.registerAction("legendUnSelect","legendunselected",de(qa,"unSelect"))}function cm(r){r.registerComponentModel(jl),r.registerComponentView(um),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,zD),r.registerSubTypeDefaulter("legend",function(){return"plain"}),GD(r)}var FD=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(e,a,n){var i=Fr(e);r.prototype.init.call(this,e,a,n),Gh(this,e,i)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),Gh(this,this.option,e)},t.type="legend.scroll",t.defaultOption=Aa(jl.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:O.color.accent50,pageIconInactiveColor:O.color.accent10,pageIconSize:15,pageTextStyle:{color:O.color.tertiary},animationDurationUpdate:800}),t})(jl);function Gh(r,t,e){var a=r.getOrient(),n=[1,1];n[a.index]=0,zt(t,e,{type:"box",ignoreSize:!!n})}var Fh=oe,Zs=["width","height"],Xs=["x","y"],HD=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!0,e._currentIndex=0,e}return t.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new Fh),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Fh)},t.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(e,a,n,i,o,s,l){var u=this;r.prototype.renderInner.call(this,e,a,n,i,o,s,l);var f=this._controllerGroup,c=a.get("pageIconSize",!0),h=N(c)?c:[c,c];d("pagePrev",0);var v=a.getModel("pageTextStyle");f.add(new pe({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(p,y){var g=p+"DataIndex",m=mu(a.get("pageIcons",!0)[a.getOrient().name][y],{onclick:Z(u._pageGo,u,g,a,i)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});m.name=p,f.add(m)}},t.prototype.layoutInner=function(e,a,n,i,o,s){var l=this.getSelectorGroup(),u=e.getOrient().index,f=Zs[u],c=Xs[u],h=Zs[1-u],v=Xs[1-u];o&&ga("horizontal",l,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),p=l.getBoundingRect(),y=[-p.x,-p.y],g=j(n);o&&(g[f]=n[f]-p[f]-d);var m=this._layoutContentAndController(e,i,g,u,f,h,v,c);if(o){if(s==="end")y[u]+=m[f]+d;else{var _=p[f]+d;y[u]-=_,m[c]-=_}m[f]+=p[f]+d,y[1-u]+=m[v]+m[h]/2-p[h]/2,m[h]=Math.max(m[h],p[h]),m[v]=Math.min(m[v],p[v]+y[1-u]),l.x=y[0],l.y=y[1],l.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,a,n,i,o,s,l,u){var f=this.getContentGroup(),c=this._containerGroup,h=this._controllerGroup;ga(e.get("orient"),f,e.get("itemGap"),i?n.width:null,i?null:n.height),ga("horizontal",h,e.get("pageButtonItemGap",!0));var v=f.getBoundingRect(),d=h.getBoundingRect(),p=this._showController=v[o]>n[o],y=[-v.x,-v.y];a||(y[i]=f[u]);var g=[0,0],m=[-d.x,-d.y],_=J(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var S=e.get("pageButtonPosition",!0);S==="end"?m[i]+=n[o]-d[o]:g[i]+=d[o]+_}m[1-i]+=v[s]/2-d[s]/2,f.setPosition(y),c.setPosition(g),h.setPosition(m);var b={x:0,y:0};if(b[o]=p?n[o]:v[o],b[s]=Math.max(v[s],d[s]),b[l]=Math.min(0,d[l]+m[1-i]),c.__rectSize=n[o],p){var x={x:0,y:0};x[o]=Math.max(n[o]-d[o]-_,0),x[s]=b[s],c.setClipPath(new fe({shape:x})),c.__rectSize=x[o]}else h.eachChild(function(D){D.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(e);return w.pageIndex!=null&&xe(f,{x:w.contentPosition[0],y:w.contentPosition[1]},p?e:null),this._updatePageInfoView(e,w),b},t.prototype._pageGo=function(e,a,n){var i=this._getPageInfo(a)[e];i!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:a.id})},t.prototype._updatePageInfoView=function(e,a){var n=this._controllerGroup;T(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",h=a[c]!=null,v=n.childOfName(f);v&&(v.setStyle("fill",h?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),v.cursor=h?"pointer":"default")});var i=n.childOfName("pageText"),o=e.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;i&&o&&i.setStyle("text",$(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var a=e.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=e.getOrient().index,s=Zs[o],l=Xs[o],u=this._findTargetItemIndex(a),f=n.children(),c=f[u],h=f.length,v=h?1:0,d={contentPosition:[n.x,n.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return d;var p=S(c);d.contentPosition[o]=-p.s;for(var y=u+1,g=p,m=p,_=null;y<=h;++y)_=S(f[y]),(!_&&m.e>g.s+i||_&&!b(_,g.s))&&(m.i>g.i?g=m:g=_,g&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=g.i),++d.pageCount)),m=_;for(var y=u-1,g=p,m=p,_=null;y>=-1;--y)_=S(f[y]),(!_||!b(m,_.s))&&g.i<m.i&&(m=g,d.pagePrevDataIndex==null&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=_;return d;function S(x){if(x){var w=x.getBoundingRect(),D=w[l]+x[l];return{s:D,e:D+w[s],i:x.__legendDataIndex}}}function b(x,w){return x.e>=w&&x.s<=w+i}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var a,n=this.getContentGroup(),i;return n.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===e&&(a=s)}),a??i},t.type="legend.scroll",t})(um);function WD(r){r.registerAction("legendScroll","legendscroll",function(t,e){var a=t.scrollDataIndex;a!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(n){n.setScrollDataIndex(a)})})}function UD(r){qe(cm),r.registerComponentModel(FD),r.registerComponentView(HD),WD(r)}function JA(r){qe(cm),qe(UD)}var YD=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=Aa(_o.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t})(_o),mf=ae();function ZD(r,t,e){mf(r).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(t.uid);n&&(n.getRange=e)})}function XD(r,t){for(var e=mf(r).coordSysRecordMap,a=e.keys(),n=0;n<a.length;n++){var i=a[n],o=e.get(i),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||vm(e,o))}}}function vm(r,t){if(t){r.removeKey(t.model.uid);var e=t.controller;e&&e.dispose()}}function $D(r,t){var e={model:t,containsPoint:de(qD,t),dispatchAction:de(KD,r),dataZoomInfoMap:null,controller:null},a=e.controller=new Py(r.getZr());return T(["pan","zoom","scrollMove"],function(n){a.on(n,function(i){var o=[];e.dataZoomInfoMap.each(function(s){if(i.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[n],u=l&&l(s.dzReferCoordSysInfo,e.model.mainType,e.controller,i);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&e.dispatchAction(o)})}),e}function KD(r,t){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function qD(r,t,e,a){return r.coordinateSystem.containPoint([e,a])}function jD(r,t,e){var a,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return r.each(function(s){var l=s.model,u=l.get("disabled",!0)?!1:l.get("zoomLock",!0)?"move":!0;i[n+u]>i[n+a]&&(a=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:a,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:e,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint}}}}function QD(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var a=mf(e),n=a.coordSysRecordMap||(a.coordSysRecordMap=q());n.each(function(i){i.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=rm(i);T(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,$D(e,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=q());f.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),n.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){vm(n,i);return}var f=jD(l,i,e);o.enable(f.controlType,f.opt),ko(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var JD=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,a,n){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),ZD(n,e,{pan:Z($s.pan,this),zoom:Z($s.zoom,this),scrollMove:Z($s.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){XD(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t})(am),$s={zoom:function(r,t,e,a){var n=this.range,i=n.slice(),o=r.axisModels[0];if(o){var s=Ks[t](null,[a.originX,a.originY],o,e,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/a.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(wa(0,i,[0,100],0,f.minSpan,f.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:Hh(function(r,t,e,a,n,i){var o=Ks[a]([i.oldX,i.oldY],[i.newX,i.newY],t,n,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:Hh(function(r,t,e,a,n,i){var o=Ks[a]([0,0],[i.scrollDelta,i.scrollDelta],t,n,e);return o.signal*(r[1]-r[0])*i.scrollDelta})};function Hh(r){return function(t,e,a,n){var i=this.range,o=i.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,a,n);if(wa(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var Ks={grid:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,t,e,a,n){var i=e.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};function eA(r){nm(r),r.registerComponentModel(YD),r.registerComponentView(JD),QD(r)}var tA=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Aa(_o.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:O.color.accent10,borderRadius:0,backgroundColor:O.color.transparent,dataBackground:{lineStyle:{color:O.color.accent30,width:.5},areaStyle:{color:O.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:O.color.accent40,width:.5},areaStyle:{color:O.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:O.color.neutral00,borderColor:O.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:O.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:O.color.tertiary},brushSelect:!0,brushStyle:{color:O.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:O.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t})(_o),ja=fe,rA=1,qs=30,aA=7,Qa="horizontal",Wh="vertical",nA=5,iA=["line","bar","candlestick","scatter"],oA={easing:"cubicOut",duration:100,delay:0},sA=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,a){this.api=a,this._onBrush=Z(this._onBrush,this),this._onBrushEnd=Z(this._onBrushEnd,this)},t.prototype.render=function(e,a,n,i){if(r.prototype.render.apply(this,arguments),ko(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){to(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new oe;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(a),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,a=this.api,n=e.get("brushSelect"),i=n?aA:0,o=dr(e,a).refContainer,s=this._findCoordRect(),l=e.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Qa?{right:o.width-s.x-s.width,top:o.height-qs-l-i,width:s.width,height:qs}:{right:l,top:s.y,width:qs,height:s.height},f=Fr(e.option);T(["right","top","width","height"],function(h){f[h]==="ph"&&(f[h]=u[h])});var c=Ke(f,o);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===Wh&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,a=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===Qa&&!o?{scaleY:l?1:-1,scaleX:1}:n===Qa&&o?{scaleY:l?1:-1,scaleX:-1}:n===Wh&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=a.x-u.x,e.y=a.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,a=this._size,n=this._displayables.sliderGroup,i=e.get("brushSelect");n.add(new ja({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new ja({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:Z(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var a=this._size,n=this._shadowSize||[],i=e.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==n[0]||a[1]!==n[1]){var c=o.getDataExtent(e.thisDim),h=o.getDataExtent(l),v=(h[1]-h[0])*.3;h=[h[0]-v,h[1]+v];var d=[0,a[1]],p=[0,a[0]],y=[[a[0],0],[0,0]],g=[],m=p[1]/Math.max(1,o.count()-1),_=a[0]/(c[1]-c[0]),S=e.thisAxis.type==="time",b=-m,x=Math.round(o.count()/a[0]),w;o.each([e.thisDim,l],function(I,L,E){if(x>0&&E%x){S||(b+=m);return}b=S?(+I-c[0])*_:b+m;var P=L==null||isNaN(L)||L==="",k=P?0:ve(L,h,d,!0);P&&!w&&E?(y.push([y[y.length-1][0],0]),g.push([g[g.length-1][0],0])):!P&&w&&(y.push([b,0]),g.push([b,0])),P||(y.push([b,k]),g.push([b,k])),w=P}),u=this._shadowPolygonPts=y,f=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var D=this.dataZoomModel;function M(I){var L=D.getModel(I?"selectedDataBackground":"dataBackground"),E=new oe,P=new Ca({shape:{points:u},segmentIgnoreThreshold:1,style:L.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),k=new vr({shape:{points:f},segmentIgnoreThreshold:1,style:L.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return E.add(P),E.add(k),E}for(var A=0;A<3;A++){var C=M(A===1);this._displayables.sliderGroup.add(C),this._displayables.dataShadowSegs.push(C)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,a=e.get("showDataShadow");if(a!==!1){var n,i=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();T(l,function(u){if(!n&&!(a!==!0&&ue(iA,u.get("type"))<0)){var f=i.getComponent(rr(o),s).axis,c=lA(o),h,v=u.coordinateSystem;c!=null&&v.getOtherAxis&&(h=v.getOtherAxis(f).inverse),c=u.getData().mapDimension(c);var d=u.getData().mapDimension(o);n={thisAxis:f,series:u,thisDim:d,otherDim:c,otherAxisInverse:h}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,a=this._displayables,n=a.handles=[null,null],i=a.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,c=l.get("brushSelect"),h=a.filler=new ja({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new ja({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:rA,fill:O.color.transparent}})),T([0,1],function(_){var S=l.get("handleIcon");!ao[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var b=Je(S,-1,0,2,2,null,!0);b.attr({cursor:uA(this._orient),draggable:!0,drift:Z(this._onDragMove,this,_),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1),z2:5});var x=b.getBoundingRect(),w=l.get("handleSize");this._handleHeight=re(w,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),$i(b);var D=l.get("handleColor");D!=null&&(b.style.fill=D),o.add(n[_]=b);var M=l.getModel("textStyle"),A=l.get("handleLabel")||{},C=A.show||!1;e.add(i[_]=new pe({silent:!0,invisible:!C,style:De(M,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:M.getTextColor(),font:M.getFont()}),z2:10}))},this);var v=h;if(c){var d=re(l.get("moveHandleSize"),s[1]),p=a.moveHandle=new fe({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),y=d*.8,g=a.moveHandleIcon=Je(l.get("moveHandleIcon"),-y/2,-y/2,y,y,O.color.neutral00,!0);g.silent=!0,g.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(d,10));v=a.moveZone=new fe({invisible:!0,shape:{y:s[1]-m,height:d+m}}),v.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(g),o.add(v)}v.attr({draggable:!0,cursor:"default",drift:Z(this._onDragMove,this,"all"),ondragstart:Z(this._showDataInfo,this,!0),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[ve(e[0],[0,100],a,!0),ve(e[1],[0,100],a,!0)]},t.prototype._updateInterval=function(e,a){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];wa(a,i,o,n.get("zoomLock")?"all":e,s.minSpan!=null?ve(s.minSpan,l,o,!0):null,s.maxSpan!=null?ve(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=Ar([ve(i[0],o,l,!0),ve(i[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(e){var a=this._displayables,n=this._handleEnds,i=Ar(n.slice()),o=this._size;T([0,1],function(v){var d=a.handles[v],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:n[v]+(v?-1:1),y:o[1]/2-p/2})},this),a.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};a.moveHandle&&(a.moveHandle.setShape(s),a.moveZone.setShape(s),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=a.dataShadowSegs,u=[0,i[0],i[1],o[0]],f=0;f<l.length;f++){var c=l[f],h=c.getClipPath();h||(h=new fe,c.setClipPath(h)),h.setShape({x:u[f],y:0,width:u[f+1]-u[f],height:o[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var a=this.dataZoomModel,n=this._displayables,i=n.handleLabels,o=this._orient,s=["",""];if(a.get("showDetail")){var l=a.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,f=this._range,c=e?l.calculateDataWindow({start:f[0],end:f[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(c[0],u),this._formatLabel(c[1],u)]}}var h=Ar(this._handleEnds.slice());v.call(this,0),v.call(this,1);function v(d){var p=fn(n.handles[d].parent,this.group),y=yu(d===0?"right":"left",p),g=this._handleWidth/2+nA,m=nr([h[d]+(d===0?-g:g),this._size[1]/2],p);i[d].setStyle({x:m[0],y:m[1],verticalAlign:o===Qa?"middle":y,align:o===Qa?y:"center",text:s[d]})}},t.prototype._formatLabel=function(e,a){var n=this.dataZoomModel,i=n.get("labelFormatter"),o=n.get("labelPrecision");(o==null||o==="auto")&&(o=a.getPixelPrecision());var s=e==null||isNaN(e)?"":a.type==="category"||a.type==="time"?a.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(o,20));return Q(i)?i(e,s):$(i)?i.replace("{value}",s):s},t.prototype._showDataInfo=function(e){var a=this.dataZoomModel.get("handleLabel")||{},n=a.show||!1,i=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=i.get("show")||!1,s=e||this._dragging?o:n,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},t.prototype._onDragMove=function(e,a,n,i){this._dragging=!0,sr(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=nr([a,n],o,!0),l=this._updateInterval(e,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var e=this.dataZoomModel.get("realtime");!e&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var a=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>a[0]||n[1]<0||n[1]>a[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var a=e.offsetX,n=e.offsetY;this._brushStart=new ge(a,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var n=a.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[n.x,n.x+n.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();wa(0,l,o,0,u.minSpan!=null?ve(u.minSpan,s,o,!0):null,u.maxSpan!=null?ve(u.maxSpan,s,o,!0):null),this._range=Ar([ve(l[0],o,s,!0),ve(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(sr(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,a){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new ja({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,a),f=l.transformCoordToLocal(s.x,s.y),c=this._size;u[0]=Math.max(Math.min(c[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:c[1]})},t.prototype._dispatchZoomAction=function(e){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?oA:null,start:a[0],end:a[1]})},t.prototype._findCoordRect=function(){var e,a=rm(this.dataZoomModel).infoList;if(!e&&a.length){var n=a[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var i=this.api.getWidth(),o=this.api.getHeight();e={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return e},t.type="dataZoom.slider",t})(am);function lA(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function uA(r){return r==="vertical"?"ns-resize":"ew-resize"}function fA(r){r.registerComponentModel(tA),r.registerComponentView(sA),nm(r)}function eL(r){qe(eA),qe(fA)}var hm={get:function(r,t,e){var a=j((cA[r]||{})[t]);return e&&N(a)?a[a.length-1]:a}},cA={color:{active:["#006edd","#e0ffff"],inactive:[O.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Uh=Fe.mapVisual,vA=Fe.eachVisual,hA=N,Yh=T,dA=Ar,pA=ve,So=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,a){var n=this.option;!a&&kD(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var a=this.stateList;e=Z(e,this),this.controllerVisuals=Nh(this.option.controller,a,e),this.targetVisuals=Nh(this.option.target,a,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesId,a=this.option.seriesIndex;a==null&&e==null&&(a="all");var n=Ma(this.ecModel,"series",{index:a,id:e},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return X(n,function(i){return i.componentIndex})},t.prototype.eachTargetSeries=function(e,a){T(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&e.call(a,i)},this)},t.prototype.isTargetSeries=function(e){var a=!1;return this.eachTargetSeries(function(n){n===e&&(a=!0)}),a},t.prototype.formatValueText=function(e,a,n){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;n=n||["<",">"],N(e)&&(e=e.slice(),u=!0);var f=a?e:u?[c(e[0]),c(e[1])]:c(e);if($(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(Q(l))return u?l(e[0],e[1]):l(e);if(u)return e[0]===s[0]?n[0]+" "+f[1]:e[1]===s[1]?n[1]+" "+f[0]:f[0]+" - "+f[1];return f;function c(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,a=dA([e.min,e.max]);this._dataExtent=a},t.prototype.getDataDimensionIndex=function(e){var a=this.option.dimension;if(a!=null)return e.getDimensionIndex(a);for(var n=e.dimensions,i=n.length-1;i>=0;i--){var o=n[i],s=e.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,a=this.option,n={inRange:a.inRange,outOfRange:a.outOfRange},i=a.target||(a.target={}),o=a.controller||(a.controller={});se(i,n),se(o,n);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),f.call(this,o);function l(c){hA(a.color)&&!c.inRange&&(c.inRange={color:a.color.slice().reverse()}),c.inRange=c.inRange||{color:e.get("gradientColor")}}function u(c,h,v){var d=c[h],p=c[v];d&&!p&&(p=c[v]={},Yh(d,function(y,g){if(Fe.isValidType(g)){var m=hm.get(g,"inactive",s);m!=null&&(p[g]=m,g==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function f(c){var h=(c.inRange||{}).symbol||(c.outOfRange||{}).symbol,v=(c.inRange||{}).symbolSize||(c.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),p=this.getItemSymbol(),y=p||"roundRect";Yh(this.stateList,function(g){var m=this.itemSize,_=c[g];_||(_=c[g]={color:s?d:[d]}),_.symbol==null&&(_.symbol=h&&j(h)||(s?y:[y])),_.symbolSize==null&&(_.symbolSize=v&&j(v)||(s?m[0]:[m[0],m[0]])),_.symbol=Uh(_.symbol,function(x){return x==="none"?y:x});var S=_.symbolSize;if(S!=null){var b=-1/0;vA(S,function(x){x>b&&(b=x)}),_.symbolSize=Uh(S,function(x){return pA(x,[0,b],[0,m[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:O.color.transparent,borderColor:O.color.borderTint,contentColor:O.color.theme[0],inactiveColor:O.color.disabled,borderWidth:0,padding:O.size.m,textGap:10,precision:0,textStyle:{color:O.color.secondary}},t})(ne),Zh=[20,140],gA=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=Zh[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=Zh[1])},t.prototype._resetRange=function(){var e=this.getExtent(),a=this.option.range;!a||a.auto?(e.auto=1,this.option.range=e):N(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],e[0]),a[1]=Math.min(a[1],e[1]))},t.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),T(this.stateList,function(e){var a=this.option.controller[e].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),a=Ar((this.get("range")||[]).slice());return a[0]>e[1]&&(a[0]=e[1]),a[1]>e[1]&&(a[1]=e[1]),a[0]<e[0]&&(a[0]=e[0]),a[1]<e[0]&&(a[1]=e[0]),a},t.prototype.getValueState=function(e){var a=this.option.range,n=this.getExtent(),i=J(this.option.unboundedRange,!0);return(i&&a[0]<=n[0]||a[0]<=e)&&(i&&a[1]>=n[1]||e<=a[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){e[0]<=s&&s<=e[1]&&i.push(l)},this),a.push({seriesId:n.id,dataIndex:i})},this),a},t.prototype.getVisualMeta=function(e){var a=Xh(this,"outOfRange",this.getExtent()),n=Xh(this,"inRange",this.option.range.slice()),i=[];function o(v,d){i.push({value:v,color:e(v,d)})}for(var s=0,l=0,u=n.length,f=a.length;l<f&&(!n.length||a[l]<=n[0]);l++)a[l]<n[s]&&o(a[l],"outOfRange");for(var c=1;s<u;s++,c=0)c&&i.length&&o(n[s],"outOfRange"),o(n[s],"inRange");for(var c=1;l<f;l++)(!n.length||n[n.length-1]<a[l])&&(c&&(i.length&&o(i[i.length-1].value,"outOfRange"),c=0),o(a[l],"outOfRange"));var h=i.length;return{stops:i,outerColors:[h?i[0].color:"transparent",h?i[h-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=Aa(So.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:O.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:O.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:O.color.shadow}}),t})(So);function Xh(r,t,e){if(e[0]===e[1])return e.slice();for(var a=200,n=(e[1]-e[0])/a,i=e[0],o=[],s=0;s<=a&&i<e[1];s++)o.push(i),i+=n;return o.push(e[1]),o}var dm=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.autoPositionValues={left:1,right:1,top:1,bottom:1},e}return t.prototype.init=function(e,a){this.ecModel=e,this.api=a},t.prototype.render=function(e,a,n,i){if(this.visualMapModel=e,e.get("show")===!1){this.group.removeAll();return}this.doRender(e,a,n,i)},t.prototype.renderBackground=function(e){var a=this.visualMapModel,n=Kn(a.get("padding")||0),i=e.getBoundingRect();e.add(new fe({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:a.get("backgroundColor"),stroke:a.get("borderColor"),lineWidth:a.get("borderWidth")}}))},t.prototype.getControllerVisual=function(e,a,n){n=n||{};var i=n.forceState,o=this.visualMapModel,s={};if(a==="color"){var l=o.get("contentColor");s.color=l}function u(v){return s[v]}function f(v,d){s[v]=d}var c=o.controllerVisuals[i||o.getValueState(e)],h=Fe.prepareVisualTypes(c);return T(h,function(v){var d=c[v];n.convertOpacityToAlpha&&v==="opacity"&&(v="colorAlpha",d=c.__alphaForOpacity),Fe.dependsOn(v,a)&&d&&d.applyVisual(e,u,f)}),s[a]},t.prototype.positionGroup=function(e){var a=this.visualMapModel,n=this.api,i=dr(a,n).refContainer;J_(e,a.getBoxLayoutParams(),i)},t.prototype.doRender=function(e,a,n,i){},t.type="visualMap",t})(We),$h=[["left","right","width"],["top","bottom","height"]];function pm(r,t,e){var a=r.option,n=a.align;if(n!=null&&n!=="auto")return n;for(var i={width:t.getWidth(),height:t.getHeight()},o=a.orient==="horizontal"?1:0,s=$h[o],l=[0,null,10],u={},f=0;f<3;f++)u[$h[1-o][f]]=l[f],u[s[f]]=f===2?e[0]:a[s[f]];var c=[["x","width",3],["y","height",0]][o],h=Ke(u,i,a.padding);return s[(h.margin[c[2]]||0)+h[c[0]]+h[c[1]]*.5<i[c[1]]*.5?0:1]}function zi(r,t){return T(r||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),r}var St=ve,yA=T,Kh=Math.min,js=Math.max,mA=12,_A=6,SA=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._shapes={},e._dataInterval=[],e._handleEnds=[],e._hoverLinkDataIndices=[],e}return t.prototype.init=function(e,a){r.prototype.init.call(this,e,a),this._hoverLinkFromSeriesMouseOver=Z(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=Z(this._hideIndicator,this)},t.prototype.doRender=function(e,a,n,i){(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,a=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(a);var n=e.get("text");this._renderEndsText(a,n,0),this._renderEndsText(a,n,1),this._updateView(!0),this.renderBackground(a),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(a)},t.prototype._renderEndsText=function(e,a,n){if(a){var i=a[1-n];i=i!=null?i+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,f=this._applyTransform([l[0]/2,n===0?-s:l[1]+s],u),c=this._applyTransform(n===0?"bottom":"top",u),h=this._orient,v=this.visualMapModel.textStyleModel;this.group.add(new pe({style:De(v,{x:f[0],y:f[1],verticalAlign:v.get("verticalAlign")||(h==="horizontal"?"middle":c),align:v.get("align")||(h==="horizontal"?c:"center"),text:i})}))}},t.prototype._renderBar=function(e){var a=this.visualMapModel,n=this._shapes,i=a.itemSize,o=this._orient,s=this._useHandle,l=pm(a,this.api,i),u=n.mainGroup=this._createBarGroup(l),f=new oe;u.add(f),f.add(n.outOfRange=qh()),f.add(n.inRange=qh(null,s?Qh(this._orient):null,Z(this._dragHandle,this,"all",!1),Z(this._dragHandle,this,"all",!0))),f.setClipPath(new fe({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var c=a.textStyleModel.getTextRect("国"),h=js(c.width,c.height);s&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(a,u,0,i,h,o),this._createHandle(a,u,1,i,h,o)),this._createIndicator(a,u,i,h,o),e.add(u)},t.prototype._createHandle=function(e,a,n,i,o,s){var l=Z(this._dragHandle,this,n,!1),u=Z(this._dragHandle,this,n,!0),f=yn(e.get("handleSize"),i[0]),c=Je(e.get("handleIcon"),-f/2,-f/2,f,f,null,!0),h=Qh(this._orient);c.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(g){sr(g.event)}}),c.x=i[0]/2,c.useStyle(e.getModel("handleStyle").getItemStyle()),c.setStyle({strokeNoScale:!0,strokeFirst:!0}),c.style.lineWidth*=2,c.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),du(c,!0),a.add(c);var v=this.visualMapModel.textStyleModel,d=new pe({cursor:h,draggable:!0,drift:l,onmousemove:function(g){sr(g.event)},ondragend:u,style:De(v,{x:0,y:0,text:""})});d.ensureState("blur").style={opacity:.1},d.stateTransition={duration:200},this.group.add(d);var p=[f,0],y=this._shapes;y.handleThumbs[n]=c,y.handleLabelPoints[n]=p,y.handleLabels[n]=d},t.prototype._createIndicator=function(e,a,n,i,o){var s=yn(e.get("indicatorSize"),n[0]),l=Je(e.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var u=e.getModel("indicatorStyle").getItemStyle();if(l instanceof Gt){var f=l.style;l.useStyle(F({image:f.image,x:f.x,y:f.y,width:f.width,height:f.height},u))}else l.useStyle(u);a.add(l);var c=this.visualMapModel.textStyleModel,h=new pe({silent:!0,invisible:!0,style:De(c,{x:0,y:0,text:""})});this.group.add(h);var v=[(o==="horizontal"?i/2:_A)+n[0]/2,0],d=this._shapes;d.indicator=l,d.indicatorLabel=h,d.indicatorLabelPoint=v,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,a,n,i){if(this._useHandle){if(this._dragging=!a,!a){var o=this._applyTransform([n,i],this._shapes.mainGroup,!0);this._updateInterval(e,o[1]),this._hideIndicator(),this._updateView()}a===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),a?!this._hovering&&this._clearHoverLinkToSeries():jh(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,a=this._dataInterval=e.getSelected(),n=e.getExtent(),i=[0,e.itemSize[1]];this._handleEnds=[St(a[0],n,i,!0),St(a[1],n,i,!0)]},t.prototype._updateInterval=function(e,a){a=a||0;var n=this.visualMapModel,i=this._handleEnds,o=[0,n.itemSize[1]];wa(a,i,o,e,0);var s=n.getExtent();this._dataInterval=[St(i[0],o,s,!0),St(i[1],o,s,!0)]},t.prototype._updateView=function(e){var a=this.visualMapModel,n=a.getExtent(),i=this._shapes,o=[0,a.itemSize[1]],s=e?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,n,s,"inRange"),u=this._createBarVisual(n,n,o,"outOfRange");i.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},t.prototype._createBarVisual=function(e,a,n,i){var o={forceState:i,convertOpacityToAlpha:!0},s=this._makeColorGradient(e,o),l=[this.getControllerVisual(e[0],"symbolSize",o),this.getControllerVisual(e[1],"symbolSize",o)],u=this._createBarPoints(n,l);return{barColor:new nu(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},t.prototype._makeColorGradient=function(e,a){var n=100,i=[],o=(e[1]-e[0])/n;i.push({color:this.getControllerVisual(e[0],"color",a),offset:0});for(var s=1;s<n;s++){var l=e[0]+o*s;if(l>e[1])break;i.push({color:this.getControllerVisual(l,"color",a),offset:s/n})}return i.push({color:this.getControllerVisual(e[1],"color",a),offset:1}),i},t.prototype._createBarPoints=function(e,a){var n=this.visualMapModel.itemSize;return[[n[0]-a[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-a[1],e[1]]]},t.prototype._createBarGroup=function(e){var a=this._orient,n=this.visualMapModel.get("inverse");return new oe(a==="horizontal"&&!n?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&n?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!n?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},t.prototype._updateHandle=function(e,a){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=i.itemSize,u=i.getExtent(),f=this._applyTransform("left",n.mainGroup);yA([0,1],function(c){var h=o[c];h.setStyle("fill",a.handlesColor[c]),h.y=e[c];var v=St(e[c],[0,l[1]],u,!0),d=this.getControllerVisual(v,"symbolSize");h.scaleX=h.scaleY=d/l[0],h.x=l[0]-d/2;var p=nr(n.handleLabelPoints[c],fn(h,this.group));if(this._orient==="horizontal"){var y=f==="left"||f==="top"?(l[0]-d)/2:(l[0]-d)/-2;p[1]+=y}s[c].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,a,n,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,c=f.indicator;if(c){c.attr("invisible",!1);var h={convertOpacityToAlpha:!0},v=this.getControllerVisual(e,"color",h),d=this.getControllerVisual(e,"symbolSize"),p=St(e,s,u,!0),y=l[0]-d/2,g={x:c.x,y:c.y};c.y=p,c.x=y;var m=nr(f.indicatorLabelPoint,fn(c,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),b=this._orient,x=b==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:x?S:"middle",align:x?"center":S});var w={x:y,y:p,style:{fill:v}},D={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var M={duration:100,easing:"cubicInOut",additive:!0};c.x=g.x,c.y=g.y,c.animateTo(w,M),_.animateTo(D,M)}else c.attr(w),_.attr(D);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var C=0;C<A.length;C++)this.api.enterBlur(A[C])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(a){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,i=e._applyTransform([a.offsetX,a.offsetY],e._shapes.mainGroup,!0,!0);i[1]=Kh(js(0,i[1]),n[1]),e._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[0])}}).on("mouseout",function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,a){var n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var o=[0,i[1]],s=n.getExtent();e=Kh(js(o[0],e),o[1]);var l=xA(n,s,o),u=[e-l,e+l],f=St(e,o,s,!0),c=[St(u[0],o,s,!0),St(u[1],o,s,!0)];u[0]<o[0]&&(c[0]=-1/0),u[1]>o[1]&&(c[1]=1/0),a&&(c[0]===-1/0?this._showIndicator(f,c[1],"< ",l):c[1]===1/0?this._showIndicator(f,c[0],"> ",l):this._showIndicator(f,f,"≈ ",l));var h=this._hoverLinkDataIndices,v=[];(a||jh(n))&&(v=this._hoverLinkDataIndices=n.findTargetDataIndices(c));var d=S0(h,v);this._dispatchHighDown("downplay",zi(d[0],n)),this._dispatchHighDown("highlight",zi(d[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var a;if(va(e.target,function(l){var u=te(l);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var n=this.ecModel.getSeriesByIndex(a.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var o=n.getData(a.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),a.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var n=0;n<a.length;n++)this.api.leaveBlur(a[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",zi(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(e,a,n,i){var o=fn(a,i?null:this.group);return N(e)?nr(e,o,n):yu(e,o,n)},t.prototype._dispatchHighDown=function(e,a){a&&a.length&&this.api.dispatchAction({type:e,batch:a})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t})(dm);function qh(r,t,e,a){return new Ca({shape:{points:r},draggable:!!e,cursor:t,drift:e,onmousemove:function(n){sr(n.event)},ondragend:a})}function xA(r,t,e){var a=mA/2,n=r.get("hoverLinkDataSize");return n&&(a=St(n,t,e,!0)/2),a}function jh(r){var t=r.get("hoverLinkOnHandle");return!!(t??r.get("realtime"))}function Qh(r){return r==="vertical"?"ns-resize":"ew-resize"}var bA={type:"selectDataRange",event:"dataRangeSelected",update:"update"},wA=function(r,t){t.eachComponent({mainType:"visualMap",query:r},function(e){e.setSelected(r.selected)})},TA=[{createOnAllSeries:!0,reset:function(r,t){var e=[];return t.eachComponent("visualMap",function(a){var n=r.pipelineContext;!a.isTargetSeries(r)||n&&n.large||e.push(RD(a.stateList,a.targetVisuals,Z(a.getValueState,a),a.getDataDimensionIndex(r.getData())))}),e}},{createOnAllSeries:!0,reset:function(r,t){var e=r.getData(),a=[];t.eachComponent("visualMap",function(n){if(n.isTargetSeries(r)){var i=n.getVisualMeta(Z(CA,null,r,n))||{stops:[],outerColors:[]},o=n.getDataDimensionIndex(e);o>=0&&(i.dimension=o,a.push(i))}}),r.getData().setVisual("visualMeta",a)}}];function CA(r,t,e,a){for(var n=t.targetVisuals[a],i=Fe.prepareVisualTypes(n),o={color:Zp(r.getData(),"color")},s=0,l=i.length;s<l;s++){var u=i[s],f=n[u==="opacity"?"__alphaForOpacity":u];f&&f.applyVisual(e,c,h)}return o.color;function c(v){return o[v]}function h(v,d){o[v]=d}}var Jh=T;function MA(r){var t=r&&r.visualMap;N(t)||(t=t?[t]:[]),Jh(t,function(e){if(e){sa(e,"splitList")&&!sa(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var a=e.pieces;a&&N(a)&&Jh(a,function(n){K(n)&&(sa(n,"start")&&!sa(n,"min")&&(n.min=n.start),sa(n,"end")&&!sa(n,"max")&&(n.max=n.end))})}})}function sa(r,t){return r&&r.hasOwnProperty&&r.hasOwnProperty(t)}var ed=!1;function gm(r){ed||(ed=!0,r.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),r.registerAction(bA,wA),T(TA,function(t){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,t)}),r.registerPreprocessor(MA))}function DA(r){r.registerComponentModel(gA),r.registerComponentView(SA),gm(r)}var AA=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],LA[this._mode].call(this,this._pieceList),this._resetSelected(e,a);var i=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=j(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=X(this._pieceList,function(l){return l=j(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,a={},n=Fe.listVisualTypes(),i=this.isCategory();T(e.pieces,function(s){T(n,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),T(a,function(s,l){var u=!1;T(this.stateList,function(f){u=u||o(e,f,l)||o(e.target,f,l)},this),!u&&T(this.stateList,function(f){(e[f]||(e[f]={}))[l]=hm.get(l,f==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,a){var n=this.option,i=this._pieceList,o=(a?n:e).selected||{};if(n.selected=o,T(i,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),n.selectedMode==="single"){var s=!1;T(i,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=j(e)},t.prototype.getValueState=function(e){var a=Fe.findPieceIndex(e,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=Fe.findPieceIndex(l,n);f===e&&o.push(u)},this),a.push({seriesId:i.id,dataIndex:o})},this),a},t.prototype.getRepresentValue=function(e){var a;if(this.isCategory())a=e.value;else if(e.value!=null)a=e.value;else{var n=e.interval||[];a=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return a},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var a=[],n=["",""],i=this;function o(f,c){var h=i.getRepresentValue({interval:f});c||(c=i.getValueState(h));var v=e(h,c);f[0]===-1/0?n[0]=v:f[1]===1/0?n[1]=v:a.push({value:f[0],color:v},{value:f[1],color:v})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return T(s,function(f){var c=f.interval;c&&(c[0]>u&&o([u,c[0]],"outOfRange"),o(c.slice()),u=c[1])},this),{stops:a,outerColors:n}},t.type="visualMap.piecewise",t.defaultOption=Aa(So.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t})(So),LA={splitNumber:function(r){var t=this.option,e=Math.min(t.precision,20),a=this.getExtent(),n=t.splitNumber;n=Math.max(parseInt(n,10),1),t.splitNumber=n;for(var i=(a[1]-a[0])/n;+i.toFixed(e)!==i&&e<5;)e++;t.precision=e,i=+i.toFixed(e),t.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o<n;s+=i,o++){var l=o===n-1?a[1]:s+i;r.push({interval:[s,l],close:[1,1]})}t.maxOpen&&r.push({interval:[a[1],1/0],close:[0,0]}),Lf(r),T(r,function(u,f){u.index=f,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var t=this.option;T(t.categories,function(e){r.push({text:this.formatValueText(e,!0),value:e})},this),td(t,r)},pieces:function(r){var t=this.option;T(t.pieces,function(e,a){K(e)||(e={value:e});var n={text:"",index:a};if(e.label!=null&&(n.text=e.label),e.hasOwnProperty("value")){var i=n.value=e.value;n.interval=[i,i],n.close=[1,1]}else{for(var o=n.interval=[],s=n.close=[0,0],l=[1,0,1],u=[-1/0,1/0],f=[],c=0;c<2;c++){for(var h=[["gte","gt","min"],["lte","lt","max"]][c],v=0;v<3&&o[c]==null;v++)o[c]=e[h[v]],s[c]=l[v],f[c]=v===2;o[c]==null&&(o[c]=u[c])}f[0]&&o[1]===1/0&&(s[0]=0),f[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(n.value=o[0])}n.visual=Fe.retrieveVisuals(e),r.push(n)},this),td(t,r),Lf(r),T(r,function(e){var a=e.close,n=[["<","≤"][a[1]],[">","≥"][a[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,n)},this)}};function td(r,t){var e=r.inverse;(r.orient==="vertical"?!e:e)&&t.reverse()}var IA=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var a=this.visualMapModel,n=a.get("textGap"),i=a.textStyleModel,o=this._getItemAlign(),s=a.itemSize,l=this._getViewData(),u=l.endsText,f=Er(a.get("showLabel",!0),!u),c=!a.get("selectedMode");u&&this._renderEndsText(e,u[0],s,f,o),T(l.viewPieceList,function(h){var v=h.piece,d=new oe;d.onclick=Z(this._onItemClick,this,v),this._enableHoverLink(d,h.indexInModelPieceList);var p=a.getRepresentValue(v);if(this._createItemSymbol(d,p,[0,0,s[0],s[1]],c),f){var y=this.visualMapModel.getValueState(p),g=i.get("align")||o;d.add(new pe({style:De(i,{x:g==="right"?-n:s[0]+n,y:s[1]/2,text:v.text,verticalAlign:i.get("verticalAlign")||"middle",align:g,opacity:J(i.get("opacity"),y==="outOfRange"?.5:1)}),silent:c}))}e.add(d)},this),u&&this._renderEndsText(e,u[1],s,f,o),ga(a.get("orient"),e,a.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,a){var n=this;e.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:zi(s.findTargetDataIndices(a),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,a=e.option;if(a.orient==="vertical")return pm(e,this.api,e.itemSize);var n=a.align;return(!n||n==="auto")&&(n="left"),n},t.prototype._renderEndsText=function(e,a,n,i,o){if(a){var s=new oe,l=this.visualMapModel.textStyleModel;s.add(new pe({style:De(l,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:a})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,a=X(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=e.get("text"),i=e.get("orient"),o=e.get("inverse");return(i==="horizontal"?o:!o)?a.reverse():n&&(n=n.slice().reverse()),{viewPieceList:a,endsText:n}},t.prototype._createItemSymbol=function(e,a,n,i){var o=Je(this.getControllerVisual(a,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(a,"color"));o.silent=i,e.add(o)},t.prototype._onItemClick=function(e){var a=this.visualMapModel,n=a.option,i=n.selectedMode;if(i){var o=j(n.selected),s=a.getSelectedMapKey(e);i==="single"||i===!0?(o[s]=!0,T(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t})(dm);function PA(r){r.registerComponentModel(AA),r.registerComponentView(IA),gm(r)}function tL(r){qe(DA),qe(PA)}var kA=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.prototype.init=function(e,a,n){r.prototype.init.call(this,e,a,n),this._sourceManager=new Ap(this),xc(this)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),xc(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:ht},t})(ne),RA=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.type="dataset",t})(We);function EA(r){r.registerComponentModel(kA),r.registerComponentView(RA)}qe([r1,EA]);qe(t1);export{$A as A,Rn as S,FA as a,zA as b,VA as c,$i as d,GA as e,fg as f,Ke as g,BA as h,r1 as i,jA as j,NA as k,ve as l,YA as m,WA as n,KA as o,JA as p,UA as q,Tb as r,ZA as s,XA as t,qe as u,tL as v,HA as w,QA as x,eL as y,qA as z};
11
+ `||n==="")){var i=r.isSelected(n);G(e,n)?e[n]=e[n]&&i:e[n]=i}}),e}function GD(r){r.registerAction("legendToggleSelect","legendselectchanged",de(qa,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",de(qa,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",de(qa,"inverseSelect")),r.registerAction("legendSelect","legendselected",de(qa,"select")),r.registerAction("legendUnSelect","legendunselected",de(qa,"unSelect"))}function cm(r){r.registerComponentModel(jl),r.registerComponentView(um),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,zD),r.registerSubTypeDefaulter("legend",function(){return"plain"}),GD(r)}var FD=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(e,a,n){var i=Fr(e);r.prototype.init.call(this,e,a,n),Gh(this,e,i)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),Gh(this,this.option,e)},t.type="legend.scroll",t.defaultOption=Aa(jl.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:O.color.accent50,pageIconInactiveColor:O.color.accent10,pageIconSize:15,pageTextStyle:{color:O.color.tertiary},animationDurationUpdate:800}),t})(jl);function Gh(r,t,e){var a=r.getOrient(),n=[1,1];n[a.index]=0,zt(t,e,{type:"box",ignoreSize:!!n})}var Fh=oe,Zs=["width","height"],Xs=["x","y"],HD=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!0,e._currentIndex=0,e}return t.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new Fh),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Fh)},t.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(e,a,n,i,o,s,l){var u=this;r.prototype.renderInner.call(this,e,a,n,i,o,s,l);var f=this._controllerGroup,c=a.get("pageIconSize",!0),h=N(c)?c:[c,c];d("pagePrev",0);var v=a.getModel("pageTextStyle");f.add(new pe({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(p,y){var g=p+"DataIndex",m=mu(a.get("pageIcons",!0)[a.getOrient().name][y],{onclick:Z(u._pageGo,u,g,a,i)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});m.name=p,f.add(m)}},t.prototype.layoutInner=function(e,a,n,i,o,s){var l=this.getSelectorGroup(),u=e.getOrient().index,f=Zs[u],c=Xs[u],h=Zs[1-u],v=Xs[1-u];o&&ga("horizontal",l,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),p=l.getBoundingRect(),y=[-p.x,-p.y],g=j(n);o&&(g[f]=n[f]-p[f]-d);var m=this._layoutContentAndController(e,i,g,u,f,h,v,c);if(o){if(s==="end")y[u]+=m[f]+d;else{var _=p[f]+d;y[u]-=_,m[c]-=_}m[f]+=p[f]+d,y[1-u]+=m[v]+m[h]/2-p[h]/2,m[h]=Math.max(m[h],p[h]),m[v]=Math.min(m[v],p[v]+y[1-u]),l.x=y[0],l.y=y[1],l.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,a,n,i,o,s,l,u){var f=this.getContentGroup(),c=this._containerGroup,h=this._controllerGroup;ga(e.get("orient"),f,e.get("itemGap"),i?n.width:null,i?null:n.height),ga("horizontal",h,e.get("pageButtonItemGap",!0));var v=f.getBoundingRect(),d=h.getBoundingRect(),p=this._showController=v[o]>n[o],y=[-v.x,-v.y];a||(y[i]=f[u]);var g=[0,0],m=[-d.x,-d.y],_=J(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var S=e.get("pageButtonPosition",!0);S==="end"?m[i]+=n[o]-d[o]:g[i]+=d[o]+_}m[1-i]+=v[s]/2-d[s]/2,f.setPosition(y),c.setPosition(g),h.setPosition(m);var b={x:0,y:0};if(b[o]=p?n[o]:v[o],b[s]=Math.max(v[s],d[s]),b[l]=Math.min(0,d[l]+m[1-i]),c.__rectSize=n[o],p){var x={x:0,y:0};x[o]=Math.max(n[o]-d[o]-_,0),x[s]=b[s],c.setClipPath(new fe({shape:x})),c.__rectSize=x[o]}else h.eachChild(function(D){D.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(e);return w.pageIndex!=null&&xe(f,{x:w.contentPosition[0],y:w.contentPosition[1]},p?e:null),this._updatePageInfoView(e,w),b},t.prototype._pageGo=function(e,a,n){var i=this._getPageInfo(a)[e];i!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:a.id})},t.prototype._updatePageInfoView=function(e,a){var n=this._controllerGroup;T(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",h=a[c]!=null,v=n.childOfName(f);v&&(v.setStyle("fill",h?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),v.cursor=h?"pointer":"default")});var i=n.childOfName("pageText"),o=e.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;i&&o&&i.setStyle("text",$(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var a=e.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=e.getOrient().index,s=Zs[o],l=Xs[o],u=this._findTargetItemIndex(a),f=n.children(),c=f[u],h=f.length,v=h?1:0,d={contentPosition:[n.x,n.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return d;var p=S(c);d.contentPosition[o]=-p.s;for(var y=u+1,g=p,m=p,_=null;y<=h;++y)_=S(f[y]),(!_&&m.e>g.s+i||_&&!b(_,g.s))&&(m.i>g.i?g=m:g=_,g&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=g.i),++d.pageCount)),m=_;for(var y=u-1,g=p,m=p,_=null;y>=-1;--y)_=S(f[y]),(!_||!b(m,_.s))&&g.i<m.i&&(m=g,d.pagePrevDataIndex==null&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=_;return d;function S(x){if(x){var w=x.getBoundingRect(),D=w[l]+x[l];return{s:D,e:D+w[s],i:x.__legendDataIndex}}}function b(x,w){return x.e>=w&&x.s<=w+i}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var a,n=this.getContentGroup(),i;return n.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===e&&(a=s)}),a??i},t.type="legend.scroll",t})(um);function WD(r){r.registerAction("legendScroll","legendscroll",function(t,e){var a=t.scrollDataIndex;a!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(n){n.setScrollDataIndex(a)})})}function UD(r){qe(cm),r.registerComponentModel(FD),r.registerComponentView(HD),WD(r)}function JA(r){qe(cm),qe(UD)}var YD=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=Aa(_o.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t})(_o),mf=ae();function ZD(r,t,e){mf(r).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(t.uid);n&&(n.getRange=e)})}function XD(r,t){for(var e=mf(r).coordSysRecordMap,a=e.keys(),n=0;n<a.length;n++){var i=a[n],o=e.get(i),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||vm(e,o))}}}function vm(r,t){if(t){r.removeKey(t.model.uid);var e=t.controller;e&&e.dispose()}}function $D(r,t){var e={model:t,containsPoint:de(qD,t),dispatchAction:de(KD,r),dataZoomInfoMap:null,controller:null},a=e.controller=new Py(r.getZr());return T(["pan","zoom","scrollMove"],function(n){a.on(n,function(i){var o=[];e.dataZoomInfoMap.each(function(s){if(i.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[n],u=l&&l(s.dzReferCoordSysInfo,e.model.mainType,e.controller,i);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&e.dispatchAction(o)})}),e}function KD(r,t){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function qD(r,t,e,a){return r.coordinateSystem.containPoint([e,a])}function jD(r,t,e){var a,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return r.each(function(s){var l=s.model,u=l.get("disabled",!0)?!1:l.get("zoomLock",!0)?"move":!0;i[n+u]>i[n+a]&&(a=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:a,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:e,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint}}}}function QD(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var a=mf(e),n=a.coordSysRecordMap||(a.coordSysRecordMap=q());n.each(function(i){i.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=rm(i);T(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,$D(e,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=q());f.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),n.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){vm(n,i);return}var f=jD(l,i,e);o.enable(f.controlType,f.opt),ko(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var JD=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,a,n){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),ZD(n,e,{pan:Z($s.pan,this),zoom:Z($s.zoom,this),scrollMove:Z($s.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){XD(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t})(am),$s={zoom:function(r,t,e,a){var n=this.range,i=n.slice(),o=r.axisModels[0];if(o){var s=Ks[t](null,[a.originX,a.originY],o,e,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/a.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(wa(0,i,[0,100],0,f.minSpan,f.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:Hh(function(r,t,e,a,n,i){var o=Ks[a]([i.oldX,i.oldY],[i.newX,i.newY],t,n,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:Hh(function(r,t,e,a,n,i){var o=Ks[a]([0,0],[i.scrollDelta,i.scrollDelta],t,n,e);return o.signal*(r[1]-r[0])*i.scrollDelta})};function Hh(r){return function(t,e,a,n){var i=this.range,o=i.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,a,n);if(wa(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var Ks={grid:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,t,e,a,n){var i=e.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};function eA(r){nm(r),r.registerComponentModel(YD),r.registerComponentView(JD),QD(r)}var tA=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Aa(_o.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:O.color.accent10,borderRadius:0,backgroundColor:O.color.transparent,dataBackground:{lineStyle:{color:O.color.accent30,width:.5},areaStyle:{color:O.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:O.color.accent40,width:.5},areaStyle:{color:O.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:O.color.neutral00,borderColor:O.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:O.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:O.color.tertiary},brushSelect:!0,brushStyle:{color:O.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:O.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t})(_o),ja=fe,rA=1,qs=30,aA=7,Qa="horizontal",Wh="vertical",nA=5,iA=["line","bar","candlestick","scatter"],oA={easing:"cubicOut",duration:100,delay:0},sA=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,a){this.api=a,this._onBrush=Z(this._onBrush,this),this._onBrushEnd=Z(this._onBrushEnd,this)},t.prototype.render=function(e,a,n,i){if(r.prototype.render.apply(this,arguments),ko(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){to(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new oe;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(a),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,a=this.api,n=e.get("brushSelect"),i=n?aA:0,o=dr(e,a).refContainer,s=this._findCoordRect(),l=e.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Qa?{right:o.width-s.x-s.width,top:o.height-qs-l-i,width:s.width,height:qs}:{right:l,top:s.y,width:qs,height:s.height},f=Fr(e.option);T(["right","top","width","height"],function(h){f[h]==="ph"&&(f[h]=u[h])});var c=Ke(f,o);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===Wh&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,a=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===Qa&&!o?{scaleY:l?1:-1,scaleX:1}:n===Qa&&o?{scaleY:l?1:-1,scaleX:-1}:n===Wh&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=a.x-u.x,e.y=a.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,a=this._size,n=this._displayables.sliderGroup,i=e.get("brushSelect");n.add(new ja({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new ja({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:Z(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var a=this._size,n=this._shadowSize||[],i=e.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==n[0]||a[1]!==n[1]){var c=o.getDataExtent(e.thisDim),h=o.getDataExtent(l),v=(h[1]-h[0])*.3;h=[h[0]-v,h[1]+v];var d=[0,a[1]],p=[0,a[0]],y=[[a[0],0],[0,0]],g=[],m=p[1]/Math.max(1,o.count()-1),_=a[0]/(c[1]-c[0]),S=e.thisAxis.type==="time",b=-m,x=Math.round(o.count()/a[0]),w;o.each([e.thisDim,l],function(I,L,E){if(x>0&&E%x){S||(b+=m);return}b=S?(+I-c[0])*_:b+m;var P=L==null||isNaN(L)||L==="",k=P?0:ve(L,h,d,!0);P&&!w&&E?(y.push([y[y.length-1][0],0]),g.push([g[g.length-1][0],0])):!P&&w&&(y.push([b,0]),g.push([b,0])),P||(y.push([b,k]),g.push([b,k])),w=P}),u=this._shadowPolygonPts=y,f=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var D=this.dataZoomModel;function M(I){var L=D.getModel(I?"selectedDataBackground":"dataBackground"),E=new oe,P=new Ca({shape:{points:u},segmentIgnoreThreshold:1,style:L.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),k=new vr({shape:{points:f},segmentIgnoreThreshold:1,style:L.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return E.add(P),E.add(k),E}for(var A=0;A<3;A++){var C=M(A===1);this._displayables.sliderGroup.add(C),this._displayables.dataShadowSegs.push(C)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,a=e.get("showDataShadow");if(a!==!1){var n,i=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();T(l,function(u){if(!n&&!(a!==!0&&ue(iA,u.get("type"))<0)){var f=i.getComponent(rr(o),s).axis,c=lA(o),h,v=u.coordinateSystem;c!=null&&v.getOtherAxis&&(h=v.getOtherAxis(f).inverse),c=u.getData().mapDimension(c);var d=u.getData().mapDimension(o);n={thisAxis:f,series:u,thisDim:d,otherDim:c,otherAxisInverse:h}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,a=this._displayables,n=a.handles=[null,null],i=a.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,c=l.get("brushSelect"),h=a.filler=new ja({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new ja({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:rA,fill:O.color.transparent}})),T([0,1],function(_){var S=l.get("handleIcon");!ao[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var b=Je(S,-1,0,2,2,null,!0);b.attr({cursor:uA(this._orient),draggable:!0,drift:Z(this._onDragMove,this,_),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1),z2:5});var x=b.getBoundingRect(),w=l.get("handleSize");this._handleHeight=re(w,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),$i(b);var D=l.get("handleColor");D!=null&&(b.style.fill=D),o.add(n[_]=b);var M=l.getModel("textStyle"),A=l.get("handleLabel")||{},C=A.show||!1;e.add(i[_]=new pe({silent:!0,invisible:!C,style:De(M,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:M.getTextColor(),font:M.getFont()}),z2:10}))},this);var v=h;if(c){var d=re(l.get("moveHandleSize"),s[1]),p=a.moveHandle=new fe({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),y=d*.8,g=a.moveHandleIcon=Je(l.get("moveHandleIcon"),-y/2,-y/2,y,y,O.color.neutral00,!0);g.silent=!0,g.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(d,10));v=a.moveZone=new fe({invisible:!0,shape:{y:s[1]-m,height:d+m}}),v.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(g),o.add(v)}v.attr({draggable:!0,cursor:"default",drift:Z(this._onDragMove,this,"all"),ondragstart:Z(this._showDataInfo,this,!0),ondragend:Z(this._onDragEnd,this),onmouseover:Z(this._showDataInfo,this,!0),onmouseout:Z(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[ve(e[0],[0,100],a,!0),ve(e[1],[0,100],a,!0)]},t.prototype._updateInterval=function(e,a){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];wa(a,i,o,n.get("zoomLock")?"all":e,s.minSpan!=null?ve(s.minSpan,l,o,!0):null,s.maxSpan!=null?ve(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=Ar([ve(i[0],o,l,!0),ve(i[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(e){var a=this._displayables,n=this._handleEnds,i=Ar(n.slice()),o=this._size;T([0,1],function(v){var d=a.handles[v],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:n[v]+(v?-1:1),y:o[1]/2-p/2})},this),a.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};a.moveHandle&&(a.moveHandle.setShape(s),a.moveZone.setShape(s),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=a.dataShadowSegs,u=[0,i[0],i[1],o[0]],f=0;f<l.length;f++){var c=l[f],h=c.getClipPath();h||(h=new fe,c.setClipPath(h)),h.setShape({x:u[f],y:0,width:u[f+1]-u[f],height:o[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var a=this.dataZoomModel,n=this._displayables,i=n.handleLabels,o=this._orient,s=["",""];if(a.get("showDetail")){var l=a.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,f=this._range,c=e?l.calculateDataWindow({start:f[0],end:f[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(c[0],u),this._formatLabel(c[1],u)]}}var h=Ar(this._handleEnds.slice());v.call(this,0),v.call(this,1);function v(d){var p=fn(n.handles[d].parent,this.group),y=yu(d===0?"right":"left",p),g=this._handleWidth/2+nA,m=nr([h[d]+(d===0?-g:g),this._size[1]/2],p);i[d].setStyle({x:m[0],y:m[1],verticalAlign:o===Qa?"middle":y,align:o===Qa?y:"center",text:s[d]})}},t.prototype._formatLabel=function(e,a){var n=this.dataZoomModel,i=n.get("labelFormatter"),o=n.get("labelPrecision");(o==null||o==="auto")&&(o=a.getPixelPrecision());var s=e==null||isNaN(e)?"":a.type==="category"||a.type==="time"?a.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(o,20));return Q(i)?i(e,s):$(i)?i.replace("{value}",s):s},t.prototype._showDataInfo=function(e){var a=this.dataZoomModel.get("handleLabel")||{},n=a.show||!1,i=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=i.get("show")||!1,s=e||this._dragging?o:n,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},t.prototype._onDragMove=function(e,a,n,i){this._dragging=!0,sr(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=nr([a,n],o,!0),l=this._updateInterval(e,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var e=this.dataZoomModel.get("realtime");!e&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var a=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>a[0]||n[1]<0||n[1]>a[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var a=e.offsetX,n=e.offsetY;this._brushStart=new ge(a,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var n=a.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[n.x,n.x+n.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();wa(0,l,o,0,u.minSpan!=null?ve(u.minSpan,s,o,!0):null,u.maxSpan!=null?ve(u.maxSpan,s,o,!0):null),this._range=Ar([ve(l[0],o,s,!0),ve(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(sr(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,a){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new ja({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,a),f=l.transformCoordToLocal(s.x,s.y),c=this._size;u[0]=Math.max(Math.min(c[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:c[1]})},t.prototype._dispatchZoomAction=function(e){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?oA:null,start:a[0],end:a[1]})},t.prototype._findCoordRect=function(){var e,a=rm(this.dataZoomModel).infoList;if(!e&&a.length){var n=a[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var i=this.api.getWidth(),o=this.api.getHeight();e={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return e},t.type="dataZoom.slider",t})(am);function lA(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function uA(r){return r==="vertical"?"ns-resize":"ew-resize"}function fA(r){r.registerComponentModel(tA),r.registerComponentView(sA),nm(r)}function eL(r){qe(eA),qe(fA)}var hm={get:function(r,t,e){var a=j((cA[r]||{})[t]);return e&&N(a)?a[a.length-1]:a}},cA={color:{active:["#006edd","#e0ffff"],inactive:[O.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Uh=Fe.mapVisual,vA=Fe.eachVisual,hA=N,Yh=T,dA=Ar,pA=ve,So=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,a){var n=this.option;!a&&kD(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var a=this.stateList;e=Z(e,this),this.controllerVisuals=Nh(this.option.controller,a,e),this.targetVisuals=Nh(this.option.target,a,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesId,a=this.option.seriesIndex;a==null&&e==null&&(a="all");var n=Ma(this.ecModel,"series",{index:a,id:e},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return X(n,function(i){return i.componentIndex})},t.prototype.eachTargetSeries=function(e,a){T(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&e.call(a,i)},this)},t.prototype.isTargetSeries=function(e){var a=!1;return this.eachTargetSeries(function(n){n===e&&(a=!0)}),a},t.prototype.formatValueText=function(e,a,n){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;n=n||["<",">"],N(e)&&(e=e.slice(),u=!0);var f=a?e:u?[c(e[0]),c(e[1])]:c(e);if($(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(Q(l))return u?l(e[0],e[1]):l(e);if(u)return e[0]===s[0]?n[0]+" "+f[1]:e[1]===s[1]?n[1]+" "+f[0]:f[0]+" - "+f[1];return f;function c(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,a=dA([e.min,e.max]);this._dataExtent=a},t.prototype.getDataDimensionIndex=function(e){var a=this.option.dimension;if(a!=null)return e.getDimensionIndex(a);for(var n=e.dimensions,i=n.length-1;i>=0;i--){var o=n[i],s=e.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,a=this.option,n={inRange:a.inRange,outOfRange:a.outOfRange},i=a.target||(a.target={}),o=a.controller||(a.controller={});se(i,n),se(o,n);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),f.call(this,o);function l(c){hA(a.color)&&!c.inRange&&(c.inRange={color:a.color.slice().reverse()}),c.inRange=c.inRange||{color:e.get("gradientColor")}}function u(c,h,v){var d=c[h],p=c[v];d&&!p&&(p=c[v]={},Yh(d,function(y,g){if(Fe.isValidType(g)){var m=hm.get(g,"inactive",s);m!=null&&(p[g]=m,g==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function f(c){var h=(c.inRange||{}).symbol||(c.outOfRange||{}).symbol,v=(c.inRange||{}).symbolSize||(c.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),p=this.getItemSymbol(),y=p||"roundRect";Yh(this.stateList,function(g){var m=this.itemSize,_=c[g];_||(_=c[g]={color:s?d:[d]}),_.symbol==null&&(_.symbol=h&&j(h)||(s?y:[y])),_.symbolSize==null&&(_.symbolSize=v&&j(v)||(s?m[0]:[m[0],m[0]])),_.symbol=Uh(_.symbol,function(x){return x==="none"?y:x});var S=_.symbolSize;if(S!=null){var b=-1/0;vA(S,function(x){x>b&&(b=x)}),_.symbolSize=Uh(S,function(x){return pA(x,[0,b],[0,m[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:O.color.transparent,borderColor:O.color.borderTint,contentColor:O.color.theme[0],inactiveColor:O.color.disabled,borderWidth:0,padding:O.size.m,textGap:10,precision:0,textStyle:{color:O.color.secondary}},t})(ne),Zh=[20,140],gA=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=Zh[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=Zh[1])},t.prototype._resetRange=function(){var e=this.getExtent(),a=this.option.range;!a||a.auto?(e.auto=1,this.option.range=e):N(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],e[0]),a[1]=Math.min(a[1],e[1]))},t.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),T(this.stateList,function(e){var a=this.option.controller[e].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),a=Ar((this.get("range")||[]).slice());return a[0]>e[1]&&(a[0]=e[1]),a[1]>e[1]&&(a[1]=e[1]),a[0]<e[0]&&(a[0]=e[0]),a[1]<e[0]&&(a[1]=e[0]),a},t.prototype.getValueState=function(e){var a=this.option.range,n=this.getExtent(),i=J(this.option.unboundedRange,!0);return(i&&a[0]<=n[0]||a[0]<=e)&&(i&&a[1]>=n[1]||e<=a[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){e[0]<=s&&s<=e[1]&&i.push(l)},this),a.push({seriesId:n.id,dataIndex:i})},this),a},t.prototype.getVisualMeta=function(e){var a=Xh(this,"outOfRange",this.getExtent()),n=Xh(this,"inRange",this.option.range.slice()),i=[];function o(v,d){i.push({value:v,color:e(v,d)})}for(var s=0,l=0,u=n.length,f=a.length;l<f&&(!n.length||a[l]<=n[0]);l++)a[l]<n[s]&&o(a[l],"outOfRange");for(var c=1;s<u;s++,c=0)c&&i.length&&o(n[s],"outOfRange"),o(n[s],"inRange");for(var c=1;l<f;l++)(!n.length||n[n.length-1]<a[l])&&(c&&(i.length&&o(i[i.length-1].value,"outOfRange"),c=0),o(a[l],"outOfRange"));var h=i.length;return{stops:i,outerColors:[h?i[0].color:"transparent",h?i[h-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=Aa(So.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:O.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:O.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:O.color.shadow}}),t})(So);function Xh(r,t,e){if(e[0]===e[1])return e.slice();for(var a=200,n=(e[1]-e[0])/a,i=e[0],o=[],s=0;s<=a&&i<e[1];s++)o.push(i),i+=n;return o.push(e[1]),o}var dm=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.autoPositionValues={left:1,right:1,top:1,bottom:1},e}return t.prototype.init=function(e,a){this.ecModel=e,this.api=a},t.prototype.render=function(e,a,n,i){if(this.visualMapModel=e,e.get("show")===!1){this.group.removeAll();return}this.doRender(e,a,n,i)},t.prototype.renderBackground=function(e){var a=this.visualMapModel,n=Kn(a.get("padding")||0),i=e.getBoundingRect();e.add(new fe({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:a.get("backgroundColor"),stroke:a.get("borderColor"),lineWidth:a.get("borderWidth")}}))},t.prototype.getControllerVisual=function(e,a,n){n=n||{};var i=n.forceState,o=this.visualMapModel,s={};if(a==="color"){var l=o.get("contentColor");s.color=l}function u(v){return s[v]}function f(v,d){s[v]=d}var c=o.controllerVisuals[i||o.getValueState(e)],h=Fe.prepareVisualTypes(c);return T(h,function(v){var d=c[v];n.convertOpacityToAlpha&&v==="opacity"&&(v="colorAlpha",d=c.__alphaForOpacity),Fe.dependsOn(v,a)&&d&&d.applyVisual(e,u,f)}),s[a]},t.prototype.positionGroup=function(e){var a=this.visualMapModel,n=this.api,i=dr(a,n).refContainer;J_(e,a.getBoxLayoutParams(),i)},t.prototype.doRender=function(e,a,n,i){},t.type="visualMap",t})(We),$h=[["left","right","width"],["top","bottom","height"]];function pm(r,t,e){var a=r.option,n=a.align;if(n!=null&&n!=="auto")return n;for(var i={width:t.getWidth(),height:t.getHeight()},o=a.orient==="horizontal"?1:0,s=$h[o],l=[0,null,10],u={},f=0;f<3;f++)u[$h[1-o][f]]=l[f],u[s[f]]=f===2?e[0]:a[s[f]];var c=[["x","width",3],["y","height",0]][o],h=Ke(u,i,a.padding);return s[(h.margin[c[2]]||0)+h[c[0]]+h[c[1]]*.5<i[c[1]]*.5?0:1]}function zi(r,t){return T(r||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),r}var St=ve,yA=T,Kh=Math.min,js=Math.max,mA=12,_A=6,SA=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._shapes={},e._dataInterval=[],e._handleEnds=[],e._hoverLinkDataIndices=[],e}return t.prototype.init=function(e,a){r.prototype.init.call(this,e,a),this._hoverLinkFromSeriesMouseOver=Z(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=Z(this._hideIndicator,this)},t.prototype.doRender=function(e,a,n,i){(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,a=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(a);var n=e.get("text");this._renderEndsText(a,n,0),this._renderEndsText(a,n,1),this._updateView(!0),this.renderBackground(a),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(a)},t.prototype._renderEndsText=function(e,a,n){if(a){var i=a[1-n];i=i!=null?i+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,f=this._applyTransform([l[0]/2,n===0?-s:l[1]+s],u),c=this._applyTransform(n===0?"bottom":"top",u),h=this._orient,v=this.visualMapModel.textStyleModel;this.group.add(new pe({style:De(v,{x:f[0],y:f[1],verticalAlign:v.get("verticalAlign")||(h==="horizontal"?"middle":c),align:v.get("align")||(h==="horizontal"?c:"center"),text:i})}))}},t.prototype._renderBar=function(e){var a=this.visualMapModel,n=this._shapes,i=a.itemSize,o=this._orient,s=this._useHandle,l=pm(a,this.api,i),u=n.mainGroup=this._createBarGroup(l),f=new oe;u.add(f),f.add(n.outOfRange=qh()),f.add(n.inRange=qh(null,s?Qh(this._orient):null,Z(this._dragHandle,this,"all",!1),Z(this._dragHandle,this,"all",!0))),f.setClipPath(new fe({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var c=a.textStyleModel.getTextRect("国"),h=js(c.width,c.height);s&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(a,u,0,i,h,o),this._createHandle(a,u,1,i,h,o)),this._createIndicator(a,u,i,h,o),e.add(u)},t.prototype._createHandle=function(e,a,n,i,o,s){var l=Z(this._dragHandle,this,n,!1),u=Z(this._dragHandle,this,n,!0),f=yn(e.get("handleSize"),i[0]),c=Je(e.get("handleIcon"),-f/2,-f/2,f,f,null,!0),h=Qh(this._orient);c.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(g){sr(g.event)}}),c.x=i[0]/2,c.useStyle(e.getModel("handleStyle").getItemStyle()),c.setStyle({strokeNoScale:!0,strokeFirst:!0}),c.style.lineWidth*=2,c.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),du(c,!0),a.add(c);var v=this.visualMapModel.textStyleModel,d=new pe({cursor:h,draggable:!0,drift:l,onmousemove:function(g){sr(g.event)},ondragend:u,style:De(v,{x:0,y:0,text:""})});d.ensureState("blur").style={opacity:.1},d.stateTransition={duration:200},this.group.add(d);var p=[f,0],y=this._shapes;y.handleThumbs[n]=c,y.handleLabelPoints[n]=p,y.handleLabels[n]=d},t.prototype._createIndicator=function(e,a,n,i,o){var s=yn(e.get("indicatorSize"),n[0]),l=Je(e.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var u=e.getModel("indicatorStyle").getItemStyle();if(l instanceof Gt){var f=l.style;l.useStyle(F({image:f.image,x:f.x,y:f.y,width:f.width,height:f.height},u))}else l.useStyle(u);a.add(l);var c=this.visualMapModel.textStyleModel,h=new pe({silent:!0,invisible:!0,style:De(c,{x:0,y:0,text:""})});this.group.add(h);var v=[(o==="horizontal"?i/2:_A)+n[0]/2,0],d=this._shapes;d.indicator=l,d.indicatorLabel=h,d.indicatorLabelPoint=v,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,a,n,i){if(this._useHandle){if(this._dragging=!a,!a){var o=this._applyTransform([n,i],this._shapes.mainGroup,!0);this._updateInterval(e,o[1]),this._hideIndicator(),this._updateView()}a===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),a?!this._hovering&&this._clearHoverLinkToSeries():jh(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,a=this._dataInterval=e.getSelected(),n=e.getExtent(),i=[0,e.itemSize[1]];this._handleEnds=[St(a[0],n,i,!0),St(a[1],n,i,!0)]},t.prototype._updateInterval=function(e,a){a=a||0;var n=this.visualMapModel,i=this._handleEnds,o=[0,n.itemSize[1]];wa(a,i,o,e,0);var s=n.getExtent();this._dataInterval=[St(i[0],o,s,!0),St(i[1],o,s,!0)]},t.prototype._updateView=function(e){var a=this.visualMapModel,n=a.getExtent(),i=this._shapes,o=[0,a.itemSize[1]],s=e?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,n,s,"inRange"),u=this._createBarVisual(n,n,o,"outOfRange");i.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},t.prototype._createBarVisual=function(e,a,n,i){var o={forceState:i,convertOpacityToAlpha:!0},s=this._makeColorGradient(e,o),l=[this.getControllerVisual(e[0],"symbolSize",o),this.getControllerVisual(e[1],"symbolSize",o)],u=this._createBarPoints(n,l);return{barColor:new nu(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},t.prototype._makeColorGradient=function(e,a){var n=100,i=[],o=(e[1]-e[0])/n;i.push({color:this.getControllerVisual(e[0],"color",a),offset:0});for(var s=1;s<n;s++){var l=e[0]+o*s;if(l>e[1])break;i.push({color:this.getControllerVisual(l,"color",a),offset:s/n})}return i.push({color:this.getControllerVisual(e[1],"color",a),offset:1}),i},t.prototype._createBarPoints=function(e,a){var n=this.visualMapModel.itemSize;return[[n[0]-a[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-a[1],e[1]]]},t.prototype._createBarGroup=function(e){var a=this._orient,n=this.visualMapModel.get("inverse");return new oe(a==="horizontal"&&!n?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&n?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!n?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},t.prototype._updateHandle=function(e,a){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=i.itemSize,u=i.getExtent(),f=this._applyTransform("left",n.mainGroup);yA([0,1],function(c){var h=o[c];h.setStyle("fill",a.handlesColor[c]),h.y=e[c];var v=St(e[c],[0,l[1]],u,!0),d=this.getControllerVisual(v,"symbolSize");h.scaleX=h.scaleY=d/l[0],h.x=l[0]-d/2;var p=nr(n.handleLabelPoints[c],fn(h,this.group));if(this._orient==="horizontal"){var y=f==="left"||f==="top"?(l[0]-d)/2:(l[0]-d)/-2;p[1]+=y}s[c].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,a,n,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,c=f.indicator;if(c){c.attr("invisible",!1);var h={convertOpacityToAlpha:!0},v=this.getControllerVisual(e,"color",h),d=this.getControllerVisual(e,"symbolSize"),p=St(e,s,u,!0),y=l[0]-d/2,g={x:c.x,y:c.y};c.y=p,c.x=y;var m=nr(f.indicatorLabelPoint,fn(c,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),b=this._orient,x=b==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:x?S:"middle",align:x?"center":S});var w={x:y,y:p,style:{fill:v}},D={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var M={duration:100,easing:"cubicInOut",additive:!0};c.x=g.x,c.y=g.y,c.animateTo(w,M),_.animateTo(D,M)}else c.attr(w),_.attr(D);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var C=0;C<A.length;C++)this.api.enterBlur(A[C])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(a){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,i=e._applyTransform([a.offsetX,a.offsetY],e._shapes.mainGroup,!0,!0);i[1]=Kh(js(0,i[1]),n[1]),e._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[0])}}).on("mouseout",function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,a){var n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var o=[0,i[1]],s=n.getExtent();e=Kh(js(o[0],e),o[1]);var l=xA(n,s,o),u=[e-l,e+l],f=St(e,o,s,!0),c=[St(u[0],o,s,!0),St(u[1],o,s,!0)];u[0]<o[0]&&(c[0]=-1/0),u[1]>o[1]&&(c[1]=1/0),a&&(c[0]===-1/0?this._showIndicator(f,c[1],"< ",l):c[1]===1/0?this._showIndicator(f,c[0],"> ",l):this._showIndicator(f,f,"≈ ",l));var h=this._hoverLinkDataIndices,v=[];(a||jh(n))&&(v=this._hoverLinkDataIndices=n.findTargetDataIndices(c));var d=S0(h,v);this._dispatchHighDown("downplay",zi(d[0],n)),this._dispatchHighDown("highlight",zi(d[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var a;if(va(e.target,function(l){var u=te(l);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var n=this.ecModel.getSeriesByIndex(a.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var o=n.getData(a.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),a.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var n=0;n<a.length;n++)this.api.leaveBlur(a[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",zi(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(e,a,n,i){var o=fn(a,i?null:this.group);return N(e)?nr(e,o,n):yu(e,o,n)},t.prototype._dispatchHighDown=function(e,a){a&&a.length&&this.api.dispatchAction({type:e,batch:a})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t})(dm);function qh(r,t,e,a){return new Ca({shape:{points:r},draggable:!!e,cursor:t,drift:e,onmousemove:function(n){sr(n.event)},ondragend:a})}function xA(r,t,e){var a=mA/2,n=r.get("hoverLinkDataSize");return n&&(a=St(n,t,e,!0)/2),a}function jh(r){var t=r.get("hoverLinkOnHandle");return!!(t??r.get("realtime"))}function Qh(r){return r==="vertical"?"ns-resize":"ew-resize"}var bA={type:"selectDataRange",event:"dataRangeSelected",update:"update"},wA=function(r,t){t.eachComponent({mainType:"visualMap",query:r},function(e){e.setSelected(r.selected)})},TA=[{createOnAllSeries:!0,reset:function(r,t){var e=[];return t.eachComponent("visualMap",function(a){var n=r.pipelineContext;!a.isTargetSeries(r)||n&&n.large||e.push(RD(a.stateList,a.targetVisuals,Z(a.getValueState,a),a.getDataDimensionIndex(r.getData())))}),e}},{createOnAllSeries:!0,reset:function(r,t){var e=r.getData(),a=[];t.eachComponent("visualMap",function(n){if(n.isTargetSeries(r)){var i=n.getVisualMeta(Z(CA,null,r,n))||{stops:[],outerColors:[]},o=n.getDataDimensionIndex(e);o>=0&&(i.dimension=o,a.push(i))}}),r.getData().setVisual("visualMeta",a)}}];function CA(r,t,e,a){for(var n=t.targetVisuals[a],i=Fe.prepareVisualTypes(n),o={color:Zp(r.getData(),"color")},s=0,l=i.length;s<l;s++){var u=i[s],f=n[u==="opacity"?"__alphaForOpacity":u];f&&f.applyVisual(e,c,h)}return o.color;function c(v){return o[v]}function h(v,d){o[v]=d}}var Jh=T;function MA(r){var t=r&&r.visualMap;N(t)||(t=t?[t]:[]),Jh(t,function(e){if(e){sa(e,"splitList")&&!sa(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var a=e.pieces;a&&N(a)&&Jh(a,function(n){K(n)&&(sa(n,"start")&&!sa(n,"min")&&(n.min=n.start),sa(n,"end")&&!sa(n,"max")&&(n.max=n.end))})}})}function sa(r,t){return r&&r.hasOwnProperty&&r.hasOwnProperty(t)}var ed=!1;function gm(r){ed||(ed=!0,r.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),r.registerAction(bA,wA),T(TA,function(t){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,t)}),r.registerPreprocessor(MA))}function DA(r){r.registerComponentModel(gA),r.registerComponentView(SA),gm(r)}var AA=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],LA[this._mode].call(this,this._pieceList),this._resetSelected(e,a);var i=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=j(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=X(this._pieceList,function(l){return l=j(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,a={},n=Fe.listVisualTypes(),i=this.isCategory();T(e.pieces,function(s){T(n,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),T(a,function(s,l){var u=!1;T(this.stateList,function(f){u=u||o(e,f,l)||o(e.target,f,l)},this),!u&&T(this.stateList,function(f){(e[f]||(e[f]={}))[l]=hm.get(l,f==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,a){var n=this.option,i=this._pieceList,o=(a?n:e).selected||{};if(n.selected=o,T(i,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),n.selectedMode==="single"){var s=!1;T(i,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=j(e)},t.prototype.getValueState=function(e){var a=Fe.findPieceIndex(e,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=Fe.findPieceIndex(l,n);f===e&&o.push(u)},this),a.push({seriesId:i.id,dataIndex:o})},this),a},t.prototype.getRepresentValue=function(e){var a;if(this.isCategory())a=e.value;else if(e.value!=null)a=e.value;else{var n=e.interval||[];a=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return a},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var a=[],n=["",""],i=this;function o(f,c){var h=i.getRepresentValue({interval:f});c||(c=i.getValueState(h));var v=e(h,c);f[0]===-1/0?n[0]=v:f[1]===1/0?n[1]=v:a.push({value:f[0],color:v},{value:f[1],color:v})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return T(s,function(f){var c=f.interval;c&&(c[0]>u&&o([u,c[0]],"outOfRange"),o(c.slice()),u=c[1])},this),{stops:a,outerColors:n}},t.type="visualMap.piecewise",t.defaultOption=Aa(So.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t})(So),LA={splitNumber:function(r){var t=this.option,e=Math.min(t.precision,20),a=this.getExtent(),n=t.splitNumber;n=Math.max(parseInt(n,10),1),t.splitNumber=n;for(var i=(a[1]-a[0])/n;+i.toFixed(e)!==i&&e<5;)e++;t.precision=e,i=+i.toFixed(e),t.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o<n;s+=i,o++){var l=o===n-1?a[1]:s+i;r.push({interval:[s,l],close:[1,1]})}t.maxOpen&&r.push({interval:[a[1],1/0],close:[0,0]}),Lf(r),T(r,function(u,f){u.index=f,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var t=this.option;T(t.categories,function(e){r.push({text:this.formatValueText(e,!0),value:e})},this),td(t,r)},pieces:function(r){var t=this.option;T(t.pieces,function(e,a){K(e)||(e={value:e});var n={text:"",index:a};if(e.label!=null&&(n.text=e.label),e.hasOwnProperty("value")){var i=n.value=e.value;n.interval=[i,i],n.close=[1,1]}else{for(var o=n.interval=[],s=n.close=[0,0],l=[1,0,1],u=[-1/0,1/0],f=[],c=0;c<2;c++){for(var h=[["gte","gt","min"],["lte","lt","max"]][c],v=0;v<3&&o[c]==null;v++)o[c]=e[h[v]],s[c]=l[v],f[c]=v===2;o[c]==null&&(o[c]=u[c])}f[0]&&o[1]===1/0&&(s[0]=0),f[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(n.value=o[0])}n.visual=Fe.retrieveVisuals(e),r.push(n)},this),td(t,r),Lf(r),T(r,function(e){var a=e.close,n=[["<","≤"][a[1]],[">","≥"][a[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,n)},this)}};function td(r,t){var e=r.inverse;(r.orient==="vertical"?!e:e)&&t.reverse()}var IA=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var a=this.visualMapModel,n=a.get("textGap"),i=a.textStyleModel,o=this._getItemAlign(),s=a.itemSize,l=this._getViewData(),u=l.endsText,f=Er(a.get("showLabel",!0),!u),c=!a.get("selectedMode");u&&this._renderEndsText(e,u[0],s,f,o),T(l.viewPieceList,function(h){var v=h.piece,d=new oe;d.onclick=Z(this._onItemClick,this,v),this._enableHoverLink(d,h.indexInModelPieceList);var p=a.getRepresentValue(v);if(this._createItemSymbol(d,p,[0,0,s[0],s[1]],c),f){var y=this.visualMapModel.getValueState(p),g=i.get("align")||o;d.add(new pe({style:De(i,{x:g==="right"?-n:s[0]+n,y:s[1]/2,text:v.text,verticalAlign:i.get("verticalAlign")||"middle",align:g,opacity:J(i.get("opacity"),y==="outOfRange"?.5:1)}),silent:c}))}e.add(d)},this),u&&this._renderEndsText(e,u[1],s,f,o),ga(a.get("orient"),e,a.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,a){var n=this;e.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:zi(s.findTargetDataIndices(a),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,a=e.option;if(a.orient==="vertical")return pm(e,this.api,e.itemSize);var n=a.align;return(!n||n==="auto")&&(n="left"),n},t.prototype._renderEndsText=function(e,a,n,i,o){if(a){var s=new oe,l=this.visualMapModel.textStyleModel;s.add(new pe({style:De(l,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:a})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,a=X(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=e.get("text"),i=e.get("orient"),o=e.get("inverse");return(i==="horizontal"?o:!o)?a.reverse():n&&(n=n.slice().reverse()),{viewPieceList:a,endsText:n}},t.prototype._createItemSymbol=function(e,a,n,i){var o=Je(this.getControllerVisual(a,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(a,"color"));o.silent=i,e.add(o)},t.prototype._onItemClick=function(e){var a=this.visualMapModel,n=a.option,i=n.selectedMode;if(i){var o=j(n.selected),s=a.getSelectedMapKey(e);i==="single"||i===!0?(o[s]=!0,T(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t})(dm);function PA(r){r.registerComponentModel(AA),r.registerComponentView(IA),gm(r)}function tL(r){qe(DA),qe(PA)}var kA=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.prototype.init=function(e,a,n){r.prototype.init.call(this,e,a,n),this._sourceManager=new Ap(this),xc(this)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),xc(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:ht},t})(ne),RA=(function(r){H(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.type="dataset",t})(We);function EA(r){r.registerComponentModel(kA),r.registerComponentView(RA)}qe([r1,EA]);qe(t1);export{$A as A,Rn as S,FA as a,zA as b,VA as c,$i as d,GA as e,fg as f,Ke as g,BA as h,r1 as i,jA as j,NA as k,ve as l,UA as m,WA as n,HA as o,XA as p,QA as q,Tb as r,JA as s,KA as t,qe as u,tL as v,eL as w,YA as x,ZA as y,qA as z};
@@ -1 +1 @@
1
- import{e as Tt,c as Mt,S as It,a as Ct,b as nt,d as kt,r as Et,g as bt,l as Ft,f as At,h as Pt}from"./vendor-echarts-hJVnODyU.js";import{a1 as Rt,a as Wt,f as ht}from"./vendor-zrender-5DcYjSZk.js";Tt({type:"series.wordCloud",visualStyleAccessPath:"textStyle",visualStyleMapper:function(f){return{fill:f.get("color")}},visualDrawType:"fill",optionUpdated:function(){var f=this.option;f.gridSize=Math.max(Math.floor(f.gridSize),4)},getInitialData:function(f,o){var a=Mt(f.data,{coordDimensions:["value"]}),l=new It(a,this);return l.initData(f.data),l},defaultOption:{maskImage:null,shape:"circle",keepAspect:!1,left:"center",top:"center",width:"70%",height:"80%",sizeRange:[12,60],rotationRange:[-90,90],rotationStep:45,gridSize:8,drawOutOfBound:!1,shrinkToFit:!1,textStyle:{fontWeight:"normal"}}});Ct({type:"wordCloud",render:function(f,o,a){var l=this.group;l.removeAll();var t=f.getData(),x=f.get("gridSize");f.layoutInstance.ondraw=function(d,r,T,P){var D=t.getItemModel(T),Y=D.getModel("textStyle"),I=new Rt({style:nt(Y),scaleX:1/P.info.mu,scaleY:1/P.info.mu,x:(P.gx+P.info.gw/2)*x,y:(P.gy+P.info.gh/2)*x,rotation:P.rot});I.setStyle({x:P.info.fillTextOffsetX,y:P.info.fillTextOffsetY+r*.5,text:d,verticalAlign:"middle",fill:t.getItemVisual(T,"style").fill,fontSize:r}),l.add(I),t.setItemGraphicEl(T,I),I.ensureState("emphasis").style=nt(D.getModel(["emphasis","textStyle"]),{state:"emphasis"}),I.ensureState("blur").style=nt(D.getModel(["blur","textStyle"]),{state:"blur"}),kt(I,D.get(["emphasis","focus"]),D.get(["emphasis","blurScope"])),I.stateTransition={duration:f.get("animation")?f.get(["stateAnimation","duration"]):0,easing:f.get(["stateAnimation","easing"])},I.__highDownDispatcher=!0},this._model=f},remove:function(){this.group.removeAll(),this._model.layoutInstance.dispose()},dispose:function(){this._model.layoutInstance.dispose()}});window.setImmediate||(window.setImmediate=(function(){return window.msSetImmediate||window.webkitSetImmediate||window.mozSetImmediate||window.oSetImmediate||(function(){if(!window.postMessage||!window.addEventListener)return null;var a=[void 0],l="zero-timeout-message",t=function(d){var r=a.length;return a.push(d),window.postMessage(l+r.toString(36),"*"),r};return window.addEventListener("message",function(d){if(!(typeof d.data!="string"||d.data.substr(0,l.length)!==l)){d.stopImmediatePropagation();var r=parseInt(d.data.substr(l.length),36);a[r]&&(a[r](),a[r]=void 0)}},!0),window.clearImmediate=function(d){a[d]&&(a[d]=void 0)},t})()||function(a){window.setTimeout(a,0)}})());window.clearImmediate||(window.clearImmediate=(function(){return window.msClearImmediate||window.webkitClearImmediate||window.mozClearImmediate||window.oClearImmediate||function(a){window.clearTimeout(a)}})());var lt=(function(){var o=document.createElement("canvas");if(!o||!o.getContext)return!1;var a=o.getContext("2d");return!(!a||!a.getImageData||!a.fillText||!Array.prototype.some||!Array.prototype.push)})(),ot=(function(){if(lt){for(var o=document.createElement("canvas").getContext("2d"),a=20,l,t;a;){if(o.font=a.toString(10)+"px sans-serif",o.measureText("W").width===l&&o.measureText("m").width===t)return a+1;l=o.measureText("W").width,t=o.measureText("m").width,a--}return 0}})(),Ot=function(f){if(Array.isArray(f)){var o=f.slice();return o.splice(0,2),o}else return[]},zt=function(o){for(var a,l,t=o.length;t;)a=Math.floor(Math.random()*t),l=o[--t],o[t]=o[a],o[a]=l;return o},_={},J=function(o,a){if(!lt)return;var l=Math.floor(Math.random()*Date.now());Array.isArray(o)||(o=[o]),o.forEach(function(c,e){if(typeof c=="string"){if(o[e]=document.getElementById(c),!o[e])throw new Error("The element id specified is not found.")}else if(!c.tagName&&!c.appendChild)throw new Error("You must pass valid HTML elements, or ID of the element.")});var t={list:[],fontFamily:'"Trebuchet MS", "Heiti TC", "微軟正黑體", "Arial Unicode MS", "Droid Fallback Sans", sans-serif',fontWeight:"normal",color:"random-dark",minSize:0,weightFactor:1,clearCanvas:!0,backgroundColor:"#fff",gridSize:8,drawOutOfBound:!1,shrinkToFit:!1,origin:null,drawMask:!1,maskColor:"rgba(255,0,0,0.3)",maskGapWidth:.3,layoutAnimation:!0,wait:0,abortThreshold:0,abort:function(){},minRotation:-Math.PI/2,maxRotation:Math.PI/2,rotationStep:.1,shuffle:!0,rotateRatio:.1,shape:"circle",ellipticity:.65,classes:null,hover:null,click:null};if(a)for(var x in a)x in t&&(t[x]=a[x]);if(typeof t.weightFactor!="function"){var d=t.weightFactor;t.weightFactor=function(e){return e*d}}if(typeof t.shape!="function")switch(t.shape){case"circle":default:t.shape="circle";break;case"cardioid":t.shape=function(e){return 1-Math.sin(e)};break;case"diamond":t.shape=function(e){var i=e%(2*Math.PI/4);return 1/(Math.cos(i)+Math.sin(i))};break;case"square":t.shape=function(e){return Math.min(1/Math.abs(Math.cos(e)),1/Math.abs(Math.sin(e)))};break;case"triangle-forward":t.shape=function(e){var i=e%(2*Math.PI/3);return 1/(Math.cos(i)+Math.sqrt(3)*Math.sin(i))};break;case"triangle":case"triangle-upright":t.shape=function(e){var i=(e+Math.PI*3/2)%(2*Math.PI/3);return 1/(Math.cos(i)+Math.sqrt(3)*Math.sin(i))};break;case"pentagon":t.shape=function(e){var i=(e+.955)%(2*Math.PI/5);return 1/(Math.cos(i)+.726543*Math.sin(i))};break;case"star":t.shape=function(e){var i=(e+.955)%(2*Math.PI/10);return(e+.955)%(2*Math.PI/5)-2*Math.PI/10>=0?1/(Math.cos(2*Math.PI/10-i)+3.07768*Math.sin(2*Math.PI/10-i)):1/(Math.cos(i)+3.07768*Math.sin(i))};break}t.gridSize=Math.max(Math.floor(t.gridSize),4);var r=t.gridSize,T=r-t.maskGapWidth,P=Math.abs(t.maxRotation-t.minRotation),D=Math.min(t.maxRotation,t.minRotation),Y=t.rotationStep,I,C,b,B,F,O,G;function st(c,e){return"hsl("+(Math.random()*360).toFixed()+","+(Math.random()*30+70).toFixed()+"%,"+(Math.random()*(e-c)+c).toFixed()+"%)"}switch(t.color){case"random-dark":G=function(){return st(10,50)};break;case"random-light":G=function(){return st(50,90)};break;default:typeof t.color=="function"&&(G=t.color);break}var Z;typeof t.fontWeight=="function"&&(Z=t.fontWeight);var K=null;typeof t.classes=="function"&&(K=t.classes);var Q=!1,U=[],$,ft=function(e){var i=e.currentTarget,n=i.getBoundingClientRect(),u,s;e.touches?(u=e.touches[0].clientX,s=e.touches[0].clientY):(u=e.clientX,s=e.clientY);var h=u-n.left,S=s-n.top,g=Math.floor(h*(i.width/n.width||1)/r),m=Math.floor(S*(i.height/n.height||1)/r);return U[g]?U[g][m]:null},ut=function(e){var i=ft(e);if($!==i){if($=i,!i){t.hover(void 0,void 0,e);return}t.hover(i.item,i.dimension,e)}},j=function(e){var i=ft(e);i&&(t.click(i.item,i.dimension,e),e.preventDefault())},tt=[],ct=function(e){if(tt[e])return tt[e];var i=e*8,n=i,u=[];for(e===0&&u.push([B[0],B[1],0]);n--;){var s=1;t.shape!=="circle"&&(s=t.shape(n/i*2*Math.PI)),u.push([B[0]+e*s*Math.cos(-n/i*2*Math.PI),B[1]+e*s*Math.sin(-n/i*2*Math.PI)*t.ellipticity,n/i*2*Math.PI])}return tt[e]=u,u},et=function(){return t.abortThreshold>0&&new Date().getTime()-O>t.abortThreshold},vt=function(){return t.rotateRatio===0||Math.random()>t.rotateRatio?0:P===0?D:D+Math.round(Math.random()*P/Y)*Y},gt=function(e,i,n,u){var s=t.weightFactor(i);if(s<=t.minSize)return!1;var h=1;s<ot&&(h=(function(){for(var it=2;it*s<ot;)it+=2;return it})());var S;Z?S=Z(e,i,s,u):S=t.fontWeight;var g=document.createElement("canvas"),m=g.getContext("2d",{willReadFrequently:!0});m.font=S+" "+(s*h).toString(10)+"px "+t.fontFamily;var A=m.measureText(e).width/h,w=Math.max(s*h,m.measureText("m").width,m.measureText("W").width)/h,p=A+w*2,k=w*3,R=Math.ceil(p/r),W=Math.ceil(k/r);p=R*r,k=W*r;var M=-A/2,v=-w*.4,y=Math.ceil((p*Math.abs(Math.sin(n))+k*Math.abs(Math.cos(n)))/r),E=Math.ceil((p*Math.abs(Math.cos(n))+k*Math.abs(Math.sin(n)))/r),z=E*r,q=y*r;g.setAttribute("width",z),g.setAttribute("height",q),m.scale(1/h,1/h),m.translate(z*h/2,q*h/2),m.rotate(-n),m.font=S+" "+(s*h).toString(10)+"px "+t.fontFamily,m.fillStyle="#000",m.textBaseline="middle",m.fillText(e,M*h,(v+s*.5)*h);var V=m.getImageData(0,0,z,q).data;if(et())return!1;for(var dt=[],H=E,X,at,rt,L=[y/2,E/2,y/2,E/2];H--;)for(X=y;X--;){rt=r;t:for(;rt--;)for(at=r;at--;)if(V[((X*r+rt)*z+(H*r+at))*4+3]){dt.push([H,X]),H<L[3]&&(L[3]=H),H>L[1]&&(L[1]=H),X<L[0]&&(L[0]=X),X>L[2]&&(L[2]=X);break t}}return{mu:h,occupied:dt,bounds:L,gw:E,gh:y,fillTextOffsetX:M,fillTextOffsetY:v,fillTextWidth:A,fillTextHeight:w,fontSize:s}},mt=function(e,i,n,u,s){for(var h=s.length;h--;){var S=e+s[h][0],g=i+s[h][1];if(S>=C||g>=b||S<0||g<0){if(!t.drawOutOfBound)return!1;continue}if(!I[S][g])return!1}return!0},wt=function(e,i,n,u,s,h,S,g,m,A){var w=n.fontSize,p;G?p=G(u,s,w,h,S,A):p=t.color;var k;Z?k=Z(u,s,w,A):k=t.fontWeight;var R;K?R=K(u,s,w,A):R=t.classes,o.forEach(function(W){if(W.getContext){var M=W.getContext("2d"),v=n.mu;M.save(),M.scale(1/v,1/v),M.font=k+" "+(w*v).toString(10)+"px "+t.fontFamily,M.fillStyle=p,M.translate((e+n.gw/2)*r*v,(i+n.gh/2)*r*v),g!==0&&M.rotate(-g),M.textBaseline="middle",M.fillText(u,n.fillTextOffsetX*v,(n.fillTextOffsetY+w*.5)*v),M.restore()}else{var y=document.createElement("span"),E="";E="rotate("+-g/Math.PI*180+"deg) ",n.mu!==1&&(E+="translateX(-"+n.fillTextWidth/4+"px) scale("+1/n.mu+")");var z={position:"absolute",display:"block",font:k+" "+w*n.mu+"px "+t.fontFamily,left:(e+n.gw/2)*r+n.fillTextOffsetX+"px",top:(i+n.gh/2)*r+n.fillTextOffsetY+"px",width:n.fillTextWidth+"px",height:n.fillTextHeight+"px",lineHeight:w+"px",whiteSpace:"nowrap",transform:E,webkitTransform:E,msTransform:E,transformOrigin:"50% 40%",webkitTransformOrigin:"50% 40%",msTransformOrigin:"50% 40%"};p&&(z.color=p),y.textContent=u;for(var q in z)y.style[q]=z[q];if(m)for(var V in m)y.setAttribute(V,m[V]);R&&(y.className+=R),W.appendChild(y)}})},pt=function(e,i,n,u,s){if(!(e>=C||i>=b||e<0||i<0)){if(I[e][i]=!1,n){var h=o[0].getContext("2d");h.fillRect(e*r,i*r,T,T)}Q&&(U[e][i]={item:s,dimension:u})}},xt=function(e,i,n,u,s,h){var S=s.occupied,g=t.drawMask,m;g&&(m=o[0].getContext("2d"),m.save(),m.fillStyle=t.maskColor);var A;if(Q){var w=s.bounds;A={x:(e+w[3])*r,y:(i+w[0])*r,w:(w[1]-w[3]+1)*r,h:(w[2]-w[0]+1)*r}}for(var p=S.length;p--;){var k=e+S[p][0],R=i+S[p][1];k>=C||R>=b||k<0||R<0||pt(k,R,g,A,h)}g&&m.restore()},yt=function c(e,i){if(i>20)return null;var n,u,s;Array.isArray(e)?(n=e[0],u=e[1]):(n=e.word,u=e.weight,s=e.attributes);var h=vt(),S=Ot(e),g=gt(n,u,h,S);if(!g||et())return!1;if(!t.drawOutOfBound&&!t.shrinkToFit){var m=g.bounds;if(m[1]-m[3]+1>C||m[2]-m[0]+1>b)return!1}for(var A=F+1,w=function(W){var M=Math.floor(W[0]-g.gw/2),v=Math.floor(W[1]-g.gh/2),y=g.gw,E=g.gh;return mt(M,v,y,E,g.occupied)?(wt(M,v,g,n,u,F-A,W[2],h,s,S),xt(M,v,y,E,g,e),{gx:M,gy:v,rot:h,info:g}):!1};A--;){var p=ct(F-A);t.shuffle&&(p=[].concat(p),zt(p));for(var k=0;k<p.length;k++){var R=w(p[k]);if(R)return R}}return t.shrinkToFit?(Array.isArray(e)?e[1]=e[1]*3/4:e.weight=e.weight*3/4,c(e,i+1)):null},N=function(e,i,n){if(i)return!o.some(function(u){var s=new CustomEvent(e,{detail:n||{}});return!u.dispatchEvent(s)},this);o.forEach(function(u){var s=new CustomEvent(e,{detail:n||{}});u.dispatchEvent(s)},this)},St=function(){var e=o[0];if(e.getContext)C=Math.ceil(e.width/r),b=Math.ceil(e.height/r);else{var i=e.getBoundingClientRect();C=Math.ceil(i.width/r),b=Math.ceil(i.height/r)}if(N("wordcloudstart",!0)){B=t.origin?[t.origin[0]/r,t.origin[1]/r]:[C/2,b/2],F=Math.floor(Math.sqrt(C*C+b*b)),I=[];var n,u,s;if(!e.getContext||t.clearCanvas)for(o.forEach(function(v){if(v.getContext){var y=v.getContext("2d");y.fillStyle=t.backgroundColor,y.clearRect(0,0,C*(r+1),b*(r+1)),y.fillRect(0,0,C*(r+1),b*(r+1))}else v.textContent="",v.style.backgroundColor=t.backgroundColor,v.style.position="relative"}),n=C;n--;)for(I[n]=[],u=b;u--;)I[n][u]=!0;else{var h=document.createElement("canvas").getContext("2d");h.fillStyle=t.backgroundColor,h.fillRect(0,0,1,1);var S=h.getImageData(0,0,1,1).data,g=e.getContext("2d").getImageData(0,0,C*r,b*r).data;n=C;for(var m,A;n--;)for(I[n]=[],u=b;u--;){A=r;t:for(;A--;)for(m=r;m--;)for(s=4;s--;)if(g[((u*r+A)*C*r+(n*r+m))*4+s]!==S[s]){I[n][u]=!1;break t}I[n][u]!==!1&&(I[n][u]=!0)}g=h=S=void 0}if(t.hover||t.click){for(Q=!0,n=C+1;n--;)U[n]=[];t.hover&&e.addEventListener("mousemove",ut),t.click&&(e.addEventListener("click",j),e.addEventListener("touchstart",j),e.addEventListener("touchend",function(v){v.preventDefault()}),e.style.webkitTapHighlightColor="rgba(0, 0, 0, 0)"),e.addEventListener("wordcloudstart",function v(){e.removeEventListener("wordcloudstart",v),e.removeEventListener("mousemove",ut),e.removeEventListener("click",j),$=void 0})}s=0;var w,p,k=!0;t.layoutAnimation?t.wait!==0?(w=window.setTimeout,p=window.clearTimeout):(w=window.setImmediate,p=window.clearImmediate):(w=function(v){v()},p=function(){k=!1});var R=function(y,E){o.forEach(function(z){z.addEventListener(y,E)},this)},W=function(y,E){o.forEach(function(z){z.removeEventListener(y,E)},this)},M=function v(){W("wordcloudstart",v),p(_[l])};R("wordcloudstart",M),_[l]=(t.layoutAnimation?w:setTimeout)(function v(){if(k){if(s>=t.list.length){p(_[l]),N("wordcloudstop",!1),W("wordcloudstart",M),delete _[l];return}O=new Date().getTime();var y=yt(t.list[s],0),E=!N("wordclouddrawn",!0,{item:t.list[s],drawn:y});if(et()||E){p(_[l]),t.abort(),N("wordcloudabort",!1),N("wordcloudstop",!1),W("wordcloudstart",M);return}s++,_[l]=w(v,t.wait)}},t.wait)}};St()};J.isSupported=lt;J.minFontSize=ot;if(!J.isSupported)throw new Error("Sorry your browser not support wordCloud");function Dt(f){for(var o=f.getContext("2d"),a=o.getImageData(0,0,f.width,f.height),l=o.createImageData(a),t=0,x=0,d=0;d<a.data.length;d+=4){var r=a.data[d+3];if(r>128){var T=a.data[d]+a.data[d+1]+a.data[d+2];t+=T,++x}}for(var P=t/x,d=0;d<a.data.length;d+=4){var T=a.data[d]+a.data[d+1]+a.data[d+2],r=a.data[d+3];r<128||T>P?(l.data[d]=0,l.data[d+1]=0,l.data[d+2]=0,l.data[d+3]=0):(l.data[d]=255,l.data[d+1]=255,l.data[d+2]=255,l.data[d+3]=255)}o.putImageData(l,0,0)}Et(function(f,o){f.eachSeriesByType("wordCloud",function(a){var l=bt(a.getBoxLayoutParams(),{width:o.getWidth(),height:o.getHeight()}),t=a.get("keepAspect"),x=a.get("maskImage"),d=x?x.width/x.height:1;t&&Lt(l,d);var r=a.getData(),T=document.createElement("canvas");T.width=l.width,T.height=l.height;var P=T.getContext("2d");if(x)try{P.drawImage(x,0,0,T.width,T.height),Dt(T)}catch(F){console.error("Invalid mask image"),console.error(F.toString())}var D=a.get("sizeRange"),Y=a.get("rotationRange"),I=r.getDataExtent("value"),C=Math.PI/180,b=a.get("gridSize");J(T,{list:r.mapArray("value",function(F,O){var G=r.getItemModel(O);return[r.getName(O),G.get("textStyle.fontSize",!0)||Ft(F,I,D),O]}).sort(function(F,O){return O[1]-F[1]}),fontFamily:a.get("textStyle.fontFamily")||a.get("emphasis.textStyle.fontFamily")||f.get("textStyle.fontFamily"),fontWeight:a.get("textStyle.fontWeight")||a.get("emphasis.textStyle.fontWeight")||f.get("textStyle.fontWeight"),gridSize:b,ellipticity:l.height/l.width,minRotation:Y[0]*C,maxRotation:Y[1]*C,clearCanvas:!x,rotateRatio:1,rotationStep:a.get("rotationStep")*C,drawOutOfBound:a.get("drawOutOfBound"),shrinkToFit:a.get("shrinkToFit"),layoutAnimation:a.get("layoutAnimation"),shuffle:!1,shape:a.get("shape")});function B(F){var O=F.detail.item;F.detail.drawn&&a.layoutInstance.ondraw&&(F.detail.drawn.gx+=l.x/b,F.detail.drawn.gy+=l.y/b,a.layoutInstance.ondraw(O[0],O[1],O[2],F.detail.drawn))}T.addEventListener("wordclouddrawn",B),a.layoutInstance&&a.layoutInstance.dispose(),a.layoutInstance={ondraw:null,dispose:function(){T.removeEventListener("wordclouddrawn",B),T.addEventListener("wordclouddrawn",function(F){F.preventDefault()})}}})});At(function(f){var o=(f||{}).series;!Wt(o)&&(o=o?[o]:[]);var a=["shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];ht(o,function(t){if(t&&t.type==="wordCloud"){var x=t.textStyle||{};l(x.normal),l(x.emphasis)}});function l(t){t&&ht(a,function(x){t.hasOwnProperty(x)&&(t["text"+Pt(x)]=t[x])})}});function Lt(f,o){var a=f.width,l=f.height;a>l*o?(f.x+=(a-l*o)/2,f.width=l*o):(f.y+=(l-a/o)/2,f.height=a/o)}
1
+ import{e as Tt,c as Mt,S as It,a as Ct,b as nt,d as kt,r as Et,g as bt,l as Ft,f as At,h as Pt}from"./vendor-echarts-B-i_56Av.js";import{a1 as Rt,a as Wt,f as ht}from"./vendor-zrender-5DcYjSZk.js";Tt({type:"series.wordCloud",visualStyleAccessPath:"textStyle",visualStyleMapper:function(f){return{fill:f.get("color")}},visualDrawType:"fill",optionUpdated:function(){var f=this.option;f.gridSize=Math.max(Math.floor(f.gridSize),4)},getInitialData:function(f,o){var a=Mt(f.data,{coordDimensions:["value"]}),l=new It(a,this);return l.initData(f.data),l},defaultOption:{maskImage:null,shape:"circle",keepAspect:!1,left:"center",top:"center",width:"70%",height:"80%",sizeRange:[12,60],rotationRange:[-90,90],rotationStep:45,gridSize:8,drawOutOfBound:!1,shrinkToFit:!1,textStyle:{fontWeight:"normal"}}});Ct({type:"wordCloud",render:function(f,o,a){var l=this.group;l.removeAll();var t=f.getData(),x=f.get("gridSize");f.layoutInstance.ondraw=function(d,r,T,P){var D=t.getItemModel(T),Y=D.getModel("textStyle"),I=new Rt({style:nt(Y),scaleX:1/P.info.mu,scaleY:1/P.info.mu,x:(P.gx+P.info.gw/2)*x,y:(P.gy+P.info.gh/2)*x,rotation:P.rot});I.setStyle({x:P.info.fillTextOffsetX,y:P.info.fillTextOffsetY+r*.5,text:d,verticalAlign:"middle",fill:t.getItemVisual(T,"style").fill,fontSize:r}),l.add(I),t.setItemGraphicEl(T,I),I.ensureState("emphasis").style=nt(D.getModel(["emphasis","textStyle"]),{state:"emphasis"}),I.ensureState("blur").style=nt(D.getModel(["blur","textStyle"]),{state:"blur"}),kt(I,D.get(["emphasis","focus"]),D.get(["emphasis","blurScope"])),I.stateTransition={duration:f.get("animation")?f.get(["stateAnimation","duration"]):0,easing:f.get(["stateAnimation","easing"])},I.__highDownDispatcher=!0},this._model=f},remove:function(){this.group.removeAll(),this._model.layoutInstance.dispose()},dispose:function(){this._model.layoutInstance.dispose()}});window.setImmediate||(window.setImmediate=(function(){return window.msSetImmediate||window.webkitSetImmediate||window.mozSetImmediate||window.oSetImmediate||(function(){if(!window.postMessage||!window.addEventListener)return null;var a=[void 0],l="zero-timeout-message",t=function(d){var r=a.length;return a.push(d),window.postMessage(l+r.toString(36),"*"),r};return window.addEventListener("message",function(d){if(!(typeof d.data!="string"||d.data.substr(0,l.length)!==l)){d.stopImmediatePropagation();var r=parseInt(d.data.substr(l.length),36);a[r]&&(a[r](),a[r]=void 0)}},!0),window.clearImmediate=function(d){a[d]&&(a[d]=void 0)},t})()||function(a){window.setTimeout(a,0)}})());window.clearImmediate||(window.clearImmediate=(function(){return window.msClearImmediate||window.webkitClearImmediate||window.mozClearImmediate||window.oClearImmediate||function(a){window.clearTimeout(a)}})());var lt=(function(){var o=document.createElement("canvas");if(!o||!o.getContext)return!1;var a=o.getContext("2d");return!(!a||!a.getImageData||!a.fillText||!Array.prototype.some||!Array.prototype.push)})(),ot=(function(){if(lt){for(var o=document.createElement("canvas").getContext("2d"),a=20,l,t;a;){if(o.font=a.toString(10)+"px sans-serif",o.measureText("W").width===l&&o.measureText("m").width===t)return a+1;l=o.measureText("W").width,t=o.measureText("m").width,a--}return 0}})(),Ot=function(f){if(Array.isArray(f)){var o=f.slice();return o.splice(0,2),o}else return[]},zt=function(o){for(var a,l,t=o.length;t;)a=Math.floor(Math.random()*t),l=o[--t],o[t]=o[a],o[a]=l;return o},_={},J=function(o,a){if(!lt)return;var l=Math.floor(Math.random()*Date.now());Array.isArray(o)||(o=[o]),o.forEach(function(c,e){if(typeof c=="string"){if(o[e]=document.getElementById(c),!o[e])throw new Error("The element id specified is not found.")}else if(!c.tagName&&!c.appendChild)throw new Error("You must pass valid HTML elements, or ID of the element.")});var t={list:[],fontFamily:'"Trebuchet MS", "Heiti TC", "微軟正黑體", "Arial Unicode MS", "Droid Fallback Sans", sans-serif',fontWeight:"normal",color:"random-dark",minSize:0,weightFactor:1,clearCanvas:!0,backgroundColor:"#fff",gridSize:8,drawOutOfBound:!1,shrinkToFit:!1,origin:null,drawMask:!1,maskColor:"rgba(255,0,0,0.3)",maskGapWidth:.3,layoutAnimation:!0,wait:0,abortThreshold:0,abort:function(){},minRotation:-Math.PI/2,maxRotation:Math.PI/2,rotationStep:.1,shuffle:!0,rotateRatio:.1,shape:"circle",ellipticity:.65,classes:null,hover:null,click:null};if(a)for(var x in a)x in t&&(t[x]=a[x]);if(typeof t.weightFactor!="function"){var d=t.weightFactor;t.weightFactor=function(e){return e*d}}if(typeof t.shape!="function")switch(t.shape){case"circle":default:t.shape="circle";break;case"cardioid":t.shape=function(e){return 1-Math.sin(e)};break;case"diamond":t.shape=function(e){var i=e%(2*Math.PI/4);return 1/(Math.cos(i)+Math.sin(i))};break;case"square":t.shape=function(e){return Math.min(1/Math.abs(Math.cos(e)),1/Math.abs(Math.sin(e)))};break;case"triangle-forward":t.shape=function(e){var i=e%(2*Math.PI/3);return 1/(Math.cos(i)+Math.sqrt(3)*Math.sin(i))};break;case"triangle":case"triangle-upright":t.shape=function(e){var i=(e+Math.PI*3/2)%(2*Math.PI/3);return 1/(Math.cos(i)+Math.sqrt(3)*Math.sin(i))};break;case"pentagon":t.shape=function(e){var i=(e+.955)%(2*Math.PI/5);return 1/(Math.cos(i)+.726543*Math.sin(i))};break;case"star":t.shape=function(e){var i=(e+.955)%(2*Math.PI/10);return(e+.955)%(2*Math.PI/5)-2*Math.PI/10>=0?1/(Math.cos(2*Math.PI/10-i)+3.07768*Math.sin(2*Math.PI/10-i)):1/(Math.cos(i)+3.07768*Math.sin(i))};break}t.gridSize=Math.max(Math.floor(t.gridSize),4);var r=t.gridSize,T=r-t.maskGapWidth,P=Math.abs(t.maxRotation-t.minRotation),D=Math.min(t.maxRotation,t.minRotation),Y=t.rotationStep,I,C,b,B,F,O,G;function st(c,e){return"hsl("+(Math.random()*360).toFixed()+","+(Math.random()*30+70).toFixed()+"%,"+(Math.random()*(e-c)+c).toFixed()+"%)"}switch(t.color){case"random-dark":G=function(){return st(10,50)};break;case"random-light":G=function(){return st(50,90)};break;default:typeof t.color=="function"&&(G=t.color);break}var Z;typeof t.fontWeight=="function"&&(Z=t.fontWeight);var K=null;typeof t.classes=="function"&&(K=t.classes);var Q=!1,U=[],$,ft=function(e){var i=e.currentTarget,n=i.getBoundingClientRect(),u,s;e.touches?(u=e.touches[0].clientX,s=e.touches[0].clientY):(u=e.clientX,s=e.clientY);var h=u-n.left,S=s-n.top,g=Math.floor(h*(i.width/n.width||1)/r),m=Math.floor(S*(i.height/n.height||1)/r);return U[g]?U[g][m]:null},ut=function(e){var i=ft(e);if($!==i){if($=i,!i){t.hover(void 0,void 0,e);return}t.hover(i.item,i.dimension,e)}},j=function(e){var i=ft(e);i&&(t.click(i.item,i.dimension,e),e.preventDefault())},tt=[],ct=function(e){if(tt[e])return tt[e];var i=e*8,n=i,u=[];for(e===0&&u.push([B[0],B[1],0]);n--;){var s=1;t.shape!=="circle"&&(s=t.shape(n/i*2*Math.PI)),u.push([B[0]+e*s*Math.cos(-n/i*2*Math.PI),B[1]+e*s*Math.sin(-n/i*2*Math.PI)*t.ellipticity,n/i*2*Math.PI])}return tt[e]=u,u},et=function(){return t.abortThreshold>0&&new Date().getTime()-O>t.abortThreshold},vt=function(){return t.rotateRatio===0||Math.random()>t.rotateRatio?0:P===0?D:D+Math.round(Math.random()*P/Y)*Y},gt=function(e,i,n,u){var s=t.weightFactor(i);if(s<=t.minSize)return!1;var h=1;s<ot&&(h=(function(){for(var it=2;it*s<ot;)it+=2;return it})());var S;Z?S=Z(e,i,s,u):S=t.fontWeight;var g=document.createElement("canvas"),m=g.getContext("2d",{willReadFrequently:!0});m.font=S+" "+(s*h).toString(10)+"px "+t.fontFamily;var A=m.measureText(e).width/h,w=Math.max(s*h,m.measureText("m").width,m.measureText("W").width)/h,p=A+w*2,k=w*3,R=Math.ceil(p/r),W=Math.ceil(k/r);p=R*r,k=W*r;var M=-A/2,v=-w*.4,y=Math.ceil((p*Math.abs(Math.sin(n))+k*Math.abs(Math.cos(n)))/r),E=Math.ceil((p*Math.abs(Math.cos(n))+k*Math.abs(Math.sin(n)))/r),z=E*r,q=y*r;g.setAttribute("width",z),g.setAttribute("height",q),m.scale(1/h,1/h),m.translate(z*h/2,q*h/2),m.rotate(-n),m.font=S+" "+(s*h).toString(10)+"px "+t.fontFamily,m.fillStyle="#000",m.textBaseline="middle",m.fillText(e,M*h,(v+s*.5)*h);var V=m.getImageData(0,0,z,q).data;if(et())return!1;for(var dt=[],H=E,X,at,rt,L=[y/2,E/2,y/2,E/2];H--;)for(X=y;X--;){rt=r;t:for(;rt--;)for(at=r;at--;)if(V[((X*r+rt)*z+(H*r+at))*4+3]){dt.push([H,X]),H<L[3]&&(L[3]=H),H>L[1]&&(L[1]=H),X<L[0]&&(L[0]=X),X>L[2]&&(L[2]=X);break t}}return{mu:h,occupied:dt,bounds:L,gw:E,gh:y,fillTextOffsetX:M,fillTextOffsetY:v,fillTextWidth:A,fillTextHeight:w,fontSize:s}},mt=function(e,i,n,u,s){for(var h=s.length;h--;){var S=e+s[h][0],g=i+s[h][1];if(S>=C||g>=b||S<0||g<0){if(!t.drawOutOfBound)return!1;continue}if(!I[S][g])return!1}return!0},wt=function(e,i,n,u,s,h,S,g,m,A){var w=n.fontSize,p;G?p=G(u,s,w,h,S,A):p=t.color;var k;Z?k=Z(u,s,w,A):k=t.fontWeight;var R;K?R=K(u,s,w,A):R=t.classes,o.forEach(function(W){if(W.getContext){var M=W.getContext("2d"),v=n.mu;M.save(),M.scale(1/v,1/v),M.font=k+" "+(w*v).toString(10)+"px "+t.fontFamily,M.fillStyle=p,M.translate((e+n.gw/2)*r*v,(i+n.gh/2)*r*v),g!==0&&M.rotate(-g),M.textBaseline="middle",M.fillText(u,n.fillTextOffsetX*v,(n.fillTextOffsetY+w*.5)*v),M.restore()}else{var y=document.createElement("span"),E="";E="rotate("+-g/Math.PI*180+"deg) ",n.mu!==1&&(E+="translateX(-"+n.fillTextWidth/4+"px) scale("+1/n.mu+")");var z={position:"absolute",display:"block",font:k+" "+w*n.mu+"px "+t.fontFamily,left:(e+n.gw/2)*r+n.fillTextOffsetX+"px",top:(i+n.gh/2)*r+n.fillTextOffsetY+"px",width:n.fillTextWidth+"px",height:n.fillTextHeight+"px",lineHeight:w+"px",whiteSpace:"nowrap",transform:E,webkitTransform:E,msTransform:E,transformOrigin:"50% 40%",webkitTransformOrigin:"50% 40%",msTransformOrigin:"50% 40%"};p&&(z.color=p),y.textContent=u;for(var q in z)y.style[q]=z[q];if(m)for(var V in m)y.setAttribute(V,m[V]);R&&(y.className+=R),W.appendChild(y)}})},pt=function(e,i,n,u,s){if(!(e>=C||i>=b||e<0||i<0)){if(I[e][i]=!1,n){var h=o[0].getContext("2d");h.fillRect(e*r,i*r,T,T)}Q&&(U[e][i]={item:s,dimension:u})}},xt=function(e,i,n,u,s,h){var S=s.occupied,g=t.drawMask,m;g&&(m=o[0].getContext("2d"),m.save(),m.fillStyle=t.maskColor);var A;if(Q){var w=s.bounds;A={x:(e+w[3])*r,y:(i+w[0])*r,w:(w[1]-w[3]+1)*r,h:(w[2]-w[0]+1)*r}}for(var p=S.length;p--;){var k=e+S[p][0],R=i+S[p][1];k>=C||R>=b||k<0||R<0||pt(k,R,g,A,h)}g&&m.restore()},yt=function c(e,i){if(i>20)return null;var n,u,s;Array.isArray(e)?(n=e[0],u=e[1]):(n=e.word,u=e.weight,s=e.attributes);var h=vt(),S=Ot(e),g=gt(n,u,h,S);if(!g||et())return!1;if(!t.drawOutOfBound&&!t.shrinkToFit){var m=g.bounds;if(m[1]-m[3]+1>C||m[2]-m[0]+1>b)return!1}for(var A=F+1,w=function(W){var M=Math.floor(W[0]-g.gw/2),v=Math.floor(W[1]-g.gh/2),y=g.gw,E=g.gh;return mt(M,v,y,E,g.occupied)?(wt(M,v,g,n,u,F-A,W[2],h,s,S),xt(M,v,y,E,g,e),{gx:M,gy:v,rot:h,info:g}):!1};A--;){var p=ct(F-A);t.shuffle&&(p=[].concat(p),zt(p));for(var k=0;k<p.length;k++){var R=w(p[k]);if(R)return R}}return t.shrinkToFit?(Array.isArray(e)?e[1]=e[1]*3/4:e.weight=e.weight*3/4,c(e,i+1)):null},N=function(e,i,n){if(i)return!o.some(function(u){var s=new CustomEvent(e,{detail:n||{}});return!u.dispatchEvent(s)},this);o.forEach(function(u){var s=new CustomEvent(e,{detail:n||{}});u.dispatchEvent(s)},this)},St=function(){var e=o[0];if(e.getContext)C=Math.ceil(e.width/r),b=Math.ceil(e.height/r);else{var i=e.getBoundingClientRect();C=Math.ceil(i.width/r),b=Math.ceil(i.height/r)}if(N("wordcloudstart",!0)){B=t.origin?[t.origin[0]/r,t.origin[1]/r]:[C/2,b/2],F=Math.floor(Math.sqrt(C*C+b*b)),I=[];var n,u,s;if(!e.getContext||t.clearCanvas)for(o.forEach(function(v){if(v.getContext){var y=v.getContext("2d");y.fillStyle=t.backgroundColor,y.clearRect(0,0,C*(r+1),b*(r+1)),y.fillRect(0,0,C*(r+1),b*(r+1))}else v.textContent="",v.style.backgroundColor=t.backgroundColor,v.style.position="relative"}),n=C;n--;)for(I[n]=[],u=b;u--;)I[n][u]=!0;else{var h=document.createElement("canvas").getContext("2d");h.fillStyle=t.backgroundColor,h.fillRect(0,0,1,1);var S=h.getImageData(0,0,1,1).data,g=e.getContext("2d").getImageData(0,0,C*r,b*r).data;n=C;for(var m,A;n--;)for(I[n]=[],u=b;u--;){A=r;t:for(;A--;)for(m=r;m--;)for(s=4;s--;)if(g[((u*r+A)*C*r+(n*r+m))*4+s]!==S[s]){I[n][u]=!1;break t}I[n][u]!==!1&&(I[n][u]=!0)}g=h=S=void 0}if(t.hover||t.click){for(Q=!0,n=C+1;n--;)U[n]=[];t.hover&&e.addEventListener("mousemove",ut),t.click&&(e.addEventListener("click",j),e.addEventListener("touchstart",j),e.addEventListener("touchend",function(v){v.preventDefault()}),e.style.webkitTapHighlightColor="rgba(0, 0, 0, 0)"),e.addEventListener("wordcloudstart",function v(){e.removeEventListener("wordcloudstart",v),e.removeEventListener("mousemove",ut),e.removeEventListener("click",j),$=void 0})}s=0;var w,p,k=!0;t.layoutAnimation?t.wait!==0?(w=window.setTimeout,p=window.clearTimeout):(w=window.setImmediate,p=window.clearImmediate):(w=function(v){v()},p=function(){k=!1});var R=function(y,E){o.forEach(function(z){z.addEventListener(y,E)},this)},W=function(y,E){o.forEach(function(z){z.removeEventListener(y,E)},this)},M=function v(){W("wordcloudstart",v),p(_[l])};R("wordcloudstart",M),_[l]=(t.layoutAnimation?w:setTimeout)(function v(){if(k){if(s>=t.list.length){p(_[l]),N("wordcloudstop",!1),W("wordcloudstart",M),delete _[l];return}O=new Date().getTime();var y=yt(t.list[s],0),E=!N("wordclouddrawn",!0,{item:t.list[s],drawn:y});if(et()||E){p(_[l]),t.abort(),N("wordcloudabort",!1),N("wordcloudstop",!1),W("wordcloudstart",M);return}s++,_[l]=w(v,t.wait)}},t.wait)}};St()};J.isSupported=lt;J.minFontSize=ot;if(!J.isSupported)throw new Error("Sorry your browser not support wordCloud");function Dt(f){for(var o=f.getContext("2d"),a=o.getImageData(0,0,f.width,f.height),l=o.createImageData(a),t=0,x=0,d=0;d<a.data.length;d+=4){var r=a.data[d+3];if(r>128){var T=a.data[d]+a.data[d+1]+a.data[d+2];t+=T,++x}}for(var P=t/x,d=0;d<a.data.length;d+=4){var T=a.data[d]+a.data[d+1]+a.data[d+2],r=a.data[d+3];r<128||T>P?(l.data[d]=0,l.data[d+1]=0,l.data[d+2]=0,l.data[d+3]=0):(l.data[d]=255,l.data[d+1]=255,l.data[d+2]=255,l.data[d+3]=255)}o.putImageData(l,0,0)}Et(function(f,o){f.eachSeriesByType("wordCloud",function(a){var l=bt(a.getBoxLayoutParams(),{width:o.getWidth(),height:o.getHeight()}),t=a.get("keepAspect"),x=a.get("maskImage"),d=x?x.width/x.height:1;t&&Lt(l,d);var r=a.getData(),T=document.createElement("canvas");T.width=l.width,T.height=l.height;var P=T.getContext("2d");if(x)try{P.drawImage(x,0,0,T.width,T.height),Dt(T)}catch(F){console.error("Invalid mask image"),console.error(F.toString())}var D=a.get("sizeRange"),Y=a.get("rotationRange"),I=r.getDataExtent("value"),C=Math.PI/180,b=a.get("gridSize");J(T,{list:r.mapArray("value",function(F,O){var G=r.getItemModel(O);return[r.getName(O),G.get("textStyle.fontSize",!0)||Ft(F,I,D),O]}).sort(function(F,O){return O[1]-F[1]}),fontFamily:a.get("textStyle.fontFamily")||a.get("emphasis.textStyle.fontFamily")||f.get("textStyle.fontFamily"),fontWeight:a.get("textStyle.fontWeight")||a.get("emphasis.textStyle.fontWeight")||f.get("textStyle.fontWeight"),gridSize:b,ellipticity:l.height/l.width,minRotation:Y[0]*C,maxRotation:Y[1]*C,clearCanvas:!x,rotateRatio:1,rotationStep:a.get("rotationStep")*C,drawOutOfBound:a.get("drawOutOfBound"),shrinkToFit:a.get("shrinkToFit"),layoutAnimation:a.get("layoutAnimation"),shuffle:!1,shape:a.get("shape")});function B(F){var O=F.detail.item;F.detail.drawn&&a.layoutInstance.ondraw&&(F.detail.drawn.gx+=l.x/b,F.detail.drawn.gy+=l.y/b,a.layoutInstance.ondraw(O[0],O[1],O[2],F.detail.drawn))}T.addEventListener("wordclouddrawn",B),a.layoutInstance&&a.layoutInstance.dispose(),a.layoutInstance={ondraw:null,dispose:function(){T.removeEventListener("wordclouddrawn",B),T.addEventListener("wordclouddrawn",function(F){F.preventDefault()})}}})});At(function(f){var o=(f||{}).series;!Wt(o)&&(o=o?[o]:[]);var a=["shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];ht(o,function(t){if(t&&t.type==="wordCloud"){var x=t.textStyle||{};l(x.normal),l(x.emphasis)}});function l(t){t&&ht(a,function(x){t.hasOwnProperty(x)&&(t["text"+Pt(x)]=t[x])})}});function Lt(f,o){var a=f.width,l=f.height;a>l*o?(f.x+=(a-l*o)/2,f.width=l*o):(f.y+=(l-a/o)/2,f.height=a/o)}