kline-charts-react 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +388 -0
  3. package/dist/KLineChart.d.ts +5 -0
  4. package/dist/components/IndicatorDisplay/IndicatorDisplay.d.ts +12 -0
  5. package/dist/components/IndicatorDisplay/index.d.ts +1 -0
  6. package/dist/components/IndicatorSelector/IndicatorSelector.d.ts +12 -0
  7. package/dist/components/IndicatorSelector/index.d.ts +1 -0
  8. package/dist/components/Loading/Loading.d.ts +8 -0
  9. package/dist/components/Loading/index.d.ts +1 -0
  10. package/dist/components/MADisplay/MADisplay.d.ts +10 -0
  11. package/dist/components/MADisplay/index.d.ts +1 -0
  12. package/dist/components/PeriodSelector/PeriodSelector.d.ts +10 -0
  13. package/dist/components/PeriodSelector/index.d.ts +1 -0
  14. package/dist/components/SubPaneTitle/SubPaneTitle.d.ts +13 -0
  15. package/dist/components/SubPaneTitle/index.d.ts +1 -0
  16. package/dist/components/Toolbar/Toolbar.d.ts +20 -0
  17. package/dist/components/Toolbar/index.d.ts +1 -0
  18. package/dist/components/index.d.ts +7 -0
  19. package/dist/hooks/index.d.ts +3 -0
  20. package/dist/hooks/useEcharts.d.ts +26 -0
  21. package/dist/hooks/useKlineData.d.ts +24 -0
  22. package/dist/hooks/useZoomHistory.d.ts +18 -0
  23. package/dist/index.cjs +51 -0
  24. package/dist/index.d.ts +7 -0
  25. package/dist/index.js +26563 -0
  26. package/dist/index.umd.js +51 -0
  27. package/dist/kline-charts-react.css +1 -0
  28. package/dist/types/data.d.ts +207 -0
  29. package/dist/types/index.d.ts +3 -0
  30. package/dist/types/props.d.ts +279 -0
  31. package/dist/types/theme.d.ts +47 -0
  32. package/dist/utils/cache.d.ts +56 -0
  33. package/dist/utils/formatters.d.ts +115 -0
  34. package/dist/utils/index.d.ts +5 -0
  35. package/dist/utils/indicators.d.ts +109 -0
  36. package/dist/utils/optionBuilder.d.ts +32 -0
  37. package/dist/utils/timelineBuilder.d.ts +11 -0
  38. package/package.json +95 -0
@@ -0,0 +1,51 @@
1
+ (function(rt,R){typeof exports=="object"&&typeof module<"u"?R(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],R):(rt=typeof globalThis<"u"?globalThis:rt||self,R(rt.KLineCharts={},rt.jsxRuntime,rt.React))})(this,(function(rt,R,H){"use strict";var dk=Object.defineProperty;var pk=(rt,R,H)=>R in rt?dk(rt,R,{enumerable:!0,configurable:!0,writable:!0,value:H}):rt[R]=H;var Hc=(rt,R,H)=>pk(rt,typeof R!="symbol"?R+"":R,H);const Ll={backgroundColor:"#ffffff",textColor:"#333333",textColorSecondary:"#999999",gridLineColor:"#e0e0e0",upColor:"#f5222d",downColor:"#52c41a",maColors:["#f5a623","#1890ff","#722ed1","#13c2c2","#eb2f96","#faad14","#a0d911"],volumeUpColor:"#f5222d",volumeDownColor:"#52c41a",crosshairColor:"#999999",tooltipBgColor:"rgba(255,255,255,0.96)",tooltipBorderColor:"#e0e0e0",splitLineColor:"#f0f0f0",areaColor:"rgba(24,144,255,0.1)",activeColor:"#1890ff"},Wc={backgroundColor:"#1a1a1a",textColor:"#d1d1d1",textColorSecondary:"#666666",gridLineColor:"#333333",upColor:"#f5222d",downColor:"#52c41a",maColors:["#f5a623","#1890ff","#722ed1","#13c2c2","#eb2f96","#faad14","#a0d911"],volumeUpColor:"#f5222d",volumeDownColor:"#52c41a",crosshairColor:"#666666",tooltipBgColor:"rgba(30,30,30,0.96)",tooltipBorderColor:"#333333",splitLineColor:"#2a2a2a",areaColor:"rgba(24,144,255,0.15)",activeColor:"#1890ff"};function Gc(r){return typeof r=="string"?r==="dark"?Wc:Ll:{...Ll,...r}}var k1=Object.defineProperty,$c=(r,t)=>{for(var e in t)k1(r,e,{get:t[e],enumerable:!0})};function R1(r){return new TextDecoder("gbk").decode(r)}function O1(r){let t=r.split(";").map(n=>n.trim()).filter(Boolean),e=[];for(let n of t){let i=n.indexOf("=");if(i<0)continue;let a=n.slice(0,i).trim();a.startsWith("v_")&&(a=a.slice(2));let o=n.slice(i+1).trim();o.startsWith('"')&&o.endsWith('"')&&(o=o.slice(1,-1));let s=o.split("~");e.push({key:a,fields:s})}return e}function Y(r){if(!r||r==="")return 0;let t=parseFloat(r);return Number.isNaN(t)?0:t}function St(r){if(!r||r==="")return null;let t=parseFloat(r);return Number.isNaN(t)?null:t}function ft(r){if(!r||r===""||r==="-")return null;let t=parseFloat(r);return Number.isNaN(t)?null:t}function Et(r){return r==null?null:ft(String(r))}var N1="https://qt.gtimg.cn",B1="https://web.ifzq.gtimg.cn/appstock/app/minute/query",F1="https://assets.linkdiary.cn/shares/zh_a_list.json",z1="https://assets.linkdiary.cn/shares/us_list.json",V1="https://assets.linkdiary.cn/shares/hk_list.json",H1="https://assets.linkdiary.cn/shares/trade-data-list.txt",Uc="https://push2his.eastmoney.com/api/qt/stock/kline/get",W1="https://push2his.eastmoney.com/api/qt/stock/trends2/get",G1="https://33.push2his.eastmoney.com/api/qt/stock/kline/get",$1="https://63.push2his.eastmoney.com/api/qt/stock/kline/get",U1="https://17.push2.eastmoney.com/api/qt/clist/get",Y1="https://91.push2.eastmoney.com/api/qt/stock/get",Z1="https://29.push2.eastmoney.com/api/qt/clist/get",X1="https://7.push2his.eastmoney.com/api/qt/stock/kline/get",q1="https://push2his.eastmoney.com/api/qt/stock/trends2/get",K1="https://79.push2.eastmoney.com/api/qt/clist/get",j1="https://91.push2.eastmoney.com/api/qt/stock/get",Q1="https://29.push2.eastmoney.com/api/qt/clist/get",J1="https://91.push2his.eastmoney.com/api/qt/stock/kline/get",tw="https://push2his.eastmoney.com/api/qt/stock/trends2/get",ew="https://datacenter-web.eastmoney.com/api/data/v1/get",rw=3e4,Pl=500,kl=500,Rl=7,nw=3,iw=1e3,aw=3e4,ow=2,sw=[408,429,500,502,503,504],lw=class{constructor(r={}){let t=r.requestsPerSecond??5;this.maxTokens=r.maxBurst??t,this.tokens=this.maxTokens,this.refillRate=t/1e3,this.lastRefillTime=Date.now()}refill(){let r=Date.now(),t=(r-this.lastRefillTime)*this.refillRate;this.tokens=Math.min(this.maxTokens,this.tokens+t),this.lastRefillTime=r}tryAcquire(){return this.refill(),this.tokens>=1?(this.tokens-=1,!0):!1}getWaitTime(){if(this.refill(),this.tokens>=1)return 0;let r=1-this.tokens;return Math.ceil(r/this.refillRate)}async acquire(){let r=this.getWaitTime();r>0&&await this.sleep(r),this.refill(),this.tokens-=1}sleep(r){return new Promise(t=>setTimeout(t,r))}getAvailableTokens(){return this.refill(),this.tokens}},Yc=["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1 Safari/605.1.15","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0"],Ol=0;function uw(){return typeof window<"u"&&typeof window.document<"u"}function fw(){if(uw())return;let r=Yc[Ol];return Ol=(Ol+1)%Yc.length,r}var Zc=class extends Error{constructor(r="Circuit breaker is OPEN"){super(r),this.name="CircuitBreakerError"}},hw=class{constructor(r={}){this.state="CLOSED",this.failureCount=0,this.lastFailureTime=0,this.halfOpenSuccessCount=0,this.failureThreshold=r.failureThreshold??5,this.resetTimeout=r.resetTimeout??3e4,this.halfOpenRequests=r.halfOpenRequests??1,this.onStateChange=r.onStateChange}getState(){return this.checkStateTransition(),this.state}canRequest(){switch(this.checkStateTransition(),this.state){case"CLOSED":return!0;case"OPEN":return!1;case"HALF_OPEN":return this.halfOpenSuccessCount<this.halfOpenRequests}}recordSuccess(){this.checkStateTransition(),this.state==="HALF_OPEN"?(this.halfOpenSuccessCount++,this.halfOpenSuccessCount>=this.halfOpenRequests&&this.transitionTo("CLOSED")):this.state==="CLOSED"&&(this.failureCount=0)}recordFailure(){this.lastFailureTime=Date.now(),this.state==="HALF_OPEN"?this.transitionTo("OPEN"):this.state==="CLOSED"&&(this.failureCount++,this.failureCount>=this.failureThreshold&&this.transitionTo("OPEN"))}checkStateTransition(){this.state==="OPEN"&&Date.now()-this.lastFailureTime>=this.resetTimeout&&this.transitionTo("HALF_OPEN")}transitionTo(r){var e;if(this.state===r)return;let t=this.state;this.state=r,r==="CLOSED"?(this.failureCount=0,this.halfOpenSuccessCount=0):r==="HALF_OPEN"&&(this.halfOpenSuccessCount=0),(e=this.onStateChange)==null||e.call(this,t,r)}reset(){this.transitionTo("CLOSED"),this.failureCount=0,this.halfOpenSuccessCount=0,this.lastFailureTime=0}async execute(r){if(!this.canRequest())throw new Zc;try{let t=await r();return this.recordSuccess(),t}catch(t){throw this.recordFailure(),t}}getStats(){return{state:this.getState(),failureCount:this.failureCount,lastFailureTime:this.lastFailureTime,halfOpenSuccessCount:this.halfOpenSuccessCount}}},Xc=class extends Error{constructor(r,t,e,n){let i=t?` ${t}`:"",a=e?`, url: ${e}`:"",o=n?`, provider: ${n}`:"";super(`HTTP error! status: ${r}${i}${a}${o}`),this.status=r,this.statusText=t,this.url=e,this.provider=n,this.name="HttpError"}},cw=class{constructor(r={}){this.baseUrl=r.baseUrl??N1,this.timeout=r.timeout??rw,this.retryOptions=this.resolveRetryOptions(r.retry),this.headers={...r.headers??{}},this.rotateUserAgent=r.rotateUserAgent??!1,this.rateLimiter=r.rateLimit?new lw(r.rateLimit):null,this.circuitBreaker=r.circuitBreaker?new hw(r.circuitBreaker):null,r.userAgent&&(Object.keys(this.headers).some(t=>t.toLowerCase()==="user-agent")||(this.headers["User-Agent"]=r.userAgent))}resolveRetryOptions(r){return{maxRetries:(r==null?void 0:r.maxRetries)??nw,baseDelay:(r==null?void 0:r.baseDelay)??iw,maxDelay:(r==null?void 0:r.maxDelay)??aw,backoffMultiplier:(r==null?void 0:r.backoffMultiplier)??ow,retryableStatusCodes:(r==null?void 0:r.retryableStatusCodes)??sw,retryOnNetworkError:(r==null?void 0:r.retryOnNetworkError)??!0,retryOnTimeout:(r==null?void 0:r.retryOnTimeout)??!0,onRetry:r==null?void 0:r.onRetry}}inferProvider(r){try{let t=new URL(r).hostname;if(t.includes("eastmoney.com"))return"eastmoney";if(t.includes("gtimg.cn"))return"tencent";if(t.includes("linkdiary.cn"))return"linkdiary"}catch{return}}getTimeout(){return this.timeout}calculateDelay(r){return Math.min(this.retryOptions.baseDelay*Math.pow(this.retryOptions.backoffMultiplier,r),this.retryOptions.maxDelay)+Math.random()*100}sleep(r){return new Promise(t=>setTimeout(t,r))}shouldRetry(r,t){return t>=this.retryOptions.maxRetries?!1:r instanceof DOMException&&r.name==="AbortError"?this.retryOptions.retryOnTimeout:r instanceof TypeError?this.retryOptions.retryOnNetworkError:r instanceof Xc?this.retryOptions.retryableStatusCodes.includes(r.status):!1}async executeWithRetry(r,t=0){var e,n;try{let i=await r();return(e=this.circuitBreaker)==null||e.recordSuccess(),i}catch(i){if(this.shouldRetry(i,t)){let a=this.calculateDelay(t);return this.retryOptions.onRetry&&i instanceof Error&&this.retryOptions.onRetry(t+1,i,a),await this.sleep(a),this.executeWithRetry(r,t+1)}throw(n=this.circuitBreaker)==null||n.recordFailure(),i}}async get(r,t={}){if(this.circuitBreaker&&!this.circuitBreaker.canRequest())throw new Zc("Circuit breaker is OPEN, request rejected");return this.rateLimiter&&await this.rateLimiter.acquire(),this.executeWithRetry(async()=>{let e=new AbortController,n=setTimeout(()=>e.abort(),this.timeout),i=this.inferProvider(r),a={...this.headers};if(this.rotateUserAgent){let o=fw();o&&(a["User-Agent"]=o)}try{let o=await fetch(r,{signal:e.signal,headers:a});if(!o.ok)throw new Xc(o.status,o.statusText,r,i);switch(t.responseType){case"json":return await o.json();case"arraybuffer":return await o.arrayBuffer();default:return await o.text()}}catch(o){throw o instanceof Error&&(o.url=r,o.provider=i),o}finally{clearTimeout(n)}})}async getTencentQuote(r){let t=`${this.baseUrl}/?q=${encodeURIComponent(r)}`,e=await this.get(t,{responseType:"arraybuffer"}),n=R1(e);return O1(n)}},vw=new Set(["daily","weekly","monthly"]),dw=new Set(["1","5","15","30","60"]),pw=new Set(["","qfq","hfq"]);function Sr(r,t){if(!Number.isFinite(r)||!Number.isInteger(r)||r<=0)throw new RangeError(`${t} must be a positive integer`)}function no(r){if(!vw.has(r))throw new RangeError("period must be one of: daily, weekly, monthly")}function qc(r){if(!dw.has(r))throw new RangeError("period must be one of: 1, 5, 15, 30, 60")}function Bi(r){if(!pw.has(r))throw new RangeError("adjust must be one of: '', 'qfq', 'hfq'")}function Nl(r,t){Sr(t,"chunkSize");let e=[];for(let n=0;n<r.length;n+=t)e.push(r.slice(n,n+t));return e}async function Bl(r,t){Sr(t,"concurrency");let e=[],n=[];for(let i of r){let a=Promise.resolve().then(()=>i()).then(o=>{e.push(o)});if(n.push(a),n.length>=t){await Promise.race(n);for(let o=n.length-1;o>=0;o--)await Promise.race([n[o].then(()=>"fulfilled"),Promise.resolve("pending")])==="fulfilled"&&n.splice(o,1)}}return await Promise.all(n),e}function Kc(r){return r.startsWith("sh")?"1":r.startsWith("sz")||r.startsWith("bj")?"0":r.startsWith("6")?"1":"0"}function io(r){return{daily:"101",weekly:"102",monthly:"103"}[r]}function Fi(r){return{"":"0",qfq:"1",hfq:"2"}[r]}var Ft={};$c(Ft,{getAShareCodeList:()=>Sw,getAllHKQuotesByCodes:()=>Mw,getAllQuotesByCodes:()=>Dw,getAllUSQuotesByCodes:()=>Aw,getFullQuotes:()=>iv,getFundFlow:()=>mw,getFundQuotes:()=>_w,getHKCodeList:()=>Tw,getHKQuotes:()=>av,getPanelLargeOrder:()=>yw,getSimpleQuotes:()=>gw,getTodayTimeline:()=>ww,getTradingCalendar:()=>Iw,getUSCodeList:()=>Cw,getUSQuotes:()=>ov,parseFullQuote:()=>jc,parseFundFlow:()=>Jc,parseFundQuote:()=>nv,parseHKQuote:()=>ev,parsePanelLargeOrder:()=>tv,parseSimpleQuote:()=>Qc,parseUSQuote:()=>rv,search:()=>Ow});function jc(r){let t=[];for(let n=0;n<5;n++)t.push({price:Y(r[9+n*2]),volume:Y(r[10+n*2])});let e=[];for(let n=0;n<5;n++)e.push({price:Y(r[19+n*2]),volume:Y(r[20+n*2])});return{marketId:r[0]??"",name:r[1]??"",code:r[2]??"",price:Y(r[3]),prevClose:Y(r[4]),open:Y(r[5]),volume:Y(r[6]),outerVolume:Y(r[7]),innerVolume:Y(r[8]),bid:t,ask:e,time:r[30]??"",change:Y(r[31]),changePercent:Y(r[32]),high:Y(r[33]),low:Y(r[34]),volume2:Y(r[36]),amount:Y(r[37]),turnoverRate:St(r[38]),pe:St(r[39]),amplitude:St(r[43]),circulatingMarketCap:St(r[44]),totalMarketCap:St(r[45]),pb:St(r[46]),limitUp:St(r[47]),limitDown:St(r[48]),volumeRatio:St(r[49]),avgPrice:St(r[51]),peStatic:St(r[52]),peDynamic:St(r[53]),high52w:St(r[67]),low52w:St(r[68]),circulatingShares:St(r[72]),totalShares:St(r[73]),raw:r}}function Qc(r){return{marketId:r[0]??"",name:r[1]??"",code:r[2]??"",price:Y(r[3]),change:Y(r[4]),changePercent:Y(r[5]),volume:Y(r[6]),amount:Y(r[7]),marketCap:St(r[9]),marketType:r[10]??"",raw:r}}function Jc(r){return{code:r[0]??"",mainInflow:Y(r[1]),mainOutflow:Y(r[2]),mainNet:Y(r[3]),mainNetRatio:Y(r[4]),retailInflow:Y(r[5]),retailOutflow:Y(r[6]),retailNet:Y(r[7]),retailNetRatio:Y(r[8]),totalFlow:Y(r[9]),name:r[12]??"",date:r[13]??"",raw:r}}function tv(r){return{buyLargeRatio:Y(r[0]),buySmallRatio:Y(r[1]),sellLargeRatio:Y(r[2]),sellSmallRatio:Y(r[3]),raw:r}}function ev(r){return{marketId:r[0]??"",name:r[1]??"",code:r[2]??"",price:Y(r[3]),prevClose:Y(r[4]),open:Y(r[5]),volume:Y(r[6]),time:r[30]??"",change:Y(r[31]),changePercent:Y(r[32]),high:Y(r[33]),low:Y(r[34]),amount:Y(r[37]),lotSize:St(r[40]),circulatingMarketCap:St(r[44]),totalMarketCap:St(r[45]),currency:r[r.length-3]??"",raw:r}}function rv(r){return{marketId:r[0]??"",name:r[1]??"",code:r[2]??"",price:Y(r[3]),prevClose:Y(r[4]),open:Y(r[5]),volume:Y(r[6]),time:r[30]??"",change:Y(r[31]),changePercent:Y(r[32]),high:Y(r[33]),low:Y(r[34]),amount:Y(r[37]),turnoverRate:St(r[38]),pe:St(r[39]),amplitude:St(r[43]),totalMarketCap:St(r[45]),pb:St(r[47]),high52w:St(r[48]),low52w:St(r[49]),raw:r}}function nv(r){return{code:r[0]??"",name:r[1]??"",nav:Y(r[5]),accNav:Y(r[6]),change:Y(r[7]),navDate:r[8]??"",raw:r}}async function iv(r,t){return!t||t.length===0?[]:(await r.getTencentQuote(t.join(","))).filter(e=>e.fields&&e.fields.length>0&&e.fields[0]!=="").map(e=>jc(e.fields))}async function gw(r,t){if(!t||t.length===0)return[];let e=t.map(n=>`s_${n}`);return(await r.getTencentQuote(e.join(","))).filter(n=>n.fields&&n.fields.length>0&&n.fields[0]!=="").map(n=>Qc(n.fields))}async function mw(r,t){if(!t||t.length===0)return[];let e=t.map(n=>`ff_${n}`);return(await r.getTencentQuote(e.join(","))).filter(n=>n.fields&&n.fields.length>0&&n.fields[0]!=="").map(n=>Jc(n.fields))}async function yw(r,t){if(!t||t.length===0)return[];let e=t.map(n=>`s_pk${n}`);return(await r.getTencentQuote(e.join(","))).filter(n=>n.fields&&n.fields.length>0&&n.fields[0]!=="").map(n=>tv(n.fields))}async function av(r,t){if(!t||t.length===0)return[];let e=t.map(n=>`hk${n}`);return(await r.getTencentQuote(e.join(","))).filter(n=>n.fields&&n.fields.length>0&&n.fields[0]!=="").map(n=>ev(n.fields))}async function ov(r,t){if(!t||t.length===0)return[];let e=t.map(n=>`us${n}`);return(await r.getTencentQuote(e.join(","))).filter(n=>n.fields&&n.fields.length>0&&n.fields[0]!=="").map(n=>rv(n.fields))}async function _w(r,t){if(!t||t.length===0)return[];let e=t.map(n=>`jj${n}`);return(await r.getTencentQuote(e.join(","))).filter(n=>n.fields&&n.fields.length>0&&n.fields[0]!=="").map(n=>nv(n.fields))}async function ww(r,t){var a,o,s;let e=r.getTimeout(),n=new AbortController,i=setTimeout(()=>n.abort(),e);try{let l=await fetch(`${B1}?code=${t}`,{signal:n.signal});if(!l.ok)throw new Error(`HTTP error! status: ${l.status}`);let u=await l.json();if(u.code!==0)throw new Error(u.msg||"API error");let f=(a=u.data)==null?void 0:a[t];if(!f)return{code:t,date:"",data:[]};let h=((o=f.data)==null?void 0:o.data)||[],c=((s=f.data)==null?void 0:s.date)||"",v=!1;if(h.length>0){let p=h[0].split(" "),g=parseFloat(p[1])||0,m=parseInt(p[2],10)||0,y=parseFloat(p[3])||0;m>0&&g>0&&y/m>g*50&&(v=!0)}let d=h.map(p=>{let g=p.split(" "),m=g[0],y=`${m.slice(0,2)}:${m.slice(2,4)}`,_=parseInt(g[2],10)||0,w=parseFloat(g[3])||0,b=v?_*100:_,S=b>0?w/b:0;return{time:y,price:parseFloat(g[1])||0,volume:b,amount:w,avgPrice:Math.round(S*100)/100}});return{code:t,date:c,data:d}}finally{clearTimeout(i)}}var Fl=null,ao=null,zl=null;function bw(r,t){let e=r.replace(/^(sh|sz|bj)/,"");switch(t){case"sh":return e.startsWith("6");case"sz":return e.startsWith("0")||e.startsWith("3");case"bj":return e.startsWith("92");case"kc":return e.startsWith("688");case"cy":return e.startsWith("30");default:return!0}}async function Sw(r,t){var a;let e=!1,n;if(typeof t=="boolean"?e=!t:t&&(e=t.simple??!1,n=t.market),!Fl){let o=((a=await r.get(F1,{responseType:"json"}))==null?void 0:a.list)||[];Fl=o,o.map(s=>s.replace(/^(sh|sz|bj)/,""))}let i=Fl;return n&&(i=i.filter(o=>bw(o,n))),e?i.map(o=>o.replace(/^(sh|sz|bj)/,"")):i.slice()}var xw={NASDAQ:"105.",NYSE:"106.",AMEX:"107."};async function Cw(r,t){var a;let e=!1,n;typeof t=="boolean"?e=!t:t&&(e=t.simple??!1,n=t.market),ao||(ao=((a=await r.get(z1,{responseType:"json"}))==null?void 0:a.list)||[],ao.map(o=>o.replace(/^\d{3}\./,"")));let i=ao.slice();if(n){let o=xw[n];i=i.filter(s=>s.startsWith(o))}return e?i.map(o=>o.replace(/^\d{3}\./,"")):i}async function Tw(r){var t;return zl||(zl=((t=await r.get(V1,{responseType:"json"}))==null?void 0:t.list)||[]),zl.slice()}async function Dw(r,t,e={}){let{batchSize:n=Pl,concurrency:i=Rl,onProgress:a}=e;Sr(n,"batchSize"),Sr(i,"concurrency");let o=Math.min(n,kl),s=Nl(t,o),l=s.length,u=0,f=s.map(h=>async()=>{let c=await iv(r,h);return u++,a&&a(u,l),c});return(await Bl(f,i)).flat()}async function Mw(r,t,e={}){let{batchSize:n=Pl,concurrency:i=Rl,onProgress:a}=e;Sr(n,"batchSize"),Sr(i,"concurrency");let o=Math.min(n,kl),s=Nl(t,o),l=s.length,u=0,f=s.map(h=>async()=>{let c=await av(r,h);return u++,a&&a(u,l),c});return(await Bl(f,i)).flat()}async function Aw(r,t,e={}){let{batchSize:n=Pl,concurrency:i=Rl,onProgress:a}=e;Sr(n,"batchSize"),Sr(i,"concurrency");let o=Math.min(n,kl),s=Nl(t,o),l=s.length,u=0,f=s.map(h=>async()=>{let c=await ov(r,h);return u++,a&&a(u,l),c});return(await Bl(f,i)).flat()}var Nn=null;async function Iw(r){if(Nn)return Nn.slice();let t=await r.get(H1);return!t||t.trim()===""?(Nn=[],Nn.slice()):(Nn=t.trim().split(",").map(e=>e.trim()).filter(e=>e.length>0),Nn.slice())}var sv="https://smartbox.gtimg.cn/s3/";function Ew(r){return r.replace(/\\u([0-9a-fA-F]{4})/g,(t,e)=>String.fromCharCode(parseInt(e,16)))}function Lw(r){return!r||r==="N"?[]:r.split("^").filter(Boolean).map(t=>{let e=t.split("~"),n=e[0]||"",i=e[1]||"",a=Ew(e[2]||""),o=e[4]||"";return{code:n+i,name:a,market:n,type:o}})}function Pw(r){return new Promise((t,e)=>{let n=`${sv}?v=2&t=all&q=${encodeURIComponent(r)}`;window.v_hint="";let i=document.createElement("script");i.src=n,i.charset="utf-8",i.onload=()=>{let a=window.v_hint||"";document.body.removeChild(i),t(a)},i.onerror=()=>{document.body.removeChild(i),e(new Error("Network error calling Smartbox"))},document.body.appendChild(i)})}async function kw(r,t){let e=`${sv}?v=2&t=all&q=${encodeURIComponent(t)}`,n=(await r.get(e)).match(/v_hint="([^"]*)"/);return n?n[1]:""}function Rw(){return typeof window<"u"&&typeof document<"u"}async function Ow(r,t){if(!t||!t.trim())return[];let e;return Rw()?e=await Pw(t):e=await kw(r,t),Lw(e)}var Yt={};$c(Yt,{getConceptConstituents:()=>Zw,getConceptKline:()=>Xw,getConceptList:()=>gv,getConceptMinuteKline:()=>qw,getConceptSpot:()=>Yw,getDividendDetail:()=>jw,getHKHistoryKline:()=>Fw,getHistoryKline:()=>Nw,getIndustryConstituents:()=>Ww,getIndustryKline:()=>Gw,getIndustryList:()=>pv,getIndustryMinuteKline:()=>$w,getIndustrySpot:()=>Hw,getMinuteKline:()=>Bw,getUSHistoryKline:()=>zw});async function lv(r,t,e,n,i=100,a){var u;let o=[],s=1,l=0;do{let f=new URLSearchParams({...e,pn:String(s),pz:String(i),fields:n}),h=`${t}?${f.toString()}`,c=(u=await r.get(h,{responseType:"json"}))==null?void 0:u.data;if(!c||!Array.isArray(c.diff))break;s===1&&(l=c.total??0);let v=c.diff.map((d,p)=>a(d,o.length+p+1));o.push(...v),s++}while(o.length<l);return o}function zi(r){let[t,e,n,i,a,o,s,l,u,f,h]=r.split(",");return{date:t,open:ft(e),close:ft(n),high:ft(i),low:ft(a),volume:ft(o),amount:ft(s),amplitude:ft(l),changePercent:ft(u),change:ft(f),turnoverRate:ft(h)}}async function Vi(r,t,e){var a,o,s;let n=`${t}?${e.toString()}`,i=await r.get(n,{responseType:"json"});return{klines:((a=i==null?void 0:i.data)==null?void 0:a.klines)||[],name:(o=i==null?void 0:i.data)==null?void 0:o.name,code:(s=i==null?void 0:i.data)==null?void 0:s.code}}async function Nw(r,t,e={}){let{period:n="daily",adjust:i="qfq",startDate:a="19700101",endDate:o="20500101"}=e;no(n),Bi(i);let s=t.replace(/^(sh|sz|bj)/,""),l=`${Kc(t)}.${s}`,u=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61,f116",ut:"7eea3edcaed734bea9cbfc24409ed989",klt:io(n),fqt:Fi(i),secid:l,beg:a,end:o}),f=Uc,{klines:h}=await Vi(r,f,u);return h.length===0?[]:h.map(c=>({...zi(c),code:s}))}async function Bw(r,t,e={}){var u,f;let{period:n="1",adjust:i="qfq",startDate:a="1979-09-01 09:32:00",endDate:o="2222-01-01 09:32:00"}=e;qc(n),Bi(i);let s=t.replace(/^(sh|sz|bj)/,""),l=`${Kc(t)}.${s}`;if(n==="1"){let h=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13",fields2:"f51,f52,f53,f54,f55,f56,f57,f58",ut:"7eea3edcaed734bea9cbfc24409ed989",ndays:"5",iscr:"0",secid:l}),c=`${W1}?${h.toString()}`,v=(f=(u=await r.get(c,{responseType:"json"}))==null?void 0:u.data)==null?void 0:f.trends;if(!Array.isArray(v)||v.length===0)return[];let d=a.replace("T"," ").slice(0,16),p=o.replace("T"," ").slice(0,16);return v.map(g=>{let[m,y,_,w,b,S,x,T]=g.split(",");return{time:m,open:ft(y),close:ft(_),high:ft(w),low:ft(b),volume:ft(S),amount:ft(x),avgPrice:ft(T)}}).filter(g=>g.time>=d&&g.time<=p)}else{let h=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",ut:"7eea3edcaed734bea9cbfc24409ed989",klt:n,fqt:Fi(i||""),secid:l,beg:"0",end:"20500000"}),c=Uc,{klines:v}=await Vi(r,c,h);if(v.length===0)return[];let d=a.replace("T"," ").slice(0,16),p=o.replace("T"," ").slice(0,16);return v.map(g=>{let m=zi(g);return{...m,time:m.date}}).filter(g=>g.time>=d&&g.time<=p)}}async function Fw(r,t,e={}){let{period:n="daily",adjust:i="qfq",startDate:a="19700101",endDate:o="20500101"}=e;no(n),Bi(i);let s=t.replace(/^hk/i,"").padStart(5,"0"),l=`116.${s}`,u=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",ut:"7eea3edcaed734bea9cbfc24409ed989",klt:io(n),fqt:Fi(i),secid:l,beg:a,end:o,lmt:"1000000"}),f=G1,{klines:h,name:c}=await Vi(r,f,u);return h.length===0?[]:h.map(v=>({...zi(v),code:s,name:c||""}))}async function zw(r,t,e={}){let{period:n="daily",adjust:i="qfq",startDate:a="19700101",endDate:o="20500101"}=e;no(n),Bi(i);let s=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",ut:"7eea3edcaed734bea9cbfc24409ed989",klt:io(n),fqt:Fi(i),secid:t,beg:a,end:o,lmt:"1000000"}),l=$1,{klines:u,name:f,code:h}=await Vi(r,l,s),c=h||t.split(".")[1]||t,v=f||"";return u.length===0?[]:u.map(d=>({...zi(d),code:c,name:v}))}function uv(r){let t=null;return{async getCode(e,n,i){if(n.startsWith("BK"))return n;if(!t){let o=await i(e);t=new Map(o.map(s=>[s.name,s.code]))}let a=t.get(n);if(!a)throw new Error(`${r.errorPrefix}: ${n}`);return a}}}async function fv(r,t){let e={po:"1",np:"1",ut:"bd1d9ddb04089700cf9c27f6f7426281",fltt:"2",invt:"2",fid:t.type==="concept"?"f12":"f3",fs:t.fsFilter},n=t.type==="concept"?"f2,f3,f4,f8,f12,f14,f15,f16,f17,f18,f20,f21,f24,f25,f22,f33,f11,f62,f128,f124,f107,f104,f105,f136":"f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f12,f13,f14,f15,f16,f17,f18,f20,f21,f23,f24,f25,f26,f22,f33,f11,f62,f128,f136,f115,f152,f124,f107,f104,f105,f140,f141,f207,f208,f209,f222",i=await lv(r,t.listUrl,e,n,100,(a,o)=>({rank:o,name:String(a.f14??""),code:String(a.f12??""),price:Et(a.f2),change:Et(a.f4),changePercent:Et(a.f3),totalMarketCap:Et(a.f20),turnoverRate:Et(a.f8),riseCount:Et(a.f104),fallCount:Et(a.f105),leadingStock:a.f128?String(a.f128):null,leadingStockChangePercent:Et(a.f136)}));return i.sort((a,o)=>(o.changePercent??0)-(a.changePercent??0)),i.forEach((a,o)=>{a.rank=o+1}),i}async function hv(r,t,e){var o;let n=new URLSearchParams({fields:"f43,f44,f45,f46,f47,f48,f170,f171,f168,f169",mpi:"1000",invt:"2",fltt:"1",secid:`90.${t}`}),i=`${e}?${n.toString()}`,a=(o=await r.get(i,{responseType:"json"}))==null?void 0:o.data;return a?[{key:"f43",name:"最新",divide:!0},{key:"f44",name:"最高",divide:!0},{key:"f45",name:"最低",divide:!0},{key:"f46",name:"开盘",divide:!0},{key:"f47",name:"成交量",divide:!1},{key:"f48",name:"成交额",divide:!1},{key:"f170",name:"涨跌幅",divide:!0},{key:"f171",name:"振幅",divide:!0},{key:"f168",name:"换手率",divide:!0},{key:"f169",name:"涨跌额",divide:!0}].map(({key:s,name:l,divide:u})=>{let f=a[s],h=null;return typeof f=="number"&&!isNaN(f)&&(h=u?f/100:f),{item:l,value:h}}):[]}async function cv(r,t,e){let n={po:"1",np:"1",ut:"bd1d9ddb04089700cf9c27f6f7426281",fltt:"2",invt:"2",fid:"f3",fs:`b:${t} f:!50`};return lv(r,e,n,"f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f12,f13,f14,f15,f16,f17,f18,f20,f21,f23,f24,f25,f22,f11,f62,f128,f136,f115,f152,f45",100,(i,a)=>({rank:a,code:String(i.f12??""),name:String(i.f14??""),price:Et(i.f2),changePercent:Et(i.f3),change:Et(i.f4),volume:Et(i.f5),amount:Et(i.f6),amplitude:Et(i.f7),high:Et(i.f15),low:Et(i.f16),open:Et(i.f17),prevClose:Et(i.f18),turnoverRate:Et(i.f8),pe:Et(i.f9),pb:Et(i.f23)}))}async function vv(r,t,e,n={}){let{period:i="daily",adjust:a="",startDate:o="19700101",endDate:s="20500101"}=n;no(i),Bi(a);let l=new URLSearchParams({secid:`90.${t}`,fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",klt:io(i),fqt:Fi(a),beg:o,end:s,smplmt:"10000",lmt:"1000000"}),{klines:u}=await Vi(r,e,l);return u.length===0?[]:u.map(f=>zi(f))}async function dv(r,t,e,n,i={}){var o,s,l,u;let{period:a="5"}=i;if(qc(a),a==="1"){let f=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13",fields2:"f51,f52,f53,f54,f55,f56,f57,f58",iscr:"0",ndays:"1",secid:`90.${t}`}),h=`${n}?${f.toString()}`,c=(s=(o=await r.get(h,{responseType:"json"}))==null?void 0:o.data)==null?void 0:s.trends;return!Array.isArray(c)||c.length===0?[]:c.map(v=>{let[d,p,g,m,y,_,w,b]=v.split(",");return{time:d,open:ft(p),close:ft(g),high:ft(m),low:ft(y),volume:ft(_),amount:ft(w),price:ft(b)}})}else{let f=new URLSearchParams({secid:`90.${t}`,fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",klt:a,fqt:"1",beg:"0",end:"20500101",smplmt:"10000",lmt:"1000000"}),h=`${e}?${f.toString()}`,c=(u=(l=await r.get(h,{responseType:"json"}))==null?void 0:l.data)==null?void 0:u.klines;return!Array.isArray(c)||c.length===0?[]:c.map(v=>{let[d,p,g,m,y,_,w,b,S,x,T]=v.split(",");return{time:d,open:ft(p),close:ft(g),high:ft(m),low:ft(y),changePercent:ft(S),change:ft(x),volume:ft(_),amount:ft(w),amplitude:ft(b),turnoverRate:ft(T)}})}}var Yr={type:"industry",fsFilter:"m:90 t:2 f:!50",listUrl:U1,spotUrl:Y1,consUrl:Z1,klineUrl:X1,trendsUrl:q1,errorPrefix:"未找到行业板块"},Vw=uv(Yr);async function oo(r,t){return Vw.getCode(r,t,pv)}async function pv(r){return fv(r,Yr)}async function Hw(r,t){let e=await oo(r,t);return hv(r,e,Yr.spotUrl)}async function Ww(r,t){let e=await oo(r,t);return cv(r,e,Yr.consUrl)}async function Gw(r,t,e={}){let n=await oo(r,t);return vv(r,n,Yr.klineUrl,e)}async function $w(r,t,e={}){let n=await oo(r,t);return dv(r,n,Yr.klineUrl,Yr.trendsUrl,e)}var Zr={type:"concept",fsFilter:"m:90 t:3 f:!50",listUrl:K1,spotUrl:j1,consUrl:Q1,klineUrl:J1,trendsUrl:tw,errorPrefix:"未找到概念板块"},Uw=uv(Zr);async function so(r,t){return Uw.getCode(r,t,gv)}async function gv(r){return fv(r,Zr)}async function Yw(r,t){let e=await so(r,t);return hv(r,e,Zr.spotUrl)}async function Zw(r,t){let e=await so(r,t);return cv(r,e,Zr.consUrl)}async function Xw(r,t,e={}){let n=await so(r,t);return vv(r,n,Zr.klineUrl,e)}async function qw(r,t,e={}){let n=await so(r,t);return dv(r,n,Zr.klineUrl,Zr.trendsUrl,e)}function Xr(r){if(!r)return null;let t=r.match(/^(\d{4}-\d{2}-\d{2})/);return t?t[1]:null}function Kw(r){return{code:r.SECURITY_CODE??"",name:r.SECURITY_NAME_ABBR??"",reportDate:Xr(r.REPORT_DATE),planNoticeDate:Xr(r.PLAN_NOTICE_DATE),disclosureDate:Xr(r.PUBLISH_DATE??r.PLAN_NOTICE_DATE),assignTransferRatio:r.BONUS_IT_RATIO??null,bonusRatio:r.BONUS_RATIO??null,transferRatio:r.IT_RATIO??null,dividendPretax:r.PRETAX_BONUS_RMB??null,dividendDesc:r.IMPL_PLAN_PROFILE??null,dividendYield:r.DIVIDENT_RATIO??null,eps:r.BASIC_EPS??null,bps:r.BVPS??null,capitalReserve:r.PER_CAPITAL_RESERVE??null,unassignedProfit:r.PER_UNASSIGN_PROFIT??null,netProfitYoy:r.PNP_YOY_RATIO??null,totalShares:r.TOTAL_SHARES??null,equityRecordDate:Xr(r.EQUITY_RECORD_DATE),exDividendDate:Xr(r.EX_DIVIDEND_DATE),payDate:Xr(r.PAY_DATE),assignProgress:r.ASSIGN_PROGRESS??null,noticeDate:Xr(r.NOTICE_DATE)}}async function jw(r,t){var o;let e=t.replace(/^(sh|sz|bj)/,""),n=[],i=1,a=1;do{let s=new URLSearchParams({sortColumns:"REPORT_DATE",sortTypes:"-1",pageSize:"500",pageNumber:String(i),reportName:"RPT_SHAREBONUS_DET",columns:"ALL",quoteColumns:"",source:"WEB",client:"WEB",filter:`(SECURITY_CODE="${e}")`}),l=`${ew}?${s.toString()}`,u=(o=await r.get(l,{responseType:"json"}))==null?void 0:o.result;if(!u||!Array.isArray(u.data))break;i===1&&(a=u.pages??1);let f=u.data.map(Kw);n.push(...f),i++}while(i<=a);return n}function Hi(r,t=2){let e=Math.pow(10,t);return Math.round(r*e)/e}function Vl(r,t){let e=[];for(let n=0;n<r.length;n++){if(n<t-1){e.push(null);continue}let i=0,a=0;for(let o=n-t+1;o<=n;o++)r[o]!==null&&(i+=r[o],a++);e.push(a===t?Hi(i/t):null)}return e}function lo(r,t){let e=[],n=2/(t+1),i=null,a=!1;for(let o=0;o<r.length;o++){if(o<t-1){e.push(null);continue}if(!a){let l=0,u=0;for(let f=o-t+1;f<=o;f++)r[f]!==null&&(l+=r[f],u++);u===t&&(i=l/t,a=!0),e.push(i!==null?Hi(i):null);continue}let s=r[o];s===null?e.push(i!==null?Hi(i):null):(i=n*s+(1-n)*i,e.push(Hi(i)))}return e}function Qw(r,t){let e=[],n=Array.from({length:t},(a,o)=>o+1),i=n.reduce((a,o)=>a+o,0);for(let a=0;a<r.length;a++){if(a<t-1){e.push(null);continue}let o=0,s=!0;for(let l=0;l<t;l++){let u=r[a-t+1+l];if(u===null){s=!1;break}o+=u*n[l]}e.push(s?Hi(o/i):null)}return e}function Jw(r,t={}){let{periods:e=[5,10,20,30,60,120,250],type:n="sma"}=t,i=n==="ema"?lo:n==="wma"?Qw:Vl,a={};for(let o of e)a[`ma${o}`]=i(r,o);return r.map((o,s)=>{let l={};for(let u of e)l[`ma${u}`]=a[`ma${u}`][s];return l})}function mv(r,t=2){let e=Math.pow(10,t);return Math.round(r*e)/e}function tb(r,t={}){let{short:e=12,long:n=26,signal:i=9}=t,a=lo(r,e),o=lo(r,n),s=r.map((u,f)=>a[f]===null||o[f]===null?null:a[f]-o[f]),l=lo(s,i);return r.map((u,f)=>({dif:s[f]!==null?mv(s[f]):null,dea:l[f],macd:s[f]!==null&&l[f]!==null?mv((s[f]-l[f])*2):null}))}function Hl(r,t=2){let e=Math.pow(10,t);return Math.round(r*e)/e}function eb(r,t,e){let n=[];for(let i=0;i<r.length;i++){if(i<t-1||e[i]===null){n.push(null);continue}let a=0,o=0;for(let s=i-t+1;s<=i;s++)r[s]!==null&&e[i]!==null&&(a+=Math.pow(r[s]-e[i],2),o++);n.push(o===t?Math.sqrt(a/t):null)}return n}function rb(r,t={}){let{period:e=20,stdDev:n=2}=t,i=Vl(r,e),a=eb(r,e,i);return r.map((o,s)=>{if(i[s]===null||a[s]===null)return{mid:null,upper:null,lower:null,bandwidth:null};let l=i[s]+n*a[s],u=i[s]-n*a[s],f=i[s]!==0?Hl((l-u)/i[s]*100):null;return{mid:i[s],upper:Hl(l),lower:Hl(u),bandwidth:f}})}function Wl(r,t=2){let e=Math.pow(10,t);return Math.round(r*e)/e}function nb(r,t={}){let{period:e=9,kPeriod:n=3,dPeriod:i=3}=t,a=[],o=50,s=50;for(let l=0;l<r.length;l++){if(l<e-1){a.push({k:null,d:null,j:null});continue}let u=-1/0,f=1/0,h=!0;for(let p=l-e+1;p<=l;p++){if(r[p].high===null||r[p].low===null){h=!1;break}u=Math.max(u,r[p].high),f=Math.min(f,r[p].low)}let c=r[l].close;if(!h||c===null||u===f){a.push({k:null,d:null,j:null});continue}let v=(c-f)/(u-f)*100;o=(n-1)/n*o+1/n*v,s=(i-1)/i*s+1/i*o;let d=3*o-2*s;a.push({k:Wl(o),d:Wl(s),j:Wl(d)})}return a}function ib(r,t=2){let e=Math.pow(10,t);return Math.round(r*e)/e}function ab(r,t={}){let{periods:e=[6,12,24]}=t,n=[null];for(let a=1;a<r.length;a++)r[a]===null||r[a-1]===null?n.push(null):n.push(r[a]-r[a-1]);let i={};for(let a of e){let o=[],s=0,l=0;for(let u=0;u<r.length;u++){if(u<a){o.push(null),n[u]!==null&&(n[u]>0?s+=n[u]:l+=Math.abs(n[u]));continue}if(u===a)s=s/a,l=l/a;else{let f=n[u]??0,h=f>0?f:0,c=f<0?Math.abs(f):0;s=(s*(a-1)+h)/a,l=(l*(a-1)+c)/a}if(l===0)o.push(100);else if(s===0)o.push(0);else{let f=s/l;o.push(ib(100-100/(1+f)))}}i[`rsi${a}`]=o}return r.map((a,o)=>{let s={};for(let l of e)s[`rsi${l}`]=i[`rsi${l}`][o];return s})}function ob(r,t=2){let e=Math.pow(10,t);return Math.round(r*e)/e}function sb(r,t={}){let{periods:e=[6,10]}=t,n={};for(let i of e){let a=[];for(let o=0;o<r.length;o++){if(o<i-1){a.push(null);continue}let s=-1/0,l=1/0,u=!0;for(let c=o-i+1;c<=o;c++){if(r[c].high===null||r[c].low===null){u=!1;break}s=Math.max(s,r[c].high),l=Math.min(l,r[c].low)}let f=r[o].close;if(!u||f===null||s===l){a.push(null);continue}let h=(s-f)/(s-l)*100;a.push(ob(h))}n[`wr${i}`]=a}return r.map((i,a)=>{let o={};for(let s of e)o[`wr${s}`]=n[`wr${s}`][a];return o})}function lb(r,t=2){let e=Math.pow(10,t);return Math.round(r*e)/e}function ub(r,t={}){let{periods:e=[6,12,24]}=t,n={};for(let i of e){let a=Vl(r,i),o=[];for(let s=0;s<r.length;s++)if(r[s]===null||a[s]===null||a[s]===0)o.push(null);else{let l=(r[s]-a[s])/a[s]*100;o.push(lb(l))}n[`bias${i}`]=o}return r.map((i,a)=>{let o={};for(let s of e)o[`bias${s}`]=n[`bias${s}`][a];return o})}function fb(r,t=2){let e=Math.pow(10,t);return Math.round(r*e)/e}function hb(r,t={}){let{period:e=14}=t,n=[],i=r.map(a=>a.high===null||a.low===null||a.close===null?null:(a.high+a.low+a.close)/3);for(let a=0;a<r.length;a++){if(a<e-1){n.push({cci:null});continue}let o=0,s=0;for(let h=a-e+1;h<=a;h++)i[h]!==null&&(o+=i[h],s++);if(s!==e||i[a]===null){n.push({cci:null});continue}let l=o/e,u=0;for(let h=a-e+1;h<=a;h++)u+=Math.abs(i[h]-l);let f=u/e;if(f===0)n.push({cci:0});else{let h=(i[a]-l)/(.015*f);n.push({cci:fb(h)})}}return n}function Gl(r,t=2){let e=Math.pow(10,t);return Math.round(r*e)/e}function cb(r,t={}){let{period:e=14}=t,n=[],i=[];for(let o=0;o<r.length;o++){let{high:s,low:l,close:u}=r[o];if(s===null||l===null||u===null){i.push(null);continue}if(o===0)i.push(s-l);else{let f=r[o-1].close;if(f===null)i.push(s-l);else{let h=s-l,c=Math.abs(s-f),v=Math.abs(l-f);i.push(Math.max(h,c,v))}}}let a=null;for(let o=0;o<r.length;o++){if(o<e-1){n.push({tr:i[o]!==null?Gl(i[o]):null,atr:null});continue}if(o===e-1){let s=0,l=0;for(let u=0;u<e;u++)i[u]!==null&&(s+=i[u],l++);l===e&&(a=s/e)}else a!==null&&i[o]!==null&&(a=(a*(e-1)+i[o])/e);n.push({tr:i[o]!==null?Gl(i[o]):null,atr:a!==null?Gl(a):null})}return n}function vb(r,t={}){if(r.length===0)return[];let e=r.map(v=>v.close),n=r.map(v=>({open:v.open,high:v.high,low:v.low,close:v.close,volume:v.volume})),i=t.ma?Jw(e,typeof t.ma=="object"?t.ma:{}):null,a=t.macd?tb(e,typeof t.macd=="object"?t.macd:{}):null,o=t.boll?rb(e,typeof t.boll=="object"?t.boll:{}):null,s=t.kdj?nb(n,typeof t.kdj=="object"?t.kdj:{}):null,l=t.rsi?ab(e,typeof t.rsi=="object"?t.rsi:{}):null,u=t.wr?sb(n,typeof t.wr=="object"?t.wr:{}):null,f=t.bias?ub(e,typeof t.bias=="object"?t.bias:{}):null,h=t.cci?hb(n,typeof t.cci=="object"?t.cci:{}):null,c=t.atr?cb(n,typeof t.atr=="object"?t.atr:{}):null;return r.map((v,d)=>({...v,...i&&{ma:i[d]},...a&&{macd:a[d]},...o&&{boll:o[d]},...s&&{kdj:s[d]},...l&&{rsi:l[d]},...u&&{wr:u[d]},...f&&{bias:f[d]},...h&&{cci:h[d]},...c&&{atr:c[d]}}))}var db=class{constructor(r={}){this.client=new cw(r)}getFullQuotes(r){return Ft.getFullQuotes(this.client,r)}getSimpleQuotes(r){return Ft.getSimpleQuotes(this.client,r)}getHKQuotes(r){return Ft.getHKQuotes(this.client,r)}getUSQuotes(r){return Ft.getUSQuotes(this.client,r)}getFundQuotes(r){return Ft.getFundQuotes(this.client,r)}getFundFlow(r){return Ft.getFundFlow(this.client,r)}getPanelLargeOrder(r){return Ft.getPanelLargeOrder(this.client,r)}getTodayTimeline(r){return Ft.getTodayTimeline(this.client,r)}getIndustryList(){return Yt.getIndustryList(this.client)}getIndustrySpot(r){return Yt.getIndustrySpot(this.client,r)}getIndustryConstituents(r){return Yt.getIndustryConstituents(this.client,r)}getIndustryKline(r,t){return Yt.getIndustryKline(this.client,r,t)}getIndustryMinuteKline(r,t){return Yt.getIndustryMinuteKline(this.client,r,t)}getConceptList(){return Yt.getConceptList(this.client)}getConceptSpot(r){return Yt.getConceptSpot(this.client,r)}getConceptConstituents(r){return Yt.getConceptConstituents(this.client,r)}getConceptKline(r,t){return Yt.getConceptKline(this.client,r,t)}getConceptMinuteKline(r,t){return Yt.getConceptMinuteKline(this.client,r,t)}getHistoryKline(r,t){return Yt.getHistoryKline(this.client,r,t)}getMinuteKline(r,t){return Yt.getMinuteKline(this.client,r,t)}getHKHistoryKline(r,t){return Yt.getHKHistoryKline(this.client,r,t)}getUSHistoryKline(r,t){return Yt.getUSHistoryKline(this.client,r,t)}search(r){return Ft.search(this.client,r)}getAShareCodeList(r){return Ft.getAShareCodeList(this.client,r)}getUSCodeList(r){return Ft.getUSCodeList(this.client,r)}getHKCodeList(){return Ft.getHKCodeList(this.client)}async getAllAShareQuotes(r={}){let{market:t,...e}=r,n=await this.getAShareCodeList({market:t});return this.getAllQuotesByCodes(n,e)}async getAllHKShareQuotes(r={}){let t=await this.getHKCodeList();return Ft.getAllHKQuotesByCodes(this.client,t,r)}async getAllUSShareQuotes(r={}){let{market:t,...e}=r,n=await this.getUSCodeList({simple:!0,market:t});return Ft.getAllUSQuotesByCodes(this.client,n,e)}getAllQuotesByCodes(r,t={}){return Ft.getAllQuotesByCodes(this.client,r,t)}async batchRaw(r){return this.client.getTencentQuote(r)}getTradingCalendar(){return Ft.getTradingCalendar(this.client)}getDividendDetail(r){return Yt.getDividendDetail(this.client,r)}detectMarket(r){return/^\d{3}\.[A-Z]+$/i.test(r)?"US":/^\d{5}$/.test(r)?"HK":"A"}safeMax(r,t=0){return!r||r.length===0?t:Math.max(...r)}calcRequiredLookback(r){let t=0,e=!1;if(r.ma){let n=typeof r.ma=="object"?r.ma:{},i=n.periods??[5,10,20,30,60,120,250],a=n.type??"sma";t=Math.max(t,this.safeMax(i,20)),a==="ema"&&(e=!0)}if(r.macd){let n=typeof r.macd=="object"?r.macd:{},i=n.long??26,a=n.signal??9;t=Math.max(t,i*3+a),e=!0}if(r.boll){let n=typeof r.boll=="object"&&r.boll.period?r.boll.period:20;t=Math.max(t,n)}if(r.kdj){let n=typeof r.kdj=="object"&&r.kdj.period?r.kdj.period:9;t=Math.max(t,n)}if(r.rsi){let n=typeof r.rsi=="object"&&r.rsi.periods?r.rsi.periods:[6,12,24];t=Math.max(t,this.safeMax(n,14)+1)}if(r.wr){let n=typeof r.wr=="object"&&r.wr.periods?r.wr.periods:[6,10];t=Math.max(t,this.safeMax(n,10))}if(r.bias){let n=typeof r.bias=="object"&&r.bias.periods?r.bias.periods:[6,12,24];t=Math.max(t,this.safeMax(n,12))}if(r.cci){let n=typeof r.cci=="object"&&r.cci.period?r.cci.period:14;t=Math.max(t,n)}if(r.atr){let n=typeof r.atr=="object"&&r.atr.period?r.atr.period:14;t=Math.max(t,n)}return Math.ceil(t*(e?1.5:1.2))}calcActualStartDate(r,t,e=1.5){let n=Math.ceil(t*e),i=new Date(parseInt(r.slice(0,4)),parseInt(r.slice(4,6))-1,parseInt(r.slice(6,8)));i.setDate(i.getDate()-n);let a=i.getFullYear(),o=String(i.getMonth()+1).padStart(2,"0"),s=String(i.getDate()).padStart(2,"0");return`${a}${o}${s}`}calcActualStartDateByCalendar(r,t,e){if(!e||e.length===0)return;let n=this.normalizeDate(r),i=e.findIndex(o=>o>=n);i===-1&&(i=e.length-1);let a=Math.max(0,i-t);return this.toCompactDate(e[a])}normalizeDate(r){return r.includes("-")?r:r.length===8?`${r.slice(0,4)}-${r.slice(4,6)}-${r.slice(6,8)}`:r}toCompactDate(r){return r.replace(/-/g,"")}dateToTimestamp(r){let t=r.includes("-")?r:`${r.slice(0,4)}-${r.slice(4,6)}-${r.slice(6,8)}`;return new Date(t).getTime()}async getKlineWithIndicators(r,t={}){let{startDate:e,endDate:n,indicators:i={}}=t,a=t.market??this.detectMarket(r),o=this.calcRequiredLookback(i),s={A:1.5,HK:1.46,US:1.45},l;if(e)if(a==="A")try{let c=await Ft.getTradingCalendar(this.client);l=this.calcActualStartDateByCalendar(e,o,c)??this.calcActualStartDate(e,o,s[a])}catch{l=this.calcActualStartDate(e,o,s[a])}else l=this.calcActualStartDate(e,o,s[a]);let u={period:t.period,adjust:t.adjust,startDate:l,endDate:t.endDate},f;switch(a){case"HK":f=await this.getHKHistoryKline(r,u);break;case"US":f=await this.getUSHistoryKline(r,u);break;default:f=await this.getHistoryKline(r,u)}if(e&&f.length<o)switch(a){case"HK":f=await this.getHKHistoryKline(r,{...u,startDate:void 0});break;case"US":f=await this.getUSHistoryKline(r,{...u,startDate:void 0});break;default:f=await this.getHistoryKline(r,{...u,startDate:void 0})}let h=vb(f,i);if(e){let c=this.dateToTimestamp(e),v=n?this.dateToTimestamp(n):1/0;return h.filter(d=>{let p=this.dateToTimestamp(d.date);return p>=c&&p<=v})}return h}};function Bn(r,t){const e=[];let n=0,i=0;for(let a=0;a<r.length;a++){const o=r[a];if(o!=null&&(n+=o,i++),a>=t){const s=r[a-t];s!=null&&(n-=s,i--)}a>=t-1&&i===t?e.push(n/t):e.push(null)}return e}function qr(r,t){const e=[],n=2/(t+1);let i=null;for(let a=0;a<r.length;a++){const o=r[a];if(o==null){e.push(i);continue}i===null?i=o:i=o*n+i*(1-n),e.push(i)}return e}function yv(r,t){const e=[],n=Array.from({length:t},(a,o)=>o+1),i=n.reduce((a,o)=>a+o,0);for(let a=0;a<r.length;a++){if(a<t-1){e.push(null);continue}let o=0,s=0;for(let l=0;l<t;l++){const u=r[a-t+1+l],f=n[l];u!=null&&f!==void 0&&(o+=u*f,s++)}s===t?e.push(o/i):e.push(null)}return e}function _v(r,t={}){const{periods:e=[5,10,20,30,60],type:n="sma"}=t,i={};for(const o of e){const s=`ma${o}`;switch(n){case"ema":i[s]=qr(r,o);break;case"wma":i[s]=yv(r,o);break;default:i[s]=Bn(r,o)}}const a=[];for(let o=0;o<r.length;o++){const s={};for(const l of Object.keys(i)){const u=i[l];s[l]=u!==void 0?u[o]??null:null}a.push(s)}return a}function wv(r,t={}){const{short:e=12,long:n=26,signal:i=9}=t,a=qr(r,e),o=qr(r,n),s=[];for(let f=0;f<r.length;f++){const h=a[f],c=o[f];h!=null&&c!==null&&c!==void 0?s.push(h-c):s.push(null)}const l=qr(s,i),u=[];for(let f=0;f<r.length;f++){const h=s[f]??null,c=l[f]??null;u.push({dif:h,dea:c,macd:h!==null&&c!==null?(h-c)*2:null})}return u}function bv(r,t={}){const{period:e=20,stdDev:n=2}=t,i=Bn(r,e),a=[];for(let o=0;o<r.length;o++){const s=i[o];if(s==null||o<e-1){a.push({mid:null,upper:null,lower:null,bandwidth:null});continue}let l=0,u=0;for(let f=o-e+1;f<=o;f++){const h=r[f];h!=null&&(l+=Math.pow(h-s,2),u++)}if(u===e){const f=Math.sqrt(l/e),h=s+n*f,c=s-n*f;a.push({mid:s,upper:h,lower:c,bandwidth:s!==0?(h-c)/s*100:null})}else a.push({mid:s,upper:null,lower:null,bandwidth:null})}return a}function Sv(r,t={}){const{period:e=9,kPeriod:n=3,dPeriod:i=3}=t,a=[];let o=50,s=50;for(let l=0;l<r.length;l++){if(l<e-1){a.push({k:null,d:null,j:null});continue}let u=-1/0,f=1/0;for(let m=l-e+1;m<=l;m++){const y=r[m];y!==void 0&&y.high!==null&&y.high!==void 0&&(u=Math.max(u,y.high)),y!==void 0&&y.low!==null&&y.low!==void 0&&(f=Math.min(f,y.low))}const h=r[l],c=h!==void 0?h.close:null;if(c==null||u===-1/0||f===1/0){a.push({k:null,d:null,j:null});continue}const v=u===f?50:(c-f)/(u-f)*100,d=(o*(n-1)+v)/n,p=(s*(i-1)+d)/i,g=3*d-2*p;a.push({k:d,d:p,j:g}),o=d,s=p}return a}function xv(r,t={}){const{periods:e=[6,12,24]}=t,n={};for(const a of e){const o=`rsi${a}`,s=[];let l=0,u=0;for(let f=0;f<r.length;f++){const h=r[f],c=r[f-1];if(f===0||h===null||h===void 0||c===null||c===void 0){s.push(null);continue}const v=h-c,d=v>0?v:0,p=v<0?-v:0;if(f<a)l+=d,u+=p,s.push(null);else if(f===a){l=(l+d)/a,u=(u+p)/a;const g=u===0?100:l/u;s.push(100-100/(1+g))}else{l=(l*(a-1)+d)/a,u=(u*(a-1)+p)/a;const g=u===0?100:l/u;s.push(100-100/(1+g))}}n[o]=s}const i=[];for(let a=0;a<r.length;a++){const o={};for(const s of Object.keys(n)){const l=n[s];o[s]=l!==void 0?l[a]??null:null}i.push(o)}return i}function Cv(r,t={}){const{periods:e=[6,10]}=t,n={};for(const a of e){const o=`wr${a}`,s=[];for(let l=0;l<r.length;l++){if(l<a-1){s.push(null);continue}let u=-1/0,f=1/0;for(let v=l-a+1;v<=l;v++){const d=r[v];d!==void 0&&d.high!==null&&d.high!==void 0&&(u=Math.max(u,d.high)),d!==void 0&&d.low!==null&&d.low!==void 0&&(f=Math.min(f,d.low))}const h=r[l],c=h!==void 0?h.close:null;c==null||u===f?s.push(null):s.push((u-c)/(u-f)*-100)}n[o]=s}const i=[];for(let a=0;a<r.length;a++){const o={};for(const s of Object.keys(n)){const l=n[s];o[s]=l!==void 0?l[a]??null:null}i.push(o)}return i}function Tv(r,t={}){const{periods:e=[6,12,24]}=t,n={};for(const a of e){const o=`bias${a}`,s=Bn(r,a),l=[];for(let u=0;u<r.length;u++){const f=r[u],h=s[u];f==null||h===null||h===void 0||h===0?l.push(null):l.push((f-h)/h*100)}n[o]=l}const i=[];for(let a=0;a<r.length;a++){const o={};for(const s of Object.keys(n)){const l=n[s];o[s]=l!==void 0?l[a]??null:null}i.push(o)}return i}function Dv(r,t={}){const{period:e=14}=t,n=r.map(o=>o.high===null||o.low===null||o.close===null?null:(o.high+o.low+o.close)/3),i=Bn(n,e),a=[];for(let o=0;o<r.length;o++){const s=n[o],l=i[o];if(o<e-1||s===null||s===void 0||l===null||l===void 0){a.push({cci:null});continue}let u=0,f=0;for(let c=o-e+1;c<=o;c++){const v=n[c];v!=null&&(u+=Math.abs(v-l),f++)}const h=f>0?u/f:0;h===0?a.push({cci:0}):a.push({cci:(s-l)/(.015*h)})}return a}function $l(r,t={}){const{period:e=14}=t,n=[],i=[];for(let a=0;a<r.length;a++){const o=r[a];if(o===void 0||o.high===null||o.low===null||o.close===null){i.push(null),n.push({tr:null,atr:null});continue}let s;if(a===0)s=o.high-o.low;else{const l=r[a-1],u=l!==void 0?l.close:null;u==null?s=o.high-o.low:s=Math.max(o.high-o.low,Math.abs(o.high-u),Math.abs(o.low-u))}if(i.push(s),a<e-1)n.push({tr:s,atr:null});else if(a===e-1){let l=0;for(let u=0;u<e;u++)l+=i[u]??0;n.push({tr:s,atr:l/e})}else{const l=n[a-1],u=l!==void 0?l.atr:null;u==null?n.push({tr:s,atr:null}):n.push({tr:s,atr:(u*(e-1)+s)/e})}}return n}function pb(r,t={}){const{maPeriod:e=30}=t,n=[];let i=0;for(let s=0;s<r.length;s++){const l=r[s];if(l===void 0||l.close===null||l.volume===null||l.volume===void 0){n.push({obv:null,obvMa:null});continue}if(s===0)i=l.volume;else{const u=r[s-1],f=u!==void 0?u.close:null;f==null?i=l.volume:l.close>f?i+=l.volume:l.close<f&&(i-=l.volume)}n.push({obv:i,obvMa:null})}const a=n.map(s=>s.obv),o=Bn(a,e);for(let s=0;s<n.length;s++){const l=n[s];l!==void 0&&(l.obvMa=o[s]??null)}return n}function gb(r,t={}){const{period:e=12,signalPeriod:n=6}=t,i=[];for(let s=0;s<r.length;s++){const l=r[s],u=r[s-e];s<e||l===null||l===void 0||u===null||u===void 0||u===0?i.push(null):i.push((l-u)/u*100)}const a=qr(i,n),o=[];for(let s=0;s<r.length;s++)o.push({roc:i[s]??null,signal:a[s]??null});return o}function mb(r,t={}){const{period:e=14,adxPeriod:n=14}=t,i=[],a=[],o=[],s=[];for(let l=0;l<r.length;l++){const u=r[l];if(u===void 0||u.high===null||u.low===null||u.close===null){i.push({pdi:null,mdi:null,adx:null,adxr:null});continue}let f;if(l===0)f=u.high-u.low;else{const w=r[l-1],b=w!==void 0?w.close:null;b==null?f=u.high-u.low:f=Math.max(u.high-u.low,Math.abs(u.high-b),Math.abs(u.low-b))}if(a.push(f),l===0)o.push(0),s.push(0);else{const w=r[l-1];if(w===void 0||w.high===null||w.low===null)o.push(0),s.push(0);else{const b=u.high-w.high,S=w.low-u.low,x=b>S&&b>0?b:0,T=S>b&&S>0?S:0;o.push(x),s.push(T)}}if(l<e-1){i.push({pdi:null,mdi:null,adx:null,adxr:null});continue}let h=0,c=0,v=0;for(let w=l-e+1;w<=l;w++)h+=a[w]??0,c+=o[w]??0,v+=s[w]??0;const d=h>0?c/h*100:0,p=h>0?v/h*100:0,g=d+p,m=g>0?Math.abs(d-p)/g*100:0;let y=null;if(l>=e-1+n-1){let w=0;for(let b=l-n+1;b<=l;b++){if(i[b]===void 0)continue;let x=0,T=0,M=0;for(let L=b-e+1;L<=b;L++)x+=a[L]??0,T+=o[L]??0,M+=s[L]??0;const A=x>0?T/x*100:0,C=x>0?M/x*100:0,I=A+C,E=I>0?Math.abs(A-C)/I*100:0;w+=E}w+=m,y=w/n}let _=null;if(y!==null&&l>=e-1+n-1+n){const w=i[l-n];w!==void 0&&w.adx!==null&&(_=(y+w.adx)/2)}i.push({pdi:d,mdi:p,adx:y,adxr:_})}return i}function yb(r,t={}){var f,h;const{afStart:e=.02,afIncrement:n=.02,afMax:i=.2}=t,a=[];if(r.length===0)return a;let o=1,s=((f=r[0])==null?void 0:f.low)??0,l=((h=r[0])==null?void 0:h.high)??0,u=e;for(let c=0;c<r.length;c++){const v=r[c];if(v===void 0||v.high===null||v.low===null){a.push({sar:null,trend:null,ep:null,af:null});continue}if(c===0){a.push({sar:v.low,trend:1,ep:v.high,af:e}),s=v.low,l=v.high,o=1,u=e;continue}const d=s;if(s=d+u*(l-d),o===1){const p=r[c-1],g=r[c-2];p!==void 0&&p.low!==null&&(s=Math.min(s,p.low)),g!==void 0&&g.low!==null&&(s=Math.min(s,g.low)),v.low<s?(o=-1,s=l,l=v.low,u=e):v.high>l&&(l=v.high,u=Math.min(u+n,i))}else{const p=r[c-1],g=r[c-2];p!==void 0&&p.high!==null&&(s=Math.max(s,p.high)),g!==void 0&&g.high!==null&&(s=Math.max(s,g.high)),v.high>s?(o=1,s=l,l=v.high,u=e):v.low<l&&(l=v.low,u=Math.min(u+n,i))}a.push({sar:s,trend:o,ep:l,af:u})}return a}function _b(r,t={}){var u;const{emaPeriod:e=20,atrPeriod:n=10,multiplier:i=2}=t,a=r.map(f=>f.close),o=qr(a,e),s=$l(r,{period:n}),l=[];for(let f=0;f<r.length;f++){const h=o[f],c=(u=s[f])==null?void 0:u.atr;if(h==null||c===null||c===void 0){l.push({mid:null,upper:null,lower:null,width:null});continue}const v=h+i*c,d=h-i*c,p=h!==0?(v-d)/h*100:null;l.push({mid:h,upper:v,lower:d,width:p})}return l}const wb={enabled:!0,ttl:300*1e3,maxSize:100};function bb(r){switch(r){case"timeline":case"timeline5":return 30*1e3;case"1":case"5":case"15":case"30":case"60":return 120*1e3;case"daily":case"weekly":case"monthly":default:return 600*1e3}}class Fn{constructor(t={}){Hc(this,"cache",new Map);Hc(this,"config");this.config={...wb,...t}}static buildKey(t){return Object.entries(t).filter(([,e])=>e!==void 0).sort(([e],[n])=>e.localeCompare(n)).map(([e,n])=>`${e}:${String(n)}`).join("|")}get(t){if(!this.config.enabled)return;const e=this.cache.get(t);if(!e)return;const n=e.ttl??this.config.ttl;if(Date.now()-e.timestamp>n){this.cache.delete(t);return}return e.data}set(t,e,n){if(this.config.enabled){if(this.cache.size>=this.config.maxSize&&(this.cleanup(),this.cache.size>=this.config.maxSize)){const i=this.cache.keys().next().value;i&&this.cache.delete(i)}this.cache.set(t,{data:e,timestamp:Date.now(),ttl:n})}}cleanup(){const t=Date.now();for(const[e,n]of this.cache.entries()){const i=n.ttl??this.config.ttl;t-n.timestamp>i&&this.cache.delete(e)}}delete(t){return this.cache.delete(t)}clear(){this.cache.clear()}size(){return this.cache.size}}new Fn;const Wi=new Fn,Ul=new Map,Sb=150;function xb(r){const t=new db(r);return{getKline:async e=>{const{symbol:n,market:i,period:a,adjust:o}=e;if(a==="timeline"){const u=await t.getTodayTimeline(n);return u.data.map(f=>({date:`${u.date.slice(0,4)}-${u.date.slice(4,6)}-${u.date.slice(6,8)} ${f.time}`,open:f.price,close:f.price,high:f.price,low:f.price,volume:f.volume,amount:f.amount}))}if(a==="timeline5"){const u=new Date,f=new Date;f.setDate(f.getDate()-7);const h=v=>{const d=v.getFullYear(),p=String(v.getMonth()+1).padStart(2,"0"),g=String(v.getDate()).padStart(2,"0");return`${d}-${p}-${g}`};return(await t.getMinuteKline(n,{period:"1",startDate:h(f),endDate:h(u)})).map(v=>({date:"time"in v?v.time:"",open:v.open,close:v.close,high:v.high,low:v.low,volume:v.volume,amount:v.amount}))}if(["1","5","15","30","60"].includes(a)){let f=(await t.getMinuteKline(n,{period:a,adjust:o||"qfq"})).map(h=>({date:"time"in h?h.time:"",open:h.open,close:h.close,high:h.high,low:h.low,volume:h.volume,amount:h.amount,changePercent:"changePercent"in h?h.changePercent:void 0,change:"change"in h?h.change:void 0,amplitude:"amplitude"in h?h.amplitude:void 0,turnoverRate:"turnoverRate"in h?h.turnoverRate:void 0}));if(a==="1"&&f.length>0){const h=f[f.length-1].date.split(" ")[0];f=f.filter(c=>c.date.startsWith(h))}return f}const l={daily:"daily",weekly:"weekly",monthly:"monthly"}[a]??"daily";switch(i){case"HK":return await t.getHKHistoryKline(n,{period:l,adjust:o||"qfq"});case"US":return await t.getUSHistoryKline(n,{period:l,adjust:o||"qfq"});default:return await t.getHistoryKline(n,{period:l,adjust:o||"qfq"})}},getTimeline:async e=>(await t.getTodayTimeline(e.symbol)).data}}function Cb(r,t,e={}){if(r.length===0)return[];const n=r.map(_=>_.close),i=r.map(_=>({open:_.open,high:_.high,low:_.low,close:_.close,volume:_.volume})),a=t.includes("ma")?_v(n,typeof e.ma=="object"?e.ma:{}):null,o=t.includes("macd")?wv(n,typeof e.macd=="object"?e.macd:{}):null,s=t.includes("boll")?bv(n,typeof e.boll=="object"?e.boll:{}):null,l=t.includes("kdj")?Sv(i,typeof e.kdj=="object"?e.kdj:{}):null,u=t.includes("rsi")?xv(n,typeof e.rsi=="object"?e.rsi:{}):null,f=t.includes("wr")?Cv(i,typeof e.wr=="object"?e.wr:{}):null,h=t.includes("bias")?Tv(n,typeof e.bias=="object"?e.bias:{}):null,c=t.includes("cci")?Dv(i,typeof e.cci=="object"?e.cci:{}):null,v=t.includes("atr")?$l(i,typeof e.atr=="object"?e.atr:{}):null,d=t.includes("obv")?pb(i,typeof e.obv=="object"?e.obv:{}):null,p=t.includes("roc")?gb(n,typeof e.roc=="object"?e.roc:{}):null,g=t.includes("dmi")?mb(i,typeof e.dmi=="object"?e.dmi:{}):null,m=t.includes("sar")?yb(i,typeof e.sar=="object"?e.sar:{}):null,y=t.includes("kc")?_b(i,typeof e.kc=="object"?e.kc:{}):null;return r.map((_,w)=>({..._,ma:a==null?void 0:a[w],macd:o==null?void 0:o[w],boll:s==null?void 0:s[w],kdj:l==null?void 0:l[w],rsi:u==null?void 0:u[w],wr:f==null?void 0:f[w],bias:h==null?void 0:h[w],cci:c==null?void 0:c[w],atr:v==null?void 0:v[w],obv:d==null?void 0:d[w],roc:p==null?void 0:p[w],dmi:g==null?void 0:g[w],sar:m==null?void 0:m[w],kc:y==null?void 0:y[w]}))}function Mv(r){const{symbol:t,market:e,period:n,adjust:i,dataProvider:a,sdkOptions:o,requestOptions:s,indicatorOptions:l,indicators:u=["ma","volume","macd"]}=r,[f,h]=H.useState([]),[c,v]=H.useState([]),[d,p]=H.useState(!1),[g,m]=H.useState(null),y=H.useRef(null),_=H.useRef(null),w=H.useRef(null),b=H.useCallback(()=>a||(w.current||(w.current=xb(o)),w.current),[a,o]),S=H.useCallback(async()=>{(s==null?void 0:s.abortOnChange)!==!1&&y.current&&y.current.abort();const M=new AbortController;y.current=M,p(!0),m(null);try{const A=b(),C=Fn.buildKey({symbol:t,market:e,period:n,adjust:i}),I=Wi.get(C);if(I&&(s==null?void 0:s.dedupe)!==!1){if(h(I),p(!1),n==="timeline"){const P=Fn.buildKey({symbol:t,market:e,type:"timeline"}),k=Wi.get(P);k&&v(k)}return}const E=Ul.get(C);if(E){try{const P=await E;M.signal.aborted||h(P)}catch{}finally{M.signal.aborted||p(!1)}return}const L=A.getKline({symbol:t,market:e,period:n,adjust:i},M.signal);Ul.set(C,L);try{const P=await L;if(M.signal.aborted)return;const k=bb(n);if(Wi.set(C,P,k),h(P),n==="timeline"&&A.getTimeline){const z=await A.getTimeline({symbol:t,market:e},M.signal);if(!M.signal.aborted){const O=Fn.buildKey({symbol:t,market:e,type:"timeline"});Wi.set(O,z,k),v(z)}}}finally{Ul.delete(C)}}catch(A){if(A.name==="AbortError")return;m(A)}finally{M.signal.aborted||p(!1)}},[t,e,n,i,b,s]),x=H.useCallback(async()=>{const M=Fn.buildKey({symbol:t,market:e,period:n,adjust:i});Wi.delete(M),await S()},[t,e,n,i,S]);return H.useEffect(()=>{_.current&&clearTimeout(_.current);const M=(s==null?void 0:s.debounceMs)??Sb;return _.current=setTimeout(S,M),()=>{_.current&&clearTimeout(_.current),y.current&&y.current.abort()}},[t,e,n,i,S,s==null?void 0:s.debounceMs]),{data:Cb(f,u,l),timelineData:c,loading:d,error:g,refresh:x}}/*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation.
3
+
4
+ Permission to use, copy, modify, and/or distribute this software for any
5
+ purpose with or without fee is hereby granted.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
+ PERFORMANCE OF THIS SOFTWARE.
14
+ ***************************************************************************** */var Yl=function(r,t){return Yl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},Yl(r,t)};function N(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Yl(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Tb=(function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r})(),Db=(function(){function r(){this.browser=new Tb,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r})(),j=new Db;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(j.wxa=!0,j.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?j.worker=!0:!j.hasGlobalWindow||"Deno"in window?(j.node=!0,j.svgSupported=!0):Mb(navigator.userAgent,j);function Mb(r,t){var e=t.browser,n=r.match(/Firefox\/([\d.]+)/),i=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(e.firefox=!0,e.version=n[1]),i&&(e.ie=!0,e.version=i[1]),a&&(e.edge=!0,e.version=a[1],e.newEdge=+a[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in s||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}var Zl=12,Ab="sans-serif",Kr=Zl+"px "+Ab,Ib=20,Eb=100,Lb="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Pb(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e<r.length;e++){var n=String.fromCharCode(e+32),i=(r.charCodeAt(e)-Ib)/Eb;t[n]=i}return t}var kb=Pb(Lb),zn={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var r,t;return function(e,n){if(!r){var i=zn.createCanvas();r=i&&i.getContext("2d")}if(r)return t!==n&&(t=r.font=n||Kr),r.measureText(e);e=e||"",n=n||Kr;var a=/((?:\d+)?\.?\d*)px/.exec(n),o=a&&+a[1]||Zl,s=0;if(n.indexOf("mono")>=0)s=o*e.length;else for(var l=0;l<e.length;l++){var u=kb[e[l]];s+=u==null?o:u*o}return{width:s}}})(),loadImage:function(r,t,e){var n=new Image;return n.onload=t,n.onerror=e,n.src=r,n}},Av=Hn(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,t){return r["[object "+t+"]"]=!0,r},{}),Iv=Hn(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,t){return r["[object "+t+"Array]"]=!0,r},{}),Vn=Object.prototype.toString,uo=Array.prototype,Rb=uo.forEach,Ob=uo.filter,Xl=uo.slice,Nb=uo.map,Ev=(function(){}).constructor,fo=Ev?Ev.prototype:null,ql="__proto__",Bb=2311;function Lv(){return Bb++}function jr(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];typeof console<"u"&&console.error.apply(console,r)}function ut(r){if(r==null||typeof r!="object")return r;var t=r,e=Vn.call(r);if(e==="[object Array]"){if(!$i(r)){t=[];for(var n=0,i=r.length;n<i;n++)t[n]=ut(r[n])}}else if(Iv[e]){if(!$i(r)){var a=r.constructor;if(a.from)t=a.from(r);else{t=new a(r.length);for(var n=0,i=r.length;n<i;n++)t[n]=r[n]}}}else if(!Av[e]&&!$i(r)&&!Wn(r)){t={};for(var o in r)r.hasOwnProperty(o)&&o!==ql&&(t[o]=ut(r[o]))}return t}function ct(r,t,e){if(!q(t)||!q(r))return e?ut(t):r;for(var n in t)if(t.hasOwnProperty(n)&&n!==ql){var i=r[n],a=t[n];q(a)&&q(i)&&!W(a)&&!W(i)&&!Wn(a)&&!Wn(i)&&!Pv(a)&&!Pv(i)&&!$i(a)&&!$i(i)?ct(i,a,e):(e||!(n in r))&&(r[n]=ut(t[n]))}return r}function B(r,t){if(Object.assign)Object.assign(r,t);else for(var e in t)t.hasOwnProperty(e)&&e!==ql&&(r[e]=t[e]);return r}function gt(r,t,e){for(var n=Ct(t),i=0,a=n.length;i<a;i++){var o=n[i];(e?t[o]!=null:r[o]==null)&&(r[o]=t[o])}return r}function mt(r,t){if(r){if(r.indexOf)return r.indexOf(t);for(var e=0,n=r.length;e<n;e++)if(r[e]===t)return e}return-1}function Fb(r,t){var e=r.prototype;function n(){}n.prototype=t.prototype,r.prototype=new n;for(var i in e)e.hasOwnProperty(i)&&(r.prototype[i]=e[i]);r.prototype.constructor=r,r.superClass=t}function Fe(r,t,e){if(r="prototype"in r?r.prototype:r,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var a=n[i];a!=="constructor"&&(e?t[a]!=null:r[a]==null)&&(r[a]=t[a])}else gt(r,t,e)}function oe(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function D(r,t,e){if(r&&t)if(r.forEach&&r.forEach===Rb)r.forEach(t,e);else if(r.length===+r.length)for(var n=0,i=r.length;n<i;n++)t.call(e,r[n],n,r);else for(var a in r)r.hasOwnProperty(a)&&t.call(e,r[a],a,r)}function X(r,t,e){if(!r)return[];if(!t)return Kl(r);if(r.map&&r.map===Nb)return r.map(t,e);for(var n=[],i=0,a=r.length;i<a;i++)n.push(t.call(e,r[i],i,r));return n}function Hn(r,t,e,n){if(r&&t){for(var i=0,a=r.length;i<a;i++)e=t.call(n,e,r[i],i,r);return e}}function Gt(r,t,e){if(!r)return[];if(!t)return Kl(r);if(r.filter&&r.filter===Ob)return r.filter(t,e);for(var n=[],i=0,a=r.length;i<a;i++)t.call(e,r[i],i,r)&&n.push(r[i]);return n}function Ct(r){if(!r)return[];if(Object.keys)return Object.keys(r);var t=[];for(var e in r)r.hasOwnProperty(e)&&t.push(e);return t}function zb(r,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];return function(){return r.apply(t,e.concat(Xl.call(arguments)))}}var J=fo&&Q(fo.bind)?fo.call.bind(fo.bind):zb;function At(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return function(){return r.apply(this,t.concat(Xl.call(arguments)))}}function W(r){return Array.isArray?Array.isArray(r):Vn.call(r)==="[object Array]"}function Q(r){return typeof r=="function"}function G(r){return typeof r=="string"}function ho(r){return Vn.call(r)==="[object String]"}function xt(r){return typeof r=="number"}function q(r){var t=typeof r;return t==="function"||!!r&&t==="object"}function Pv(r){return!!Av[Vn.call(r)]}function te(r){return!!Iv[Vn.call(r)]}function Wn(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function co(r){return r.colorStops!=null}function Vb(r){return r.image!=null}function Hb(r){return Vn.call(r)==="[object RegExp]"}function Gi(r){return r!==r}function Qr(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var e=0,n=r.length;e<n;e++)if(r[e]!=null)return r[e]}function nt(r,t){return r??t}function Gn(r,t,e){return r??t??e}function Kl(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return Xl.apply(r,t)}function kv(r){if(typeof r=="number")return[r,r,r,r];var t=r.length;return t===2?[r[0],r[1],r[0],r[1]]:t===3?[r[0],r[1],r[2],r[1]]:r}function it(r,t){if(!r)throw new Error(t)}function Xe(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Rv="__ec_primitive__";function jl(r){r[Rv]=!0}function $i(r){return r[Rv]}var Wb=(function(){function r(){this.data={}}return r.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},r.prototype.has=function(t){return this.data.hasOwnProperty(t)},r.prototype.get=function(t){return this.data[t]},r.prototype.set=function(t,e){return this.data[t]=e,this},r.prototype.keys=function(){return Ct(this.data)},r.prototype.forEach=function(t){var e=this.data;for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)},r})(),Ov=typeof Map=="function";function Gb(){return Ov?new Map:new Wb}var $b=(function(){function r(t){var e=W(t);this.data=Gb();var n=this;t instanceof r?t.each(i):t&&D(t,i);function i(a,o){e?n.set(a,o):n.set(o,a)}}return r.prototype.hasKey=function(t){return this.data.has(t)},r.prototype.get=function(t){return this.data.get(t)},r.prototype.set=function(t,e){return this.data.set(t,e),e},r.prototype.each=function(t,e){this.data.forEach(function(n,i){t.call(e,n,i)})},r.prototype.keys=function(){var t=this.data.keys();return Ov?Array.from(t):t},r.prototype.removeKey=function(t){this.data.delete(t)},r})();function tt(r){return new $b(r)}function Ub(r,t){for(var e=new r.constructor(r.length+t.length),n=0;n<r.length;n++)e[n]=r[n];for(var i=r.length,n=0;n<t.length;n++)e[n+i]=t[n];return e}function vo(r,t){var e;if(Object.create)e=Object.create(r);else{var n=function(){};n.prototype=r,e=new n}return t&&B(e,t),e}function Nv(r){var t=r.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function Jr(r,t){return r.hasOwnProperty(t)}function ee(){}var Yb=180/Math.PI;function $n(r,t){return r==null&&(r=0),t==null&&(t=0),[r,t]}function Zb(r){return[r[0],r[1]]}function Bv(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r}function Xb(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r}function qb(r){return Math.sqrt(Kb(r))}function Kb(r){return r[0]*r[0]+r[1]*r[1]}function Ql(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r}function jb(r,t){var e=qb(t);return e===0?(r[0]=0,r[1]=0):(r[0]=t[0]/e,r[1]=t[1]/e),r}function Jl(r,t){return Math.sqrt((r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1]))}var Qb=Jl;function Jb(r,t){return(r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1])}var Un=Jb;function Se(r,t,e){var n=t[0],i=t[1];return r[0]=e[0]*n+e[2]*i+e[4],r[1]=e[1]*n+e[3]*i+e[5],r}function Yn(r,t,e){return r[0]=Math.min(t[0],e[0]),r[1]=Math.min(t[1],e[1]),r}function Zn(r,t,e){return r[0]=Math.max(t[0],e[0]),r[1]=Math.max(t[1],e[1]),r}var Xn=(function(){function r(t,e){this.target=t,this.topTarget=e&&e.topTarget}return r})(),tS=(function(){function r(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Xn(e,t),"dragstart",t.event))},r.prototype._drag=function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,a=n-this._x,o=i-this._y;this._x=n,this._y=i,e.drift(a,o,t),this.handler.dispatchToElement(new Xn(e,t),"drag",t.event);var s=this.handler.findHover(n,i,e).target,l=this._dropTarget;this._dropTarget=s,e!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Xn(l,t),"dragleave",t.event),s&&s!==l&&this.handler.dispatchToElement(new Xn(s,t),"dragenter",t.event))}},r.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new Xn(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Xn(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},r})(),ze=(function(){function r(t){t&&(this._$eventProcessor=t)}return r.prototype.on=function(t,e,n,i){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof e=="function"&&(i=n,n=e,e=null),!n||!t)return this;var o=this._$eventProcessor;e!=null&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),a[t]||(a[t]=[]);for(var s=0;s<a[t].length;s++)if(a[t][s].h===n)return this;var l={h:n,query:e,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},u=a[t].length-1,f=a[t][u];return f&&f.callAtLast?a[t].splice(u,0,l):a[t].push(l),this},r.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},r.prototype.off=function(t,e){var n=this._$handlers;if(!n)return this;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],a=0,o=n[t].length;a<o;a++)n[t][a].h!==e&&i.push(n[t][a]);n[t]=i}n[t]&&n[t].length===0&&delete n[t]}else delete n[t];return this},r.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],a=this._$eventProcessor;if(i)for(var o=e.length,s=i.length,l=0;l<s;l++){var u=i[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(t,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,e[0]);break;case 2:u.h.call(u.ctx,e[0],e[1]);break;default:u.h.apply(u.ctx,e);break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},r.prototype.triggerWithContext=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],a=this._$eventProcessor;if(i)for(var o=e.length,s=e[o-1],l=i.length,u=0;u<l;u++){var f=i[u];if(!(a&&a.filter&&f.query!=null&&!a.filter(t,f.query)))switch(o){case 0:f.h.call(s);break;case 1:f.h.call(s,e[0]);break;case 2:f.h.call(s,e[0],e[1]);break;default:f.h.apply(s,e.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},r})(),eS=Math.log(2);function tu(r,t,e,n,i,a){var o=n+"-"+i,s=r.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var l=Math.round(Math.log((1<<s)-1&~i)/eS);return r[e][l]}for(var u=n|1<<e,f=e+1;n&1<<f;)f++;for(var h=0,c=0,v=0;c<s;c++){var d=1<<c;d&i||(h+=(v%2?-1:1)*r[e][c]*tu(r,t-1,f,u,i|d,a),v++)}return a[o]=h,h}function Fv(r,t){var e=[[r[0],r[1],1,0,0,0,-t[0]*r[0],-t[0]*r[1]],[0,0,0,r[0],r[1],1,-t[1]*r[0],-t[1]*r[1]],[r[2],r[3],1,0,0,0,-t[2]*r[2],-t[2]*r[3]],[0,0,0,r[2],r[3],1,-t[3]*r[2],-t[3]*r[3]],[r[4],r[5],1,0,0,0,-t[4]*r[4],-t[4]*r[5]],[0,0,0,r[4],r[5],1,-t[5]*r[4],-t[5]*r[5]],[r[6],r[7],1,0,0,0,-t[6]*r[6],-t[6]*r[7]],[0,0,0,r[6],r[7],1,-t[7]*r[6],-t[7]*r[7]]],n={},i=tu(e,8,0,0,0,n);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*tu(e,7,o===0?1:0,1<<o,1<<s,n)/i*t[o];return function(l,u,f){var h=u*a[6]+f*a[7]+1;l[0]=(u*a[0]+f*a[1]+a[2])/h,l[1]=(u*a[3]+f*a[4]+a[5])/h}}}var zv="___zrEVENTSAVED",eu=[];function rS(r,t,e,n,i){return ru(eu,t,n,i,!0)&&ru(r,e,eu[0],eu[1])}function ru(r,t,e,n,i){if(t.getBoundingClientRect&&j.domSupported&&!Vv(t)){var a=t[zv]||(t[zv]={}),o=nS(t,a),s=iS(o,a,i);if(s)return s(r,e,n),!0}return!1}function nS(r,t){var e=t.markers;if(e)return e;e=t.markers=[];for(var n=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return e}function iS(r,t,e){for(var n=e?"invTrans":"trans",i=t[n],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),h=2*u,c=f.left,v=f.top;o.push(c,v),l=l&&a&&c===a[h]&&v===a[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&i?i:(t.srcCoords=o,t[n]=e?Fv(s,o):Fv(o,s))}function Vv(r){return r.nodeName.toUpperCase()==="CANVAS"}var aS=/([&<>"'])/g,oS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function se(r){return r==null?"":(r+"").replace(aS,function(t,e){return oS[e]})}var sS=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,nu=[],lS=j.browser.firefox&&+j.browser.version.split(".")[0]<39;function iu(r,t,e,n){return e=e||{},n?Hv(r,t,e):lS&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):Hv(r,t,e),e}function Hv(r,t,e){if(j.domSupported&&r.getBoundingClientRect){var n=t.clientX,i=t.clientY;if(Vv(r)){var a=r.getBoundingClientRect();e.zrX=n-a.left,e.zrY=i-a.top;return}else if(ru(nu,r,n,i)){e.zrX=nu[0],e.zrY=nu[1];return}}e.zrX=e.zrY=0}function au(r){return r||window.event}function xe(r,t,e){if(t=au(t),t.zrX!=null)return t;var n=t.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&iu(r,o,t,e)}else{iu(r,t,t,e);var a=uS(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&sS.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function uS(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,n=r.deltaY;if(e==null||n==null)return t;var i=Math.abs(n!==0?n:e),a=n>0?-1:n<0?1:e>0?-1:1;return 3*i*a}function fS(r,t,e,n){r.addEventListener(t,e,n)}function hS(r,t,e,n){r.removeEventListener(t,e,n)}var qn=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function Wv(r){return r.which===2||r.which===3}var cS=(function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var a={points:[],touches:[],target:e,event:t},o=0,s=i.length;o<s;o++){var l=i[o],u=iu(n,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},r.prototype._recognize=function(t){for(var e in ou)if(ou.hasOwnProperty(e)){var n=ou[e](this._track,t);if(n)return n}},r})();function Gv(r){var t=r[1][0]-r[0][0],e=r[1][1]-r[0][1];return Math.sqrt(t*t+e*e)}function vS(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var ou={pinch:function(r,t){var e=r.length;if(e){var n=(r[e-1]||{}).points,i=(r[e-2]||{}).points||n;if(i&&i.length>1&&n&&n.length>1){var a=Gv(n)/Gv(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=vS(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function Kn(){return[1,0,0,1,0,0]}function su(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function dS(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function jn(r,t,e){var n=t[0]*e[0]+t[2]*e[1],i=t[1]*e[0]+t[3]*e[1],a=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function lu(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function uu(r,t,e,n){n===void 0&&(n=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],l=t[3],u=t[5],f=Math.sin(e),h=Math.cos(e);return r[0]=i*h+s*f,r[1]=-i*f+s*h,r[2]=a*h+l*f,r[3]=-a*f+h*l,r[4]=h*(o-n[0])+f*(u-n[1])+n[0],r[5]=h*(u-n[1])-f*(o-n[0])+n[1],r}function pS(r,t,e){var n=e[0],i=e[1];return r[0]=t[0]*n,r[1]=t[1]*i,r[2]=t[2]*n,r[3]=t[3]*i,r[4]=t[4]*n,r[5]=t[5]*i,r}function fu(r,t){var e=t[0],n=t[2],i=t[4],a=t[1],o=t[3],s=t[5],l=e*o-a*n;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-n*l,r[3]=e*l,r[4]=(n*s-o*i)*l,r[5]=(a*i-e*s)*l,r):null}var bt=(function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,n){t.x=e,t.y=n},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},r.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},r.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},r.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},r.lerp=function(t,e,n,i){var a=1-i;t.x=a*e.x+i*n.x,t.y=a*e.y+i*n.y},r})(),po=Math.min,go=Math.max,tn=new bt,en=new bt,rn=new bt,nn=new bt,Ui=new bt,Yi=new bt,pt=(function(){function r(t,e,n,i){n<0&&(t=t+n,n=-n),i<0&&(e=e+i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return r.prototype.union=function(t){var e=po(t.x,this.x),n=po(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=go(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=go(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,i=t.height/e.height,a=Kn();return lu(a,a,[-e.x,-e.y]),pS(a,a,[n,i]),lu(a,a,[t.x,t.y]),a},r.prototype.intersect=function(t,e){if(!t)return!1;t instanceof r||(t=r.create(t));var n=this,i=n.x,a=n.x+n.width,o=n.y,s=n.y+n.height,l=t.x,u=t.x+t.width,f=t.y,h=t.y+t.height,c=!(a<l||u<i||s<f||h<o);if(e){var v=1/0,d=0,p=Math.abs(a-l),g=Math.abs(u-i),m=Math.abs(s-f),y=Math.abs(h-o),_=Math.min(p,g),w=Math.min(m,y);a<l||u<i?_>d&&(d=_,p<g?bt.set(Yi,-p,0):bt.set(Yi,g,0)):_<v&&(v=_,p<g?bt.set(Ui,p,0):bt.set(Ui,-g,0)),s<f||h<o?w>d&&(d=w,m<y?bt.set(Yi,0,-m):bt.set(Yi,0,y)):_<v&&(v=_,m<y?bt.set(Ui,0,m):bt.set(Ui,0,-y))}return e&&bt.copy(e,c?Ui:Yi),c},r.prototype.contain=function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},r.applyTransform=function(t,e,n){if(!n){t!==e&&r.copy(t,e);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];t.x=e.x*i+o,t.y=e.y*a+s,t.width=e.width*i,t.height=e.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}tn.x=rn.x=e.x,tn.y=nn.y=e.y,en.x=nn.x=e.x+e.width,en.y=rn.y=e.y+e.height,tn.transform(n),nn.transform(n),en.transform(n),rn.transform(n),t.x=po(tn.x,en.x,rn.x,nn.x),t.y=po(tn.y,en.y,rn.y,nn.y);var l=go(tn.x,en.x,rn.x,nn.x),u=go(tn.y,en.y,rn.y,nn.y);t.width=l-t.x,t.height=u-t.y},r})(),$v="silent";function gS(r,t,e){return{type:r,event:e,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:e.zrX,offsetY:e.zrY,gestureEvent:e.gestureEvent,pinchX:e.pinchX,pinchY:e.pinchY,pinchScale:e.pinchScale,wheelDelta:e.zrDelta,zrByTouch:e.zrByTouch,which:e.which,stop:mS}}function mS(){qn(this.event)}var yS=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.handler=null,e}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t})(ze),Zi=(function(){function r(t,e){this.x=t,this.y=e}return r})(),_S=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],hu=new pt(0,0,0,0),Uv=(function(r){N(t,r);function t(e,n,i,a,o){var s=r.call(this)||this;return s._hovered=new Zi(0,0),s.storage=e,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new yS,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new tS(s),s}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(D(_S,function(n){e.on&&e.on(n,this[n],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var n=e.zrX,i=e.zrY,a=Zv(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new Zi(n,i):this.findHover(n,i),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(l,"mousemove",e),u&&u!==s&&this.dispatchToElement(l,"mouseover",e)},t.prototype.mouseout=function(e){var n=e.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",e),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new Zi(0,0)},t.prototype.dispatch=function(e,n){var i=this[e];i&&i.call(this,n)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var n=this.proxy;n.setCursor&&n.setCursor(e)},t.prototype.dispatchToElement=function(e,n,i){e=e||{};var a=e.target;if(!(a&&a.silent)){for(var o="on"+n,s=gS(n,e,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},t.prototype.findHover=function(e,n,i){var a=this.storage.getDisplayList(),o=new Zi(e,n);if(Yv(a,o,e,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new pt(e-u,n-u,l,l),h=a.length-1;h>=0;h--){var c=a[h];c!==i&&!c.ignore&&!c.ignoreCoarsePointer&&(!c.parent||!c.parent.ignoreCoarsePointer)&&(hu.copy(c.getBoundingRect()),c.transform&&hu.applyTransform(c.transform),hu.intersect(f)&&s.push(c))}if(s.length)for(var v=4,d=Math.PI/12,p=Math.PI*2,g=0;g<u;g+=v)for(var m=0;m<p;m+=d){var y=e+g*Math.cos(m),_=n+g*Math.sin(m);if(Yv(s,o,y,_,i),o.target)return o}}return o},t.prototype.processGesture=function(e,n){this._gestureMgr||(this._gestureMgr=new cS);var i=this._gestureMgr;n==="start"&&i.clear();var a=i.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(n==="end"&&i.clear(),a){var o=a.type;e.gestureEvent=o;var s=new Zi;s.target=a.target,this.dispatchToElement(s,o,a.event)}},t})(ze);D(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){Uv.prototype[r]=function(t){var e=t.zrX,n=t.zrY,i=Zv(this,e,n),a,o;if((r!=="mouseup"||!i)&&(a=this.findHover(e,n),o=a.target),r==="mousedown")this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||Qb(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,r,t)}});function wS(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var n=r,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(t,e))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s||n.parent}return i?$v:!0}return!1}function Yv(r,t,e,n,i){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==i&&!o.ignore&&(s=wS(o,e,n))&&(!t.topTarget&&(t.topTarget=o),s!==$v)){t.target=o;break}}}function Zv(r,t,e){var n=r.painter;return t<0||t>n.getWidth()||e<0||e>n.getHeight()}var Xv=32,Xi=7;function bS(r){for(var t=0;r>=Xv;)t|=r&1,r>>=1;return r+t}function qv(r,t,e,n){var i=t+1;if(i===e)return 1;if(n(r[i++],r[t])<0){for(;i<e&&n(r[i],r[i-1])<0;)i++;SS(r,t,i)}else for(;i<e&&n(r[i],r[i-1])>=0;)i++;return i-t}function SS(r,t,e){for(e--;t<e;){var n=r[t];r[t++]=r[e],r[e--]=n}}function Kv(r,t,e,n,i){for(n===t&&n++;n<e;n++){for(var a=r[n],o=t,s=n,l;o<s;)l=o+s>>>1,i(a,r[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=a}}function cu(r,t,e,n,i,a){var o=0,s=0,l=1;if(a(r,t[e+i])>0){for(s=n-i;l<s&&a(r,t[e+i+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&a(r,t[e+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o<l;){var f=o+(l-o>>>1);a(r,t[e+f])>0?o=f+1:l=f}return l}function vu(r,t,e,n,i,a){var o=0,s=0,l=1;if(a(r,t[e+i])<0){for(s=i+1;l<s&&a(r,t[e+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l<s&&a(r,t[e+i+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var f=o+(l-o>>>1);a(r,t[e+f])<0?l=f:o=f+1}return l}function xS(r,t){var e=Xi,n,i,a=0,o=[];n=[],i=[];function s(v,d){n[a]=v,i[a]=d,a+=1}function l(){for(;a>1;){var v=a-2;if(v>=1&&i[v-1]<=i[v]+i[v+1]||v>=2&&i[v-2]<=i[v]+i[v-1])i[v-1]<i[v+1]&&v--;else if(i[v]>i[v+1])break;f(v)}}function u(){for(;a>1;){var v=a-2;v>0&&i[v-1]<i[v+1]&&v--,f(v)}}function f(v){var d=n[v],p=i[v],g=n[v+1],m=i[v+1];i[v]=p+m,v===a-3&&(n[v+1]=n[v+2],i[v+1]=i[v+2]),a--;var y=vu(r[g],r,d,p,0,t);d+=y,p-=y,p!==0&&(m=cu(r[d+p-1],r,g,m,m-1,t),m!==0&&(p<=m?h(d,p,g,m):c(d,p,g,m)))}function h(v,d,p,g){var m=0;for(m=0;m<d;m++)o[m]=r[v+m];var y=0,_=p,w=v;if(r[w++]=r[_++],--g===0){for(m=0;m<d;m++)r[w+m]=o[y+m];return}if(d===1){for(m=0;m<g;m++)r[w+m]=r[_+m];r[w+g]=o[y];return}for(var b=e,S,x,T;;){S=0,x=0,T=!1;do if(t(r[_],o[y])<0){if(r[w++]=r[_++],x++,S=0,--g===0){T=!0;break}}else if(r[w++]=o[y++],S++,x=0,--d===1){T=!0;break}while((S|x)<b);if(T)break;do{if(S=vu(r[_],o,y,d,0,t),S!==0){for(m=0;m<S;m++)r[w+m]=o[y+m];if(w+=S,y+=S,d-=S,d<=1){T=!0;break}}if(r[w++]=r[_++],--g===0){T=!0;break}if(x=cu(o[y],r,_,g,0,t),x!==0){for(m=0;m<x;m++)r[w+m]=r[_+m];if(w+=x,_+=x,g-=x,g===0){T=!0;break}}if(r[w++]=o[y++],--d===1){T=!0;break}b--}while(S>=Xi||x>=Xi);if(T)break;b<0&&(b=0),b+=2}if(e=b,e<1&&(e=1),d===1){for(m=0;m<g;m++)r[w+m]=r[_+m];r[w+g]=o[y]}else{if(d===0)throw new Error;for(m=0;m<d;m++)r[w+m]=o[y+m]}}function c(v,d,p,g){var m=0;for(m=0;m<g;m++)o[m]=r[p+m];var y=v+d-1,_=g-1,w=p+g-1,b=0,S=0;if(r[w--]=r[y--],--d===0){for(b=w-(g-1),m=0;m<g;m++)r[b+m]=o[m];return}if(g===1){for(w-=d,y-=d,S=w+1,b=y+1,m=d-1;m>=0;m--)r[S+m]=r[b+m];r[w]=o[_];return}for(var x=e;;){var T=0,M=0,A=!1;do if(t(o[_],r[y])<0){if(r[w--]=r[y--],T++,M=0,--d===0){A=!0;break}}else if(r[w--]=o[_--],M++,T=0,--g===1){A=!0;break}while((T|M)<x);if(A)break;do{if(T=d-vu(o[_],r,v,d,d-1,t),T!==0){for(w-=T,y-=T,d-=T,S=w+1,b=y+1,m=T-1;m>=0;m--)r[S+m]=r[b+m];if(d===0){A=!0;break}}if(r[w--]=o[_--],--g===1){A=!0;break}if(M=g-cu(r[y],o,0,g,g-1,t),M!==0){for(w-=M,_-=M,g-=M,S=w+1,b=_+1,m=0;m<M;m++)r[S+m]=o[b+m];if(g<=1){A=!0;break}}if(r[w--]=r[y--],--d===0){A=!0;break}x--}while(T>=Xi||M>=Xi);if(A)break;x<0&&(x=0),x+=2}if(e=x,e<1&&(e=1),g===1){for(w-=d,y-=d,S=w+1,b=y+1,m=d-1;m>=0;m--)r[S+m]=r[b+m];r[w]=o[_]}else{if(g===0)throw new Error;for(b=w-(g-1),m=0;m<g;m++)r[b+m]=o[m]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function mo(r,t,e,n){e||(e=0),n||(n=r.length);var i=n-e;if(!(i<2)){var a=0;if(i<Xv){a=qv(r,e,n,t),Kv(r,e,n,e+a,t);return}var o=xS(r,t),s=bS(i);do{if(a=qv(r,e,n,t),a<s){var l=i;l>s&&(l=s),Kv(r,e,e+l,e+a,t),a=l}o.pushRun(e,a),o.mergeRuns(),i-=a,e+=a}while(i!==0);o.forceMergeRuns()}}var ge=1,qi=2,Qn=4,jv=!1;function du(){jv||(jv=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Qv(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var CS=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Qv}return r.prototype.traverse=function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},r.prototype.getDisplayList=function(t,e){e=e||!1;var n=this._displayList;return(t||!n.length)&&this.updateDisplayList(e),n},r.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,i=0,a=e.length;i<a;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,mo(n,Qv)},r.prototype._updateAndAddDisplayable=function(t,e,n){if(!(t.ignore&&!n)){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath();if(t.ignoreClip)e=null;else if(i){e?e=e.slice():e=[];for(var a=i,o=t;a;)a.parent=o,a.updateTransform(),e.push(a),o=a,a=a.getClipPath()}if(t.childrenRef){for(var s=t.childrenRef(),l=0;l<s.length;l++){var u=s[l];t.__dirty&&(u.__dirty|=ge),this._updateAndAddDisplayable(u,e,n)}t.__dirty=0}else{var f=t;e&&e.length?f.__clipPaths=e:f.__clipPaths&&f.__clipPaths.length>0&&(f.__clipPaths=[]),isNaN(f.z)&&(du(),f.z=0),isNaN(f.z2)&&(du(),f.z2=0),isNaN(f.zlevel)&&(du(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,n);var v=t.getTextContent();v&&this._updateAndAddDisplayable(v,e,n)}},r.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},r.prototype.delRoot=function(t){if(t instanceof Array){for(var e=0,n=t.length;e<n;e++)this.delRoot(t[e]);return}var i=mt(this._roots,t);i>=0&&this._roots.splice(i,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r})(),yo;yo=j.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var Ki={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)))},elasticOut:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/n)+1)},elasticInOut:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-Ki.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?Ki.bounceIn(r*2)*.5:Ki.bounceOut(r*2-1)*.5+.5}},_o=Math.pow,xr=Math.sqrt,wo=1e-8,Jv=1e-4,td=xr(3),bo=1/3,qe=$n(),Ce=$n(),Jn=$n();function Cr(r){return r>-wo&&r<wo}function ed(r){return r>wo||r<-wo}function $t(r,t,e,n,i){var a=1-i;return a*a*(a*r+3*i*t)+i*i*(i*n+3*a*e)}function rd(r,t,e,n,i){var a=1-i;return 3*(((t-r)*a+2*(e-t)*i)*a+(n-e)*i*i)}function So(r,t,e,n,i,a){var o=n+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-i,f=s*s-3*o*l,h=s*l-9*o*u,c=l*l-3*s*u,v=0;if(Cr(f)&&Cr(h))if(Cr(s))a[0]=0;else{var d=-l/s;d>=0&&d<=1&&(a[v++]=d)}else{var p=h*h-4*f*c;if(Cr(p)){var g=h/f,d=-s/o+g,m=-g/2;d>=0&&d<=1&&(a[v++]=d),m>=0&&m<=1&&(a[v++]=m)}else if(p>0){var y=xr(p),_=f*s+1.5*o*(-h+y),w=f*s+1.5*o*(-h-y);_<0?_=-_o(-_,bo):_=_o(_,bo),w<0?w=-_o(-w,bo):w=_o(w,bo);var d=(-s-(_+w))/(3*o);d>=0&&d<=1&&(a[v++]=d)}else{var b=(2*f*s-3*o*h)/(2*xr(f*f*f)),S=Math.acos(b)/3,x=xr(f),T=Math.cos(S),d=(-s-2*x*T)/(3*o),m=(-s+x*(T+td*Math.sin(S)))/(3*o),M=(-s+x*(T-td*Math.sin(S)))/(3*o);d>=0&&d<=1&&(a[v++]=d),m>=0&&m<=1&&(a[v++]=m),M>=0&&M<=1&&(a[v++]=M)}}return v}function nd(r,t,e,n,i){var a=6*e-12*t+6*r,o=9*t+3*n-3*r-9*e,s=3*t-3*r,l=0;if(Cr(o)){if(ed(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var f=a*a-4*o*s;if(Cr(f))i[0]=-a/(2*o);else if(f>0){var h=xr(f),u=(-a+h)/(2*o),c=(-a-h)/(2*o);u>=0&&u<=1&&(i[l++]=u),c>=0&&c<=1&&(i[l++]=c)}}return l}function xo(r,t,e,n,i,a){var o=(t-r)*i+r,s=(e-t)*i+t,l=(n-e)*i+e,u=(s-o)*i+o,f=(l-s)*i+s,h=(f-u)*i+u;a[0]=r,a[1]=o,a[2]=u,a[3]=h,a[4]=h,a[5]=f,a[6]=l,a[7]=n}function TS(r,t,e,n,i,a,o,s,l,u,f){var h,c=.005,v=1/0,d,p,g,m;qe[0]=l,qe[1]=u;for(var y=0;y<1;y+=.05)Ce[0]=$t(r,e,i,o,y),Ce[1]=$t(t,n,a,s,y),g=Un(qe,Ce),g<v&&(h=y,v=g);v=1/0;for(var _=0;_<32&&!(c<Jv);_++)d=h-c,p=h+c,Ce[0]=$t(r,e,i,o,d),Ce[1]=$t(t,n,a,s,d),g=Un(Ce,qe),d>=0&&g<v?(h=d,v=g):(Jn[0]=$t(r,e,i,o,p),Jn[1]=$t(t,n,a,s,p),m=Un(Jn,qe),p<=1&&m<v?(h=p,v=m):c*=.5);return xr(v)}function DS(r,t,e,n,i,a,o,s,l){for(var u=r,f=t,h=0,c=1/l,v=1;v<=l;v++){var d=v*c,p=$t(r,e,i,o,d),g=$t(t,n,a,s,d),m=p-u,y=g-f;h+=Math.sqrt(m*m+y*y),u=p,f=g}return h}function le(r,t,e,n){var i=1-n;return i*(i*r+2*n*t)+n*n*e}function id(r,t,e,n){return 2*((1-n)*(t-r)+n*(e-t))}function MS(r,t,e,n,i){var a=r-2*t+e,o=2*(t-r),s=r-n,l=0;if(Cr(a)){if(ed(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var f=o*o-4*a*s;if(Cr(f)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(f>0){var h=xr(f),u=(-o+h)/(2*a),c=(-o-h)/(2*a);u>=0&&u<=1&&(i[l++]=u),c>=0&&c<=1&&(i[l++]=c)}}return l}function ad(r,t,e){var n=r+e-2*t;return n===0?.5:(r-t)/n}function Co(r,t,e,n,i){var a=(t-r)*n+r,o=(e-t)*n+t,s=(o-a)*n+a;i[0]=r,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=e}function AS(r,t,e,n,i,a,o,s,l){var u,f=.005,h=1/0;qe[0]=o,qe[1]=s;for(var c=0;c<1;c+=.05){Ce[0]=le(r,e,i,c),Ce[1]=le(t,n,a,c);var v=Un(qe,Ce);v<h&&(u=c,h=v)}h=1/0;for(var d=0;d<32&&!(f<Jv);d++){var p=u-f,g=u+f;Ce[0]=le(r,e,i,p),Ce[1]=le(t,n,a,p);var v=Un(Ce,qe);if(p>=0&&v<h)u=p,h=v;else{Jn[0]=le(r,e,i,g),Jn[1]=le(t,n,a,g);var m=Un(Jn,qe);g<=1&&m<h?(u=g,h=m):f*=.5}}return xr(h)}function IS(r,t,e,n,i,a,o){for(var s=r,l=t,u=0,f=1/o,h=1;h<=o;h++){var c=h*f,v=le(r,e,i,c),d=le(t,n,a,c),p=v-s,g=d-l;u+=Math.sqrt(p*p+g*g),s=v,l=d}return u}var ES=/cubic-bezier\(([0-9,\.e ]+)\)/;function od(r){var t=r&&ES.exec(r);if(t){var e=t[1].split(","),n=+Xe(e[0]),i=+Xe(e[1]),a=+Xe(e[2]),o=+Xe(e[3]);if(isNaN(n+i+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:So(0,n,a,1,l,s)&&$t(0,i,o,1,s[0])}}}var LS=(function(){function r(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||ee,this.ondestroy=t.ondestroy||ee,this.onrestart=t.onrestart||ee,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var n=this._life,i=t-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Q(t)?t:Ki[t]||od(t)},r})(),sd=(function(){function r(t){this.value=t}return r})(),PS=(function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new sd(t);return this.insertEntry(e),e},r.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r})(),ji=(function(){function r(t){this._list=new PS,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var n=this._list,i=this._map,a=null;if(i[t]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new sd(e),s.key=t,n.insertEntry(s),i[t]=s}return a},r.prototype.get=function(t){var e=this._map[t],n=this._list;if(e!=null)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),ld={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Tr(r){return r=Math.round(r),r<0?0:r>255?255:r}function pu(r){return r<0?0:r>1?1:r}function gu(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Tr(parseFloat(t)/100*255):Tr(parseInt(t,10))}function Qi(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?pu(parseFloat(t)/100):pu(parseFloat(t))}function mu(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function To(r,t,e){return r+(t-r)*e}function Te(r,t,e,n,i){return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r}function yu(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var ud=new ji(20),Do=null;function ti(r,t){Do&&yu(Do,t),Do=ud.put(r,Do||t.slice())}function lr(r,t){if(r){t=t||[];var e=ud.get(r);if(e)return yu(t,e);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in ld)return yu(t,ld[n]),ti(r,t),t;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Te(t,0,0,0,1);return}return Te(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),ti(r,t),t}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Te(t,0,0,0,1);return}return Te(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),ti(r,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Te(t,+u[0],+u[1],+u[2],1):Te(t,0,0,0,1);f=Qi(u.pop());case"rgb":if(u.length>=3)return Te(t,gu(u[0]),gu(u[1]),gu(u[2]),u.length===3?f:Qi(u[3])),ti(r,t),t;Te(t,0,0,0,1);return;case"hsla":if(u.length!==4){Te(t,0,0,0,1);return}return u[3]=Qi(u[3]),fd(u,t),ti(r,t),t;case"hsl":if(u.length!==3){Te(t,0,0,0,1);return}return fd(u,t),ti(r,t),t;default:return}}Te(t,0,0,0,1)}}function fd(r,t){var e=(parseFloat(r[0])%360+360)%360/360,n=Qi(r[1]),i=Qi(r[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return t=t||[],Te(t,Tr(mu(o,a,e+1/3)*255),Tr(mu(o,a,e)*255),Tr(mu(o,a,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function hd(r,t){var e=lr(r);if(e){for(var n=0;n<3;n++)e[n]=e[n]*(1-t)|0,e[n]>255?e[n]=255:e[n]<0&&(e[n]=0);return Mo(e,e.length===4?"rgba":"rgb")}}function kS(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var n=r*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=lr(t[i]),s=lr(t[a]),l=n-i,u=Mo([Tr(To(o[0],s[0],l)),Tr(To(o[1],s[1],l)),Tr(To(o[2],s[2],l)),pu(To(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}function Mo(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function Ao(r,t){var e=lr(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}var cd=new ji(100);function vd(r){if(G(r)){var t=cd.get(r);return t||(t=hd(r,-.1),cd.put(r,t)),t}else if(co(r)){var e=B({},r);return e.colorStops=X(r.colorStops,function(n){return{offset:n.offset,color:hd(n.color,-.1)}}),e}return r}function RS(r){return r.type==="linear"}function OS(r){return r.type==="radial"}(function(){return j.hasGlobalWindow&&Q(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return process.env.NODE_ENV!=="production"&&jr("Base64 isn't natively supported in the current environment."),null}})();var _u=Array.prototype.slice;function ur(r,t,e){return(t-r)*e+r}function wu(r,t,e,n){for(var i=t.length,a=0;a<i;a++)r[a]=ur(t[a],e[a],n);return r}function NS(r,t,e,n){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=ur(t[o][s],e[o][s],n)}return r}function Io(r,t,e,n){for(var i=t.length,a=0;a<i;a++)r[a]=t[a]+e[a]*n;return r}function dd(r,t,e,n){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=t[o][s]+e[o][s]*n}return r}function BS(r,t){for(var e=r.length,n=t.length,i=e>n?t:r,a=Math.min(e,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(e,n);s++)i.push({offset:o.offset,color:o.color.slice()})}function FS(r,t,e){var n=r,i=t;if(!(!n.push||!i.push)){var a=n.length,o=i.length;if(a!==o){var s=a>o;if(s)n.length=o;else for(var l=a;l<o;l++)n.push(e===1?i[l]:_u.call(i[l]))}for(var u=n[0]&&n[0].length,l=0;l<n.length;l++)if(e===1)isNaN(n[l])&&(n[l]=i[l]);else for(var f=0;f<u;f++)isNaN(n[l][f])&&(n[l][f]=i[l][f])}}function Eo(r){if(oe(r)){var t=r.length;if(oe(r[0])){for(var e=[],n=0;n<t;n++)e.push(_u.call(r[n]));return e}return _u.call(r)}return r}function Lo(r){return r[0]=Math.floor(r[0])||0,r[1]=Math.floor(r[1])||0,r[2]=Math.floor(r[2])||0,r[3]=r[3]==null?1:r[3],"rgba("+r.join(",")+")"}function zS(r){return oe(r&&r[0])?2:1}var Po=0,ko=1,pd=2,Ji=3,bu=4,Su=5,gd=6;function md(r){return r===bu||r===Su}function Ro(r){return r===ko||r===pd}var ta=[0,0,0,0],VS=(function(){function r(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return r.prototype.isFinished=function(){return this._finished},r.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},r.prototype.needsAnimate=function(){return this.keyframes.length>=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=gd,l=e;if(oe(e)){var u=zS(e);s=u,(u===1&&!xt(e[0])||u===2&&!xt(e[0][0]))&&(o=!0)}else if(xt(e)&&!Gi(e))s=Po;else if(G(e))if(!isNaN(+e))s=Po;else{var f=lr(e);f&&(l=f,s=Ji)}else if(co(e)){var h=B({},l);h.colorStops=X(e.colorStops,function(v){return{offset:v.offset,color:lr(v.color)}}),RS(e)?s=bu:OS(e)&&(s=Su),l=h}a===0?this.valType=s:(s!==this.valType||s===gd)&&(o=!0),this.discrete=this.discrete||o;var c={time:t,value:l,rawValue:e,percent:0};return n&&(c.easing=n,c.easingFunc=Q(n)?n:Ki[n]||od(n)),i.push(c),c},r.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort(function(p,g){return p.time-g.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=Ro(i),u=md(i),f=0;f<a;f++){var h=n[f],c=h.value,v=o.value;h.percent=h.time/t,s||(l&&f!==a-1?FS(c,v,i):u&&BS(c.colorStops,v.colorStops))}if(!s&&i!==Su&&e&&this.needsAnimate()&&e.needsAnimate()&&i===e.valType&&!e._finished){this._additiveTrack=e;for(var d=n[0].value,f=0;f<a;f++)i===Po?n[f].additiveValue=n[f].value-d:i===Ji?n[f].additiveValue=Io([],n[f].value,d,-1):Ro(i)&&(n[f].additiveValue=i===ko?Io([],n[f].value,d,-1):dd([],n[f].value,d,-1))}},r.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,i=n?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===Ji,f,h=this._lastFr,c=Math.min,v,d;if(s===1)v=d=o[0];else{if(e<0)f=0;else if(e<this._lastFrP){var p=c(h+1,s-1);for(f=p;f>=0&&!(o[f].percent<=e);f--);f=c(f,s-2)}else{for(f=h;f<s&&!(o[f].percent>e);f++);f=c(f-1,s-2)}d=o[f+1],v=o[f]}if(v&&d){this._lastFr=f,this._lastFrP=e;var g=d.percent-v.percent,m=g===0?1:c((e-v.percent)/g,1);d.easingFunc&&(m=d.easingFunc(m));var y=n?this._additiveValue:u?ta:t[l];if((Ro(a)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)t[l]=m<1?v.rawValue:d.rawValue;else if(Ro(a))a===ko?wu(y,v[i],d[i],m):NS(y,v[i],d[i],m);else if(md(a)){var _=v[i],w=d[i],b=a===bu;t[l]={type:b?"linear":"radial",x:ur(_.x,w.x,m),y:ur(_.y,w.y,m),colorStops:X(_.colorStops,function(x,T){var M=w.colorStops[T];return{offset:ur(x.offset,M.offset,m),color:Lo(wu([],x.color,M.color,m))}}),global:w.global},b?(t[l].x2=ur(_.x2,w.x2,m),t[l].y2=ur(_.y2,w.y2,m)):t[l].r=ur(_.r,w.r,m)}else if(u)wu(y,v[i],d[i],m),n||(t[l]=Lo(y));else{var S=ur(v[i],d[i],m);n?this._additiveValue=S:t[l]=S}n&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,n=this.propName,i=this._additiveValue;e===Po?t[n]=t[n]+i:e===Ji?(lr(t[n],ta),Io(ta,ta,i,1),t[n]=Lo(ta)):e===ko?Io(t[n],t[n],i,1):e===pd&&dd(t[n],t[n],i,1)},r})(),xu=(function(){function r(t,e,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&i){jr("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(t){this._target=t},r.prototype.when=function(t,e,n){return this.whenWithKeys(t,e,Ct(e),n)},r.prototype.whenWithKeys=function(t,e,n,i){for(var a=this._tracks,o=0;o<n.length;o++){var s=n[o],l=a[s];if(!l){l=a[s]=new VS(s);var u=void 0,f=this._getAdditiveTrack(s);if(f){var h=f.keyframes,c=h[h.length-1];u=c&&c.value,f.valType===Ji&&u&&(u=Lo(u))}else u=this._target[s];if(u==null)continue;t>0&&l.addKeyframe(0,Eo(u),i),this._trackKeys.push(s)}l.addKeyframe(t,Eo(e[s]),i)}return this._maxTime=Math.max(this._maxTime,t),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n<e;n++)t[n].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var n=0;n<e.length;n++)e[n].call(this)},r.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,n=0;n<e.length;n++)t[e[n]].setFinished()},r.prototype._getAdditiveTrack=function(t){var e,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var a=n[i].getTrack(t);a&&(e=a)}return e},r.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var e=this,n=[],i=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,f=u.length;if(s.prepare(i,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var h=u[f-1];h&&(e._target[s.propName]=h.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var c=new LS({life:i,loop:this._loop,delay:this._delay||0,onframe:function(v){e._started=2;var d=e._additiveAnimators;if(d){for(var p=!1,g=0;g<d.length;g++)if(d[g]._clip){p=!0;break}p||(e._additiveAnimators=null)}for(var g=0;g<n.length;g++)n[g].step(e._target,v);var m=e._onframeCbs;if(m)for(var g=0;g<m.length;g++)m[g](e._target,v)},ondestroy:function(){e._doneCallback()}});this._clip=c,this.animation&&this.animation.addClip(c),t&&c.setEasing(t)}else this._doneCallback();return this}},r.prototype.stop=function(t){if(this._clip){var e=this._clip;t&&e.onframe(1),this._abortedCallback()}},r.prototype.delay=function(t){return this._delay=t,this},r.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},r.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},r.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(t){return this._tracks[t]},r.prototype.getTracks=function(){var t=this;return X(this._trackKeys,function(e){return t._tracks[e]})},r.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,a=0;a<t.length;a++){var o=n[t[a]];o&&!o.isFinished()&&(e?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,a=0;a<i.length;a++)if(!n[i[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(t,e,n){if(t){e=e||this._trackKeys;for(var i=0;i<e.length;i++){var a=e[i],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[n?0:s.length-1];l&&(t[a]=Eo(l.rawValue))}}}},r.prototype.__changeFinalValue=function(t,e){e=e||Ct(t);for(var n=0;n<e.length;n++){var i=e[n],a=this._tracks[i];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,t[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r})();function ei(){return new Date().getTime()}var HS=(function(r){N(t,r);function t(e){var n=r.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var n=e.getClip();n&&this.addClip(n)},t.prototype.removeClip=function(e){if(e.animation){var n=e.prev,i=e.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var n=e.getClip();n&&this.removeClip(n),e.animation=null},t.prototype.update=function(e){for(var n=ei()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,e||(this.trigger("frame",i),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function n(){e._running&&(yo(n),!e._paused&&e.update())}yo(n)},t.prototype.start=function(){this._running||(this._time=ei(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=ei(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=ei()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var n=e.next;e.prev=e.next=e.animation=null,e=n}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,n){n=n||{},this.start();var i=new xu(e,n.loop);return this.addAnimator(i),i},t})(ze),WS=300,Cu=j.domSupported,Tu=(function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=X(r,function(i){var a=i.replace("mouse","pointer");return e.hasOwnProperty(a)?a:i});return{mouse:r,touch:t,pointer:n}})(),yd={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},_d=!1;function Du(r){var t=r.pointerType;return t==="pen"||t==="touch"}function GS(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function Mu(r){r&&(r.zrByTouch=!0)}function $S(r,t){return xe(r.dom,new US(r,t),!0)}function wd(r,t){for(var e=t,n=!1;e&&e.nodeType!==9&&!(n=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return n}var US=(function(){function r(t,e){this.stopPropagation=ee,this.stopImmediatePropagation=ee,this.preventDefault=ee,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r})(),Ve={mousedown:function(r){r=xe(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=xe(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=xe(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=xe(this.dom,r);var t=r.toElement||r.relatedTarget;wd(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){_d=!0,r=xe(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){_d||(r=xe(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=xe(this.dom,r),Mu(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Ve.mousemove.call(this,r),Ve.mousedown.call(this,r)},touchmove:function(r){r=xe(this.dom,r),Mu(r),this.handler.processGesture(r,"change"),Ve.mousemove.call(this,r)},touchend:function(r){r=xe(this.dom,r),Mu(r),this.handler.processGesture(r,"end"),Ve.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<WS&&Ve.click.call(this,r)},pointerdown:function(r){Ve.mousedown.call(this,r)},pointermove:function(r){Du(r)||Ve.mousemove.call(this,r)},pointerup:function(r){Ve.mouseup.call(this,r)},pointerout:function(r){Du(r)||Ve.mouseout.call(this,r)}};D(["click","dblclick","contextmenu"],function(r){Ve[r]=function(t){t=xe(this.dom,t),this.trigger(r,t)}});var Au={pointermove:function(r){Du(r)||Au.mousemove.call(this,r)},pointerup:function(r){Au.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),t&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function YS(r,t){var e=t.domHandlers;j.pointerEventsSupported?D(Tu.pointer,function(n){Oo(t,n,function(i){e[n].call(r,i)})}):(j.touchEventsSupported&&D(Tu.touch,function(n){Oo(t,n,function(i){e[n].call(r,i),GS(t)})}),D(Tu.mouse,function(n){Oo(t,n,function(i){i=au(i),t.touching||e[n].call(r,i)})}))}function ZS(r,t){j.pointerEventsSupported?D(yd.pointer,e):j.touchEventsSupported||D(yd.mouse,e);function e(n){function i(a){a=au(a),wd(r,a.target)||(a=$S(r,a),t.domHandlers[n].call(r,a))}Oo(t,n,i,{capture:!0})}}function Oo(r,t,e,n){r.mounted[t]=e,r.listenerOpts[t]=n,fS(r.domTarget,t,e,n)}function Iu(r){var t=r.mounted;for(var e in t)t.hasOwnProperty(e)&&hS(r.domTarget,e,t[e],r.listenerOpts[e]);r.mounted={}}var bd=(function(){function r(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e}return r})(),XS=(function(r){N(t,r);function t(e,n){var i=r.call(this)||this;return i.__pointerCapturing=!1,i.dom=e,i.painterRoot=n,i._localHandlerScope=new bd(e,Ve),Cu&&(i._globalHandlerScope=new bd(document,Au)),YS(i,i._localHandlerScope),i}return t.prototype.dispose=function(){Iu(this._localHandlerScope),Cu&&Iu(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,Cu&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var n=this._globalHandlerScope;e?ZS(this,n):Iu(n)}},t})(ze),Sd=1;j.hasGlobalWindow&&(Sd=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var No=Sd,Eu=.4,Lu="#333",Pu="#ccc",qS="#eee",xd=su,Cd=5e-5;function an(r){return r>Cd||r<-Cd}var on=[],ri=[],ku=Kn(),Ru=Math.abs,Ou=(function(){function r(){}return r.prototype.getLocalTransform=function(t){return r.getLocalTransform(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return an(this.rotation)||an(this.x)||an(this.y)||an(this.scaleX-1)||an(this.scaleY-1)||an(this.skewX)||an(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;if(!(e||t)){n&&(xd(n),this.invTransform=null);return}n=n||Kn(),e?this.getLocalTransform(n):xd(n),t&&(e?jn(n,t,n):dS(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(on);var n=on[0]<0?-1:1,i=on[1]<0?-1:1,a=((on[0]-n)*e+n)/on[0]||0,o=((on[1]-i)*e+i)/on[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||Kn(),fu(this.invTransform,t)},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),a=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(a),e=Math.sqrt(e),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||Kn(),jn(ri,t.invTransform,e),e=ri);var n=this.originX,i=this.originY;(n||i)&&(ku[4]=n,ku[5]=i,jn(ri,e,ku),ri[4]-=n,ri[5]-=i,e=ri),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&Se(n,n,i),n},r.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&Se(n,n,i),n},r.prototype.getLineScale=function(){var t=this.transform;return t&&Ru(t[0]-1)>1e-10&&Ru(t[3]-1)>1e-10?Math.sqrt(Ru(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){KS(this,t)},r.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,i=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,f=t.x,h=t.y,c=t.skewX?Math.tan(t.skewX):0,v=t.skewY?Math.tan(-t.skewY):0;if(n||i||s||l){var d=n+s,p=i+l;e[4]=-d*a-c*p*o,e[5]=-p*o-v*d*a}else e[4]=e[5]=0;return e[0]=a,e[3]=o,e[1]=v*a,e[2]=c*o,u&&uu(e,e,u),e[4]+=n+f,e[5]+=i+h,e},r.initDefaultProps=(function(){var t=r.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),r})(),ea=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function KS(r,t){for(var e=0;e<ea.length;e++){var n=ea[e];r[n]=t[n]}}var Td={};function me(r,t){t=t||Kr;var e=Td[t];e||(e=Td[t]=new ji(500));var n=e.get(r);return n==null&&(n=zn.measureText(r,t).width,e.put(r,n)),n}function Dd(r,t,e,n){var i=me(r,t),a=Bu(t),o=ra(0,i,e),s=ni(0,a,n),l=new pt(o,s,i,a);return l}function Nu(r,t,e,n){var i=((r||"")+"").split(`
15
+ `),a=i.length;if(a===1)return Dd(i[0],t,e,n);for(var o=new pt(0,0,0,0),s=0;s<i.length;s++){var l=Dd(i[s],t,e,n);s===0?o.copy(l):o.union(l)}return o}function ra(r,t,e){return e==="right"?r-=t:e==="center"&&(r-=t/2),r}function ni(r,t,e){return e==="middle"?r-=t/2:e==="bottom"&&(r-=t),r}function Bu(r){return me("国",r)}function Dr(r,t){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*t:parseFloat(r):r}function Bo(r,t,e){var n=t.position||"inside",i=t.distance!=null?t.distance:5,a=e.height,o=e.width,s=a/2,l=e.x,u=e.y,f="left",h="top";if(n instanceof Array)l+=Dr(n[0],e.width),u+=Dr(n[1],e.height),f=null,h=null;else switch(n){case"left":l-=i,u+=s,f="right",h="middle";break;case"right":l+=i+o,u+=s,h="middle";break;case"top":l+=o/2,u-=i,f="center",h="bottom";break;case"bottom":l+=o/2,u+=a+i,f="center";break;case"inside":l+=o/2,u+=s,f="center",h="middle";break;case"insideLeft":l+=i,u+=s,h="middle";break;case"insideRight":l+=o-i,u+=s,f="right",h="middle";break;case"insideTop":l+=o/2,u+=i,f="center";break;case"insideBottom":l+=o/2,u+=a-i,f="center",h="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,f="right";break;case"insideBottomLeft":l+=i,u+=a-i,h="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,f="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=h,r}var Fu="__zr_normal__",zu=ea.concat(["ignore"]),jS=Hn(ea,function(r,t){return r[t]=!0,r},{ignore:!1}),ii={},QS=new pt(0,0,0,0),Fo=(function(){function r(t){this.id=Lv(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=e.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;if(a.copyTransform(e),n.position!=null){var f=QS;n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),i||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(ii,n,f):Bo(ii,n,f),a.x=ii.x,a.y=ii.y,o=ii.align,s=ii.verticalAlign;var h=n.origin;if(h&&n.rotation!=null){var c=void 0,v=void 0;h==="center"?(c=f.width*.5,v=f.height*.5):(c=Dr(h[0],f.width),v=Dr(h[1],f.height)),u=!0,a.originX=-a.x+c+(i?0:f.x),a.originY=-a.y+v+(i?0:f.y)}}n.rotation!=null&&(a.rotation=n.rotation);var d=n.offset;d&&(a.x+=d[0],a.y+=d[1],u||(a.originX=-d[0],a.originY=-d[1]));var p=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,y=void 0,_=void 0;p&&this.canBeInsideText()?(m=n.insideFill,y=n.insideStroke,(m==null||m==="auto")&&(m=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(m),_=!0)):(m=n.outsideFill,y=n.outsideStroke,(m==null||m==="auto")&&(m=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(m),_=!0)),m=m||"#000",(m!==g.fill||y!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=m,g.stroke=y,g.autoStroke=_,g.align=o,g.verticalAlign=s,e.setDefaultTextStyle(g)),e.__dirty|=ge,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Pu:Lu},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n=typeof e=="string"&&lr(e);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,Mo(n,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},B(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(q(t))for(var n=t,i=Ct(n),a=0;a<i.length;a++){var o=i[a];this.attrKV(o,t[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],a=i.__fromStateTransition;if(!(i.getLoop()||a&&a!==Fu)){var o=i.targetName,s=o?e[o]:e;i.saveTo(s)}}},r.prototype._innerSaveToNormal=function(t){var e=this._normalState;e||(e=this._normalState={}),t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,zu)},r.prototype._savePrimaryToNormal=function(t,e,n){for(var i=0;i<n.length;i++){var a=n[i];t[a]!=null&&!(a in e)&&(e[a]=this[a])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(Fu,!1,t)},r.prototype.useState=function(t,e,n,i){var a=t===Fu,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(mt(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){jr("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||i);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,e,!n&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,c=this._textGuide;return h&&h.useState(t,e,n,f),c&&c.useState(t,e,n,f),a?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ge),u}}},r.prototype.useStates=function(t,e,n){if(!t.length)this.clearStates();else{var i=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var l=0;l<o;l++)if(t[l]!==a[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=t[l],f=void 0;this.stateProxy&&(f=this.stateProxy(u,t)),f||(f=this.states[u]),f&&i.push(f)}var h=i[o-1],c=!!(h&&h.hoverLayer||n);c&&this._toggleHoverLayerFlag(!0);var v=this._mergeStates(i),d=this.stateTransition;this.saveCurrentToNormalState(v),this._applyStateObj(t.join(","),v,this._normalState,!1,!e&&!this.__inHover&&d&&d.duration>0,d);var p=this._textContent,g=this._textGuide;p&&p.useStates(t,e,c),g&&g.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ge)}},r.prototype.isSilent=function(){for(var t=this.silent,e=this.parent;!t&&e;){if(e.silent){t=!0;break}e=e.parent}return t},r.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},r.prototype.removeState=function(t){var e=mt(this.currentStates,t);if(e>=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},r.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),a=mt(i,t),o=mt(i,e)>=0;a>=0?o?i.splice(a,1):i[a]=e:n&&!o&&i.push(e),this.useStates(i)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},n,i=0;i<t.length;i++){var a=t[i];B(e,a),a.textConfig&&(n=n||{},B(n,a.textConfig))}return n&&(e.textConfig=n),e},r.prototype._applyStateObj=function(t,e,n,i,a,o){var s=!(e&&i);e&&e.textConfig?(this.textConfig=B({},i?this.textConfig:n.textConfig),B(this.textConfig,e.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},u=!1,f=0;f<zu.length;f++){var h=zu[f],c=a&&jS[h];e&&e[h]!=null?c?(u=!0,l[h]=e[h]):this[h]=e[h]:s&&n[h]!=null&&(c?(u=!0,l[h]=n[h]):this[h]=n[h])}if(!a)for(var f=0;f<this.animators.length;f++){var v=this.animators[f],d=v.targetName;v.getLoop()||v.__changeFinalValue(d?(e||n)[d]:e||n)}u&&this._transitionState(t,l,o)},r.prototype._attachComponent=function(t){if(t.__zr&&!t.__hostTarget){if(process.env.NODE_ENV!=="production")throw new Error("Text element has been added to zrender.");return}if(t===this){if(process.env.NODE_ENV!=="production")throw new Error("Recursive component attachment.");return}var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this},r.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},r.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(t){var e=this._textContent;if(e!==t){if(e&&e!==t&&this.removeTextContent(),process.env.NODE_ENV!=="production"&&t.__zr&&!t.__hostTarget)throw new Error("Text element has been added to zrender.");t.innerTransformable=new Ou,this._attachComponent(t),this._textContent=t,this.markRedraw()}},r.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),B(this.textConfig,t),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=ge;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,n=this._textGuide;e&&(e.__inHover=t),n&&(n.__inHover=t)},r.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},r.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},r.prototype.animate=function(t,e,n){var i=t?this[t]:this;if(process.env.NODE_ENV!=="production"&&!i){jr('Property "'+t+'" is not existed in element '+this.id);return}var a=new xu(i,e,n);return t&&(a.targetName=t),this.addAnimator(a,t),a},r.prototype.addAnimator=function(t,e){var n=this.__zr,i=this;t.during(function(){i.updateDuringAnimation(e)}).done(function(){var a=i.animators,o=mt(a,t);o>=0&&a.splice(o,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,a=[],o=0;o<i;o++){var s=n[o];!t||t===s.scope?s.stop(e):a.push(s)}return this.animators=a,this},r.prototype.animateTo=function(t,e,n){Vu(this,t,e,n)},r.prototype.animateFrom=function(t,e,n){Vu(this,t,e,n,!0)},r.prototype._transitionState=function(t,e,n,i){for(var a=Vu(this,e,n,i),o=0;o<a.length;o++)a[o].__fromStateTransition=t},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=(function(){var t=r.prototype;t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=ge;var e={};function n(a,o,s){e[a+o+s]||(console.warn("DEPRECATED: '"+a+"' has been deprecated. use '"+o+"', '"+s+"' instead"),e[a+o+s]=!0)}function i(a,o,s,l){Object.defineProperty(t,a,{get:function(){if(process.env.NODE_ENV!=="production"&&n(a,s,l),!this[o]){var f=this[o]=[];u(this,f)}return this[o]},set:function(f){process.env.NODE_ENV!=="production"&&n(a,s,l),this[s]=f[0],this[l]=f[1],this[o]=f,u(this,f)}});function u(f,h){Object.defineProperty(h,0,{get:function(){return f[s]},set:function(c){f[s]=c}}),Object.defineProperty(h,1,{get:function(){return f[l]},set:function(c){f[l]=c}})}}Object.defineProperty&&(i("position","_legacyPos","x","y"),i("scale","_legacyScale","scaleX","scaleY"),i("origin","_legacyOrigin","originX","originY"))})(),r})();Fe(Fo,ze),Fe(Fo,Ou);function Vu(r,t,e,n,i){e=e||{};var a=[];Md(r,"",r,t,e,n,a,i);var o=a.length,s=!1,l=e.done,u=e.aborted,f=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},h=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),a.length>0&&e.during&&a[0].during(function(d,p){e.during(p)});for(var c=0;c<a.length;c++){var v=a[c];f&&v.done(f),h&&v.aborted(h),e.force&&v.duration(e.duration),v.start(e.easing)}return a}function Hu(r,t,e){for(var n=0;n<e;n++)r[n]=t[n]}function JS(r){return oe(r[0])}function tx(r,t,e){if(oe(t[e]))if(oe(r[e])||(r[e]=[]),te(t[e])){var n=t[e].length;r[e].length!==n&&(r[e]=new t[e].constructor(n),Hu(r[e],t[e],n))}else{var i=t[e],a=r[e],o=i.length;if(JS(i))for(var s=i[0].length,l=0;l<o;l++)a[l]?Hu(a[l],i[l],s):a[l]=Array.prototype.slice.call(i[l]);else Hu(a,i,o);a.length=i.length}else r[e]=t[e]}function ex(r,t){return r===t||oe(r)&&oe(t)&&rx(r,t)}function rx(r,t){var e=r.length;if(e!==t.length)return!1;for(var n=0;n<e;n++)if(r[n]!==t[n])return!1;return!0}function Md(r,t,e,n,i,a,o,s){for(var l=Ct(n),u=i.duration,f=i.delay,h=i.additive,c=i.setToFinal,v=!q(a),d=r.animators,p=[],g=0;g<l.length;g++){var m=l[g],y=n[m];if(y!=null&&e[m]!=null&&(v||a[m]))if(q(y)&&!oe(y)&&!co(y)){if(t){s||(e[m]=y,r.updateDuringAnimation(t));continue}Md(r,m,e[m],y,i,a&&a[m],o,s)}else p.push(m);else s||(e[m]=y,r.updateDuringAnimation(t),p.push(m))}var _=p.length;if(!h&&_)for(var w=0;w<d.length;w++){var b=d[w];if(b.targetName===t){var S=b.stopTracks(p);if(S){var x=mt(d,b);d.splice(x,1)}}}if(i.force||(p=Gt(p,function(C){return!ex(n[C],e[C])}),_=p.length),_>0||i.force&&!o.length){var T=void 0,M=void 0,A=void 0;if(s){M={},c&&(T={});for(var w=0;w<_;w++){var m=p[w];M[m]=e[m],c?T[m]=n[m]:e[m]=n[m]}}else if(c){A={};for(var w=0;w<_;w++){var m=p[w];A[m]=Eo(e[m]),tx(e,n,m)}}var b=new xu(e,!1,!1,h?Gt(d,function(I){return I.targetName===t}):null);b.targetName=t,i.scope&&(b.scope=i.scope),c&&T&&b.whenWithKeys(0,T,p),A&&b.whenWithKeys(0,A,p),b.whenWithKeys(u??500,s?M:n,p).delay(f||0),r.addAnimator(b,t),o.push(b)}}var kt=(function(r){N(t,r);function t(e){var n=r.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var n=this._children,i=0;i<n.length;i++)if(n[i].name===e)return n[i]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){if(e&&(e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),process.env.NODE_ENV!=="production"&&e.__hostTarget))throw"This elemenet has been used as an attachment";return this},t.prototype.addBefore=function(e,n){if(e&&e!==this&&e.parent!==this&&n&&n.parent===this){var i=this._children,a=i.indexOf(n);a>=0&&(i.splice(a,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,n){var i=mt(this._children,e);return i>=0&&this.replaceAt(n,i),this},t.prototype.replaceAt=function(e,n){var i=this._children,a=i[n];if(e&&e!==this&&e.parent!==this&&e!==a){i[n]=e,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var n=this.__zr;n&&n!==e.__zr&&e.addSelfToZr(n),n&&n.refresh()},t.prototype.remove=function(e){var n=this.__zr,i=this._children,a=mt(i,e);return a<0?this:(i.splice(a,1),e.parent=null,n&&e.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,n=this.__zr,i=0;i<e.length;i++){var a=e[i];n&&a.removeSelfFromZr(n),a.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,n){for(var i=this._children,a=0;a<i.length;a++){var o=i[a];e.call(n,o,a)}return this},t.prototype.traverse=function(e,n){for(var i=0;i<this._children.length;i++){var a=this._children[i],o=e.call(n,a);a.isGroup&&!o&&a.traverse(e,n)}return this},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.addSelfToZr(e)}},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.removeSelfFromZr(e)}},t.prototype.getBoundingRect=function(e){for(var n=new pt(0,0,0,0),i=e||this._children,a=[],o=null,s=0;s<i.length;s++){var l=i[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),f=l.getLocalTransform(a);f?(pt.applyTransform(n,u,f),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},t})(Fo);kt.prototype.type="group";/*!
16
+ * ZRender, a high performance 2d drawing library.
17
+ *
18
+ * Copyright (c) 2013, Baidu Inc.
19
+ * All rights reserved.
20
+ *
21
+ * LICENSE
22
+ * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
23
+ */var na={},Ad={};function nx(r){delete Ad[r]}function ix(r){if(!r)return!1;if(typeof r=="string")return Ao(r,1)<Eu;if(r.colorStops){for(var t=r.colorStops,e=0,n=t.length,i=0;i<n;i++)e+=Ao(t[i].color,1);return e/=n,e<Eu}return!1}var ax=(function(){function r(t,e,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=e,this.id=t;var a=new CS,o=n.renderer||"canvas";if(na[o]||(o=Ct(na)[0]),process.env.NODE_ENV!=="production"&&!na[o])throw new Error("Renderer '"+o+"' is not imported. Please import it first.");n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new na[o](e,a,n,t),l=n.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!j.node&&!j.worker&&!l?new XS(s.getViewportRoot(),s.root):null,f=n.useCoarsePointer,h=f==null||f==="auto"?j.touchEventsSupported:!!f,c=44,v;h&&(v=nt(n.pointerSize,c)),this.handler=new Uv(a,s,u,s.root,v),this.animation=new HS({stage:{update:l?null:function(){return i._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(t){this._disposed||!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},r.prototype.remove=function(t){this._disposed||!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(t,e){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh())},r.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=ix(t))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(t){this._darkMode=t},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(t){this._disposed||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(t){var e,n=ei();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());var i=ei();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof kt&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,nx(this.id))},r})();function Id(r,t){var e=new ax(Lv(),r,t);return Ad[e.id]=e,e}function ox(r,t){na[r]=t}var Ed=1e-4,Ld=20;function sx(r){return r.replace(/^\s+|\s+$/g,"")}function Zt(r,t,e,n){var i=t[0],a=t[1],o=e[0],s=e[1],l=a-i,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(r<=i)return o;if(r>=a)return s}else{if(r>=i)return o;if(r<=a)return s}else{if(r===i)return o;if(r===a)return s}return(r-i)/l*u+o}function Rt(r,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return G(r)?sx(r).match(/%$/)?parseFloat(r)/100*t:parseFloat(r):r==null?NaN:+r}function Ot(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),Ld),r=(+r).toFixed(t),e?r:+r}function ia(r){return r.sort(function(t,e){return t-e}),r}function fr(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return Wu(r)}function Wu(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),n=e>0?+t.slice(e+1):0,i=e>0?e:t.length,a=t.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function Pd(r,t){var e=Math.log,n=Math.LN10,i=Math.floor(e(r[1]-r[0])/n),a=Math.round(e(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function lx(r,t){var e=Math.max(fr(r),fr(t)),n=r+t;return e>Ld?n:Ot(n,e)}function kd(r){var t=Math.PI*2;return(r%t+t)%t}function zo(r){return r>-Ed&&r<Ed}var ux=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function hr(r){if(r instanceof Date)return r;if(G(r)){var t=ux.exec(r);if(!t)return new Date(NaN);if(t[8]){var e=+t[4]||0;return t[8].toUpperCase()!=="Z"&&(e-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,e,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function fx(r){return Math.pow(10,Vo(r))}function Vo(r){if(r===0)return 0;var t=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,t)>=10&&t++,t}function Rd(r,t){var e=Vo(r),n=Math.pow(10,e),i=r/n,a;return i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10,r=a*n,e>=-20?+r.toFixed(e<0?-e:0):r}function Ho(r){var t=parseFloat(r);return t==r&&(t!==0||!G(r)||r.indexOf("x")<=0)?t:NaN}function Od(r){return!isNaN(Ho(r))}function Nd(){return Math.round(Math.random()*9)}function Bd(r,t){return t===0?r:Bd(t,r%t)}function Fd(r,t){return r==null?t:t==null?r:r*t/Bd(r,t)}var hx="[ECharts] ",zd={},cx=typeof console<"u"&&console.warn&&console.log;function Wo(r,t,e){if(cx){if(e){if(zd[t])return;zd[t]=!0}console[r](hx+t)}}function vx(r,t){Wo("log",r,t)}function Xt(r,t){Wo("warn",r,t)}function qt(r,t){Wo("error",r,t)}function He(r){process.env.NODE_ENV!=="production"&&Wo("warn","DEPRECATED: "+r,!0)}function zt(r,t,e){process.env.NODE_ENV!=="production"&&He((e?"["+e+"]":"")+(r+" is deprecated, use "+t+" instead."))}function Go(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var e="";if(process.env.NODE_ENV!=="production"){var n=function(i){return i===void 0?"undefined":i===1/0?"Infinity":i===-1/0?"-Infinity":Gi(i)?"NaN":i instanceof Date?"Date("+i.toISOString()+")":Q(i)?"function () { ... }":Hb(i)?i+"":null};e=X(r,function(i){if(G(i))return i;var a=n(i);if(a!=null)return a;if(typeof JSON<"u"&&JSON.stringify)try{return JSON.stringify(i,function(o,s){var l=n(s);return l??s})}catch{return"?"}else return"?"}).join(" ")}return e}function ue(r){throw new Error(r)}function Vd(r,t,e){return(t-r)*e+r}var Hd="series\0",dx="\0_ec_\0";function re(r){return r instanceof Array?r:r==null?[]:[r]}function Wd(r,t,e){if(r){r[t]=r[t]||{},r.emphasis=r.emphasis||{},r.emphasis[t]=r.emphasis[t]||{};for(var n=0,i=e.length;n<i;n++){var a=e[n];!r.emphasis[t].hasOwnProperty(a)&&r[t].hasOwnProperty(a)&&(r.emphasis[t][a]=r[t][a])}}}var Gd=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function aa(r){return q(r)&&!W(r)&&!(r instanceof Date)?r.value:r}function px(r){return q(r)&&!(r instanceof Array)}function gx(r,t,e){var n=e==="normalMerge",i=e==="replaceMerge",a=e==="replaceAll";r=r||[],t=(t||[]).slice();var o=tt();D(t,function(l,u){if(!q(l)){t[u]=null;return}process.env.NODE_ENV!=="production"&&(l.id!=null&&!Yd(l.id)&&Ud(l.id),l.name!=null&&!Yd(l.name)&&Ud(l.name))});var s=mx(r,o,e);return(n||i)&&yx(s,r,o,t),n&&_x(s,t),n||i?bx(s,t,i):a&&Sx(s,t),xx(s),s}function mx(r,t,e){var n=[];if(e==="replaceAll")return n;for(var i=0;i<r.length;i++){var a=r[i];a&&a.id!=null&&t.set(a.id,i),n.push({existing:e==="replaceMerge"||ai(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return n}function yx(r,t,e,n){D(n,function(i,a){if(!(!i||i.id==null)){var o=oa(i.id),s=e.get(o);if(s!=null){var l=r[s];it(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=i,l.existing=t[s],n[a]=null}}})}function _x(r,t){D(t,function(e,n){if(!(!e||e.name==null))for(var i=0;i<r.length;i++){var a=r[i].existing;if(!r[i].newOption&&a&&(a.id==null||e.id==null)&&!ai(e)&&!ai(a)&&$d("name",a,e)){r[i].newOption=e,t[n]=null;return}}})}function bx(r,t,e){D(t,function(n){if(n){for(var i,a=0;(i=r[a])&&(i.newOption||ai(i.existing)||i.existing&&n.id!=null&&!$d("id",n,i.existing));)a++;i?(i.newOption=n,i.brandNew=e):r.push({newOption:n,brandNew:e,existing:null,keyInfo:null}),a++}})}function Sx(r,t){D(t,function(e){r.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})}function xx(r){var t=tt();D(r,function(e){var n=e.existing;n&&t.set(n.id,e)}),D(r,function(e){var n=e.newOption;it(!n||n.id==null||!t.get(n.id)||t.get(n.id)===e,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),D(r,function(e,n){var i=e.existing,a=e.newOption,o=e.keyInfo;if(q(a)){if(o.name=a.name!=null?oa(a.name):i?i.name:Hd+n,i)o.id=oa(i.id);else if(a.id!=null)o.id=oa(a.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(t.get(o.id))}t.set(o.id,e)}})}function $d(r,t,e){var n=Ke(t[r],null),i=Ke(e[r],null);return n!=null&&i!=null&&n===i}function oa(r){if(process.env.NODE_ENV!=="production"&&r==null)throw new Error;return Ke(r,"")}function Ke(r,t){return r==null?t:G(r)?r:xt(r)||ho(r)?r+"":t}function Ud(r){process.env.NODE_ENV!=="production"&&Xt("`"+r+"` is invalid id or name. Must be a string or number.")}function Yd(r){return ho(r)||Od(r)}function Gu(r){var t=r.name;return!!(t&&t.indexOf(Hd))}function ai(r){return r&&r.id!=null&&oa(r.id).indexOf(dx)===0}function Cx(r,t,e){D(r,function(n){var i=n.newOption;q(i)&&(n.keyInfo.mainType=t,n.keyInfo.subType=Tx(t,i,n.existing,e))})}function Tx(r,t,e,n){var i=t.type?t.type:e?e.subType:n.determineSubType(r,t);return i}function sn(r,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return W(t.dataIndex)?X(t.dataIndex,function(e){return r.indexOfRawIndex(e)}):r.indexOfRawIndex(t.dataIndex);if(t.name!=null)return W(t.name)?X(t.name,function(e){return r.indexOfName(e)}):r.indexOfName(t.name)}function Nt(){var r="__ec_inner_"+Dx++;return function(t){return t[r]||(t[r]={})}}var Dx=Nd();function $u(r,t,e){var n=Uu(t,e),i=n.mainTypeSpecified,a=n.queryOptionMap,o=n.others,s=o,l=e?e.defaultMainType:null;return!i&&l&&a.set(l,{}),a.each(function(u,f){var h=sa(r,f,u,{useDefault:l===f,enableAll:e&&e.enableAll!=null?e.enableAll:!0,enableNone:e&&e.enableNone!=null?e.enableNone:!0});s[f+"Models"]=h.models,s[f+"Model"]=h.models[0]}),s}function Uu(r,t){var e;if(G(r)){var n={};n[r+"Index"]=0,e=n}else e=r;var i=tt(),a={},o=!1;return D(e,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],f=u[1],h=(u[2]||"").toLowerCase();if(!(!f||!h||t&&t.includeMainTypes&&mt(t.includeMainTypes,f)<0)){o=o||!!f;var c=i.get(f)||i.set(f,{});c[h]=s}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var fe={useDefault:!0,enableAll:!1,enableNone:!1},Mx={useDefault:!1,enableAll:!0,enableNone:!0};function sa(r,t,e,n){n=n||fe;var i=e.index,a=e.id,o=e.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=r.getComponent(t))?[l]:[],s}return i==="none"||i===!1?(it(n.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(i==="all"&&(it(n.enableAll,'`"all"` is not a valid value on index option.'),i=a=o=null),s.models=r.queryComponents({mainType:t,index:i,id:a,name:o}),s)}function Zd(r,t,e){r.setAttribute?r.setAttribute(t,e):r[t]=e}function Ax(r,t){return r.getAttribute?r.getAttribute(t):r[t]}function Ix(r){return r==="auto"?j.domSupported?"html":"richText":r||"html"}function Ex(r,t,e,n,i){var a=t==null||t==="auto";if(n==null)return n;if(xt(n)){var o=Vd(e||0,n,i);return Ot(o,a?Math.max(fr(e||0),fr(n)):t)}else{if(G(n))return i<1?e:n;for(var s=[],l=e,u=n,f=Math.max(l?l.length:0,u.length),h=0;h<f;++h){var c=r.getDimensionInfo(h);if(c&&c.type==="ordinal")s[h]=(i<1&&l?l:u)[h];else{var v=l&&l[h]?l[h]:0,d=u[h],o=Vd(v,d,i);s[h]=Ot(o,a?Math.max(fr(v),fr(d)):t)}}return s}}var Lx=".",ln="___EC__COMPONENT__CONTAINER___",Xd="___EC__EXTENDED_CLASS___";function je(r){var t={main:"",sub:""};if(r){var e=r.split(Lx);t.main=e[0]||"",t.sub=e[1]||""}return t}function Px(r){it(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function kx(r){return!!(r&&r[Xd])}function Yu(r,t){r.$constructor=r,r.extend=function(e){process.env.NODE_ENV!=="production"&&D(t,function(a){e[a]||console.warn("Method `"+a+"` should be implemented"+(e.type?" in "+e.type:"")+".")});var n=this,i;return Rx(n)?i=(function(a){N(o,a);function o(){return a.apply(this,arguments)||this}return o})(n):(i=function(){(e.$constructor||n).apply(this,arguments)},Fb(i,this)),B(i.prototype,e),i[Xd]=!0,i.extend=this.extend,i.superCall=Bx,i.superApply=Fx,i.superClass=n,i}}function Rx(r){return Q(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function qd(r,t){r.extend=t.extend}var Ox=Math.round(Math.random()*10);function Nx(r){var t=["__\0is_clz",Ox++].join("_");r.prototype[t]=!0,process.env.NODE_ENV!=="production"&&it(!r.isInstance,'The method "is" can not be defined.'),r.isInstance=function(e){return!!(e&&e[t])}}function Bx(r,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];return this.superClass.prototype[t].apply(r,e)}function Fx(r,t,e){return this.superClass.prototype[t].apply(r,e)}function $o(r){var t={};r.registerClass=function(n){var i=n.type||n.prototype.type;if(i){Px(i),n.prototype.type=i;var a=je(i);if(!a.sub)process.env.NODE_ENV!=="production"&&t[a.main]&&console.warn(a.main+" exists."),t[a.main]=n;else if(a.sub!==ln){var o=e(a);o[a.sub]=n}}return n},r.getClass=function(n,i,a){var o=t[n];if(o&&o[ln]&&(o=i?o[i]:null),a&&!o)throw new Error(i?"Component "+n+"."+(i||"")+" is used but not imported.":n+".type should be specified.");return o},r.getClassesByMainType=function(n){var i=je(n),a=[],o=t[i.main];return o&&o[ln]?D(o,function(s,l){l!==ln&&a.push(s)}):a.push(o),a},r.hasClass=function(n){var i=je(n);return!!t[i.main]},r.getAllClassMainTypes=function(){var n=[];return D(t,function(i,a){n.push(a)}),n},r.hasSubTypes=function(n){var i=je(n),a=t[i.main];return a&&a[ln]};function e(n){var i=t[n.main];return(!i||!i[ln])&&(i=t[n.main]={},i[ln]=!0),i}}function la(r,t){for(var e=0;e<r.length;e++)r[e][1]||(r[e][1]=r[e][0]);return t=t||!1,function(n,i,a){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(i&&mt(i,l)>=0||a&&mt(a,l)<0)){var u=n.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var zx=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Vx=la(zx),Hx=(function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return Vx(this,t,e)},r})(),Zu=new ji(50);function Wx(r){if(typeof r=="string"){var t=Zu.get(r);return t&&t.image}else return r}function Kd(r,t,e,n,i){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var a=Zu.get(r),o={hostEl:e,cb:n,cbPayload:i};return a?(t=a.image,!Uo(t)&&a.pending.push(o)):(t=zn.loadImage(r,jd,jd),t.__zrImageSrc=r,Zu.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function jd(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<r.pending.length;t++){var e=r.pending[t],n=e.cb;n&&n(this,e.cbPayload),e.hostEl.dirty()}r.pending.length=0}function Uo(r){return r&&r.width&&r.height}var Xu=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Gx(r,t,e,n,i,a){if(!e){r.text="",r.isTruncated=!1;return}var o=(t+"").split(`
24
+ `);a=Qd(e,n,i,a);for(var s=!1,l={},u=0,f=o.length;u<f;u++)Jd(l,o[u],a),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(`
25
+ `),r.isTruncated=s}function Qd(r,t,e,n){n=n||{};var i=B({},n);i.font=t,e=nt(e,"..."),i.maxIterations=nt(n.maxIterations,2);var a=i.minChar=nt(n.minChar,0);i.cnCharWidth=me("国",t);var o=i.ascCharWidth=me("a",t);i.placeholder=nt(n.placeholder,"");for(var s=r=Math.max(0,r-1),l=0;l<a&&s>=o;l++)s-=o;var u=me(e,t);return u>s&&(e="",u=0),s=r-u,i.ellipsis=e,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=r,i}function Jd(r,t,e){var n=e.containerWidth,i=e.font,a=e.contentWidth;if(!n){r.textLine="",r.isTruncated=!1;return}var o=me(t,i);if(o<=n){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=e.maxIterations){t+=e.ellipsis;break}var l=s===0?$x(t,a,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,l),o=me(t,i)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function $x(r,t,e,n){for(var i=0,a=0,o=r.length;a<o&&i<t;a++){var s=r.charCodeAt(a);i+=0<=s&&s<=127?e:n}return a}function Ux(r,t){r!=null&&(r+="");var e=t.overflow,n=t.padding,i=t.font,a=e==="truncate",o=Bu(i),s=nt(t.lineHeight,o),l=!!t.backgroundColor,u=t.lineOverflow==="truncate",f=!1,h=t.width,c;h!=null&&(e==="break"||e==="breakAll")?c=r?ep(r,t.font,h,e==="breakAll",0).lines:[]:c=r?r.split(`
26
+ `):[];var v=c.length*s,d=nt(t.height,v);if(v>d&&u){var p=Math.floor(d/s);f=f||c.length>p,c=c.slice(0,p)}if(r&&a&&h!=null)for(var g=Qd(h,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),m={},y=0;y<c.length;y++)Jd(m,c[y],g),c[y]=m.textLine,f=f||m.isTruncated;for(var _=d,w=0,y=0;y<c.length;y++)w=Math.max(me(c[y],i),w);h==null&&(h=w);var b=w;return n&&(_+=n[0]+n[2],b+=n[1]+n[3],h+=n[1]+n[3]),l&&(b=h),{lines:c,height:d,outerWidth:b,outerHeight:_,lineHeight:s,calculatedLineHeight:o,contentWidth:w,contentHeight:v,width:h,isTruncated:f}}var Yx=(function(){function r(){}return r})(),tp=(function(){function r(t){this.tokens=[],t&&(this.tokens=t)}return r})(),Zx=(function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return r})();function Xx(r,t){var e=new Zx;if(r!=null&&(r+=""),!r)return e;for(var n=t.width,i=t.height,a=t.overflow,o=(a==="break"||a==="breakAll")&&n!=null?{width:n,accumWidth:0,breakAll:a==="breakAll"}:null,s=Xu.lastIndex=0,l;(l=Xu.exec(r))!=null;){var u=l.index;u>s&&qu(e,r.substring(s,u),t,o),qu(e,l[2],t,o,l[1]),s=Xu.lastIndex}s<r.length&&qu(e,r.substring(s,r.length),t,o);var f=[],h=0,c=0,v=t.padding,d=a==="truncate",p=t.lineOverflow==="truncate",g={};function m($,Z,et){$.width=Z,$.lineHeight=et,h+=et,c=Math.max(c,Z)}t:for(var y=0;y<e.lines.length;y++){for(var _=e.lines[y],w=0,b=0,S=0;S<_.tokens.length;S++){var x=_.tokens[S],T=x.styleName&&t.rich[x.styleName]||{},M=x.textPadding=T.padding,A=M?M[1]+M[3]:0,C=x.font=T.font||t.font;x.contentHeight=Bu(C);var I=nt(T.height,x.contentHeight);if(x.innerHeight=I,M&&(I+=M[0]+M[2]),x.height=I,x.lineHeight=Gn(T.lineHeight,t.lineHeight,I),x.align=T&&T.align||t.align,x.verticalAlign=T&&T.verticalAlign||"middle",p&&i!=null&&h+x.lineHeight>i){var E=e.lines.length;S>0?(_.tokens=_.tokens.slice(0,S),m(_,b,w),e.lines=e.lines.slice(0,y+1)):e.lines=e.lines.slice(0,y),e.isTruncated=e.isTruncated||e.lines.length<E;break t}var L=T.width,P=L==null||L==="auto";if(typeof L=="string"&&L.charAt(L.length-1)==="%")x.percentWidth=L,f.push(x),x.contentWidth=me(x.text,C);else{if(P){var k=T.backgroundColor,z=k&&k.image;z&&(z=Wx(z),Uo(z)&&(x.width=Math.max(x.width,z.width*I/z.height)))}var O=d&&n!=null?n-b:null;O!=null&&O<x.width?!P||O<A?(x.text="",x.width=x.contentWidth=0):(Gx(g,x.text,O-A,C,t.ellipsis,{minChar:t.truncateMinChar}),x.text=g.text,e.isTruncated=e.isTruncated||g.isTruncated,x.width=x.contentWidth=me(x.text,C)):x.contentWidth=me(x.text,C)}x.width+=A,b+=x.width,T&&(w=Math.max(w,x.lineHeight))}m(_,b,w)}e.outerWidth=e.width=nt(n,c),e.outerHeight=e.height=nt(i,h),e.contentHeight=h,e.contentWidth=c,v&&(e.outerWidth+=v[1]+v[3],e.outerHeight+=v[0]+v[2]);for(var y=0;y<f.length;y++){var x=f[y],V=x.percentWidth;x.width=parseInt(V,10)/100*e.width}return e}function qu(r,t,e,n,i){var a=t==="",o=i&&e.rich[i]||{},s=r.lines,l=o.font||e.font,u=!1,f,h;if(n){var c=o.padding,v=c?c[1]+c[3]:0;if(o.width!=null&&o.width!=="auto"){var d=Dr(o.width,n.width)+v;s.length>0&&d+n.accumWidth>n.width&&(f=t.split(`
27
+ `),u=!0),n.accumWidth=d}else{var p=ep(t,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=p.accumWidth+v,h=p.linesWidths,f=p.lines}}else f=t.split(`
28
+ `);for(var g=0;g<f.length;g++){var m=f[g],y=new Yx;if(y.styleName=i,y.text=m,y.isLineHolder=!m&&!a,typeof o.width=="number"?y.width=o.width:y.width=h?h[g]:me(m,l),!g&&!u){var _=(s[s.length-1]||(s[0]=new tp)).tokens,w=_.length;w===1&&_[0].isLineHolder?_[0]=y:(m||!w||a)&&_.push(y)}else s.push(new tp([y]))}}function qx(r){var t=r.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Kx=Hn(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function jx(r){return qx(r)?!!Kx[r]:!0}function ep(r,t,e,n,i){for(var a=[],o=[],s="",l="",u=0,f=0,h=0;h<r.length;h++){var c=r.charAt(h);if(c===`
29
+ `){l&&(s+=l,f+=u),a.push(s),o.push(f),s="",l="",u=0,f=0;continue}var v=me(c,t),d=n?!1:!jx(c);if(a.length?f+v>e:i+f+v>e){f?(s||l)&&(d?(s||(s=l,l="",u=0,f=u),a.push(s),o.push(f-u),l+=c,u+=v,s="",f=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(f),s=c,f=v)):d?(a.push(l),o.push(u),l=c,u=v):(a.push(c),o.push(v));continue}f+=v,d?(l+=c,u+=v):(l&&(s+=l,l="",u=0),s+=c)}return!a.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(f)),a.length===1&&(f+=i),{accumWidth:f,lines:a,linesWidths:o}}var Ku="__zr_style_"+Math.round(Math.random()*10),un={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Yo={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};un[Ku]=!0;var rp=["z","z2","invisible"],Qx=["invisible"],ua=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var n=Ct(e),i=0;i<n.length;i++){var a=n[i];a==="style"?this.useStyle(e[a]):r.prototype.attrKV.call(this,a,e[a])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,n,i,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&Jx(this,e,n)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},t.prototype.contain=function(e,n){return this.rectContain(e,n)},t.prototype.traverse=function(e,n){e.call(n,this)},t.prototype.rectContain=function(e,n){var i=this.transformCoordToLocal(e,n),a=this.getBoundingRect();return a.contain(i[0],i[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,i=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,l=a.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new pt(0,0,0,0)),n?pt.applyTransform(e,i,n):e.copy(i),(o||s||l)&&(e.width+=o*2+Math.abs(s),e.height+=o*2+Math.abs(l),e.x=Math.min(e.x,e.x+s-o),e.y=Math.min(e.y,e.y+l-o));var u=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-u),e.y=Math.floor(e.y-u),e.width=Math.ceil(e.width+1+u*2),e.height=Math.ceil(e.height+1+u*2))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new pt(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(e,n){e!=="style"?r.prototype.attrKV.call(this,e,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(e,n){return typeof e=="string"?this.style[e]=n:B(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=qi,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&qi)},t.prototype.styleUpdated=function(){this.__dirty&=~qi},t.prototype.createStyle=function(e){return vo(un,e)},t.prototype.useStyle=function(e){e[Ku]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[Ku]},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,n,rp)},t.prototype._applyStateObj=function(e,n,i,a,o,s){r.prototype._applyStateObj.call(this,e,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.style?o?a?u=n.style:(u=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(u,n.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:i.style),this._mergeStyle(u,n.style)):l&&(u=i.style),u)if(o){var f=this.style;if(this.style=this.createStyle(l?{}:f),l)for(var h=Ct(f),c=0;c<h.length;c++){var v=h[c];v in u&&(u[v]=u[v],this.style[v]=f[v])}for(var d=Ct(u),c=0;c<d.length;c++){var v=d[c];this.style[v]=this.style[v]}this._transitionState(e,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var p=this.__inHover?Qx:rp,c=0;c<p.length;c++){var v=p[c];n&&n[v]!=null?this[v]=n[v]:l&&i[v]!=null&&(this[v]=i[v])}},t.prototype._mergeStates=function(e){for(var n=r.prototype._mergeStates.call(this,e),i,a=0;a<e.length;a++){var o=e[a];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(n.style=i),n},t.prototype._mergeStyle=function(e,n){return B(e,n),e},t.prototype.getAnimationStyleProps=function(){return Yo},t.initDefaultProps=(function(){var e=t.prototype;e.type="displayable",e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor="pointer",e.rectHover=!1,e.incremental=!1,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=ge|qi})(),t})(Fo),ju=new pt(0,0,0,0),Qu=new pt(0,0,0,0);function Jx(r,t,e){return ju.copy(r.getBoundingRect()),r.transform&&ju.applyTransform(r.transform),Qu.width=t,Qu.height=e,!ju.intersect(Qu)}var De=Math.min,Me=Math.max,Ju=Math.sin,tf=Math.cos,fn=Math.PI*2,Zo=$n(),Xo=$n(),qo=$n();function np(r,t,e,n,i,a){i[0]=De(r,e),i[1]=De(t,n),a[0]=Me(r,e),a[1]=Me(t,n)}var ip=[],ap=[];function tC(r,t,e,n,i,a,o,s,l,u){var f=nd,h=$t,c=f(r,e,i,o,ip);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var v=0;v<c;v++){var d=h(r,e,i,o,ip[v]);l[0]=De(d,l[0]),u[0]=Me(d,u[0])}c=f(t,n,a,s,ap);for(var v=0;v<c;v++){var p=h(t,n,a,s,ap[v]);l[1]=De(p,l[1]),u[1]=Me(p,u[1])}l[0]=De(r,l[0]),u[0]=Me(r,u[0]),l[0]=De(o,l[0]),u[0]=Me(o,u[0]),l[1]=De(t,l[1]),u[1]=Me(t,u[1]),l[1]=De(s,l[1]),u[1]=Me(s,u[1])}function eC(r,t,e,n,i,a,o,s){var l=ad,u=le,f=Me(De(l(r,e,i),1),0),h=Me(De(l(t,n,a),1),0),c=u(r,e,i,f),v=u(t,n,a,h);o[0]=De(r,i,c),o[1]=De(t,a,v),s[0]=Me(r,i,c),s[1]=Me(t,a,v)}function rC(r,t,e,n,i,a,o,s,l){var u=Yn,f=Zn,h=Math.abs(i-a);if(h%fn<1e-4&&h>1e-4){s[0]=r-e,s[1]=t-n,l[0]=r+e,l[1]=t+n;return}if(Zo[0]=tf(i)*e+r,Zo[1]=Ju(i)*n+t,Xo[0]=tf(a)*e+r,Xo[1]=Ju(a)*n+t,u(s,Zo,Xo),f(l,Zo,Xo),i=i%fn,i<0&&(i=i+fn),a=a%fn,a<0&&(a=a+fn),i>a&&!o?a+=fn:i<a&&o&&(i+=fn),o){var c=a;a=i,i=c}for(var v=0;v<a;v+=Math.PI/2)v>i&&(qo[0]=tf(v)*e+r,qo[1]=Ju(v)*n+t,u(s,qo,s),f(l,qo,l))}var yt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},hn=[],cn=[],Qe=[],Mr=[],Je=[],tr=[],ef=Math.min,rf=Math.max,vn=Math.cos,dn=Math.sin,cr=Math.abs,nf=Math.PI,Ar=nf*2,af=typeof Float32Array<"u",fa=[];function of(r){var t=Math.round(r/nf*1e8)/1e8;return t%2*nf}function nC(r,t){var e=of(r[0]);e<0&&(e+=Ar);var n=e-r[0],i=r[1];i+=n,!t&&i-e>=Ar?i=e+Ar:t&&e-i>=Ar?i=e-Ar:!t&&e>i?i=e+(Ar-of(e-i)):t&&e<i&&(i=e-(Ar-of(i-e))),r[0]=e,r[1]=i}var pn=(function(){function r(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}return r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(t,e,n){n=n||0,n>0&&(this._ux=cr(n/No/t)||0,this._uy=cr(n/No/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(yt.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var n=cr(t-this._xi),i=cr(e-this._yi),a=n>this._ux||i>this._uy;if(this.addData(yt.L,t,e),this._ctx&&a&&this._ctx.lineTo(t,e),a)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,n,i,a,o){return this._drawPendingPt(),this.addData(yt.C,t,e,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(yt.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},r.prototype.arc=function(t,e,n,i,a,o){this._drawPendingPt(),fa[0]=i,fa[1]=a,nC(fa,o),i=fa[0],a=fa[1];var s=a-i;return this.addData(yt.A,t,e,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,a,o),this._xi=vn(a)*n+t,this._yi=dn(a)*n+e,this},r.prototype.arcTo=function(t,e,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,a),this},r.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(yt.R,t,e,n,i),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(yt.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){var e=t.length;!(this.data&&this.data.length===e)&&af&&(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e},r.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,a=0;a<e;a++)n+=t[a].len();af&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(var a=0;a<e;a++)for(var o=t[a].data,s=0;s<o.length;s++)this.data[i++]=o[s];this._len=i},r.prototype.addData=function(t,e,n,i,a,o,s,l,u){if(this._saveData){var f=this.data;this._len+arguments.length>f.length&&(this._expandData(),f=this.data);for(var h=0;h<arguments.length;h++)f[this._len++]=arguments[h]}},r.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,af&&this._len>11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){Qe[0]=Qe[1]=Je[0]=Je[1]=Number.MAX_VALUE,Mr[0]=Mr[1]=tr[0]=tr[1]=-Number.MAX_VALUE;var t=this.data,e=0,n=0,i=0,a=0,o;for(o=0;o<this._len;){var s=t[o++],l=o===1;switch(l&&(e=t[o],n=t[o+1],i=e,a=n),s){case yt.M:e=i=t[o++],n=a=t[o++],Je[0]=i,Je[1]=a,tr[0]=i,tr[1]=a;break;case yt.L:np(e,n,t[o],t[o+1],Je,tr),e=t[o++],n=t[o++];break;case yt.C:tC(e,n,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],Je,tr),e=t[o++],n=t[o++];break;case yt.Q:eC(e,n,t[o++],t[o++],t[o],t[o+1],Je,tr),e=t[o++],n=t[o++];break;case yt.A:var u=t[o++],f=t[o++],h=t[o++],c=t[o++],v=t[o++],d=t[o++]+v;o+=1;var p=!t[o++];l&&(i=vn(v)*h+u,a=dn(v)*c+f),rC(u,f,h,c,v,d,p,Je,tr),e=vn(d)*h+u,n=dn(d)*c+f;break;case yt.R:i=e=t[o++],a=n=t[o++];var g=t[o++],m=t[o++];np(i,a,i+g,a+m,Je,tr);break;case yt.Z:e=i,n=a;break}Yn(Qe,Qe,Je),Zn(Mr,Mr,tr)}return o===0&&(Qe[0]=Qe[1]=Mr[0]=Mr[1]=0),new pt(Qe[0],Qe[1],Mr[0]-Qe[0],Mr[1]-Qe[1])},r.prototype._calculateLength=function(){var t=this.data,e=this._len,n=this._ux,i=this._uy,a=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,f=0,h=0,c=0;c<e;){var v=t[c++],d=c===1;d&&(a=t[c],o=t[c+1],s=a,l=o);var p=-1;switch(v){case yt.M:a=s=t[c++],o=l=t[c++];break;case yt.L:{var g=t[c++],m=t[c++],y=g-a,_=m-o;(cr(y)>n||cr(_)>i||c===e-1)&&(p=Math.sqrt(y*y+_*_),a=g,o=m);break}case yt.C:{var w=t[c++],b=t[c++],g=t[c++],m=t[c++],S=t[c++],x=t[c++];p=DS(a,o,w,b,g,m,S,x,10),a=S,o=x;break}case yt.Q:{var w=t[c++],b=t[c++],g=t[c++],m=t[c++];p=IS(a,o,w,b,g,m,10),a=g,o=m;break}case yt.A:var T=t[c++],M=t[c++],A=t[c++],C=t[c++],I=t[c++],E=t[c++],L=E+I;c+=1,d&&(s=vn(I)*A+T,l=dn(I)*C+M),p=rf(A,C)*ef(Ar,Math.abs(E)),a=vn(L)*A+T,o=dn(L)*C+M;break;case yt.R:{s=a=t[c++],l=o=t[c++];var P=t[c++],k=t[c++];p=P*2+k*2;break}case yt.Z:{var y=s-a,_=l-o;p=Math.sqrt(y*y+_*_),a=s,o=l;break}}p>=0&&(u[h++]=p,f+=p)}return this._pathLen=f,f},r.prototype.rebuildPath=function(t,e){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,f,h,c,v=e<1,d,p,g=0,m=0,y,_=0,w,b;if(!(v&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=this._pathLen,y=e*p,!y)))t:for(var S=0;S<o;){var x=n[S++],T=S===1;switch(T&&(u=n[S],f=n[S+1],s=u,l=f),x!==yt.L&&_>0&&(t.lineTo(w,b),_=0),x){case yt.M:s=u=n[S++],l=f=n[S++],t.moveTo(u,f);break;case yt.L:{h=n[S++],c=n[S++];var M=cr(h-u),A=cr(c-f);if(M>i||A>a){if(v){var C=d[m++];if(g+C>y){var I=(y-g)/C;t.lineTo(u*(1-I)+h*I,f*(1-I)+c*I);break t}g+=C}t.lineTo(h,c),u=h,f=c,_=0}else{var E=M*M+A*A;E>_&&(w=h,b=c,_=E)}break}case yt.C:{var L=n[S++],P=n[S++],k=n[S++],z=n[S++],O=n[S++],V=n[S++];if(v){var C=d[m++];if(g+C>y){var I=(y-g)/C;xo(u,L,k,O,I,hn),xo(f,P,z,V,I,cn),t.bezierCurveTo(hn[1],cn[1],hn[2],cn[2],hn[3],cn[3]);break t}g+=C}t.bezierCurveTo(L,P,k,z,O,V),u=O,f=V;break}case yt.Q:{var L=n[S++],P=n[S++],k=n[S++],z=n[S++];if(v){var C=d[m++];if(g+C>y){var I=(y-g)/C;Co(u,L,k,I,hn),Co(f,P,z,I,cn),t.quadraticCurveTo(hn[1],cn[1],hn[2],cn[2]);break t}g+=C}t.quadraticCurveTo(L,P,k,z),u=k,f=z;break}case yt.A:var $=n[S++],Z=n[S++],et=n[S++],at=n[S++],ot=n[S++],st=n[S++],ie=n[S++],_t=!n[S++],Ze=et>at?et:at,Vt=cr(et-at)>.001,Mt=ot+st,K=!1;if(v){var C=d[m++];g+C>y&&(Mt=ot+st*(y-g)/C,K=!0),g+=C}if(Vt&&t.ellipse?t.ellipse($,Z,et,at,ie,ot,Mt,_t):t.arc($,Z,Ze,ot,Mt,_t),K)break t;T&&(s=vn(ot)*et+$,l=dn(ot)*at+Z),u=vn(Mt)*et+$,f=dn(Mt)*at+Z;break;case yt.R:s=u=n[S],l=f=n[S+1],h=n[S++],c=n[S++];var lt=n[S++],Be=n[S++];if(v){var C=d[m++];if(g+C>y){var Ht=y-g;t.moveTo(h,c),t.lineTo(h+ef(Ht,lt),c),Ht-=lt,Ht>0&&t.lineTo(h+lt,c+ef(Ht,Be)),Ht-=Be,Ht>0&&t.lineTo(h+rf(lt-Ht,0),c+Be),Ht-=lt,Ht>0&&t.lineTo(h,c+rf(Be-Ht,0));break t}g+=C}t.rect(h,c,lt,Be);break;case yt.Z:if(v){var C=d[m++];if(g+C>y){var I=(y-g)/C;t.lineTo(u*(1-I)+s*I,f*(1-I)+l*I);break t}g+=C}t.closePath(),u=s,f=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.CMD=yt,r.initDefaultProps=(function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),r})();function oi(r,t,e,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=r;if(o>t+s&&o>n+s||o<t-s&&o<n-s||a>r+s&&a>e+s||a<r-s&&a<e-s)return!1;if(r!==e)l=(t-n)/(r-e),u=(r*n-e*t)/(r-e);else return Math.abs(a-r)<=s/2;var f=l*a-o+u,h=f*f/(l*l+1);return h<=s/2*s/2}function iC(r,t,e,n,i,a,o,s,l,u,f){if(l===0)return!1;var h=l;if(f>t+h&&f>n+h&&f>a+h&&f>s+h||f<t-h&&f<n-h&&f<a-h&&f<s-h||u>r+h&&u>e+h&&u>i+h&&u>o+h||u<r-h&&u<e-h&&u<i-h&&u<o-h)return!1;var c=TS(r,t,e,n,i,a,o,s,u,f);return c<=h/2}function aC(r,t,e,n,i,a,o,s,l){if(o===0)return!1;var u=o;if(l>t+u&&l>n+u&&l>a+u||l<t-u&&l<n-u&&l<a-u||s>r+u&&s>e+u&&s>i+u||s<r-u&&s<e-u&&s<i-u)return!1;var f=AS(r,t,e,n,i,a,s,l);return f<=u/2}var op=Math.PI*2;function Ko(r){return r%=op,r<0&&(r+=op),r}var ha=Math.PI*2;function oC(r,t,e,n,i,a,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=t;var f=Math.sqrt(s*s+l*l);if(f-u>e||f+u<e)return!1;if(Math.abs(n-i)%ha<1e-4)return!0;if(a){var h=n;n=Ko(i),i=Ko(h)}else n=Ko(n),i=Ko(i);n>i&&(i+=ha);var c=Math.atan2(l,s);return c<0&&(c+=ha),c>=n&&c<=i||c+ha>=n&&c+ha<=i}function gn(r,t,e,n,i,a){if(a>t&&a>n||a<t&&a<n||n===t)return 0;var o=(a-t)/(n-t),s=n<t?1:-1;(o===1||o===0)&&(s=n<t?.5:-.5);var l=o*(e-r)+r;return l===i?1/0:l>i?s:0}var Ir=pn.CMD,mn=Math.PI*2,sC=1e-4;function lC(r,t){return Math.abs(r-t)<sC}var ne=[-1,-1,-1],Ae=[-1,-1];function uC(){var r=Ae[0];Ae[0]=Ae[1],Ae[1]=r}function fC(r,t,e,n,i,a,o,s,l,u){if(u>t&&u>n&&u>a&&u>s||u<t&&u<n&&u<a&&u<s)return 0;var f=So(t,n,a,s,u,ne);if(f===0)return 0;for(var h=0,c=-1,v=void 0,d=void 0,p=0;p<f;p++){var g=ne[p],m=g===0||g===1?.5:1,y=$t(r,e,i,o,g);y<l||(c<0&&(c=nd(t,n,a,s,Ae),Ae[1]<Ae[0]&&c>1&&uC(),v=$t(t,n,a,s,Ae[0]),c>1&&(d=$t(t,n,a,s,Ae[1]))),c===2?g<Ae[0]?h+=v<t?m:-m:g<Ae[1]?h+=d<v?m:-m:h+=s<d?m:-m:g<Ae[0]?h+=v<t?m:-m:h+=s<v?m:-m)}return h}function hC(r,t,e,n,i,a,o,s){if(s>t&&s>n&&s>a||s<t&&s<n&&s<a)return 0;var l=MS(t,n,a,s,ne);if(l===0)return 0;var u=ad(t,n,a);if(u>=0&&u<=1){for(var f=0,h=le(t,n,a,u),c=0;c<l;c++){var v=ne[c]===0||ne[c]===1?.5:1,d=le(r,e,i,ne[c]);d<o||(ne[c]<u?f+=h<t?v:-v:f+=a<h?v:-v)}return f}else{var v=ne[0]===0||ne[0]===1?.5:1,d=le(r,e,i,ne[0]);return d<o?0:a<t?v:-v}}function cC(r,t,e,n,i,a,o,s){if(s-=t,s>e||s<-e)return 0;var l=Math.sqrt(e*e-s*s);ne[0]=-l,ne[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=mn-1e-4){n=0,i=mn;var f=a?1:-1;return o>=ne[0]+r&&o<=ne[1]+r?f:0}if(n>i){var h=n;n=i,i=h}n<0&&(n+=mn,i+=mn);for(var c=0,v=0;v<2;v++){var d=ne[v];if(d+r>o){var p=Math.atan2(s,d),f=a?1:-1;p<0&&(p=mn+p),(p>=n&&p<=i||p+mn>=n&&p+mn<=i)&&(p>Math.PI/2&&p<Math.PI*1.5&&(f=-f),c+=f)}}return c}function sp(r,t,e,n,i){for(var a=r.data,o=r.len(),s=0,l=0,u=0,f=0,h=0,c,v,d=0;d<o;){var p=a[d++],g=d===1;switch(p===Ir.M&&d>1&&(e||(s+=gn(l,u,f,h,n,i))),g&&(l=a[d],u=a[d+1],f=l,h=u),p){case Ir.M:f=a[d++],h=a[d++],l=f,u=h;break;case Ir.L:if(e){if(oi(l,u,a[d],a[d+1],t,n,i))return!0}else s+=gn(l,u,a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case Ir.C:if(e){if(iC(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],t,n,i))return!0}else s+=fC(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case Ir.Q:if(e){if(aC(l,u,a[d++],a[d++],a[d],a[d+1],t,n,i))return!0}else s+=hC(l,u,a[d++],a[d++],a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case Ir.A:var m=a[d++],y=a[d++],_=a[d++],w=a[d++],b=a[d++],S=a[d++];d+=1;var x=!!(1-a[d++]);c=Math.cos(b)*_+m,v=Math.sin(b)*w+y,g?(f=c,h=v):s+=gn(l,u,c,v,n,i);var T=(n-m)*w/_+m;if(e){if(oC(m,y,w,b,b+S,x,t,T,i))return!0}else s+=cC(m,y,w,b,b+S,x,T,i);l=Math.cos(b+S)*_+m,u=Math.sin(b+S)*w+y;break;case Ir.R:f=l=a[d++],h=u=a[d++];var M=a[d++],A=a[d++];if(c=f+M,v=h+A,e){if(oi(f,h,c,h,t,n,i)||oi(c,h,c,v,t,n,i)||oi(c,v,f,v,t,n,i)||oi(f,v,f,h,t,n,i))return!0}else s+=gn(c,h,c,v,n,i),s+=gn(f,v,f,h,n,i);break;case Ir.Z:if(e){if(oi(l,u,f,h,t,n,i))return!0}else s+=gn(l,u,f,h,n,i);l=f,u=h;break}}return!e&&!lC(u,h)&&(s+=gn(l,u,f,h,n,i)||0),s!==0}function vC(r,t,e){return sp(r,0,!1,t,e)}function dC(r,t,e,n){return sp(r,t,!0,e,n)}var lp=gt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},un),pC={style:gt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Yo.style)},sf=ea.concat(["invisible","culling","z","z2","zlevel","parent"]),vt=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(l){e.buildPath(l,e.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s<sf.length;++s)i[sf[s]]=this[sf[s]];i.__dirty|=ge}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(e){var n=Ct(e);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var a=0;a<n.length;a++){var o=n[a],s=e[o];o==="style"?this.style?B(this.style,s):this.useStyle(s):o==="shape"?B(this.shape,s):r.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if(e!=="none"){if(G(e)){var n=Ao(e,0);return n>.5?Lu:n>.2?qS:Pu}else if(e)return Pu}return Lu},t.prototype.getInsideTextStroke=function(e){var n=this.style.fill;if(G(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=Ao(e,0)<Eu;if(a===o)return n}},t.prototype.buildPath=function(e,n,i){},t.prototype.pathUpdated=function(){this.__dirty&=~Qn},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new pn(!1)},t.prototype.hasStroke=function(){var e=this.style,n=e.stroke;return!(n==null||n==="none"||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style,n=e.fill;return n!=null&&n!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,n=this.style,i=!e;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Qn)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||i){s.copy(e);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return e},t.prototype.contain=function(e,n){var i=this.transformCoordToLocal(e,n),a=this.getBoundingRect(),o=this.style;if(e=i[0],n=i[1],a.contain(e,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),dC(s,l/u,e,n)))return!0}if(this.hasFill())return vC(s,e,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=Qn,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,n){e==="shape"?this.setShape(n):r.prototype.attrKV.call(this,e,n)},t.prototype.setShape=function(e,n){var i=this.shape;return i||(i=this.shape={}),typeof e=="string"?i[e]=n:B(i,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&Qn)},t.prototype.createStyle=function(e){return vo(lp,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=B({},this.shape))},t.prototype._applyStateObj=function(e,n,i,a,o,s){r.prototype._applyStateObj.call(this,e,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=B({},i.shape),B(u,n.shape)):(u=B({},a?this.shape:i.shape),B(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=B({},this.shape);for(var f={},h=Ct(u),c=0;c<h.length;c++){var v=h[c];typeof u[v]=="object"?this.shape[v]=u[v]:f[v]=u[v]}this._transitionState(e,{shape:f},s)}else this.shape=u,this.dirtyShape()},t.prototype._mergeStates=function(e){for(var n=r.prototype._mergeStates.call(this,e),i,a=0;a<e.length;a++){var o=e[a];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(n.shape=i),n},t.prototype.getAnimationStyleProps=function(){return pC},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=(function(a){N(o,a);function o(s){var l=a.call(this,s)||this;return e.init&&e.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return ut(e.style)},o.prototype.getDefaultShape=function(){return ut(e.shape)},o})(t);for(var i in e)typeof e[i]=="function"&&(n.prototype[i]=e[i]);return n},t.initDefaultProps=(function(){var e=t.prototype;e.type="path",e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=ge|qi|Qn})(),t})(ua),gC=gt({strokeFirst:!0,font:Kr,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},lp),jo=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.hasStroke=function(){var e=this.style,n=e.stroke;return n!=null&&n!=="none"&&e.lineWidth>0},t.prototype.hasFill=function(){var e=this.style,n=e.fill;return n!=null&&n!=="none"},t.prototype.createStyle=function(e){return vo(gC,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var n=e.text;n!=null?n+="":n="";var i=Nu(n,e.font,e.textAlign,e.textBaseline);if(i.x+=e.x||0,i.y+=e.y||0,this.hasStroke()){var a=e.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t})(ua);jo.prototype.type="tspan";var mC=gt({x:0,y:0},un),yC={style:gt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Yo.style)};function _C(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var Er=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return vo(mC,e)},t.prototype._getSize=function(e){var n=this.style,i=n[e];if(i!=null)return i;var a=_C(n.image)?n.image:this.__image;if(!a)return 0;var o=e==="width"?"height":"width",s=n[o];return s==null?a[e]:a[e]/a[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return yC},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new pt(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t})(ua);Er.prototype.type="image";function wC(r,t){var e=t.x,n=t.y,i=t.width,a=t.height,o=t.r,s,l,u,f;i<0&&(e=e+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=f=o:o instanceof Array?o.length===1?s=l=u=f=o[0]:o.length===2?(s=u=o[0],l=f=o[1]):o.length===3?(s=o[0],l=f=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],f=o[3]):s=l=u=f=0;var h;s+l>i&&(h=s+l,s*=i/h,l*=i/h),u+f>i&&(h=u+f,u*=i/h,f*=i/h),l+u>a&&(h=l+u,l*=a/h,u*=a/h),s+f>a&&(h=s+f,s*=a/h,f*=a/h),r.moveTo(e+s,n),r.lineTo(e+i-l,n),l!==0&&r.arc(e+i-l,n+l,l,-Math.PI/2,0),r.lineTo(e+i,n+a-u),u!==0&&r.arc(e+i-u,n+a-u,u,0,Math.PI/2),r.lineTo(e+f,n+a),f!==0&&r.arc(e+f,n+a-f,f,Math.PI/2,Math.PI),r.lineTo(e,n+s),s!==0&&r.arc(e+s,n+s,s,Math.PI,Math.PI*1.5)}var si=Math.round;function up(r,t,e){if(t){var n=t.x1,i=t.x2,a=t.y1,o=t.y2;r.x1=n,r.x2=i,r.y1=a,r.y2=o;var s=e&&e.lineWidth;return s&&(si(n*2)===si(i*2)&&(r.x1=r.x2=yn(n,s,!0)),si(a*2)===si(o*2)&&(r.y1=r.y2=yn(a,s,!0))),r}}function fp(r,t,e){if(t){var n=t.x,i=t.y,a=t.width,o=t.height;r.x=n,r.y=i,r.width=a,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=yn(n,s,!0),r.y=yn(i,s,!0),r.width=Math.max(yn(n+a,s,!1)-r.x,a===0?0:1),r.height=Math.max(yn(i+o,s,!1)-r.y,o===0?0:1)),r}}function yn(r,t,e){if(!t)return r;var n=si(r*2);return(n+si(t))%2===0?n/2:(n+(e?1:-1))/2}var bC=(function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r})(),SC={},Tt=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new bC},t.prototype.buildPath=function(e,n){var i,a,o,s;if(this.subPixelOptimize){var l=fp(SC,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?wC(e,n):e.rect(i,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t})(vt);Tt.prototype.type="rect";var hp={fill:"#000"},cp=2,xC={style:gt({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Yo.style)},Ut=(function(r){N(t,r);function t(e){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=hp,n.attr(e),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e<this._children.length;e++){var n=this._children[e];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var e=this.innerTransformable;e?(e.updateTransform(),e.transform&&(this.transform=e.transform)):r.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(e){var n=this.innerTransformable;return n?n.getLocalTransform(e):r.prototype.getLocalTransform.call(this,e)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,AC(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].__zr=e},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new pt(0,0,0,0),n=this._children,i=[],a=null,o=0;o<n.length;o++){var s=n[o],l=s.getBoundingRect(),u=s.getLocalTransform(i);u?(e.copy(l),e.applyTransform(u),a=a||e.clone(),a.union(e)):(a=a||l.clone(),a.union(l))}this._rect=a||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||hp},t.prototype.setTextContent=function(e){if(process.env.NODE_ENV!=="production")throw new Error("Can't attach text on another text")},t.prototype._mergeStyle=function(e,n){if(!n)return e;var i=n.rich,a=e.rich||i&&{};return B(e,n),i&&a?(this._mergeRich(a,i),e.rich=a):a&&(e.rich=a),e},t.prototype._mergeRich=function(e,n){for(var i=Ct(n),a=0;a<i.length;a++){var o=i[a];e[o]=e[o]||{},B(e[o],n[o])}},t.prototype.getAnimationStyleProps=function(){return xC},t.prototype._getOrCreateChild=function(e){var n=this._children[this._childCursor];return(!n||!(n instanceof e))&&(n=new e),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},t.prototype._updatePlainTexts=function(){var e=this.style,n=e.font||Kr,i=e.padding,a=_p(e),o=Ux(a,e),s=lf(e),l=!!e.backgroundColor,u=o.outerHeight,f=o.outerWidth,h=o.contentWidth,c=o.lines,v=o.lineHeight,d=this._defaultStyle;this.isTruncated=!!o.isTruncated;var p=e.x||0,g=e.y||0,m=e.align||d.align||"left",y=e.verticalAlign||d.verticalAlign||"top",_=p,w=ni(g,o.contentHeight,y);if(s||i){var b=ra(p,f,m),S=ni(g,u,y);s&&this._renderBackground(e,e,b,S,f,u)}w+=v/2,i&&(_=yp(p,m,i),y==="top"?w+=i[0]:y==="bottom"&&(w-=i[2]));for(var x=0,T=!1,M=mp("fill"in e?e.fill:(T=!0,d.fill)),A=gp("stroke"in e?e.stroke:!l&&(!d.autoStroke||T)?(x=cp,d.stroke):null),C=e.textShadowBlur>0,I=e.width!=null&&(e.overflow==="truncate"||e.overflow==="break"||e.overflow==="breakAll"),E=o.calculatedLineHeight,L=0;L<c.length;L++){var P=this._getOrCreateChild(jo),k=P.createStyle();P.useStyle(k),k.text=c[L],k.x=_,k.y=w,k.textAlign=m,k.textBaseline="middle",k.opacity=e.opacity,k.strokeFirst=!0,C&&(k.shadowBlur=e.textShadowBlur||0,k.shadowColor=e.textShadowColor||"transparent",k.shadowOffsetX=e.textShadowOffsetX||0,k.shadowOffsetY=e.textShadowOffsetY||0),k.stroke=A,k.fill=M,A&&(k.lineWidth=e.lineWidth||x,k.lineDash=e.lineDash,k.lineDashOffset=e.lineDashOffset||0),k.font=n,dp(k,e),w+=v,I&&P.setBoundingRect(new pt(ra(k.x,h,k.textAlign),ni(k.y,E,k.textBaseline),h,E))}},t.prototype._updateRichTexts=function(){var e=this.style,n=_p(e),i=Xx(n,e),a=i.width,o=i.outerWidth,s=i.outerHeight,l=e.padding,u=e.x||0,f=e.y||0,h=this._defaultStyle,c=e.align||h.align,v=e.verticalAlign||h.verticalAlign;this.isTruncated=!!i.isTruncated;var d=ra(u,o,c),p=ni(f,s,v),g=d,m=p;l&&(g+=l[3],m+=l[0]);var y=g+a;lf(e)&&this._renderBackground(e,e,d,p,o,s);for(var _=!!e.backgroundColor,w=0;w<i.lines.length;w++){for(var b=i.lines[w],S=b.tokens,x=S.length,T=b.lineHeight,M=b.width,A=0,C=g,I=y,E=x-1,L=void 0;A<x&&(L=S[A],!L.align||L.align==="left");)this._placeToken(L,e,T,m,C,"left",_),M-=L.width,C+=L.width,A++;for(;E>=0&&(L=S[E],L.align==="right");)this._placeToken(L,e,T,m,I,"right",_),M-=L.width,I-=L.width,E--;for(C+=(a-(C-g)-(y-I)-M)/2;A<=E;)L=S[A],this._placeToken(L,e,T,m,C+L.width/2,"center",_),C+=L.width,A++;m+=T}},t.prototype._placeToken=function(e,n,i,a,o,s,l){var u=n.rich[e.styleName]||{};u.text=e.text;var f=e.verticalAlign,h=a+i/2;f==="top"?h=a+e.height/2:f==="bottom"&&(h=a+i-e.height/2);var c=!e.isLineHolder&&lf(u);c&&this._renderBackground(u,n,s==="right"?o-e.width:s==="center"?o-e.width/2:o,h-e.height/2,e.width,e.height);var v=!!u.backgroundColor,d=e.textPadding;d&&(o=yp(o,s,d),h-=e.height/2-d[0]-e.innerHeight/2);var p=this._getOrCreateChild(jo),g=p.createStyle();p.useStyle(g);var m=this._defaultStyle,y=!1,_=0,w=mp("fill"in u?u.fill:"fill"in n?n.fill:(y=!0,m.fill)),b=gp("stroke"in u?u.stroke:"stroke"in n?n.stroke:!v&&!l&&(!m.autoStroke||y)?(_=cp,m.stroke):null),S=u.textShadowBlur>0||n.textShadowBlur>0;g.text=e.text,g.x=o,g.y=h,S&&(g.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,g.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=e.font||Kr,g.opacity=Gn(u.opacity,n.opacity,1),dp(g,u),b&&(g.lineWidth=Gn(u.lineWidth,n.lineWidth,_),g.lineDash=nt(u.lineDash,n.lineDash),g.lineDashOffset=n.lineDashOffset||0,g.stroke=b),w&&(g.fill=w);var x=e.contentWidth,T=e.contentHeight;p.setBoundingRect(new pt(ra(g.x,x,g.textAlign),ni(g.y,T,g.textBaseline),x,T))},t.prototype._renderBackground=function(e,n,i,a,o,s){var l=e.backgroundColor,u=e.borderWidth,f=e.borderColor,h=l&&l.image,c=l&&!h,v=e.borderRadius,d=this,p,g;if(c||e.lineHeight||u&&f){p=this._getOrCreateChild(Tt),p.useStyle(p.createStyle()),p.style.fill=null;var m=p.shape;m.x=i,m.y=a,m.width=o,m.height=s,m.r=v,p.dirtyShape()}if(c){var y=p.style;y.fill=l||null,y.fillOpacity=nt(e.fillOpacity,1)}else if(h){g=this._getOrCreateChild(Er),g.onload=function(){d.dirtyStyle()};var _=g.style;_.image=l.image,_.x=i,_.y=a,_.width=o,_.height=s}if(u&&f){var y=p.style;y.lineWidth=u,y.stroke=f,y.strokeOpacity=nt(e.strokeOpacity,1),y.lineDash=e.borderDash,y.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var w=(p||g).style;w.shadowBlur=e.shadowBlur||0,w.shadowColor=e.shadowColor||"transparent",w.shadowOffsetX=e.shadowOffsetX||0,w.shadowOffsetY=e.shadowOffsetY||0,w.opacity=Gn(e.opacity,n.opacity,1)},t.makeFont=function(e){var n="";return MC(e)&&(n=[e.fontStyle,e.fontWeight,DC(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),n&&Xe(n)||e.textFont||e.font},t})(ua),CC={left:!0,right:1,center:1},TC={top:1,bottom:1,middle:1},vp=["fontStyle","fontWeight","fontSize","fontFamily"];function DC(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Zl+"px":r+"px"}function dp(r,t){for(var e=0;e<vp.length;e++){var n=vp[e],i=t[n];i!=null&&(r[n]=i)}}function MC(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function AC(r){return pp(r),D(r.rich,pp),r}function pp(r){if(r){r.font=Ut.makeFont(r);var t=r.align;t==="middle"&&(t="center"),r.align=t==null||CC[t]?t:"left";var e=r.verticalAlign;e==="center"&&(e="middle"),r.verticalAlign=e==null||TC[e]?e:"top";var n=r.padding;n&&(r.padding=kv(r.padding))}}function gp(r,t){return r==null||t<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function mp(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function yp(r,t,e){return t==="right"?r-e[1]:t==="center"?r+e[3]/2-e[1]/2:r+e[3]}function _p(r){var t=r.text;return t!=null&&(t+=""),t}function lf(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var ht=Nt(),IC=function(r,t,e,n){if(n){var i=ht(n);i.dataIndex=e,i.dataType=t,i.seriesIndex=r,i.ssrType="chart",n.type==="group"&&n.traverse(function(a){var o=ht(a);o.seriesIndex=r,o.dataIndex=e,o.dataType=t,o.ssrType="chart"})}},wp=1,bp={},Sp=Nt(),uf=Nt(),ff=0,Qo=1,Jo=2,er=["emphasis","blur","select"],xp=["normal","emphasis","blur","select"],EC=10,LC=9,_n="highlight",ts="downplay",ca="select",es="unselect",va="toggleSelect";function li(r){return r!=null&&r!=="none"}function rs(r,t,e){r.onHoverStateChange&&(r.hoverState||0)!==e&&r.onHoverStateChange(t),r.hoverState=e}function Cp(r){rs(r,"emphasis",Jo)}function Tp(r){r.hoverState===Jo&&rs(r,"normal",ff)}function hf(r){rs(r,"blur",Qo)}function Dp(r){r.hoverState===Qo&&rs(r,"normal",ff)}function PC(r){r.selected=!0}function kC(r){r.selected=!1}function Mp(r,t,e){t(r,e)}function vr(r,t,e){Mp(r,t,e),r.isGroup&&r.traverse(function(n){Mp(n,t,e)})}function Ap(r,t){switch(t){case"emphasis":r.hoverState=Jo;break;case"normal":r.hoverState=ff;break;case"blur":r.hoverState=Qo;break;case"select":r.selected=!0}}function RC(r,t,e,n){for(var i=r.style,a={},o=0;o<t.length;o++){var s=t[o],l=i[s];a[s]=l??(n&&n[s])}for(var o=0;o<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(e)<0&&u.targetName==="style"&&u.saveTo(a,t)}return a}function OC(r,t,e,n){var i=e&&mt(e,"select")>=0,a=!1;if(r instanceof vt){var o=Sp(r),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(li(s)||li(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=B({},n),u=B({},u),u.fill=s):!li(u.fill)&&li(s)?(a=!0,n=B({},n),u=B({},u),u.fill=vd(s)):!li(u.stroke)&&li(l)&&(a||(n=B({},n),u=B({},u)),u.stroke=vd(l)),n.style=u}}if(n&&n.z2==null){a||(n=B({},n));var f=r.z2EmphasisLift;n.z2=r.z2+(f??EC)}return n}function NC(r,t,e){if(e&&e.z2==null){e=B({},e);var n=r.z2SelectLift;e.z2=r.z2+(n??LC)}return e}function BC(r,t,e){var n=mt(r.currentStates,t)>=0,i=r.style.opacity,a=n?null:RC(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=B({},e),o=B({opacity:n?i:a.opacity*.1},o),e.style=o),e}function cf(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return OC(this,r,t,e);if(r==="blur")return BC(this,r,e);if(r==="select")return NC(this,r,e)}return e}function FC(r){r.stateProxy=cf;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=cf),e&&(e.stateProxy=cf)}function Ip(r,t){!Rp(r,t)&&!r.__highByOuter&&vr(r,Cp)}function Ep(r,t){!Rp(r,t)&&!r.__highByOuter&&vr(r,Tp)}function ns(r,t){r.__highByOuter|=1<<(t||0),vr(r,Cp)}function is(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&vr(r,Tp)}function zC(r){vr(r,hf)}function Lp(r){vr(r,Dp)}function Pp(r){vr(r,PC)}function kp(r){vr(r,kC)}function Rp(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function Op(r){var t=r.getModel(),e=[],n=[];t.eachComponent(function(i,a){var o=uf(a),s=i==="series",l=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){Dp(u)}),s&&e.push(a)),o.isBlured=!1}),D(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(e,!1,t)})}function vf(r,t,e,n){var i=n.getModel();e=e||"coordinateSystem";function a(u,f){for(var h=0;h<f.length;h++){var c=u.getItemGraphicEl(f[h]);c&&Lp(c)}}if(r!=null&&!(!t||t==="none")){var o=i.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries(function(u){var f=o===u,h=u.coordinateSystem;h&&h.master&&(h=h.master);var c=h&&s?h===s:f;if(!(e==="series"&&!f||e==="coordinateSystem"&&!c||t==="series"&&f)){var v=n.getViewOfSeriesModel(u);if(v.group.traverse(function(g){g.__highByOuter&&f&&t==="self"||hf(g)}),oe(t))a(u.getData(),t);else if(q(t))for(var d=Ct(t),p=0;p<d.length;p++)a(u.getData(d[p]),t[d[p]]);l.push(u),uf(u).isBlured=!0}}),i.eachComponent(function(u,f){if(u!=="series"){var h=n.getViewOfComponentModel(f);h&&h.toggleBlurSeries&&h.toggleBlurSeries(l,!0,i)}})}}function df(r,t,e){if(!(r==null||t==null)){var n=e.getModel().getComponent(r,t);if(n){uf(n).isBlured=!0;var i=e.getViewOfComponentModel(n);!i||!i.focusBlurEnabled||i.group.traverse(function(a){hf(a)})}}}function VC(r,t,e){var n=r.seriesIndex,i=r.getData(t.dataType);if(!i){process.env.NODE_ENV!=="production"&&qt("Unknown dataType "+t.dataType);return}var a=sn(i,t);a=(W(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),l=0;!o&&l<s;)o=i.getItemGraphicEl(l++);if(o){var u=ht(o);vf(n,u.focus,u.blurScope,e)}else{var f=r.get(["emphasis","focus"]),h=r.get(["emphasis","blurScope"]);f!=null&&vf(n,f,h,e)}}function pf(r,t,e,n){var i={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||t==null||e==null)return i;var a=n.getModel().getComponent(r,t);if(!a)return i;var o=n.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(e),l,u=0;u<s.length;u++)if(process.env.NODE_ENV!=="production"&&!ui(s[u])&&qt("param should be highDownDispatcher"),ht(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function HC(r,t,e){process.env.NODE_ENV!=="production"&&!ui(r)&&qt("param should be highDownDispatcher");var n=ht(r),i=pf(n.componentMainType,n.componentIndex,n.componentHighDownName,e),a=i.dispatchers,o=i.focusSelf;a?(o&&df(n.componentMainType,n.componentIndex,e),D(a,function(s){return Ip(s,t)})):(vf(n.seriesIndex,n.focus,n.blurScope,e),n.focus==="self"&&df(n.componentMainType,n.componentIndex,e),Ip(r,t))}function WC(r,t,e){process.env.NODE_ENV!=="production"&&!ui(r)&&qt("param should be highDownDispatcher"),Op(e);var n=ht(r),i=pf(n.componentMainType,n.componentIndex,n.componentHighDownName,e).dispatchers;i?D(i,function(a){return Ep(a,t)}):Ep(r,t)}function GC(r,t,e){if(gf(t)){var n=t.dataType,i=r.getData(n),a=sn(i,t);W(a)||(a=[a]),r[t.type===va?"toggleSelect":t.type===ca?"select":"unselect"](a,n)}}function Np(r){var t=r.getAllData();D(t,function(e){var n=e.data,i=e.type;n.eachItemGraphicEl(function(a,o){r.isSelected(o,i)?Pp(a):kp(a)})})}function $C(r){var t=[];return r.eachSeries(function(e){var n=e.getAllData();D(n,function(i){i.data;var a=i.type,o=e.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:e.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function as(r,t,e){Fp(r,!0),vr(r,FC),YC(r,t,e)}function UC(r){Fp(r,!1)}function da(r,t,e,n){n?UC(r):as(r,t,e)}function YC(r,t,e){var n=ht(r);t!=null?(n.focus=t,n.blurScope=e):n.focus&&(n.focus=null)}var Bp=["emphasis","blur","select"],ZC={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function os(r,t,e,n){e=e||"itemStyle";for(var i=0;i<Bp.length;i++){var a=Bp[i],o=t.getModel([a,e]),s=r.ensureState(a);s.style=o[ZC[e]]()}}function Fp(r,t){var e=t===!1,n=r;r.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!e||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!e)}function ui(r){return!!(r&&r.__highDownDispatcher)}function XC(r){var t=bp[r];return t==null&&wp<=32&&(t=bp[r]=wp++),t}function gf(r){var t=r.type;return t===ca||t===es||t===va}function zp(r){var t=r.type;return t===_n||t===ts}function qC(r){var t=Sp(r);t.normalFill=r.style.fill,t.normalStroke=r.style.stroke;var e=r.states.select||{};t.selectFill=e.style&&e.style.fill||null,t.selectStroke=e.style&&e.style.stroke||null}var fi=pn.CMD,KC=[[],[],[]],Vp=Math.sqrt,jC=Math.atan2;function QC(r,t){if(t){var e=r.data,n=r.len(),i,a,o,s,l,u,f=fi.M,h=fi.C,c=fi.L,v=fi.R,d=fi.A,p=fi.Q;for(o=0,s=0;o<n;){switch(i=e[o++],s=o,a=0,i){case f:a=1;break;case c:a=1;break;case h:a=3;break;case p:a=2;break;case d:var g=t[4],m=t[5],y=Vp(t[0]*t[0]+t[1]*t[1]),_=Vp(t[2]*t[2]+t[3]*t[3]),w=jC(-t[1]/_,t[0]/y);e[o]*=y,e[o++]+=g,e[o]*=_,e[o++]+=m,e[o++]*=y,e[o++]*=_,e[o++]+=w,e[o++]+=w,o+=2,s=o;break;case v:u[0]=e[o++],u[1]=e[o++],Se(u,u,t),e[s++]=u[0],e[s++]=u[1],u[0]+=e[o++],u[1]+=e[o++],Se(u,u,t),e[s++]=u[0],e[s++]=u[1]}for(l=0;l<a;l++){var b=KC[l];b[0]=e[o++],b[1]=e[o++],Se(b,b,t),e[s++]=b[0],e[s++]=b[1]}}r.increaseVersion()}}var mf=Math.sqrt,ss=Math.sin,ls=Math.cos,pa=Math.PI;function Hp(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function yf(r,t){return(r[0]*t[0]+r[1]*t[1])/(Hp(r)*Hp(t))}function Wp(r,t){return(r[0]*t[1]<r[1]*t[0]?-1:1)*Math.acos(yf(r,t))}function Gp(r,t,e,n,i,a,o,s,l,u,f){var h=l*(pa/180),c=ls(h)*(r-e)/2+ss(h)*(t-n)/2,v=-1*ss(h)*(r-e)/2+ls(h)*(t-n)/2,d=c*c/(o*o)+v*v/(s*s);d>1&&(o*=mf(d),s*=mf(d));var p=(i===a?-1:1)*mf((o*o*(s*s)-o*o*(v*v)-s*s*(c*c))/(o*o*(v*v)+s*s*(c*c)))||0,g=p*o*v/s,m=p*-s*c/o,y=(r+e)/2+ls(h)*g-ss(h)*m,_=(t+n)/2+ss(h)*g+ls(h)*m,w=Wp([1,0],[(c-g)/o,(v-m)/s]),b=[(c-g)/o,(v-m)/s],S=[(-1*c-g)/o,(-1*v-m)/s],x=Wp(b,S);if(yf(b,S)<=-1&&(x=pa),yf(b,S)>=1&&(x=0),x<0){var T=Math.round(x/pa*1e6)/1e6;x=pa*2+T%2*pa}f.addData(u,y,_,o,s,w,x,h,a)}var JC=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,tT=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function eT(r){var t=new pn;if(!r)return t;var e=0,n=0,i=e,a=n,o,s=pn.CMD,l=r.match(JC);if(!l)return t;for(var u=0;u<l.length;u++){for(var f=l[u],h=f.charAt(0),c=void 0,v=f.match(tT)||[],d=v.length,p=0;p<d;p++)v[p]=parseFloat(v[p]);for(var g=0;g<d;){var m=void 0,y=void 0,_=void 0,w=void 0,b=void 0,S=void 0,x=void 0,T=e,M=n,A=void 0,C=void 0;switch(h){case"l":e+=v[g++],n+=v[g++],c=s.L,t.addData(c,e,n);break;case"L":e=v[g++],n=v[g++],c=s.L,t.addData(c,e,n);break;case"m":e+=v[g++],n+=v[g++],c=s.M,t.addData(c,e,n),i=e,a=n,h="l";break;case"M":e=v[g++],n=v[g++],c=s.M,t.addData(c,e,n),i=e,a=n,h="L";break;case"h":e+=v[g++],c=s.L,t.addData(c,e,n);break;case"H":e=v[g++],c=s.L,t.addData(c,e,n);break;case"v":n+=v[g++],c=s.L,t.addData(c,e,n);break;case"V":n=v[g++],c=s.L,t.addData(c,e,n);break;case"C":c=s.C,t.addData(c,v[g++],v[g++],v[g++],v[g++],v[g++],v[g++]),e=v[g-2],n=v[g-1];break;case"c":c=s.C,t.addData(c,v[g++]+e,v[g++]+n,v[g++]+e,v[g++]+n,v[g++]+e,v[g++]+n),e+=v[g-2],n+=v[g-1];break;case"S":m=e,y=n,A=t.len(),C=t.data,o===s.C&&(m+=e-C[A-4],y+=n-C[A-3]),c=s.C,T=v[g++],M=v[g++],e=v[g++],n=v[g++],t.addData(c,m,y,T,M,e,n);break;case"s":m=e,y=n,A=t.len(),C=t.data,o===s.C&&(m+=e-C[A-4],y+=n-C[A-3]),c=s.C,T=e+v[g++],M=n+v[g++],e+=v[g++],n+=v[g++],t.addData(c,m,y,T,M,e,n);break;case"Q":T=v[g++],M=v[g++],e=v[g++],n=v[g++],c=s.Q,t.addData(c,T,M,e,n);break;case"q":T=v[g++]+e,M=v[g++]+n,e+=v[g++],n+=v[g++],c=s.Q,t.addData(c,T,M,e,n);break;case"T":m=e,y=n,A=t.len(),C=t.data,o===s.Q&&(m+=e-C[A-4],y+=n-C[A-3]),e=v[g++],n=v[g++],c=s.Q,t.addData(c,m,y,e,n);break;case"t":m=e,y=n,A=t.len(),C=t.data,o===s.Q&&(m+=e-C[A-4],y+=n-C[A-3]),e+=v[g++],n+=v[g++],c=s.Q,t.addData(c,m,y,e,n);break;case"A":_=v[g++],w=v[g++],b=v[g++],S=v[g++],x=v[g++],T=e,M=n,e=v[g++],n=v[g++],c=s.A,Gp(T,M,e,n,S,x,_,w,b,c,t);break;case"a":_=v[g++],w=v[g++],b=v[g++],S=v[g++],x=v[g++],T=e,M=n,e+=v[g++],n+=v[g++],c=s.A,Gp(T,M,e,n,S,x,_,w,b,c,t);break}}(h==="z"||h==="Z")&&(c=s.Z,t.addData(c),e=i,n=a),o=c}return t.toStatic(),t}var $p=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t})(vt);function Up(r){return r.setData!=null}function Yp(r,t){var e=eT(r),n=B({},t);return n.buildPath=function(i){if(Up(i)){i.setData(e.data);var a=i.getContext();a&&i.rebuildPath(a,1)}else{var a=i;e.rebuildPath(a,1)}},n.applyTransform=function(i){QC(e,i),this.dirtyShape()},n}function rT(r,t){return new $p(Yp(r,t))}function nT(r,t){var e=Yp(r,t),n=(function(i){N(a,i);function a(o){var s=i.call(this,o)||this;return s.applyTransform=e.applyTransform,s.buildPath=e.buildPath,s}return a})($p);return n}function iT(r,t){for(var e=[],n=r.length,i=0;i<n;i++){var a=r[i];e.push(a.getUpdatedPathProxy(!0))}var o=new vt(t);return o.createPathProxy(),o.buildPath=function(s){if(Up(s)){s.appendPath(e);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}var aT=(function(){function r(){this.cx=0,this.cy=0,this.r=0}return r})(),us=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new aT},t.prototype.buildPath=function(e,n){e.moveTo(n.cx+n.r,n.cy),e.arc(n.cx,n.cy,n.r,0,Math.PI*2)},t})(vt);us.prototype.type="circle";var oT=(function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r})(),_f=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new oT},t.prototype.buildPath=function(e,n){var i=.5522848,a=n.cx,o=n.cy,s=n.rx,l=n.ry,u=s*i,f=l*i;e.moveTo(a-s,o),e.bezierCurveTo(a-s,o-f,a-u,o-l,a,o-l),e.bezierCurveTo(a+u,o-l,a+s,o-f,a+s,o),e.bezierCurveTo(a+s,o+f,a+u,o+l,a,o+l),e.bezierCurveTo(a-u,o+l,a-s,o+f,a-s,o),e.closePath()},t})(vt);_f.prototype.type="ellipse";var Zp=Math.PI,wf=Zp*2,wn=Math.sin,hi=Math.cos,sT=Math.acos,Kt=Math.atan2,Xp=Math.abs,ga=Math.sqrt,ma=Math.max,rr=Math.min,We=1e-4;function lT(r,t,e,n,i,a,o,s){var l=e-r,u=n-t,f=o-i,h=s-a,c=h*l-f*u;if(!(c*c<We))return c=(f*(t-a)-h*(r-i))/c,[r+c*l,t+c*u]}function fs(r,t,e,n,i,a,o){var s=r-e,l=t-n,u=(o?a:-a)/ga(s*s+l*l),f=u*l,h=-u*s,c=r+f,v=t+h,d=e+f,p=n+h,g=(c+d)/2,m=(v+p)/2,y=d-c,_=p-v,w=y*y+_*_,b=i-a,S=c*p-d*v,x=(_<0?-1:1)*ga(ma(0,b*b*w-S*S)),T=(S*_-y*x)/w,M=(-S*y-_*x)/w,A=(S*_+y*x)/w,C=(-S*y+_*x)/w,I=T-g,E=M-m,L=A-g,P=C-m;return I*I+E*E>L*L+P*P&&(T=A,M=C),{cx:T,cy:M,x0:-f,y0:-h,x1:T*(i/b-1),y1:M*(i/b-1)}}function uT(r){var t;if(W(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function fT(r,t){var e,n=ma(t.r,0),i=ma(t.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var f=t.cx,h=t.cy,c=!!t.clockwise,v=Xp(u-l),d=v>wf&&v%wf;if(d>We&&(v=d),!(n>We))r.moveTo(f,h);else if(v>wf-We)r.moveTo(f+n*hi(l),h+n*wn(l)),r.arc(f,h,n,l,u,!c),i>We&&(r.moveTo(f+i*hi(u),h+i*wn(u)),r.arc(f,h,i,u,l,c));else{var p=void 0,g=void 0,m=void 0,y=void 0,_=void 0,w=void 0,b=void 0,S=void 0,x=void 0,T=void 0,M=void 0,A=void 0,C=void 0,I=void 0,E=void 0,L=void 0,P=n*hi(l),k=n*wn(l),z=i*hi(u),O=i*wn(u),V=v>We;if(V){var $=t.cornerRadius;$&&(e=uT($),p=e[0],g=e[1],m=e[2],y=e[3]);var Z=Xp(n-i)/2;if(_=rr(Z,m),w=rr(Z,y),b=rr(Z,p),S=rr(Z,g),M=x=ma(_,w),A=T=ma(b,S),(x>We||T>We)&&(C=n*hi(u),I=n*wn(u),E=i*hi(l),L=i*wn(l),v<Zp)){var et=lT(P,k,E,L,C,I,z,O);if(et){var at=P-et[0],ot=k-et[1],st=C-et[0],ie=I-et[1],_t=1/wn(sT((at*st+ot*ie)/(ga(at*at+ot*ot)*ga(st*st+ie*ie)))/2),Ze=ga(et[0]*et[0]+et[1]*et[1]);M=rr(x,(n-Ze)/(_t+1)),A=rr(T,(i-Ze)/(_t-1))}}}if(!V)r.moveTo(f+P,h+k);else if(M>We){var Vt=rr(m,M),Mt=rr(y,M),K=fs(E,L,P,k,n,Vt,c),lt=fs(C,I,z,O,n,Mt,c);r.moveTo(f+K.cx+K.x0,h+K.cy+K.y0),M<x&&Vt===Mt?r.arc(f+K.cx,h+K.cy,M,Kt(K.y0,K.x0),Kt(lt.y0,lt.x0),!c):(Vt>0&&r.arc(f+K.cx,h+K.cy,Vt,Kt(K.y0,K.x0),Kt(K.y1,K.x1),!c),r.arc(f,h,n,Kt(K.cy+K.y1,K.cx+K.x1),Kt(lt.cy+lt.y1,lt.cx+lt.x1),!c),Mt>0&&r.arc(f+lt.cx,h+lt.cy,Mt,Kt(lt.y1,lt.x1),Kt(lt.y0,lt.x0),!c))}else r.moveTo(f+P,h+k),r.arc(f,h,n,l,u,!c);if(!(i>We)||!V)r.lineTo(f+z,h+O);else if(A>We){var Vt=rr(p,A),Mt=rr(g,A),K=fs(z,O,C,I,i,-Mt,c),lt=fs(P,k,E,L,i,-Vt,c);r.lineTo(f+K.cx+K.x0,h+K.cy+K.y0),A<T&&Vt===Mt?r.arc(f+K.cx,h+K.cy,A,Kt(K.y0,K.x0),Kt(lt.y0,lt.x0),!c):(Mt>0&&r.arc(f+K.cx,h+K.cy,Mt,Kt(K.y0,K.x0),Kt(K.y1,K.x1),!c),r.arc(f,h,i,Kt(K.cy+K.y1,K.cx+K.x1),Kt(lt.cy+lt.y1,lt.cx+lt.x1),c),Vt>0&&r.arc(f+lt.cx,h+lt.cy,Vt,Kt(lt.y1,lt.x1),Kt(lt.y0,lt.x0),!c))}else r.lineTo(f+z,h+O),r.arc(f,h,i,u,l,c)}r.closePath()}}}var hT=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r})(),ci=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new hT},t.prototype.buildPath=function(e,n){fT(e,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t})(vt);ci.prototype.type="sector";var cT=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r})(),bf=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new cT},t.prototype.buildPath=function(e,n){var i=n.cx,a=n.cy,o=Math.PI*2;e.moveTo(i+n.r,a),e.arc(i,a,n.r,0,o,!1),e.moveTo(i+n.r0,a),e.arc(i,a,n.r0,0,o,!0)},t})(vt);bf.prototype.type="ring";function vT(r,t,e,n){var i=[],a=[],o=[],s=[],l,u,f,h;if(n){f=[1/0,1/0],h=[-1/0,-1/0];for(var c=0,v=r.length;c<v;c++)Yn(f,f,r[c]),Zn(h,h,r[c]);Yn(f,f,n[0]),Zn(h,h,n[1])}for(var c=0,v=r.length;c<v;c++){var d=r[c];if(e)l=r[c?c-1:v-1],u=r[(c+1)%v];else if(c===0||c===v-1){i.push(Zb(r[c]));continue}else l=r[c-1],u=r[c+1];Xb(a,u,l),Ql(a,a,t);var p=Jl(d,l),g=Jl(d,u),m=p+g;m!==0&&(p/=m,g/=m),Ql(o,a,-p),Ql(s,a,g);var y=Bv([],d,o),_=Bv([],d,s);n&&(Zn(y,y,f),Yn(y,y,h),Zn(_,_,f),Yn(_,_,h)),i.push(y),i.push(_)}return e&&i.push(i.shift()),i}function qp(r,t,e){var n=t.smooth,i=t.points;if(i&&i.length>=2){if(n){var a=vT(i,n,e,t.smoothConstraint);r.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(e?o:o-1);s++){var l=a[s*2],u=a[s*2+1],f=i[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(i[0][0],i[0][1]);for(var s=1,h=i.length;s<h;s++)r.lineTo(i[s][0],i[s][1])}e&&r.closePath()}}var dT=(function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r})(),hs=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new dT},t.prototype.buildPath=function(e,n){qp(e,n,!0)},t})(vt);hs.prototype.type="polygon";var pT=(function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r})(),cs=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new pT},t.prototype.buildPath=function(e,n){qp(e,n,!1)},t})(vt);cs.prototype.type="polyline";var gT={},mT=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})(),Lr=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new mT},t.prototype.buildPath=function(e,n){var i,a,o,s;if(this.subPixelOptimize){var l=up(gT,n,this.style);i=l.x1,a=l.y1,o=l.x2,s=l.y2}else i=n.x1,a=n.y1,o=n.x2,s=n.y2;var u=n.percent;u!==0&&(e.moveTo(i,a),u<1&&(o=i*(1-u)+o*u,s=a*(1-u)+s*u),e.lineTo(o,s))},t.prototype.pointAt=function(e){var n=this.shape;return[n.x1*(1-e)+n.x2*e,n.y1*(1-e)+n.y2*e]},t})(vt);Lr.prototype.type="line";var he=[],yT=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return r})();function Kp(r,t,e){var n=r.cpx2,i=r.cpy2;return n!=null||i!=null?[(e?rd:$t)(r.x1,r.cpx1,r.cpx2,r.x2,t),(e?rd:$t)(r.y1,r.cpy1,r.cpy2,r.y2,t)]:[(e?id:le)(r.x1,r.cpx1,r.x2,t),(e?id:le)(r.y1,r.cpy1,r.y2,t)]}var Sf=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new yT},t.prototype.buildPath=function(e,n){var i=n.x1,a=n.y1,o=n.x2,s=n.y2,l=n.cpx1,u=n.cpy1,f=n.cpx2,h=n.cpy2,c=n.percent;c!==0&&(e.moveTo(i,a),f==null||h==null?(c<1&&(Co(i,l,o,c,he),l=he[1],o=he[2],Co(a,u,s,c,he),u=he[1],s=he[2]),e.quadraticCurveTo(l,u,o,s)):(c<1&&(xo(i,l,f,o,c,he),l=he[1],f=he[2],o=he[3],xo(a,u,h,s,c,he),u=he[1],h=he[2],s=he[3]),e.bezierCurveTo(l,u,f,h,o,s)))},t.prototype.pointAt=function(e){return Kp(this.shape,e,!1)},t.prototype.tangentAt=function(e){var n=Kp(this.shape,e,!0);return jb(n,n)},t})(vt);Sf.prototype.type="bezier-curve";var _T=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),vs=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new _T},t.prototype.buildPath=function(e,n){var i=n.cx,a=n.cy,o=Math.max(n.r,0),s=n.startAngle,l=n.endAngle,u=n.clockwise,f=Math.cos(s),h=Math.sin(s);e.moveTo(f*o+i,h*o+a),e.arc(i,a,o,s,l,!u)},t})(vt);vs.prototype.type="arc";var wT=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="compound",e}return t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,n=this.shapeChanged(),i=0;i<e.length;i++)n=n||e[i].shapeChanged();n&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],n=this.getGlobalScale(),i=0;i<e.length;i++)e[i].path||e[i].createPathProxy(),e[i].path.setScale(n[0],n[1],e[i].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,n){for(var i=n.paths||[],a=0;a<i.length;a++)i[a].buildPath(e,i[a].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],n=0;n<e.length;n++)e[n].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),vt.prototype.getBoundingRect.call(this)},t})(vt),jp=(function(){function r(t){this.colorStops=t||[]}return r.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},r})(),Qp=(function(r){N(t,r);function t(e,n,i,a,o,s){var l=r.call(this,o)||this;return l.x=e??0,l.y=n??0,l.x2=i??1,l.y2=a??0,l.type="linear",l.global=s||!1,l}return t})(jp),bT=(function(r){N(t,r);function t(e,n,i,a,o){var s=r.call(this,a)||this;return s.x=e??.5,s.y=n??.5,s.r=i??.5,s.type="radial",s.global=o||!1,s}return t})(jp),bn=[0,0],Sn=[0,0],ds=new bt,ps=new bt,gs=(function(){function r(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new bt;for(var n=0;n<2;n++)this._axes[n]=new bt;t&&this.fromBoundingRect(t,e)}return r.prototype.fromBoundingRect=function(t,e){var n=this._corners,i=this._axes,a=t.x,o=t.y,s=a+t.width,l=o+t.height;if(n[0].set(a,o),n[1].set(s,o),n[2].set(s,l),n[3].set(a,l),e)for(var u=0;u<4;u++)n[u].transform(e);bt.sub(i[0],n[1],n[0]),bt.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var u=0;u<2;u++)this._origin[u]=i[u].dot(n[0])},r.prototype.intersect=function(t,e){var n=!0,i=!e;return ds.set(1/0,1/0),ps.set(0,0),!this._intersectCheckOneSide(this,t,ds,ps,i,1)&&(n=!1,i)||!this._intersectCheckOneSide(t,this,ds,ps,i,-1)&&(n=!1,i)||i||bt.copy(e,n?ds:ps),n},r.prototype._intersectCheckOneSide=function(t,e,n,i,a,o){for(var s=!0,l=0;l<2;l++){var u=this._axes[l];if(this._getProjMinMaxOnAxis(l,t._corners,bn),this._getProjMinMaxOnAxis(l,e._corners,Sn),bn[1]<Sn[0]||bn[0]>Sn[1]){if(s=!1,a)return s;var f=Math.abs(Sn[0]-bn[1]),h=Math.abs(bn[0]-Sn[1]);Math.min(f,h)>i.len()&&(f<h?bt.scale(i,u,-f*o):bt.scale(i,u,h*o))}else if(n){var f=Math.abs(Sn[0]-bn[1]),h=Math.abs(bn[0]-Sn[1]);Math.min(f,h)<n.len()&&(f<h?bt.scale(n,u,f*o):bt.scale(n,u,-h*o))}}return s},r.prototype._getProjMinMaxOnAxis=function(t,e,n){for(var i=this._axes[t],a=this._origin,o=e[0].dot(i)+a[t],s=o,l=o,u=1;u<e.length;u++){var f=e[u].dot(i)+a[t];s=Math.min(f,s),l=Math.max(f,l)}n[0]=s,n[1]=l},r})(),ST=[],xT=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return t.prototype.traverse=function(e,n){e.call(n,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,n){n?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,n){n=n||!1;for(var i=0;i<e.length;i++)this.addDisplayable(e[i],n)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var n=this._cursor;n<this._displayables.length;n++)e&&e(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)e&&e(this._temporaryDisplayables[n])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var n=this._displayables[e];n.parent=this,n.update(),n.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var n=this._temporaryDisplayables[e];n.parent=this,n.update(),n.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new pt(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var i=this._displayables[n],a=i.getBoundingRect().clone();i.needLocalTransform()&&a.applyTransform(i.getLocalTransform(ST)),e.union(a)}this._rect=e}return this._rect},t.prototype.contain=function(e,n){var i=this.transformCoordToLocal(e,n),a=this.getBoundingRect();if(a.contain(i[0],i[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(e,n))return!0}return!1},t})(ua),CT=Nt();function TT(r,t,e,n,i){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var s=t&&t.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,f=void 0,h=void 0;n?(u=nt(n.duration,200),f=nt(n.easing,"cubicOut"),h=0):(u=t.getShallow(l?"animationDurationUpdate":"animationDuration"),f=t.getShallow(l?"animationEasingUpdate":"animationEasing"),h=t.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(f=a.easing),a.delay!=null&&(h=a.delay)),Q(h)&&(h=h(e,i)),Q(u)&&(u=u(e));var c={duration:u||0,delay:h,easing:f};return c}else return null}function xf(r,t,e,n,i,a,o){var s=!1,l;Q(i)?(o=a,a=i,i=null):q(i)&&(a=i.cb,o=i.during,s=i.isFrom,l=i.removeOpt,i=i.dataIndex);var u=r==="leave";u||t.stopAnimation("leave");var f=TT(r,n,i,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(t,i):null);if(f&&f.duration>0){var h=f.duration,c=f.delay,v=f.easing,d={duration:h,delay:c||0,easing:v,done:a,force:!!a||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,d):t.animateTo(e,d)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),a&&a()}function ce(r,t,e,n,i,a){xf("update",r,t,e,n,i,a)}function nr(r,t,e,n,i,a){xf("enter",r,t,e,n,i,a)}function ya(r){if(!r.__zr)return!0;for(var t=0;t<r.animators.length;t++){var e=r.animators[t];if(e.scope==="leave")return!0}return!1}function ms(r,t,e,n,i,a){ya(r)||xf("leave",r,t,e,n,i,a)}function Jp(r,t,e,n){r.removeTextContent(),r.removeTextGuideLine(),ms(r,{style:{opacity:0}},t,e,n)}function Cf(r,t,e){function n(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(i){i.isGroup||Jp(i,t,e,n)}):Jp(r,t,e,n)}function Tf(r){CT(r).oldStyle=r.style}var ys=Math.max,_s=Math.min,Df={};function DT(r){return vt.extend(r)}var MT=nT;function AT(r,t){return MT(r,t)}function Ge(r,t){Df[r]=t}function IT(r){if(Df.hasOwnProperty(r))return Df[r]}function Mf(r,t,e,n){var i=rT(r,t);return e&&(n==="center"&&(e=eg(e,i.getBoundingRect())),rg(i,e)),i}function tg(r,t,e){var n=new Er({style:{image:r,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(i){if(e==="center"){var a={width:i.width,height:i.height};n.setStyle(eg(t,a))}}});return n}function eg(r,t){var e=t.width/t.height,n=r.height*e,i;n<=r.width?i=r.height:(n=r.width,i=n/e);var a=r.x+r.width/2,o=r.y+r.height/2;return{x:a-n/2,y:o-i/2,width:n,height:i}}var ET=iT;function rg(r,t){if(r.applyTransform){var e=r.getBoundingRect(),n=e.calculateTransform(t);r.applyTransform(n)}}function _a(r,t){return up(r,r,{lineWidth:t}),r}function LT(r){return fp(r.shape,r.shape,r.style),r}var ws=yn;function ng(r,t){for(var e=su([]);r&&r!==t;)jn(e,r.getLocalTransform(),e),r=r.parent;return e}function wa(r,t,e){return t&&!oe(t)&&(t=Ou.getLocalTransform(t)),e&&(t=fu([],t)),Se([],r,t)}function ig(r,t,e){var n=t[4]===0||t[5]===0||t[0]===0?1:Math.abs(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:Math.abs(2*t[4]/t[2]),a=[r==="left"?-n:r==="right"?n:0,r==="top"?-i:r==="bottom"?i:0];return a=wa(a,t,e),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function ag(r){return!r.isGroup}function PT(r){return r.shape!=null}function og(r,t,e){if(!r||!t)return;function n(o){var s={};return o.traverse(function(l){ag(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return PT(o)&&(s.shape=B({},o.shape)),s}var a=n(r);t.traverse(function(o){if(ag(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),ce(o,l,e,ht(o).dataIndex)}}})}function kT(r,t){return X(r,function(e){var n=e[0];n=ys(n,t.x),n=_s(n,t.x+t.width);var i=e[1];return i=ys(i,t.y),i=_s(i,t.y+t.height),[n,i]})}function RT(r,t){var e=ys(r.x,t.x),n=_s(r.x+r.width,t.x+t.width),i=ys(r.y,t.y),a=_s(r.y+r.height,t.y+t.height);if(n>=e&&a>=i)return{x:e,y:i,width:n-e,height:a-i}}function Af(r,t,e){var n=B({rectHover:!0},t),i=n.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(i.image=r.slice(8),gt(i,e),new Er(n)):Mf(r.replace("path://",""),n,e,"center")}function OT(r,t,e,n,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(sg(r,t,e,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function sg(r,t,e,n,i,a,o,s){var l=e-r,u=n-t,f=o-i,h=s-a,c=If(f,h,l,u);if(NT(c))return!1;var v=r-i,d=t-a,p=If(v,d,l,u)/c;if(p<0||p>1)return!1;var g=If(v,d,f,h)/c;return!(g<0||g>1)}function If(r,t,e,n){return r*n-e*t}function NT(r){return r<=1e-6&&r>=-1e-6}function bs(r){var t=r.itemTooltipOption,e=r.componentModel,n=r.itemName,i=G(t)?{formatter:t}:t,a=e.mainType,o=e.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&D(Ct(l),function(f){Jr(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=ht(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:gt({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function lg(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function ba(r,t){if(r)if(W(r))for(var e=0;e<r.length;e++)lg(r[e],t);else lg(r,t)}Ge("circle",us),Ge("ellipse",_f),Ge("sector",ci),Ge("ring",bf),Ge("polygon",hs),Ge("polyline",cs),Ge("rect",Tt),Ge("line",Lr),Ge("bezierCurve",Sf),Ge("arc",vs);const BT=Object.freeze(Object.defineProperty({__proto__:null,Arc:vs,BezierCurve:Sf,BoundingRect:pt,Circle:us,CompoundPath:wT,Ellipse:_f,Group:kt,Image:Er,IncrementalDisplayable:xT,Line:Lr,LinearGradient:Qp,OrientedBoundingRect:gs,Path:vt,Point:bt,Polygon:hs,Polyline:cs,RadialGradient:bT,Rect:Tt,Ring:bf,Sector:ci,Text:Ut,applyTransform:wa,clipPointsByRect:kT,clipRectByRect:RT,createIcon:Af,extendPath:AT,extendShape:DT,getShapeClass:IT,getTransform:ng,groupTransition:og,initProps:nr,isElementRemoved:ya,lineLineIntersect:sg,linePolygonIntersect:OT,makeImage:tg,makePath:Mf,mergePath:ET,registerShape:Ge,removeElement:ms,removeElementWithFadeOut:Cf,resizePath:rg,setTooltipConfig:bs,subPixelOptimize:ws,subPixelOptimizeLine:_a,subPixelOptimizeRect:LT,transformDirection:ig,traverseElements:ba,updateProps:ce},Symbol.toStringTag,{value:"Module"}));var Ss={};function FT(r,t){for(var e=0;e<er.length;e++){var n=er[e],i=t[n],a=r.ensureState(n);a.style=a.style||{},a.style.text=i}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:t.normal}),r.useStates(o,!0)}function ug(r,t,e){var n=r.labelFetcher,i=r.labelDataIndex,a=r.labelDimIndex,o=t.normal,s;n&&(s=n.getFormattedLabel(i,"normal",null,a,o&&o.get("formatter"),e!=null?{interpolatedValue:e}:null)),s==null&&(s=Q(r.defaultText)?r.defaultText(i,r,e):r.defaultText);for(var l={normal:s},u=0;u<er.length;u++){var f=er[u],h=t[f];l[f]=nt(n?n.getFormattedLabel(i,f,null,a,h&&h.get("formatter")):null,s)}return l}function xs(r,t,e,n){e=e||Ss;for(var i=r instanceof Ut,a=!1,o=0;o<xp.length;o++){var s=t[xp[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=i?r:r.getTextContent();if(a){i||(l||(l=new Ut,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=ug(e,t),f=t.normal,h=!!f.getShallow("show"),c=dr(f,n&&n.normal,e,!1,!i);c.text=u.normal,i||r.setTextConfig(fg(f,e,!1));for(var o=0;o<er.length;o++){var v=er[o],s=t[v];if(s){var d=l.ensureState(v),p=!!nt(s.getShallow("show"),h);if(p!==h&&(d.ignore=!p),d.style=dr(s,n&&n[v],e,!0,!i),d.style.text=u[v],!i){var g=r.ensureState(v);g.textConfig=fg(s,e,!0)}}}l.silent=!!f.getShallow("silent"),l.style.x!=null&&(c.x=l.style.x),l.style.y!=null&&(c.y=l.style.y),l.ignore=!h,l.useStyle(c),l.dirty(),e.enableTextSetter&&(Ts(l).setLabelText=function(m){var y=ug(e,t,m);FT(l,y)})}else l&&(l.ignore=!0);r.dirty()}function Cs(r,t){t=t||"label";for(var e={normal:r.getModel(t)},n=0;n<er.length;n++){var i=er[n];e[i]=r.getModel([i,t])}return e}function dr(r,t,e,n,i){var a={};return zT(a,r,e,n,i),t&&B(a,t),a}function fg(r,t,e){t=t||{};var n={},i,a=r.getShallow("rotate"),o=nt(r.getShallow("distance"),e?null:5),s=r.getShallow("offset");return i=r.getShallow("position")||(e?null:"inside"),i==="outside"&&(i=t.defaultOutsidePosition||"top"),i!=null&&(n.position=i),s!=null&&(n.offset=s),a!=null&&(a*=Math.PI/180,n.rotation=a),o!=null&&(n.distance=o),n.outsideFill=r.get("color")==="inherit"?t.inheritColor||null:"auto",n}function zT(r,t,e,n,i){e=e||Ss;var a=t.ecModel,o=a&&a.option.textStyle,s=VT(t),l;if(s){l={};for(var u in s)if(s.hasOwnProperty(u)){var f=t.getModel(["rich",u]);dg(l[u]={},f,o,e,n,i,!1,!0)}}l&&(r.rich=l);var h=t.get("overflow");h&&(r.overflow=h);var c=t.get("minMargin");c!=null&&(r.margin=c),dg(r,t,o,e,n,i,!0,!1)}function VT(r){for(var t;r&&r!==r.ecModel;){var e=(r.option||Ss).rich;if(e){t=t||{};for(var n=Ct(e),i=0;i<n.length;i++){var a=n[i];t[a]=1}}r=r.parentModel}return t}var hg=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],cg=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],vg=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function dg(r,t,e,n,i,a,o,s){e=!i&&e||Ss;var l=n&&n.inheritColor,u=t.getShallow("color"),f=t.getShallow("textBorderColor"),h=nt(t.getShallow("opacity"),e.opacity);(u==="inherit"||u==="auto")&&(process.env.NODE_ENV!=="production"&&u==="auto"&&zt("color: 'auto'","color: 'inherit'"),l?u=l:u=null),(f==="inherit"||f==="auto")&&(process.env.NODE_ENV!=="production"&&f==="auto"&&zt("color: 'auto'","color: 'inherit'"),l?f=l:f=null),a||(u=u||e.color,f=f||e.textBorderColor),u!=null&&(r.fill=u),f!=null&&(r.stroke=f);var c=nt(t.getShallow("textBorderWidth"),e.textBorderWidth);c!=null&&(r.lineWidth=c);var v=nt(t.getShallow("textBorderType"),e.textBorderType);v!=null&&(r.lineDash=v);var d=nt(t.getShallow("textBorderDashOffset"),e.textBorderDashOffset);d!=null&&(r.lineDashOffset=d),!i&&h==null&&!s&&(h=n&&n.defaultOpacity),h!=null&&(r.opacity=h),!i&&!a&&r.fill==null&&n.inheritColor&&(r.fill=n.inheritColor);for(var p=0;p<hg.length;p++){var g=hg[p],m=nt(t.getShallow(g),e[g]);m!=null&&(r[g]=m)}for(var p=0;p<cg.length;p++){var g=cg[p],m=t.getShallow(g);m!=null&&(r[g]=m)}if(r.verticalAlign==null){var y=t.getShallow("baseline");y!=null&&(r.verticalAlign=y)}if(!o||!n.disableBox){for(var p=0;p<vg.length;p++){var g=vg[p],m=t.getShallow(g);m!=null&&(r[g]=m)}var _=t.getShallow("borderType");_!=null&&(r.borderDash=_),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&l&&(process.env.NODE_ENV!=="production"&&r.backgroundColor==="auto"&&zt("backgroundColor: 'auto'","backgroundColor: 'inherit'"),r.backgroundColor=l),(r.borderColor==="auto"||r.borderColor==="inherit")&&l&&(process.env.NODE_ENV!=="production"&&r.borderColor==="auto"&&zt("borderColor: 'auto'","borderColor: 'inherit'"),r.borderColor=l)}}function HT(r,t){var e=t&&t.getModel("textStyle");return Xe([r.fontStyle||e&&e.getShallow("fontStyle")||"",r.fontWeight||e&&e.getShallow("fontWeight")||"",(r.fontSize||e&&e.getShallow("fontSize")||12)+"px",r.fontFamily||e&&e.getShallow("fontFamily")||"sans-serif"].join(" "))}var Ts=Nt();function WT(r,t,e,n){if(r){var i=Ts(r);i.prevValue=i.value,i.value=e;var a=t.normal;i.valueAnimation=a.get("valueAnimation"),i.valueAnimation&&(i.precision=a.get("precision"),i.defaultInterpolatedText=n,i.statesModels=t)}}var GT=["textStyle","color"],Ef=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Lf=new Ut,$T=(function(){function r(){}return r.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(GT):null)},r.prototype.getFont=function(){return HT({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<Ef.length;n++)e[Ef[n]]=this.getShallow(Ef[n]);return Lf.useStyle(e),Lf.update(),Lf.getBoundingRect()},r})(),pg=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],UT=la(pg),YT=(function(){function r(){}return r.prototype.getLineStyle=function(t){return UT(this,t)},r})(),gg=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],ZT=la(gg),XT=(function(){function r(){}return r.prototype.getItemStyle=function(t,e){return ZT(this,t,e)},r})(),It=(function(){function r(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}return r.prototype.init=function(t,e,n){},r.prototype.mergeOption=function(t,e){ct(this.option,t,!0)},r.prototype.get=function(t,e){return t==null?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},r.prototype.getShallow=function(t,e){var n=this.option,i=n==null?n:n[t];if(i==null&&!e){var a=this.parentModel;a&&(i=a.getShallow(t))}return i},r.prototype.getModel=function(t,e){var n=t!=null,i=n?this.parsePath(t):null,a=n?this._doGet(i):this.option;return e=e||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new r(a,e,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var t=this.constructor;return new t(ut(this.option))},r.prototype.parsePath=function(t){return typeof t=="string"?t.split("."):t},r.prototype.resolveParentPath=function(t){return t},r.prototype.isAnimationEnabled=function(){if(!j.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(t,e){var n=this.option;if(!t)return n;for(var i=0;i<t.length&&!(t[i]&&(n=n&&typeof n=="object"?n[t[i]]:null,n==null));i++);return n==null&&e&&(n=e._doGet(this.resolveParentPath(t),e.parentModel)),n},r})();Yu(It),Nx(It),Fe(It,YT),Fe(It,XT),Fe(It,Hx),Fe(It,$T);var qT=Math.round(Math.random()*10);function Ds(r){return[r||"",qT++].join("_")}function KT(r){var t={};r.registerSubTypeDefaulter=function(e,n){var i=je(e);t[i.main]=n},r.determineSubType=function(e,n){var i=n.type;if(!i){var a=je(e).main;r.hasSubTypes(e)&&t[a]&&(i=t[a](n))}return i}}function jT(r,t){r.topologicalTravel=function(a,o,s,l){if(!a.length)return;var u=e(o),f=u.graph,h=u.noEntryList,c={};for(D(a,function(y){c[y]=!0});h.length;){var v=h.pop(),d=f[v],p=!!c[v];p&&(s.call(l,v,d.originalDeps.slice()),delete c[v]),D(d.successor,p?m:g)}D(c,function(){var y="";throw process.env.NODE_ENV!=="production"&&(y=Go("Circular dependency may exists: ",c,a,o)),new Error(y)});function g(y){f[y].entryCount--,f[y].entryCount===0&&h.push(y)}function m(y){c[y]=!0,g(y)}};function e(a){var o={},s=[];return D(a,function(l){var u=n(o,l),f=u.originalDeps=t(l),h=i(f,a);u.entryCount=h.length,u.entryCount===0&&s.push(l),D(h,function(c){mt(u.predecessor,c)<0&&u.predecessor.push(c);var v=n(o,c);mt(v.successor,c)<0&&v.successor.push(l)})}),{graph:o,noEntryList:s}}function n(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function i(a,o){var s=[];return D(a,function(l){mt(o,l)>=0&&s.push(l)}),s}}function Ms(r,t){return ct(ct({},r,!0),t,!0)}const QT={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},JT={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var As="ZH",Pf="EN",vi=Pf,Is={},kf={},mg=j.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||vi).toUpperCase();return r.indexOf(As)>-1?As:vi})():vi;function yg(r,t){r=r.toUpperCase(),kf[r]=new It(t),Is[r]=t}function tD(r){if(G(r)){var t=Is[r.toUpperCase()]||{};return r===As||r===Pf?ut(t):ct(ut(t),ut(Is[vi]),!1)}else return ct(ut(r),ut(Is[vi]),!1)}function eD(r){return kf[r]}function rD(){return kf[vi]}yg(Pf,QT),yg(As,JT);var Rf=1e3,Of=Rf*60,Sa=Of*60,Ie=Sa*24,_g=Ie*365,xa={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Es="{yyyy}-{MM}-{dd}",wg={year:"{yyyy}",month:"{yyyy}-{MM}",day:Es,hour:Es+" "+xa.hour,minute:Es+" "+xa.minute,second:Es+" "+xa.second,millisecond:xa.none},Nf=["year","month","day","hour","minute","second","millisecond"],bg=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Pr(r,t){return r+="","0000".substr(0,t-r.length)+r}function di(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function nD(r){return r===di(r)}function iD(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Ls(r,t,e,n){var i=hr(r),a=i[Bf(e)](),o=i[pi(e)]()+1,s=Math.floor((o-1)/3)+1,l=i[Ps(e)](),u=i["get"+(e?"UTC":"")+"Day"](),f=i[Ca(e)](),h=(f-1)%12+1,c=i[ks(e)](),v=i[Rs(e)](),d=i[Os(e)](),p=f>=12?"pm":"am",g=p.toUpperCase(),m=n instanceof It?n:eD(n||mg)||rD(),y=m.getModel("time"),_=y.get("month"),w=y.get("monthAbbr"),b=y.get("dayOfWeek"),S=y.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,p+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Pr(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,w[o-1]).replace(/{MM}/g,Pr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Pr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Pr(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,Pr(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,Pr(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,Pr(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,Pr(d,3)).replace(/{S}/g,d+"")}function aD(r,t,e,n,i){var a=null;if(G(e))a=e;else if(Q(e))a=e(r.value,t,{level:r.level});else{var o=B({},xa);if(r.level>0)for(var s=0;s<Nf.length;++s)o[Nf[s]]="{primary|"+o[Nf[s]]+"}";var l=e?e.inherit===!1?e:gt(e,o):o,u=Sg(r.value,i);if(l[u])a=l[u];else if(l.inherit){for(var f=bg.indexOf(u),s=f-1;s>=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(W(a)){var h=r.level==null?0:r.level>=0?r.level:a.length+r.level;h=Math.min(h,a.length-1),a=a[h]}}return Ls(new Date(r.value),a,i,n)}function Sg(r,t){var e=hr(r),n=e[pi(t)]()+1,i=e[Ps(t)](),a=e[Ca(t)](),o=e[ks(t)](),s=e[Rs(t)](),l=e[Os(t)](),u=l===0,f=u&&s===0,h=f&&o===0,c=h&&a===0,v=c&&i===1,d=v&&n===1;return d?"year":v?"month":c?"day":h?"hour":f?"minute":u?"second":"millisecond"}function xg(r,t,e){var n=xt(r)?hr(r):r;switch(t=t||Sg(r,e),t){case"year":return n[Bf(e)]();case"half-year":return n[pi(e)]()>=6?1:0;case"quarter":return Math.floor((n[pi(e)]()+1)/4);case"month":return n[pi(e)]();case"day":return n[Ps(e)]();case"half-day":return n[Ca(e)]()/24;case"hour":return n[Ca(e)]();case"minute":return n[ks(e)]();case"second":return n[Rs(e)]();case"millisecond":return n[Os(e)]()}}function Bf(r){return r?"getUTCFullYear":"getFullYear"}function pi(r){return r?"getUTCMonth":"getMonth"}function Ps(r){return r?"getUTCDate":"getDate"}function Ca(r){return r?"getUTCHours":"getHours"}function ks(r){return r?"getUTCMinutes":"getMinutes"}function Rs(r){return r?"getUTCSeconds":"getSeconds"}function Os(r){return r?"getUTCMilliseconds":"getMilliseconds"}function oD(r){return r?"setUTCFullYear":"setFullYear"}function Cg(r){return r?"setUTCMonth":"setMonth"}function Tg(r){return r?"setUTCDate":"setDate"}function Dg(r){return r?"setUTCHours":"setHours"}function Mg(r){return r?"setUTCMinutes":"setMinutes"}function Ag(r){return r?"setUTCSeconds":"setSeconds"}function Ig(r){return r?"setUTCMilliseconds":"setMilliseconds"}function Eg(r){if(!Od(r))return G(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Lg(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,n){return n.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Ns=kv;function Ff(r,t,e){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(f){return f&&Xe(f)?f:"-"}function a(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?hr(r):r;if(isNaN(+l)){if(s)return"-"}else return Ls(l,n,e)}if(t==="ordinal")return ho(r)?i(r):xt(r)&&a(r)?r+"":"-";var u=Ho(r);return a(u)?Eg(u):ho(r)?i(r):typeof r=="boolean"?r+"":"-"}var Pg=["a","b","c","d","e","f","g"],zf=function(r,t){return"{"+r+(t??"")+"}"};function kg(r,t,e){W(t)||(t=[t]);var n=t.length;if(!n)return"";for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=Pg[a];r=r.replace(zf(o),zf(o,0))}for(var s=0;s<n;s++)for(var l=0;l<i.length;l++){var u=t[s][i[l]];r=r.replace(zf(Pg[l],s),e?se(u):u)}return r}function sD(r,t){var e=G(r)?{color:r,extraCssText:t}:r||{},n=e.color,i=e.type;t=e.extraCssText;var a=e.renderMode||"html";if(!n)return"";if(a==="html")return i==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+se(n)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+se(n)+";"+(t||"")+'"></span>';var o=e.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function xn(r,t){return t=t||"transparent",G(r)?r:q(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function Rg(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var Bs=D,lD=["left","right","top","bottom","width","height"],Fs=[["width","left","right"],["height","top","bottom"]];function Vf(r,t,e,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;t.eachChild(function(l,u){var f=l.getBoundingRect(),h=t.childAt(u+1),c=h&&h.getBoundingRect(),v,d;if(r==="horizontal"){var p=f.width+(c?-c.x+f.x:0);v=a+p,v>n||l.newline?(a=0,v=p,o+=s+e,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(c?-c.y+f.y:0);d=o+g,d>i||l.newline?(a+=s+e,o=0,d=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=v+e:o=d+e)})}var Ta=Vf;At(Vf,"vertical"),At(Vf,"horizontal");function gi(r,t,e){e=Ns(e||0);var n=t.width,i=t.height,a=Rt(r.left,n),o=Rt(r.top,i),s=Rt(r.right,n),l=Rt(r.bottom,i),u=Rt(r.width,n),f=Rt(r.height,i),h=e[2]+e[0],c=e[1]+e[3],v=r.aspect;switch(isNaN(u)&&(u=n-s-c-a),isNaN(f)&&(f=i-l-h-o),v!=null&&(isNaN(u)&&isNaN(f)&&(v>n/i?u=n*.8:f=i*.8),isNaN(u)&&(u=v*f),isNaN(f)&&(f=u/v)),isNaN(a)&&(a=n-s-u-c),isNaN(o)&&(o=i-l-f-h),r.left||r.right){case"center":a=n/2-u/2-e[3];break;case"right":a=n-u-c;break}switch(r.top||r.bottom){case"middle":case"center":o=i/2-f/2-e[0];break;case"bottom":o=i-f-h;break}a=a||0,o=o||0,isNaN(u)&&(u=n-c-a-(s||0)),isNaN(f)&&(f=i-h-o-(l||0));var d=new pt(a+e[3],o+e[0],u,f);return d.margin=e,d}function Da(r){var t=r.layoutMode||r.constructor.layoutMode;return q(t)?t:t?{type:t}:null}function mi(r,t,e){var n=e&&e.ignoreSize;!W(n)&&(n=[n,n]);var i=o(Fs[0],0),a=o(Fs[1],1);u(Fs[0],r,i),u(Fs[1],r,a);function o(f,h){var c={},v=0,d={},p=0,g=2;if(Bs(f,function(_){d[_]=r[_]}),Bs(f,function(_){s(t,_)&&(c[_]=d[_]=t[_]),l(c,_)&&v++,l(d,_)&&p++}),n[h])return l(t,f[1])?d[f[2]]=null:l(t,f[2])&&(d[f[1]]=null),d;if(p===g||!v)return d;if(v>=g)return c;for(var m=0;m<f.length;m++){var y=f[m];if(!s(c,y)&&s(r,y)){c[y]=r[y];break}}return c}function s(f,h){return f.hasOwnProperty(h)}function l(f,h){return f[h]!=null&&f[h]!=="auto"}function u(f,h,c){Bs(f,function(v){h[v]=c[v]})}}function Ma(r){return uD({},r)}function uD(r,t){return t&&r&&Bs(lD,function(e){t.hasOwnProperty(e)&&(r[e]=t[e])}),r}var fD=Nt(),dt=(function(r){N(t,r);function t(e,n,i){var a=r.call(this,e,n,i)||this;return a.uid=Ds("ec_cpt_model"),a}return t.prototype.init=function(e,n,i){this.mergeDefaultAndTheme(e,i)},t.prototype.mergeDefaultAndTheme=function(e,n){var i=Da(this),a=i?Ma(e):{},o=n.getTheme();ct(e,o.get(this.mainType)),ct(e,this.getDefaultOption()),i&&mi(e,a,i)},t.prototype.mergeOption=function(e,n){ct(this.option,e,!0);var i=Da(this);i&&mi(this.option,e,i)},t.prototype.optionUpdated=function(e,n){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!kx(e))return e.defaultOption;var n=fD(this);if(!n.defaultOption){for(var i=[],a=e;a;){var o=a.prototype.defaultOption;o&&i.push(o),a=a.superClass}for(var s={},l=i.length-1;l>=0;l--)s=ct(s,i[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(e,n){var i=e+"Index",a=e+"Id";return sa(this.ecModel,e,{index:this.get(i,!0),id:this.get(a,!0)},n)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=(function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0})(),t})(It);qd(dt,It),$o(dt),KT(dt),jT(dt,hD);function hD(r){var t=[];return D(dt.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=X(t,function(e){return je(e).main}),r!=="dataset"&&mt(t,"dataset")<=0&&t.unshift("dataset"),t}var Og="";typeof navigator<"u"&&(Og=navigator.platform||"");var yi="rgba(0, 0, 0, 0.2)";const cD={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:yi,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:yi,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:yi,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:yi,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:yi,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:yi,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Og.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var Hf=tt(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Ee="original",ve="arrayRows",ir="objectRows",pr="keyedColumns",gr="typedArray",Ng="unknown",mr="column",_i="row",ye={Must:1,Might:2,Not:3},Bg=Nt();function vD(r){Bg(r).datasetMap=tt()}function Fg(r,t,e){var n={},i=zg(t);if(!i||!r)return n;var a=[],o=[],s=t.ecModel,l=Bg(s).datasetMap,u=i.uid+"_"+e.seriesLayoutBy,f,h;r=r.slice(),D(r,function(p,g){var m=q(p)?p:r[g]={name:p};m.type==="ordinal"&&f==null&&(f=g,h=d(m)),n[m.name]=[]});var c=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});D(r,function(p,g){var m=p.name,y=d(p);if(f==null){var _=c.valueWayDim;v(n[m],_,y),v(o,_,y),c.valueWayDim+=y}else if(f===g)v(n[m],0,y),v(a,0,y);else{var _=c.categoryWayDim;v(n[m],_,y),v(o,_,y),c.categoryWayDim+=y}});function v(p,g,m){for(var y=0;y<m;y++)p.push(g+y)}function d(p){var g=p.dimsDef;return g?g.length:1}return a.length&&(n.itemName=a),o.length&&(n.seriesName=o),n}function zg(r){var t=r.get("data",!0);if(!t)return sa(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},fe).models[0]}function dD(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:sa(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},fe).models}function Vg(r,t){return pD(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,t)}function pD(r,t,e,n,i,a){var o,s=5;if(te(r))return ye.Not;var l,u;if(n){var f=n[a];q(f)?(l=f.name,u=f.type):G(f)&&(l=f)}if(u!=null)return u==="ordinal"?ye.Must:ye.Not;if(t===ve){var h=r;if(e===_i){for(var c=h[a],v=0;v<(c||[]).length&&v<s;v++)if((o=w(c[i+v]))!=null)return o}else for(var v=0;v<h.length&&v<s;v++){var d=h[i+v];if(d&&(o=w(d[a]))!=null)return o}}else if(t===ir){var p=r;if(!l)return ye.Not;for(var v=0;v<p.length&&v<s;v++){var g=p[v];if(g&&(o=w(g[l]))!=null)return o}}else if(t===pr){var m=r;if(!l)return ye.Not;var c=m[l];if(!c||te(c))return ye.Not;for(var v=0;v<c.length&&v<s;v++)if((o=w(c[v]))!=null)return o}else if(t===Ee)for(var y=r,v=0;v<y.length&&v<s;v++){var g=y[v],_=aa(g);if(!W(_))return ye.Not;if((o=w(_[a]))!=null)return o}function w(b){var S=G(b);if(b!=null&&Number.isFinite(Number(b))&&b!=="")return S?ye.Might:ye.Not;if(S&&b!=="-")return ye.Must}return ye.Not}var gD=tt();function mD(r,t,e){var n=gD.get(t);if(!n)return e;var i=n(r);if(!i)return e;if(process.env.NODE_ENV!=="production")for(var a=0;a<i.length;a++)it(ai(i[a]));return e.concat(i)}var Hg=Nt();Nt();var Wf=(function(){function r(){}return r.prototype.getColorFromPalette=function(t,e,n){var i=re(this.get("color",!0)),a=this.get("colorLayer",!0);return _D(this,Hg,i,a,t,e,n)},r.prototype.clearColorPalette=function(){wD(this,Hg)},r})();function yD(r,t){for(var e=r.length,n=0;n<e;n++)if(r[n].length>t)return r[n];return r[e-1]}function _D(r,t,e,n,i,a,o){a=a||r;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var f=o==null||!n?e:yD(n,o);if(f=f||e,!(!f||!f.length)){var h=f[l];return i&&(u[i]=h),s.paletteIdx=(l+1)%f.length,h}}function wD(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var zs,Aa,Wg,Gf="\0_ec_inner",Gg=1,bD={grid:"GridComponent",polar:"PolarComponent",geo:"GeoComponent",singleAxis:"SingleAxisComponent",parallel:"ParallelComponent",calendar:"CalendarComponent",graphic:"GraphicComponent",toolbox:"ToolboxComponent",tooltip:"TooltipComponent",axisPointer:"AxisPointerComponent",brush:"BrushComponent",title:"TitleComponent",timeline:"TimelineComponent",markPoint:"MarkPointComponent",markLine:"MarkLineComponent",markArea:"MarkAreaComponent",legend:"LegendComponent",dataZoom:"DataZoomComponent",visualMap:"VisualMapComponent",xAxis:"GridComponent",yAxis:"GridComponent",angleAxis:"PolarComponent",radiusAxis:"PolarComponent"},SD={line:"LineChart",bar:"BarChart",pie:"PieChart",scatter:"ScatterChart",radar:"RadarChart",map:"MapChart",tree:"TreeChart",treemap:"TreemapChart",graph:"GraphChart",gauge:"GaugeChart",funnel:"FunnelChart",parallel:"ParallelChart",sankey:"SankeyChart",boxplot:"BoxplotChart",candlestick:"CandlestickChart",effectScatter:"EffectScatterChart",lines:"LinesChart",heatmap:"HeatmapChart",pictorialBar:"PictorialBarChart",themeRiver:"ThemeRiverChart",sunburst:"SunburstChart",custom:"CustomChart"},Vs={};function xD(r){D(r,function(t,e){if(!dt.hasClass(e)){var n=bD[e];n&&!Vs[n]&&(qt("Component "+e+` is used but not imported.
30
+ import { `+n+` } from 'echarts/components';
31
+ echarts.use([`+n+"]);"),Vs[n]=!0)}})}var $f=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,n,i,a,o,s){a=a||{},this.option=null,this._theme=new It(a),this._locale=new It(o),this._optionManager=s},t.prototype.setOption=function(e,n,i){process.env.NODE_ENV!=="production"&&(it(e!=null,"option is null/undefined"),it(e[Gf]!==Gg,"please use chart.getOption()"));var a=Yg(n);this._optionManager.setOption(e,i,a),this._resetOption(null,a)},t.prototype.resetOption=function(e,n){return this._resetOption(e,Yg(n))},t.prototype._resetOption=function(e,n){var i=!1,a=this._optionManager;if(!e||e==="recreate"){var o=a.mountOption(e==="recreate");process.env.NODE_ENV!=="production"&&xD(o),!this.option||e==="recreate"?Wg(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!e||e==="recreate"||e==="media"){var l=a.getMediaOption(this);l.length&&D(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=tt(),u=n&&n.replaceMergeMainTypeMap;vD(this),D(e,function(h,c){h!=null&&(dt.hasClass(c)?c&&(s.push(c),l.set(c,!0)):i[c]=i[c]==null?ut(h):ct(i[c],h,!0))}),u&&u.each(function(h,c){dt.hasClass(c)&&!l.get(c)&&(s.push(c),l.set(c,!0))}),dt.topologicalTravel(s,dt.getAllClassMainTypes(),f,this);function f(h){var c=mD(this,h,re(e[h])),v=a.get(h),d=v?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",p=gx(v,c,d);Cx(p,h,dt),i[h]=null,a.set(h,null),o.set(h,0);var g=[],m=[],y=0,_,w;D(p,function(b,S){var x=b.existing,T=b.newOption;if(!T)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var M=h==="series",A=dt.getClass(h,b.keyInfo.subType,!M);if(!A){if(process.env.NODE_ENV!=="production"){var C=b.keyInfo.subType,I=SD[C];Vs[C]||(Vs[C]=!0,qt(I?"Series "+C+` is used but not imported.
32
+ import { `+I+` } from 'echarts/charts';
33
+ echarts.use([`+I+"]);":"Unknown series "+C))}return}if(h==="tooltip"){if(_){process.env.NODE_ENV!=="production"&&(w||(Xt("Currently only one tooltip component is allowed."),w=!0));return}_=!0}if(x&&x.constructor===A)x.name=b.keyInfo.name,x.mergeOption(T,this),x.optionUpdated(T,!1);else{var E=B({componentIndex:S},b.keyInfo);x=new A(T,this,this,E),B(x,E),b.brandNew&&(x.__requireNewView=!0),x.init(T,this,this),x.optionUpdated(null,!0)}}x?(g.push(x.option),m.push(x),y++):(g.push(void 0),m.push(void 0))},this),i[h]=g,a.set(h,m),o.set(h,y),h==="series"&&zs(this)}this._seriesIndices||zs(this)},t.prototype.getOption=function(){var e=ut(this.option);return D(e,function(n,i){if(dt.hasClass(i)){for(var a=re(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!ai(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,e[i]=a}}),delete e[Gf],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,n){var i=this._componentsMap.get(e);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o<i.length;o++)if(i[o])return i[o]}}},t.prototype.queryComponents=function(e){var n=e.mainType;if(!n)return[];var i=e.index,a=e.id,o=e.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return i!=null?(l=[],D(re(i),function(u){s[u]&&l.push(s[u])})):a!=null?l=$g("id",a,s):o!=null?l=$g("name",o,s):l=Gt(s,function(u){return!!u}),Ug(l,e)},t.prototype.findComponents=function(e){var n=e.query,i=e.mainType,a=s(n),o=a?this.queryComponents(a):Gt(this._componentsMap.get(i),function(u){return!!u});return l(Ug(o,e));function s(u){var f=i+"Index",h=i+"Id",c=i+"Name";return u&&(u[f]!=null||u[h]!=null||u[c]!=null)?{mainType:i,index:u[f],id:u[h],name:u[c]}:null}function l(u){return e.filter?Gt(u,e.filter):u}},t.prototype.eachComponent=function(e,n,i){var a=this._componentsMap;if(Q(e)){var o=n,s=e;a.each(function(h,c){for(var v=0;h&&v<h.length;v++){var d=h[v];d&&s.call(o,c,d,d.componentIndex)}})}else for(var l=G(e)?a.get(e):q(e)?this.findComponents(e):null,u=0;l&&u<l.length;u++){var f=l[u];f&&n.call(i,f,f.componentIndex)}},t.prototype.getSeriesByName=function(e){var n=Ke(e,null);return Gt(this._componentsMap.get("series"),function(i){return!!i&&n!=null&&i.name===n})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return Gt(this._componentsMap.get("series"),function(n){return!!n&&n.subType===e})},t.prototype.getSeries=function(){return Gt(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,n){Aa(this),D(this._seriesIndices,function(i){var a=this._componentsMap.get("series")[i];e.call(n,a,i)},this)},t.prototype.eachRawSeries=function(e,n){D(this._componentsMap.get("series"),function(i){i&&e.call(n,i,i.componentIndex)})},t.prototype.eachSeriesByType=function(e,n,i){Aa(this),D(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===e&&n.call(i,o,a)},this)},t.prototype.eachRawSeriesByType=function(e,n,i){return D(this.getSeriesByType(e),n,i)},t.prototype.isSeriesFiltered=function(e){return Aa(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,n){Aa(this);var i=[];D(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];e.call(n,o,a)&&i.push(a)},this),this._seriesIndices=i,this._seriesIndicesMap=tt(i)},t.prototype.restoreData=function(e){zs(this);var n=this._componentsMap,i=[];n.each(function(a,o){dt.hasClass(o)&&i.push(o)}),dt.topologicalTravel(i,dt.getAllClassMainTypes(),function(a){D(n.get(a),function(o){o&&(a!=="series"||!CD(o,e))&&o.restoreData()})})},t.internalField=(function(){zs=function(e){var n=e._seriesIndices=[];D(e._componentsMap.get("series"),function(i){i&&n.push(i.componentIndex)}),e._seriesIndicesMap=tt(n)},Aa=function(e){if(process.env.NODE_ENV!=="production"&&!e._seriesIndices)throw new Error("Option should contains series.")},Wg=function(e,n){e.option={},e.option[Gf]=Gg,e._componentsMap=tt({series:[]}),e._componentsCount=tt();var i=n.aria;q(i)&&i.enabled==null&&(i.enabled=!0),TD(n,e._theme.option),ct(n,cD,!1),e._mergeOption(n,null)}})(),t})(It);function CD(r,t){if(t){var e=t.seriesIndex,n=t.seriesId,i=t.seriesName;return e!=null&&r.componentIndex!==e||n!=null&&r.id!==n||i!=null&&r.name!==i}}function TD(r,t){var e=r.color&&!r.colorLayer;D(t,function(n,i){i==="colorLayer"&&e||dt.hasClass(i)||(typeof n=="object"?r[i]=r[i]?ct(r[i],n,!1):ut(n):r[i]==null&&(r[i]=n))})}function $g(r,t,e){if(W(t)){var n=tt();return D(t,function(a){if(a!=null){var o=Ke(a,null);o!=null&&n.set(a,!0)}}),Gt(e,function(a){return a&&n.get(a[r])})}else{var i=Ke(t,null);return Gt(e,function(a){return a&&i!=null&&a[r]===i})}}function Ug(r,t){return t.hasOwnProperty("subType")?Gt(r,function(e){return e&&e.subType===t.subType}):r}function Yg(r){var t=tt();return r&&D(re(r.replaceMerge),function(e){process.env.NODE_ENV!=="production"&&it(dt.hasClass(e),'"'+e+'" is not valid component main type in "replaceMerge"'),t.set(e,!0)}),{replaceMergeMainTypeMap:t}}Fe($f,Wf);var DD=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],Zg=(function(){function r(t){D(DD,function(e){this[e]=J(t[e],t)},this)}return r})(),Uf={},Yf=(function(){function r(){this._coordinateSystems=[]}return r.prototype.create=function(t,e){var n=[];D(Uf,function(i,a){var o=i.create(t,e);n=n.concat(o||[])}),this._coordinateSystems=n},r.prototype.update=function(t,e){D(this._coordinateSystems,function(n){n.update&&n.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},r.register=function(t,e){Uf[t]=e},r.get=function(t){return Uf[t]},r})(),MD=/^(min|max)?(.+)$/,AD=(function(){function r(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return r.prototype.setOption=function(t,e,n){t&&(D(re(t.series),function(o){o&&o.data&&te(o.data)&&jl(o.data)}),D(re(t.dataset),function(o){o&&o.source&&te(o.source)&&jl(o.source)})),t=ut(t);var i=this._optionBackup,a=ID(t,e,!i);this._newBaseOption=a.baseOption,i?(a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.mediaDefault=a.mediaDefault)):this._optionBackup=a},r.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],ut(t?e.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=ut(n[i.getCurrentIndex()]))}return e},r.prototype.getMediaOption=function(t){var e=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!i.length&&!a)return s;for(var l=0,u=i.length;l<u;l++)ED(i[l].query,e,n)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!PD(o,this._currentMediaIndices)&&(s=X(o,function(f){return ut(f===-1?a.option:i[f].option)})),this._currentMediaIndices=o,s},r})();function ID(r,t,e){var n=[],i,a,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,f=!!r.media,h=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((h||f)&&(r.options=r.media=null),a=r),f&&(W(u)?D(u,function(v){process.env.NODE_ENV!=="production"&&v&&!v.option&&q(v.query)&&q(v.query.option)&&qt("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"),v&&v.option&&(v.query?n.push(v):i||(i=v))}):process.env.NODE_ENV!=="production"&&qt("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")),c(a),D(l,function(v){return c(v)}),D(n,function(v){return c(v.option)});function c(v){D(t,function(d){d(v,e)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:i,mediaList:n}}function ED(r,t,e){var n={width:t,height:e,aspectratio:t/e},i=!0;return D(r,function(a,o){var s=o.match(MD);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();LD(n[u],a,l)||(i=!1)}}),i}function LD(r,t,e){return e==="min"?r>=t:e==="max"?r<=t:r===t}function PD(r,t){return r.join(",")===t.join(",")}var Le=D,Ia=q,Xg=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Zf(r){var t=r&&r.itemStyle;if(t)for(var e=0,n=Xg.length;e<n;e++){var i=Xg[e],a=t.normal,o=t.emphasis;a&&a[i]&&(process.env.NODE_ENV!=="production"&&zt("itemStyle.normal."+i,i),r[i]=r[i]||{},r[i].normal?ct(r[i].normal,a[i]):r[i].normal=a[i],a[i]=null),o&&o[i]&&(process.env.NODE_ENV!=="production"&&zt("itemStyle.emphasis."+i,"emphasis."+i),r[i]=r[i]||{},r[i].emphasis?ct(r[i].emphasis,o[i]):r[i].emphasis=o[i],o[i]=null)}}function jt(r,t,e){if(r&&r[t]&&(r[t].normal||r[t].emphasis)){var n=r[t].normal,i=r[t].emphasis;n&&(process.env.NODE_ENV!=="production"&&He("'normal' hierarchy in "+t+" has been removed since 4.0. All style properties are configured in "+t+" directly now."),e?(r[t].normal=r[t].emphasis=null,gt(r[t],n)):r[t]=n),i&&(process.env.NODE_ENV!=="production"&&He(t+".emphasis has been changed to emphasis."+t+" since 4.0"),r.emphasis=r.emphasis||{},r.emphasis[t]=i,i.focus&&(r.emphasis.focus=i.focus),i.blurScope&&(r.emphasis.blurScope=i.blurScope))}}function Ea(r){jt(r,"itemStyle"),jt(r,"lineStyle"),jt(r,"areaStyle"),jt(r,"label"),jt(r,"labelLine"),jt(r,"upperLabel"),jt(r,"edgeLabel")}function Lt(r,t){var e=Ia(r)&&r[t],n=Ia(e)&&e.textStyle;if(n){process.env.NODE_ENV!=="production"&&He("textStyle hierarchy in "+t+" has been removed since 4.0. All textStyle properties are configured in "+t+" directly now.");for(var i=0,a=Gd.length;i<a;i++){var o=Gd[i];n.hasOwnProperty(o)&&(e[o]=n[o])}}}function Pe(r){r&&(Ea(r),Lt(r,"label"),r.emphasis&&Lt(r.emphasis,"label"))}function kD(r){if(Ia(r)){Zf(r),Ea(r),Lt(r,"label"),Lt(r,"upperLabel"),Lt(r,"edgeLabel"),r.emphasis&&(Lt(r.emphasis,"label"),Lt(r.emphasis,"upperLabel"),Lt(r.emphasis,"edgeLabel"));var t=r.markPoint;t&&(Zf(t),Pe(t));var e=r.markLine;e&&(Zf(e),Pe(e));var n=r.markArea;n&&Pe(n);var i=r.data;if(r.type==="graph"){i=i||r.nodes;var a=r.links||r.edges;if(a&&!te(a))for(var o=0;o<a.length;o++)Pe(a[o]);D(r.categories,function(u){Ea(u)})}if(i&&!te(i))for(var o=0;o<i.length;o++)Pe(i[o]);if(t=r.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)Pe(s[o]);if(e=r.markLine,e&&e.data)for(var l=e.data,o=0;o<l.length;o++)W(l[o])?(Pe(l[o][0]),Pe(l[o][1])):Pe(l[o]);r.type==="gauge"?(Lt(r,"axisLabel"),Lt(r,"title"),Lt(r,"detail")):r.type==="treemap"?(jt(r.breadcrumb,"itemStyle"),D(r.levels,function(u){Ea(u)})):r.type==="tree"&&Ea(r.leaves)}}function yr(r){return W(r)?r:r?[r]:[]}function qg(r){return(W(r)?r[0]:r)||{}}function RD(r,t){Le(yr(r.series),function(n){Ia(n)&&kD(n)});var e=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&e.push("valueAxis","categoryAxis","logAxis","timeAxis"),Le(e,function(n){Le(yr(r[n]),function(i){i&&(Lt(i,"axisLabel"),Lt(i.axisPointer,"label"))})}),Le(yr(r.parallel),function(n){var i=n&&n.parallelAxisDefault;Lt(i,"axisLabel"),Lt(i&&i.axisPointer,"label")}),Le(yr(r.calendar),function(n){jt(n,"itemStyle"),Lt(n,"dayLabel"),Lt(n,"monthLabel"),Lt(n,"yearLabel")}),Le(yr(r.radar),function(n){Lt(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name,process.env.NODE_ENV!=="production"&&He("name property in radar component has been changed to axisName")),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap,process.env.NODE_ENV!=="production"&&He("nameGap property in radar component has been changed to axisNameGap")),process.env.NODE_ENV!=="production"&&Le(n.indicator,function(i){i.text&&zt("text","name","radar.indicator")})}),Le(yr(r.geo),function(n){Ia(n)&&(Pe(n),Le(yr(n.regions),function(i){Pe(i)}))}),Le(yr(r.timeline),function(n){Pe(n),jt(n,"label"),jt(n,"itemStyle"),jt(n,"controlStyle",!0);var i=n.data;W(i)&&D(i,function(a){q(a)&&(jt(a,"label"),jt(a,"itemStyle"))})}),Le(yr(r.toolbox),function(n){jt(n,"iconStyle"),Le(n.feature,function(i){jt(i,"iconStyle")})}),Lt(qg(r.axisPointer),"label"),Lt(qg(r.tooltip).axisPointer,"label")}function OD(r,t){for(var e=t.split(","),n=r,i=0;i<e.length&&(n=n&&n[e[i]],n!=null);i++);return n}function ND(r,t,e,n){for(var i=t.split(","),a=r,o,s=0;s<i.length-1;s++)o=i[s],a[o]==null&&(a[o]={}),a=a[o];a[i[s]]==null&&(a[i[s]]=e)}function Kg(r){r&&D(BD,function(t){t[0]in r&&!(t[1]in r)&&(r[t[1]]=r[t[0]])})}var BD=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],FD=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Xf=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function La(r){var t=r&&r.itemStyle;if(t)for(var e=0;e<Xf.length;e++){var n=Xf[e][1],i=Xf[e][0];t[n]!=null&&(t[i]=t[n],process.env.NODE_ENV!=="production"&&zt(n,i))}}function jg(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(process.env.NODE_ENV!=="production"&&zt("label.margin","label.edgeDistance","pie"),r.edgeDistance=r.margin)}function Qg(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay,process.env.NODE_ENV!=="production"&&zt("downplay","blur","sunburst"))}function zD(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(process.env.NODE_ENV!=="production"&&zt("focusNodeAdjacency","emphasis: { focus: 'adjacency'}","graph/sankey"),r.emphasis.focus="adjacency"))}function Jg(r,t){if(r)for(var e=0;e<r.length;e++)t(r[e]),r[e]&&Jg(r[e].children,t)}function tm(r,t){RD(r,t),r.series=re(r.series),D(r.series,function(e){if(q(e)){var n=e.type;if(n==="line")e.clipOverflow!=null&&(e.clip=e.clipOverflow,process.env.NODE_ENV!=="production"&&zt("clipOverflow","clip","line"));else if(n==="pie"||n==="gauge"){e.clockWise!=null&&(e.clockwise=e.clockWise,process.env.NODE_ENV!=="production"&&zt("clockWise","clockwise")),jg(e.label);var i=e.data;if(i&&!te(i))for(var a=0;a<i.length;a++)jg(i[a]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(process.env.NODE_ENV!=="production"&&zt("hoverOffset","emphasis.scaleSize"),e.emphasis.scaleSize=e.hoverOffset))}else if(n==="gauge"){var o=OD(e,"pointer.color");o!=null&&ND(e,"itemStyle.color",o)}else if(n==="bar"){La(e),La(e.backgroundStyle),La(e.emphasis);var i=e.data;if(i&&!te(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(La(i[a]),La(i[a]&&i[a].emphasis))}else if(n==="sunburst"){var s=e.highlightPolicy;s&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=s,process.env.NODE_ENV!=="production"&&zt("highlightPolicy","emphasis.focus","sunburst"))),Qg(e),Jg(e.data,Qg)}else n==="graph"||n==="sankey"?zD(e):n==="map"&&(e.mapType&&!e.map&&(process.env.NODE_ENV!=="production"&&zt("mapType","map","map"),e.map=e.mapType),e.mapLocation&&(process.env.NODE_ENV!=="production"&&He("`mapLocation` is not used anymore."),gt(e,e.mapLocation)));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(process.env.NODE_ENV!=="production"&&zt("hoverAnimation","emphasis.scale"),e.emphasis.scale=e.hoverAnimation)),Kg(e)}}),r.dataRange&&(r.visualMap=r.dataRange),D(FD,function(e){var n=r[e];n&&(W(n)||(n=[n]),D(n,function(i){Kg(i)}))})}function VD(r){var t=tt();r.eachSeries(function(e){var n=e.get("stack");if(n){var i=t.get(n)||t.set(n,[]),a=e.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:e};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.length&&a.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),t.each(HD)}function HD(r){D(r,function(t,e){var n=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,f,h){var c=o.get(t.stackedDimension,h);if(isNaN(c))return i;var v,d;s?d=o.getRawIndex(h):v=o.get(t.stackedByDimension,h);for(var p=NaN,g=e-1;g>=0;g--){var m=r[g];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,v)),d>=0){var y=m.data.getByRawIndex(m.stackResultDimension,d);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&c>=0&&y>0||l==="samesign"&&c<=0&&y<0){c=lx(c,y),p=y;break}}}return n[0]=c,n[1]=p,n})})}var Hs=(function(){function r(t){this.data=t.data||(t.sourceFormat===pr?{}:[]),this.sourceFormat=t.sourceFormat||Ng,this.seriesLayoutBy=t.seriesLayoutBy||mr,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;n<e.length;n++){var i=e[n];i.type==null&&Vg(this,n)===ye.Must&&(i.type="ordinal")}}return r})();function qf(r){return r instanceof Hs}function Kf(r,t,e){e=e||rm(r);var n=t.seriesLayoutBy,i=GD(r,e,n,t.sourceHeader,t.dimensions),a=new Hs({data:r,sourceFormat:e,seriesLayoutBy:n,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:ut(t)});return a}function em(r){return new Hs({data:r,sourceFormat:te(r)?gr:Ee})}function WD(r){return new Hs({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:ut(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function rm(r){var t=Ng;if(te(r))t=gr;else if(W(r)){r.length===0&&(t=ve);for(var e=0,n=r.length;e<n;e++){var i=r[e];if(i!=null){if(W(i)||te(i)){t=ve;break}else if(q(i)){t=ir;break}}}}else if(q(r)){for(var a in r)if(Jr(r,a)&&oe(r[a])){t=pr;break}}return t}function GD(r,t,e,n,i){var a,o;if(!r)return{dimensionsDefine:nm(i),startIndex:o,dimensionsDetectedCount:a};if(t===ve){var s=r;n==="auto"||n==null?im(function(u){u!=null&&u!=="-"&&(G(u)?o==null&&(o=1):o=0)},e,s,10):o=xt(n)?n:n?1:0,!i&&o===1&&(i=[],im(function(u,f){i[f]=u!=null?u+"":""},e,s,1/0)),a=i?i.length:e===_i?s.length:s[0]?s[0].length:null}else if(t===ir)i||(i=$D(r));else if(t===pr)i||(i=[],D(r,function(u,f){i.push(f)}));else if(t===Ee){var l=aa(r[0]);a=W(l)&&l.length||1}else t===gr&&process.env.NODE_ENV!=="production"&&it(!!i,"dimensions must be given if data is TypedArray.");return{startIndex:o,dimensionsDefine:nm(i),dimensionsDetectedCount:a}}function $D(r){for(var t=0,e;t<r.length&&!(e=r[t++]););if(e)return Ct(e)}function nm(r){if(r){var t=tt();return X(r,function(e,n){e=q(e)?e:{name:e};var i={name:e.name,displayName:e.displayName,type:e.type};if(i.name==null)return i;i.name+="",i.displayName==null&&(i.displayName=i.name);var a=t.get(i.name);return a?i.name+="-"+a.count++:t.set(i.name,{count:1}),i})}}function im(r,t,e,n){if(t===_i)for(var i=0;i<e.length&&i<n;i++)r(e[i]?e[i][0]:null,i);else for(var a=e[0]||[],i=0;i<a.length&&i<n;i++)r(a[i],i)}function am(r){var t=r.sourceFormat;return t===ir||t===pr}var Cn,Tn,Dn,om,sm,lm=(function(){function r(t,e){var n=qf(t)?t:em(t);this._source=n;var i=this._data=n.data;if(n.sourceFormat===gr){if(process.env.NODE_ENV!=="production"&&e==null)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=e,this._data=i}sm(this,i,n)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(t,e){},r.prototype.appendData=function(t){},r.prototype.clean=function(){},r.protoInitialize=(function(){var t=r.prototype;t.pure=!1,t.persistent=!0})(),r.internalField=(function(){var t;sm=function(o,s,l){var u=l.sourceFormat,f=l.seriesLayoutBy,h=l.startIndex,c=l.dimensionsDefine,v=om[Qf(u,f)];if(process.env.NODE_ENV!=="production"&&it(v,"Invalide sourceFormat: "+u),B(o,v),u===gr)o.getItem=e,o.count=i,o.fillStorage=n;else{var d=fm(u,f);o.getItem=J(d,null,s,h,c);var p=cm(u,f);o.count=J(p,null,s,h,c)}};var e=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,f=u*o,h=0;h<u;h++)s[h]=l[f+h];return s},n=function(o,s,l,u){for(var f=this._data,h=this._dimSize,c=0;c<h;c++){for(var v=u[c],d=v[0]==null?1/0:v[0],p=v[1]==null?-1/0:v[1],g=s-o,m=l[c],y=0;y<g;y++){var _=f[y*h+c];m[o+y]=_,_<d&&(d=_),_>p&&(p=_)}v[0]=d,v[1]=p}},i=function(){return this._data?this._data.length/this._dimSize:0};om=(t={},t[ve+"_"+mr]={pure:!0,appendData:a},t[ve+"_"+_i]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[ir]={pure:!0,appendData:a},t[pr]={pure:!0,appendData:function(o){var s=this._data;D(o,function(l,u){for(var f=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)f.push(l[h])})}},t[Ee]={appendData:a},t[gr]={persistent:!1,pure:!0,appendData:function(o){process.env.NODE_ENV!=="production"&&it(te(o),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}})(),r})(),um=function(r,t,e,n){return r[n]},UD=(Cn={},Cn[ve+"_"+mr]=function(r,t,e,n){return r[n+t]},Cn[ve+"_"+_i]=function(r,t,e,n,i){n+=t;for(var a=i||[],o=r,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[n]:null}return a},Cn[ir]=um,Cn[pr]=function(r,t,e,n,i){for(var a=i||[],o=0;o<e.length;o++){var s=e[o].name;if(process.env.NODE_ENV!=="production"&&s==null)throw new Error;var l=r[s];a[o]=l?l[n]:null}return a},Cn[Ee]=um,Cn);function fm(r,t){var e=UD[Qf(r,t)];return process.env.NODE_ENV!=="production"&&it(e,'Do not support get item on "'+r+'", "'+t+'".'),e}var hm=function(r,t,e){return r.length},YD=(Tn={},Tn[ve+"_"+mr]=function(r,t,e){return Math.max(0,r.length-t)},Tn[ve+"_"+_i]=function(r,t,e){var n=r[0];return n?Math.max(0,n.length-t):0},Tn[ir]=hm,Tn[pr]=function(r,t,e){var n=e[0].name;if(process.env.NODE_ENV!=="production"&&n==null)throw new Error;var i=r[n];return i?i.length:0},Tn[Ee]=hm,Tn);function cm(r,t){var e=YD[Qf(r,t)];return process.env.NODE_ENV!=="production"&&it(e,'Do not support count on "'+r+'", "'+t+'".'),e}var jf=function(r,t,e){return r[t]},ZD=(Dn={},Dn[ve]=jf,Dn[ir]=function(r,t,e){return r[e]},Dn[pr]=jf,Dn[Ee]=function(r,t,e){var n=aa(r);return n instanceof Array?n[t]:n},Dn[gr]=jf,Dn);function vm(r){var t=ZD[r];return process.env.NODE_ENV!=="production"&&it(t,'Do not support get value on "'+r+'".'),t}function Qf(r,t){return r===ve?r+"_"+t:r}function wi(r,t,e){if(r){var n=r.getRawDataItem(t);if(n!=null){var i=r.getStore(),a=i.getSource().sourceFormat;if(e!=null){var o=r.getDimensionIndex(e),s=i.getDimensionProperty(o);return vm(a)(n,o,s)}else{var l=n;return a===Ee&&(l=aa(n)),l}}}}var XD=/\{@(.+?)\}/g,qD=(function(){function r(){}return r.prototype.getDataParams=function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),a=n.getRawIndex(t),o=n.getName(t),s=n.getRawDataItem(t),l=n.getItemVisual(t,"style"),u=l&&l[n.getItemVisual(t,"drawType")||"fill"],f=l&&l.stroke,h=this.mainType,c=h==="series",v=n.userOutput&&n.userOutput.get();return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:c?this.subType:null,seriesIndex:this.seriesIndex,seriesId:c?this.id:null,seriesName:c?this.name:null,name:o,dataIndex:a,data:s,dataType:e,value:i,color:u,borderColor:f,dimensionNames:v?v.fullDimensions:null,encode:v?v.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(t,e,n,i,a,o){e=e||"normal";var s=this.getData(n),l=this.getDataParams(t,n);if(o&&(l.value=o.interpolatedValue),i!=null&&W(l.value)&&(l.value=l.value[i]),!a){var u=s.getItemModel(t);a=u.get(e==="normal"?["label","formatter"]:[e,"label","formatter"])}if(Q(a))return l.status=e,l.dimensionIndex=i,a(l);if(G(a)){var f=kg(a,l);return f.replace(XD,function(h,c){var v=c.length,d=c;d.charAt(0)==="["&&d.charAt(v-1)==="]"&&(d=+d.slice(1,v-1),process.env.NODE_ENV!=="production"&&isNaN(d)&&qt("Invalide label formatter: @"+c+", only support @[0], @[1], @[2], ..."));var p=wi(s,t,d);if(o&&W(o.interpolatedValue)){var g=s.getDimensionIndex(d);g>=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(t,e){return wi(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,n){},r})();function dm(r){var t,e;return q(r)?r.type?e=r:process.env.NODE_ENV!=="production"&&console.warn("The return type of `formatTooltip` is not supported: "+Go(r)):t=r,{text:t,frag:e}}function Pa(r){return new KD(r)}var KD=(function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,n=t&&t.skip;if(this._dirty&&e){var i=this.context;i.data=i.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function f(y){return!(y>=1)&&(y=1),y}var h;(this._dirty||a==="reset")&&(this._dirty=!1,h=this._doReset(n)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(e?(process.env.NODE_ENV!=="production"&&it(e._outputDueEnd!=null),this._dueEnd=e._outputDueEnd):(process.env.NODE_ENV!=="production"&&it(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var v=this._dueIndex,d=Math.min(c!=null?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(h||v<d)){var p=this._progress;if(W(p))for(var g=0;g<p.length;g++)this._doProgress(p[g],v,d,l,u);else this._doProgress(p,v,d,l,u)}this._dueIndex=d;var m=this._settedOutputEnd!=null?this._settedOutputEnd:d;process.env.NODE_ENV!=="production"&&it(m>=this._outputDueEnd),this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(t,e,n,i,a){pm.reset(e,n,i,a),this._callingProgress=t,this._callingProgress({start:e,end:n,count:n-e,next:pm.next},this.context)},r.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var e,n;!t&&this._reset&&(e=this._reset(this.context),e&&e.progress&&(n=e.forceFirstProgress,e=e.progress),W(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),n},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(t){process.env.NODE_ENV!=="production"&&it(t&&!t._disposed&&t!==this),(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},r})(),pm=(function(){var r,t,e,n,i,a={reset:function(l,u,f,h){t=l,r=u,e=f,n=h,i=Math.ceil(n/e),a.next=e>1&&n>0?s:o}};return a;function o(){return t<r?t++:null}function s(){var l=t%i*e+Math.ceil(t/i),u=t>=r?null:l<n?l:t;return t++,u}})();function Ws(r,t){var e=t&&t.type;return e==="ordinal"?r:(e==="time"&&!xt(r)&&r!=null&&r!=="-"&&(r=+hr(r)),r==null||r===""?NaN:Number(r))}tt({number:function(r){return parseFloat(r)},time:function(r){return+hr(r)},trim:function(r){return G(r)?Xe(r):r}});var jD=(function(){function r(t,e){var n=t==="desc";this._resultLT=n?1:-1,e==null&&(e=n?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var n=xt(t)?t:Ho(t),i=xt(e)?e:Ho(e),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=G(t),l=G(e);s&&(n=l?t:0),l&&(i=s?e:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},r})(),QD=(function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return Ws(t,e)},r})();function JD(r,t){var e=new QD,n=r.data,i=e.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==mr&&(process.env.NODE_ENV!=="production"&&(o='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),ue(o));var s=[],l={},u=r.dimensionsDefine;if(u)D(u,function(p,g){var m=p.name,y={index:g,name:m,displayName:p.displayName};if(s.push(y),m!=null){var _="";Jr(l,m)&&(process.env.NODE_ENV!=="production"&&(_='dimension name "'+m+'" duplicated.'),ue(_)),l[m]=y}});else for(var f=0;f<r.dimensionsDetectedCount;f++)s.push({index:f});var h=fm(i,mr);t.__isBuiltIn&&(e.getRawDataItem=function(p){return h(n,a,s,p)},e.getRawData=J(tM,null,r)),e.cloneRawData=J(eM,null,r);var c=cm(i,mr);e.count=J(c,null,n,a,s);var v=vm(i);e.retrieveValue=function(p,g){var m=h(n,a,s,p);return d(m,g)};var d=e.retrieveValueFromItem=function(p,g){if(p!=null){var m=s[g];if(m)return v(p,g,m.name)}};return e.getDimensionInfo=J(rM,null,s,l),e.cloneAllDimensionInfo=J(nM,null,s),e}function tM(r){var t=r.sourceFormat;if(!Jf(t)){var e="";process.env.NODE_ENV!=="production"&&(e="`getRawData` is not supported in source format "+t),ue(e)}return r.data}function eM(r){var t=r.sourceFormat,e=r.data;if(!Jf(t)){var n="";process.env.NODE_ENV!=="production"&&(n="`cloneRawData` is not supported in source format "+t),ue(n)}if(t===ve){for(var i=[],a=0,o=e.length;a<o;a++)i.push(e[a].slice());return i}else if(t===ir){for(var i=[],a=0,o=e.length;a<o;a++)i.push(B({},e[a]));return i}}function rM(r,t,e){if(e!=null){if(xt(e)||!isNaN(e)&&!Jr(t,e))return r[e];if(Jr(t,e))return t[e]}}function nM(r){return ut(r)}var gm=tt();function iM(r){r=ut(r);var t=r.type,e="";t||(process.env.NODE_ENV!=="production"&&(e="Must have a `type` when `registerTransform`."),ue(e));var n=t.split(":");n.length!==2&&(process.env.NODE_ENV!=="production"&&(e='Name must include namespace like "ns:regression".'),ue(e));var i=!1;n[0]==="echarts"&&(t=n[1],i=!0),r.__isBuiltIn=i,gm.set(t,r)}function aM(r,t,e){var n=re(r),i=n.length,a="";i||(process.env.NODE_ENV!=="production"&&(a="If `transform` declared, it should at least contain one transform."),ue(a));for(var o=0,s=i;o<s;o++){var l=n[o];t=oM(l,t,e,i===1?null:o),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function oM(r,t,e,n){var i="";t.length||(process.env.NODE_ENV!=="production"&&(i="Must have at least one upstream dataset."),ue(i)),q(r)||(process.env.NODE_ENV!=="production"&&(i="transform declaration must be an object rather than "+typeof r+"."),ue(i));var a=r.type,o=gm.get(a);o||(process.env.NODE_ENV!=="production"&&(i='Can not find transform on type "'+a+'".'),ue(i));var s=X(t,function(f){return JD(f,o)}),l=re(o.transform({upstream:s[0],upstreamList:s,config:ut(r.config)}));if(process.env.NODE_ENV!=="production"&&r.print){var u=X(l,function(f){var h=n!=null?" === pipe index: "+n:"";return["=== dataset index: "+e.datasetIndex+h+" ===","- transform result data:",Go(f.data),"- transform result dimensions:",Go(f.dimensions)].join(`
34
+ `)}).join(`
35
+ `);vx(u)}return X(l,function(f,h){var c="";q(f)||(process.env.NODE_ENV!=="production"&&(c="A transform should not return some empty results."),ue(c)),f.data||(process.env.NODE_ENV!=="production"&&(c="Transform result data should be not be null or undefined"),ue(c));var v=rm(f.data);Jf(v)||(process.env.NODE_ENV!=="production"&&(c="Transform result data should be array rows or object rows."),ue(c));var d,p=t[0];if(p&&h===0&&!f.dimensions){var g=p.startIndex;g&&(f.data=p.data.slice(0,g).concat(f.data)),d={seriesLayoutBy:mr,sourceHeader:g,dimensions:p.metaRawOption.dimensions}}else d={seriesLayoutBy:mr,sourceHeader:0,dimensions:f.dimensions};return Kf(f.data,d,null)})}function Jf(r){return r===ve||r===ir}var Gs="undefined",sM=typeof Uint32Array===Gs?Array:Uint32Array,lM=typeof Uint16Array===Gs?Array:Uint16Array,mm=typeof Int32Array===Gs?Array:Int32Array,ym=typeof Float64Array===Gs?Array:Float64Array,_m={float:ym,int:mm,ordinal:Array,number:Array,time:ym},th;function bi(r){return r>65535?sM:lM}function Si(){return[1/0,-1/0]}function uM(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function wm(r,t,e,n,i){var a=_m[e||"float"];if(i){var o=r[t],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;u<s;u++)l[u]=o[u];r[t]=l}}else r[t]=new a(n)}var eh=(function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=tt()}return r.prototype.initData=function(t,e,n){process.env.NODE_ENV!=="production"&&it(Q(t.getItem)&&Q(t.count),"Invalid data provider."),this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=t.getSource(),a=this.defaultDimValueGetter=th[i.sourceFormat];this._dimValueGetter=n||a,this._rawExtent=[];var o=am(i);this._dimensions=X(e,function(s){return process.env.NODE_ENV!=="production"&&o&&it(s.property!=null),{type:s.type,property:s.property}}),this._initDataFromProvider(0,t.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(t,e){var n=this._calcDimNameToIdx,i=this._dimensions,a=n.get(t);if(a!=null){if(i[a].type===e)return a}else a=i.length;return i[a]={type:e},n.set(t,a),this._chunks[a]=new _m[e||"float"](this._rawCount),this._rawExtent[a]=Si(),a},r.prototype.collectOrdinalMeta=function(t,e){var n=this._chunks[t],i=this._dimensions[t],a=this._rawExtent,o=i.ordinalOffset||0,s=n.length;o===0&&(a[t]=Si());for(var l=a[t],u=o;u<s;u++){var f=n[u]=e.parseAndCollect(n[u]);isNaN(f)||(l[0]=Math.min(f,l[0]),l[1]=Math.max(f,l[1]))}i.ordinalMeta=e,i.ordinalOffset=s,i.type="ordinal"},r.prototype.getOrdinalMeta=function(t){var e=this._dimensions[t],n=e.ordinalMeta;return n},r.prototype.getDimensionProperty=function(t){var e=this._dimensions[t];return e&&e.property},r.prototype.appendData=function(t){process.env.NODE_ENV!=="production"&&it(!this._indices,"appendData can only be called on raw data.");var e=this._provider,n=this.count();e.appendData(t);var i=e.count();return e.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},r.prototype.appendValues=function(t,e){for(var n=this._chunks,i=this._dimensions,a=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e||0),u=0;u<a;u++){var f=i[u];wm(n,u,f.type,l,!0)}for(var h=[],c=s;c<l;c++)for(var v=c-s,d=0;d<a;d++){var f=i[d],p=th.arrayRows.call(this,t[v]||h,f.property,v,d);n[d][c]=p;var g=o[d];p<g[0]&&(g[0]=p),p>g[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=X(o,function(y){return y.property}),f=0;f<s;f++){var h=o[f];l[f]||(l[f]=Si()),wm(a,f,h.type,e,n)}if(i.fillStorage)i.fillStorage(t,e,a,l);else for(var c=[],v=t;v<e;v++){c=i.getItem(v,c);for(var d=0;d<s;d++){var p=a[d],g=this._dimValueGetter(c,u[d],v,d);p[v]=g;var m=l[d];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var n=this._chunks[t];return n?n[this.getRawIndex(e)]:NaN},r.prototype.getValues=function(t,e){var n=[],i=[];if(e==null){e=t,t=[];for(var a=0;a<this._dimensions.length;a++)i.push(a)}else i=t;for(var a=0,o=i.length;a<o;a++)n.push(this.get(i[a],e));return n},r.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var n=this._chunks[t];return n?n[e]:NaN},r.prototype.getSum=function(t){var e=this._chunks[t],n=0;if(e)for(var i=0,a=this.count();i<a;i++){var o=this.get(t,i);isNaN(o)||(n+=o)}return n},r.prototype.getMedian=function(t){var e=[];this.each([t],function(a){isNaN(a)||e.push(a)});var n=e.sort(function(a,o){return a-o}),i=this.count();return i===0?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},r.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(n!=null&&n<this._count&&n===t)return t;for(var i=0,a=this._count-1;i<=a;){var o=(i+a)/2|0;if(e[o]<t)i=o+1;else if(e[o]>t)a=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks,a=i[t],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,f=0,h=this.count();f<h;f++){var c=this.getRawIndex(f),v=e-a[c],d=Math.abs(v);d<=n&&((d<s||d===s&&v>=0&&l<0)&&(s=d,l=v,u=0),v===l&&(o[u++]=f))}return o.length=u,o},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var a=0;a<i;a++)t[a]=e[a]}else t=new n(e.buffer,0,i)}else{var n=bi(this._rawCount);t=new n(this.count());for(var a=0;a<t.length;a++)t[a]=a}return t},r.prototype.filter=function(t,e){if(!this._count)return this;for(var n=this.clone(),i=n.count(),a=bi(n._rawCount),o=new a(i),s=[],l=t.length,u=0,f=t[0],h=n._chunks,c=0;c<i;c++){var v=void 0,d=n.getRawIndex(c);if(l===0)v=e(c);else if(l===1){var p=h[f][d];v=e(p,c)}else{for(var g=0;g<l;g++)s[g]=h[t[g]][d];s[g]=c,v=e.apply(null,s)}v&&(o[u++]=d)}return u<i&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},r.prototype.selectRange=function(t){var e=this.clone(),n=e._count;if(!n)return this;var i=Ct(t),a=i.length;if(!a)return this;var o=e.count(),s=bi(e._rawCount),l=new s(o),u=0,f=i[0],h=t[f][0],c=t[f][1],v=e._chunks,d=!1;if(!e._indices){var p=0;if(a===1){for(var g=v[i[0]],m=0;m<n;m++){var y=g[m];(y>=h&&y<=c||isNaN(y))&&(l[u++]=p),p++}d=!0}else if(a===2){for(var g=v[i[0]],_=v[i[1]],w=t[i[1]][0],b=t[i[1]][1],m=0;m<n;m++){var y=g[m],S=_[m];(y>=h&&y<=c||isNaN(y))&&(S>=w&&S<=b||isNaN(S))&&(l[u++]=p),p++}d=!0}}if(!d)if(a===1)for(var m=0;m<o;m++){var x=e.getRawIndex(m),y=v[i[0]][x];(y>=h&&y<=c||isNaN(y))&&(l[u++]=x)}else for(var m=0;m<o;m++){for(var T=!0,x=e.getRawIndex(m),M=0;M<a;M++){var A=i[M],y=v[A][x];(y<t[A][0]||y>t[A][1])&&(T=!1)}T&&(l[u++]=e.getRawIndex(m))}return u<o&&(e._indices=l),e._count=u,e._extent=[],e._updateGetRawIdx(),e},r.prototype.map=function(t,e){var n=this.clone(t);return this._updateDims(n,t,e),n},r.prototype.modify=function(t,e){this._updateDims(this,t,e)},r.prototype._updateDims=function(t,e,n){for(var i=t._chunks,a=[],o=e.length,s=t.count(),l=[],u=t._rawExtent,f=0;f<e.length;f++)u[e[f]]=Si();for(var h=0;h<s;h++){for(var c=t.getRawIndex(h),v=0;v<o;v++)l[v]=i[e[v]][c];l[o]=h;var d=n&&n.apply(null,l);if(d!=null){typeof d!="object"&&(a[0]=d,d=a);for(var f=0;f<d.length;f++){var p=e[f],g=d[f],m=u[p],y=i[p];y&&(y[c]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},r.prototype.lttbDownSample=function(t,e){var n=this.clone([t],!0),i=n._chunks,a=i[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),f,h,c,v=new(bi(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var d=1;d<o-1;d+=l){for(var p=Math.min(d+l,o-1),g=Math.min(d+l*2,o),m=(g+p)/2,y=0,_=p;_<g;_++){var w=this.getRawIndex(_),b=a[w];isNaN(b)||(y+=b)}y/=g-p;var S=d,x=Math.min(d+l,o),T=d-1,M=a[u];f=-1,c=S;for(var A=-1,C=0,_=S;_<x;_++){var w=this.getRawIndex(_),b=a[w];if(isNaN(b)){C++,A<0&&(A=w);continue}h=Math.abs((T-m)*(b-M)-(T-_)*(y-M)),h>f&&(f=h,c=w)}C>0&&C<x-S&&(v[s++]=Math.min(A,c),c=Math.max(A,c)),v[s++]=c,u=c}return v[s++]=this.getRawIndex(o-1),n._count=s,n._indices=v,n.getRawIndex=this._getRawIdx,n},r.prototype.minmaxDownSample=function(t,e){for(var n=this.clone([t],!0),i=n._chunks,a=Math.floor(1/e),o=i[t],s=this.count(),l=new(bi(this._rawCount))(Math.ceil(s/a)*2),u=0,f=0;f<s;f+=a){var h=f,c=o[this.getRawIndex(h)],v=f,d=o[this.getRawIndex(v)],p=a;f+a>s&&(p=s-f);for(var g=0;g<p;g++){var m=this.getRawIndex(f+g),y=o[m];y<c&&(c=y,h=f+g),y>d&&(d=y,v=f+g)}var _=this.getRawIndex(h),w=this.getRawIndex(v);h<v?(l[u++]=_,l[u++]=w):(l[u++]=w,l[u++]=_)}return n._count=u,n._indices=l,n._updateGetRawIdx(),n},r.prototype.downSample=function(t,e,n,i){for(var a=this.clone([t],!0),o=a._chunks,s=[],l=Math.floor(1/e),u=o[t],f=this.count(),h=a._rawExtent[t]=Si(),c=new(bi(this._rawCount))(Math.ceil(f/l)),v=0,d=0;d<f;d+=l){l>f-d&&(l=f-d,s.length=l);for(var p=0;p<l;p++){var g=this.getRawIndex(d+p);s[p]=u[g]}var m=n(s),y=this.getRawIndex(Math.min(d+i(s,m)||0,f-1));u[y]=m,m<h[0]&&(h[0]=m),m>h[1]&&(h[1]=m),c[v++]=y}return a._count=v,a._indices=c,a._updateGetRawIdx(),a},r.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(n){case 0:e(a);break;case 1:e(i[t[0]][s],a);break;case 2:e(i[t[0]][s],i[t[1]][s],a);break;default:for(var l=0,u=[];l<n;l++)u[l]=i[t[l]][s];u[l]=a,e.apply(null,u)}}},r.prototype.getDataExtent=function(t){var e=this._chunks[t],n=Si();if(!e)return n;var i=this.count(),a=!this._indices,o;if(a)return this._rawExtent[t].slice();if(o=this._extent[t],o)return o.slice();o=n;for(var s=o[0],l=o[1],u=0;u<i;u++){var f=this.getRawIndex(u),h=e[f];h<s&&(s=h),h>l&&(l=h)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,a=0;a<i.length;a++)n.push(i[a][e]);return n},r.prototype.clone=function(t,e){var n=new r,i=this._chunks,a=t&&Hn(t,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<i.length;o++)n._chunks[o]=a[o]?uM(i[o]):i[o];else n._chunks=i;return this._copyCommonProps(n),e||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},r.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=ut(this._extent),t._rawExtent=ut(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,e=void 0;if(t===Array){var n=this._indices.length;e=new t(n);for(var i=0;i<n;i++)e[i]=this._indices[i]}else e=new t(this._indices);return e}return null},r.prototype._getRawIdxIdentity=function(t){return t},r.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=(function(){function t(e,n,i,a){return Ws(e[a],this._dimensions[a])}th={arrayRows:t,objectRows:function(e,n,i,a){return Ws(e[n],this._dimensions[a])},keyedColumns:t,original:function(e,n,i,a){var o=e&&(e.value==null?e:e.value);return Ws(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(e,n,i,a){return e[a]}}})(),r})(),fM=(function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),n=!!e.length,i,a;if(ka(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var f=e[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,a=[f._getVersionSign()]}else s=o.get("data",!0),l=te(s)?gr:Ee,a=[];var h=this._getSourceMetaRawOption()||{},c=u&&u.metaRawOption||{},v=nt(h.seriesLayoutBy,c.seriesLayoutBy)||null,d=nt(h.sourceHeader,c.sourceHeader),p=nt(h.dimensions,c.dimensions),g=v!==c.seriesLayoutBy||!!d!=!!c.sourceHeader||p;i=g?[Kf(s,{seriesLayoutBy:v,sourceHeader:d,dimensions:p},l)]:[]}else{var m=t;if(n){var y=this._applyTransform(e);i=y.sourceList,a=y.upstreamSignList}else{var _=m.get("source",!0);i=[Kf(_,this._getSourceMetaRawOption(),null)],a=[]}}process.env.NODE_ENV!=="production"&&it(i&&a),this._setLocalSource(i,a)},r.prototype._applyTransform=function(t){var e=this._sourceHost,n=e.get("transform",!0),i=e.get("fromTransformResult",!0);if(process.env.NODE_ENV!=="production"&&it(i!=null||n!=null),i!=null){var a="";t.length!==1&&(process.env.NODE_ENV!=="production"&&(a="When using `fromTransformResult`, there should be only one upstream dataset"),bm(a))}var o,s=[],l=[];return D(t,function(u){u.prepareSource();var f=u.getSource(i||0),h="";i!=null&&!f&&(process.env.NODE_ENV!=="production"&&(h="Can not retrieve result by `fromTransformResult`: "+i),bm(h)),s.push(f),l.push(u._getVersionSign())}),n?o=aM(n,s,{datasetIndex:e.componentIndex}):i!=null&&(o=[WD(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var n=t[e];if(n._isDirty()||this._upstreamSignList[e]!==n._getVersionSign())return!0}},r.prototype.getSource=function(t){t=t||0;var e=this._sourceList[t];if(!e){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(t)}return e},r.prototype.getSharedDataStore=function(t){process.env.NODE_ENV!=="production"&&it(ka(this._sourceHost),"Can only call getDataStore on series source manager.");var e=t.makeStoreSchema();return this._innerGetDataStore(e.dimensions,t.source,e.hash)},r.prototype._innerGetDataStore=function(t,e,n){var i=0,a=this._storeList,o=a[i];o||(o=a[i]={});var s=o[n];if(!s){var l=this._getUpstreamSourceManagers()[0];ka(this._sourceHost)&&l?s=l._innerGetDataStore(t,e,n):(s=new eh,s.initData(new lm(e,t.length),t)),o[n]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(ka(t)){var e=zg(t);return e?[e.getSourceManager()]:[]}else return X(dD(t),function(n){return n.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,e,n,i;if(ka(t))e=t.get("seriesLayoutBy",!0),n=t.get("sourceHeader",!0),i=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=t;e=a.get("seriesLayoutBy",!0),n=a.get("sourceHeader",!0),i=a.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:n,dimensions:i}},r})();function ka(r){return r.mainType==="series"}function bm(r){throw new Error(r)}var hM="line-height:1";function Sm(r){var t=r.lineHeight;return t==null?hM:"line-height:"+se(t+"")+"px"}function xm(r,t){var e=r.color||"#6e7079",n=r.fontSize||12,i=r.fontWeight||"400",a=r.color||"#464646",o=r.fontSize||14,s=r.fontWeight||"900";return t==="html"?{nameStyle:"font-size:"+se(n+"")+"px;color:"+se(e)+";font-weight:"+se(i+""),valueStyle:"font-size:"+se(o+"")+"px;color:"+se(a)+";font-weight:"+se(s+"")}:{nameStyle:{fontSize:n,fill:e,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var cM=[0,10,20,30],vM=["",`
36
+ `,`
37
+
38
+ `,`
39
+
40
+
41
+ `];function Ra(r,t){return t.type=r,t}function rh(r){return r.type==="section"}function Cm(r){return rh(r)?dM:pM}function Tm(r){if(rh(r)){var t=0,e=r.blocks.length,n=e>1||e>0&&!r.noHeader;return D(r.blocks,function(i){var a=Tm(i);a>=t&&(t=a+ +(n&&(!a||rh(i)&&!i.noHeader)))}),t}return 0}function dM(r,t,e,n){var i=t.noHeader,a=gM(Tm(t)),o=[],s=t.blocks||[];it(!s||W(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Jr(u,l)){var f=new jD(u[l],null);s.sort(function(p,g){return f.evaluate(p.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}D(s,function(p,g){var m=t.valueFormatter,y=Cm(p)(m?B(B({},r),{valueFormatter:m}):r,p,g>0?a.html:0,n);y!=null&&o.push(y)});var h=r.renderMode==="richText"?o.join(a.richText):nh(n,o.join(""),i?e:a.html);if(i)return h;var c=Ff(t.header,"ordinal",r.useUTC),v=xm(n,r.renderMode).nameStyle,d=Sm(n);return r.renderMode==="richText"?Mm(r,c,v)+a.richText+h:nh(n,'<div style="'+v+";"+d+';">'+se(c)+"</div>"+h,e)}function pM(r,t,e,n){var i=r.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,f=t.valueFormatter||r.valueFormatter||function(w){return w=W(w)?w:[w],X(w,function(b,S){return Ff(b,W(v)?v[S]:v,u)})};if(!(a&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),c=a?"":Ff(l,"ordinal",u),v=t.valueType,d=o?[]:f(t.value,t.dataIndex),p=!s||!a,g=!s&&a,m=xm(n,i),y=m.nameStyle,_=m.valueStyle;return i==="richText"?(s?"":h)+(a?"":Mm(r,c,y))+(o?"":_M(r,d,p,g,_)):nh(n,(s?"":h)+(a?"":mM(c,!s,y))+(o?"":yM(d,p,g,_)),e)}}function Dm(r,t,e,n,i,a){if(r){var o=Cm(r),s={useUTC:i,renderMode:e,orderMode:n,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function gM(r){return{html:cM[r],richText:vM[r]}}function nh(r,t,e){var n='<div style="clear:both"></div>',i="margin: "+e+"px 0 0",a=Sm(r);return'<div style="'+i+";"+a+';">'+t+n+"</div>"}function mM(r,t,e){var n=t?"margin-left:2px":"";return'<span style="'+e+";"+n+'">'+se(r)+"</span>"}function yM(r,t,e,n){var i=e?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return r=W(r)?r:[r],'<span style="'+a+";"+n+'">'+X(r,function(o){return se(o)}).join("&nbsp;&nbsp;")+"</span>"}function Mm(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function _M(r,t,e,n,i){var a=[i],o=n?10:20;return e&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(W(t)?t.join(" "):t,a)}function wM(r,t){var e=r.getData().getItemVisual(t,"style"),n=e[r.visualDrawType];return xn(n)}function Am(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var ih=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=Nd()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,n){var i=n==="richText"?this._generateStyleName():null,a=sD({color:e,type:t,renderMode:n,markerId:i});return G(a)?a:(process.env.NODE_ENV!=="production"&&it(i),this.richTextStyles[i]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(t,e){var n={};W(e)?D(e,function(a){return B(n,a)}):B(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},r})();function bM(r){var t=r.series,e=r.dataIndex,n=r.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(e),l=W(s),u=wM(t,e),f,h,c,v;if(o>1||l&&!o){var d=SM(s,t,e,a,u);f=d.inlineValues,h=d.inlineValueTypes,c=d.blocks,v=d.inlineValues[0]}else if(o){var p=i.getDimensionInfo(a[0]);v=f=wi(i,e,a[0]),h=p.type}else v=f=l?s[0]:s;var g=Gu(t),m=g&&t.name||"",y=i.getName(e),_=n?m:y;return Ra("section",{header:m,noHeader:n||!g,sortParam:v,blocks:[Ra("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Xe(_),value:f,valueType:h,dataIndex:e})].concat(c||[])})}function SM(r,t,e,n,i){var a=t.getData(),o=Hn(r,function(h,c,v){var d=a.getDimensionInfo(v);return h=h||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];n.length?D(n,function(h){f(wi(a,e,h),h)}):D(r,f);function f(h,c){var v=a.getDimensionInfo(c);!v||v.otherDims.tooltip===!1||(o?u.push(Ra("nameValue",{markerType:"subItem",markerColor:i,name:v.displayName,value:h,valueType:v.type})):(s.push(h),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var kr=Nt();function $s(r,t){return r.getName(t)||r.getId(t)}var xM="__universalTransitionEnabled",ke=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Pa({count:TM,reset:DM}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,i);var a=kr(this).sourceManager=new fM(this);a.prepareSource();var o=this.getInitialData(e,i);Em(o,this),this.dataTask.context.data=o,process.env.NODE_ENV!=="production"&&it(o,"getInitialData returned invalid data."),kr(this).dataBeforeProcessed=o,Im(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,n){var i=Da(this),a=i?Ma(e):{},o=this.subType;dt.hasClass(o)&&(o+="Series"),ct(e,n.getTheme().get(this.subType)),ct(e,this.getDefaultOption()),Wd(e,"label",["show"]),this.fillDataTextStyle(e.data),i&&mi(e,a,i)},t.prototype.mergeOption=function(e,n){e=ct(this.option,e,!0),this.fillDataTextStyle(e.data);var i=Da(this);i&&mi(this.option,e,i);var a=kr(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(e,n);Em(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,kr(this).dataBeforeProcessed=o,Im(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!te(e))for(var n=["show"],i=0;i<e.length;i++)e[i]&&e[i].label&&Wd(e[i],"label",n)},t.prototype.getInitialData=function(e,n){},t.prototype.appendData=function(e){var n=this.getRawData();n.appendData(e.data)},t.prototype.getData=function(e){var n=ah(this);if(n){var i=n.context.data;return e==null||!i.getLinkedData?i:i.getLinkedData(e)}else return kr(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var n=ah(this);if(n){var i=n.context;i.outputData=e,n!==this.dataTask&&(i.data=e)}kr(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return tt(e)},t.prototype.getSourceManager=function(){return kr(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return kr(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var e=this.get("colorBy");return e||"series"},t.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.formatTooltip=function(e,n,i){return bM({series:this,dataIndex:e,multipleSeries:n})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(j.node&&!(e&&e.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,n,i){var a=this.ecModel,o=Wf.prototype.getColorFromPalette.call(this,e,n,i);return o||(o=a.getColorFromPalette(e,n,i)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,n){this._innerSelect(this.getData(n),e)},t.prototype.unselect=function(e,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<e.length;s++){var l=e[s],u=$s(o,l);i[u]=!1,this._selectedDataIndicesMap[u]=-1}}},t.prototype.toggleSelect=function(e,n){for(var i=[],a=0;a<e.length;a++)i[0]=e[a],this.isSelected(e[a],n)?this.unselect(i,n):this.select(i,n)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,n=Ct(e),i=[],a=0;a<n.length;a++){var o=e[n[a]];o>=0&&i.push(o)}return i},t.prototype.isSelected=function(e,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[$s(a,e)])&&!a.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[xM])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){q(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f<l;f++){var h=n[f],c=$s(e,h);u[c]=!0,this._selectedDataIndicesMap[c]=e.getRawIndex(h)}}else if(s==="single"||s===!0){var v=n[l-1],c=$s(e,v);o.selectedMap=(i={},i[c]=!0,i),this._selectedDataIndicesMap=(a={},a[c]=e.getRawIndex(v),a)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var n=[];e.hasItemOption&&e.each(function(i){var a=e.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(e,n)}},t.registerClass=function(e){return dt.registerClass(e)},t.protoInitialize=(function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"})(),t})(dt);Fe(ke,qD),Fe(ke,Wf),qd(ke,dt);function Im(r){var t=r.name;Gu(r)||(r.name=CM(r)||t)}function CM(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),n=[];return D(e,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function TM(r){return r.model.getRawData().count()}function DM(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),MM}function MM(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Em(r,t){D(Ub(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,At(AM,t))})}function AM(r,t){var e=ah(r);return e&&e.setOutputEnd((t||this).count()),t}function ah(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var n=e.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(r.uid))}return n}}var Re=(function(){function r(){this.group=new kt,this.uid=Ds("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,i){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,i){},r.prototype.updateLayout=function(t,e,n,i){},r.prototype.updateVisual=function(t,e,n,i){},r.prototype.toggleBlurSeries=function(t,e,n){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r})();Yu(Re),$o(Re);function Oa(){var r=Nt();return function(t){var e=r(t),n=t.pipelineContext,i=!!e.large,a=!!e.progressiveRender,o=e.large=!!(n&&n.large),s=e.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var Lm=Nt(),IM=Oa(),_e=(function(){function r(){this.group=new kt,this.uid=Ds("viewChart"),this.renderTask=Pa({plan:EM,reset:LM}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,i){if(process.env.NODE_ENV!=="production")throw new Error("render method must been implemented")},r.prototype.highlight=function(t,e,n,i){var a=t.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&qt("Unknown dataType "+i.dataType);return}km(a,i,"emphasis")},r.prototype.downplay=function(t,e,n,i){var a=t.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&qt("Unknown dataType "+i.dataType);return}km(a,i,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},r.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},r.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},r.prototype.eachRendered=function(t){ba(this.group,t)},r.markUpdateMethod=function(t,e){Lm(t).updateMethod=e},r.protoInitialize=(function(){var t=r.prototype;t.type="chart"})(),r})();function Pm(r,t,e){r&&ui(r)&&(t==="emphasis"?ns:is)(r,e)}function km(r,t,e){var n=sn(r,t),i=t&&t.highlightKey!=null?XC(t.highlightKey):null;n!=null?D(re(n),function(a){Pm(r.getItemGraphicEl(a),e,i)}):r.eachItemGraphicEl(function(a){Pm(a,e,i)})}Yu(_e,["dispose"]),$o(_e);function EM(r){return IM(r.model)}function LM(r){var t=r.model,e=r.ecModel,n=r.api,i=r.payload,a=t.pipelineContext.progressiveRender,o=r.view,s=i&&Lm(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,n,i),PM[l]}var PM={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Us="\0__throttleOriginMethod",Rm="\0__throttleRate",Om="\0__throttleType";function oh(r,t,e){var n,i=0,a=0,o=null,s,l,u,f;t=t||0;function h(){a=new Date().getTime(),o=null,r.apply(l,u||[])}var c=function(){for(var v=[],d=0;d<arguments.length;d++)v[d]=arguments[d];n=new Date().getTime(),l=this,u=v;var p=f||t,g=f||e;f=null,s=n-(g?i:a)-p,clearTimeout(o),g?o=setTimeout(h,p):s>=0?h():o=setTimeout(h,-s),i=n};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.debounceNextCall=function(v){f=v},c}function Ys(r,t,e,n){var i=r[t];if(i){var a=i[Us]||i,o=i[Om],s=i[Rm];if(s!==e||o!==n){if(e==null||!n)return r[t]=a;i=r[t]=oh(a,e,n==="debounce"),i[Us]=a,i[Om]=n,i[Rm]=e}return i}}function Zs(r,t){var e=r[t];e&&e[Us]&&(e.clear&&e.clear(),r[t]=e[Us])}var Nm=Nt(),Bm={itemStyle:la(gg,!0),lineStyle:la(pg,!0)},kM={lineStyle:"stroke",itemStyle:"fill"};function Fm(r,t){var e=r.visualStyleMapper||Bm[t];return e||(console.warn("Unknown style type '"+t+"'."),Bm.itemStyle)}function zm(r,t){var e=r.visualDrawType||kM[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var RM={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=r.getModel(n),a=Fm(r,n),o=a(i),s=i.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=zm(r,n),u=o[l],f=Q(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||h){var c=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=c,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Q(o.fill)?c:o.fill,o.stroke=o.stroke==="auto"||Q(o.stroke)?c:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&f)return e.setVisual("colorFromPalette",!1),{dataEach:function(v,d){var p=r.getDataParams(d),g=B({},o);g[l]=f(p),v.setItemVisual(d,"style",g)}}}},Na=new It,OM={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=Fm(r,n),a=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Na.option=l[n];var u=i(Na),f=o.ensureUniqueItemVisual(s,"style");B(f,u),Na.option.decal&&(o.setItemVisual(s,"decal",Na.option.decal),Na.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},NM={performRawSeries:!0,overallReset:function(r){var t=tt();r.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var i=e.type+"-"+n,a=t.get(i);a||(a={},t.set(i,a)),Nm(e).scope=a}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var n=e.getRawData(),i={},a=e.getData(),o=Nm(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=zm(e,s);a.each(function(u){var f=a.getRawIndex(u);i[f]=u}),n.each(function(u){var f=i[u],h=a.getItemVisual(f,"colorFromPalette");if(h){var c=a.ensureUniqueItemVisual(f,"style"),v=n.getName(u)||u+"",d=n.count();c[l]=e.getColorFromPalette(v,o,d)}})}})}},Xs=Math.PI;function BM(r,t){t=t||{},gt(t,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var e=new kt,n=new Tt({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(n);var i=new Ut({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Tt({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(a);var o;return t.showSpinner&&(o=new vs({shape:{startAngle:-Xs/2,endAngle:-Xs/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Xs*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Xs*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=i.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:f}),a.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var Vm=(function(){function r(t,e,n,i){this._stageTaskMap=tt(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData(),a=i.count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&a>=n.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=tt();t.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),e._pipe(i,i.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;D(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";process.env.NODE_ENV!=="production"&&(o='"reset" and "overallReset" must not be both specified.'),it(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,e,n),i.overallReset&&this._createOverallStageTask(i,a,e,n)},this)},r.prototype.prepareView=function(t,e,n,i){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=n,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(e,a)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},r.prototype._performStageTasks=function(t,e,n,i){i=i||{};var a=!1,o=this;D(t,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),h=f.seriesTaskMap,c=f.overallTask;if(c){var v,d=c.agentStubMap;d.each(function(g){s(i,g)&&(g.dirty(),v=!0)}),v&&c.dirty(),o.updatePayload(c,n);var p=o.getPerformArgs(c,i.block);d.each(function(g){g.perform(p)}),c.perform(p)&&(a=!0)}else h&&h.each(function(g,m){s(i,g)&&g.dirty();var y=o.getPerformArgs(g,i.block);y.skip=!l.performRawSeries&&e.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(y)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(n){e=n.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,n,i){var a=this,o=e.seriesTaskMap,s=e.seriesTaskMap=tt(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(f):l?n.eachRawSeriesByType(l,f):u&&u(n,i).each(f);function f(h){var c=h.uid,v=s.set(c,o&&o.get(c)||Pa({plan:WM,reset:GM,count:UM}));v.context={model:h,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(h,v)}},r.prototype._createOverallStageTask=function(t,e,n,i){var a=this,o=e.overallTask=e.overallTask||Pa({reset:FM});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=tt(),u=t.seriesType,f=t.getTargetSeries,h=!0,c=!1,v="";process.env.NODE_ENV!=="production"&&(v='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),it(!t.createOnAllSeries,v),u?n.eachRawSeriesByType(u,d):f?f(n,i).each(d):(h=!1,D(n.getSeries(),d));function d(p){var g=p.uid,m=l.set(g,s&&s.get(g)||(c=!0,Pa({reset:zM,onDirty:HM})));m.context={model:p,overallProgress:h},m.agent=o,m.__block=h,a._pipe(p,m)}c&&o.dirty()},r.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},r.wrapStageHandler=function(t,e){return Q(t)&&(t={overallReset:t,seriesType:YM(t)}),t.uid=Ds("stageHandler"),e&&(t.visualType=e),t},r})();function FM(r){r.overallReset(r.ecModel,r.api,r.payload)}function zM(r){return r.overallProgress&&VM}function VM(){this.agent.dirty(),this.getDownstream().dirty()}function HM(){this.agent&&this.agent.dirty()}function WM(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function GM(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=re(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?X(t,function(e,n){return Hm(n)}):$M}var $M=Hm(0);function Hm(r){return function(t,e){var n=e.data,i=e.resetDefines[r];if(i&&i.dataEach)for(var a=t.start;a<t.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(t,n)}}function UM(r){return r.data.count()}function YM(r){qs=null;try{r(Ba,Wm)}catch{}return qs}var Ba={},Wm={},qs;Gm(Ba,$f),Gm(Wm,Zg),Ba.eachSeriesByType=Ba.eachRawSeriesByType=function(r){qs=r},Ba.eachComponent=function(r){r.mainType==="series"&&r.subType&&(qs=r.subType)};function Gm(r,t){for(var e in t.prototype)r[e]=ee}var $m=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const ZM={color:$m,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],$m]};var Qt="#B9B8CE",Um="#100C2A",Ks=function(){return{axisLine:{lineStyle:{color:Qt}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},Ym=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],Zm={darkMode:!0,color:Ym,backgroundColor:Um,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Qt},pageTextStyle:{color:Qt}},textStyle:{color:Qt},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Qt}},dataZoom:{borderColor:"#71708A",textStyle:{color:Qt},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:Qt}},timeline:{lineStyle:{color:Qt},label:{color:Qt},controlStyle:{color:Qt,borderColor:Qt}},calendar:{itemStyle:{color:Um},dayLabel:{color:Qt},monthLabel:{color:Qt},yearLabel:{color:Qt}},timeAxis:Ks(),logAxis:Ks(),valueAxis:Ks(),categoryAxis:Ks(),line:{symbol:"circle"},graph:{color:Ym},gauge:{title:{color:Qt},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Qt},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};Zm.categoryAxis.splitLine.show=!1;var XM=(function(){function r(){}return r.prototype.normalizeQuery=function(t){var e={},n={},i={};if(G(t)){var a=je(t);e.mainType=a.main||null,e.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};D(t,function(l,u){for(var f=!1,h=0;h<o.length;h++){var c=o[h],v=u.lastIndexOf(c);if(v>0&&v===u.length-c.length){var d=u.slice(0,v);d!=="data"&&(e.mainType=d,e[c.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(n[u]=l,f=!0),f||(i[u]=l)})}return{cptQuery:e,dataQuery:n,otherQuery:i}},r.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,a,"name")&&f(u,a,"dataIndex")&&f(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,i,a));function f(h,c,v,d){return h[v]==null||c[d||v]===h[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})(),sh=["symbol","symbolSize","symbolRotate","symbolOffset"],Xm=sh.concat(["symbolKeepAspect"]),qM={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o<sh.length;o++){var s=sh[o],l=r.get(s);Q(l)?(a=!0,i[s]=l):n[s]=l}if(n.symbol=n.symbol||r.defaultSymbol,e.setVisual(B({legendIcon:r.legendIcon||n.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},n)),t.isSeriesFiltered(r))return;var u=Ct(i);function f(h,c){for(var v=r.getRawValue(c),d=r.getDataParams(c),p=0;p<u.length;p++){var g=u[p];h.setItemVisual(c,g,i[g](v,d))}}return{dataEach:a?f:null}}},KM={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!r.hasSymbolVisual||t.isSeriesFiltered(r))return;var e=r.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<Xm.length;s++){var l=Xm[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(a,l,u)}}return{dataEach:e.hasItemOption?n:null}}};function jM(r,t,e){switch(e){case"color":var n=r.getItemVisual(t,"style");return n[r.getVisual("drawType")];case"opacity":return r.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(t,e);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+e)}}function QM(r,t){switch(t){case"color":var e=r.getVisual("style");return e[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(t);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+t)}}function xi(r,t,e,n,i){var a=r+t;e.isSilent(a)||(process.env.NODE_ENV!=="production"&&He("event "+a+" is deprecated."),n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=i.selected,f=0;f<u.length;f++)if(u[f].seriesIndex===s){var h=o.getData(),c=sn(h,i.fromActionPayload);e.trigger(a,{type:a,seriesId:o.id,name:W(c)?h.getName(c[0]):h.getName(c),selected:G(l)?l:B({},l)})}}))}function JM(r,t,e){r.on("selectchanged",function(n){var i=e.getModel();n.isFromClick?(xi("map","selectchanged",t,i,n),xi("pie","selectchanged",t,i,n)):n.fromAction==="select"?(xi("map","selected",t,i,n),xi("pie","selected",t,i,n)):n.fromAction==="unselect"&&(xi("map","unselected",t,i,n),xi("pie","unselected",t,i,n))})}function Fa(r,t,e){for(var n;r&&!(t(r)&&(n=r,e));)r=r.__hostTarget||r.parent;return n}var tA=Math.round(Math.random()*9),eA=typeof Object.defineProperty=="function",rA=(function(){function r(){this._id="__ec_inner_"+tA++}return r.prototype.get=function(t){return this._guard(t)[this._id]},r.prototype.set=function(t,e){var n=this._guard(t);return eA?Object.defineProperty(n,this._id,{value:e,enumerable:!1,configurable:!0}):n[this._id]=e,this},r.prototype.delete=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},r.prototype.has=function(t){return!!this._guard(t)[this._id]},r.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},r})(),nA=vt.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,n=t.cy,i=t.width/2,a=t.height/2;r.moveTo(e,n-a),r.lineTo(e+i,n+a),r.lineTo(e-i,n+a),r.closePath()}}),iA=vt.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,n=t.cy,i=t.width/2,a=t.height/2;r.moveTo(e,n-a),r.lineTo(e+i,n),r.lineTo(e,n+a),r.lineTo(e-i,n),r.closePath()}}),aA=vt.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.x,n=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),l=n-a+o+s,u=Math.asin(s/o),f=Math.cos(u)*o,h=Math.sin(u),c=Math.cos(u),v=o*.6,d=o*.7;r.moveTo(e-f,l+s),r.arc(e,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(e+f-h*v,l+s+c*v,e,n-d,e,n),r.bezierCurveTo(e,n-d,e-f+h*v,l+s+c*v,e-f,l+s),r.closePath()}}),oA=vt.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.height,n=t.width,i=t.x,a=t.y,o=n/3*2;r.moveTo(i,a),r.lineTo(i+o,a+e),r.lineTo(i,a+e/4*3),r.lineTo(i-o,a+e),r.lineTo(i,a),r.closePath()}}),sA={line:Lr,rect:Tt,roundRect:Tt,square:Tt,circle:us,diamond:iA,pin:aA,arrow:oA,triangle:nA},lA={line:function(r,t,e,n,i){i.x1=r,i.y1=t+n/2,i.x2=r+e,i.y2=t+n/2},rect:function(r,t,e,n,i){i.x=r,i.y=t,i.width=e,i.height=n},roundRect:function(r,t,e,n,i){i.x=r,i.y=t,i.width=e,i.height=n,i.r=Math.min(e,n)/4},square:function(r,t,e,n,i){var a=Math.min(e,n);i.x=r,i.y=t,i.width=a,i.height=a},circle:function(r,t,e,n,i){i.cx=r+e/2,i.cy=t+n/2,i.r=Math.min(e,n)/2},diamond:function(r,t,e,n,i){i.cx=r+e/2,i.cy=t+n/2,i.width=e,i.height=n},pin:function(r,t,e,n,i){i.x=r+e/2,i.y=t+n/2,i.width=e,i.height=n},arrow:function(r,t,e,n,i){i.x=r+e/2,i.y=t+n/2,i.width=e,i.height=n},triangle:function(r,t,e,n,i){i.cx=r+e/2,i.cy=t+n/2,i.width=e,i.height=n}},js={};D(sA,function(r,t){js[t]=new r});var uA=vt.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,t,e){var n=Bo(r,t,e),i=this.shape;return i&&i.symbolType==="pin"&&t.position==="inside"&&(n.y=e.y+e.height*.4),n},buildPath:function(r,t,e){var n=t.symbolType;if(n!=="none"){var i=js[n];i||(n="rect",i=js[n]),lA[n](t.x,t.y,t.width,t.height,i.shape),i.buildPath(r,i.shape,e)}}});function fA(r,t){if(this.type!=="image"){var e=this.style;this.__isEmptyBrush?(e.stroke=r,e.fill=t||"#fff",e.lineWidth=2):this.shape.symbolType==="line"?e.stroke=r:e.fill=r,this.markRedraw()}}function _r(r,t,e,n,i,a,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=tg(r.slice(8),new pt(t,e,n,i),o?"center":"cover"):r.indexOf("path://")===0?l=Mf(r.slice(7),{},new pt(t,e,n,i),o?"center":"cover"):l=new uA({shape:{symbolType:r,x:t,y:e,width:n,height:i}}),l.__isEmptyBrush=s,l.setColor=fA,a&&l.setColor(a),l}function hA(r){return W(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function qm(r,t){if(r!=null)return W(r)||(r=[r,r]),[Rt(r[0],t[0])||0,Rt(nt(r[1],r[0]),t[1])||0]}function Mn(r){return isFinite(r)}function cA(r,t,e){var n=t.x==null?0:t.x,i=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;t.global||(n=n*e.width+e.x,i=i*e.width+e.x,a=a*e.height+e.y,o=o*e.height+e.y),n=Mn(n)?n:0,i=Mn(i)?i:1,a=Mn(a)?a:0,o=Mn(o)?o:0;var s=r.createLinearGradient(n,a,i,o);return s}function vA(r,t,e){var n=e.width,i=e.height,a=Math.min(n,i),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,l=t.r==null?.5:t.r;t.global||(o=o*n+e.x,s=s*i+e.y,l=l*a),o=Mn(o)?o:.5,s=Mn(s)?s:.5,l=l>=0&&Mn(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function lh(r,t,e){for(var n=t.type==="radial"?vA(r,t,e):cA(r,t,e),i=t.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function dA(r,t){if(r===t||!r&&!t)return!1;if(!r||!t||r.length!==t.length)return!0;for(var e=0;e<r.length;e++)if(r[e]!==t[e])return!0;return!1}function Qs(r){return parseInt(r,10)}function Js(r,t,e){var n=["width","height"][t],i=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(e[n]!=null&&e[n]!=="auto")return parseFloat(e[n]);var s=document.defaultView.getComputedStyle(r);return(r[i]||Qs(s[n])||Qs(r.style[n]))-(Qs(s[a])||0)-(Qs(s[o])||0)|0}function pA(r,t){return!r||r==="solid"||!(t>0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:xt(r)?[r]:W(r)?r:null}function Km(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&pA(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(e){var i=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;i&&i!==1&&(e=X(e,function(a){return a/i}),n/=i)}return[e,n]}var gA=new pn(!0);function tl(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function jm(r){return typeof r=="string"&&r!=="none"}function el(r){var t=r.fill;return t!=null&&t!=="none"}function Qm(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function Jm(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function uh(r,t,e){var n=Kd(t.image,t.__image,e);if(Uo(n)){var i=r.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Yb),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function mA(r,t,e,n){var i,a=tl(e),o=el(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var f=t.path||gA,h=t.__dirty;if(!n){var c=e.fill,v=e.stroke,d=o&&!!c.colorStops,p=a&&!!v.colorStops,g=o&&!!c.image,m=a&&!!v.image,y=void 0,_=void 0,w=void 0,b=void 0,S=void 0;(d||p)&&(S=t.getBoundingRect()),d&&(y=h?lh(r,c,S):t.__canvasFillGradient,t.__canvasFillGradient=y),p&&(_=h?lh(r,v,S):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(w=h||!t.__canvasFillPattern?uh(r,c,t):t.__canvasFillPattern,t.__canvasFillPattern=w),m&&(b=h||!t.__canvasStrokePattern?uh(r,v,t):t.__canvasStrokePattern,t.__canvasStrokePattern=w),d?r.fillStyle=y:g&&(w?r.fillStyle=w:o=!1),p?r.strokeStyle=_:m&&(b?r.strokeStyle=b:a=!1)}var x=t.getGlobalScale();f.setScale(x[0],x[1],t.segmentIgnoreThreshold);var T,M;r.setLineDash&&e.lineDash&&(i=Km(t),T=i[0],M=i[1]);var A=!0;(u||h&Qn)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),A=!1),f.reset(),t.buildPath(f,t.shape,n),f.toStatic(),t.pathUpdated()),A&&f.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=M),n||(e.strokeFirst?(a&&Jm(r,e),o&&Qm(r,e)):(o&&Qm(r,e),a&&Jm(r,e))),T&&r.setLineDash([])}function yA(r,t,e){var n=t.__image=Kd(e.image,t.__image,t,t.onload);if(!(!n||!Uo(n))){var i=e.x||0,a=e.y||0,o=t.getWidth(),s=t.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),e.sWidth&&e.sHeight){var u=e.sx||0,f=e.sy||0;r.drawImage(n,u,f,e.sWidth,e.sHeight,i,a,o,s)}else if(e.sx&&e.sy){var u=e.sx,f=e.sy,h=o-u,c=s-f;r.drawImage(n,u,f,h,c,i,a,o,s)}else r.drawImage(n,i,a,o,s)}}function _A(r,t,e){var n,i=e.text;if(i!=null&&(i+=""),i){r.font=e.font||Kr,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var a=void 0,o=void 0;r.setLineDash&&e.lineDash&&(n=Km(t),a=n[0],o=n[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),e.strokeFirst?(tl(e)&&r.strokeText(i,e.x,e.y),el(e)&&r.fillText(i,e.x,e.y)):(el(e)&&r.fillText(i,e.x,e.y),tl(e)&&r.strokeText(i,e.x,e.y)),a&&r.setLineDash([])}}var ty=["shadowBlur","shadowOffsetX","shadowOffsetY"],ey=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function ry(r,t,e,n,i){var a=!1;if(!n&&(e=e||{},t===e))return!1;if(n||t.opacity!==e.opacity){de(r,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?un.opacity:o}(n||t.blend!==e.blend)&&(a||(de(r,i),a=!0),r.globalCompositeOperation=t.blend||un.blend);for(var s=0;s<ty.length;s++){var l=ty[s];(n||t[l]!==e[l])&&(a||(de(r,i),a=!0),r[l]=r.dpr*(t[l]||0))}return(n||t.shadowColor!==e.shadowColor)&&(a||(de(r,i),a=!0),r.shadowColor=t.shadowColor||un.shadowColor),a}function ny(r,t,e,n,i){var a=za(t,i.inHover),o=n?null:e&&za(e,i.inHover)||{};if(a===o)return!1;var s=ry(r,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(de(r,i),s=!0),jm(a.fill)&&(r.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(de(r,i),s=!0),jm(a.stroke)&&(r.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(de(r,i),s=!0),r.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);r.lineWidth!==u&&(s||(de(r,i),s=!0),r.lineWidth=u)}for(var f=0;f<ey.length;f++){var h=ey[f],c=h[0];(n||a[c]!==o[c])&&(s||(de(r,i),s=!0),r[c]=a[c]||h[1])}return s}function wA(r,t,e,n,i){return ry(r,za(t,i.inHover),e&&za(e,i.inHover),n,i)}function iy(r,t){var e=t.transform,n=r.dpr||1;e?r.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):r.setTransform(n,0,0,n,0,0)}function bA(r,t,e){for(var n=!1,i=0;i<r.length;i++){var a=r[i];n=n||a.isZeroArea(),iy(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}e.allClipped=n}function SA(r,t){return r&&t?r[0]!==t[0]||r[1]!==t[1]||r[2]!==t[2]||r[3]!==t[3]||r[4]!==t[4]||r[5]!==t[5]:!(!r&&!t)}var ay=1,oy=2,sy=3,ly=4;function xA(r){var t=el(r),e=tl(r);return!(r.lineDash||!(+t^+e)||t&&typeof r.fill!="string"||e&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function de(r,t){t.batchFill&&r.fill(),t.batchStroke&&r.stroke(),t.batchFill="",t.batchStroke=""}function za(r,t){return t&&r.__hoverStyle||r.style}function uy(r,t){An(r,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function An(r,t,e,n){var i=t.transform;if(!t.shouldBePainted(e.viewWidth,e.viewHeight,!1,!1)){t.__dirty&=~ge,t.__isRendered=!1;return}var a=t.__clipPaths,o=e.prevElClipPaths,s=!1,l=!1;if((!o||dA(a,o))&&(o&&o.length&&(de(r,e),r.restore(),l=s=!0,e.prevElClipPaths=null,e.allClipped=!1,e.prevEl=null),a&&a.length&&(de(r,e),r.save(),bA(a,r,e),s=!0),e.prevElClipPaths=a),e.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=e.prevEl;u||(l=s=!0);var f=t instanceof vt&&t.autoBatch&&xA(t.style);s||SA(i,u.transform)?(de(r,e),iy(r,t)):f||de(r,e);var h=za(t,e.inHover);t instanceof vt?(e.lastDrawType!==ay&&(l=!0,e.lastDrawType=ay),ny(r,t,u,l,e),(!f||!e.batchFill&&!e.batchStroke)&&r.beginPath(),mA(r,t,h,f),f&&(e.batchFill=h.fill||"",e.batchStroke=h.stroke||"")):t instanceof jo?(e.lastDrawType!==sy&&(l=!0,e.lastDrawType=sy),ny(r,t,u,l,e),_A(r,t,h)):t instanceof Er?(e.lastDrawType!==oy&&(l=!0,e.lastDrawType=oy),wA(r,t,u,l,e),yA(r,t,h)):t.getTemporalDisplayables&&(e.lastDrawType!==ly&&(l=!0,e.lastDrawType=ly),CA(r,t,e)),f&&n&&de(r,e),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),e.prevEl=t,t.__dirty=0,t.__isRendered=!0}function CA(r,t,e){var n=t.getDisplayables(),i=t.getTemporalDisplayables();r.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:e.viewWidth,viewHeight:e.viewHeight,inHover:e.inHover},o,s;for(o=t.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),An(r,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,f=i.length;u<f;u++){var l=i[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),An(r,l,a,u===f-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,r.restore()}var fh=new rA,fy=new ji(100),hy=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function hh(r,t){if(r==="none")return null;var e=t.getDevicePixelRatio(),n=t.getZr(),i=n.painter.type==="svg";r.dirty&&fh.delete(r);var a=fh.get(r);if(a)return a;var o=gt(r,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/e,fh.set(r,s),r.dirty=!1,s;function l(u){for(var f=[e],h=!0,c=0;c<hy.length;++c){var v=o[hy[c]];if(v!=null&&!W(v)&&!G(v)&&!xt(v)&&typeof v!="boolean"){h=!1;break}f.push(v)}var d;if(h){d=f.join(",")+(i?"-svg":"");var p=fy.get(d);p&&(i?u.svgElement=p:u.image=p)}var g=vy(o.dashArrayX),m=TA(o.dashArrayY),y=cy(o.symbol),_=DA(g),w=dy(m),b=!i&&zn.createCanvas(),S=i&&{tag:"g",attrs:{},key:"dcl",children:[]},x=M(),T;b&&(b.width=x.width*e,b.height=x.height*e,T=b.getContext("2d")),A(),h&&fy.put(d,b||S),u.image=b,u.svgElement=S,u.svgWidth=x.width,u.svgHeight=x.height;function M(){for(var C=1,I=0,E=_.length;I<E;++I)C=Fd(C,_[I]);for(var L=1,I=0,E=y.length;I<E;++I)L=Fd(L,y[I].length);C*=L;var P=w*_.length*y.length;if(process.env.NODE_ENV!=="production"){var k=function(z){console.warn("Calculated decal size is greater than "+z+" due to decal option settings so "+z+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+z+" to be larger to avoid incontinuity.")};C>o.maxTileWidth&&k("maxTileWidth"),P>o.maxTileHeight&&k("maxTileHeight")}return{width:Math.max(1,Math.min(C,o.maxTileWidth)),height:Math.max(1,Math.min(P,o.maxTileHeight))}}function A(){T&&(T.clearRect(0,0,b.width,b.height),o.backgroundColor&&(T.fillStyle=o.backgroundColor,T.fillRect(0,0,b.width,b.height)));for(var C=0,I=0;I<m.length;++I)C+=m[I];if(C<=0)return;for(var E=-w,L=0,P=0,k=0;E<x.height;){if(L%2===0){for(var z=P/2%y.length,O=0,V=0,$=0;O<x.width*2;){for(var Z=0,I=0;I<g[k].length;++I)Z+=g[k][I];if(Z<=0)break;if(V%2===0){var et=(1-o.symbolSize)*.5,at=O+g[k][V]*et,ot=E+m[L]*et,st=g[k][V]*o.symbolSize,ie=m[L]*o.symbolSize,_t=$/2%y[z].length;Ze(at,ot,st,ie,y[z][_t])}O+=g[k][V],++$,++V,V===g[k].length&&(V=0)}++k,k===g.length&&(k=0)}E+=m[L],++P,++L,L===m.length&&(L=0)}function Ze(Vt,Mt,K,lt,Be){var Ht=i?1:e,Oi=_r(Be,Vt*Ht,Mt*Ht,K*Ht,lt*Ht,o.color,o.symbolKeepAspect);if(i){var Al=n.painter.renderOneToVNode(Oi);Al&&S.children.push(Al)}else uy(T,Oi)}}}}function cy(r){if(!r||r.length===0)return[["rect"]];if(G(r))return[[r]];for(var t=!0,e=0;e<r.length;++e)if(!G(r[e])){t=!1;break}if(t)return cy([r]);for(var n=[],e=0;e<r.length;++e)G(r[e])?n.push([r[e]]):n.push(r[e]);return n}function vy(r){if(!r||r.length===0)return[[0,0]];if(xt(r)){var t=Math.ceil(r);return[[t,t]]}for(var e=!0,n=0;n<r.length;++n)if(!xt(r[n])){e=!1;break}if(e)return vy([r]);for(var i=[],n=0;n<r.length;++n)if(xt(r[n])){var t=Math.ceil(r[n]);i.push([t,t])}else{var t=X(r[n],function(s){return Math.ceil(s)});t.length%2===1?i.push(t.concat(t)):i.push(t)}return i}function TA(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(xt(r)){var t=Math.ceil(r);return[t,t]}var e=X(r,function(n){return Math.ceil(n)});return r.length%2?e.concat(e):e}function DA(r){return X(r,function(t){return dy(t)})}function dy(r){for(var t=0,e=0;e<r.length;++e)t+=r[e];return r.length%2===1?t*2:t}function MA(r,t){r.eachRawSeries(function(e){if(!r.isSeriesFiltered(e)){var n=e.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=hh(s,t)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=hh(i,t)}}})}var $e=new ze,rl={};function AA(r,t){process.env.NODE_ENV!=="production"&&rl[r]&&qt("Already has an implementation of "+r+"."),rl[r]=t}function IA(r){return process.env.NODE_ENV!=="production"&&(rl[r]||qt("Implementation of "+r+" doesn't exists.")),rl[r]}var EA=1,LA=800,PA=900,kA=1e3,RA=2e3,OA=5e3,py=1e3,NA=1100,ch=2e3,gy=3e3,BA=4e3,nl=4500,FA=4600,zA=5e3,VA=6e3,my=7e3,HA={PROCESSOR:{FILTER:kA,SERIES_FILTER:LA,STATISTIC:OA},VISUAL:{LAYOUT:py,PROGRESSIVE_LAYOUT:NA,GLOBAL:ch,CHART:gy,POST_CHART_LAYOUT:FA,COMPONENT:BA,BRUSH:zA,CHART_ITEM:nl,ARIA:VA,DECAL:my}},Jt="__flagInMainProcess",pe="__pendingUpdate",vh="__needsUpdateStatus",yy=/^[a-zA-Z0-9_]+$/,dh="__connectUpdateStatus",_y=0,WA=1,GA=2;function wy(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.isDisposed()){we(this.id);return}return Sy(this,r,t)}}function by(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Sy(this,r,t)}}function Sy(r,t,e){return e[0]=e[0]&&e[0].toLowerCase(),ze.prototype[t].apply(r,e)}var xy=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(ze),Cy=xy.prototype;Cy.on=by("on"),Cy.off=by("off");var Ci,ph,il,Rr,gh,mh,yh,Va,Ha,Ty,Dy,_h,My,al,Ay,Iy,Oe,Ey,Ly=(function(r){N(t,r);function t(e,n,i){var a=r.call(this,new XM)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},G(n)&&(n=Py[n]),a._dom=e;var o="canvas",s="auto",l=!1;if(process.env.NODE_ENV!=="production"){var u=j.hasGlobalWindow?window:global;u&&(o=nt(u.__ECHARTS__DEFAULT__RENDERER__,o),s=nt(u.__ECHARTS__DEFAULT__COARSE_POINTER,s),l=nt(u.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,l))}i.ssr;var f=a._zr=Id(e,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:nt(i.useDirtyRect,l),useCoarsePointer:nt(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=oh(J(f.flush,f),17),n=ut(n),n&&tm(n,!0),a._theme=n,a._locale=tD(i.locale||mg),a._coordSysMgr=new Yf;var h=a._api=Ay(a);function c(v,d){return v.__prio-d.__prio}return mo(sl,c),mo(bh,c),a._scheduler=new Vm(a,h,bh,sl),a._messageCenter=new xy,a._initEvents(),a.resize=J(a.resize,a),f.animation.on("frame",a._onframe,a),Ty(f,a),Dy(f,a),jl(a),a}return t.prototype._onframe=function(){if(!this._disposed){Ey(this);var e=this._scheduler;if(this[pe]){var n=this[pe].silent;this[Jt]=!0;try{Ci(this),Rr.update.call(this,null,this[pe].updateParams)}catch(l){throw this[Jt]=!1,this[pe]=null,l}this._zr.flush(),this[Jt]=!1,this[pe]=null,Va.call(this,n),Ha.call(this,n)}else if(e.unfinished){var i=EA,a=this._model,o=this._api;e.unfinished=!1;do{var s=+new Date;e.performSeriesTasks(a),e.performDataProcessorTasks(a),mh(this,a),e.performVisualTasks(a),al(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,n,i){if(this[Jt]){process.env.NODE_ENV!=="production"&&qt("`setOption` should not be called during main process.");return}if(this._disposed){we(this.id);return}var a,o,s;if(q(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Jt]=!0,!this._model||n){var l=new AD(this._api),u=this._theme,f=this._model=new $f;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},Sh);var h={seriesTransition:s,optionChanged:!0};if(i)this[pe]={silent:a,updateParams:h},this[Jt]=!1,this.getZr().wakeUp();else{try{Ci(this),Rr.update.call(this,null,h)}catch(c){throw this[pe]=null,this[Jt]=!1,c}this._ssr||this._zr.flush(),this[pe]=null,this[Jt]=!1,Va.call(this,a),Ha.call(this,a)}},t.prototype.setTheme=function(){He("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||j.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return process.env.NODE_ENV!=="production"&&zt("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="canvas")throw new Error("renderToCanvas can only be used in the canvas renderer.");return n.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="svg")throw new Error("renderToSVGString can only be used in the svg renderer.");return n.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(j.svgSupported){var e=this._zr,n=e.storage.getDisplayList();return D(n,function(i){i.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(this._disposed){we(this.id);return}e=e||{};var n=e.excludeComponents,i=this._model,a=[],o=this;D(n,function(l){i.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(a.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return D(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){we(this.id);return}var n=e.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(ky[i]){var l=s,u=s,f=-s,h=-s,c=[],v=e&&e.pixelRatio||this.getDevicePixelRatio();D(Ga,function(_,w){if(_.group===i){var b=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(ut(e)),S=_.getDom().getBoundingClientRect();l=a(S.left,l),u=a(S.top,u),f=o(S.right,f),h=o(S.bottom,h),c.push({dom:b,left:S.left,top:S.top})}}),l*=v,u*=v,f*=v,h*=v;var d=f-l,p=h-u,g=zn.createCanvas(),m=Id(g,{renderer:n?"svg":"canvas"});if(m.resize({width:d,height:p}),n){var y="";return D(c,function(_){var w=_.left-l,b=_.top-u;y+='<g transform="translate('+w+","+b+')">'+_.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,e.connectedBackgroundColor&&m.painter.setBackgroundColor(e.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return e.connectedBackgroundColor&&m.add(new Tt({shape:{x:0,y:0,width:d,height:p},style:{fill:e.connectedBackgroundColor}})),D(c,function(_){var w=new Er({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});m.add(w)}),m.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,n){return gh(this,"convertToPixel",e,n)},t.prototype.convertFromPixel=function(e,n){return gh(this,"convertFromPixel",e,n)},t.prototype.containPixel=function(e,n){if(this._disposed){we(this.id);return}var i=this._model,a,o=$u(i,e);return D(o,function(s,l){l.indexOf("Models")>=0&&D(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(n);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint?a=a||h.containPoint(n,u):process.env.NODE_ENV!=="production"&&Xt(l+": "+(h?"The found component do not support containPoint.":"No view mapping to the found component."))}else process.env.NODE_ENV!=="production"&&Xt(l+": containPoint is not supported")},this)},this),!!a},t.prototype.getVisual=function(e,n){var i=this._model,a=$u(i,e,{defaultMainType:"series"}),o=a.seriesModel;process.env.NODE_ENV!=="production"&&(o||Xt("There is no specified series model"));var s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?jM(s,l,n):QM(s,n)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;D($A,function(n){var i=function(a){var o=e.getModel(),s=a.target,l,u=n==="globalout";if(u?l={}:s&&Fa(s,function(d){var p=ht(d);if(p&&p.dataIndex!=null){var g=p.dataModel||o.getSeriesByIndex(p.seriesIndex);return l=g&&g.getDataParams(p.dataIndex,p.dataType,s)||{},!0}else if(p.eventData)return l=B({},p.eventData),!0},!0),l){var f=l.componentType,h=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=l.seriesIndex);var c=f&&h!=null&&o.getComponent(f,h),v=c&&e[c.mainType==="series"?"_chartsMap":"_componentsMap"][c.__viewId];process.env.NODE_ENV!=="production"&&!u&&!(c&&v)&&Xt("model or view can not be found by params"),l.event=a,l.type=n,e._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:c,view:v},e.trigger(n,l)}};i.zrEventfulCallAtLast=!0,e._zr.on(n,i,e)}),D(Wa,function(n,i){e._messageCenter.on(i,function(a){this.trigger(i,a)},e)}),D(["selectchanged"],function(n){e._messageCenter.on(n,function(i){this.trigger(n,i)},e)}),JM(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){we(this.id);return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){we(this.id);return}this._disposed=!0;var e=this.getDom();e&&Zd(this.getDom(),Ch,"");var n=this,i=n._api,a=n._model;D(n._componentsViews,function(o){o.dispose(a,i)}),D(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Ga[n.id]},t.prototype.resize=function(e){if(this[Jt]){process.env.NODE_ENV!=="production"&&qt("`resize` should not be called during main process.");return}if(this._disposed){we(this.id);return}this._zr.resize(e);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=e&&e.silent;this[pe]&&(a==null&&(a=this[pe].silent),i=!0,this[pe]=null),this[Jt]=!0;try{i&&Ci(this),Rr.update.call(this,{type:"resize",animation:B({duration:0},e&&e.animation)})}catch(o){throw this[Jt]=!1,o}this[Jt]=!1,Va.call(this,a),Ha.call(this,a)}},t.prototype.showLoading=function(e,n){if(this._disposed){we(this.id);return}if(q(e)&&(n=e,e=""),e=e||"default",this.hideLoading(),!xh[e]){process.env.NODE_ENV!=="production"&&Xt("Loading effects "+e+" not exists.");return}var i=xh[e](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)},t.prototype.hideLoading=function(){if(this._disposed){we(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var n=B({},e);return n.type=Wa[e.type],n},t.prototype.dispatchAction=function(e,n){if(this._disposed){we(this.id);return}if(q(n)||(n={silent:!!n}),!!ol[e.type]&&this._model){if(this[Jt]){this._pendingActions.push(e);return}var i=n.silent;yh.call(this,e,i);var a=n.flush;a?this._zr.flush():a!==!1&&j.browser.weChat&&this._throttledZrFlush(),Va.call(this,i),Ha.call(this,i)}},t.prototype.updateLabelLayout=function(){$e.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){we(this.id);return}var n=e.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);process.env.NODE_ENV!=="production"&&it(e.data&&a),a.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=(function(){Ci=function(h){var c=h._scheduler;c.restorePipelines(h._model),c.prepareStageTasks(),ph(h,!0),ph(h,!1),c.plan()},ph=function(h,c){for(var v=h._model,d=h._scheduler,p=c?h._componentsViews:h._chartsViews,g=c?h._componentsMap:h._chartsMap,m=h._zr,y=h._api,_=0;_<p.length;_++)p[_].__alive=!1;c?v.eachComponent(function(S,x){S!=="series"&&w(x)}):v.eachSeries(w);function w(S){var x=S.__requireNewView;S.__requireNewView=!1;var T="_ec_"+S.id+"_"+S.type,M=!x&&g[T];if(!M){var A=je(S.type),C=c?Re.getClass(A.main,A.sub):_e.getClass(A.sub);process.env.NODE_ENV!=="production"&&it(C,A.sub+" does not exist."),M=new C,M.init(v,y),g[T]=M,p.push(M),m.add(M.group)}S.__viewId=M.__id=T,M.__alive=!0,M.__model=S,M.group.__ecComponentInfo={mainType:S.mainType,index:S.componentIndex},!c&&d.prepareView(M,S,v,y)}for(var _=0;_<p.length;){var b=p[_];b.__alive?_++:(!c&&b.renderTask.dispose(),m.remove(b.group),b.dispose(v,y),p.splice(_,1),g[b.__id]===b&&delete g[b.__id],b.__id=b.group.__ecComponentInfo=null)}},il=function(h,c,v,d,p){var g=h._model;if(g.setUpdatePayload(v),!d){D([].concat(h._componentsViews).concat(h._chartsViews),b);return}var m={};m[d+"Id"]=v[d+"Id"],m[d+"Index"]=v[d+"Index"],m[d+"Name"]=v[d+"Name"];var y={mainType:d,query:m};p&&(y.subType=p);var _=v.excludeSeriesId,w;_!=null&&(w=tt(),D(re(_),function(S){var x=Ke(S,null);x!=null&&w.set(x,!0)})),g&&g.eachComponent(y,function(S){var x=w&&w.get(S.id)!=null;if(!x)if(zp(v))if(S instanceof ke)v.type===_n&&!v.notBlur&&!S.get(["emphasis","disabled"])&&VC(S,v,h._api);else{var T=pf(S.mainType,S.componentIndex,v.name,h._api),M=T.focusSelf,A=T.dispatchers;v.type===_n&&M&&!v.notBlur&&df(S.mainType,S.componentIndex,h._api),A&&D(A,function(C){v.type===_n?ns(C):is(C)})}else gf(v)&&S instanceof ke&&(GC(S,v,h._api),Np(S),Oe(h))},h),g&&g.eachComponent(y,function(S){var x=w&&w.get(S.id)!=null;x||b(h[d==="series"?"_chartsMap":"_componentsMap"][S.__viewId])},h);function b(S){S&&S.__alive&&S[c]&&S[c](S.__model,g,h._api,v)}},Rr={prepareAndUpdate:function(h){Ci(this),Rr.update.call(this,h,{optionChanged:h.newOption!=null})},update:function(h,c){var v=this._model,d=this._api,p=this._zr,g=this._coordSysMgr,m=this._scheduler;if(v){v.setUpdatePayload(h),m.restoreData(v,h),m.performSeriesTasks(v),g.create(v,d),m.performDataProcessorTasks(v,h),mh(this,v),g.update(v,d),e(v),m.performVisualTasks(v,h),_h(this,v,d,h,c);var y=v.get("backgroundColor")||"transparent",_=v.get("darkMode");p.setBackgroundColor(y),_!=null&&_!=="auto"&&p.setDarkMode(_),$e.trigger("afterupdate",v,d)}},updateTransform:function(h){var c=this,v=this._model,d=this._api;if(v){v.setUpdatePayload(h);var p=[];v.eachComponent(function(m,y){if(m!=="series"){var _=c.getViewOfComponentModel(y);if(_&&_.__alive)if(_.updateTransform){var w=_.updateTransform(y,v,d,h);w&&w.update&&p.push(_)}else p.push(_)}});var g=tt();v.eachSeries(function(m){var y=c._chartsMap[m.__viewId];if(y.updateTransform){var _=y.updateTransform(m,v,d,h);_&&_.update&&g.set(m.uid,1)}else g.set(m.uid,1)}),e(v),this._scheduler.performVisualTasks(v,h,{setDirty:!0,dirtyMap:g}),al(this,v,d,h,{},g),$e.trigger("afterupdate",v,d)}},updateView:function(h){var c=this._model;c&&(c.setUpdatePayload(h),_e.markUpdateMethod(h,"updateView"),e(c),this._scheduler.performVisualTasks(c,h,{setDirty:!0}),_h(this,c,this._api,h,{}),$e.trigger("afterupdate",c,this._api))},updateVisual:function(h){var c=this,v=this._model;v&&(v.setUpdatePayload(h),v.eachSeries(function(d){d.getData().clearAllVisual()}),_e.markUpdateMethod(h,"updateVisual"),e(v),this._scheduler.performVisualTasks(v,h,{visualType:"visual",setDirty:!0}),v.eachComponent(function(d,p){if(d!=="series"){var g=c.getViewOfComponentModel(p);g&&g.__alive&&g.updateVisual(p,v,c._api,h)}}),v.eachSeries(function(d){var p=c._chartsMap[d.__viewId];p.updateVisual(d,v,c._api,h)}),$e.trigger("afterupdate",v,this._api))},updateLayout:function(h){Rr.update.call(this,h)}},gh=function(h,c,v,d){if(h._disposed){we(h.id);return}for(var p=h._model,g=h._coordSysMgr.getCoordinateSystems(),m,y=$u(p,v),_=0;_<g.length;_++){var w=g[_];if(w[c]&&(m=w[c](p,y,d))!=null)return m}process.env.NODE_ENV!=="production"&&Xt("No coordinate system that supports "+c+" found by the given finder.")},mh=function(h,c){var v=h._chartsMap,d=h._scheduler;c.eachSeries(function(p){d.updateStreamModes(p,v[p.__viewId])})},yh=function(h,c){var v=this,d=this.getModel(),p=h.type,g=h.escapeConnect,m=ol[p],y=m.actionInfo,_=(y.update||"update").split(":"),w=_.pop(),b=_[0]!=null&&je(_[0]);this[Jt]=!0;var S=[h],x=!1;h.batch&&(x=!0,S=X(h.batch,function(L){return L=gt(B({},L),h),L.batch=null,L}));var T=[],M,A=gf(h),C=zp(h);if(C&&Op(this._api),D(S,function(L){if(M=m.action(L,v._model,v._api),M=M||B({},L),M.type=y.event||M.type,T.push(M),C){var P=Uu(h),k=P.queryOptionMap,z=P.mainTypeSpecified,O=z?k.keys()[0]:"series";il(v,w,L,O),Oe(v)}else A?(il(v,w,L,"series"),Oe(v)):b&&il(v,w,L,b.main,b.sub)}),w!=="none"&&!C&&!A&&!b)try{this[pe]?(Ci(this),Rr.update.call(this,h),this[pe]=null):Rr[w].call(this,h)}catch(L){throw this[Jt]=!1,L}if(x?M={type:y.event||p,escapeConnect:g,batch:T}:M=T[0],this[Jt]=!1,!c){var I=this._messageCenter;if(I.trigger(M.type,M),A){var E={type:"selectchanged",escapeConnect:g,selected:$C(d),isFromClick:h.isFromClick||!1,fromAction:h.type,fromActionPayload:h};I.trigger(E.type,E)}}},Va=function(h){for(var c=this._pendingActions;c.length;){var v=c.shift();yh.call(this,v,h)}},Ha=function(h){!h&&this.trigger("updated")},Ty=function(h,c){h.on("rendered",function(v){c.trigger("rendered",v),h.animation.isFinished()&&!c[pe]&&!c._scheduler.unfinished&&!c._pendingActions.length&&c.trigger("finished")})},Dy=function(h,c){h.on("mouseover",function(v){var d=v.target,p=Fa(d,ui);p&&(HC(p,v,c._api),Oe(c))}).on("mouseout",function(v){var d=v.target,p=Fa(d,ui);p&&(WC(p,v,c._api),Oe(c))}).on("click",function(v){var d=v.target,p=Fa(d,function(y){return ht(y).dataIndex!=null},!0);if(p){var g=p.selected?"unselect":"select",m=ht(p);c._api.dispatchAction({type:g,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function e(h){h.clearColorPalette(),h.eachSeries(function(c){c.clearColorPalette()})}function n(h){var c=[],v=[],d=!1;if(h.eachComponent(function(y,_){var w=_.get("zlevel")||0,b=_.get("z")||0,S=_.getZLevelKey();d=d||!!S,(y==="series"?v:c).push({zlevel:w,z:b,idx:_.componentIndex,type:y,key:S})}),d){var p=c.concat(v),g,m;mo(p,function(y,_){return y.zlevel===_.zlevel?y.z-_.z:y.zlevel-_.zlevel}),D(p,function(y){var _=h.getComponent(y.type,y.idx),w=y.zlevel,b=y.key;g!=null&&(w=Math.max(g,w)),b?(w===g&&b!==m&&w++,m=b):m&&(w===g&&w++,m=""),g=w,_.setZLevel(w)})}}_h=function(h,c,v,d,p){n(c),My(h,c,v,d,p),D(h._chartsViews,function(g){g.__alive=!1}),al(h,c,v,d,p),D(h._chartsViews,function(g){g.__alive||g.remove(c,v)})},My=function(h,c,v,d,p,g){D(g||h._componentsViews,function(m){var y=m.__model;u(y,m),m.render(y,c,v,d),s(y,m),f(y,m)})},al=function(h,c,v,d,p,g){var m=h._scheduler;p=B(p||{},{updatedSeries:c.getSeries()}),$e.trigger("series:beforeupdate",c,v,p);var y=!1;c.eachSeries(function(_){var w=h._chartsMap[_.__viewId];w.__alive=!0;var b=w.renderTask;m.updatePayload(b,d),u(_,w),g&&g.get(_.uid)&&b.dirty(),b.perform(m.getPerformArgs(b))&&(y=!0),w.group.silent=!!_.get("silent"),o(_,w),Np(_)}),m.unfinished=y||m.unfinished,$e.trigger("series:layoutlabels",c,v,p),$e.trigger("series:transition",c,v,p),c.eachSeries(function(_){var w=h._chartsMap[_.__viewId];s(_,w),f(_,w)}),a(h,c),$e.trigger("series:afterupdate",c,v,p)},Oe=function(h){h[vh]=!0,h.getZr().wakeUp()},Ey=function(h){h[vh]&&(h.getZr().storage.traverse(function(c){ya(c)||i(c)}),h[vh]=!1)};function i(h){for(var c=[],v=h.currentStates,d=0;d<v.length;d++){var p=v[d];p==="emphasis"||p==="blur"||p==="select"||c.push(p)}h.selected&&h.states.select&&c.push("select"),h.hoverState===Jo&&h.states.emphasis?c.push("emphasis"):h.hoverState===Qo&&h.states.blur&&c.push("blur"),h.useStates(c)}function a(h,c){var v=h._zr,d=v.storage,p=0;d.traverse(function(g){g.isGroup||p++}),p>c.get("hoverLayerThreshold")&&!j.node&&!j.worker&&c.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=h._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(h,c){var v=h.get("blendMode")||null;c.eachRendered(function(d){d.isGroup||(d.style.blend=v)})}function s(h,c){if(!h.preventAutoZ){var v=h.get("z")||0,d=h.get("zlevel")||0;c.eachRendered(function(p){return l(p,v,d,-1/0),!0})}}function l(h,c,v,d){var p=h.getTextContent(),g=h.getTextGuideLine(),m=h.isGroup;if(m)for(var y=h.childrenRef(),_=0;_<y.length;_++)d=Math.max(l(y[_],c,v,d),d);else h.z=c,h.zlevel=v,d=Math.max(h.z2,d);if(p&&(p.z=c,p.zlevel=v,isFinite(d)&&(p.z2=d+2)),g){var w=h.textGuideLineConfig;g.z=c,g.zlevel=v,isFinite(d)&&(g.z2=d+(w&&w.showAbove?1:-1))}return d}function u(h,c){c.eachRendered(function(v){if(!ya(v)){var d=v.getTextContent(),p=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function f(h,c){var v=h.getModel("stateAnimation"),d=h.isAnimationEnabled(),p=v.get("duration"),g=p>0?{duration:p,delay:v.get("delay"),easing:v.get("easing")}:null;c.eachRendered(function(m){if(m.states&&m.states.emphasis){if(ya(m))return;if(m instanceof vt&&qC(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(d){m.stateTransition=g;var _=m.getTextContent(),w=m.getTextGuideLine();_&&(_.stateTransition=g),w&&(w.stateTransition=g)}m.__dirty&&i(m)}})}Ay=function(h){return new((function(c){N(v,c);function v(){return c!==null&&c.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return h._model.getComponent(p.mainType,p.index);d=d.parent}},v.prototype.enterEmphasis=function(d,p){ns(d,p),Oe(h)},v.prototype.leaveEmphasis=function(d,p){is(d,p),Oe(h)},v.prototype.enterBlur=function(d){zC(d),Oe(h)},v.prototype.leaveBlur=function(d){Lp(d),Oe(h)},v.prototype.enterSelect=function(d){Pp(d),Oe(h)},v.prototype.leaveSelect=function(d){kp(d),Oe(h)},v.prototype.getModel=function(){return h.getModel()},v.prototype.getViewOfComponentModel=function(d){return h.getViewOfComponentModel(d)},v.prototype.getViewOfSeriesModel=function(d){return h.getViewOfSeriesModel(d)},v})(Zg))(h)},Iy=function(h){function c(v,d){for(var p=0;p<v.length;p++){var g=v[p];g[dh]=d}}D(Wa,function(v,d){h._messageCenter.on(d,function(p){if(ky[h.group]&&h[dh]!==_y){if(p&&p.escapeConnect)return;var g=h.makeActionFromEvent(p),m=[];D(Ga,function(y){y!==h&&y.group===h.group&&m.push(y)}),c(m,_y),D(m,function(y){y[dh]!==WA&&y.dispatchAction(g)}),c(m,GA)}})})}})(),t})(ze),wh=Ly.prototype;wh.on=wy("on"),wh.off=wy("off"),wh.one=function(r,t,e){var n=this;He("ECharts#one is deprecated.");function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];t&&t.apply&&t.apply(this,a),n.off(r,i)}this.on.call(this,r,i,e)};var $A=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function we(r){process.env.NODE_ENV!=="production"&&Xt("Instance "+r+" has been disposed")}var ol={},Wa={},bh=[],Sh=[],sl=[],Py={},xh={},Ga={},ky={},UA=+new Date-0,Ch="_echarts_instance_";function YA(r,t,e){{if(process.env.NODE_ENV!=="production"&&!r)throw new Error("Initialize failed: invalid dom.");var n=ZA(r);if(n)return process.env.NODE_ENV!=="production"&&Xt("There is a chart instance already initialized on the dom."),n;process.env.NODE_ENV!=="production"&&Wn(r)&&r.nodeName.toUpperCase()!=="CANVAS"&&(!r.clientWidth&&!e||!r.clientHeight&&!e)&&Xt("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.")}var i=new Ly(r,t,e);return i.id="ec_"+UA++,Ga[i.id]=i,Zd(r,Ch,i.id),Iy(i),$e.trigger("afterinit",i),i}function ZA(r){return Ga[Ax(r,Ch)]}function Ry(r,t){Py[r]=t}function Oy(r){mt(Sh,r)<0&&Sh.push(r)}function Ny(r,t){Dh(bh,r,t,RA)}function XA(r){Th("afterinit",r)}function qA(r){Th("afterupdate",r)}function Th(r,t){$e.on(r,t)}function In(r,t,e){Q(t)&&(e=t,t="");var n=q(r)?r.type:[r,r={event:t}][0];r.event=(r.event||n).toLowerCase(),t=r.event,!Wa[t]&&(it(yy.test(n)&&yy.test(t)),ol[n]||(ol[n]={action:e,actionInfo:r}),Wa[t]=n)}function KA(r,t){Yf.register(r,t)}function jA(r,t){Dh(sl,r,t,py,"layout")}function En(r,t){Dh(sl,r,t,gy,"visual")}var By=[];function Dh(r,t,e,n,i){if((Q(t)||q(t))&&(e=t,t=n),process.env.NODE_ENV!=="production"){if(isNaN(t)||t==null)throw new Error("Illegal priority");D(r,function(o){it(o.__raw!==e)})}if(!(mt(By,e)>=0)){By.push(e);var a=Vm.wrapStageHandler(e,i);a.__prio=t,a.__raw=e,r.push(a)}}function Fy(r,t){xh[r]=t}function QA(r,t,e){var n=IA("registerMap");n&&n(r,t,e)}var JA=iM;En(ch,RM),En(nl,OM),En(nl,NM),En(ch,qM),En(nl,KM),En(my,MA),Oy(tm),Ny(PA,VD),Fy("default",BM),In({type:_n,event:_n,update:_n},ee),In({type:ts,event:ts,update:ts},ee),In({type:ca,event:ca,update:ca},ee),In({type:es,event:es,update:es},ee),In({type:va,event:va,update:va},ee),Ry("light",ZM),Ry("dark",Zm);function $a(r){return r==null?0:r.length||1}function zy(r){return r}var t2=(function(){function r(t,e,n,i,a,o){this._old=t,this._new=e,this._oldKeyGetter=n||zy,this._newKeyGetter=i||zy,this.context=a,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),a=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,a,"_newKeyGetter");for(var o=0;o<t.length;o++){var s=i[o],l=n[s],u=$a(l);if(u>1){var f=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(f,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=n[l],f=i[l],h=$a(u),c=$a(f);if(h>1&&c===1)this._updateManyToOne&&this._updateManyToOne(f,u),i[l]=null;else if(h===1&&c>1)this._updateOneToMany&&this._updateOneToMany(f,u),i[l]=null;else if(h===1&&c===1)this._update&&this._update(f,u),i[l]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(f,u),i[l]=null;else if(h>1)for(var v=0;v<h;v++)this._remove&&this._remove(u[v]);else this._remove&&this._remove(u)}this._performRestAdd(o,i)},r.prototype._performRestAdd=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],a=e[i],o=$a(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);e[i]=null}},r.prototype._initIndexMap=function(t,e,n,i){for(var a=this._diffModeMultiple,o=0;o<t.length;o++){var s="_ec_"+this[i](t[o],o);if(a||(n[o]=s),!!e){var l=e[s],u=$a(l);u===0?(e[s]=o,a&&n.push(s)):u===1?e[s]=[l,o]:l.push(o)}}},r})(),e2=(function(){function r(t,e){this._encode=t,this._schema=e}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r})();function r2(r,t){var e={},n=e.encode={},i=tt(),a=[],o=[],s={};D(r.dimensions,function(c){var v=r.getDimensionInfo(c),d=v.coordDim;if(d){process.env.NODE_ENV!=="production"&&it(Hf.get(d)==null);var p=v.coordDimIndex;Mh(n,d)[p]=c,v.isExtraCoord||(i.set(d,1),n2(v.type)&&(a[0]=c),Mh(s,d)[p]=r.getDimensionIndex(v.name)),v.defaultTooltip&&o.push(c)}Hf.each(function(g,m){var y=Mh(n,m),_=v.otherDims[m];_!=null&&_!==!1&&(y[_]=v.name)})});var l=[],u={};i.each(function(c,v){var d=n[v];u[v]=d[0],l=l.concat(d)}),e.dataDimsOnCoord=l,e.dataDimIndicesOnCoord=X(l,function(c){return r.getDimensionInfo(c).storeDimIndex}),e.encodeFirstDimNotExtra=u;var f=n.label;f&&f.length&&(a=f.slice());var h=n.tooltip;return h&&h.length?o=h.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,e.userOutput=new e2(s,t),e}function Mh(r,t){return r.hasOwnProperty(t)||(r[t]=[]),r[t]}function Ah(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function n2(r){return!(r==="ordinal"||r==="time")}var ll=(function(){function r(t){this.otherDims={},t!=null&&B(this,t)}return r})(),i2=Nt(),a2={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Vy=(function(){function r(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=Gy(this.source)))},r.prototype.getSourceDimensionIndex=function(t){return nt(this._dimNameMap.get(t),-1)},r.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},r.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=am(this.source),n=!$y(t),i="",a=[],o=0,s=0;o<t;o++){var l=void 0,u=void 0,f=void 0,h=this.dimensions[s];if(h&&h.storeDimIndex===o)l=e?h.name:null,u=h.type,f=h.ordinalMeta,s++;else{var c=this.getSourceDimension(o);c&&(l=e?c.name:null,u=c.type)}a.push({property:l,type:u,ordinalMeta:f}),e&&l!=null&&(!h||!h.isCalculationCoord)&&(i+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=a2[u]||"f",f&&(i+=f.uid),i+="$"}var v=this.source,d=[v.seriesLayoutBy,v.startIndex,i].join("$$");return{dimensions:a,hash:d}},r.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,n=0;e<this._fullDimCount;e++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===e)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(e);o&&(i=o.name)}t.push(i)}return t},r.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r})();function Hy(r){return r instanceof Vy}function Wy(r){for(var t=tt(),e=0;e<(r||[]).length;e++){var n=r[e],i=q(n)?n.name:n;i!=null&&t.get(i)==null&&t.set(i,e)}return t}function Gy(r){var t=i2(r);return t.dimNameMap||(t.dimNameMap=Wy(r.dimensionsDefine))}function $y(r){return r>30}var Ua=q,Or=X,o2=typeof Int32Array>"u"?Array:Int32Array,s2="e\0\0",Uy=-1,l2=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],u2=["_approximateExtent"],Yy,ul,Ya,Ti,Ih,Za,Eh,Zy=(function(){function r(t,e){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;Hy(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},f=0;f<n.length;f++){var h=n[f],c=G(h)?new ll({name:h}):h instanceof ll?h:new ll(h),v=c.name;c.type=c.type||"float",c.coordDim||(c.coordDim=v,c.coordDimIndex=0);var d=c.otherDims=c.otherDims||{};o.push(v),a[v]=c,u[v]!=null&&(l=!0),c.createInvertedIndices&&(s[v]=[]),d.itemName===0&&(this._nameDimIdx=f),d.itemId===0&&(this._idDimIdx=f),process.env.NODE_ENV!=="production"&&it(i||c.storeDimIndex>=0),i&&(c.storeDimIndex=f)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=e,this._invertedIndicesMap=s,this._dimOmitted){var p=this._dimIdxToName=tt();D(o,function(g){p.set(a[g].storeDimIndex,g)})}}return r.prototype.getDimension=function(t){var e=this._recognizeDimIndex(t);if(e==null)return t;if(e=t,!this._dimOmitted)return this.dimensions[e];var n=this._dimIdxToName.get(e);if(n!=null)return n;var i=this._schema.getSourceDimension(e);if(i)return i.name},r.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(e!=null)return e;if(t==null)return-1;var n=this._getDimInfo(t);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},r.prototype._recognizeDimIndex=function(t){if(xt(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},r.prototype._getStoreDimIndex=function(t){var e=this.getDimensionIndex(t);if(process.env.NODE_ENV!=="production"&&e==null)throw new Error("Unknown dimension "+t);return e},r.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},r.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(n){return e.hasOwnProperty(n)?e[n]:void 0}:function(n){return e[n]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(t,e){var n=this._dimSummary;if(e==null)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return i?i[e]:null},r.prototype.mapDimensionsAll=function(t){var e=this._dimSummary,n=e.encode[t];return(n||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(t,e,n){var i=this,a;if(t instanceof eh&&(a=t),!a){var o=this.dimensions,s=qf(t)||oe(t)?new lm(t,o.length):t;a=new eh;var l=Or(o,function(u){return{type:i._dimInfos[u].type,property:u}});a.initData(s,l,n)}this._store=a,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=r2(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},r.prototype.appendValues=function(t,e){var n=this._store.appendValues(t,e&&e.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var s=i;s<a;s++){var l=s-i;this._nameList[s]=e[l],o&&Eh(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,n=0;n<e.length;n++){var i=this._dimInfos[e[n]];i.ordinalMeta&&t.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==gr&&!t.fillStorage},r.prototype._doInit=function(t,e){if(!(t>=e)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Ee;if(l&&!i.pure)for(var u=[],f=t;f<e;f++){var h=i.getItem(f,u);if(!this.hasItemOption&&px(h)&&(this.hasItemOption=!0),h){var c=h.name;a[f]==null&&c!=null&&(a[f]=Ke(c,null));var v=h.id;o[f]==null&&v!=null&&(o[f]=Ke(v,null))}}if(this._shouldMakeIdFromName())for(var f=t;f<e;f++)Eh(this,f);Yy(this)}},r.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},r.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},r.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},r.prototype.setCalculationInfo=function(t,e){Ua(t)?B(this._calculationInfo,t):this._calculationInfo[t]=e},r.prototype.getName=function(t){var e=this.getRawIndex(t),n=this._nameList[e];return n==null&&this._nameDimIdx!=null&&(n=Ya(this,this._nameDimIdx,e)),n==null&&(n=""),n},r.prototype._getCategory=function(t,e){var n=this._store.get(t,e),i=this._store.getOrdinalMeta(t);return i?i.categories[n]:n},r.prototype.getId=function(t){return ul(this,this.getRawIndex(t))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(t,e){var n=this._store,i=this._dimInfos[t];if(i)return n.get(i.storeDimIndex,e)},r.prototype.getByRawIndex=function(t,e){var n=this._store,i=this._dimInfos[t];if(i)return n.getByRawIndex(i.storeDimIndex,e)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},r.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},r.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},r.prototype.getValues=function(t,e){var n=this,i=this._store;return W(t)?i.getValues(Or(t,function(a){return n._getStoreDimIndex(a)}),e):i.getValues(t)},r.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,n=0,i=e.length;n<i;n++)if(isNaN(this._store.get(e[n],t)))return!1;return!0},r.prototype.indexOfName=function(t){for(var e=0,n=this._store.count();e<n;e++)if(this.getName(e)===t)return e;return-1},r.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},r.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},r.prototype.rawIndexOf=function(t,e){var n=t&&this._invertedIndicesMap[t];if(process.env.NODE_ENV!=="production"&&!n)throw new Error("Do not supported yet");var i=n&&n[e];return i==null||isNaN(i)?Uy:i},r.prototype.indicesOfNearest=function(t,e,n){return this._store.indicesOfNearest(this._getStoreDimIndex(t),e,n)},r.prototype.each=function(t,e,n){Q(t)&&(n=e,e=t,t=[]);var i=n||this,a=Or(Ti(t),this._getStoreDimIndex,this);this._store.each(a,i?J(e,i):e)},r.prototype.filterSelf=function(t,e,n){Q(t)&&(n=e,e=t,t=[]);var i=n||this,a=Or(Ti(t),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?J(e,i):e),this},r.prototype.selectRange=function(t){var e=this,n={},i=Ct(t);return D(i,function(a){var o=e._getStoreDimIndex(a);n[o]=t[a]}),this._store=this._store.selectRange(n),this},r.prototype.mapArray=function(t,e,n){Q(t)&&(n=e,e=t,t=[]),n=n||this;var i=[];return this.each(t,function(){i.push(e&&e.apply(this,arguments))},n),i},r.prototype.map=function(t,e,n,i){var a=n||i||this,o=Or(Ti(t),this._getStoreDimIndex,this),s=Za(this);return s._store=this._store.map(o,a?J(e,a):e),s},r.prototype.modify=function(t,e,n,i){var a=this,o=n||i||this;process.env.NODE_ENV!=="production"&&D(Ti(t),function(l){var u=a.getDimensionInfo(l);u.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var s=Or(Ti(t),this._getStoreDimIndex,this);this._store.modify(s,o?J(e,o):e)},r.prototype.downSample=function(t,e,n,i){var a=Za(this);return a._store=this._store.downSample(this._getStoreDimIndex(t),e,n,i),a},r.prototype.minmaxDownSample=function(t,e){var n=Za(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),e),n},r.prototype.lttbDownSample=function(t,e){var n=Za(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),n},r.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},r.prototype.getItemModel=function(t){var e=this.hostModel,n=this.getRawDataItem(t);return new It(n,e,e&&e.ecModel)},r.prototype.diff=function(t){var e=this;return new t2(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(n){return ul(t,n)},function(n){return ul(e,n)})},r.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},r.prototype.setVisual=function(t,e){this._visual=this._visual||{},Ua(t)?B(this._visual,t):this._visual[t]=e},r.prototype.getItemVisual=function(t,e){var n=this._itemVisuals[t],i=n&&n[e];return i??this.getVisual(e)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[e];return a==null&&(a=this.getVisual(e),W(a)?a=a.slice():Ua(a)&&(a=B({},a)),i[e]=a),a},r.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,Ua(e)?B(i,e):i[e]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){Ua(t)?B(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?B(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;IC(n,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){D(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:Or(this.dimensions,this._getDimInfo,this),this.hostModel)),Ih(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var n=this[t];Q(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return e.apply(this,[i].concat(Kl(arguments)))})},r.internalField=(function(){Yy=function(t){var e=t._invertedIndicesMap;D(e,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=e[i]=new o2(o.categories.length);for(var l=0;l<n.length;l++)n[l]=Uy;for(var l=0;l<s.count();l++)n[s.get(a.storeDimIndex,l)]=l}})},Ya=function(t,e,n){return Ke(t._getCategory(e,n),null)},ul=function(t,e){var n=t._idList[e];return n==null&&t._idDimIdx!=null&&(n=Ya(t,t._idDimIdx,e)),n==null&&(n=s2+e),n},Ti=function(t){return W(t)||(t=t!=null?[t]:[]),t},Za=function(t){var e=new r(t._schema?t._schema:Or(t.dimensions,t._getDimInfo,t),t.hostModel);return Ih(e,t),e},Ih=function(t,e){D(l2.concat(e.__wrappedMethods||[]),function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t.__wrappedMethods=e.__wrappedMethods,D(u2,function(n){t[n]=ut(e[n])}),t._calculationInfo=B({},e._calculationInfo)},Eh=function(t,e){var n=t._nameList,i=t._idList,a=t._nameDimIdx,o=t._idDimIdx,s=n[e],l=i[e];if(s==null&&a!=null&&(n[e]=s=Ya(t,a,e)),l==null&&o!=null&&(i[e]=l=Ya(t,o,e)),l==null&&s!=null){var u=t._nameRepeatCount,f=u[s]=(u[s]||0)+1;l=s,f>1&&(l+="__ec__"+f),i[e]=l}}})(),r})();function Xy(r,t){qf(r)||(r=em(r)),t=t||{};var e=t.coordDimensions||[],n=t.dimensionsDefine||r.dimensionsDefine||[],i=tt(),a=[],o=h2(r,e,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&$y(o),l=n===r.dimensionsDefine,u=l?Gy(r):Wy(n),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(r,o));for(var h=tt(f),c=new mm(o),v=0;v<c.length;v++)c[v]=-1;function d(M){var A=c[M];if(A<0){var C=n[M],I=q(C)?C:{name:C},E=new ll,L=I.name;L!=null&&u.get(L)!=null&&(E.name=E.displayName=L),I.type!=null&&(E.type=I.type),I.displayName!=null&&(E.displayName=I.displayName);var P=a.length;return c[M]=P,E.storeDimIndex=M,a.push(E),E}return a[A]}if(!s)for(var v=0;v<o;v++)d(v);h.each(function(M,A){var C=re(M).slice();if(C.length===1&&!G(C[0])&&C[0]<0){h.set(A,!1);return}var I=h.set(A,[]);D(C,function(E,L){var P=G(E)?u.get(E):E;P!=null&&P<o&&(I[L]=P,g(d(P),A,L))})});var p=0;D(e,function(M){var A,C,I,E;if(G(M))A=M,E={};else{E=M,A=E.name;var L=E.ordinalMeta;E.ordinalMeta=null,E=B({},E),E.ordinalMeta=L,C=E.dimsDef,I=E.otherDims,E.name=E.coordDim=E.coordDimIndex=E.dimsDef=E.otherDims=null}var P=h.get(A);if(P!==!1){if(P=re(P),!P.length)for(var k=0;k<(C&&C.length||1);k++){for(;p<o&&d(p).coordDim!=null;)p++;p<o&&P.push(p++)}D(P,function(z,O){var V=d(z);if(l&&E.type!=null&&(V.type=E.type),g(gt(V,E),A,O),V.name==null&&C){var $=C[O];!q($)&&($={name:$}),V.name=V.displayName=$.name,V.defaultTooltip=$.defaultTooltip}I&&gt(V.otherDims,I)})}});function g(M,A,C){Hf.get(A)!=null?M.otherDims[A]=C:(M.coordDim=A,M.coordDimIndex=C,i.set(A,!0))}var m=t.generateCoord,y=t.generateCoordCount,_=y!=null;y=m?y||1:0;var w=m||"value";function b(M){M.name==null&&(M.name=M.coordDim)}if(s)D(a,function(M){b(M)}),a.sort(function(M,A){return M.storeDimIndex-A.storeDimIndex});else for(var S=0;S<o;S++){var x=d(S),T=x.coordDim;T==null&&(x.coordDim=c2(w,i,_),x.coordDimIndex=0,(!m||y<=0)&&(x.isExtraCoord=!0),y--),b(x),x.type==null&&(Vg(r,S)===ye.Must||x.isExtraCoord&&(x.otherDims.itemName!=null||x.otherDims.seriesName!=null))&&(x.type="ordinal")}return f2(a),new Vy({source:r,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function f2(r){for(var t=tt(),e=0;e<r.length;e++){var n=r[e],i=n.name,a=t.get(i)||0;a>0&&(n.name=i+(a-1)),a++,t.set(i,a)}}function h2(r,t,e,n){var i=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,n||0);return D(t,function(a){var o;q(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function c2(r,t,e){if(e||t.hasKey(r)){for(var n=0;t.hasKey(r+n);)n++;r+=n}return t.set(r,!0),r}var v2=(function(){function r(t){this.coordSysDims=[],this.axisMap=tt(),this.categoryAxisMap=tt(),this.coordSysName=t}return r})();function d2(r){var t=r.get("coordinateSystem"),e=new v2(t),n=p2[t];if(n)return n(r,e,e.axisMap,e.categoryAxisMap),e}var p2={cartesian2d:function(r,t,e,n){var i=r.getReferringComponents("xAxis",fe).models[0],a=r.getReferringComponents("yAxis",fe).models[0];if(process.env.NODE_ENV!=="production"){if(!i)throw new Error('xAxis "'+Qr(r.get("xAxisIndex"),r.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+Qr(r.get("xAxisIndex"),r.get("yAxisId"),0)+'" not found')}t.coordSysDims=["x","y"],e.set("x",i),e.set("y",a),Di(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),Di(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,n){var i=r.getReferringComponents("singleAxis",fe).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error("singleAxis should be specified.");t.coordSysDims=["single"],e.set("single",i),Di(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(r,t,e,n){var i=r.getReferringComponents("polar",fe).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");if(process.env.NODE_ENV!=="production"){if(!o)throw new Error("angleAxis option not found");if(!a)throw new Error("radiusAxis option not found")}t.coordSysDims=["radius","angle"],e.set("radius",a),e.set("angle",o),Di(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),Di(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,n){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,n){var i=r.ecModel,a=i.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();D(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),f=o[l];e.set(f,u),Di(u)&&(n.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function Di(r){return r.get("type")==="category"}function g2(r,t,e){e=e||{};var n=e.byIndex,i=e.stackedCoordDimension,a,o,s;m2(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,f,h,c;if(D(a,function(y,_){G(y)&&(a[_]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!f&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(f=y))}),f&&!n&&!u&&(n=!0),f){h="__\0ecstackresult_"+r.id,c="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=f.coordDim,d=f.type,p=0;D(a,function(y){y.coordDim===v&&p++});var g={name:h,coordDim:v,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:c,coordDim:c,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(c,d),m.storeDimIndex=s.ensureCalculationDimension(h,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(m)):(a.push(g),a.push(m))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:c,stackResultDimension:h}}function m2(r){return!Hy(r.schema)}function Mi(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function y2(r,t){return Mi(r,t)?r.getCalculationInfo("stackResultDimension"):t}function _2(r,t){var e=r.get("coordinateSystem"),n=Yf.get(e),i;return t&&t.coordSysDims&&(i=X(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=Ah(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function w2(r,t,e){var n,i;return e&&D(r,function(a,o){var s=a.coordDim,l=e.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(r[n].otherDims.itemName=0),n}function fl(r,t,e){e=e||{};var n=t.getSourceManager(),i,a=!1;i=n.getSource(),a=i.sourceFormat===Ee;var o=d2(t),s=_2(t,o),l=e.useEncodeDefaulter,u=Q(l)?l:l?At(Fg,s,t):null,f={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},h=Xy(i,f),c=w2(h.dimensions,e.createInvertedIndices,o),v=a?null:n.getSharedDataStore(h),d=g2(t,{schema:h,store:v}),p=new Zy(h,t);p.setCalculationInfo(d);var g=c!=null&&b2(i)?function(m,y,_,w){return w===c?_:this.defaultDimValueGetter(m,y,_,w)}:null;return p.hasItemOption=!1,p.initData(a?i:v,null,g),p}function b2(r){if(r.sourceFormat===Ee){var t=S2(r.data||[]);return!W(aa(t))}}function S2(r){for(var t=0;t<r.length&&r[t]==null;)t++;return r[t]}var ar=(function(){function r(t){this._setting=t||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(t){return this._setting[t]},r.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},r.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r})();$o(ar);var x2=0,Lh=(function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++x2}return r.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&X(n,C2);return new r({categories:i,needCollect:!i,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!G(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=this._getOrCreateMap();return e=i.get(t),e==null&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=tt(this.categories))},r})();function C2(r){return q(r)&&r.value!=null?r.value:r+""}function T2(r){var t=Math.pow(10,Vo(Math.abs(r))),e=Math.abs(r/t);return e===0||e===1||e===2||e===3||e===5}function Ph(r){return r.type==="interval"||r.type==="log"}function D2(r,t,e,n){var i={},a=r[1]-r[0],o=i.interval=Rd(a/t);e!=null&&o<e&&(o=i.interval=e),n!=null&&o>n&&(o=i.interval=n);var s=i.intervalPrecision=qy(o),l=i.niceTickExtent=[Ot(Math.ceil(r[0]/o)*o,s),Ot(Math.floor(r[1]/o)*o,s)];return M2(l,r),i}function kh(r){var t=Math.pow(10,Vo(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,Ot(e*t)}function qy(r){return fr(r)+2}function Ky(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function M2(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),Ky(r,0,t),Ky(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function hl(r,t){return r>=t[0]&&r<=t[1]}function cl(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function vl(r,t){return r*(t[1]-t[0])+t[0]}var Rh=(function(r){N(t,r);function t(e){var n=r.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new Lh({})),W(i)&&(i=new Lh({categories:X(i,function(a){return q(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return t.prototype.parse=function(e){return e==null?NaN:G(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),hl(e,this._extent)&&this._ordinalMeta.categories[e]!=null},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),cl(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(vl(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],n=this._extent,i=n[0];i<=n[1];)e.push({value:i}),i++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=e.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];i[o]=u,a[u]=o}for(var f=0;o<s;++o){for(;a[f]!=null;)f++;i.push(f),a[f]=o}},t.prototype._getTickNumber=function(e){var n=this._ticksByOrdinalNumber;return n&&e>=0&&e<n.length?n[e]:e},t.prototype.getRawOrdinalNumber=function(e){var n=this._ordinalNumbersByTick;return n&&e>=0&&e<n.length?n[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var n=this.getRawOrdinalNumber(e.value),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,n){this.unionExtent(e.getApproximateExtent(n))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t})(ar);ar.registerClass(Rh);var Ln=Ot,Ai=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return hl(e,this._extent)},t.prototype.normalize=function(e){return cl(e,this._extent)},t.prototype.scale=function(e){return vl(e,this._extent)},t.prototype.setExtent=function(e,n){var i=this._extent;isNaN(e)||(i[0]=parseFloat(e)),isNaN(n)||(i[1]=parseFloat(n))},t.prototype.unionExtent=function(e){var n=this._extent;e[0]<n[0]&&(n[0]=e[0]),e[1]>n[1]&&(n[1]=e[1]),this.setExtent(n[0],n[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=qy(e)},t.prototype.getTicks=function(e){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;i[0]<a[0]&&(e?s.push({value:Ln(a[0]-n,o)}):s.push({value:i[0]}));for(var u=a[0];u<=a[1]&&(s.push({value:u}),u=Ln(u+n,o),u!==s[s.length-1].value);)if(s.length>l)return[];var f=s.length?s[s.length-1].value:a[1];return i[1]>f&&(e?s.push({value:Ln(f+n,o)}):s.push({value:i[1]})),s},t.prototype.getMinorTicks=function(e){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;o<n.length;o++){for(var s=n[o],l=n[o-1],u=0,f=[],h=s.value-l.value,c=h/e;u<e-1;){var v=Ln(l.value+(u+1)*c);v>a[0]&&v<a[1]&&f.push(v),u++}i.push(f)}return i},t.prototype.getLabel=function(e,n){if(e==null)return"";var i=n&&n.precision;i==null?i=fr(e.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=Ln(e.value,i,!0);return Eg(a)},t.prototype.calcNiceTicks=function(e,n,i){e=e||5;var a=this._extent,o=a[1]-a[0];if(isFinite(o)){o<0&&(o=-o,a.reverse());var s=D2(a,e,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var n=this._extent;if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);e.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;var a=n[1]-n[0];isFinite(a)||(n[0]=0,n[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var o=this._interval;e.fixMin||(n[0]=Ln(Math.floor(n[0]/o)*o)),e.fixMax||(n[1]=Ln(Math.ceil(n[1]/o)*o))},t.prototype.setNiceExtent=function(e,n){this._niceExtent=[e,n]},t.type="interval",t})(ar);ar.registerClass(Ai);var jy=typeof Float32Array<"u",A2=jy?Float32Array:Array;function or(r){return W(r)?jy?new Float32Array(r):r:new A2(r)}var I2="__ec_stack_";function Qy(r){return r.get("stack")||I2+r.seriesIndex}function Oh(r){return r.dim+r.index}function Jy(r,t){var e=[];return t.eachSeriesByType(r,function(n){e0(n)&&e.push(n)}),e}function E2(r){var t={};D(r,function(l){var u=l.coordinateSystem,f=u.getBaseAxis();if(!(f.type!=="time"&&f.type!=="value"))for(var h=l.getData(),c=f.dim+"_"+f.index,v=h.getDimensionIndex(h.mapDimension(f.dim)),d=h.getStore(),p=0,g=d.count();p<g;++p){var m=d.get(v,p);t[c]?t[c].push(m):t[c]=[m]}});var e={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(i){i.sort(function(l,u){return l-u});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}e[n]=a}}return e}function t0(r){var t=E2(r),e=[];return D(r,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],f=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),c=Math.abs(h[1]-h[0]);s=u?f/c*u:f}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=Rt(n.get("barWidth"),s),p=Rt(n.get("barMaxWidth"),s),g=Rt(n.get("barMinWidth")||(r0(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap");e.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:m,barCategoryGap:y,axisKey:Oh(a),stackId:Qy(n)})}),L2(e)}function L2(r){var t={};D(r,function(n,i){var a=n.axisKey,o=n.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=n.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var h=n.barMaxWidth;h&&(l[u].maxWidth=h);var c=n.barMinWidth;c&&(l[u].minWidth=c);var v=n.barGap;v!=null&&(s.gap=v);var d=n.barCategoryGap;d!=null&&(s.categoryGap=d)});var e={};return D(t,function(n,i){e[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=Ct(a).length;s=Math.max(35-l*4,15)+"%"}var u=Rt(s,o),f=Rt(n.gap,1),h=n.remainedWidth,c=n.autoWidthCount,v=(h-u)/(c+(c-1)*f);v=Math.max(v,0),D(a,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var w=m.width;y&&(w=Math.min(w,y)),_&&(w=Math.max(w,_)),m.width=w,h-=w+f*w,c--}else{var w=v;y&&y<w&&(w=Math.min(y,h)),_&&_>w&&(w=_),w!==v&&(m.width=w,h-=w+f*w,c--)}}),v=(h-u)/(c+(c-1)*f),v=Math.max(v,0);var d=0,p;D(a,function(m,y){m.width||(m.width=v),p=m,d+=m.width*(1+f)}),p&&(d-=p.width*f);var g=-d/2;D(a,function(m,y){e[i][y]=e[i][y]||{bandWidth:o,offset:g,width:m.width},g+=m.width*(1+f)})}),e}function P2(r,t,e){if(r&&t){var n=r[Oh(t)];return n}}function k2(r,t){var e=Jy(r,t),n=t0(e);D(e,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=Qy(i),u=n[Oh(s)][l],f=u.offset,h=u.width;a.setLayout({bandWidth:u.bandWidth,offset:f,size:h})})}function R2(r){return{seriesType:r,plan:Oa(),reset:function(t){if(e0(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=e.getDimensionIndex(e.mapDimension(a.dim)),s=e.getDimensionIndex(e.mapDimension(i.dim)),l=t.get("showBackground",!0),u=e.mapDimension(a.dim),f=e.getCalculationInfo("stackResultDimension"),h=Mi(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),c=a.isHorizontal(),v=O2(i,a),d=r0(t),p=t.get("barMinHeight")||0,g=f&&e.getDimensionIndex(f),m=e.getLayout("size"),y=e.getLayout("offset");return{progress:function(_,w){for(var b=_.count,S=d&&or(b*3),x=d&&l&&or(b*3),T=d&&or(b),M=n.master.getRect(),A=c?M.width:M.height,C,I=w.getStore(),E=0;(C=_.next())!=null;){var L=I.get(h?g:o,C),P=I.get(s,C),k=v,z=void 0;h&&(z=+L-I.get(o,C));var O=void 0,V=void 0,$=void 0,Z=void 0;if(c){var et=n.dataToPoint([L,P]);if(h){var at=n.dataToPoint([z,P]);k=at[0]}O=k,V=et[1]+y,$=et[0]-k,Z=m,Math.abs($)<p&&($=($<0?-1:1)*p)}else{var et=n.dataToPoint([P,L]);if(h){var at=n.dataToPoint([P,z]);k=at[1]}O=et[0]+y,V=k,$=m,Z=et[1]-k,Math.abs(Z)<p&&(Z=(Z<=0?-1:1)*p)}d?(S[E]=O,S[E+1]=V,S[E+2]=c?$:Z,x&&(x[E]=c?M.x:O,x[E+1]=c?V:M.y,x[E+2]=A),T[C]=C):w.setItemLayout(C,{x:O,y:V,width:$,height:Z}),E+=3}d&&w.setLayout({largePoints:S,largeDataIndices:T,largeBackgroundPoints:x,valueAxisHorizontal:c})}}}}}}function e0(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function r0(r){return r.pipelineContext&&r.pipelineContext.large}function O2(r,t){var e=t.model.get("startValue");return e||(e=0),t.toGlobalCoord(t.dataToCoord(t.type==="log"?e>0?e:1:e))}var N2=function(r,t,e,n){for(;e<n;){var i=e+n>>>1;r[i][1]<t?e=i+1:n=i}return e},n0=(function(r){N(t,r);function t(e){var n=r.call(this,e)||this;return n.type="time",n}return t.prototype.getLabel=function(e){var n=this.getSetting("useUTC");return Ls(e.value,wg[iD(di(this._minLevelUnit))]||wg.second,n,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return aD(e,n,i,o,a)},t.prototype.getTicks=function(){var e=this._interval,n=this._extent,i=[];if(!e)return i;i.push({value:n[0],level:0});var a=this.getSetting("useUTC"),o=G2(this._minLevelUnit,this._approxInterval,a,n);return i=i.concat(o),i.push({value:n[1],level:0}),i},t.prototype.calcNiceExtent=function(e){var n=this._extent;if(n[0]===n[1]&&(n[0]-=Ie,n[1]+=Ie),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-Ie}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,n,i){e=e||10;var a=this._extent,o=a[1]-a[0];this._approxInterval=o/e,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var s=dl.length,l=Math.min(N2(dl,this._approxInterval,0,s),s-1);this._interval=dl[l][1],this._minLevelUnit=dl[Math.max(l-1,0)][0]},t.prototype.parse=function(e){return xt(e)?e:+hr(e)},t.prototype.contain=function(e){return hl(this.parse(e),this._extent)},t.prototype.normalize=function(e){return cl(this.parse(e),this._extent)},t.prototype.scale=function(e){return vl(e,this._extent)},t.type="time",t})(Ai),dl=[["second",Rf],["minute",Of],["hour",Sa],["quarter-day",Sa*6],["half-day",Sa*12],["day",Ie*1.2],["half-week",Ie*3.5],["week",Ie*7],["month",Ie*31],["quarter",Ie*95],["half-year",_g/2],["year",_g]];function B2(r,t,e,n){var i=hr(t),a=hr(e),o=function(d){return xg(i,d,n)===xg(a,d,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},f=function(){return u()&&o("hour")},h=function(){return f()&&o("minute")},c=function(){return h()&&o("second")},v=function(){return c()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return f();case"minute":return h();case"second":return c();case"millisecond":return v()}}function F2(r,t){return r/=Ie,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function z2(r){var t=30*Ie;return r/=t,r>6?6:r>3?3:r>2?2:1}function V2(r){return r/=Sa,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function i0(r,t){return r/=t?Of:Rf,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function H2(r){return Rd(r)}function W2(r,t,e){var n=new Date(r);switch(di(t)){case"year":case"month":n[Cg(e)](0);case"day":n[Tg(e)](1);case"hour":n[Dg(e)](0);case"minute":n[Mg(e)](0);case"second":n[Ag(e)](0),n[Ig(e)](0)}return n.getTime()}function G2(r,t,e,n){var i=1e4,a=bg,o=0;function s(A,C,I,E,L,P,k){for(var z=new Date(C),O=C,V=z[E]();O<I&&O<=n[1];)k.push({value:O}),V+=A,z[L](V),O=z.getTime();k.push({value:O,notAdd:!0})}function l(A,C,I){var E=[],L=!C.length;if(!B2(di(A),n[0],n[1],e)){L&&(C=[{value:W2(new Date(n[0]),A,e)},{value:n[1]}]);for(var P=0;P<C.length-1;P++){var k=C[P].value,z=C[P+1].value;if(k!==z){var O=void 0,V=void 0,$=void 0,Z=!1;switch(A){case"year":O=Math.max(1,Math.round(t/Ie/365)),V=Bf(e),$=oD(e);break;case"half-year":case"quarter":case"month":O=z2(t),V=pi(e),$=Cg(e);break;case"week":case"half-week":case"day":O=F2(t),V=Ps(e),$=Tg(e),Z=!0;break;case"half-day":case"quarter-day":case"hour":O=V2(t),V=Ca(e),$=Dg(e);break;case"minute":O=i0(t,!0),V=ks(e),$=Mg(e);break;case"second":O=i0(t,!1),V=Rs(e),$=Ag(e);break;case"millisecond":O=H2(t),V=Os(e),$=Ig(e);break}s(O,k,z,V,$,Z,E),A==="year"&&I.length>1&&P===0&&I.unshift({value:I[0].value-O})}}for(var P=0;P<E.length;P++)I.push(E[P]);return E}}for(var u=[],f=[],h=0,c=0,v=0;v<a.length&&o++<i;++v){var d=di(a[v]);if(nD(a[v])){l(a[v],u[u.length-1]||[],f);var p=a[v+1]?di(a[v+1]):null;if(d!==p){if(f.length){c=h,f.sort(function(A,C){return A.value-C.value});for(var g=[],m=0;m<f.length;++m){var y=f[m].value;(m===0||f[m-1].value!==y)&&(g.push(f[m]),y>=n[0]&&y<=n[1]&&h++)}var _=(n[1]-n[0])/t;if(h>_*1.5&&c>_/1.5||(u.push(g),h>_||r===a[v]))break}f=[]}}}process.env.NODE_ENV!=="production"&&o>=i&&Xt("Exceed safe limit.");for(var w=Gt(X(u,function(A){return Gt(A,function(C){return C.value>=n[0]&&C.value<=n[1]&&!C.notAdd})}),function(A){return A.length>0}),b=[],S=w.length-1,v=0;v<w.length;++v)for(var x=w[v],T=0;T<x.length;++T)b.push({value:x[T].value,level:S-v});b.sort(function(A,C){return A.value-C.value});for(var M=[],v=0;v<b.length;++v)(v===0||b[v].value!==b[v-1].value)&&M.push(b[v]);return M}ar.registerClass(n0);var a0=ar.prototype,Xa=Ai.prototype,$2=Ot,U2=Math.floor,Y2=Math.ceil,pl=Math.pow,Ue=Math.log,Nh=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new Ai,e._interval=0,e}return t.prototype.getTicks=function(e){var n=this._originalScale,i=this._extent,a=n.getExtent(),o=Xa.getTicks.call(this,e);return X(o,function(s){var l=s.value,u=Ot(pl(this.base,l));return u=l===i[0]&&this._fixMin?gl(u,a[0]):u,u=l===i[1]&&this._fixMax?gl(u,a[1]):u,{value:u}},this)},t.prototype.setExtent=function(e,n){var i=Ue(this.base);e=Ue(Math.max(0,e))/i,n=Ue(Math.max(0,n))/i,Xa.setExtent.call(this,e,n)},t.prototype.getExtent=function(){var e=this.base,n=a0.getExtent.call(this);n[0]=pl(e,n[0]),n[1]=pl(e,n[1]);var i=this._originalScale,a=i.getExtent();return this._fixMin&&(n[0]=gl(n[0],a[0])),this._fixMax&&(n[1]=gl(n[1],a[1])),n},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var n=this.base;e[0]=Ue(e[0])/Ue(n),e[1]=Ue(e[1])/Ue(n),a0.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,n){this.unionExtent(e.getApproximateExtent(n))},t.prototype.calcNiceTicks=function(e){e=e||10;var n=this._extent,i=n[1]-n[0];if(!(i===1/0||i<=0)){var a=fx(i),o=e/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[Ot(Y2(n[0]/a)*a),Ot(U2(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){Xa.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return e=Ue(e)/Ue(this.base),hl(e,this._extent)},t.prototype.normalize=function(e){return e=Ue(e)/Ue(this.base),cl(e,this._extent)},t.prototype.scale=function(e){return e=vl(e,this._extent),pl(this.base,e)},t.type="log",t})(ar),o0=Nh.prototype;o0.getMinorTicks=Xa.getMinorTicks,o0.getLabel=Xa.getLabel;function gl(r,t){return $2(r,fr(t))}ar.registerClass(Nh);var Z2=(function(){function r(t,e,n){this._prepareParams(t,e,n)}return r.prototype._prepareParams=function(t,e,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=t.type==="ordinal";this._needCrossZero=t.type==="interval"&&e.getNeedCrossZero&&e.getNeedCrossZero();var a=e.get("min",!0);a==null&&(a=e.get("startValue",!0));var o=this._modelMinRaw=a;Q(o)?this._modelMinNum=ml(t,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=ml(t,o));var s=this._modelMaxRaw=e.get("max",!0);if(Q(s)?this._modelMaxNum=ml(t,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=ml(t,s)),i)this._axisDataLen=e.getCategories().length;else{var l=e.get("boundaryGap"),u=W(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?(process.env.NODE_ENV!=="production"&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[Dr(u[0],1),Dr(u[1],1)]}},r.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=t?null:n-e||Math.abs(e),s=this._modelMinRaw==="dataMin"?e:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,f=l!=null;s==null&&(s=t?i?0:NaN:e-a[0]*o),l==null&&(l=t?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var h=Gi(s)||Gi(l)||t&&!i;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var c=this._determinedMin,v=this._determinedMax;return c!=null&&(s=c,u=!0),v!=null&&(l=v,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:h}},r.prototype.modifyDataMinMax=function(t,e){process.env.NODE_ENV!=="production"&&it(!this.frozen),this[q2[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var n=X2[t];process.env.NODE_ENV!=="production"&&it(!this.frozen&&this[n]==null),this[n]=e},r.prototype.freeze=function(){this.frozen=!0},r})(),X2={min:"_determinedMin",max:"_determinedMax"},q2={min:"_dataMin",max:"_dataMax"};function s0(r,t,e){var n=r.rawExtentInfo;return n||(n=new Z2(r,t,e),r.rawExtentInfo=n,n)}function ml(r,t){return t==null?null:Gi(t)?NaN:r.parse(t)}function l0(r,t){var e=r.type,n=s0(r,t,r.getExtent()).calculate();r.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&e==="time"){var s=Jy("bar",o),l=!1;if(D(s,function(h){l=l||h.getBaseAxis()===t.axis}),l){var u=t0(s),f=K2(i,a,t,u);i=f.min,a=f.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function K2(r,t,e,n){var i=e.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=P2(n,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;D(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;D(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=t-r,h=1-(s+l)/a,c=f/h-f;return t+=c*(l/u),r-=c*(s/u),{min:r,max:t}}function u0(r,t){var e=t,n=l0(r,e),i=n.extent,a=e.get("splitNumber");r instanceof Nh&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setExtent(i[0],i[1]),r.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function j2(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new Rh({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new n0({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(ar.getClass(t)||Ai)}}function Q2(r){var t=r.scale.getExtent(),e=t[0],n=t[1];return!(e>0&&n>0||e<0&&n<0)}function Ii(r){var t=r.getLabelModel().get("formatter"),e=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?(function(n){return function(i,a){return r.scale.getFormattedLabel(i,a,n)}})(t):G(t)?(function(n){return function(i){var a=r.scale.getLabel(i),o=n.replace("{value}",a??"");return o}})(t):Q(t)?(function(n){return function(i,a){return e!=null&&(a=i.value-e),n(Bh(r,i),a,i.level!=null?{level:i.level}:null)}})(t):function(n){return r.scale.getLabel(n)}}function Bh(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function J2(r){var t=r.model,e=r.scale;if(!(!t.get(["axisLabel","show"])||e.isBlank())){var n,i,a=e.getExtent();e instanceof Rh?i=e.count():(n=e.getTicks(),i=n.length);var o=r.getLabelModel(),s=Ii(r),l,u=1;i>40&&(u=Math.ceil(i/40));for(var f=0;f<i;f+=u){var h=n?n[f]:{value:a[0]+f},c=s(h,f),v=o.getTextRect(c),d=tI(v,o.get("rotate")||0);l?l.union(d):l=d}return l}}function tI(r,t){var e=t*Math.PI/180,n=r.width,i=r.height,a=n*Math.abs(Math.cos(e))+Math.abs(i*Math.sin(e)),o=n*Math.abs(Math.sin(e))+Math.abs(i*Math.cos(e)),s=new pt(r.x,r.y,a,o);return s}function Fh(r){var t=r.get("interval");return t??"auto"}function f0(r){return r.type==="category"&&Fh(r.getLabelModel())===0}function h0(r,t){var e={};return D(r.mapDimensionsAll(t),function(n){e[y2(r,n)]=!0}),Ct(e)}function eI(r,t,e){t&&D(h0(t,e),function(n){var i=t.getApproximateExtent(n);i[0]<r[0]&&(r[0]=i[0]),i[1]>r[1]&&(r[1]=i[1])})}var rI=(function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r})(),c0=[],nI={registerPreprocessor:Oy,registerProcessor:Ny,registerPostInit:XA,registerPostUpdate:qA,registerUpdateLifecycle:Th,registerAction:In,registerCoordinateSystem:KA,registerLayout:jA,registerVisual:En,registerTransform:JA,registerLoading:Fy,registerMap:QA,registerImpl:AA,PRIORITY:HA,ComponentModel:dt,ComponentView:Re,SeriesModel:ke,ChartView:_e,registerComponentModel:function(r){dt.registerClass(r)},registerComponentView:function(r){Re.registerClass(r)},registerSeriesModel:function(r){ke.registerClass(r)},registerChartView:function(r){_e.registerClass(r)},registerSubTypeDefaulter:function(r,t){dt.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){ox(r,t)}};function Ye(r){if(W(r)){D(r,function(t){Ye(t)});return}mt(c0,r)>=0||(c0.push(r),Q(r)&&(r={install:r}),r.install(nI))}var qa=Nt();function v0(r,t){var e=X(t,function(n){return r.scale.parse(n)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function iI(r){var t=r.getLabelModel().get("customValues");if(t){var e=Ii(r),n=r.scale.getExtent(),i=v0(r,t),a=Gt(i,function(o){return o>=n[0]&&o<=n[1]});return{labels:X(a,function(o){var s={value:o};return{formattedLabel:e(s),rawLabel:r.scale.getLabel(s),tickValue:o}})}}return r.type==="category"?oI(r):lI(r)}function aI(r,t){var e=r.getTickModel().get("customValues");if(e){var n=r.scale.getExtent(),i=v0(r,e);return{ticks:Gt(i,function(a){return a>=n[0]&&a<=n[1]})}}return r.type==="category"?sI(r,t):{ticks:X(r.scale.getTicks(),function(a){return a.value})}}function oI(r){var t=r.getLabelModel(),e=d0(r,t);return!t.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:e.labelCategoryInterval}:e}function d0(r,t){var e=p0(r,"labels"),n=Fh(t),i=g0(e,n);if(i)return i;var a,o;return Q(n)?a=_0(r,n):(o=n==="auto"?uI(r):n,a=y0(r,o)),m0(e,n,{labels:a,labelCategoryInterval:o})}function sI(r,t){var e=p0(r,"ticks"),n=Fh(t),i=g0(e,n);if(i)return i;var a,o;if((!t.get("show")||r.scale.isBlank())&&(a=[]),Q(n))a=_0(r,n,!0);else if(n==="auto"){var s=d0(r,r.getLabelModel());o=s.labelCategoryInterval,a=X(s.labels,function(l){return l.tickValue})}else o=n,a=y0(r,o,!0);return m0(e,n,{ticks:a,tickCategoryInterval:o})}function lI(r){var t=r.scale.getTicks(),e=Ii(r);return{labels:X(t,function(n,i){return{level:n.level,formattedLabel:e(n,i),rawLabel:r.scale.getLabel(n),tickValue:n.value}})}}function p0(r,t){return qa(r)[t]||(qa(r)[t]=[])}function g0(r,t){for(var e=0;e<r.length;e++)if(r[e].key===t)return r[e].value}function m0(r,t,e){return r.push({key:t,value:e}),e}function uI(r){var t=qa(r).autoInterval;return t??(qa(r).autoInterval=r.calculateCategoryInterval())}function fI(r){var t=hI(r),e=Ii(r),n=(t.axisRotate-t.labelRotate)/180*Math.PI,i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),f=Math.abs(u*Math.cos(n)),h=Math.abs(u*Math.sin(n)),c=0,v=0;l<=a[1];l+=s){var d=0,p=0,g=Nu(e({value:l}),t.font,"center","top");d=g.width*1.3,p=g.height*1.3,c=Math.max(c,d,7),v=Math.max(v,p,7)}var m=c/f,y=v/h;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),w=qa(r.model),b=r.getExtent(),S=w.lastAutoInterval,x=w.lastTickCount;return S!=null&&x!=null&&Math.abs(S-_)<=1&&Math.abs(x-o)<=1&&S>_&&w.axisExtent0===b[0]&&w.axisExtent1===b[1]?_=S:(w.lastTickCount=o,w.lastAutoInterval=_,w.axisExtent0=b[0],w.axisExtent1=b[1]),_}function hI(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function y0(r,t,e){var n=Ii(r),i=r.scale,a=i.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],f=i.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=f0(r),c=o.get("showMinLabel")||h,v=o.get("showMaxLabel")||h;c&&u!==a[0]&&p(a[0]);for(var d=u;d<=a[1];d+=l)p(d);v&&d-l!==a[1]&&p(a[1]);function p(g){var m={value:g};s.push(e?g:{formattedLabel:n(m),rawLabel:i.getLabel(m),tickValue:g})}return s}function _0(r,t,e){var n=r.scale,i=Ii(r),a=[];return D(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&a.push(e?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),a}var w0=[0,1],cI=(function(){function r(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return r.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},r.prototype.containData=function(t){return this.scale.contain(t)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return Pd(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},r.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&i.type==="ordinal"&&(n=n.slice(),b0(n,i.count())),Zt(t,w0,n,e)},r.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),b0(n,i.count()));var a=Zt(t,n,w0,e);return this.scale.scale(a)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=aI(this,e),i=n.ticks,a=X(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return vI(this,a,o,t.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var n=this.scale.getMinorTicks(e),i=X(n,function(a){return X(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},r.prototype.getViewLabels=function(){return iI(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},r.prototype.calculateCategoryInterval=function(){return fI(this)},r})();function b0(r,t){var e=r[1]-r[0],n=t,i=e/n/2;r[0]+=i,r[1]-=i}function vI(r,t,e,n){var i=t.length;if(!r.onBand||e||!i)return;var a=r.getExtent(),o,s;if(i===1)t[0].coord=a[0],o=t[1]={coord:a[1],tickValue:t[0].tickValue};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;D(t,function(v){v.coord-=u/2});var f=r.scale.getExtent();s=1+f[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*s,tickValue:f[1]+1},t.push(o)}var h=a[0]>a[1];c(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&c(a[0],t[0].coord)&&t.unshift({coord:a[0]}),c(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&c(o.coord,a[1])&&t.push({coord:a[1]});function c(v,d){return v=Ot(v),d=Ot(d),h?v>d:v<d}}function dI(r){for(var t=[],e=0;e<r.length;e++){var n=r[e];if(!n.defaultAttr.ignore){var i=n.label,a=i.getComputedTransform(),o=i.getBoundingRect(),s=!a||a[1]<1e-5&&a[2]<1e-5,l=i.style.margin||0,u=o.clone();u.applyTransform(a),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var f=s?new gs(o,a):null;t.push({label:i,labelLine:n.labelLine,rect:u,localRect:o,obb:f,priority:n.priority,defaultAttr:n.defaultAttr,layoutOption:n.computedLayoutOption,axisAligned:s,transform:a})}}return t}function pI(r){var t=[];r.sort(function(p,g){return g.priority-p.priority});var e=new pt(0,0,0,0);function n(p){if(!p.ignore){var g=p.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}p.ignore=!0}for(var i=0;i<r.length;i++){var a=r[i],o=a.axisAligned,s=a.localRect,l=a.transform,u=a.label,f=a.labelLine;e.copy(a.rect),e.width-=.1,e.height-=.1,e.x+=.05,e.y+=.05;for(var h=a.obb,c=!1,v=0;v<t.length;v++){var d=t[v];if(e.intersect(d.rect)){if(o&&d.axisAligned){c=!0;break}if(d.obb||(d.obb=new gs(d.localRect,d.transform)),h||(h=new gs(s,l)),h.intersect(d.obb)){c=!0;break}}}c?(n(u),f&&n(f)):(u.attr("ignore",a.defaultAttr.ignore),f&&f.attr("ignore",a.defaultAttr.labelGuideIgnore),t.push(a))}}var gI=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e){if(process.env.NODE_ENV!=="production"){var n=e.coordinateSystem;if(n!=="polar"&&n!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return fl(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var n=new kt,i=_r("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);n.add(i),i.setStyle(e.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=e.itemHeight*.8,u=_r(s,(e.itemWidth-l)/2,(e.itemHeight-l)/2,l,l,e.itemStyle.fill);n.add(u),u.setStyle(e.itemStyle);var f=e.iconRotate==="inherit"?o:e.iconRotate||0;return u.rotation=f*Math.PI/180,u.setOrigin([e.itemWidth/2,e.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t})(ke);function zh(r,t){var e=r.mapDimensionsAll("defaultedLabel"),n=e.length;if(n===1){var i=wi(r,t,e[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<e.length;o++)a.push(wi(r,t,e[o]));return a.join(" ")}}function S0(r,t){var e=r.mapDimensionsAll("defaultedLabel");if(!W(t))return t+"";for(var n=[],i=0;i<e.length;i++){var a=r.getDimensionIndex(e[i]);a>=0&&n.push(t[a])}return n.join(" ")}var Vh=(function(r){N(t,r);function t(e,n,i,a){var o=r.call(this)||this;return o.updateData(e,n,i,a),o}return t.prototype._createSymbol=function(e,n,i,a,o){this.removeAll();var s=_r(e,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=mI,this._symbolType=e,this.add(s)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){ns(this.childAt(0))},t.prototype.downplay=function(){is(this.childAt(0))},t.prototype.setZ=function(e,n){var i=this.childAt(0);i.zlevel=e,i.z=n},t.prototype.setDraggable=function(e,n){var i=this.childAt(0);i.draggable=e,i.cursor=!n&&e?"move":i.cursor},t.prototype.updateData=function(e,n,i,a){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,n),u=o!==this._symbolType,f=a&&a.disableAnimation;if(u){var h=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,l,h)}else{var c=this.childAt(0);c.silent=!1;var v={scaleX:l[0]/2,scaleY:l[1]/2};f?c.attr(v):ce(c,v,s,n),Tf(c)}if(this._updateCommon(e,n,l,i,a),u){var c=this.childAt(0);if(!f){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:c.style.opacity}};c.scaleX=c.scaleY=0,c.style.opacity=0,nr(c,v,s,n)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,n,i,a,o){var s=this.childAt(0),l=e.hostModel,u,f,h,c,v,d,p,g,m;if(a&&(u=a.emphasisItemStyle,f=a.blurItemStyle,h=a.selectItemStyle,c=a.focus,v=a.blurScope,p=a.labelStatesModels,g=a.hoverScale,m=a.cursorStyle,d=a.emphasisDisabled),!a||e.hasItemOption){var y=a&&a.itemModel?a.itemModel:e.getItemModel(n),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=y.getModel(["select","itemStyle"]).getItemStyle(),f=y.getModel(["blur","itemStyle"]).getItemStyle(),c=_.get("focus"),v=_.get("blurScope"),d=_.get("disabled"),p=Cs(y),g=_.getShallow("scale"),m=y.getShallow("cursor")}var w=e.getItemVisual(n,"symbolRotate");s.attr("rotation",(w||0)*Math.PI/180||0);var b=qm(e.getItemVisual(n,"symbolOffset"),i);b&&(s.x=b[0],s.y=b[1]),m&&s.attr("cursor",m);var S=e.getItemVisual(n,"style"),x=S.fill;if(s instanceof Er){var T=s.style;s.useStyle(B({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},S))}else s.__isEmptyBrush?s.useStyle(B({},S)):s.useStyle(S),s.style.decal=null,s.setColor(x,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var M=e.getItemVisual(n,"liftZ"),A=this._z2;M!=null?A==null&&(this._z2=s.z2,s.z2+=M):A!=null&&(s.z2=A,this._z2=null);var C=o&&o.useNameLabel;xs(s,p,{labelFetcher:l,labelDataIndex:n,defaultText:I,inheritColor:x,defaultOpacity:S.opacity});function I(P){return C?e.getName(P):zh(e,P)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var E=s.ensureState("emphasis");E.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=f;var L=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;E.scaleX=this._sizeX*L,E.scaleY=this._sizeY*L,this.setSymbolScale(1),da(this,c,v,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,n,i){var a=this.childAt(0),o=ht(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&ms(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();ms(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,n){return hA(e.getItemVisual(n,"symbolSize"))},t})(kt);function mI(r,t){this.parent.drift(r,t)}function Hh(r,t,e,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(e))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function x0(r){return r!=null&&!q(r)&&(r={isIgnore:r}),r||{}}function C0(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:Cs(t),cursorStyle:t.get("cursor")}}var T0=(function(){function r(t){this.group=new kt,this._SymbolCtor=t||Vh}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=x0(e);var n=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=C0(t),u={disableAnimation:s},f=e.getSymbolPoint||function(h){return t.getItemLayout(h)};a||n.removeAll(),t.diff(a).add(function(h){var c=f(h);if(Hh(t,c,h,e)){var v=new o(t,h,l,u);v.setPosition(c),t.setItemGraphicEl(h,v),n.add(v)}}).update(function(h,c){var v=a.getItemGraphicEl(c),d=f(h);if(!Hh(t,d,h,e)){n.remove(v);return}var p=t.getItemVisual(h,"symbol")||"circle",g=v&&v.getSymbolType&&v.getSymbolType();if(!v||g&&g!==p)n.remove(v),v=new o(t,h,l,u),v.setPosition(d);else{v.updateData(t,h,l,u);var m={x:d[0],y:d[1]};s?v.attr(m):ce(v,m,i)}n.add(v),t.setItemGraphicEl(h,v)}).remove(function(h){var c=a.getItemGraphicEl(h);c&&c.fadeOut(function(){n.remove(c)},i)}).execute(),this._getSymbolPoint=f,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(n,i){var a=t._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=C0(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,n){this._progressiveEls=[],n=x0(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a<t.end;a++){var o=e.getItemLayout(a);if(Hh(e,o,a,n)){var s=new this._SymbolCtor(e,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),e.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(t){ba(this._progressiveEls||this.group,t)},r.prototype.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(i){i.fadeOut(function(){e.remove(i)},n.hostModel)}):e.removeAll()},r})();function D0(r,t,e){var n=r.getBaseAxis(),i=r.getOtherAxis(n),a=yI(i,e),o=n.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(o),f=s==="x"||s==="radius"?1:0,h=X(r.dimensions,function(d){return t.mapDimension(d)}),c=!1,v=t.getCalculationInfo("stackResultDimension");return Mi(t,h[0])&&(c=!0,h[0]=v),Mi(t,h[1])&&(c=!0,h[1]=v),{dataDimsForPoint:h,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!c,valueDim:l,baseDim:u,baseDataOffset:f,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function yI(r,t){var e=0,n=r.scale.getExtent();return t==="start"?e=n[0]:t==="end"?e=n[1]:xt(t)&&!isNaN(t)?e=t:n[0]>0?e=n[0]:n[1]<0&&(e=n[1]),e}function M0(r,t,e,n){var i=NaN;r.stacked&&(i=e.get(e.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=e.get(r.baseDim,n),o[1-a]=i,t.dataToPoint(o)}function _I(r,t){var e=[];return t.diff(r).add(function(n){e.push({cmd:"+",idx:n})}).update(function(n,i){e.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){e.push({cmd:"-",idx:n})}).execute(),e}function wI(r,t,e,n,i,a,o,s){for(var l=_I(r,t),u=[],f=[],h=[],c=[],v=[],d=[],p=[],g=D0(i,t,o),m=r.getLayout("points")||[],y=t.getLayout("points")||[],_=0;_<l.length;_++){var w=l[_],b=!0,S=void 0,x=void 0;switch(w.cmd){case"=":S=w.idx*2,x=w.idx1*2;var T=m[S],M=m[S+1],A=y[x],C=y[x+1];(isNaN(T)||isNaN(M))&&(T=A,M=C),u.push(T,M),f.push(A,C),h.push(e[S],e[S+1]),c.push(n[x],n[x+1]),p.push(t.getRawIndex(w.idx1));break;case"+":var I=w.idx,E=g.dataDimsForPoint,L=i.dataToPoint([t.get(E[0],I),t.get(E[1],I)]);x=I*2,u.push(L[0],L[1]),f.push(y[x],y[x+1]);var P=M0(g,i,t,I);h.push(P[0],P[1]),c.push(n[x],n[x+1]),p.push(t.getRawIndex(I));break;case"-":b=!1}b&&(v.push(w),d.push(d.length))}d.sort(function(st,ie){return p[st]-p[ie]});for(var k=u.length,z=or(k),O=or(k),V=or(k),$=or(k),Z=[],_=0;_<d.length;_++){var et=d[_],at=_*2,ot=et*2;z[at]=u[ot],z[at+1]=u[ot+1],O[at]=f[ot],O[at+1]=f[ot+1],V[at]=h[ot],V[at+1]=h[ot+1],$[at]=c[ot],$[at+1]=c[ot+1],Z[_]=v[et]}return{current:z,next:O,stackedOnCurrent:V,stackedOnNext:$,status:Z}}var Nr=Math.min,Br=Math.max;function Pn(r,t){return isNaN(r)||isNaN(t)}function Wh(r,t,e,n,i,a,o,s,l){for(var u,f,h,c,v,d,p=e,g=0;g<n;g++){var m=t[p*2],y=t[p*2+1];if(p>=i||p<0)break;if(Pn(m,y)){if(l){p+=a;continue}break}if(p===e)r[a>0?"moveTo":"lineTo"](m,y),h=m,c=y;else{var _=m-u,w=y-f;if(_*_+w*w<.5){p+=a;continue}if(o>0){for(var b=p+a,S=t[b*2],x=t[b*2+1];S===m&&x===y&&g<n;)g++,b+=a,p+=a,S=t[b*2],x=t[b*2+1],m=t[p*2],y=t[p*2+1],_=m-u,w=y-f;var T=g+1;if(l)for(;Pn(S,x)&&T<n;)T++,b+=a,S=t[b*2],x=t[b*2+1];var M=.5,A=0,C=0,I=void 0,E=void 0;if(T>=n||Pn(S,x))v=m,d=y;else{A=S-u,C=x-f;var L=m-u,P=S-m,k=y-f,z=x-y,O=void 0,V=void 0;if(s==="x"){O=Math.abs(L),V=Math.abs(P);var $=A>0?1:-1;v=m-$*O*o,d=y,I=m+$*V*o,E=y}else if(s==="y"){O=Math.abs(k),V=Math.abs(z);var Z=C>0?1:-1;v=m,d=y-Z*O*o,I=m,E=y+Z*V*o}else O=Math.sqrt(L*L+k*k),V=Math.sqrt(P*P+z*z),M=V/(V+O),v=m-A*o*(1-M),d=y-C*o*(1-M),I=m+A*o*M,E=y+C*o*M,I=Nr(I,Br(S,m)),E=Nr(E,Br(x,y)),I=Br(I,Nr(S,m)),E=Br(E,Nr(x,y)),A=I-m,C=E-y,v=m-A*O/V,d=y-C*O/V,v=Nr(v,Br(u,m)),d=Nr(d,Br(f,y)),v=Br(v,Nr(u,m)),d=Br(d,Nr(f,y)),A=m-v,C=y-d,I=m+A*V/O,E=y+C*V/O}r.bezierCurveTo(h,c,v,d,m,y),h=I,c=E}else r.lineTo(m,y)}u=m,f=y,p+=a}return g}var A0=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),bI=(function(r){N(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new A0},t.prototype.buildPath=function(e,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Pn(i[o*2-2],i[o*2-1]);o--);for(;a<o&&Pn(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=Wh(e,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},t.prototype.getPointOn=function(e,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=pn.CMD,s,l,u=n==="x",f=[],h=0;h<a.length;){var c=a[h++],v=void 0,d=void 0,p=void 0,g=void 0,m=void 0,y=void 0,_=void 0;switch(c){case o.M:s=a[h++],l=a[h++];break;case o.L:if(v=a[h++],d=a[h++],_=u?(e-s)/(v-s):(e-l)/(d-l),_<=1&&_>=0){var w=u?(d-l)*_+l:(v-s)*_+s;return u?[e,w]:[w,e]}s=v,l=d;break;case o.C:v=a[h++],d=a[h++],p=a[h++],g=a[h++],m=a[h++],y=a[h++];var b=u?So(s,v,p,m,e,f):So(l,d,g,y,e,f);if(b>0)for(var S=0;S<b;S++){var x=f[S];if(x<=1&&x>=0){var w=u?$t(l,d,g,y,x):$t(s,v,p,m,x);return u?[e,w]:[w,e]}}s=m,l=y;break}}},t})(vt),SI=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(A0),xI=(function(r){N(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new SI},t.prototype.buildPath=function(e,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Pn(i[s*2-2],i[s*2-1]);s--);for(;o<s&&Pn(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=Wh(e,i,o,s,s,1,n.smooth,l,n.connectNulls);Wh(e,a,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,e.closePath()}},t})(vt);function I0(r,t,e,n,i){var a=r.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,f=e.get(["lineStyle","width"])||0;o-=f/2,s-=f/2,l+=f,u+=f,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var h=new Tt({shape:{x:o,y:s,width:l,height:u}});if(t){var c=r.getBaseAxis(),v=c.isHorizontal(),d=c.inverse;v?(d&&(h.shape.x+=l),h.shape.width=0):(d||(h.shape.y+=u),h.shape.height=0);var p=Q(i)?function(g){i(g,h)}:null;nr(h,{shape:{width:l,height:u,x:o,y:s}},e,null,n,p)}return h}function E0(r,t,e){var n=r.getArea(),i=Ot(n.r0,1),a=Ot(n.r,1),o=new ci({shape:{cx:Ot(r.cx,1),cy:Ot(r.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(t){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,nr(o,{shape:{endAngle:n.endAngle,r:a}},e)}return o}function L0(r,t,e,n,i){if(r){if(r.type==="polar")return E0(r,t,e);if(r.type==="cartesian2d")return I0(r,t,e,n,i)}else return null;return null}function Gh(r,t){return r.type===t}function P0(r,t){if(r.length===t.length){for(var e=0;e<r.length;e++)if(r[e]!==t[e])return;return!0}}function k0(r){for(var t=1/0,e=1/0,n=-1/0,i=-1/0,a=0;a<r.length;){var o=r[a++],s=r[a++];isNaN(o)||(t=Math.min(o,t),n=Math.max(o,n)),isNaN(s)||(e=Math.min(s,e),i=Math.max(s,i))}return[[t,e],[n,i]]}function R0(r,t){var e=k0(r),n=e[0],i=e[1],a=k0(t),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function O0(r){return xt(r)?r:r?.5:0}function CI(r,t,e){if(!e.valueDim)return[];for(var n=t.count(),i=or(n*2),a=0;a<n;a++){var o=M0(e,r,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function Fr(r,t,e,n,i){var a=e.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],f=[],h=[],c=[];if(i){for(l=0;l<r.length;l+=2){var v=t||r;!isNaN(v[l])&&!isNaN(v[l+1])&&c.push(r[l],r[l+1])}r=c}for(l=0;l<r.length-2;l+=2)switch(h[0]=r[l+2],h[1]=r[l+3],f[0]=r[l],f[1]=r[l+1],s.push(f[0],f[1]),n){case"end":u[o]=h[o],u[1-o]=f[1-o],s.push(u[0],u[1]);break;case"middle":var d=(f[o]+h[o])/2,p=[];u[o]=p[o]=d,u[1-o]=f[1-o],p[1-o]=h[1-o],s.push(u[0],u[1]),s.push(p[0],p[1]);break;default:u[o]=f[o],u[1-o]=h[1-o],s.push(u[0],u[1])}return s.push(r[l++],r[l++]),s}function TI(r,t){var e=[],n=r.length,i,a;function o(f,h,c){var v=f.coord,d=(c-v)/(h.coord-v),p=kS(d,[f.color,h.color]);return{coord:c,color:p}}for(var s=0;s<n;s++){var l=r[s],u=l.coord;if(u<0)i=l;else if(u>t){a?e.push(o(a,l,t)):i&&e.push(o(i,l,0),o(i,l,t));break}else i&&(e.push(o(i,l,0)),i=null),e.push(l),a=l}return e}function DI(r,t,e){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())){if(t.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var i,a,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(!a){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var l=t.getAxis(i),u=X(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,h=a.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),h.reverse());var c=TI(u,i==="x"?e.getWidth():e.getHeight()),v=c.length;if(!v&&f)return u[0].coord<0?h[1]?h[1]:u[f-1].color:h[0]?h[0]:u[0].color;var d=10,p=c[0].coord-d,g=c[v-1].coord+d,m=g-p;if(m<.001)return"transparent";D(c,function(_){_.offset=(_.coord-p)/m}),c.push({offset:v?c[v-1].offset:.5,color:h[1]||"transparent"}),c.unshift({offset:v?c[0].offset:.5,color:h[0]||"transparent"});var y=new Qp(0,0,0,0,c,!0);return y[i]=p,y[i+"2"]=g,y}}function MI(r,t,e){var n=r.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=e.getAxesByScale("ordinal")[0];if(a&&!(i&&AI(a,t))){var o=t.mapDimension(a.dim),s={};return D(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function AI(r,t){var e=r.getExtent(),n=Math.abs(e[1]-e[0])/r.scale.count();isNaN(n)&&(n=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(Vh.getSymbolSize(t,o)[r.isHorizontal()?1:0]*1.5>n)return!1;return!0}function II(r,t){return isNaN(r)||isNaN(t)}function EI(r){for(var t=r.length/2;t>0&&II(r[t*2-2],r[t*2-1]);t--);return t-1}function N0(r,t){return[r[t*2],r[t*2+1]]}function LI(r,t,e){for(var n=r.length/2,i=e==="x"?0:1,a,o,s=0,l=-1,u=0;u<n;u++)if(o=r[u*2+i],!(isNaN(o)||isNaN(r[u*2+1-i]))){if(u===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function B0(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t<er.length;t++)if(r.get([er[t],"endLabel","show"]))return!0;return!1}function $h(r,t,e,n){if(Gh(t,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=B0(n)?function(v,d){r._endLabelOnDuring(v,d,o,s,a,i,t)}:null,u=t.getBaseAxis().isHorizontal(),f=I0(t,e,n,function(){var v=r._endLabel;v&&e&&s.originalX!=null&&v.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var h=f.shape,c=Math.max(h.width,h.height);u?(h.y-=c,h.height+=c*2):(h.x-=c,h.width+=c*2)}return l&&l(1,f),f}else return process.env.NODE_ENV!=="production"&&n.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),E0(t,e,n)}function PI(r,t){var e=t.getBaseAxis(),n=e.isHorizontal(),i=e.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:r.get("align")||a,verticalAlign:r.get("verticalAlign")||o}}}var kI=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(){var e=new kt,n=new T0;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=e,this._changePolyState=J(this._changePolyState,this)},t.prototype.render=function(e,n,i){var a=e.coordinateSystem,o=this.group,s=e.getData(),l=e.getModel("lineStyle"),u=e.getModel("areaStyle"),f=s.getLayout("points")||[],h=a.type==="polar",c=this._coordSys,v=this._symbolDraw,d=this._polyline,p=this._polygon,g=this._lineGroup,m=!n.ssr&&e.get("animation"),y=!u.isEmpty(),_=u.get("origin"),w=D0(a,s,_),b=y&&CI(a,s,w),S=e.get("showSymbol"),x=e.get("connectNulls"),T=S&&!h&&MI(e,s,a),M=this._data;M&&M.eachItemGraphicEl(function(st,ie){st.__temp&&(o.remove(st),M.setItemGraphicEl(ie,null))}),S||v.remove(),o.add(g);var A=h?!1:e.get("step"),C;a&&a.getArea&&e.get("clip",!0)&&(C=a.getArea(),C.width!=null?(C.x-=.1,C.y-=.1,C.width+=.2,C.height+=.2):C.r0&&(C.r0-=.5,C.r+=.5)),this._clipShapeForSymbol=C;var I=DI(s,a,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(d&&c.type===a.type&&A===this._step))S&&v.updateData(s,{isIgnore:T,clipShape:C,disableAnimation:!0,getSymbolPoint:function(st){return[f[st*2],f[st*2+1]]}}),m&&this._initSymbolLabelAnimation(s,a,C),A&&(b&&(b=Fr(b,f,a,A,x)),f=Fr(f,null,a,A,x)),d=this._newPolyline(f),y?p=this._newPolygon(f,b):p&&(g.remove(p),p=this._polygon=null),h||this._initOrUpdateEndLabel(e,a,xn(I)),g.setClipPath($h(this,a,!0,e));else{y&&!p?p=this._newPolygon(f,b):p&&!y&&(g.remove(p),p=this._polygon=null),h||this._initOrUpdateEndLabel(e,a,xn(I));var E=g.getClipPath();if(E){var L=$h(this,a,!1,e);nr(E,{shape:L.shape},e)}else g.setClipPath($h(this,a,!0,e));S&&v.updateData(s,{isIgnore:T,clipShape:C,disableAnimation:!0,getSymbolPoint:function(st){return[f[st*2],f[st*2+1]]}}),(!P0(this._stackedOnPoints,b)||!P0(this._points,f))&&(m?this._doUpdateAnimation(s,b,a,i,A,_,x):(A&&(b&&(b=Fr(b,f,a,A,x)),f=Fr(f,null,a,A,x)),d.setShape({points:f}),p&&p.setShape({points:f,stackedOnPoints:b})))}var P=e.getModel("emphasis"),k=P.get("focus"),z=P.get("blurScope"),O=P.get("disabled");if(d.useStyle(gt(l.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"})),os(d,e,"lineStyle"),d.style.lineWidth>0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var V=d.getState("emphasis").style;V.lineWidth=+d.style.lineWidth+1}ht(d).seriesIndex=e.seriesIndex,da(d,k,z,O);var $=O0(e.get("smooth")),Z=e.get("smoothMonotone");if(d.setShape({smooth:$,smoothMonotone:Z,connectNulls:x}),p){var et=s.getCalculationInfo("stackedOnSeries"),at=0;p.useStyle(gt(u.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),et&&(at=O0(et.get("smooth"))),p.setShape({smooth:$,stackedOnSmooth:at,smoothMonotone:Z,connectNulls:x}),os(p,e,"areaStyle"),ht(p).seriesIndex=e.seriesIndex,da(p,k,z,O)}var ot=this._changePolyState;s.eachItemGraphicEl(function(st){st&&(st.onHoverStateChange=ot)}),this._polyline.onHoverStateChange=ot,this._data=s,this._coordSys=a,this._stackedOnPoints=b,this._points=f,this._step=A,this._valueOrigin=_,e.get("triggerLineEvent")&&(this.packEventData(e,d),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,n){ht(n).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,n,i,a){var o=e.getData(),s=sn(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],h=l[s*2+1];if(isNaN(f)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,h))return;var c=e.get("zlevel")||0,v=e.get("z")||0;u=new Vh(o,s),u.x=f,u.y=h,u.setZ(c,v);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=c,d.z=v,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else _e.prototype.highlight.call(this,e,n,i,a)},t.prototype.downplay=function(e,n,i,a){var o=e.getData(),s=sn(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else _e.prototype.downplay.call(this,e,n,i,a)},t.prototype._changePolyState=function(e){var n=this._polygon;Ap(this._polyline,e),n&&Ap(n,e)},t.prototype._newPolyline=function(e){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new bI({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(e,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new xI({shape:{points:e,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(e,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=e.hostModel,f=u.get("animationDuration");Q(f)&&(f=f(null));var h=u.get("animationDelay")||0,c=Q(h)?h(null):h;e.eachItemGraphicEl(function(v,d){var p=v;if(p){var g=[v.x,v.y],m=void 0,y=void 0,_=void 0;if(i)if(o){var w=i,b=n.pointToCoord(g);a?(m=w.startAngle,y=w.endAngle,_=-b[1]/180*Math.PI):(m=w.r0,y=w.r,_=b[0])}else{var S=i;a?(m=S.x,y=S.x+S.width,_=v.x):(m=S.y+S.height,y=S.y,_=v.y)}var x=y===m?0:(_-m)/(y-m);l&&(x=1-x);var T=Q(h)?h(d):f*x+c,M=p.getSymbolPath(),A=M.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:T}),M.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,n,i){var a=e.getModel("endLabel");if(B0(e)){var o=e.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Ut({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=EI(l);f>=0&&(xs(s,Cs(e,"endLabel"),{inheritColor:i,labelFetcher:e,labelDataIndex:f,defaultText:function(h,c,v){return v!=null?S0(o,v):zh(o,h)},enableTextSetter:!0},PI(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,n,i,a,o,s,l){var u=this._endLabel,f=this._polyline;if(u){e<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var h=i.getLayout("points"),c=i.hostModel,v=c.get("connectNulls"),d=s.get("precision"),p=s.get("distance")||0,g=l.getBaseAxis(),m=g.isHorizontal(),y=g.inverse,_=n.shape,w=y?m?_.x:_.y+_.height:m?_.x+_.width:_.y,b=(m?p:0)*(y?-1:1),S=(m?0:-p)*(y?-1:1),x=m?"x":"y",T=LI(h,w,x),M=T.range,A=M[1]-M[0],C=void 0;if(A>=1){if(A>1&&!v){var I=N0(h,M[0]);u.attr({x:I[0]+b,y:I[1]+S}),o&&(C=c.getRawValue(M[0]))}else{var I=f.getPointOn(w,x);I&&u.attr({x:I[0]+b,y:I[1]+S});var E=c.getRawValue(M[0]),L=c.getRawValue(M[1]);o&&(C=Ex(i,d,E,L,T.t))}a.lastFrameIndex=M[0]}else{var P=e===1||a.lastFrameIndex>0?M[0]:0,I=N0(h,P);o&&(C=c.getRawValue(P)),u.attr({x:I[0]+b,y:I[1]+S})}if(o){var k=Ts(u);typeof k.setLabelText=="function"&&k.setLabelText(C)}}},t.prototype._doUpdateAnimation=function(e,n,i,a,o,s,l){var u=this._polyline,f=this._polygon,h=e.hostModel,c=wI(this._data,e,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),v=c.current,d=c.stackedOnCurrent,p=c.next,g=c.stackedOnNext;if(o&&(d=Fr(c.stackedOnCurrent,c.current,i,o,l),v=Fr(c.current,null,i,o,l),g=Fr(c.stackedOnNext,c.next,i,o,l),p=Fr(c.next,null,i,o,l)),R0(v,p)>3e3||f&&R0(d,g)>3e3){u.stopAnimation(),u.setShape({points:p}),f&&(f.stopAnimation(),f.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=c.current,u.shape.points=v;var m={shape:{points:p}};c.current!==v&&(m.shape.__points=c.next),u.stopAnimation(),ce(u,m,h),f&&(f.setShape({points:v,stackedOnPoints:d}),f.stopAnimation(),ce(f,{shape:{stackedOnPoints:g}},h),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var y=[],_=c.status,w=0;w<_.length;w++){var b=_[w].cmd;if(b==="="){var S=e.getItemGraphicEl(_[w].idx1);S&&y.push({el:S,ptIdx:w})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var x=u.shape.__points,T=0;T<y.length;T++){var M=y[T].el,A=y[T].ptIdx*2;M.x=x[A],M.y=x[A+1],M.markRedraw()}})},t.prototype.remove=function(e){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t})(_e);function Uh(r,t){return{seriesType:r,plan:Oa(),reset:function(e){var n=e.getData(),i=e.coordinateSystem,a=e.pipelineContext,o=t||a.large;if(i){var s=X(i.dimensions,function(v){return n.mapDimension(v)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");Mi(n,s[0])&&(s[0]=u),Mi(n,s[1])&&(s[1]=u);var f=n.getStore(),h=n.getDimensionIndex(s[0]),c=n.getDimensionIndex(s[1]);return l&&{progress:function(v,d){for(var p=v.end-v.start,g=o&&or(p*l),m=[],y=[],_=v.start,w=0;_<v.end;_++){var b=void 0;if(l===1){var S=f.get(h,_);b=i.dataToPoint(S,null,y)}else m[0]=f.get(h,_),m[1]=f.get(c,_),b=i.dataToPoint(m,null,y);o?(g[w++]=b[0],g[w++]=b[1]):d.setItemLayout(_,b.slice())}o&&d.setLayout("points",g)}}}}}}var RI={average:function(r){for(var t=0,e=0,n=0;n<r.length;n++)isNaN(r[n])||(t+=r[n],e++);return e===0?NaN:t/e},sum:function(r){for(var t=0,e=0;e<r.length;e++)t+=r[e]||0;return t},max:function(r){for(var t=-1/0,e=0;e<r.length;e++)r[e]>t&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e<r.length;e++)r[e]<t&&(t=r[e]);return isFinite(t)?t:NaN},nearest:function(r){return r[0]}},OI=function(r){return Math.round(r.length/2)};function F0(r){return{seriesType:r,reset:function(t,e,n){var i=t.getData(),a=t.get("sampling"),o=t.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(f[1]-f[0])*(h||1),v=Math.round(s/c);if(isFinite(v)&&v>1){a==="lttb"?t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/v)):a==="minmax"&&t.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/v));var d=void 0;G(a)?d=RI[a]:Q(a)&&(d=a),d&&t.setData(i.downSample(i.mapDimension(u.dim),1/v,d,OI))}}}}}function NI(r){r.registerChartView(kI),r.registerSeriesModel(gI),r.registerLayout(Uh("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,F0("line"))}var Yh=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,n){return fl(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(e),s=a.dataToPoint(o);if(i)D(a.getAxes(),function(c,v){if(c.type==="category"&&n!=null){var d=c.getTicksCoords(),p=c.getTickModel().get("alignWithLabel"),g=o[v],m=n[v]==="x1"||n[v]==="y1";if(m&&!p&&(g+=1),d.length<2)return;if(d.length===2){s[v]=c.toGlobalCoord(c.getExtent()[m?1:0]);return}for(var y=void 0,_=void 0,w=1,b=0;b<d.length;b++){var S=d[b].coord,x=b===d.length-1?d[b-1].tickValue+w:d[b].tickValue;if(x===g){_=S;break}else if(x<g)y=S;else if(y!=null&&x>g){_=(S+y)/2;break}b===1&&(w=x-d[0].tickValue)}_==null&&(y?y&&(_=d[d.length-1].coord):_=d[0].coord),s[v]=c.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;s[h]+=u+f/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t})(ke);ke.registerClass(Yh);var BI=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return fl(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>e&&(e=n),e},t.prototype.brushSelector=function(e,n,i){return i.rect(n.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Ms(Yh.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t})(Yh),FI=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),z0=(function(r){N(t,r);function t(e){var n=r.call(this,e)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new FI},t.prototype.buildPath=function(e,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,f=n.startAngle,h=n.endAngle,c=n.clockwise,v=Math.PI*2,d=c?h-f<v:f-h<v;d||(f=h-(c?v:-v));var p=Math.cos(f),g=Math.sin(f),m=Math.cos(h),y=Math.sin(h);d?(e.moveTo(p*o+i,g*o+a),e.arc(p*u+i,g*u+a,l,-Math.PI+f,f,!c)):e.moveTo(p*s+i,g*s+a),e.arc(i,a,s,f,h,!c),e.arc(m*u+i,y*u+a,l,h-Math.PI*2,h-Math.PI,!c),o!==0&&e.arc(i,a,o,h,f,c)},t})(vt);function zI(r,t){t=t||{};var e=t.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return Bo(n,i,a);var s=r(o),l=i.distance!=null?i.distance:5,u=this.shape,f=u.cx,h=u.cy,c=u.r,v=u.r0,d=(c+v)/2,p=u.startAngle,g=u.endAngle,m=(p+g)/2,y=e?Math.abs(c-v)/2:0,_=Math.cos,w=Math.sin,b=f+c*_(p),S=h+c*w(p),x="left",T="top";switch(s){case"startArc":b=f+(v-l)*_(m),S=h+(v-l)*w(m),x="center",T="top";break;case"insideStartArc":b=f+(v+l)*_(m),S=h+(v+l)*w(m),x="center",T="bottom";break;case"startAngle":b=f+d*_(p)+yl(p,l+y,!1),S=h+d*w(p)+_l(p,l+y,!1),x="right",T="middle";break;case"insideStartAngle":b=f+d*_(p)+yl(p,-l+y,!1),S=h+d*w(p)+_l(p,-l+y,!1),x="left",T="middle";break;case"middle":b=f+d*_(m),S=h+d*w(m),x="center",T="middle";break;case"endArc":b=f+(c+l)*_(m),S=h+(c+l)*w(m),x="center",T="bottom";break;case"insideEndArc":b=f+(c-l)*_(m),S=h+(c-l)*w(m),x="center",T="top";break;case"endAngle":b=f+d*_(g)+yl(g,l+y,!0),S=h+d*w(g)+_l(g,l+y,!0),x="left",T="middle";break;case"insideEndAngle":b=f+d*_(g)+yl(g,-l+y,!0),S=h+d*w(g)+_l(g,-l+y,!0),x="right",T="middle";break;default:return Bo(n,i,a)}return n=n||{},n.x=b,n.y=S,n.align=x,n.verticalAlign=T,n}}function VI(r,t,e,n){if(xt(n)){r.setTextConfig({rotation:n});return}else if(W(t)){r.setTextConfig({rotation:0});return}var i=r.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,l,u=e(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=o;break;default:r.setTextConfig({rotation:0});return}var f=Math.PI*1.5-l;u==="middle"&&f>Math.PI/2&&f<Math.PI*1.5&&(f-=Math.PI),r.setTextConfig({rotation:f})}function yl(r,t,e){return t*Math.sin(r)*(e?-1:1)}function _l(r,t,e){return t*Math.cos(r)*(e?1:-1)}function HI(r,t,e){var n=r.get("borderRadius");if(n==null)return{cornerRadius:0};W(n)||(n=[n,n,n,n]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:X(n,function(a){return Dr(a,i)})}}var Zh=Math.max,Xh=Math.min;function WI(r,t){var e=r.getArea&&r.getArea();if(Gh(r,"cartesian2d")){var n=r.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=t.getLayout("bandWidth");n.isHorizontal()?(e.x-=i,e.width+=i*2):(e.y-=i,e.height+=i*2)}}return e}var GI=(function(r){N(t,r);function t(){var e=r.call(this)||this;return e.type=t.type,e._isFirstFrame=!0,e}return t.prototype.render=function(e,n,i,a){this._model=e,this._removeOnRenderedListener(i),this._updateDrawMode(e);var o=e.get("coordinateSystem");o==="cartesian2d"||o==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,n,i):this._renderNormal(e,n,i,a)):process.env.NODE_ENV!=="production"&&Xt("Only cartesian2d and polar supported for bar.")},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,n){this._progressiveEls=[],this._incrementalRenderLarge(e,n)},t.prototype.eachRendered=function(e){ba(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var n=e.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(e,n,i,a){var o=this.group,s=e.getData(),l=this._data,u=e.coordinateSystem,f=u.getBaseAxis(),h;u.type==="cartesian2d"?h=f.isHorizontal():u.type==="polar"&&(h=f.dim==="angle");var c=e.isAnimationEnabled()?e:null,v=$I(e,u);v&&this._enableRealtimeSort(v,s,i);var d=e.get("clip",!0)||v,p=WI(u,s);o.removeClipPath();var g=e.get("roundCap",!0),m=e.get("showBackground",!0),y=e.getModel("backgroundStyle"),_=y.get("borderRadius")||0,w=[],b=this._backgroundEls,S=a&&a.isInitSort,x=a&&a.type==="changeAxisOrder";function T(C){var I=wl[u.type](s,C),E=jI(u,h,I);return E.useStyle(y.getItemStyle()),u.type==="cartesian2d"?E.setShape("r",_):E.setShape("cornerRadius",_),w[C]=E,E}s.diff(l).add(function(C){var I=s.getItemModel(C),E=wl[u.type](s,C,I);if(m&&T(C),!(!s.hasValue(C)||!$0[u.type](E))){var L=!1;d&&(L=V0[u.type](p,E));var P=H0[u.type](e,s,C,E,h,c,f.model,!1,g);v&&(P.forceLabelAnimation=!0),Y0(P,s,C,I,E,e,h,u.type==="polar"),S?P.attr({shape:E}):v?W0(v,c,P,E,C,h,!1,!1):nr(P,{shape:E},e,C),s.setItemGraphicEl(C,P),o.add(P),P.ignore=L}}).update(function(C,I){var E=s.getItemModel(C),L=wl[u.type](s,C,E);if(m){var P=void 0;b.length===0?P=T(I):(P=b[I],P.useStyle(y.getItemStyle()),u.type==="cartesian2d"?P.setShape("r",_):P.setShape("cornerRadius",_),w[C]=P);var k=wl[u.type](s,C),z=K0(h,k,u);ce(P,{shape:z},c,C)}var O=l.getItemGraphicEl(I);if(!s.hasValue(C)||!$0[u.type](L)){o.remove(O);return}var V=!1;if(d&&(V=V0[u.type](p,L),V&&o.remove(O)),O?Tf(O):O=H0[u.type](e,s,C,L,h,c,f.model,!!O,g),v&&(O.forceLabelAnimation=!0),x){var $=O.getTextContent();if($){var Z=Ts($);Z.prevValue!=null&&(Z.prevValue=Z.value)}}else Y0(O,s,C,E,L,e,h,u.type==="polar");S?O.attr({shape:L}):v?W0(v,c,O,L,C,h,!0,x):ce(O,{shape:L},e,C,null),s.setItemGraphicEl(C,O),O.ignore=V,o.add(O)}).remove(function(C){var I=l.getItemGraphicEl(C);I&&Cf(I,e,C)}).execute();var M=this._backgroundGroup||(this._backgroundGroup=new kt);M.removeAll();for(var A=0;A<w.length;++A)M.add(w[A]);o.add(M),this._backgroundEls=w,this._data=s},t.prototype._renderLarge=function(e,n,i){this._clear(),X0(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,n){this._removeBackground(),X0(n,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var n=e.get("clip",!0)&&L0(e.coordinateSystem,!1,e),i=this.group;n?i.setClipPath(n):i.removeClipPath()},t.prototype._enableRealtimeSort=function(e,n,i){var a=this;if(n.count()){var o=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,e,i),this._isFirstFrame=!1;else{var s=function(l){var u=n.getItemGraphicEl(l),f=u&&u.shape;return f&&Math.abs(o.isHorizontal()?f.height:f.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,n,i){var a=[];return e.each(e.mapDimension(n.dim),function(o,s){var l=i(s);l=l??NaN,a.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:X(a,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,n,i){for(var a=i.scale,o=e.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var f=e.rawIndexOf(o,a.getRawOrdinalNumber(l)),h=f<0?Number.MIN_VALUE:n(e.indexOfRawIndex(f));if(h>s)return!0;s=h}return!1},t.prototype._isOrderDifferentInView=function(e,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,n,i,a){if(this._isOrderChangedWithinSameData(e,n,i)){var o=this._dataSort(e,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,n,i){var a=n.baseAxis,o=this._dataSort(e,a,function(s){return e.get(e.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(e,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(e,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var n=this.group,i=this._data;e&&e.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){Cf(a,e,ht(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t})(_e),V0={cartesian2d:function(r,t){var e=t.width<0?-1:1,n=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var i=r.x+r.width,a=r.y+r.height,o=Zh(t.x,r.x),s=Xh(t.x+t.width,i),l=Zh(t.y,r.y),u=Xh(t.y+t.height,a),f=s<o,h=u<l;return t.x=f&&o>i?s:o,t.y=h&&l>a?u:l,t.width=f?0:s-o,t.height=h?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),f||h},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}var i=Xh(t.r,r.r),a=Zh(t.r0,r.r0);t.r=i,t.r0=a;var o=i-a<0;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},H0={cartesian2d:function(r,t,e,n,i,a,o,s,l){var u=new Tt({shape:B({},n),z2:1});if(u.__dataIndex=e,u.name="item",a){var f=u.shape,h=i?"height":"width";f[h]=0}return u},polar:function(r,t,e,n,i,a,o,s,l){var u=!i&&l?z0:ci,f=new u({shape:n,z2:1});f.name="item";var h=U0(i);if(f.calculateTextPosition=zI(h,{isRoundCap:u===z0}),a){var c=f.shape,v=i?"r":"endAngle",d={};c[v]=i?n.r0:n.startAngle,d[v]=n[v],(s?ce:nr)(f,{shape:d},a)}return f}};function $I(r,t){var e=r.get("realtimeSort",!0),n=t.getBaseAxis();if(process.env.NODE_ENV!=="production"&&e&&(n.type!=="category"&&Xt("`realtimeSort` will not work because this bar series is not based on a category axis."),t.type!=="cartesian2d"&&Xt("`realtimeSort` will not work because this bar series is not on cartesian2d.")),e&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function W0(r,t,e,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?ce:nr)(e,{shape:l},t,i,null);var f=t?r.baseAxis.model:null;(o?ce:nr)(e,{shape:u},f,i)}function G0(r,t){for(var e=0;e<t.length;e++)if(!isFinite(r[t[e]]))return!0;return!1}var UI=["x","y","width","height"],YI=["cx","cy","r","startAngle","endAngle"],$0={cartesian2d:function(r){return!G0(r,UI)},polar:function(r){return!G0(r,YI)}},wl={cartesian2d:function(r,t,e){var n=r.getItemLayout(t),i=e?XI(e,n):0,a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(r,t,e){var n=r.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function ZI(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function U0(r){return(function(t){var e=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+e;default:return n}}})(r)}function Y0(r,t,e,n,i,a,o,s){var l=t.getItemVisual(e,"style");if(s){if(!a.get("roundCap")){var f=r.shape,h=HI(n.getModel("itemStyle"),f);B(f,h),r.setShape(f)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var c=n.getShallow("cursor");c&&r.attr("cursor",c);var v=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",d=Cs(n);xs(r,d,{labelFetcher:a,labelDataIndex:e,defaultText:zh(a.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var p=r.getTextContent();if(s&&p){var g=n.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,VI(r,g==="outside"?v:g,U0(o),n.get(["label","rotate"]))}WT(p,d,a.getRawValue(e),function(y){return S0(t,y)});var m=n.getModel(["emphasis"]);da(r,m.get("focus"),m.get("blurScope"),m.get("disabled")),os(r,n),ZI(i)&&(r.style.fill="none",r.style.stroke="none",D(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function XI(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}var qI=(function(){function r(){}return r})(),Z0=(function(r){N(t,r);function t(e){var n=r.call(this,e)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new qI},t.prototype.buildPath=function(e,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f<i.length;f+=3)l[a]=u,l[o]=i[f+2],s[a]=i[f+a],s[o]=i[f+o],e.rect(s[0],s[1],l[0],l[1])},t})(vt);function X0(r,t,e,n){var i=r.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=r.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var f=new Z0({shape:{points:u},incremental:!!n,silent:!0,z2:0});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,f.useStyle(l.getItemStyle()),t.add(f),e&&e.push(f)}var h=new Z0({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=a,h.largeDataIndices=o,h.barWidth=s,t.add(h),h.useStyle(i.getVisual("style")),h.style.stroke=null,ht(h).seriesIndex=r.seriesIndex,r.get("silent")||(h.on("mousedown",q0),h.on("mousemove",q0)),e&&e.push(h)}var q0=oh(function(r){var t=this,e=KI(t,r.offsetX,r.offsetY);ht(t).dataIndex=e>=0?e:null},30,!1);function KI(r,t,e){for(var n=r.baseDimIdx,i=1-n,a=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,h=a.length/3;f<h;f++){var c=f*3;if(l[n]=u,l[i]=a[c+2],s[n]=a[c+n],s[i]=a[c+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[f]}return-1}function K0(r,t,e){if(Gh(e,"cartesian2d")){var n=t,i=e.getArea();return{x:r?n.x:i.x,y:r?i.y:n.y,width:r?n.width:i.width,height:r?i.height:n.height}}else{var i=e.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:r?i.r0:a.r0,r:r?i.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function jI(r,t,e){var n=r.type==="polar"?ci:Tt;return new n({shape:K0(t,e,r),silent:!0,z2:0})}function QI(r){r.registerChartView(GI),r.registerSeriesModel(BI),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,At(k2,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,R2("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,F0("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}function JI(r,t,e){t=W(t)&&{coordDimensions:t}||B({encodeDefine:r.getEncode()},t);var n=r.getSource(),i=Xy(n,t).dimensions,a=new Zy(i,r);return a.initData(n,e),a}var tE=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,n){return fl(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(e,n,i){return i.point(n.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},t})(ke),j0=4,eE=(function(){function r(){}return r})(),rE=(function(r){N(t,r);function t(e){var n=r.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new eE},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=e.getContext?e.getContext():e,u=l&&a[0]<j0,f=this.softClipShape,h;if(u){this._ctx=l;return}for(this._ctx=null,h=this._off;h<i.length;){var c=i[h++],v=i[h++];isNaN(c)||isNaN(v)||f&&!f.contain(c,v)||(s.x=c-a[0]/2,s.y=v-a[1]/2,s.width=a[0],s.height=a[1],o.buildPath(e,s,!0))}this.incremental&&(this._off=h,this.notClear=!0)},t.prototype.afterBrush=function(){var e=this.shape,n=e.points,i=e.size,a=this._ctx,o=this.softClipShape,s;if(a){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||a.fillRect(l-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=s,this.notClear=!0)}},t.prototype.findDataIndex=function(e,n){for(var i=this.shape,a=i.points,o=i.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=a.length/2-1;u>=0;u--){var f=u*2,h=a[f]-s/2,c=a[f+1]-l/2;if(e>=h&&n>=c&&e<=h+s&&n<=c+l)return u}return-1},t.prototype.contain=function(e,n){var i=this.transformCoordToLocal(e,n),a=this.getBoundingRect();if(e=i[0],n=i[1],a.contain(e,n)){var o=this.hoverDataIdx=this.findDataIndex(e,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,f=-1/0,h=-1/0,c=0;c<i.length;){var v=i[c++],d=i[c++];l=Math.min(v,l),f=Math.max(v,f),u=Math.min(d,u),h=Math.max(d,h)}e=this._rect=new pt(l-o/2,u-s/2,f-l+o,h-u+s)}return e},t})(vt),nE=(function(){function r(){this.group=new kt}return r.prototype.updateData=function(t,e){this._clear();var n=this._create();n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,e)},r.prototype.updateLayout=function(t){var e=t.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var i=(n.endIndex-n.startIndex)*2,a=n.startIndex*4*2;e=new Float32Array(e.buffer,a,i)}n.setShape("points",e),n.reset()})},r.prototype.incrementalPrepareUpdate=function(t){this._clear()},r.prototype.incrementalUpdate=function(t,e,n){var i=this._newAdded[0],a=e.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+a.length);l.set(o),l.set(a,s),i.endIndex=t.end,i.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=t.start,u.endIndex=t.end,u.incremental=!0,u.setShape({points:a}),this._setCommon(u,e,n)}},r.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},r.prototype._create=function(){var t=new rE({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},r.prototype._setCommon=function(t,e,n){var i=e.hostModel;n=n||{};var a=e.getVisual("symbolSize");t.setShape("size",a instanceof Array?a:[a,a]),t.softClipShape=n.clipShape||null,t.symbolProxy=_r(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<j0;t.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("style"),l=s&&s.fill;l&&t.setColor(l);var u=ht(t);u.seriesIndex=i.seriesIndex,t.on("mousemove",function(f){u.dataIndex=null;var h=t.hoverDataIdx;h>=0&&(u.dataIndex=h+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),iE=(function(r){N(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,n,i){var a=e.getData(),o=this._updateSymbolDraw(a,e);o.updateData(a,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,n,i){var a=e.getData(),o=this._updateSymbolDraw(a,e);o.incrementalPrepareUpdate(a),this._finished=!1},t.prototype.incrementalRender=function(e,n,i){this._symbolDraw.incrementalUpdate(e,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=e.end===n.getData().count()},t.prototype.updateTransform=function(e,n,i){var a=e.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=Uh("").reset(e,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var n=e.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new nE:new T0,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},t.prototype.remove=function(e,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t})(_e),aE=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t})(dt),qh=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",fe).models[0]},t.type="cartesian2dAxis",t})(dt);Fe(qh,rI);var Q0={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},oE=ct({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Q0),Kh=ct({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},Q0),sE=ct({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Kh),lE=gt({logBase:10},Kh);const uE={category:oE,value:Kh,time:sE,log:lE};var fE={value:1,category:1,time:1,log:1};function J0(r,t,e,n){D(fE,function(i,a){var o=ct(ct({},uE[a],!0),n,!0),s=(function(l){N(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+a,f}return u.prototype.mergeDefaultAndTheme=function(f,h){var c=Da(this),v=c?Ma(f):{},d=h.getTheme();ct(f,d.get(a+"Axis")),ct(f,this.getDefaultOption()),f.type=t_(f),c&&mi(f,v,c)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=Lh.createByAxisModel(this))},u.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=t+"Axis."+a,u.defaultOption=o,u})(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",t_)}function t_(r){return r.type||(r.data?"category":"value")}var hE=(function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return X(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Gt(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r})(),jh=["x","y"];function e_(r){return r.type==="interval"||r.type==="time"}var cE=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=jh,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!e_(e)||!e_(n))){var i=e.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,h=(s[1]-o[1])/u,c=o[0]-i[0]*f,v=o[1]-a[0]*h,d=this._transform=[f,0,0,h,c,v];this._invTransform=fu([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(e[0]))&&i.contain(i.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,n){var i=this.dataToPoint(e),a=this.dataToPoint(n),o=this.getArea(),s=new pt(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,n,i){i=i||[];var a=e[0],o=e[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Se(i,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},t.prototype.clampData=function(e,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(e[0]),u=a.parse(e[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(e,n){var i=[];if(this._invTransform)return Se(i,e,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(e[0]),n),i[1]=o.coordToData(o.toLocalCoord(e[1]),n),i},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-e,o=Math.min(i[0],i[1])-e,s=Math.max(n[0],n[1])-a+e,l=Math.max(i[0],i[1])-o+e;return new pt(a,o,s,l)},t})(hE),vE=(function(r){N(t,r);function t(e,n,i,a,o){var s=r.call(this,e,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),e&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(e,n){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t})(cI);function Qh(r,t,e){e=e||{};var n=r.coordinateSystem,i=t.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,f=n.getRect(),h=[f.x,f.x+f.width,f.y,f.y+f.height],c={left:0,right:1,top:0,bottom:1,onZero:2},v=t.get("offset")||0,d=u==="x"?[h[2]-v,h[3]+v]:[h[0]-v,h[1]+v];if(o){var p=o.toGlobalCoord(o.dataToCoord(0));d[c.onZero]=Math.max(Math.min(p,d[1]),d[0])}a.position=[u==="y"?d[c[l]]:h[0],u==="x"?d[c[l]]:h[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=g[s],a.labelOffset=o?d[c[s]]-d[c.onZero]:0,t.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Qr(e.labelInside,t.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var m=t.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-m:m,a.z2=1,a}function r_(r){return r.get("coordinateSystem")==="cartesian2d"}function n_(r){var t={xAxisModel:null,yAxisModel:null};return D(t,function(e,n){var i=n.replace(/Model$/,""),a=r.getReferringComponents(i,fe).models[0];if(process.env.NODE_ENV!=="production"&&!a)throw new Error(i+' "'+Gn(r.get(i+"Index"),r.get(i+"Id"),0)+'" not found');t[n]=a}),t}var Jh=Math.log;function dE(r,t,e){var n=Ai.prototype,i=n.getTicks.call(e),a=n.getTicks.call(e,!0),o=i.length-1,s=n.getInterval.call(e),l=l0(r,t),u=l.extent,f=l.fixMin,h=l.fixMax;if(r.type==="log"){var c=Jh(r.base);u=[Jh(u[0])/c,Jh(u[1])/c]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var v=n.getExtent.call(r);f&&(u[0]=v[0]),h&&(u[1]=v[1]);var d=n.getInterval.call(r),p=u[0],g=u[1];if(f&&h)d=(g-p)/o;else if(f)for(g=u[0]+d*o;g<u[1]&&isFinite(g)&&isFinite(u[1]);)d=kh(d),g=u[0]+d*o;else if(h)for(p=u[1]-d*o;p>u[0]&&isFinite(p)&&isFinite(u[0]);)d=kh(d),p=u[1]-d*o;else{var m=r.getTicks().length-1;m>o&&(d=kh(d));var y=d*o;g=Math.ceil(u[1]/d)*d,p=Ot(g-y),p<0&&u[0]>=0?(p=0,g=Ot(y)):g>0&&u[1]<=0&&(g=0,p=-Ot(y))}var _=(i[0].value-a[0].value)/s,w=(i[o].value-a[o].value)/s;if(n.setExtent.call(r,p+d*_,g+d*w),n.setInterval.call(r,d),(_||w)&&n.setNiceExtent.call(r,p+d,g-d),process.env.NODE_ENV!=="production"){var b=n.getTicks.call(r);b[1]&&(!T2(d)||Wu(b[1].value)>Wu(d))&&Xt("The ticks may be not readable when set min: "+t.get("min")+", max: "+t.get("max")+" and alignTicks: true")}}var pE=(function(){function r(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=jh,this._initCartesian(t,e,n),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model);function i(o){var s,l=Ct(o),u=l.length;if(u){for(var f=[],h=u-1;h>=0;h--){var c=+l[h],v=o[c],d=v.model,p=v.scale;Ph(p)&&d.get("alignTicks")&&d.get("interval")==null?f.push(v):(u0(p,d),Ph(p)&&(s=v))}f.length&&(s||(s=f.pop(),u0(s.scale,s.model)),D(f,function(g){dE(g.scale,g.model,s.scale)}))}}i(n.x),i(n.y);var a={};D(n.x,function(o){i_(n,"y",o,a)}),D(n.y,function(o){i_(n,"x",o,a)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),a=!n&&t.get("containLabel"),o=gi(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(D(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=J2(u);if(f){var h=u.isHorizontal()?"height":"width",c=u.model.get(["axisLabel","margin"]);o[h]-=f[h]+c,u.position==="top"?o.y+=f.height+c:u.position==="left"&&(o.x+=f.width+c)}}}),l()),D(this._coordsList,function(u){u.calcAffineTransform()});function l(){D(s,function(u){var f=u.isHorizontal(),h=f?[0,o.width]:[0,o.height],c=u.inverse?1:0;u.setExtent(h[c],h[1-c]),gE(u,f?o.x:o.y)})}},r.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(n!=null)return n[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var n="x"+t+"y"+e;return this._coordsMap[n]}q(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===t||a[i].getAxis("y").index===e)return a[i]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(t,e,n){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},r.prototype.convertFromPixel=function(t,e,n){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},r.prototype._findConvertTarget=function(t){var e=t.seriesModel,n=t.xAxisModel||e&&e.getReferringComponents("xAxis",fe).models[0],i=t.yAxisModel||e&&e.getReferringComponents("yAxis",fe).models[0],a=t.gridModel,o=this._coordsList,s,l;if(e)s=e.coordinateSystem,mt(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},r.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},r.prototype._initCartesian=function(t,e,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(e.eachComponent("xAxis",u("x"),this),e.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,D(s.x,function(f,h){D(s.y,function(c,v){var d="x"+h+"y"+v,p=new cE(d);p.master=i,p.model=t,i._coordsMap[d]=p,i._coordsList.push(p),p.addAxis(f),p.addAxis(c)})});function u(f){return function(h,c){if(tc(h,t)){var v=h.get("position");f==="x"?v!=="top"&&v!=="bottom"&&(v=o.bottom?"top":"bottom"):v!=="left"&&v!=="right"&&(v=o.left?"right":"left"),o[v]=!0;var d=new vE(f,j2(h),[0,0],h.get("type"),v),p=d.type==="category";d.onBand=p&&h.get("boundaryGap"),d.inverse=h.get("inverse"),h.axis=d,d.model=h,d.grid=a,d.index=c,a._axesList.push(d),s[f][c]=d,l[f]++}}}},r.prototype._updateScale=function(t,e){D(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),t.eachSeries(function(i){if(r_(i)){var a=n_(i),o=a.xAxisModel,s=a.yAxisModel;if(!tc(o,e)||!tc(s,e))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),f=l.getAxis("x"),h=l.getAxis("y");n(u,f),n(u,h)}},this);function n(i,a){D(h0(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},r.prototype.getTooltipAxes=function(t){var e=[],n=[];return D(this.getCartesians(),function(i){var a=t!=null&&t!=="auto"?i.getAxis(t):i.getBaseAxis(),o=i.getOtherAxis(a);mt(e,a)<0&&e.push(a),mt(n,o)<0&&n.push(o)}),{baseAxes:e,otherAxes:n}},r.create=function(t,e){var n=[];return t.eachComponent("grid",function(i,a){var o=new r(i,t,e);o.name="grid_"+a,o.resize(i,e,!0),i.coordinateSystem=o,n.push(o)}),t.eachSeries(function(i){if(r_(i)){var a=n_(i),o=a.xAxisModel,s=a.yAxisModel,l=o.getCoordSysModel();if(process.env.NODE_ENV!=="production"){if(!l)throw new Error('Grid "'+Gn(o.get("gridIndex"),o.get("gridId"),0)+'" not found');if(o.getCoordSysModel()!==s.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var u=l.coordinateSystem;i.coordinateSystem=u.getCartesian(o.componentIndex,s.componentIndex)}}),n},r.dimensions=jh,r})();function tc(r,t){return r.getCoordSysModel()===t}function i_(r,t,e,n){e.getAxesOnZeroOf=function(){return a?[a]:[]};var i=r[t],a,o=e.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)a_(i[l])&&(a=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&a_(i[u])&&!n[f(i[u])]){a=i[u];break}a&&(n[f(a)]=!0);function f(h){return h.dim+"_"+h.index}}function a_(r){return r&&r.type!=="category"&&r.type!=="time"&&Q2(r)}function gE(r,t){var e=r.getExtent(),n=e[0]+e[1];r.toGlobalCoord=r.dim==="x"?function(i){return i+t}:function(i){return n-i+t},r.toLocalCoord=r.dim==="x"?function(i){return i-t}:function(i){return n-i+t}}var zr=Math.PI,Vr=(function(){function r(t,e){this.group=new kt,this.opt=e,this.axisModel=t,gt(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new kt({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return r.prototype.hasBuilder=function(t){return!!o_[t]},r.prototype.add=function(t){o_[t](this.opt,this.axisModel,this.group,this._transformGroup)},r.prototype.getGroup=function(){return this.group},r.innerTextLayout=function(t,e,n){var i=kd(e-t),a,o;return zo(i)?(o=n>0?"top":"bottom",a="center"):zo(i-zr)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<zr?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r})(),o_={axisLine:function(r,t,e,n){var i=t.get(["axisLine","show"]);if(i==="auto"&&r.handleAutoShown&&(i=r.handleAutoShown("axisLine")),!!i){var a=t.axis.getExtent(),o=n.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(Se(s,s,o),Se(l,l,o));var f=B({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new Lr({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});_a(h.shape,h.style.lineWidth),h.anid="line",e.add(h);var c=t.get(["axisLine","symbol"]);if(c!=null){var v=t.get(["axisLine","symbolSize"]);G(c)&&(c=[c,c]),(G(v)||xt(v))&&(v=[v,v]);var d=qm(t.get(["axisLine","symbolOffset"])||0,v),p=v[0],g=v[1];D([{rotate:r.rotation+Math.PI/2,offset:d[0],r:0},{rotate:r.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(m,y){if(c[y]!=="none"&&c[y]!=null){var _=_r(c[y],-p/2,-g/2,p,g,f.stroke,!0),w=m.r+m.offset,b=u?l:s;_.attr({rotation:m.rotate,x:b[0]+w*Math.cos(r.rotation),y:b[1]-w*Math.sin(r.rotation),silent:!0,z2:11}),e.add(_)}})}}},axisTickLabel:function(r,t,e,n){var i=_E(e,n,t,r),a=bE(e,n,t,r);if(yE(t,a,i),wE(e,n,t,r.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=dI(X(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));pI(o)}},axisName:function(r,t,e,n){var i=Qr(r.axisName,t.get("name"));if(i){var a=t.get("nameLocation"),o=r.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=t.axis.getExtent(),f=u[0]>u[1]?-1:1,h=[a==="start"?u[0]-f*l:a==="end"?u[1]+f*l:(u[0]+u[1])/2,l_(a)?r.labelOffset+o*l:0],c,v=t.get("nameRotate");v!=null&&(v=v*zr/180);var d;l_(a)?c=Vr.innerTextLayout(r.rotation,v??r.rotation,o):(c=mE(r.rotation,a,v||0,u),d=r.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(c.rotation)),!isFinite(d)&&(d=null)));var p=s.getFont(),g=t.get("nameTruncate",!0)||{},m=g.ellipsis,y=Qr(r.nameTruncateMaxWidth,g.maxWidth,d),_=new Ut({x:h[0],y:h[1],rotation:c.rotation,silent:Vr.isLabelSilent(t),style:dr(s,{text:i,font:p,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||c.textAlign,verticalAlign:s.get("verticalAlign")||c.textVerticalAlign}),z2:1});if(bs({el:_,componentModel:t,itemName:i}),_.__fullText=i,_.anid="name",t.get("triggerEvent")){var w=Vr.makeAxisEventDataBase(t);w.targetType="axisName",w.name=i,ht(_).eventData=w}n.add(_),_.updateTransform(),e.add(_),_.decomposeTransform()}}};function mE(r,t,e,n){var i=kd(e-r),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return zo(i-zr/2)?(o=l?"bottom":"top",a="center"):zo(i-zr*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",i<zr*1.5&&i>zr/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function yE(r,t,e){if(!f0(r.axis)){var n=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]);t=t||[],e=e||[];var a=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=e[0],f=e[1],h=e[e.length-1],c=e[e.length-2];n===!1?(Ne(a),Ne(u)):s_(a,o)&&(n?(Ne(o),Ne(f)):(Ne(a),Ne(u))),i===!1?(Ne(s),Ne(h)):s_(l,s)&&(i?(Ne(l),Ne(c)):(Ne(s),Ne(h)))}}function Ne(r){r&&(r.ignore=!0)}function s_(r,t){var e=r&&r.getBoundingRect().clone(),n=t&&t.getBoundingRect().clone();if(!(!e||!n)){var i=su([]);return uu(i,i,-r.rotation),e.applyTransform(jn([],i,r.getLocalTransform())),n.applyTransform(jn([],i,t.getLocalTransform())),e.intersect(n)}}function l_(r){return r==="middle"||r==="center"}function u_(r,t,e,n,i){for(var a=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=e,t&&(Se(o,o,t),Se(s,s,t));var f=new Lr({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});_a(f.shape,f.style.lineWidth),f.anid=i+"_"+r[l].tickValue,a.push(f)}return a}function _E(r,t,e,n){var i=e.axis,a=e.getModel("axisTick"),o=a.get("show");if(o==="auto"&&n.handleAutoShown&&(o=n.handleAutoShown("axisTick")),!(!o||i.scale.isBlank())){for(var s=a.getModel("lineStyle"),l=n.tickDirection*a.get("length"),u=i.getTicksCoords(),f=u_(u,t.transform,l,gt(s.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<f.length;h++)r.add(f[h]);return f}}function wE(r,t,e,n){var i=e.axis,a=e.getModel("minorTick");if(!(!a.get("show")||i.scale.isBlank())){var o=i.getMinorTicksCoords();if(o.length)for(var s=a.getModel("lineStyle"),l=n*a.get("length"),u=gt(s.getLineStyle(),gt(e.getModel("axisTick").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})),f=0;f<o.length;f++)for(var h=u_(o[f],t.transform,l,u,"minorticks_"+f),c=0;c<h.length;c++)r.add(h[c])}}function bE(r,t,e,n){var i=e.axis,a=Qr(n.axisLabelShow,e.get(["axisLabel","show"]));if(!(!a||i.scale.isBlank())){var o=e.getModel("axisLabel"),s=o.get("margin"),l=i.getViewLabels(),u=(Qr(n.labelRotate,o.get("rotate"))||0)*zr/180,f=Vr.innerTextLayout(n.rotation,u,n.labelDirection),h=e.getCategories&&e.getCategories(!0),c=[],v=Vr.isLabelSilent(e),d=e.get("triggerEvent");return D(l,function(p,g){var m=i.scale.type==="ordinal"?i.scale.getRawOrdinalNumber(p.tickValue):p.tickValue,y=p.formattedLabel,_=p.rawLabel,w=o;if(h&&h[m]){var b=h[m];q(b)&&b.textStyle&&(w=new It(b.textStyle,o,e.ecModel))}var S=w.getTextColor()||e.get(["axisLine","lineStyle","color"]),x=i.dataToCoord(m),T=w.getShallow("align",!0)||f.textAlign,M=nt(w.getShallow("alignMinLabel",!0),T),A=nt(w.getShallow("alignMaxLabel",!0),T),C=w.getShallow("verticalAlign",!0)||w.getShallow("baseline",!0)||f.textVerticalAlign,I=nt(w.getShallow("verticalAlignMinLabel",!0),C),E=nt(w.getShallow("verticalAlignMaxLabel",!0),C),L=new Ut({x,y:n.labelOffset+n.labelDirection*s,rotation:f.rotation,silent:v,z2:10+(p.level||0),style:dr(w,{text:y,align:g===0?M:g===l.length-1?A:T,verticalAlign:g===0?I:g===l.length-1?E:C,fill:Q(S)?S(i.type==="category"?_:i.type==="value"?m+"":m,g):S})});if(L.anid="label_"+m,bs({el:L,componentModel:e,itemName:y,formatterParamsExtra:{isTruncated:function(){return L.isTruncated},value:_,tickIndex:g}}),d){var P=Vr.makeAxisEventDataBase(e);P.targetType="axisLabel",P.value=_,P.tickIndex=g,i.type==="category"&&(P.dataIndex=m),ht(L).eventData=P}t.add(L),L.updateTransform(),c.push(L),r.add(L),L.decomposeTransform()}),c}}function SE(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return xE(e,r,t),e.seriesInvolved&&TE(e,r),e}function xE(r,t,e){var n=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];D(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Ka(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var f=s.model,h=f.getModel("tooltip",n);if(D(s.getAxes(),At(p,!1,null)),s.getTooltipAxes&&n&&h.get("show")){var c=h.get("trigger")==="axis",v=h.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(h.get(["axisPointer","axis"]));(c||v)&&D(d.baseAxes,At(p,v?"cross":!0,c)),v&&D(d.otherAxes,At(p,"cross",!1))}function p(g,m,y){var _=y.model.getModel("axisPointer",i),w=_.get("show");if(!(!w||w==="auto"&&!g&&!nc(_))){m==null&&(m=_.get("triggerTooltip")),_=g?CE(y,h,i,t,g,m):_;var b=_.get("snap"),S=_.get("triggerEmphasis"),x=Ka(y.model),T=m||b||y.type==="category",M=r.axesInfo[x]={key:x,axis:y,coordSys:s,axisPointerModel:_,triggerTooltip:m,triggerEmphasis:S,involveSeries:T,snap:b,useHandle:nc(_),seriesModels:[],linkGroup:null};u[x]=M,r.seriesInvolved=r.seriesInvolved||T;var A=DE(a,y);if(A!=null){var C=o[A]||(o[A]={axesInfo:{}});C.axesInfo[x]=M,C.mapper=a[A].mapper,M.linkGroup=C}}}})}function CE(r,t,e,n,i,a){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};D(s,function(c){l[c]=ut(o.get(c))}),l.snap=r.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var f=o.get(["label","show"]);if(u.show=f??!0,!a){var h=l.lineStyle=o.get("crossStyle");h&&gt(u,h.textStyle)}}return r.model.getModel("axisPointer",new It(l,e,n))}function TE(r,t){t.eachSeries(function(e){var n=e.coordinateSystem,i=e.get(["tooltip","trigger"],!0),a=e.get(["tooltip","show"],!0);!n||i==="none"||i===!1||i==="item"||a===!1||e.get(["axisPointer","show"],!0)===!1||D(r.coordSysAxesInfo[Ka(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function DE(r,t){for(var e=t.model,n=t.dim,i=0;i<r.length;i++){var a=r[i]||{};if(ec(a[n+"AxisId"],e.id)||ec(a[n+"AxisIndex"],e.componentIndex)||ec(a[n+"AxisName"],e.name))return i}}function ec(r,t){return r==="all"||W(r)&&mt(r,t)>=0||r===t}function ME(r){var t=rc(r);if(t){var e=t.axisPointerModel,n=t.axis.scale,i=e.option,a=e.get("status"),o=e.get("value");o!=null&&(o=n.parse(o));var s=nc(e);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}function rc(r){var t=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[Ka(r)]}function AE(r){var t=rc(r);return t&&t.axisPointerModel}function nc(r){return!!r.get(["handle","show"])}function Ka(r){return r.type+"||"+r.id}var ic={},f_=(function(r){N(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,n,i,a){this.axisPointerClass&&ME(e),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,i,!0)},t.prototype.updateAxisPointer=function(e,n,i,a){this._doUpdateAxisPointerClass(e,i,!1)},t.prototype.remove=function(e,n){var i=this._axisPointer;i&&i.remove(n)},t.prototype.dispose=function(e,n){this._disposeAxisPointer(n),r.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,i){var a=t.getAxisPointerClass(this.axisPointerClass);if(a){var o=AE(e);o?(this._axisPointer||(this._axisPointer=new a)).render(e,o,n,i):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,n){if(process.env.NODE_ENV!=="production"&&ic[e])throw new Error("axisPointer "+e+" exists");ic[e]=n},t.getAxisPointerClass=function(e){return e&&ic[e]},t.type="axis",t})(Re),ac=Nt();function IE(r,t,e,n){var i=e.axis;if(!i.scale.isBlank()){var a=e.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var f=s.length,h=ac(r).splitAreaColors,c=tt(),v=0;if(h)for(var d=0;d<u.length;d++){var p=h.get(u[d].tickValue);if(p!=null){v=(p+(f-1)*d)%f;break}}var g=i.toGlobalCoord(u[0].coord),m=o.getAreaStyle();s=W(s)?s:[s];for(var d=1;d<u.length;d++){var y=i.toGlobalCoord(u[d].coord),_=void 0,w=void 0,b=void 0,S=void 0;i.isHorizontal()?(_=g,w=l.y,b=y-_,S=l.height,g=_+b):(_=l.x,w=g,b=l.width,S=y-w,g=w+S);var x=u[d-1].tickValue;x!=null&&c.set(x,v),t.add(new Tt({anid:x!=null?"area_"+x:null,shape:{x:_,y:w,width:b,height:S},style:gt({fill:s[v]},m),autoBatch:!0,silent:!0})),v=(v+1)%f}ac(r).splitAreaColors=c}}}function EE(r){ac(r).splitAreaColors=null}var LE=["axisLine","axisTickLabel","axisName"],PE=["splitArea","splitLine","minorSplitLine"],h_=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="CartesianAxisPointer",e}return t.prototype.render=function(e,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new kt,this.group.add(this._axisGroup),!!e.get("show")){var s=e.getCoordSysModel(),l=Qh(s,e),u=new Vr(e,B({handleAutoShown:function(h){for(var c=s.coordinateSystem.getCartesians(),v=0;v<c.length;v++)if(Ph(c[v].getOtherAxis(e.axis).scale))return!0;return!1}},l));D(LE,u.add,u),this._axisGroup.add(u.getGroup()),D(PE,function(h){e.get([h,"show"])&&kE[h](this,this._axisGroup,e,s)},this);var f=a&&a.type==="changeAxisOrder"&&a.isInitSort;f||og(o,this._axisGroup,e),r.prototype.render.call(this,e,n,i,a)}},t.prototype.remove=function(){EE(this)},t.type="cartesianAxis",t})(f_),kE={splitLine:function(r,t,e,n){var i=e.axis;if(!i.scale.isBlank()){var a=e.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color"),l=a.get("showMinLine")!==!1,u=a.get("showMaxLine")!==!1;s=W(s)?s:[s];for(var f=n.coordinateSystem.getRect(),h=i.isHorizontal(),c=0,v=i.getTicksCoords({tickModel:a}),d=[],p=[],g=o.getLineStyle(),m=0;m<v.length;m++){var y=i.toGlobalCoord(v[m].coord);if(!(m===0&&!l||m===v.length-1&&!u)){var _=v[m].tickValue;h?(d[0]=y,d[1]=f.y,p[0]=y,p[1]=f.y+f.height):(d[0]=f.x,d[1]=y,p[0]=f.x+f.width,p[1]=y);var w=c++%s.length,b=new Lr({anid:_!=null?"line_"+_:null,autoBatch:!0,shape:{x1:d[0],y1:d[1],x2:p[0],y2:p[1]},style:gt({stroke:s[w]},g),silent:!0});_a(b.shape,g.lineWidth),t.add(b)}}}},minorSplitLine:function(r,t,e,n){var i=e.axis,a=e.getModel("minorSplitLine"),o=a.getModel("lineStyle"),s=n.coordinateSystem.getRect(),l=i.isHorizontal(),u=i.getMinorTicksCoords();if(u.length)for(var f=[],h=[],c=o.getLineStyle(),v=0;v<u.length;v++)for(var d=0;d<u[v].length;d++){var p=i.toGlobalCoord(u[v][d].coord);l?(f[0]=p,f[1]=s.y,h[0]=p,h[1]=s.y+s.height):(f[0]=s.x,f[1]=p,h[0]=s.x+s.width,h[1]=p);var g=new Lr({anid:"minor_line_"+u[v][d].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:h[0],y2:h[1]},style:c,silent:!0});_a(g.shape,c.lineWidth),t.add(g)}},splitArea:function(r,t,e,n){IE(r,t,e,n)}},c_=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="xAxis",t})(h_),RE=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=c_.type,e}return t.type="yAxis",t})(h_),OE=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="grid",e}return t.prototype.render=function(e,n){this.group.removeAll(),e.get("show")&&this.group.add(new Tt({shape:e.coordinateSystem.getRect(),style:gt({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t})(Re),v_={offset:0};function d_(r){r.registerComponentView(OE),r.registerComponentModel(aE),r.registerCoordinateSystem("cartesian2d",pE),J0(r,"x",qh,v_),J0(r,"y",qh,v_),r.registerComponentView(c_),r.registerComponentView(RE),r.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}function NE(r){Ye(d_),r.registerSeriesModel(tE),r.registerChartView(iE),r.registerLayout(Uh("scatter"))}var p_="\0_ec_interaction_mutex";function g_(r,t){return!!BE(r)[t]}function BE(r){return r[p_]||(r[p_]={})}In({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},ee);var FE=(function(r){N(t,r);function t(e){var n=r.call(this)||this;n._zr=e;var i=J(n._mousedownHandler,n),a=J(n._mousemoveHandler,n),o=J(n._mouseupHandler,n),s=J(n._mousewheelHandler,n),l=J(n._pinchHandler,n);return n.enable=function(u,f){this.disable(),this._opt=gt(ut(f)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),u==null&&(u=!0),(u===!0||u==="move"||u==="pan")&&(e.on("mousedown",i),e.on("mousemove",a),e.on("mouseup",o)),(u===!0||u==="scale"||u==="zoom")&&(e.on("mousewheel",s),e.on("pinch",l))},n.disable=function(){e.off("mousedown",i),e.off("mousemove",a),e.off("mouseup",o),e.off("mousewheel",s),e.off("pinch",l)},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!Wv(e)){for(var n=e.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var i=e.offsetX,a=e.offsetY;this.pointerChecker&&this.pointerChecker(e,i,a)&&(this._x=i,this._y=a,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(!(!this._dragging||!bl("moveOnMouseMove",e,this._opt)||e.gestureEvent==="pinch"||g_(this._zr,"globalPan"))){var n=e.offsetX,i=e.offsetY,a=this._x,o=this._y,s=n-a,l=i-o;this._x=n,this._y=i,this._opt.preventDefaultMouseMove&&qn(e.event),m_(this,"pan","moveOnMouseMove",e,{dx:s,dy:l,oldX:a,oldY:o,newX:n,newY:i,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){Wv(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var n=bl("zoomOnMouseWheel",e,this._opt),i=bl("moveOnMouseWheel",e,this._opt),a=e.wheelDelta,o=Math.abs(a),s=e.offsetX,l=e.offsetY;if(!(a===0||!n&&!i)){if(n){var u=o>3?1.4:o>1?1.2:1.1,f=a>0?u:1/u;oc(this,"zoom","zoomOnMouseWheel",e,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(i){var h=Math.abs(a),c=(a>0?1:-1)*(h>3?.4:h>1?.15:.05);oc(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:c,originX:s,originY:l,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){if(!g_(this._zr,"globalPan")){var n=e.pinchScale>1?1.1:1/1.1;oc(this,"zoom",null,e,{scale:n,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t})(ze);function oc(r,t,e,n,i){r.pointerChecker&&r.pointerChecker(n,i.originX,i.originY)&&(qn(n.event),m_(r,t,e,n,i))}function m_(r,t,e,n,i){i.isAvailableBehavior=J(bl,null,e,n),r.trigger(t,i)}function bl(r,t,e){var n=e[r];return!r||n&&(!G(n)||t.event[n+"Key"])}function Sl(r,t,e,n,i,a){r=r||0;var o=e[1]-e[0];if(i!=null&&(i=Ei(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(t[1]-t[0]);s=Ei(s,[0,o]),i=a=Ei(s,[i,a]),n=0}t[0]=Ei(t[0],e),t[1]=Ei(t[1],e);var l=sc(t,n);t[n]+=r;var u=i||0,f=e.slice();l.sign<0?f[0]+=u:f[1]-=u,t[n]=Ei(t[n],f);var h;return h=sc(t,n),i!=null&&(h.sign!==l.sign||h.span<i)&&(t[1-n]=t[n]+l.sign*i),h=sc(t,n),a!=null&&h.span>a&&(t[1-n]=t[n]+h.sign*a),t}function sc(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function Ei(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var zE=(function(){function r(){}return r.prototype._hasEncodeRule=function(t){var e=this.getEncode();return e&&e.get(t)!=null},r.prototype.getInitialData=function(t,e){var n,i=e.getComponent("xAxis",this.get("xAxisIndex")),a=e.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(t.layout="horizontal",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(t.layout="vertical",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var u=["x","y"],f=t.layout==="horizontal"?0:1,h=this._baseAxisDim=u[f],c=u[1-f],v=[i,a],d=v[f].get("type"),p=v[1-f].get("type"),g=t.data;if(g&&l){var m=[];D(g,function(w,b){var S;W(w)?(S=w.slice(),w.unshift(b)):W(w.value)?(S=B({},w),S.value=S.value.slice(),w.value.unshift(b)):S=w,m.push(S)}),t.data=m}var y=this.defaultValueDimensions,_=[{name:h,type:Ah(d),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:Ah(p),dimsDef:y.slice()}];return JI(this,{coordDimensions:_,dimensionsCount:y.length+1,encodeDefaulter:At(Fg,_,this)})},r.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},r})(),VE=["itemStyle","borderColor"],HE=["itemStyle","borderColor0"],WE=["itemStyle","borderColorDoji"],GE=["itemStyle","color"],$E=["itemStyle","color0"];function lc(r,t){return t.get(r>0?GE:$E)}function uc(r,t){return t.get(r===0?WE:r>0?VE:HE)}var UE={seriesType:"candlestick",plan:Oa(),performRawSeries:!0,reset:function(r,t){if(!t.isSeriesFiltered(r)){var e=r.pipelineContext.large;return!e&&{progress:function(n,i){for(var a;(a=n.next())!=null;){var o=i.getItemModel(a),s=i.getItemLayout(a).sign,l=o.getItemStyle();l.fill=lc(s,o),l.stroke=uc(s,o)||l.fill;var u=i.ensureUniqueItemVisual(a,"style");B(u,l)}}}}}},YE=["color","borderColor"],ZE=(function(r){N(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,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,n,i){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,n):this._incrementalRenderNormal(e,n)},t.prototype.eachRendered=function(e){ba(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var n=e.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(e){var n=e.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=e.get("clip",!0),l=e.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(f){if(n.hasValue(f)){var h=n.getItemLayout(f);if(s&&y_(u,h))return;var c=fc(h,f,!0);nr(c,{shape:{points:h.ends}},e,f),hc(c,n,f,o),a.add(c),n.setItemGraphicEl(f,c)}}).update(function(f,h){var c=i.getItemGraphicEl(h);if(!n.hasValue(f)){a.remove(c);return}var v=n.getItemLayout(f);if(s&&y_(u,v)){a.remove(c);return}c?(ce(c,{shape:{points:v.ends}},e,f),Tf(c)):c=fc(v),hc(c,n,f,o),a.add(c),n.setItemGraphicEl(f,c)}).remove(function(f){var h=i.getItemGraphicEl(f);h&&a.remove(h)}).execute(),this._data=n},t.prototype._renderLarge=function(e){this._clear(),__(e,this.group);var n=e.get("clip",!0)?L0(e.coordinateSystem,!1,e):null;n?this.group.setClipPath(n):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=e.next())!=null;){var s=i.getItemLayout(o),l=fc(s);hc(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(e,n){__(n,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t})(_e),XE=(function(){function r(){}return r})(),qE=(function(r){N(t,r);function t(e){var n=r.call(this,e)||this;return n.type="normalCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new XE},t.prototype.buildPath=function(e,n){var i=n.points;this.__simpleBox?(e.moveTo(i[4][0],i[4][1]),e.lineTo(i[6][0],i[6][1])):(e.moveTo(i[0][0],i[0][1]),e.lineTo(i[1][0],i[1][1]),e.lineTo(i[2][0],i[2][1]),e.lineTo(i[3][0],i[3][1]),e.closePath(),e.moveTo(i[4][0],i[4][1]),e.lineTo(i[5][0],i[5][1]),e.moveTo(i[6][0],i[6][1]),e.lineTo(i[7][0],i[7][1]))},t})(vt);function fc(r,t,e){var n=r.ends;return new qE({shape:{points:e?KE(n,r):n},z2:100})}function y_(r,t){for(var e=!0,n=0;n<t.ends.length;n++)if(r.contain(t.ends[n][0],t.ends[n][1])){e=!1;break}return e}function hc(r,t,e,n){var i=t.getItemModel(e);r.useStyle(t.getItemVisual(e,"style")),r.style.strokeNoScale=!0,r.__simpleBox=n,os(r,i);var a=t.getItemLayout(e).sign;D(r.states,function(s,l){var u=i.getModel(l),f=lc(a,u),h=uc(a,u)||f,c=s.style||(s.style={});f&&(c.fill=f),h&&(c.stroke=h)});var o=i.getModel("emphasis");da(r,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function KE(r,t){return X(r,function(e){return e=e.slice(),e[1]=t.initBaseline,e})}var jE=(function(){function r(){}return r})(),cc=(function(r){N(t,r);function t(e){var n=r.call(this,e)||this;return n.type="largeCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new jE},t.prototype.buildPath=function(e,n){for(var i=n.points,a=0;a<i.length;)if(this.__sign===i[a++]){var o=i[a++];e.moveTo(o,i[a++]),e.lineTo(o,i[a++])}else a+=3},t})(vt);function __(r,t,e,n){var i=r.getData(),a=i.getLayout("largePoints"),o=new cc({shape:{points:a},__sign:1,ignoreCoarsePointer:!0});t.add(o);var s=new cc({shape:{points:a},__sign:-1,ignoreCoarsePointer:!0});t.add(s);var l=new cc({shape:{points:a},__sign:0,ignoreCoarsePointer:!0});t.add(l),vc(1,o,r),vc(-1,s,r),vc(0,l,r),n&&(o.incremental=!0,s.incremental=!0),e&&e.push(o,s)}function vc(r,t,e,n){var i=uc(r,e)||lc(r,e),a=e.getModel("itemStyle").getItemStyle(YE);t.useStyle(a),t.style.fill=null,t.style.stroke=i}var w_=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],e}return t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,n,i){var a=n.getItemLayout(e);return a&&i.rect(a.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t})(ke);Fe(w_,zE,!0);function QE(r){!r||!W(r.series)||D(r.series,function(t){q(t)&&t.type==="k"&&(t.type="candlestick")})}var JE={seriesType:"candlestick",plan:Oa(),reset:function(r){var t=r.coordinateSystem,e=r.getData(),n=tL(r,e),i=0,a=1,o=["x","y"],s=e.getDimensionIndex(e.mapDimension(o[i])),l=X(e.mapDimensionsAll(o[a]),e.getDimensionIndex,e),u=l[0],f=l[1],h=l[2],c=l[3];if(e.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?d:v};function v(p,g){for(var m,y=g.getStore();(m=p.next())!=null;){var _=y.get(s,m),w=y.get(u,m),b=y.get(f,m),S=y.get(h,m),x=y.get(c,m),T=Math.min(w,b),M=Math.max(w,b),A=z(T,_),C=z(M,_),I=z(S,_),E=z(x,_),L=[];O(L,C,0),O(L,A,1),L.push($(E),$(C),$(I),$(A));var P=g.getItemModel(m),k=!!P.get(["itemStyle","borderColorDoji"]);g.setItemLayout(m,{sign:b_(y,m,w,b,f,k),initBaseline:w>b?C[a]:A[a],ends:L,brushRect:V(S,x,_)})}function z(Z,et){var at=[];return at[i]=et,at[a]=Z,isNaN(et)||isNaN(Z)?[NaN,NaN]:t.dataToPoint(at)}function O(Z,et,at){var ot=et.slice(),st=et.slice();ot[i]=ws(ot[i]+n/2,1,!1),st[i]=ws(st[i]-n/2,1,!0),at?Z.push(ot,st):Z.push(st,ot)}function V(Z,et,at){var ot=z(Z,at),st=z(et,at);return ot[i]-=n/2,st[i]-=n/2,{x:ot[0],y:ot[1],width:n,height:st[1]-ot[1]}}function $(Z){return Z[i]=ws(Z[i],1),Z}}function d(p,g){for(var m=or(p.count*4),y=0,_,w=[],b=[],S,x=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(S=p.next())!=null;){var M=x.get(s,S),A=x.get(u,S),C=x.get(f,S),I=x.get(h,S),E=x.get(c,S);if(isNaN(M)||isNaN(I)||isNaN(E)){m[y++]=NaN,y+=3;continue}m[y++]=b_(x,S,A,C,f,T),w[i]=M,w[a]=I,_=t.dataToPoint(w,null,b),m[y++]=_?_[0]:NaN,m[y++]=_?_[1]:NaN,w[a]=E,_=t.dataToPoint(w,null,b),m[y++]=_?_[1]:NaN}g.setLayout("largePoints",m)}}};function b_(r,t,e,n,i,a){var o;return e>n?o=-1:e<n?o=1:o=a?0:t>0?r.get(i,t-1)<=n?1:-1:1,o}function tL(r,t){var e=r.getBaseAxis(),n,i=e.type==="category"?e.getBandWidth():(n=e.getExtent(),Math.abs(n[1]-n[0])/t.count()),a=Rt(nt(r.get("barMaxWidth"),i),i),o=Rt(nt(r.get("barMinWidth"),1),i),s=r.get("barWidth");return s!=null?Rt(s,i):Math.max(Math.min(i/2,a),o)}function eL(r){r.registerChartView(ZE),r.registerSeriesModel(w_),r.registerPreprocessor(QE),r.registerVisual(UE),r.registerLayout(JE)}var kn=Nt(),S_=ut,dc=J,rL=(function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,n,i){var a=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,t,e,n);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var h=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new kt,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),n.getZr().add(s);else{var c=At(x_,e,h);this.updatePointerEl(s,u,c),this.updateLabelEl(s,u,c,e)}D_(s,e,!0),this._renderHandle(a)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,a=i.type==="category",o=e.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=rc(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(t,e,n,i,a){},r.prototype.createPointerEl=function(t,e,n,i){var a=e.pointer;if(a){var o=kn(t).pointerEl=new BT[a.type](S_(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,n,i){if(e.label){var a=kn(t).labelEl=new Ut(S_(e.label));t.add(a),T_(a,i)}},r.prototype.updatePointerEl=function(t,e,n){var i=kn(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,n,i){var a=kn(t).labelEl;a&&(a.setStyle(e.label.style),n(a,{x:e.label.x,y:e.label.y}),T_(a,i))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=e.getModel("handle"),o=e.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=Af(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){qn(u.event)},onmousedown:dc(this._onHandleDragMove,this,0,0),drift:dc(this._onHandleDragMove,this),ondragend:dc(this._onHandleDragEnd,this)}),n.add(i)),D_(i,e,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");W(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Ys(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){x_(this._axisPointerModel,!e&&this._moveAnimation,this._handle,pc(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(pc(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(pc(i)),kn(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Zs(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}},r})();function x_(r,t,e,n){C_(kn(e).lastProp,n)||(kn(e).lastProp=n,t?ce(e,n,r):(e.stopAnimation(),e.attr(n)))}function C_(r,t){if(q(r)&&q(t)){var e=!0;return D(t,function(n,i){e=e&&C_(r[i],n)}),!!e}else return r===t}function T_(r,t){r[t.get(["label","show"])?"show":"hide"]()}function pc(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function D_(r,t,e){var n=t.get("z"),i=t.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=e)})}function nL(r){var t=r.get("type"),e=r.getModel(t+"Style"),n;return t==="line"?(n=e.getLineStyle(),n.fill=null):t==="shadow"&&(n=e.getAreaStyle(),n.stroke=null),n}function iL(r,t,e,n,i){var a=e.get("value"),o=M_(a,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=Ns(s.get("padding")||0),u=s.getFont(),f=Nu(o,u),h=i.position,c=f.width+l[1]+l[3],v=f.height+l[0]+l[2],d=i.align;d==="right"&&(h[0]-=c),d==="center"&&(h[0]-=c/2);var p=i.verticalAlign;p==="bottom"&&(h[1]-=v),p==="middle"&&(h[1]-=v/2),aL(h,c,v,n);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:dr(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function aL(r,t,e,n){var i=n.getWidth(),a=n.getHeight();r[0]=Math.min(r[0]+t,i)-t,r[1]=Math.min(r[1]+e,a)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function M_(r,t,e,n,i){r=t.scale.parse(r);var a=t.scale.getLabel({value:r},{precision:i.precision}),o=i.formatter;if(o){var s={value:Bh(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};D(n,function(l){var u=e.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,h=u&&u.getDataParams(f);h&&s.seriesData.push(h)}),G(o)?a=o.replace("{value}",a):Q(o)&&(a=o(s))}return a}function A_(r,t,e){var n=Kn();return uu(n,n,e.rotation),lu(n,n,e.position),wa([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],n)}function oL(r,t,e,n,i,a){var o=Vr.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=i.get(["label","margin"]),iL(t,n,i,a,{position:A_(n.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function sL(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function lL(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}var uL=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),f=I_(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var c=nL(a),v=fL[u](s,h,f);v.style=c,e.graphicKey=v.type,e.pointer=v}var d=Qh(l.model,i);oL(n,e,d,i,a,o)},t.prototype.getHandleTransform=function(e,n,i){var a=Qh(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=A_(n.axis,e,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=I_(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[e.x,e.y];h[f]+=n[f],h[f]=Math.min(l[1],h[f]),h[f]=Math.max(l[0],h[f]);var c=(u[1]+u[0])/2,v=[c,c];v[f]=h[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:e.rotation,cursorPoint:v,tooltipOption:d[f]}},t})(rL);function I_(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var fL={line:function(r,t,e){var n=sL([t,e[0]],[t,e[1]],E_(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,t,e){var n=Math.max(1,r.getBandWidth()),i=e[1]-e[0];return{type:"Rect",shape:lL([t-n/2,e[0]],[n,i],E_(r))}}};function E_(r){return r.dim==="x"?0:1}var hL=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t})(dt),wr=Nt(),cL=D;function L_(r,t,e){if(!j.node){var n=t.getZr();wr(n).records||(wr(n).records={}),vL(n,t);var i=wr(n).records[r]||(wr(n).records[r]={});i.handler=e}}function vL(r,t){if(wr(r).initialized)return;wr(r).initialized=!0,e("click",At(P_,"click")),e("mousemove",At(P_,"mousemove")),e("globalout",pL);function e(n,i){r.on(n,function(a){var o=gL(t);cL(wr(r).records,function(s){s&&i(s,a,o.dispatchAction)}),dL(o.pendings,t)})}}function dL(r,t){var e=r.showTip.length,n=r.hideTip.length,i;e?i=r.showTip[e-1]:n&&(i=r.hideTip[n-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function pL(r,t,e){r.handler("leave",null,e)}function P_(r,t,e,n){t.handler(r,e,n)}function gL(r){var t={showTip:[],hideTip:[]},e=function(n){var i=t[n.type];i?i.push(n):(n.dispatchAction=e,r.dispatchAction(n))};return{dispatchAction:e,pendings:t}}function gc(r,t){if(!j.node){var e=t.getZr(),n=(wr(e).records||{})[r];n&&(wr(e).records[r]=null)}}var mL=(function(r){N(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,n,i){var a=n.getComponent("tooltip"),o=e.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";L_("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,n){gc("axisPointer",n)},t.prototype.dispose=function(e,n){gc("axisPointer",n)},t.type="axisPointer",t})(Re);function k_(r,t){var e=[],n=r.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=sn(a,r);if(o==null||o<0||W(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)e=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),h=f.dim,c=u.dim,v=h==="x"||h==="radius"?1:0,d=a.mapDimension(c),p=[];p[v]=a.get(d,o),p[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(p)||[]}else e=l.dataToPoint(a.getValues(X(l.dimensions,function(m){return a.mapDimension(m)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),e=[g.x+g.width/2,g.y+g.height/2]}return{point:e,el:s}}var R_=Nt();function yL(r,t,e){var n=r.currTrigger,i=[r.x,r.y],a=r,o=r.dispatchAction||J(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){xl(i)&&(i=k_({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=xl(i),u=a.axesInfo,f=s.axesInfo,h=n==="leave"||xl(i),c={},v={},d={list:[],map:{}},p={showPointer:At(wL,v),showTooltip:At(bL,d)};D(s.coordSysMap,function(m,y){var _=l||m.containPoint(i);D(s.coordSysAxesInfo[y],function(w,b){var S=w.axis,x=TL(u,w);if(!h&&_&&(!u||x)){var T=x&&x.value;T==null&&!l&&(T=S.pointToData(i)),T!=null&&O_(w,T,p,!1,c)}})});var g={};return D(f,function(m,y){var _=m.linkGroup;_&&!v[y]&&D(_.axesInfo,function(w,b){var S=v[b];if(w!==m&&S){var x=S.value;_.mapper&&(x=m.axis.scale.parse(_.mapper(x,N_(w),N_(m)))),g[m.key]=x}})}),D(g,function(m,y){O_(f[y],m,p,!0,c)}),SL(v,f,c),xL(d,i,r,o),CL(f,o,e),c}}function O_(r,t,e,n,i){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=_L(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&B(i,s[0]),!n&&r.snap&&a.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function _L(r,t){var e=t.axis,n=e.dim,i=r,a=[],o=Number.MAX_VALUE,s=-1;return D(t.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(n),h,c;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(f,r,e);c=v.dataIndices,h=v.nestestValue}else{if(c=l.getData().indicesOfNearest(f[0],r,e.type==="category"?.5:null),!c.length)return;h=l.getData().get(f[0],c[0])}if(!(h==null||!isFinite(h))){var d=r-h,p=Math.abs(d);p<=o&&((p<o||d>=0&&s<0)&&(o=p,s=d,i=h,a.length=0),D(c,function(g){a.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:a,snapToValue:i}}function wL(r,t,e,n){r[t.key]={value:e,payloadBatch:n}}function bL(r,t,e,n){var i=e.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var l=t.coordSys.model,u=Ka(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function SL(r,t,e){var n=e.axesInfo=[];D(t,function(i,a){var o=i.axisPointerModel.option,s=r[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function xL(r,t,e,n){if(xl(t)||!r.list.length){n({type:"hideTip"});return}var i=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:r.list})}function CL(r,t,e){var n=e.getZr(),i="axisPointerLastHighlights",a=R_(n)[i]||{},o=R_(n)[i]={};D(r,function(u,f){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&D(h.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],l=[];D(a,function(u,f){!o[f]&&l.push(u)}),D(o,function(u,f){!a[f]&&s.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function TL(r,t){for(var e=0;e<(r||[]).length;e++){var n=r[e];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function N_(r){var t=r.axis.model,e={},n=e.axisDim=r.axis.dim;return e.axisIndex=e[n+"AxisIndex"]=t.componentIndex,e.axisName=e[n+"AxisName"]=t.name,e.axisId=e[n+"AxisId"]=t.id,e}function xl(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function mc(r){f_.registerAxisPointerClass("CartesianAxisPointer",uL),r.registerComponentModel(hL),r.registerComponentView(mL),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!W(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=SE(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},yL)}function DL(r){Ye(d_),Ye(mc)}var B_=["x","y","radius","angle","single"],ML=["cartesian2d","polar","singleAxis"];function AL(r){var t=r.get("coordinateSystem");return mt(ML,t)>=0}function Hr(r){return process.env.NODE_ENV!=="production"&&it(r),r+"Axis"}function IL(r,t){var e=tt(),n=[],i=tt();r.eachComponent({mainType:"dataZoom",query:t},function(f){i.get(f.uid)||s(f)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(f){!i.get(f.uid)&&l(f)&&(s(f),a=!0)}function s(f){i.set(f.uid,!0),n.push(f),u(f)}function l(f){var h=!1;return f.eachTargetAxis(function(c,v){var d=e.get(c);d&&d[v]&&(h=!0)}),h}function u(f){f.eachTargetAxis(function(h,c){(e.get(h)||e.set(h,[]))[c]=!0})}return n}function F_(r){var t=r.ecModel,e={infoList:[],infoMap:tt()};return r.eachTargetAxis(function(n,i){var a=t.getComponent(Hr(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=e.infoMap.get(s);l||(l={model:o,axisModels:[]},e.infoList.push(l),e.infoMap.set(s,l)),l.axisModels.push(a)}}}),e}var yc=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r})(),Cl=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,n,i){var a=z_(e);this.settledOption=a,this.mergeDefaultAndTheme(e,i),this._doInit(a)},t.prototype.mergeOption=function(e){var n=z_(e);ct(this.option,e,!0),ct(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(e){var n=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var i=this.settledOption;D([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),n=this._targetAxisInfoMap=tt(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var n=!1;return D(B_,function(i){var a=this.getReferringComponents(Hr(i),Mx);if(a.specified){n=!0;var o=new yc;D(a.models,function(s){o.add(s.componentIndex)}),e.set(i,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(e,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===n}});l(s,"single")}function l(u,f){var h=u[0];if(h){var c=new yc;if(c.add(h.componentIndex),e.set(f,c),a=!1,f==="x"||f==="y"){var v=h.getReferringComponents("grid",fe).models[0];v&&D(u,function(d){h.componentIndex!==d.componentIndex&&v===d.getReferringComponents("grid",fe).models[0]&&c.add(d.componentIndex)})}}}a&&D(B_,function(u){if(a){var f=i.findComponents({mainType:Hr(u),filter:function(c){return c.get("type",!0)==="category"}});if(f[0]){var h=new yc;h.add(f[0].componentIndex),e.set(u,h),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(n){!e&&(e=n)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var n=this._rangePropMode,i=this.get("rangeMode");D([["start","startValue"],["end","endValue"]],function(a,o){var s=e[a[0]]!=null,l=e[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(n,i){e==null&&(e=this.ecModel.getComponent(Hr(n),i))},this),e},t.prototype.eachTargetAxis=function(e,n){this._targetAxisInfoMap.each(function(i,a){D(i.indexList,function(o){e.call(n,a,o)})})},t.prototype.getAxisProxy=function(e,n){var i=this.getAxisModel(e,n);if(i)return i.__dzAxisProxy},t.prototype.getAxisModel=function(e,n){process.env.NODE_ENV!=="production"&&it(e&&n!=null);var i=this._targetAxisInfoMap.get(e);if(i&&i.indexMap[n])return this.ecModel.getComponent(Hr(e),n)},t.prototype.setRawRange=function(e){var n=this.option,i=this.settledOption;D([["start","startValue"],["end","endValue"]],function(a){(e[a[0]]!=null||e[a[1]]!=null)&&(n[a[0]]=i[a[0]]=e[a[0]],n[a[1]]=i[a[1]]=e[a[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var n=this.option;D(["start","startValue","end","endValue"],function(i){n[i]=e[i]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,n){if(e==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(e,n).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;a<i.length;a++)for(var o=i[a],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;n||(n=u)}return n},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return process.env.NODE_ENV!=="production"&&it(this._orient),this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t})(dt);function z_(r){var t={};return D(["start","end","startValue","endValue","throttle"],function(e){r.hasOwnProperty(e)&&(t[e]=r[e])}),t}var V_=(function(r){N(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,n,i,a){this.dataZoomModel=e,this.ecModel=n,this.api=i},t.type="dataZoom",t})(Re),Li=D,H_=ia,EL=(function(){function r(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}return r.prototype.hostedBy=function(t){return this._dataZoomModel===t},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(e){if(AL(e)){var n=Hr(this._dimName),i=e.getReferringComponents(n,fe).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}},this),t},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return ut(this._minMaxSpan)},r.prototype.calculateDataWindow=function(t){var e=this._dataExtent,n=this.getAxisModel(),i=n.axis.scale,a=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;Li(["start","end"],function(c,v){var d=t[c],p=t[c+"Value"];a[v]==="percent"?(d==null&&(d=o[v]),p=i.parse(Zt(d,o,e))):(u=!0,p=p==null?e[v]:i.parse(p),d=Zt(p,e,o)),l[v]=p==null||isNaN(p)?e[v]:p,s[v]=d==null||isNaN(d)?o[v]:d}),H_(l),H_(s);var f=this._minMaxSpan;u?h(l,s,e,o,!1):h(s,l,o,e,!0);function h(c,v,d,p,g){var m=g?"Span":"ValueSpan";Sl(0,c,d,"all",f["min"+m],f["max"+m]);for(var y=0;y<2;y++)v[y]=Zt(c[y],d,p,!0),g&&(v[y]=i.parse(v[y]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=LL(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(t,e){if(t!==this._dataZoomModel)return;var n=this._dimName,i=this.getTargetSeriesModels(),a=t.get("filterMode"),o=this._valueWindow;if(a==="none")return;Li(i,function(l){var u=l.getData(),f=u.mapDimensionsAll(n);if(f.length){if(a==="weakFilter"){var h=u.getStore(),c=X(f,function(v){return u.getDimensionIndex(v)},u);u.filterSelf(function(v){for(var d,p,g,m=0;m<f.length;m++){var y=h.get(c[m],v),_=!isNaN(y),w=y<o[0],b=y>o[1];if(_&&!w&&!b)return!0;_&&(g=!0),w&&(d=!0),b&&(p=!0)}return g&&d&&p})}else Li(f,function(v){if(a==="empty")l.setData(u=u.map(v,function(p){return s(p)?p:NaN}));else{var d={};d[v]=o,u.selectRange(d)}});Li(f,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;Li(["min","max"],function(i){var a=e.get(i+"Span"),o=e.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=Zt(n[0]+o,n,[0,100],!0):a!=null&&(o=Zt(a,[0,100],n,!0)-n[0]),t[i+"Span"]=a,t[i+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=Pd(n,[0,500]);i=Math.min(i,20);var a=t.axis.scale.rawExtentInfo;e[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),e[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},r})();function LL(r,t,e){var n=[1/0,-1/0];Li(e,function(o){eI(n,o.getData(),t)});var i=r.getAxisModel(),a=s0(i.axis.scale,i,n).calculate();return[a.min,a.max]}var PL={getTargetSeries:function(r){function t(i){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(Hr(o),s);i(o,s,l,a)})})}t(function(i,a,o,s){o.__dzAxisProxy=null});var e=[];t(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new EL(i,a,s,r),e.push(o.__dzAxisProxy))});var n=tt();return D(e,function(i){D(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(n,i){e.getAxisProxy(n,i).reset(e)}),e.eachTargetAxis(function(n,i){e.getAxisProxy(n,i).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var n=e.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();e.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function kL(r){r.registerAction("dataZoom",function(t,e){var n=IL(e,t);D(n,function(i){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var W_=!1;function G_(r){W_||(W_=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,PL),kL(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function RL(r,t){var e=Ns(t.get("padding")),n=t.getItemStyle(["color","opacity"]);return n.fill=t.get("backgroundColor"),r=new Tt({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1}),r}var OL=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t})(dt);function $_(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function U_(r){if(j.domSupported){for(var t=document.documentElement.style,e=0,n=r.length;e<n;e++)if(r[e]in t)return r[e]}}var Y_=U_(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),NL=U_(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function Z_(r,t){if(!r)return t;t=Lg(t,!0);var e=r.indexOf(t);return r=e===-1?t:"-"+r.slice(0,e)+"-"+t,r.toLowerCase()}function BL(r,t){var e=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return e?e[t]:null}var FL=Z_(NL,"transition"),_c=Z_(Y_,"transform"),zL="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(j.transform3dSupported?"will-change:transform;":"");function VL(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function HL(r,t,e){if(!G(e)||e==="inside")return"";var n=r.get("backgroundColor"),i=r.get("borderWidth");t=xn(t);var a=VL(e),o=Math.max(Math.round(i)*1.5,6),s="",l=_c+":",u;mt(["left","right"],a)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var f=u*Math.PI/180,h=o+i,c=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),v=Math.round(((c-Math.SQRT2*i)/2+Math.SQRT2*i-(c-h)/2)*100)/100;s+=";"+a+":-"+v+"px";var d=t+" solid "+i+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+n+";"];return'<div style="'+p.join("")+'"></div>'}function WL(r,t){var e="cubic-bezier(0.23,1,0.32,1)",n=" "+r/2+"s "+e,i="opacity"+n+",visibility"+n;return t||(n=" "+r+"s "+e,i+=j.transformSupported?","+_c+n:",left"+n+",top"+n),FL+":"+i}function X_(r,t,e){var n=r.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!j.transformSupported)return e?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=j.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return e?"top:0;left:0;"+_c+":"+o+";":[["top",0],["left",0],[Y_,o]]}function GL(r){var t=[],e=r.get("fontSize"),n=r.getTextColor();n&&t.push("color:"+n),t.push("font:"+r.getFont());var i=nt(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+i+"px");var a=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),D(["decoration","align"],function(u){var f=r.get(u);f&&t.push("text-"+u+":"+f)}),t.join(";")}function $L(r,t,e){var n=[],i=r.get("transitionDuration"),a=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),f=r.getModel("textStyle"),h=Am(r,"html"),c=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+c),t&&i&&n.push(WL(i,e)),a&&n.push("background-color:"+a),D(["width","color","radius"],function(v){var d="border-"+v,p=Lg(d),g=r.get(p);g!=null&&n.push(d+":"+g+(v==="color"?"":"px"))}),n.push(GL(f)),h!=null&&n.push("padding:"+Ns(h).join("px ")+"px"),n.join(";")+";"}function q_(r,t,e,n,i){var a=t&&t.painter;if(e){var o=a&&a.getViewportRoot();o&&rS(r,o,e,n,i)}else{r[0]=n,r[1]=i;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var UL=(function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,j.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=t.getZr(),a=e.appendTo,o=a&&(G(a)?document.querySelector(a):Wn(a)?a:Q(a)&&a(t.getDom()));q_(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(n),this._api=t,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,f=i.painter.getViewportRoot();xe(f,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),n=BL(e,"position"),i=e.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=zL+$L(t,!this._firstShow,this._longHide)+X_(a[0],a[1],!0)+("border-color:"+xn(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,n,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(G(a)&&n.get("trigger")==="item"&&!$_(n)&&(s=HL(n,i,a)),G(t))o.innerHTML=t+s;else if(t){o.innerHTML="",W(t)||(t=[t]);for(var l=0;l<t.length;l++)Wn(t[l])&&t[l].parentNode!==o&&o.appendChild(t[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},r.prototype.setEnterable=function(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},r.prototype.moveTo=function(t,e){if(this.el){var n=this._styleCoord;if(q_(n,this._zr,this._container,t,e),n[0]!=null&&n[1]!=null){var i=this.el.style,a=X_(n[0],n[1]);D(a,function(o){i[o[0]]=o[1]})}}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){var t=this,e=this.el.style;e.visibility="hidden",e.opacity="0",j.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(J(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this.el.parentNode;t&&t.removeChild(this.el),this.el=this._container=null},r})(),YL=(function(){function r(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),j_(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return r.prototype.update=function(t){var e=t.get("alwaysShowContent");e&&this._moveIfResized(),this._alwaysShowContent=e},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(t,e,n,i,a){var o=this;q(t)&&ue(process.env.NODE_ENV!=="production"?"Passing DOM nodes as content is not supported in richText tooltip!":""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new Ut({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:Am(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),D(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),D(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},r.prototype.setEnterable=function(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),n=K_(t.style);return[e.width+n.left+n.right,e.height+n.top+n.bottom]},r.prototype.moveTo=function(t,e){var n=this.el;if(n){var i=this._styleCoord;j_(i,this._zr,t,e),t=i[0],e=i[1];var a=n.style,o=Wr(a.borderWidth||0),s=K_(a);n.x=t+o+s.left,n.y=e+o+s.top,n.markRedraw()}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(J(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r})();function Wr(r){return Math.max(0,r)}function K_(r){var t=Wr(r.shadowBlur||0),e=Wr(r.shadowOffsetX||0),n=Wr(r.shadowOffsetY||0);return{left:Wr(t-e),right:Wr(t+e),top:Wr(t-n),bottom:Wr(t+n)}}function j_(r,t,e,n){r[0]=e,r[1]=n,r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var ZL=new Tt({shape:{x:-1,y:-1,width:2,height:2}}),XL=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,n){if(!(j.node||!n.getDom())){var i=e.getComponent("tooltip"),a=this._renderMode=Ix(i.get("renderMode"));this._tooltipContent=a==="richText"?new YL(n):new UL(n,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},t.prototype.render=function(e,n,i){if(!(j.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=n,this._api=i;var a=this._tooltipContent;a.update(e),a.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&e.get("transitionDuration")?Ys(this,"_updatePosition",50,"fixRate"):Zs(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel,n=e.get("triggerOn");L_("itemTooltip",this._api,J(function(i,a,o){n!=="none"&&(n.indexOf(i)>=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,n=this._ecModel,i=this._api,a=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(e,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,n,i,a){if(!(a.from===this.uid||j.node||!i.getDom())){var o=Q_(a,i);this._ticket="";var s=a.dataByCoordSys,l=QL(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var f=ZL;f.x=a.x,f.y=a.y,f.update(),ht(f).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:f},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(e,n,i,a))return;var h=k_(a,n),c=h.point[0],v=h.point[1];c!=null&&v!=null&&this._tryShow({offsetX:c,offsetY:v,target:h.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(e,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(Q_(a,i))},t.prototype._manuallyAxisShowTip=function(e,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var f=u.getData(),h=ja([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(e,n){var i=e.target,a=this._tooltipModel;if(a){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(i){var s=ht(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Fa(i,function(f){if(ht(f).dataIndex!=null)return l=f,!0;if(ht(f).tooltipConfig!=null)return u=f,!0},!0),l?this._showSeriesItemTooltip(e,l,n):u?this._showComponentItemTooltip(e,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(e,n){var i=e.get("showDelay");n=J(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},t.prototype._showAxisTooltip=function(e,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=ja([n.tooltipOption],a),l=this._renderMode,u=[],f=Ra("section",{blocks:[],noHeader:!0}),h=[],c=new ih;D(e,function(y){D(y.dataByAxis,function(_){var w=i.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!w||b==null)){var S=M_(b,w.axis,i,_.seriesDataIndices,_.valueLabelOpt),x=Ra("section",{header:S,noHeader:!Xe(S),sortBlocks:!0,blocks:[]});f.blocks.push(x),D(_.seriesDataIndices,function(T){var M=i.getSeriesByIndex(T.seriesIndex),A=T.dataIndexInside,C=M.getDataParams(A);if(!(C.dataIndex<0)){C.axisDim=_.axisDim,C.axisIndex=_.axisIndex,C.axisType=_.axisType,C.axisId=_.axisId,C.axisValue=Bh(w.axis,{value:b}),C.axisValueLabel=S,C.marker=c.makeTooltipMarker("item",xn(C.color),l);var I=dm(M.formatTooltip(A,!0,null)),E=I.frag;if(E){var L=ja([M],a).get("valueFormatter");x.blocks.push(L?B({valueFormatter:L},E):E)}I.text&&h.push(I.text),u.push(C)}})}})}),f.blocks.reverse(),h.reverse();var v=n.position,d=s.get("order"),p=Dm(f,c,l,d,i.get("useUTC"),s.get("textStyle"));p&&h.unshift(p);var g=l==="richText"?`
42
+
43
+ `:"<br/>",m=h.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],v,null,c)})},t.prototype._showSeriesItemTooltip=function(e,n,i){var a=this._ecModel,o=ht(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,h=o.dataType,c=u.getData(h),v=this._renderMode,d=e.positionDefault,p=ja([c.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var m=u.getDataParams(f,h),y=new ih;m.marker=y.makeTooltipMarker("item",xn(m.color),v);var _=dm(u.formatTooltip(f,!1,h)),w=p.get("order"),b=p.get("valueFormatter"),S=_.frag,x=S?Dm(b?B({valueFormatter:b},S):S,y,v,w,a.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(p,function(){this._showTooltipContent(p,x,m,T,e.offsetX,e.offsetY,e.position,e.target,y)}),i({type:"showTip",dataIndexInside:f,dataIndex:c.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,n,i){var a=this._renderMode==="html",o=ht(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(G(l)){var f=l;l={content:f,formatter:f},u=!0}u&&a&&l.content&&(l=ut(l),l.content=se(l.content));var h=[l],c=this._ecModel.getComponent(o.componentMainType,o.componentIndex);c&&h.push(c),h.push({formatter:l.content});var v=e.positionDefault,d=ja(h,this._tooltipModel,v?{position:v}:null),p=d.get("content"),g=Math.random()+"",m=new ih;this._showOrMove(d,function(){var y=ut(d.get("formatterParams")||{});this._showTooltipContent(d,p,y,g,e.offsetX,e.offsetY,e.position,n,m)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,n,i,a,o,s,l,u,f){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var h=this._tooltipContent;h.setEnterable(e.get("enterable"));var c=e.get("formatter");l=l||e.get("position");var v=n,d=this._getNearestPoint([o,s],i,e.get("trigger"),e.get("borderColor")),p=d.color;if(c)if(G(c)){var g=e.ecModel.get("useUTC"),m=W(i)?i[0]:i,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;v=c,y&&(v=Ls(m.axisValue,v,g)),v=kg(v,i,!0)}else if(Q(c)){var _=J(function(w,b){w===this._ticket&&(h.setContent(b,f,e,p,l),this._updatePosition(e,l,o,s,h,i,u))},this);this._ticket=a,v=c(i,a,_)}else v=c;h.setContent(v,f,e,p,l),h.show(e,p),this._updatePosition(e,l,o,s,h,i,u)}},t.prototype._getNearestPoint=function(e,n,i,a){if(i==="axis"||W(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!W(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(e,n,i,a,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();n=n||e.get("position");var h=o.getSize(),c=e.get("align"),v=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),Q(n)&&(n=n([i,a],s,o.el,d,{viewSize:[u,f],contentSize:h.slice()})),W(n))i=Rt(n[0],u),a=Rt(n[1],f);else if(q(n)){var p=n;p.width=h[0],p.height=h[1];var g=gi(p,{width:u,height:f});i=g.x,a=g.y,c=null,v=null}else if(G(n)&&l){var m=jL(n,d,h,e.get("borderWidth"));i=m[0],a=m[1]}else{var m=qL(i,a,o,u,f,c?null:20,v?null:20);i=m[0],a=m[1]}if(c&&(i-=J_(c)?h[0]/2:c==="right"?h[0]:0),v&&(a-=J_(v)?h[1]/2:v==="bottom"?h[1]:0),$_(e)){var m=KL(i,a,o,u,f);i=m[0],a=m[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(e,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===e.length;return o&&D(i,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},h=f.dataByAxis||[];o=o&&u.length===h.length,o&&D(u,function(c,v){var d=h[v]||{},p=c.seriesDataIndices||[],g=d.seriesDataIndices||[];o=o&&c.value===d.value&&c.axisType===d.axisType&&c.axisId===d.axisId&&p.length===g.length,o&&D(p,function(m,y){var _=g[y];o=o&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),a&&D(c.seriesDataIndices,function(m){var y=m.seriesIndex,_=n[y],w=a[y];_&&w&&w.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=n,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,n){j.node||!n.getDom()||(Zs(this,"_updatePosition"),this._tooltipContent.dispose(),gc("itemTooltip",n))},t.type="tooltip",t})(Re);function ja(r,t,e){var n=t.ecModel,i;e?(i=new It(e,n,n),i=new It(t.option,i,n)):i=t;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof It&&(o=o.get("tooltip",!0)),G(o)&&(o={formatter:o}),o&&(i=new It(o,i,n)))}return i}function Q_(r,t){return r.dispatchAction||J(t.dispatchAction,t)}function qL(r,t,e,n,i,a,o){var s=e.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>n?r-=l+a:r+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[r,t]}function KL(r,t,e,n,i){var a=e.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,n)-o,t=Math.min(t+s,i)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function jL(r,t,e,n){var i=e[0],a=e[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,f=t.height;switch(r){case"inside":s=t.x+u/2-i/2,l=t.y+f/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+f+o;break;case"left":s=t.x-i-o,l=t.y+f/2-a/2;break;case"right":s=t.x+u+o,l=t.y+f/2-a/2}return[s,l]}function J_(r){return r==="center"||r==="middle"}function QL(r,t,e){var n=Uu(r).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=sa(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=ht(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function JL(r){Ye(mc),r.registerComponentModel(OL),r.registerComponentView(XL),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ee),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ee)}var tP=(function(r){N(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:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t})(dt),eP=(function(r){N(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,n,i){if(this.group.removeAll(),!!e.get("show")){var a=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=nt(e.get("textBaseline"),e.get("textVerticalAlign")),f=new Ut({style:dr(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=f.getBoundingRect(),c=e.get("subtext"),v=new Ut({style:dr(s,{text:c,fill:s.getTextColor(),y:h.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),p=e.get("sublink"),g=e.get("triggerEvent",!0);f.silent=!d&&!g,v.silent=!p&&!g,d&&f.on("click",function(){Rg(d,"_"+e.get("target"))}),p&&v.on("click",function(){Rg(p,"_"+e.get("subtarget"))}),ht(f).eventData=ht(v).eventData=g?{componentType:"title",componentIndex:e.componentIndex}:null,a.add(f),c&&a.add(v);var m=a.getBoundingRect(),y=e.getBoxLayoutParams();y.width=m.width,y.height=m.height;var _=gi(y,{width:i.getWidth(),height:i.getHeight()},e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var w={align:l,verticalAlign:u};f.setStyle(w),v.setStyle(w),m=a.getBoundingRect();var b=_.margin,S=e.getItemStyle(["color","opacity"]);S.fill=e.get("backgroundColor");var x=new Tt({shape:{x:m.x-b[3],y:m.y-b[0],width:m.width+b[1]+b[3],height:m.height+b[0]+b[2],r:e.get("borderRadius")},style:S,subPixelOptimize:!0,silent:!0});a.add(x)}},t.type="title",t})(Re);function rP(r){r.registerComponentModel(tP),r.registerComponentView(eP)}var nP=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"])}},wc=(function(r){N(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,n,i){this.mergeDefaultAndTheme(e,i),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},t.prototype._updateSelector=function(e){var n=e.selector,i=this.ecModel;n===!0&&(n=e.selector=["all","inverse"]),W(n)&&D(n,function(a,o){G(a)&&(a={type:a}),n[o]=ct(a,nP(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<e.length;i++){var a=e[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var n=[],i=[];e.eachRawSeries(function(l){var u=l.name;i.push(u);var f;if(l.legendVisualProvider){var h=l.legendVisualProvider,c=h.getAllNames();e.isSeriesFiltered(l)||(i=i.concat(c)),c.length?n=n.concat(c):f=!0}else f=!0;f&&Gu(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=tt(),s=X(a,function(l){return(G(l)||xt(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new It(l,this,this.ecModel))},this);this._data=Gt(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;D(a,function(o){n[o.get("name")]=!1})}n[e]=!0},t.prototype.unSelect=function(e){this.get("selectedMode")!=="single"&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var n=this.option.selected;n.hasOwnProperty(e)||(n[e]=!0),this[n[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,n=this.option.selected;D(e,function(i){n[i.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,n=this.option.selected;D(e,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},t.prototype.isSelected=function(e){var n=this.option.selected;return!(n.hasOwnProperty(e)&&!n[e])&&mt(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",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",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:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t})(dt),Pi=At,bc=D,Tl=kt,t1=(function(r){N(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 Tl),this.group.add(this._selectorGroup=new Tl),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,n,i){var a=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,n,i,l,s,u);var f=e.getBoxLayoutParams(),h={width:i.getWidth(),height:i.getHeight()},c=e.get("padding"),v=gi(f,h,c),d=this.layoutInner(e,o,v,a,l,u),p=gi(gt({width:d.width,height:d.height},f),h,c);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=RL(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,n,i,a,o,s,l){var u=this.getContentGroup(),f=tt(),h=n.get("selectedMode"),c=[];i.eachRawSeries(function(v){!v.get("legendHoverLink")&&c.push(v.id)}),bc(n.getData(),function(v,d){var p=v.get("name");if(!this.newlineDisabled&&(p===""||p===`
44
+ `)){var g=new Tl;g.newline=!0,u.add(g);return}var m=i.getSeriesByName(p)[0];if(!f.get(p)){if(m){var y=m.getData(),_=y.getVisual("legendLineStyle")||{},w=y.getVisual("legendIcon"),b=y.getVisual("style"),S=this._createItem(m,p,d,v,n,e,_,b,w,h,a);S.on("click",Pi(e1,p,null,a,c)).on("mouseover",Pi(Sc,m.name,null,a,c)).on("mouseout",Pi(xc,m.name,null,a,c)),i.ssr&&S.eachChild(function(x){var T=ht(x);T.seriesIndex=m.seriesIndex,T.dataIndex=d,T.ssrType="legend"}),f.set(p,!0)}else i.eachRawSeries(function(x){if(!f.get(p)&&x.legendVisualProvider){var T=x.legendVisualProvider;if(!T.containName(p))return;var M=T.indexOfName(p),A=T.getItemVisual(M,"style"),C=T.getItemVisual(M,"legendIcon"),I=lr(A.fill);I&&I[3]===0&&(I[3]=.2,A=B(B({},A),{fill:Mo(I,"rgba")}));var E=this._createItem(x,p,d,v,n,e,{},A,C,h,a);E.on("click",Pi(e1,null,p,a,c)).on("mouseover",Pi(Sc,null,p,a,c)).on("mouseout",Pi(xc,null,p,a,c)),i.ssr&&E.eachChild(function(L){var P=ht(L);P.seriesIndex=x.seriesIndex,P.dataIndex=d,P.ssrType="legend"}),f.set(p,!0)}},this);process.env.NODE_ENV!=="production"&&(f.get(p)||console.warn(p+" series not exists. Legend data should be same with series name or data name."))}},this),o&&this._createSelector(o,n,a,s,l)},t.prototype._createSelector=function(e,n,i,a,o){var s=this.getSelectorGroup();bc(e,function(u){var f=u.type,h=new Ut({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(h);var c=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);xs(h,{normal:c,emphasis:v},{defaultText:u.title}),as(h)})},t.prototype._createItem=function(e,n,i,a,o,s,l,u,f,h,c){var v=e.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(n),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),_=a.get("icon");f=_||f||"roundRect";var w=iP(f,a,l,u,v,g,c),b=new Tl,S=a.getModel("textStyle");if(Q(e.getLegendIcon)&&(!_||_==="inherit"))b.add(e.getLegendIcon({itemWidth:d,itemHeight:p,icon:f,iconRotate:m,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:y}));else{var x=_==="inherit"&&e.getData().getVisual("symbol")?m==="inherit"?e.getData().getVisual("symbolRotate"):m:0;b.add(aP({itemWidth:d,itemHeight:p,icon:f,iconRotate:x,itemStyle:w.itemStyle,symbolKeepAspect:y}))}var T=s==="left"?d+5:-5,M=s,A=o.get("formatter"),C=n;G(A)&&A?C=A.replace("{name}",n??""):Q(A)&&(C=A(n));var I=g?S.getTextColor():a.get("inactiveColor");b.add(new Ut({style:dr(S,{text:C,x:T,y:p/2,fill:I,align:M,verticalAlign:"middle"},{inheritColor:I})}));var E=new Tt({shape:b.getBoundingRect(),style:{fill:"transparent"}}),L=a.getModel("tooltip");return L.get("show")&&bs({el:E,componentModel:o,itemName:n,itemTooltipOption:L.option}),b.add(E),b.eachChild(function(P){P.silent=!0}),E.silent=!h,this.getContentGroup().add(b),as(b),b.__legendDataIndex=i,b},t.prototype.layoutInner=function(e,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Ta(e.get("orient"),l,e.get("itemGap"),i.width,i.height);var f=l.getBoundingRect(),h=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){Ta("horizontal",u,e.get("selectorItemGap",!0));var c=u.getBoundingRect(),v=[-c.x,-c.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,g=p===0?"width":"height",m=p===0?"height":"width",y=p===0?"y":"x";s==="end"?v[p]+=f[g]+d:h[p]+=c[g]+d,v[1-p]+=f[m]/2-c[m]/2,u.x=v[0],u.y=v[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[g]=f[g]+d+c[g],_[m]=Math.max(f[m],c[m]),_[y]=Math.min(0,c[y]+v[1-p]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t})(Re);function iP(r,t,e,n,i,a,o){function s(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),bc(g,function(y,_){g[_]==="inherit"&&(g[_]=m[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?n.decal:hh(h,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[f]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:e).opacity),s(u,n);var c=t.getModel("lineStyle"),v=c.getLineStyle();if(s(v,e),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!a){var d=t.get("inactiveBorderWidth"),p=u[f];u.lineWidth=d==="auto"?n.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),v.stroke=c.get("inactiveColor"),v.lineWidth=c.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function aP(r){var t=r.icon||"roundRect",e=_r(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="#fff",e.style.lineWidth=2),e}function e1(r,t,e,n){xc(r,t,e,n),e.dispatchAction({type:"legendToggleSelect",name:r??t}),Sc(r,t,e,n)}function r1(r){for(var t=r.getZr().storage.getDisplayList(),e,n=0,i=t.length;n<i&&!(e=t[n].states.emphasis);)n++;return e&&e.hoverLayer}function Sc(r,t,e,n){r1(e)||e.dispatchAction({type:"highlight",seriesName:r,name:t,excludeSeriesId:n})}function xc(r,t,e,n){r1(e)||e.dispatchAction({type:"downplay",seriesName:r,name:t,excludeSeriesId:n})}function oP(r){var t=r.findComponents({mainType:"legend"});t&&t.length&&r.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function Qa(r,t,e){var n=r==="allSelect"||r==="inverseSelect",i={},a=[];e.eachComponent({mainType:"legend",query:t},function(s){n?s[r]():s[r](t.name),n1(s,i),a.push(s.componentIndex)});var o={};return e.eachComponent("legend",function(s){D(i,function(l,u){s[l?"select":"unSelect"](u)}),n1(s,o)}),n?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function n1(r,t){var e=t||{};return D(r.getData(),function(n){var i=n.get("name");if(!(i===`
45
+ `||i==="")){var a=r.isSelected(i);Jr(e,i)?e[i]=e[i]&&a:e[i]=a}}),e}function sP(r){r.registerAction("legendToggleSelect","legendselectchanged",At(Qa,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",At(Qa,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",At(Qa,"inverseSelect")),r.registerAction("legendSelect","legendselected",At(Qa,"select")),r.registerAction("legendUnSelect","legendunselected",At(Qa,"unSelect"))}function i1(r){r.registerComponentModel(wc),r.registerComponentView(t1),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,oP),r.registerSubTypeDefaulter("legend",function(){return"plain"}),sP(r)}var lP=(function(r){N(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,n,i){var a=Ma(e);r.prototype.init.call(this,e,n,i),a1(this,e,a)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.call(this,e,n),a1(this,this.option,e)},t.type="legend.scroll",t.defaultOption=Ms(wc.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:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t})(wc);function a1(r,t,e){var n=r.getOrient(),i=[1,1];i[n.index]=0,mi(t,e,{type:"box",ignoreSize:!!i})}var o1=kt,Cc=["width","height"],Tc=["x","y"],uP=(function(r){N(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 o1),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new o1)},t.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(e,n,i,a,o,s,l){var u=this;r.prototype.renderInner.call(this,e,n,i,a,o,s,l);var f=this._controllerGroup,h=n.get("pageIconSize",!0),c=W(h)?h:[h,h];d("pagePrev",0);var v=n.getModel("pageTextStyle");f.add(new Ut({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(p,g){var m=p+"DataIndex",y=Af(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:J(u._pageGo,u,m,n,a)},{x:-c[0]/2,y:-c[1]/2,width:c[0],height:c[1]});y.name=p,f.add(y)}},t.prototype.layoutInner=function(e,n,i,a,o,s){var l=this.getSelectorGroup(),u=e.getOrient().index,f=Cc[u],h=Tc[u],c=Cc[1-u],v=Tc[1-u];o&&Ta("horizontal",l,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],m=ut(i);o&&(m[f]=i[f]-p[f]-d);var y=this._layoutContentAndController(e,a,m,u,f,c,v,h);if(o){if(s==="end")g[u]+=y[f]+d;else{var _=p[f]+d;g[u]-=_,y[h]-=_}y[f]+=p[f]+d,g[1-u]+=y[v]+y[c]/2-p[c]/2,y[c]=Math.max(y[c],p[c]),y[v]=Math.min(y[v],p[v]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return y},t.prototype._layoutContentAndController=function(e,n,i,a,o,s,l,u){var f=this.getContentGroup(),h=this._containerGroup,c=this._controllerGroup;Ta(e.get("orient"),f,e.get("itemGap"),a?i.width:null,a?null:i.height),Ta("horizontal",c,e.get("pageButtonItemGap",!0));var v=f.getBoundingRect(),d=c.getBoundingRect(),p=this._showController=v[o]>i[o],g=[-v.x,-v.y];n||(g[a]=f[u]);var m=[0,0],y=[-d.x,-d.y],_=nt(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var w=e.get("pageButtonPosition",!0);w==="end"?y[a]+=i[o]-d[o]:m[a]+=d[o]+_}y[1-a]+=v[s]/2-d[s]/2,f.setPosition(g),h.setPosition(m),c.setPosition(y);var b={x:0,y:0};if(b[o]=p?i[o]:v[o],b[s]=Math.max(v[s],d[s]),b[l]=Math.min(0,d[l]+y[1-a]),h.__rectSize=i[o],p){var S={x:0,y:0};S[o]=Math.max(i[o]-d[o]-_,0),S[s]=b[s],h.setClipPath(new Tt({shape:S})),h.__rectSize=S[o]}else c.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(e);return x.pageIndex!=null&&ce(f,{x:x.contentPosition[0],y:x.contentPosition[1]},p?e:null),this._updatePageInfoView(e,x),b},t.prototype._pageGo=function(e,n,i){var a=this._getPageInfo(n)[e];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(e,n){var i=this._controllerGroup;D(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",c=n[h]!=null,v=i.childOfName(f);v&&(v.setStyle("fill",c?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),v.cursor=c?"pointer":"default")});var a=i.childOfName("pageText"),o=e.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",G(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var n=e.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=e.getOrient().index,s=Cc[o],l=Tc[o],u=this._findTargetItemIndex(n),f=i.children(),h=f[u],c=f.length,v=c?1:0,d={contentPosition:[i.x,i.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return d;var p=w(h);d.contentPosition[o]=-p.s;for(var g=u+1,m=p,y=p,_=null;g<=c;++g)_=w(f[g]),(!_&&y.e>m.s+a||_&&!b(_,m.s))&&(y.i>m.i?m=y:m=_,m&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=m.i),++d.pageCount)),y=_;for(var g=u-1,m=p,y=p,_=null;g>=-1;--g)_=w(f[g]),(!_||!b(y,_.s))&&m.i<y.i&&(y=m,d.pagePrevDataIndex==null&&(d.pagePrevDataIndex=m.i),++d.pageCount,++d.pageIndex),m=_;return d;function w(S){if(S){var x=S.getBoundingRect(),T=x[l]+S[l];return{s:T,e:T+x[s],i:S.__legendDataIndex}}}function b(S,x){return S.e>=x&&S.s<=x+a}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===e&&(n=s)}),n??a},t.type="legend.scroll",t})(t1);function fP(r){r.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;n!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function hP(r){Ye(i1),r.registerComponentModel(lP),r.registerComponentView(uP),fP(r)}function cP(r){Ye(i1),Ye(hP)}var vP=(function(r){N(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=Ms(Cl.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t})(Cl),Dc=Nt();function dP(r,t,e){Dc(r).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(t.uid);i&&(i.getRange=e)})}function pP(r,t){for(var e=Dc(r).coordSysRecordMap,n=e.keys(),i=0;i<n.length;i++){var a=n[i],o=e.get(a),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||s1(e,o))}}}function s1(r,t){if(t){r.removeKey(t.model.uid);var e=t.controller;e&&e.dispose()}}function gP(r,t){var e={model:t,containsPoint:At(yP,t),dispatchAction:At(mP,r),dataZoomInfoMap:null,controller:null},n=e.controller=new FE(r.getZr());return D(["pan","zoom","scrollMove"],function(i){n.on(i,function(a){var o=[];e.dataZoomInfoMap.each(function(s){if(a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[i],u=l&&l(s.dzReferCoordSysInfo,e.model.mainType,e.controller,a);!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 mP(r,t){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function yP(r,t,e,n){return r.coordinateSystem.containPoint([e,n])}function _P(r){var t,e="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return r.each(function(a){var o=a.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[e+s]>n[e+t]&&(t=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function wP(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var n=Dc(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=tt());i.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=F_(a);D(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,gP(e,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=tt());f.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){s1(i,a);return}var f=_P(l);o.enable(f.controlType,f.opt),o.setPointerChecker(a.containsPoint),Ys(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var bP=(function(r){N(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,n,i){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),dP(i,e,{pan:J(Mc.pan,this),zoom:J(Mc.zoom,this),scrollMove:J(Mc.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){pP(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t})(V_),Mc={zoom:function(r,t,e,n){var i=this.range,a=i.slice(),o=r.axisModels[0];if(o){var s=Ac[t](null,[n.originX,n.originY],o,e,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Sl(0,a,[0,100],0,f.minSpan,f.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:l1(function(r,t,e,n,i,a){var o=Ac[n]([a.oldX,a.oldY],[a.newX,a.newY],t,i,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:l1(function(r,t,e,n,i,a){var o=Ac[n]([0,0],[a.scrollDelta,a.scrollDelta],t,i,e);return o.signal*(r[1]-r[0])*a.scrollDelta})};function l1(r){return function(t,e,n,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,n,i);if(Sl(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var Ac={grid:function(r,t,e,n,i){var a=e.axis,o={},s=i.model.coordinateSystem.getRect();return r=r||[0,0],a.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(r,t,e,n,i){var a=e.axis,o={},s=i.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=a.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(r,t,e,n,i){var a=e.axis,o=i.model.coordinateSystem.getRect(),s={};return r=r||[0,0],a.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function SP(r){G_(r),r.registerComponentModel(vP),r.registerComponentView(bP),wP(r)}var xP=(function(r){N(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=Ms(Cl.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},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:"#fff",borderColor:"#ACB8D1"},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:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t})(Cl),Ja=Tt,u1=7,CP=1,Ic=30,TP=7,to="horizontal",f1="vertical",DP=5,MP=["line","bar","candlestick","scatter"],AP={easing:"cubicOut",duration:100,delay:0},IP=(function(r){N(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,n){this.api=n,this._onBrush=J(this._onBrush,this),this._onBrushEnd=J(this._onBrushEnd,this)},t.prototype.render=function(e,n,i,a){if(r.prototype.render.apply(this,arguments),Ys(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}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Zs(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 n=this._displayables.sliderGroup=new kt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,n=this.api,i=e.get("brushSelect"),a=i?TP:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===to?{right:s.width-o.x-o.width,top:s.height-Ic-u1-a,width:o.width,height:Ic}:{right:u1,top:o.y,width:Ic,height:o.height},u=Ma(e.option);D(["right","top","width","height"],function(h){u[h]==="ph"&&(u[h]=l[h])});var f=gi(u,s);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===f1&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===to&&!o?{scaleY:l?1:-1,scaleX:1}:i===to&&o?{scaleY:l?1:-1,scaleX:-1}:i===f1&&!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=n.x-u.x,e.y=n.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=e.get("brushSelect");i.add(new Ja({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new Ja({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:J(this._onClickPanel,this)}),s=this.api.getZr();a?(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)),i.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var n=this._size,i=this._shadowSize||[],a=e.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var h=o.getDataExtent(l),c=(h[1]-h[0])*.3;h=[h[0]-c,h[1]+c];var v=[0,n[1]],d=[0,n[0]],p=[[n[0],0],[0,0]],g=[],m=d[1]/(o.count()-1),y=0,_=Math.round(o.count()/n[0]),w;o.each([l],function(M,A){if(_>0&&A%_){y+=m;return}var C=M==null||isNaN(M)||M==="",I=C?0:Zt(M,h,v,!0);C&&!w&&A?(p.push([p[p.length-1][0],0]),g.push([g[g.length-1][0],0])):!C&&w&&(p.push([y,0]),g.push([y,0])),p.push([y,I]),g.push([y,I]),y+=m,w=C}),u=this._shadowPolygonPts=p,f=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var b=this.dataZoomModel;function S(M){var A=b.getModel(M?"selectedDataBackground":"dataBackground"),C=new kt,I=new hs({shape:{points:u},segmentIgnoreThreshold:1,style:A.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),E=new cs({shape:{points:f},segmentIgnoreThreshold:1,style:A.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return C.add(I),C.add(E),C}for(var x=0;x<3;x++){var T=S(x===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,n=e.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();D(l,function(u){if(!i&&!(n!==!0&&mt(MP,u.get("type"))<0)){var f=a.getComponent(Hr(o),s).axis,h=EP(o),c,v=u.coordinateSystem;h!=null&&v.getOtherAxis&&(c=v.getOtherAxis(f).inverse),h=u.getData().mapDimension(h),i={thisAxis:f,series:u,thisDim:o,otherDim:h,otherAxisInverse:c}}},this)},this),i}},t.prototype._renderHandle=function(){var e=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,h=l.get("brushSelect"),c=n.filler=new Ja({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(c),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:CP,fill:"rgba(0,0,0,0)"}})),D([0,1],function(_){var w=l.get("handleIcon");!js[w]&&w.indexOf("path://")<0&&w.indexOf("image://")<0&&(w="path://"+w,process.env.NODE_ENV!=="production"&&He("handleIcon now needs 'path://' prefix when using a path string"));var b=_r(w,-1,0,2,2,null,!0);b.attr({cursor:h1(this._orient),draggable:!0,drift:J(this._onDragMove,this,_),ondragend:J(this._onDragEnd,this),onmouseover:J(this._showDataInfo,this,!0),onmouseout:J(this._showDataInfo,this,!1),z2:5});var S=b.getBoundingRect(),x=l.get("handleSize");this._handleHeight=Rt(x,this._size[1]),this._handleWidth=S.width/S.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(),as(b);var T=l.get("handleColor");T!=null&&(b.style.fill=T),o.add(i[_]=b);var M=l.getModel("textStyle"),A=l.get("handleLabel")||{},C=A.show||!1;e.add(a[_]=new Ut({silent:!0,invisible:!C,style:dr(M,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:M.getTextColor(),font:M.getFont()}),z2:10}))},this);var v=c;if(h){var d=Rt(l.get("moveHandleSize"),s[1]),p=n.moveHandle=new Tt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),g=d*.8,m=n.moveHandleIcon=_r(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);m.silent=!0,m.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(d,10));v=n.moveZone=new Tt({invisible:!0,shape:{y:s[1]-y,height:d+y}}),v.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(m),o.add(v)}v.attr({draggable:!0,cursor:h1(this._orient),drift:J(this._onDragMove,this,"all"),ondragstart:J(this._showDataInfo,this,!0),ondragend:J(this._onDragEnd,this),onmouseover:J(this._showDataInfo,this,!0),onmouseout:J(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[Zt(e[0],[0,100],n,!0),Zt(e[1],[0,100],n,!0)]},t.prototype._updateInterval=function(e,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Sl(n,a,o,i.get("zoomLock")?"all":e,s.minSpan!=null?Zt(s.minSpan,l,o,!0):null,s.maxSpan!=null?Zt(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=ia([Zt(a[0],o,l,!0),Zt(a[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(e){var n=this._displayables,i=this._handleEnds,a=ia(i.slice()),o=this._size;D([0,1],function(v){var d=n.handles[v],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:i[v]+(v?-1:1),y:o[1]/2-p/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],f=0;f<l.length;f++){var h=l[f],c=h.getClipPath();c||(c=new Tt,h.setClipPath(c)),c.setShape({x:u[f],y:0,width:u[f+1]-u[f],height:o[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var n=this.dataZoomModel,i=this._displayables,a=i.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,f=this._range,h=e?l.calculateDataWindow({start:f[0],end:f[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(h[0],u),this._formatLabel(h[1],u)]}}var c=ia(this._handleEnds.slice());v.call(this,0),v.call(this,1);function v(d){var p=ng(i.handles[d].parent,this.group),g=ig(d===0?"right":"left",p),m=this._handleWidth/2+DP,y=wa([c[d]+(d===0?-m:m),this._size[1]/2],p);a[d].setStyle({x:y[0],y:y[1],verticalAlign:o===to?"middle":g,align:o===to?g:"center",text:s[d]})}},t.prototype._formatLabel=function(e,n){var i=this.dataZoomModel,a=i.get("labelFormatter"),o=i.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=e==null||isNaN(e)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(o,20));return Q(a)?a(e,s):G(a)?a.replace("{value}",s):s},t.prototype._showDataInfo=function(e){var n=this.dataZoomModel.get("handleLabel")||{},i=n.show||!1,a=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=a.get("show")||!1,s=e||this._dragging?o:i,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,n,i,a){this._dragging=!0,qn(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=wa([n,i],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 n=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(i[0]<0||i[0]>n[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var n=e.offsetX,i=e.offsetY;this._brushStart=new bt(n,i),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=ia([Zt(i.x,o,s,!0),Zt(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(qn(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new Ja({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,n),f=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:h[1]})},t.prototype._dispatchZoomAction=function(e){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?AP:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var e,n=F_(this.dataZoomModel).infoList;if(!e&&n.length){var i=n[0].model.coordinateSystem;e=i.getRect&&i.getRect()}if(!e){var a=this.api.getWidth(),o=this.api.getHeight();e={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return e},t.type="dataZoom.slider",t})(V_);function EP(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function h1(r){return r==="vertical"?"ns-resize":"ew-resize"}function LP(r){r.registerComponentModel(xP),r.registerComponentView(IP),G_(r)}function PP(r){Ye(SP),Ye(LP)}function c1(r,t,e){var n=zn.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",r)),n.width=i*e,n.height=a*e,n}var Ec=(function(r){N(t,r);function t(e,n,i){var a=r.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;i=i||No,typeof e=="string"?o=c1(e,n,i):q(e)&&(o=e,e=o.id),a.id=e,a.dom=o;var s=o.style;return s&&(Nv(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=n,a.dpr=i,a}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=c1("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new pt(0,0,0,0);function f(y){if(!(!y.isFinite()||y.isZero()))if(o.length===0){var _=new pt(0,0,0,0);_.copy(y),o.push(_)}else{for(var w=!1,b=1/0,S=0,x=0;x<o.length;++x){var T=o[x];if(T.intersect(y)){var M=new pt(0,0,0,0);M.copy(T),M.union(y),o[x]=M,w=!0;break}else if(l){u.copy(y),u.union(T);var A=y.width*y.height,C=T.width*T.height,I=u.width*u.height,E=I-A-C;E<b&&(b=E,S=x)}}if(l&&(o[S].union(y),w=!0),!w){var _=new pt(0,0,0,0);_.copy(y),o.push(_)}l||(l=o.length>=s)}}for(var h=this.__startIndex;h<this.__endIndex;++h){var c=e[h];if(c){var v=c.shouldBePainted(i,a,!0,!0),d=c.__isRendered&&(c.__dirty&ge||!v)?c.getPrevPaintRect():null;d&&f(d);var p=v&&(c.__dirty&ge||!c.__isRendered)?c.getPaintRect():null;p&&f(p)}}for(var h=this.__prevStartIndex;h<this.__prevEndIndex;++h){var c=n[h],v=c&&c.shouldBePainted(i,a,!0,!0);if(c&&(!v||!c.__zr)&&c.__isRendered){var d=c.getPrevPaintRect();d&&f(d)}}var g;do{g=!1;for(var h=0;h<o.length;){if(o[h].isZero()){o.splice(h,1);continue}for(var m=h+1;m<o.length;)o[h].intersect(o[m])?(g=!0,o[h].union(o[m]),o.splice(m,1)):m++;h++}}while(g);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,n){var i=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=e+"px",o.height=n+"px"),a.width=e*i,a.height=n*i,s&&(s.width=e*i,s.height=n*i,i!==1&&this.ctxBack.scale(i,i))},t.prototype.clear=function(e,n,i){var a=this.dom,o=this.ctx,s=a.width,l=a.height;n=n||this.clearColor;var u=this.motionBlur&&!e,f=this.lastFrameAlpha,h=this.dpr,c=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/h,l/h));var v=this.domBack;function d(p,g,m,y){if(o.clearRect(p,g,m,y),n&&n!=="transparent"){var _=void 0;if(co(n)){var w=n.global||n.__width===m&&n.__height===y;_=w&&n.__canvasGradient||lh(o,n,{x:0,y:0,width:m,height:y}),n.__canvasGradient=_,n.__width=m,n.__height=y}else Vb(n)&&(n.scaleX=n.scaleX||h,n.scaleY=n.scaleY||h,_=uh(o,n,{dirty:function(){c.setUnpainted(),c.painter.refresh()}}));o.save(),o.fillStyle=_||n,o.fillRect(p,g,m,y),o.restore()}u&&(o.save(),o.globalAlpha=f,o.drawImage(v,p,g,m,y),o.restore())}!i||u?d(0,0,s,l):i.length&&D(i,function(p){d(p.x*h,p.y*h,p.width*h,p.height*h)})},t})(ze),v1=1e5,Rn=314159,Dl=.01,kP=.001;function RP(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function OP(r,t){var e=document.createElement("div");return e.style.cssText=["position:relative","width:"+r+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",e}var NP=(function(){function r(t,e,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=n=B({},n||{}),this.dpr=n.devicePixelRatio||No,this._singleCanvas=a,this.root=t;var o=t.style;o&&(Nv(t),t.innerHTML=""),this.storage=e;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var f=t,h=f.width,c=f.height;n.width!=null&&(h=n.width),n.height!=null&&(c=n.height),this.dpr=n.devicePixelRatio||1,f.width=h*this.dpr,f.height=c*this.dpr,this._width=h,this._height=c;var v=new Ec(f,this,this.dpr);v.__builtin__=!0,v.initContext(),l[Rn]=v,v.zlevel=Rn,s.push(Rn),this._domRoot=t}else{this._width=Js(t,0,n),this._height=Js(t,1,n);var u=this._domRoot=OP(this._width,this._height);t.appendChild(u)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,n,t,this._redrawId);for(var a=0;a<i.length;a++){var o=i[a],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=a===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(t){var e=t.length,n=this._hoverlayer;if(n&&n.clear(),!!e){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<e;o++){var s=t[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(v1)),a||(a=n.ctx,a.save()),An(a,s,i,o===e-1))}a&&a.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(v1)},r.prototype.paintOne=function(t,e){uy(t,e)},r.prototype._paintList=function(t,e,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(t);var a=this._doPaintList(t,e,n),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(t),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;yo(function(){l._paintList(t,e,n,i)})}}},r.prototype._compositeManually=function(){var t=this.getLayer(Rn).ctx,e=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,e,n),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,e,n)})},r.prototype._doPaintList=function(t,e,n){for(var i=this,a=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||n)&&a.push(u)}for(var f=!0,h=!1,c=function(p){var g=a[p],m=g.ctx,y=o&&g.createRepaintRects(t,e,v._width,v._height),_=n?g.__startIndex:g.__drawIndex,w=!n&&g.incremental&&Date.now,b=w&&Date.now(),S=g.zlevel===v._zlevelList[0]?v._backgroundColor:null;if(g.__startIndex===g.__endIndex)g.clear(!1,S,y);else if(_===g.__startIndex){var x=t[_];(!x.incremental||!x.notClear||n)&&g.clear(!1,S,y)}_===-1&&(console.error("For some unknown reason. drawIndex is -1"),_=g.__startIndex);var T,M=function(E){var L={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(T=_;T<g.__endIndex;T++){var P=t[T];if(P.__inHover&&(h=!0),i._doPaintEl(P,g,o,E,L,T===g.__endIndex-1),w){var k=Date.now()-b;if(k>15)break}}L.prevElClipPaths&&m.restore()};if(y)if(y.length===0)T=g.__endIndex;else for(var A=v.dpr,C=0;C<y.length;++C){var I=y[C];m.save(),m.beginPath(),m.rect(I.x*A,I.y*A,I.width*A,I.height*A),m.clip(),M(I),m.restore()}else m.save(),M(),m.restore();g.__drawIndex=T,g.__drawIndex<g.__endIndex&&(f=!1)},v=this,d=0;d<a.length;d++)c(d);return j.wxa&&D(this._layers,function(p){p&&p.ctx&&p.ctx.draw&&p.ctx.draw()}),{finished:f,needsRefreshHover:h}},r.prototype._doPaintEl=function(t,e,n,i,a,o){var s=e.ctx;if(n){var l=t.getPaintRect();(!i||l&&l.intersect(i))&&(An(s,t,a,o),t.setPrevPaintRect(l))}else An(s,t,a,o)},r.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=Rn);var n=this._layers[t];return n||(n=new Ec("zr_"+t,this,this.dpr),n.zlevel=t,n.__builtin__=!0,this._layerConfig[t]?ct(n,this._layerConfig[t],!0):this._layerConfig[t-Dl]&&ct(n,this._layerConfig[t-Dl],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},r.prototype.insertLayer=function(t,e){var n=this._layers,i=this._zlevelList,a=i.length,o=this._domRoot,s=null,l=-1;if(n[t]){process.env.NODE_ENV!=="production"&&jr("ZLevel "+t+" has been used already");return}if(!RP(e)){process.env.NODE_ENV!=="production"&&jr("Layer of zlevel "+t+" is not valid");return}if(a>0&&t>i[0]){for(l=0;l<a-1&&!(i[l]<t&&i[l+1]>t);l++);s=n[i[l]]}if(i.splice(l+1,0,t),n[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(e.dom,u.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)},r.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i];t.call(e,this._layers[a],a)}},r.prototype.eachBuiltinLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__&&t.call(e,o,a)}},r.prototype.eachOtherLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__||t.call(e,o,a)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(h,c){h.__dirty=h.__used=!1});function e(h){a&&(a.__endIndex!==h&&(a.__dirty=!0),a.__endIndex=h)}if(this._singleCanvas)for(var n=1;n<t.length;n++){var i=t[n];if(i.zlevel!==t[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,l;for(l=0;l<t.length;l++){var i=t[l],u=i.zlevel,f=void 0;s!==u&&(s=u,o=0),i.incremental?(f=this.getLayer(u+kP,this._needsManuallyCompositing),f.incremental=!0,o=1):f=this.getLayer(u+(o>0?Dl:0),this._needsManuallyCompositing),f.__builtin__||jr("ZLevel "+u+" has been used by unkown layer "+f.id),f!==a&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,e(l),a=f),i.__dirty&ge&&!i.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}e(l),this.eachBuiltinLayer(function(h,c){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(t){t.clear()},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,D(this._layers,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?ct(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===t||a===t+Dl){var o=this._layers[a];ct(o,n[t],!0)}}}},r.prototype.delLayer=function(t){var e=this._layers,n=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],n.splice(mt(n,t),1))},r.prototype.resize=function(t,e){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;if(t!=null&&(i.width=t),e!=null&&(i.height=e),t=Js(a,0,i),e=Js(a,1,i),n.style.display="",this._width!==t||e!==this._height){n.style.width=t+"px",n.style.height=e+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(t==null||e==null)return;this._width=t,this._height=e,this.getLayer(Rn).resize(t,e)}return this},r.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[Rn].dom;var e=new Ec("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var n=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,a=e.dom.height;this.eachLayer(function(h){h.__builtin__?n.drawImage(h.dom,0,0,i,a):h.renderToCanvas&&(n.save(),h.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var f=s[l];An(n,f,o,l===u-1)}return e.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r})();function BP(r){r.registerPainter("canvas",NP)}Ye([eL,NI,QI,NE,rP,JL,DL,PP,cP,mc,BP]);function d1(){const r=H.useRef(null),t=H.useRef(null);H.useEffect(()=>{if(!r.current)return;t.current=YA(r.current);const s=new ResizeObserver(()=>{var l;(l=t.current)==null||l.resize()});return s.observe(r.current),()=>{var l;s.disconnect(),(l=t.current)==null||l.dispose(),t.current=null}},[]);const e=H.useCallback((s,l,u=!1)=>{var h;let f;typeof l=="boolean"?f={notMerge:l,lazyUpdate:u}:f=l??{},(h=t.current)==null||h.setOption(s,f)},[]),n=H.useCallback(()=>{var s;(s=t.current)==null||s.resize()},[]),i=H.useCallback(()=>{var s;(s=t.current)==null||s.dispose(),t.current=null},[]),a=H.useCallback(s=>t.current?t.current.getDataURL({type:(s==null?void 0:s.type)??"png",pixelRatio:(s==null?void 0:s.pixelRatio)??2,backgroundColor:(s==null?void 0:s.backgroundColor)??"#fff"}):"",[]),o=H.useCallback((s,l)=>{const u=t.current;return u?(u.on(s,l),()=>{u.off(s,l)}):()=>{}},[]);return{chartRef:r,chartInstance:t.current,setOption:e,resize:n,dispose:i,getDataURL:a,bindEvent:o}}const FP={start:70,end:100},zP=50;function p1(r=FP){const t=H.useRef([r]),e=H.useRef(0),[,n]=H.useState({}),i=t.current[e.current]??r,a=H.useCallback(u=>{e.current<t.current.length-1&&(t.current=t.current.slice(0,e.current+1)),t.current.length>=zP&&(t.current=t.current.slice(1)),t.current.push(u),e.current=t.current.length-1,n({})},[]),o=H.useCallback(()=>e.current>0?(e.current--,n({}),t.current[e.current]??null):null,[]),s=H.useCallback(()=>e.current<t.current.length-1?(e.current++,n({}),t.current[e.current]??null):null,[]),l=H.useCallback((u=r)=>{t.current=[u],e.current=0,n({})},[r]);return{canUndo:e.current>0,canRedo:e.current<t.current.length-1,currentState:i,pushState:a,undo:o,redo:s,reset:l}}function g1(r,t=2){return r==null||isNaN(r)?"--":r.toLocaleString("zh-CN",{minimumFractionDigits:t,maximumFractionDigits:t})}function F(r){return g1(r,2)}function m1(r){return r==null||isNaN(r)?"--":`${r>0?"+":""}${r.toFixed(2)}%`}function y1(r){return r==null||isNaN(r)?"--":`${r>0?"+":""}${r.toFixed(2)}`}function eo(r,t){return Number.isInteger(r)?r.toString():r.toFixed(t).replace(/\.?0+$/,"")}function sr(r){return r==null||isNaN(r)?"--":r>=1e8?`${eo(r/1e8,2)}亿`:r>=1e4?`${eo(r/1e4,2)}万`:r.toFixed(0)}function _1(r){return r==null||isNaN(r)?"--":r>=1e8?`${eo(r/1e8,2)}亿`:r>=1e4?`${eo(r/1e4,2)}万`:eo(r,2)}function VP(r,t="YYYY-MM-DD"){const e=typeof r=="string"?new Date(r):r;if(isNaN(e.getTime()))return r;const n=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0"),o=String(e.getHours()).padStart(2,"0"),s=String(e.getMinutes()).padStart(2,"0");return t.replace("YYYY",String(n)).replace("MM",i).replace("DD",a).replace("HH",o).replace("mm",s)}function w1(r){const t=[`<div style="font-weight:bold;margin-bottom:4px">${r.date}</div>`,`<div>开盘: <span style="font-weight:500">${F(r.open)}</span></div>`,`<div>最高: <span style="font-weight:500">${F(r.high)}</span></div>`,`<div>最低: <span style="font-weight:500">${F(r.low)}</span></div>`,`<div>收盘: <span style="font-weight:500">${F(r.close)}</span></div>`];if(r.change!==void 0&&r.changePercent!==void 0){const i=r.change!==null&&r.change>0?"#f5222d":r.change!==null&&r.change<0?"#52c41a":"inherit";t.push(`<div>涨跌: <span style="color:${i};font-weight:500">${y1(r.change)} (${m1(r.changePercent)})</span></div>`)}r.volume!==void 0&&t.push(`<div>成交量: ${sr(r.volume)}</div>`),r.amount!==void 0&&t.push(`<div>成交额: ${_1(r.amount)}</div>`),r.turnoverRate!==void 0&&r.turnoverRate!==null&&t.push(`<div>换手率: ${r.turnoverRate.toFixed(2)}%</div>`),r.amplitude!==void 0&&r.amplitude!==null&&t.push(`<div>振幅: ${r.amplitude.toFixed(2)}%</div>`);const e=r.indicators??[];let n=!1;if(e.includes("ma")&&r.ma&&(n?t.push(`<div>MA: ${F(r.ma.ma5)} / ${F(r.ma.ma10)} / ${F(r.ma.ma20)}</div>`):(t.push(`<div style="margin-top:4px;border-top:1px solid #eee;padding-top:4px">MA: ${F(r.ma.ma5)} / ${F(r.ma.ma10)} / ${F(r.ma.ma20)}</div>`),n=!0)),e.includes("boll")&&r.boll&&(n?t.push(`<div>BOLL: 上 ${F(r.boll.upper)} 中 ${F(r.boll.mid)} 下 ${F(r.boll.lower)}</div>`):(t.push(`<div style="margin-top:4px;border-top:1px solid #eee;padding-top:4px">BOLL: 上 ${F(r.boll.upper)} 中 ${F(r.boll.mid)} 下 ${F(r.boll.lower)}</div>`),n=!0)),e.includes("sar")&&r.sar){const i=r.sar.trend===1?"↑":"↓";n?t.push(`<div>SAR: ${F(r.sar.sar)} ${i}</div>`):(t.push(`<div style="margin-top:4px;border-top:1px solid #eee;padding-top:4px">SAR: ${F(r.sar.sar)} ${i}</div>`),n=!0)}return e.includes("kc")&&r.kc&&(n?t.push(`<div>KC: 上 ${F(r.kc.upper)} 中 ${F(r.kc.mid)} 下 ${F(r.kc.lower)}</div>`):(t.push(`<div style="margin-top:4px;border-top:1px solid #eee;padding-top:4px">KC: 上 ${F(r.kc.upper)} 中 ${F(r.kc.mid)} 下 ${F(r.kc.lower)}</div>`),n=!0)),e.includes("macd")&&r.macd&&(n?t.push(`<div>MACD: DIF ${F(r.macd.dif)} DEA ${F(r.macd.dea)} MACD ${F(r.macd.macd)}</div>`):(t.push(`<div style="margin-top:4px;border-top:1px solid #eee;padding-top:4px">MACD: DIF ${F(r.macd.dif)} DEA ${F(r.macd.dea)} MACD ${F(r.macd.macd)}</div>`),n=!0)),e.includes("kdj")&&r.kdj&&t.push(`<div>KDJ: K ${F(r.kdj.k)} D ${F(r.kdj.d)} J ${F(r.kdj.j)}</div>`),e.includes("rsi")&&r.rsi&&t.push(`<div>RSI: ${F(r.rsi.rsi6)} / ${F(r.rsi.rsi12)} / ${F(r.rsi.rsi24)}</div>`),e.includes("wr")&&r.wr&&t.push(`<div>WR: ${F(r.wr.wr6)} / ${F(r.wr.wr10)}</div>`),e.includes("bias")&&r.bias&&t.push(`<div>BIAS: ${F(r.bias.bias6)} / ${F(r.bias.bias12)} / ${F(r.bias.bias24)}</div>`),e.includes("cci")&&r.cci&&t.push(`<div>CCI: ${F(r.cci.cci)}</div>`),e.includes("atr")&&r.atr&&t.push(`<div>ATR: ${F(r.atr.atr)}</div>`),e.includes("obv")&&r.obv&&t.push(`<div>OBV: ${sr(r.obv.obv)} MA ${sr(r.obv.obvMa)}</div>`),e.includes("roc")&&r.roc&&t.push(`<div>ROC: ${F(r.roc.roc)} SIGNAL ${F(r.roc.signal)}</div>`),e.includes("dmi")&&r.dmi&&t.push(`<div>DMI: +DI ${F(r.dmi.pdi)} -DI ${F(r.dmi.mdi)} ADX ${F(r.dmi.adx)}</div>`),t.join("")}const Lc=["ma","boll","sar","kc"],b1="kline-zoom-inside",S1="kline-zoom-slider";function ro(r,t){return Number.isInteger(r)?r.toString():r.toFixed(t).replace(/\.?0+$/,"")}function HP(r,t){return t.includes("volume")?sr(r):Math.abs(r)>=100||Math.abs(r)>=10||Math.abs(r)>=1||Math.abs(r)>=.01?ro(r,2):ro(r,4)}function x1(r,t={}){const e=Math.min(Math.max(t.maxSubPanes??3,0),3),n=r.filter(u=>!Lc.includes(u));if(e===0)return[{id:"main",height:"95%",indicators:Lc.filter(u=>r.includes(u))}];const i=n.length,a=Math.min(i,e),s=a===0?{main:"95%",sub:"0%"}:a===1?{main:"78%",sub:"18%"}:a===2?{main:"65%",sub:"15%"}:{main:"55%",sub:"13%"},l=[{id:"main",height:s.main,indicators:Lc.filter(u=>r.includes(u))}];return n.slice(0,e).forEach((u,f)=>{l.push({id:`sub_${u}_${f}`,height:s.sub,indicators:[u]})}),l}function WP(r,t){const e=[],o=t-50-55-(r.length-1)*25;let s=0;const l=[];for(const c of r)if(typeof c.height=="string"&&c.height.endsWith("%")){const v=parseFloat(c.height)/100;l.push(v),s+=v}else typeof c.height=="number"?(l.push(c.height/o),s+=c.height/o):l.push(0);const u=l.filter(c=>c===0).length;if(u>0&&s<1){const c=(1-s)/u;for(let v=0;v<l.length;v++)l[v]===0&&(l[v]=c)}const f=l.reduce((c,v)=>c+v,0);for(let c=0;c<l.length;c++)l[c]=l[c]/f*o;let h=50;for(let c=0;c<r.length;c++)e.push({id:r[c].id,left:60,right:60,top:h,height:l[c]}),h+=l[c]+25;return e}function GP(r){const{data:t,theme:e,indicators:n,panes:i=x1(n),containerHeight:a=500}=r;if(t.length===0)return{title:{text:"暂无数据",left:"center",top:"center",textStyle:{color:e.textColorSecondary}}};const o=WP(i,a),s=t.map(h=>h.date),l=t.map(h=>h.close),u={animation:!1,backgroundColor:e.backgroundColor,title:{text:"",show:!1},tooltip:{trigger:"axis",axisPointer:{type:"cross",crossStyle:{color:e.crosshairColor},lineStyle:{color:e.crosshairColor,type:"dashed"}},backgroundColor:e.tooltipBgColor,borderColor:e.tooltipBorderColor,textStyle:{color:e.textColor,fontSize:12},formatter:h=>{if(!Array.isArray(h)||h.length===0)return"";const c=h[0].dataIndex,v=t[c];return v?w1({date:v.date,open:v.open,high:v.high,low:v.low,close:v.close,volume:v.volume,amount:v.amount,change:v.change,changePercent:v.changePercent,turnoverRate:v.turnoverRate,amplitude:v.amplitude,indicators:n,ma:v.ma,boll:v.boll,sar:v.sar,kc:v.kc,macd:v.macd,kdj:v.kdj,rsi:v.rsi,wr:v.wr,bias:v.bias,cci:v.cci,atr:v.atr,obv:v.obv,roc:v.roc,dmi:v.dmi}):""}},axisPointer:{link:[{xAxisIndex:"all"}]},grid:o.map(h=>({left:h.left,right:h.right,top:h.top,height:h.height})),xAxis:o.map((h,c)=>({type:"category",data:s,gridIndex:c,axisLine:{lineStyle:{color:e.gridLineColor}},axisTick:{show:!1},axisLabel:{show:c===o.length-1,color:e.textColorSecondary,fontSize:11},splitLine:{show:!1},boundaryGap:!0,min:"dataMin",max:"dataMax"})),yAxis:o.map((h,c)=>({type:"value",gridIndex:c,position:"right",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:e.textColorSecondary,fontSize:11,formatter:v=>HP(v,h.id)},splitLine:{lineStyle:{color:e.splitLineColor,type:"dashed"}},splitNumber:h.id==="main"?3:2,scale:h.id!=="volume"&&!h.id.includes("volume")})),dataZoom:[{id:b1,type:"inside",xAxisIndex:o.map((h,c)=>c),minValueSpan:10},{id:S1,type:"slider",xAxisIndex:o.map((h,c)=>c),bottom:8,height:20,borderColor:e.gridLineColor,fillerColor:"rgba(24,144,255,0.1)",handleStyle:{color:e.activeColor},textStyle:{color:e.textColorSecondary}}],series:[]},f=[];for(let h=0;h<i.length;h++){const c=i[h];o[h].id==="main"&&f.push({type:"candlestick",name:"K线",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>[d.open,d.close,d.low,d.high]),itemStyle:{color:e.upColor,color0:e.downColor,borderColor:e.upColor,borderColor0:e.downColor}}),c.indicators.includes("ma")&&[5,10,20,30,60].forEach((p,g)=>{const m=`ma${p}`,y=t.map(_=>{var w;return((w=_.ma)==null?void 0:w[m])??null});f.push({type:"line",name:`MA${p}`,xAxisIndex:h,yAxisIndex:h,data:y,smooth:!0,symbol:"none",lineStyle:{width:1,color:e.maColors[g]??e.maColors[0]}})}),c.indicators.includes("boll")&&f.push({type:"line",name:"BOLL上轨",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.boll)==null?void 0:p.upper)??null}),smooth:!0,symbol:"none",lineStyle:{width:1,color:"#faad14"}},{type:"line",name:"BOLL中轨",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.boll)==null?void 0:p.mid)??null}),smooth:!0,symbol:"none",lineStyle:{width:1,color:"#1890ff"}},{type:"line",name:"BOLL下轨",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.boll)==null?void 0:p.lower)??null}),smooth:!0,symbol:"none",lineStyle:{width:1,color:"#722ed1"}}),c.indicators.includes("volume")&&f.push({type:"bar",name:"成交量",xAxisIndex:h,yAxisIndex:h,data:t.map((d,p)=>{const g=p>0?l[p-1]:d.open,m=(d.close??0)>=(g??0);return{value:d.volume,itemStyle:{color:m?e.volumeUpColor:e.volumeDownColor}}})}),c.indicators.includes("macd")&&f.push({type:"bar",name:"MACD",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p,g;return{value:((p=d.macd)==null?void 0:p.macd)??null,itemStyle:{color:(((g=d.macd)==null?void 0:g.macd)??0)>=0?e.upColor:e.downColor}}})},{type:"line",name:"DIF",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.macd)==null?void 0:p.dif)??null}),symbol:"none",lineStyle:{width:1,color:"#1890ff"}},{type:"line",name:"DEA",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.macd)==null?void 0:p.dea)??null}),symbol:"none",lineStyle:{width:1,color:"#faad14"}}),c.indicators.includes("kdj")&&f.push({type:"line",name:"K",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.kdj)==null?void 0:p.k)??null}),symbol:"none",lineStyle:{width:1,color:"#1890ff"}},{type:"line",name:"D",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.kdj)==null?void 0:p.d)??null}),symbol:"none",lineStyle:{width:1,color:"#faad14"}},{type:"line",name:"J",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.kdj)==null?void 0:p.j)??null}),symbol:"none",lineStyle:{width:1,color:"#722ed1"}}),c.indicators.includes("rsi")&&[6,12,24].forEach((p,g)=>{f.push({type:"line",name:`RSI${p}`,xAxisIndex:h,yAxisIndex:h,data:t.map(m=>{var y;return((y=m.rsi)==null?void 0:y[`rsi${p}`])??null}),symbol:"none",lineStyle:{width:1,color:e.maColors[g]??"#1890ff"}})}),c.indicators.includes("wr")&&[6,10].forEach((p,g)=>{f.push({type:"line",name:`WR${p}`,xAxisIndex:h,yAxisIndex:h,data:t.map(m=>{var y;return((y=m.wr)==null?void 0:y[`wr${p}`])??null}),symbol:"none",lineStyle:{width:1,color:e.maColors[g]??"#1890ff"}})}),c.indicators.includes("bias")&&[6,12,24].forEach((p,g)=>{f.push({type:"line",name:`BIAS${p}`,xAxisIndex:h,yAxisIndex:h,data:t.map(m=>{var y;return((y=m.bias)==null?void 0:y[`bias${p}`])??null}),symbol:"none",lineStyle:{width:1,color:e.maColors[g]??"#1890ff"}})}),c.indicators.includes("cci")&&f.push({type:"line",name:"CCI",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.cci)==null?void 0:p.cci)??null}),symbol:"none",lineStyle:{width:1,color:"#1890ff"}}),c.indicators.includes("atr")&&f.push({type:"line",name:"ATR",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.atr)==null?void 0:p.atr)??null}),symbol:"none",lineStyle:{width:1,color:"#1890ff"}}),c.indicators.includes("obv")&&f.push({type:"line",name:"OBV",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.obv)==null?void 0:p.obv)??null}),symbol:"none",lineStyle:{width:1,color:"#1890ff"}},{type:"line",name:"OBV_MA",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.obv)==null?void 0:p.obvMa)??null}),symbol:"none",lineStyle:{width:1,color:"#faad14"}}),c.indicators.includes("roc")&&f.push({type:"line",name:"ROC",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.roc)==null?void 0:p.roc)??null}),symbol:"none",lineStyle:{width:1,color:"#1890ff"}},{type:"line",name:"ROC_MA",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.roc)==null?void 0:p.signal)??null}),symbol:"none",lineStyle:{width:1,color:"#faad14"}}),c.indicators.includes("dmi")&&f.push({type:"line",name:"+DI",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.dmi)==null?void 0:p.pdi)??null}),symbol:"none",lineStyle:{width:1,color:e.upColor}},{type:"line",name:"-DI",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.dmi)==null?void 0:p.mdi)??null}),symbol:"none",lineStyle:{width:1,color:e.downColor}},{type:"line",name:"ADX",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.dmi)==null?void 0:p.adx)??null}),symbol:"none",lineStyle:{width:1,color:"#1890ff"}},{type:"line",name:"ADXR",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.dmi)==null?void 0:p.adxr)??null}),symbol:"none",lineStyle:{width:1,color:"#722ed1",type:"dashed"}}),c.indicators.includes("sar")&&f.push({type:"scatter",name:"SAR",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p,g;return{value:((p=d.sar)==null?void 0:p.sar)??null,itemStyle:{color:((g=d.sar)==null?void 0:g.trend)===1?e.upColor:e.downColor}}}),symbol:"circle",symbolSize:4}),c.indicators.includes("kc")&&f.push({type:"line",name:"KC上轨",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.kc)==null?void 0:p.upper)??null}),smooth:!0,symbol:"none",lineStyle:{width:1,color:"#52c41a"}},{type:"line",name:"KC中轨",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.kc)==null?void 0:p.mid)??null}),smooth:!0,symbol:"none",lineStyle:{width:1,color:"#13c2c2"}},{type:"line",name:"KC下轨",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.kc)==null?void 0:p.lower)??null}),smooth:!0,symbol:"none",lineStyle:{width:1,color:"#eb2f96"}})}return u.series=f,u}function $P(r,t,e="safeMerge"){if(!t)return r;if(e==="replace")return t;const n={...r};for(const i of Object.keys(t)){const a=t[i];a!==void 0&&(Array.isArray(a)?n[i]=a:typeof a=="object"&&a!==null?n[i]={...n[i],...a}:n[i]=a)}return n}function UP(r){const{data:t,theme:e,prevClose:n,containerHeight:i=500}=r;if(t.length===0)return{title:{text:"暂无分时数据",left:"center",top:"center",textStyle:{color:e.textColorSecondary}}};const a=t.map(y=>y.time),o=t.map(y=>y.price),s=t.map(y=>y.avgPrice),l=t.map((y,_)=>{var b;const w=_>0?((b=t[_-1])==null?void 0:b.volume)??0:0;return y.volume-w}),u=Math.min(...o.filter(y=>y>0)),f=Math.max(...o),c=(f-u)*.1||1,v=o[o.length-1]??0,d=n?v>=n?e.upColor:e.downColor:e.activeColor,p=Math.max(60,i*.15),g=i-p-100;return{animation:!1,backgroundColor:e.backgroundColor,tooltip:{trigger:"axis",axisPointer:{type:"cross",crossStyle:{color:e.crosshairColor},lineStyle:{color:e.crosshairColor,type:"dashed"}},backgroundColor:e.tooltipBgColor,borderColor:e.tooltipBorderColor,textStyle:{color:e.textColor,fontSize:12},formatter:y=>{if(!Array.isArray(y)||y.length===0)return"";const _=y[0].dataIndex,w=t[_];if(!w)return"";const b=n?((w.price-n)/n*100).toFixed(2):"--",S=n&&w.price>=n?e.upColor:e.downColor;return`
46
+ <div style="font-weight:bold;margin-bottom:4px">${w.time}</div>
47
+ <div>价格: <span style="color:${S};font-weight:500">${F(w.price)}</span></div>
48
+ <div>均价: ${F(w.avgPrice)}</div>
49
+ <div>涨跌: <span style="color:${S}">${b}%</span></div>
50
+ <div>成交量: ${sr(w.volume)}</div>
51
+ `}},axisPointer:{link:[{xAxisIndex:"all"}]},grid:[{left:60,right:60,top:40,height:g},{left:60,right:60,top:g+70,height:p}],xAxis:[{type:"category",data:a,gridIndex:0,axisLine:{lineStyle:{color:e.gridLineColor}},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1},boundaryGap:!1},{type:"category",data:a,gridIndex:1,axisLine:{lineStyle:{color:e.gridLineColor}},axisTick:{show:!1},axisLabel:{color:e.textColorSecondary,fontSize:11,formatter:y=>y},splitLine:{show:!1},boundaryGap:!1}],yAxis:[{type:"value",gridIndex:0,position:"right",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:e.textColorSecondary,fontSize:11,formatter:y=>F(y)},splitLine:{lineStyle:{color:e.splitLineColor,type:"dashed"}},min:u-c,max:f+c},{type:"value",gridIndex:1,position:"right",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:e.textColorSecondary,fontSize:11,formatter:y=>sr(y)},splitLine:{lineStyle:{color:e.splitLineColor,type:"dashed"}}}],series:[{type:"line",name:"价格",xAxisIndex:0,yAxisIndex:0,data:o,symbol:"none",lineStyle:{width:1.5,color:d},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:d.replace(")",", 0.3)").replace("rgb","rgba")},{offset:1,color:d.replace(")",", 0.05)").replace("rgb","rgba")}]}}},{type:"line",name:"均价",xAxisIndex:0,yAxisIndex:0,data:s,symbol:"none",lineStyle:{width:1,color:"#faad14",type:"dashed"}},...n?[{type:"line",name:"昨收",xAxisIndex:0,yAxisIndex:0,data:a.map(()=>n),symbol:"none",lineStyle:{width:1,color:e.textColorSecondary,type:"dotted"}}]:[],{type:"bar",name:"成交量",xAxisIndex:1,yAxisIndex:1,data:l.map((y,_)=>{const w=o[_]??0,b=_>0?o[_-1]??w:n??w;return{value:y,itemStyle:{color:w>=b?e.volumeUpColor:e.volumeDownColor}}})}]}}const ki={container:"_container_119o2_1",spinner:"_spinner_119o2_11",dot:"_dot_119o2_16",text:"_text_119o2_43"};function C1({text:r="加载中..."}){return R.jsxs("div",{className:ki.container,children:[R.jsxs("div",{className:ki.spinner,children:[R.jsx("div",{className:ki.dot}),R.jsx("div",{className:ki.dot}),R.jsx("div",{className:ki.dot})]}),R.jsx("span",{className:ki.text,children:r})]})}const Ml={container:"_container_1xu4v_1",group:"_group_1xu4v_10",button:"_button_1xu4v_15",active:"_active_1xu4v_30"},YP=[{label:"分时",periods:[{value:"timeline",label:"分时"},{value:"timeline5",label:"五日"}]},{label:"周期",periods:[{value:"daily",label:"日K"},{value:"weekly",label:"周K"},{value:"monthly",label:"月K"}]},{label:"分钟",periods:[{value:"1",label:"1分"},{value:"5",label:"5分"},{value:"15",label:"15分"},{value:"30",label:"30分"},{value:"60",label:"60分"}]}];function T1({value:r,onChange:t}){return R.jsx("div",{className:Ml.container,children:YP.map(e=>R.jsx("div",{className:Ml.group,children:e.periods.map(n=>R.jsx("button",{type:"button",className:`${Ml.button} ${r===n.value?Ml.active:""}`,onClick:()=>t(n.value),children:n.label},n.value))},e.label))})}const Ri={container:"_container_1fbmi_1",button:"_button_1fbmi_11",active:"_active_1fbmi_27",divider:"_divider_1fbmi_33"},D1=[{value:"ma",label:"MA",group:"main"},{value:"boll",label:"BOLL",group:"main"},{value:"sar",label:"SAR",group:"main"},{value:"kc",label:"KC",group:"main"}],ZP=[{value:"volume",label:"成交量",group:"sub"},{value:"macd",label:"MACD",group:"sub"},{value:"kdj",label:"KDJ",group:"sub"},{value:"rsi",label:"RSI",group:"sub"},{value:"wr",label:"WR",group:"sub"},{value:"bias",label:"BIAS",group:"sub"},{value:"cci",label:"CCI",group:"sub"},{value:"atr",label:"ATR",group:"sub"},{value:"obv",label:"OBV",group:"sub"},{value:"roc",label:"ROC",group:"sub"},{value:"dmi",label:"DMI",group:"sub"}];function Pc(r){return D1.find(e=>e.value===r)?"main":"sub"}function M1({value:r,onChange:t,maxSubPanes:e=3,maxMainIndicators:n=2}){const i=a=>{const o=Pc(a);if(r.includes(a))t(r.filter(s=>s!==a));else if(o==="main"){const s=r.filter(l=>Pc(l)==="main");if(s.length>=n){const l=s[s.length-1],u=r.filter(f=>f!==l);t([...u,a])}else t([...r,a])}else{const s=r.filter(l=>Pc(l)==="sub");if(s.length>=e){const l=s[s.length-1],u=r.filter(f=>f!==l);t([...u,a])}else t([...r,a])}};return R.jsxs("div",{className:Ri.container,children:[D1.map(a=>R.jsx("button",{type:"button",className:`${Ri.button} ${r.includes(a.value)?Ri.active:""}`,onClick:()=>i(a.value),children:a.label},a.value)),R.jsx("div",{className:Ri.divider}),ZP.map(a=>R.jsx("button",{type:"button",className:`${Ri.button} ${r.includes(a.value)?Ri.active:""}`,onClick:()=>i(a.value),children:a.label},a.value))]})}const Pt={container:"_container_2tswg_1",group:"_group_2tswg_10",divider:"_divider_2tswg_16",spacer:"_spacer_2tswg_23",iconButton:"_iconButton_2tswg_27",textButton:"_textButton_2tswg_51",active:"_active_2tswg_67"},XP=[{value:"",label:"不复权"},{value:"qfq",label:"前复权"},{value:"hfq",label:"后复权"}];function A1({adjust:r,onAdjustChange:t,canUndo:e,canRedo:n,onUndo:i,onRedo:a,onZoomIn:o,onZoomOut:s,onPanLeft:l,onPanRight:u,onReset:f,onFullscreen:h}){return R.jsxs("div",{className:Pt.container,children:[R.jsxs("div",{className:Pt.group,children:[R.jsx("button",{type:"button",className:Pt.iconButton,onClick:i,disabled:!e,title:"撤销",children:R.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",children:R.jsx("path",{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"})})}),R.jsx("button",{type:"button",className:Pt.iconButton,onClick:a,disabled:!n,title:"重做",children:R.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",children:R.jsx("path",{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"})})})]}),R.jsx("div",{className:Pt.divider}),R.jsxs("div",{className:Pt.group,children:[R.jsx("button",{type:"button",className:Pt.iconButton,onClick:o,title:"放大",children:R.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",children:R.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})})}),R.jsx("button",{type:"button",className:Pt.iconButton,onClick:s,title:"缩小",children:R.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",children:R.jsx("path",{d:"M19 13H5v-2h14v2z"})})})]}),R.jsx("div",{className:Pt.divider}),R.jsxs("div",{className:Pt.group,children:[R.jsx("button",{type:"button",className:Pt.iconButton,onClick:l,title:"向左",children:R.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",children:R.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})})}),R.jsx("button",{type:"button",className:Pt.iconButton,onClick:u,title:"向右",children:R.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",children:R.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})})})]}),R.jsx("div",{className:Pt.divider}),R.jsx("div",{className:Pt.group,children:R.jsx("button",{type:"button",className:Pt.textButton,onClick:f,title:"重置",children:"重置"})}),R.jsx("div",{className:Pt.spacer}),R.jsx("div",{className:Pt.group,children:XP.map(c=>R.jsx("button",{type:"button",className:`${Pt.textButton} ${r===c.value?Pt.active:""}`,onClick:()=>t(c.value),children:c.label},c.value))}),h&&R.jsxs(R.Fragment,{children:[R.jsx("div",{className:Pt.divider}),R.jsx("button",{type:"button",className:Pt.iconButton,onClick:h,title:"全屏",children:R.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",children:R.jsx("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"})})})]})]})}const be={container:"_container_1vdme_1",group:"_group_1vdme_11",item:"_item_1vdme_18"},qP={ma5:"#f5a623",ma10:"#2196f3",ma20:"#e91e63",ma30:"#4caf50",ma60:"#9c27b0",ma120:"#00bcd4",ma250:"#ff5722"},kc={upper:"#faad14",mid:"#1890ff",lower:"#722ed1"},Rc={upper:"#52c41a",mid:"#13c2c2",lower:"#eb2f96"};function Gr(r){return r==null?"--":r.toFixed(2)}function KP({data:r,indicators:t,hoverIndex:e}){const n=H.useMemo(()=>{const l=e??r.length-1,u=r[l];return u||null},[r,e]);if(!n)return null;const i=t.includes("ma"),a=t.includes("boll"),o=t.includes("sar"),s=t.includes("kc");return!i&&!a&&!o&&!s?null:R.jsxs("div",{className:be.container,children:[i&&n.ma&&R.jsx("div",{className:be.group,children:Object.keys(n.ma).filter(l=>{var u,f;return l.startsWith("ma")&&((u=n.ma)==null?void 0:u[l])!==null&&((f=n.ma)==null?void 0:f[l])!==void 0}).map(l=>{var h;const u=(h=n.ma)==null?void 0:h[l],f=qP[l]??"#999";return R.jsxs("span",{className:be.item,style:{color:f},children:[l.toUpperCase(),": ",Gr(u)]},l)})}),a&&n.boll&&R.jsxs("div",{className:be.group,children:[R.jsxs("span",{className:be.item,style:{color:kc.upper},children:["UPPER: ",Gr(n.boll.upper)]}),R.jsxs("span",{className:be.item,style:{color:kc.mid},children:["MID: ",Gr(n.boll.mid)]}),R.jsxs("span",{className:be.item,style:{color:kc.lower},children:["LOWER: ",Gr(n.boll.lower)]})]}),o&&n.sar&&R.jsx("div",{className:be.group,children:R.jsxs("span",{className:be.item,style:{color:n.sar.trend===1?"#cf1322":"#389e0d"},children:["SAR: ",Gr(n.sar.sar)," ",n.sar.trend===1?"↑":"↓"]})}),s&&n.kc&&R.jsxs("div",{className:be.group,children:[R.jsxs("span",{className:be.item,style:{color:Rc.upper},children:["KC上: ",Gr(n.kc.upper)]}),R.jsxs("span",{className:be.item,style:{color:Rc.mid},children:["KC中: ",Gr(n.kc.mid)]}),R.jsxs("span",{className:be.item,style:{color:Rc.lower},children:["KC下: ",Gr(n.kc.lower)]})]})]})}const Oc={title:"_title_p093j_1",label:"_label_p093j_16",value:"_value_p093j_21"},jP={ma:"MA",boll:"BOLL",sar:"SAR",kc:"KC",volume:"成交量",macd:"MACD",kdj:"KDJ",rsi:"RSI",wr:"WR",bias:"BIAS",cci:"CCI",atr:"ATR",obv:"OBV",roc:"ROC",dmi:"DMI"};function QP(r,t){if(!t)return"";switch(r){case"volume":return`VOL: ${sr(t.volume)}`;case"macd":return t.macd?`DIF: ${F(t.macd.dif)} DEA: ${F(t.macd.dea)} MACD: ${F(t.macd.macd)}`:"";case"kdj":return t.kdj?`K: ${F(t.kdj.k)} D: ${F(t.kdj.d)} J: ${F(t.kdj.j)}`:"";case"rsi":return t.rsi?`RSI6: ${F(t.rsi.rsi6)} RSI12: ${F(t.rsi.rsi12)} RSI24: ${F(t.rsi.rsi24)}`:"";case"wr":return t.wr?`WR6: ${F(t.wr.wr6)} WR10: ${F(t.wr.wr10)}`:"";case"bias":return t.bias?`BIAS6: ${F(t.bias.bias6)} BIAS12: ${F(t.bias.bias12)} BIAS24: ${F(t.bias.bias24)}`:"";case"cci":return t.cci?`CCI: ${F(t.cci.cci)}`:"";case"atr":return t.atr?`ATR: ${F(t.atr.atr)}`:"";case"obv":return t.obv?`OBV: ${sr(t.obv.obv)} MA: ${sr(t.obv.obvMa)}`:"";case"roc":return t.roc?`ROC: ${F(t.roc.roc)} SIGNAL: ${F(t.roc.signal)}`:"";case"dmi":return t.dmi?`+DI: ${F(t.dmi.pdi)} -DI: ${F(t.dmi.mdi)} ADX: ${F(t.dmi.adx)}`:"";case"sar":return t.sar?`SAR: ${F(t.sar.sar)} ${t.sar.trend===1?"↑":"↓"}`:"";case"kc":return t.kc?`上: ${F(t.kc.upper)} 中: ${F(t.kc.mid)} 下: ${F(t.kc.lower)}`:"";default:return""}}function JP(r,t){const a=t-50-55-(r.length-1)*25,o=[];let s=0;for(const c of r)if(typeof c.height=="string"&&c.height.endsWith("%")){const v=parseFloat(c.height)/100;o.push(v),s+=v}else typeof c.height=="number"?(o.push(c.height/a),s+=c.height/a):o.push(0);const l=o.filter(c=>c===0).length;if(l>0&&s<1){const c=(1-s)/l;for(let v=0;v<o.length;v++)o[v]===0&&(o[v]=c)}const u=o.reduce((c,v)=>c+v,0);for(let c=0;c<o.length;c++)o[c]=o[c]/u*a;const f=[];let h=50;for(let c=0;c<r.length;c++)f.push({top:h,height:o[c]}),h+=o[c]+25;return f}function tk({panes:r,data:t,hoverIndex:e,containerHeight:n}){const i=e??t.length-1,a=t[i],o=H.useMemo(()=>JP(r,n),[r,n]),s=r.slice(1),l=o.slice(1);return s.length===0?null:R.jsx(R.Fragment,{children:s.map((u,f)=>{const h=u.indicators[0];if(!h)return null;const c=jP[h]||h.toUpperCase(),v=QP(h,a),d=l[f];return R.jsxs("div",{className:Oc.title,style:{top:(d==null?void 0:d.top)??0},children:[R.jsx("span",{className:Oc.label,children:c}),v&&R.jsx("span",{className:Oc.value,children:v})]},u.id)})})}const br={container:"_container_o8wlo_1",fullscreen:"_fullscreen_o8wlo_12",chartWrapper:"_chartWrapper_o8wlo_23",chart:"_chart_o8wlo_23",error:"_error_o8wlo_34",timelineToolbar:"_timelineToolbar_o8wlo_63",timelineLabel:"_timelineLabel_o8wlo_71",refreshButton:"_refreshButton_o8wlo_77",fullscreenButton:"_fullscreenButton_o8wlo_78"};function $r(r){return r==="timeline"||r==="timeline5"}function ek(){const r=new Date,t=r.getDay();if(t===0||t===6)return!1;const e=r.getHours(),n=r.getMinutes(),i=e*60+n;return i>=570&&i<=690||i>=780&&i<=900}const rk=H.forwardRef(function(t,e){const{symbol:n,market:i="A",period:a="daily",adjust:o="qfq",height:s=500,width:l="100%",theme:u="light",indicators:f=["ma","volume","macd"],indicatorOptions:h,showToolbar:c=!0,showPeriodSelector:v=!0,showIndicatorSelector:d=!0,maxSubPanes:p=3,visibleCount:g=60,onDataLoad:m,onPeriodChange:y,onError:_,dataProvider:w,sdkOptions:b,requestOptions:S,autoRefresh:x,panes:T,echartsOption:M,echartsOptionMerge:A,className:C,style:I}=t,[E,L]=H.useState(a),[P,k]=H.useState(o),[z,O]=H.useState(f),[V,$]=H.useState(!1),[Z,et]=H.useState(null),at=H.useRef(null),ot=H.useRef(null),st=H.useMemo(()=>Gc(u),[u]),ie=H.useMemo(()=>T??x1(z,{maxSubPanes:p}),[T,z,p]),{data:_t,timelineData:Ze,loading:Vt,error:Mt,refresh:K}=Mv({symbol:n,market:i,period:E,adjust:P,dataProvider:w,sdkOptions:b,requestOptions:S,indicatorOptions:h,indicators:z}),{chartRef:lt,setOption:Be,getDataURL:Ht,bindEvent:Oi}=d1(),{canUndo:Al,canRedo:nk,currentState:Ur,pushState:I1,undo:E1,redo:L1,reset:Ni}=p1(),[Il,ik]=H.useState(500);H.useEffect(()=>{const U=lt.current;if(!U)return;const wt=()=>{const Dt=U.offsetHeight;Dt>0&&ik(Dt)};wt();const Bt=new ResizeObserver(wt);return Bt.observe(U),()=>Bt.disconnect()},[]);const Nc=H.useMemo(()=>x?x===!0?{intervalMs:5e3,onlyTradingTime:!0}:x:null,[x]);H.useEffect(()=>{if(ot.current&&(clearInterval(ot.current),ot.current=null),!Nc||!$r(E))return;const{intervalMs:U=5e3,onlyTradingTime:wt=!0}=Nc;return ot.current=setInterval(()=>{wt&&!ek()||K()},U),()=>{ot.current&&clearInterval(ot.current)}},[Nc,E,K]),H.useEffect(()=>{const U=Oi("mousemove",Bt=>{const Dt=Bt;(Dt==null?void 0:Dt.dataIndex)!==void 0&&et(Dt.dataIndex)}),wt=Oi("mouseout",()=>{et(null)});return()=>{U(),wt()}},[Oi]),H.useEffect(()=>{var Bt;if(_t.length===0&&!Vt)return;let U;if($r(E)&&Ze.length>0){const Dt=_t.length>0?((Bt=_t[0])==null?void 0:Bt.close)??void 0:void 0;U=UP({data:Ze,theme:st,prevClose:Dt??void 0,containerHeight:Il})}else U=GP({data:_t,theme:st,indicators:z,panes:ie,containerHeight:Il});const wt=$P(U,M,A==null?void 0:A.mode);Be(wt,{replaceMerge:["series","xAxis","yAxis","grid","title"]})},[_t,Ze,st,z,ie,g,Il,M,A,Be,Vt,E]),H.useEffect(()=>{_t.length>0&&m&&m(_t)},[_t,m]),H.useEffect(()=>{Mt&&_&&_(Mt)},[Mt,_]);const Bc=H.useCallback(U=>{L(U),Ni(),y==null||y(U)},[y,Ni]),ak=H.useCallback(U=>{k(U)},[]),Fc=H.useCallback(U=>{O(U)},[]),Wt=H.useCallback((U,wt,Bt=!0)=>{const Dt=Math.max(0,Math.min(100,U)),ae=Math.max(Dt,Math.min(100,wt));Be({dataZoom:[{id:b1,start:Dt,end:ae},{id:S1,start:Dt,end:ae}]}),Bt&&I1({start:Dt,end:ae})},[Be,I1]),El=H.useCallback(U=>U<=0?{start:0,end:100}:{start:Math.max(0,(U-g)/U*100),end:100},[g]),ok=H.useCallback(()=>{const{start:U,end:wt}=Ur,Bt=wt-U,Dt=Math.max(Bt*.6,5),ae=(U+wt)/2,On=Math.max(0,ae-Dt/2),Vc=Math.min(100,ae+Dt/2);Wt(On,Vc)},[Wt,Ur]),sk=H.useCallback(()=>{const{start:U,end:wt}=Ur,Bt=wt-U,Dt=Math.min(Bt*1.5,100),ae=(U+wt)/2,On=Math.max(0,ae-Dt/2),Vc=Math.min(100,ae+Dt/2);Wt(On,Vc)},[Wt,Ur]),lk=H.useCallback(()=>{const{start:U,end:wt}=Ur,Bt=wt-U,Dt=Bt*.2,ae=Math.max(0,U-Dt),On=ae+Bt;Wt(ae,On)},[Wt,Ur]),uk=H.useCallback(()=>{const{start:U,end:wt}=Ur,Bt=wt-U,Dt=Bt*.2,ae=Math.min(100,wt+Dt),On=ae-Bt;Wt(On,ae)},[Wt,Ur]),fk=H.useCallback(()=>{const U=E1();U&&Wt(U.start,U.end,!1)},[E1,Wt]),hk=H.useCallback(()=>{const U=L1();U&&Wt(U.start,U.end,!1)},[L1,Wt]),zc=H.useCallback(()=>{const{start:U,end:wt}=El(_t.length);Wt(U,wt,!1),Ni({start:U,end:wt})},[_t.length,El,Wt,Ni]),P1=H.useCallback(()=>{at.current&&(document.fullscreenElement?document.exitFullscreen().then(()=>{$(!1)}).catch(()=>{}):at.current.requestFullscreen().then(()=>{$(!0)}).catch(()=>{}))},[]);H.useEffect(()=>{const U=()=>{$(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",U),()=>{document.removeEventListener("fullscreenchange",U)}},[]),H.useImperativeHandle(e,()=>({refresh:K,setPeriod:Bc,setIndicators:Fc,zoomTo:(U,wt)=>{Wt(U,wt)},resetZoom:zc,getEchartsInstance:()=>lt.current,exportImage:U=>Ht({type:U}),getData:()=>_t}),[K,Bc,Fc,zc,Wt,lt,Ht,_t]),H.useEffect(()=>{if($r(E)||_t.length===0)return;const{start:U,end:wt}=El(_t.length);Wt(U,wt,!1),Ni({start:U,end:wt})},[_t.length,E,El,Wt,Ni]);const ck=H.useMemo(()=>({"--kline-bg-color":st.backgroundColor,"--kline-text-color":st.textColor,"--kline-text-secondary":st.textColorSecondary,"--kline-border-color":st.gridLineColor,"--kline-active-color":st.activeColor,"--kline-hover-bg":u==="dark"?"#2a2a2a":"#f5f5f5","--kline-tag-bg":u==="dark"?"#2a2a2a":"#f0f0f0","--kline-text-disabled":u==="dark"?"#444":"#ccc"}),[st,u]),vk=(z.includes("ma")||z.includes("boll"))&&!$r(E)&&_t.length>0;return R.jsxs("div",{ref:at,className:`${br.container} ${V?br.fullscreen:""} ${C??""}`,style:{...ck,width:l,height:V?"100vh":s,...I},children:[v&&R.jsx(T1,{value:E,onChange:Bc}),c&&!$r(E)&&R.jsx(A1,{adjust:P,onAdjustChange:ak,canUndo:Al,canRedo:nk,onUndo:fk,onRedo:hk,onZoomIn:ok,onZoomOut:sk,onPanLeft:lk,onPanRight:uk,onReset:zc,onFullscreen:P1}),c&&$r(E)&&R.jsxs("div",{className:br.timelineToolbar,children:[R.jsx("span",{className:br.timelineLabel,children:"分时走势"}),R.jsx("button",{type:"button",className:br.refreshButton,onClick:K,disabled:Vt,children:"刷新"}),R.jsx("button",{type:"button",className:br.fullscreenButton,onClick:P1,children:V?"退出全屏":"全屏"})]}),vk&&R.jsx(KP,{data:_t,indicators:z,hoverIndex:Z}),R.jsxs("div",{className:br.chartWrapper,children:[Vt&&_t.length===0&&R.jsx(C1,{}),Mt&&_t.length===0&&R.jsxs("div",{className:br.error,children:[R.jsxs("span",{children:["加载失败:",Mt.message]}),R.jsx("button",{type:"button",onClick:K,children:"重试"})]}),R.jsx("div",{ref:lt,className:br.chart,style:{visibility:_t.length>0||Ze.length>0?"visible":"hidden"}}),!$r(E)&&_t.length>0&&R.jsx(tk,{panes:ie,data:_t,hoverIndex:Z,containerHeight:Il})]}),d&&!$r(E)&&R.jsx(M1,{value:z,onChange:Fc})]})});rt.IndicatorSelector=M1,rt.KLineChart=rk,rt.Loading=C1,rt.PeriodSelector=T1,rt.Toolbar=A1,rt.calcATR=$l,rt.calcBIAS=Tv,rt.calcBOLL=bv,rt.calcCCI=Dv,rt.calcEMA=qr,rt.calcKDJ=Sv,rt.calcMA=_v,rt.calcMACD=wv,rt.calcRSI=xv,rt.calcSMA=Bn,rt.calcWMA=yv,rt.calcWR=Cv,rt.darkTheme=Wc,rt.formatAmount=_1,rt.formatChange=y1,rt.formatDate=VP,rt.formatKlineTooltip=w1,rt.formatNumber=g1,rt.formatPercent=m1,rt.formatPrice=F,rt.formatVolume=sr,rt.getTheme=Gc,rt.lightTheme=Ll,rt.useEcharts=d1,rt.useKlineData=Mv,rt.useZoomHistory=p1,Object.defineProperty(rt,Symbol.toStringTag,{value:"Module"})}));