PageSourceSearch

https://jakeaustwick.me/wp-content/plugins/wp-sport-advanced/assets/dist/assets/MatchDetailPage-Dja0EwLr.js

js jakeaustwick.me collected 2026-10-08 10:48:34 UTC 244,135 bytes, 36 lines download raw bytes

1import{u as dr,f as Vs,Q as vr,a as ui,b as Gs,c as Ws,d as Ct,e as O,V as ci,m as nt,g as at,h as Tt,i as pt,r as ut,s as Us,j as st,k as ge,l as hi,n as Ys,D as Zs,o as Nr,S as Xs,p as Ks,q as xa,t as Q,v as vt,w as pa,M as Xt,x as qs,y as J,z as js,A as te,B as fr,C as Qs,E as Js,F as Rr,G as kt,H as to,I as eo,J as Dt,K as ht,L as ao,N as ro,O as no,P as $r,_ as q,R as di,T as io,U as so,W as zt,X as vi,Y as ye,Z as pr,$ as fi,a0 as oo,a1 as pi,a2 as mi,a3 as mt,a4 as Hr,a5 as lo,a6 as Ft,a7 as gi,a8 as gt,a9 as mr,aa as Gt,ab as uo,ac as It,ad as je,ae as co,af as it,ag as yi,ah as zr,ai as Wa,aj as ba,ak as ho,al as Ua,am as vo,an as fo,ao as po,ap as _i,aq as Qe,ar as xi,as as Ae,at as Ya,au as mo,av as xt,aw as Kt,ax as $t,ay as go,az as yo,aA as _o,aB as xo,aC as bo,aD as wo,aE as So,aF as Co,aG as Mo,aH as To,aI as ko,aJ as Ao,aK as Do,aL as Lo,aM as Io,aN as bi,aO as Za,aP as wi,aQ as wt,aR as Po,aS as ma,aT as Si,aU as Oo,aV as Eo,aW as Xa,aX as Bo,aY as Ci,aZ as Fr,a_ as No,a$ as Ye,b0 as Ro,b1 as Ka,b2 as Je,b3 as bt,b4 as Mi,b5 as Ti,b6 as Ze,b7 as Vr,b8 as $o,b9 as Ho,ba as zo,bb as qt,bc as qa,bd as Fo,be as Vo,bf as Go,bg as Wo,bh as Uo,bi as Yo,bj as Zo,bk as Xo,bl as Ko,bm as qo,bn as jo,bo as Qo,bp as Jo,bq as tl,br as el,bs as ta,bt as al,bu as ki,bv as St,bw as ee,bx as Ai,by as rl,bz as Gr,bA as nl,bB as _e,bC as Di,bD as Li,bE as gr,bF as ea,bG as ga,bH as yr,bI as Ii,bJ as aa,bK as ra,bL as Wr,bM as il,bN as sl,bO as na,bP as ol,bQ as _r,bR as ll,bS as ul,bT as Jt,bU as ia,bV as Ur,bW as Yr,bX as cl,bY as hl,bZ as dl,b_ as Pi,b$ as ja,c0 as vl,c1 as fl,c2 as pl,c3 as Oi,c4 as ft,c5 as ml,c6 as Ei,c7 as Zr,c8 as gl,c9 as yl,ca as sa,cb as _l,cc as Bi,cd as xl,ce as bl,cf as wl,cg as oa,ch as Sl,ci as wa,cj as Xr,ck as Kr,cl as Cl,cm as Ml,cn as Tl,co as kl,cp as qr,cq as Ni,cr as Al,cs as jr,ct as Dl,cu as Ll,cv as Il,cw as Pl,cx as Ol,cy as Ri,cz as Qa,cA as El,cB as $i,cC as Bl,cD as Nl,cE as Rl,cF as $l,cG as Hl,cH as De,cI as zl,cJ as Fl,cK as Vl,cL as Le,cM as ya,cN as Wt,cO as E,cP as la,cQ as Gl,cR as _a,cS as Wl,cT as Hi,cU as Nt,cV as Qr,cW as dt,cX as et,cY as pe,cZ as Xe,c_ as Ul,c$ as Yl,d0 as Zl,d1 as Xl}from"./main-Dx4_sGQs.js";import{c as F,l as ae,p as yt,r as Pt,D as T,F as M,P as $,u as B,S as m,H,U as D,N as X,w as xr,B as Kl,K as G,W as jt,a3 as lt,Y as ct,O as rt,E as _t,V as Jr,$ as tn,a9 as en,a4 as br,L as ql,a1 as jl}from"./_plugin-vue_export-helper-C8YFU58O.js";import{Y as xe,R as be}from"./YellowCard-Cda6EIdC.js";import{u as Ql}from"./useLeagueStandings-C4ZOQiOW.js";import"./index-C-Xze8eA.js";const Jl=a=>{const t=dr({queryKey:[vr.MATCH_DETAIL.H2H,a],queryFn:()=>Vs(ae(a)),enabled:F(()=>!!ae(a)),refetchOnMount:!1,refetchOnWindowFocus:!1,refetchInterval:!1});function e(r,n){var s,o;const i=[];for(const l of r){const u=n===l.home.id?l.home:l.away,c=n!==l.home.id?l.home:l.away,h={...l,odds:l.odds?{...l.odds,HDP:l.odds.HDP?{...l.odds.HDP}:void 0,OU:l.odds.OU?{...l.odds.OU}:void 0,"1x2":l.odds["1x2"]?{...l.odds["1x2"]}:void 0}:void 0};if((s=h.odds)!=null&&s.HDP&&!h.odds.HDP.result){const d=u.score-(c.score+h.odds.HDP.line);d<0?h.odds.HDP.result="L":d>0?h.odds.HDP.result="W":h.odds.HDP.result="D"}if((o=h.odds)!=null&&o.OU&&!h.odds.OU.result){const d=u.score+c.score;d>h.odds.OU.line?h.odds.OU.result="O":d<h.odds.OU.line?h.odds.OU.result="U":h.odds.OU.result="D"}h.odds&&h.odds["1x2"]&&!h.odds["1x2"].result&&(u.score<c.score?h.odds["1x2"].result="L":u.score>c.score?h.odds["1x2"].result="W":h.odds["1x2"].result="D"),i.push(h)}return i}return{...t,calcResultOdd:e}},tu=a=>{const t=dr({queryKey:[vr.MATCH_DETAIL.LINEUP,a],queryFn:()=>Gs(ae(a)),enabled:F(()=>!!ae(a)),refetchOnMount:!1,refetchOnWindowFocus:!1,refetchInterval:ui(a),refetchIntervalInBackground:!1}),e=F(()=>{var v,f,p,g,y,b,x,w,S,C,_,P;const r=((f=(v=t.data)==null?void 0:v.value)==null?void 0:f.home_formation)||"",n=r?[1,...r.split("-").map(Number)]:[],i=((b=(y=(g=(p=t.data)==null?void 0:p.value)==null?void 0:g.lineup)==null?void 0:y.home)==null?void 0:b.slice())||[],s=n.map(k=>i.splice(0,k)),o=i.filter(k=>k.first===0),l=((w=(x=t.data)==null?void 0:x.value)==null?void 0:w.away_formation)||"",u=l?[1,...l.split("-").map(Number)]:[],c=((P=(_=(C=(S=t.data)==null?void 0:S.value)==null?void 0:C.lineup)==null?void 0:_.away)==null?void 0:P.slice())||[],h=u.map(k=>c.splice(0,k)),d=c.filter(k=>k.first===0);return{homeFormation:r,homeLineup:s,homeSubstitions:o,awayFormation:l,awayLineup:h,awaySubstitions:d}});return{...t,lineupData:e}},eu=a=>({...dr({queryKey:[vr.MATCH_DETAIL.TREND,a],queryFn:()=>Ws(ae(a)),enabled:F(()=>!!ae(a)),refetchOnWindowFocus:!1,refetchInterval:ui(a),refetchIntervalInBackgroun
1d:!1})});function oe(a){return a==null?0:a.length||1}function an(a){return a}var au=function(){function a(t,e,r,n,i,s){this._old=t,this._new=e,this._oldKeyGetter=r||an,this._newKeyGetter=n||an,this.context=i,this._diffModeMultiple=s==="multiple"}return a.prototype.add=function(t){return this._add=t,this},a.prototype.update=function(t){return this._update=t,this},a.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},a.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},a.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},a.prototype.remove=function(t){return this._remove=t,this},a.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},a.prototype._executeOneToOne=function(){var t=this._old,e=this._new,r={},n=new Array(t.length),i=new Array(e.length);this._initIndexMap(t,null,n,"_oldKeyGetter"),this._initIndexMap(e,r,i,"_newKeyGetter");for(var s=0;s<t.length;s++){var o=n[s],l=r[o],u=oe(l);if(u>1){var c=l.shift();l.length===1&&(r[o]=l[0]),this._update&&this._update(c,s)}else u===1?(r[o]=null,this._update&&this._update(l,s)):this._remove&&this._remove(s)}this._performRestAdd(i,r)},a.prototype._executeMultiple=function(){var t=this._old,e=this._new,r={},n={},i=[],s=[];this._initIndexMap(t,r,i,"_oldKeyGetter"),this._initIndexMap(e,n,s,"_newKeyGetter");for(var o=0;o<i.length;o++){var l=i[o],u=r[l],c=n[l],h=oe(u),d=oe(c);if(h>1&&d===1)this._updateManyToOne&&this._updateManyToOne(c,u),n[l]=null;else if(h===1&&d>1)this._updateOneToMany&&this._updateOneToMany(c,u),n[l]=null;else if(h===1&&d===1)this._update&&this._update(c,u),n[l]=null;else if(h>1&&d>1)this._updateManyToMany&&this._updateManyToMany(c,u),n[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(s,n)},a.prototype._performRestAdd=function(t,e){for(var r=0;r<t.length;r++){var n=t[r],i=e[n],s=oe(i);if(s>1)for(var o=0;o<s;o++)this._add&&this._add(i[o]);else s===1&&this._add&&this._add(i);e[n]=null}},a.prototype._initIndexMap=function(t,e,r,n){for(var i=this._diffModeMultiple,s=0;s<t.length;s++){var o="_ec_"+this[n](t[s],s);if(i||(r[s]=o),!!e){var l=e[o],u=oe(l);u===0?(e[o]=s,i&&r.push(o)):u===1?e[o]=[l,s]:l.push(s)}}},a}(),ru=function(){function a(t,e){this._encode=t,this._schema=e}return a.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},a.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},a}();function nu(a,t){var e={},r=e.encode={},n=Ct(),i=[],s=[],o={};O(a.dimensions,function(d){var v=a.getDimensionInfo(d),f=v.coordDim;if(f){var p=v.coordDimIndex;Sa(r,f)[p]=d,v.isExtraCoord||(n.set(f,1),su(v.type)&&(i[0]=d),Sa(o,f)[p]=a.getDimensionIndex(v.name)),v.defaultTooltip&&s.push(d)}ci.each(function(g,y){var b=Sa(r,y),x=v.otherDims[y];x!=null&&x!==!1&&(b[x]=v.name)})});var l=[],u={};n.each(function(d,v){var f=r[v];u[v]=f[0],l=l.concat(f)}),e.dataDimsOnCoord=l,e.dataDimIndicesOnCoord=nt(l,function(d){return a.getDimensionInfo(d).storeDimIndex}),e.encodeFirstDimNotExtra=u;var c=r.label;c&&c.length&&(i=c.slice());var h=r.tooltip;return h&&h.length?s=h.slice():s.length||(s=i.slice()),r.defaultedLabel=i,r.defaultedTooltip=s,e.userOutput=new ru(o,t),e}function Sa(a,t){return a.hasOwnProperty(t)||(a[t]=[]),a[t]}function iu(a){return a==="category"?"ordinal":a==="time"?"time":"float"}function su(a){return!(a==="ordinal"||a==="time")}var Ke=function(){function a(t){this.otherDims={},t!=null&&at(this,t)}return a}(),ou=Tt(),lu={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},zi=function(){function a(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return a.prototype.isDimensionOmitted=function(){return this._dimOmitted},a.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=Gi(this.source)))},a.prototype.getSourceDimensionIndex=function(t){return ut(this._dimNameMap.get(t),-1)},a.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},a.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=Us(this.source),r=!Wi(t),n="",i=[],s=0,o=0;s<t;s++){var l=void 0,u=void 0,c=void 0,h=this.dimensions[o];if(h&&h.storeDimIndex===s)l=e?h.name:null,u=h.type,c=h.ordinalMeta,o++;else{var d=this.getSourceDimension(s);d&&(l=e?d.name:null,u=d.type)}i.push({property:l,type:u,ordinalMeta:c}),e&&l!=null&&(!h||!h.isCalculationCoord)&&(n+=r?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),n+="$",n+=lu[u]||"f",c&&(n+=c.uid),n+="$"}var v=this.source,f=[v.seriesLayoutBy,v.startIndex,n].join("$$");return{dimensions:i,hash:f}},a.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,r=0;e<this._fullDimCount;e++){var n=void 0,i=this.dimensions[r];if(i&&i.storeDimIndex===e)i.isCalculationCoord||(n=i.name),r++;else{var s=this.getSourceDimension(e);s&&(n=s.name)}t.push(n)}return t},a.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},a}();function Fi(a){return a instanceof zi}function Vi(a){for(var t=Ct(),e=0;e<(a||[]).length;e++){var r=a[e],n=pt(r)?r.name:r;n!=null&&t.get(n)==null&&t.set(n,e)}return t}function Gi(a){var t=ou(a);return t.dimNameMap||(t.dimNameMap=Vi(a.dimensionsDefine))}function Wi(a){return a>30}var le=pt,Ot=nt,uu=typeof Int32Array>"u"?Array:Int32Array,cu="e\0\0",rn=-1,hu=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],du=["_approximateExtent"],nn,Ie,ue,ce,Ca,he,Ma,Ui=function(){function a(t,e){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual
1={},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 r,n=!1;Fi(t)?(r=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,r=t),r=r||["x","y"];for(var i={},s=[],o={},l=!1,u={},c=0;c<r.length;c++){var h=r[c],d=st(h)?new Ke({name:h}):h instanceof Ke?h:new Ke(h),v=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=v,d.coordDimIndex=0);var f=d.otherDims=d.otherDims||{};s.push(v),i[v]=d,u[v]!=null&&(l=!0),d.createInvertedIndices&&(o[v]=[]);var p=c;ge(d.storeDimIndex)&&(p=d.storeDimIndex),f.itemName===0&&(this._nameDimIdx=p),f.itemId===0&&(this._idDimIdx=p),n&&(d.storeDimIndex=c)}if(this.dimensions=s,this._dimInfos=i,this._initGetDimensionInfo(l),this.hostModel=e,this._invertedIndicesMap=o,this._dimOmitted){var g=this._dimIdxToName=Ct();O(s,function(y){g.set(i[y].storeDimIndex,y)})}}return a.prototype.getDimension=function(t){var e=this._recognizeDimIndex(t);if(e==null)return t;if(e=t,!this._dimOmitted)return this.dimensions[e];var r=this._dimIdxToName.get(e);if(r!=null)return r;var n=this._schema.getSourceDimension(e);if(n)return n.name},a.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(e!=null)return e;if(t==null)return-1;var r=this._getDimInfo(t);return r?r.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},a.prototype._recognizeDimIndex=function(t){if(ge(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},a.prototype._getStoreDimIndex=function(t){var e=this.getDimensionIndex(t);return e},a.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},a.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(r){return e.hasOwnProperty(r)?e[r]:void 0}:function(r){return e[r]}},a.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},a.prototype.mapDimension=function(t,e){var r=this._dimSummary;if(e==null)return r.encodeFirstDimNotExtra[t];var n=r.encode[t];return n?n[e]:null},a.prototype.mapDimensionsAll=function(t){var e=this._dimSummary,r=e.encode[t];return(r||[]).slice()},a.prototype.getStore=function(){return this._store},a.prototype.initData=function(t,e,r){var n=this,i;if(t instanceof Nr&&(i=t),!i){var s=this.dimensions,o=hi(t)||Ys(t)?new Zs(t,s.length):t;i=new Nr;var l=Ot(s,function(u){return{type:n._dimInfos[u].type,property:u}});i.initData(o,l,r)}this._store=i,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=nu(this,this._schema),this.userOutput=this._dimSummary.userOutput},a.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},a.prototype.appendValues=function(t,e){var r=this._store.appendValues(t,e&&e.length),n=r.start,i=r.end,s=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var o=n;o<i;o++){var l=o-n;this._nameList[o]=e[l],s&&Ma(this,o)}},a.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,r=0;r<e.length;r++){var n=this._dimInfos[e[r]];n.ordinalMeta&&t.collectOrdinalMeta(n.storeDimIndex,n.ordinalMeta)}},a.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==Xs&&!t.fillStorage},a.prototype._doInit=function(t,e){if(!(t>=e)){var r=this._store,n=r.getProvider();this._updateOrdinalMeta();var i=this._nameList,s=this._idList,o=n.getSource().sourceFormat,l=o===fr;if(l&&!n.pure)for(var u=[],c=t;c<e;c++){var h=n.getItem(c,u);if(!this.hasItemOption&&Ks(h)&&(this.hasItemOption=!0),h){var d=h.name;i[c]==null&&d!=null&&(i[c]=xa(d,null));var v=h.id;s[c]==null&&v!=null&&(s[c]=xa(v,null))}}if(this._shouldMakeIdFromName())for(var c=t;c<e;c++)Ma(this,c);nn(this)}},a.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},a.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},a.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},a.prototype.setCalculationInfo=function(t,e){le(t)?at(this._calculationInfo,t):this._calculationInfo[t]=e},a.prototype.getName=function(t){var e=this.getRawIndex(t),r=this._nameList[e];return r==null&&this._nameDimIdx!=null&&(r=ue(this,this._nameDimIdx,e)),r==null&&(r=""),r},a.prototype._getCategory=function(t,e){var r=this._store.get(t,e),n=this._store.getOrdinalMeta(t);return n?n.categories[r]:r},a.prototype.getId=function(t){return Ie(this,this.getRawIndex(t))},a.prototype.count=function(){return this._store.count()}
vendor: 5,555 bytes, line 1
1,a.prototype.get=function(t,e){var r=this._store,n=this._dimInfos[t];if(n)return r.get(n.storeDimIndex,e)},a.prototype.getByRawIndex=function(t,e){var r=this._store,n=this._dimInfos[t];if(n)return r.getByRawIndex(n.storeDimIndex,e)},a.prototype.getIndices=function(){return this._store.getIndices()},a.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},a.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},a.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},a.prototype.getValues=function(t,e){var r=this,n=this._store;return Q(t)?n.getValues(Ot(t,function(i){return r._getStoreDimIndex(i)}),e):n.getValues(t)},a.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,r=0,n=e.length;r<n;r++)if(isNaN(this._store.get(e[r],t)))return!1;return!0},a.prototype.indexOfName=function(t){for(var e=0,r=this._store.count();e<r;e++)if(this.getName(e)===t)return e;return-1},a.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},a.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},a.prototype.rawIndexOf=function(t,e){var r=t&&this._invertedIndicesMap[t],n=r&&r[e];return n==null||isNaN(n)?rn:n},a.prototype.each=function(t,e,r){J(t)&&(r=e,e=t,t=[]);var n=r||this,i=Ot(ce(t),this._getStoreDimIndex,this);this._store.each(i,n?vt(e,n):e)},a.prototype.filterSelf=function(t,e,r){J(t)&&(r=e,e=t,t=[]);var n=r||this,i=Ot(ce(t),this._getStoreDimIndex,this);return this._store=this._store.filter(i,n?vt(e,n):e),this},a.prototype.selectRange=function(t){var e=this,r={},n=pa(t);return O(n,function(i){var s=e._getStoreDimIndex(i);r[s]=t[i]}),this._store=this._store.selectRange(r),this},a.prototype.mapArray=function(t,e,r){J(t)&&(r=e,e=t,t=[]),r=r||this;var n=[];return this.each(t,function(){n.push(e&&e.apply(this,arguments))},r),n},a.prototype.map=function(t,e,r,n){var i=r||n||this,s=Ot(ce(t),this._getStoreDimIndex,this),o=he(this);return o._store=this._store.map(s,i?vt(e,i):e),o},a.prototype.modify=function(t,e,r,n){var i=r||n||this,s=Ot(ce(t),this._getStoreDimIndex,this);this._store.modify(s,i?vt(e,i):e)},a.prototype.downSample=function(t,e,r,n){var i=he(this);return i._store=this._store.downSample(this._getStoreDimIndex(t),e,r,n),i},a.prototype.minmaxDownSample=function(t,e){var r=he(this);return r._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),e),r},a.prototype.lttbDownSample=function(t,e){var r=he(this);return r._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),r},a.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},a.prototype.getItemModel=function(t){var e=this.hostModel,r=this.getRawDataItem(t);return new Xt(r,e,e&&e.ecModel)},a.prototype.diff=function(t){var e=this;return new au(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(r){return Ie(t,r)},function(r){return Ie(e,r)})},a.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},a.prototype.setVisual=function(t,e){this._visual=this._visual||{},le(t)?at(this._visual,t):this._visual[t]=e},a.prototype.getItemVisual=function(t,e){var r=this._itemVisuals[t],n=r&&r[e];return n??this.getVisual(e)},a.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},a.prototype.ensureUniqueItemVisual=function(t,e){var r=this._itemVisuals,n=r[t];n||(n=r[t]={});var i=n[e];return i==null&&(i=this.getVisual(e),Q(i)?i=i.slice():le(i)&&(i=at({},i)),n[e]=i),i},a.prototype.setItemVisual=function(t,e,r){var n=this._itemVisuals[t]||{};this._itemVisuals[t]=n,le(e)?at(n,e):n[e]=r},a.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},a.prototype.setLayout=function(t,e){le(t)?at(this._layout,t):this._layout[t]=e},a.prototype.getLayout=function(t){return this._layout[t]},a.prototype.getItemLayout=function(t){return this._itemLayouts[t]},a.prototype.setItemLayout=function(t,e,r){this._itemLayouts[t]=r?at(this._itemLayouts[t]||{},e):e},a.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},a.prototype.setItemGraphicEl=function(t,e){var r=this.hostModel&&this.hostModel.seriesIndex;qs(r,this.dataType,t,e),this._graphicEls[t]=e},a.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},a.prototype.eachItemGraphicEl=function(t,e){O(this._graphicEls,function(r,n){r&&t&&t.call(e,r,n)})},a.prototype.cloneShallow=function(t){return t||(t=new a(this._schema?this._schema:Ot(this.dimensions,this._getDimInfo,this),this.hostModel)),Ca(t,this),t._store=this._store,t},a.prototype.wrapMethod=function(t,e){var r=this[t];J(r)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var n=r.apply(this,arguments);return e.apply(this,[n].concat(js(arguments)))})},a.internalField=function(){nn=function(t){var e=t._invertedIndicesMap;O(e,function(r,n){var i=t._dimInfos[n],s=i.ordinalMeta,o=t._store;if(s){r=e[n]=new uu(s.categories.length);for(var l=0;l<r.length;l++)r[l]=rn;for(var l=0;l<o.count();l++)r[o.get(i.storeDimIndex,l)]=l}})},ue=function(t,e,r){return xa(t._getCategory(e,r),null)},Ie=function(t,e){var r=t._idList[e];return r==null&&t._idDimIdx!=null&&(r=ue(t,t._idDimIdx,e)),r==null&&(r=cu+e),r},ce=function(t){return Q(t)||(t=t!=null?[t]:[]),t},he=function(t){var e=new a(t._schema?t._schema:Ot(t.dimensions,t._getDimInfo,t),t.hostModel);return Ca(e,t),e},Ca=function(t,e){O(hu.concat(e.__wrappedMethods||[]),function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t.__wrappedMethods=e.__wrappedMethods,O(du,function(r){t[r]=te(e[r])}
1),t._calculationInfo=at({},e._calculationInfo)},Ma=function(t,e){var r=t._nameList,n=t._idList,i=t._nameDimIdx,s=t._idDimIdx,o=r[e],l=n[e];if(o==null&&i!=null&&(r[e]=o=ue(t,i,e)),l==null&&s!=null&&(n[e]=l=ue(t,s,e)),l==null&&o!=null){var u=t._nameRepeatCount,c=u[o]=(u[o]||0)+1;l=o,c>1&&(l+="__ec__"+c),n[e]=l}}}(),a}();function vu(a,t){hi(a)||(a=Qs(a)),t=t||{};var e=t.coordDimensions||[],r=t.dimensionsDefine||a.dimensionsDefine||[],n=Ct(),i=[],s=pu(a,e,r,t.dimensionsCount),o=t.canOmitUnusedDimensions&&Wi(s),l=r===a.dimensionsDefine,u=l?Gi(a):Vi(r),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(a,s));for(var h=Ct(c),d=new Js(s),v=0;v<d.length;v++)d[v]=-1;function f(k){var A=d[k];if(A<0){var L=r[k],R=pt(L)?L:{name:L},I=new Ke,N=R.name;N!=null&&u.get(N)!=null&&(I.name=I.displayName=N),R.type!=null&&(I.type=R.type),R.displayName!=null&&(I.displayName=R.displayName);var z=i.length;return d[k]=z,I.storeDimIndex=k,i.push(I),I}return i[A]}if(!o)for(var v=0;v<s;v++)f(v);h.each(function(k,A){var L=Rr(k).slice();if(L.length===1&&!st(L[0])&&L[0]<0){h.set(A,!1);return}var R=h.set(A,[]);O(L,function(I,N){var z=st(I)?u.get(I):I;z!=null&&z<s&&(R[N]=z,g(f(z),A,N))})});var p=0;O(e,function(k){var A,L,R,I;if(st(k))A=k,I={};else{I=k,A=I.name;var N=I.ordinalMeta;I.ordinalMeta=null,I=at({},I),I.ordinalMeta=N,L=I.dimsDef,R=I.otherDims,I.name=I.coordDim=I.coordDimIndex=I.dimsDef=I.otherDims=null}var z=h.get(A);if(z!==!1){if(z=Rr(z),!z.length)for(var Z=0;Z<(L&&L.length||1);Z++){for(;p<s&&f(p).coordDim!=null;)p++;p<s&&z.push(p++)}O(z,function(tt,V){var K=f(tt);if(l&&I.type!=null&&(K.type=I.type),g(kt(K,I),A,V),K.name==null&&L){var Y=L[V];!pt(Y)&&(Y={name:Y}),K.name=K.displayName=Y.name,K.defaultTooltip=Y.defaultTooltip}R&&kt(K.otherDims,R)})}});function g(k,A,L){ci.get(A)!=null?k.otherDims[A]=L:(k.coordDim=A,k.coordDimIndex=L,n.set(A,!0))}var y=t.generateCoord,b=t.generateCoordCount,x=b!=null;b=y?b||1:0;var w=y||"value";function S(k){k.name==null&&(k.name=k.coordDim)}if(o)O(i,function(k){S(k)}),i.sort(function(k,A){return k.storeDimIndex-A.storeDimIndex});else for(var C=0;C<s;C++){var _=f(C),P=_.coordDim;P==null&&(_.coordDim=mu(w,n,x),_.coordDimIndex=0,(!y||b<=0)&&(_.isExtraCoord=!0),b--),S(_),_.type==null&&(to(a,C)===eo.Must||_.isExtraCoord&&(_.otherDims.itemName!=null||_.otherDims.seriesName!=null))&&(_.type="ordinal")}return fu(i),new zi({source:a,dimensions:i,fullDimensionCount:s,dimensionOmitted:o})}function fu(a){for(var t=Ct(),e=0;e<a.length;e++){var r=a[e],n=r.name,i=t.get(n)||0;i>0&&(r.name=n+(i-1)),i++,t.set(n,i)}}function pu(a,t,e,r){var n=Math.max(a.dimensionsDetectedCount||1,t.length,e.length,r||0);return O(t,function(i){var s;pt(i)&&(s=i.dimsDef)&&(n=Math.max(n,s.length))}),n}function mu(a,t,e){if(e||t.hasKey(a)){for(var r=0;t.hasKey(a+r);)r++;a+=r}return t.set(a,!0),a}var gu=function(){function a(t){this.coordSysDims=[],this.axisMap=Ct(),this.categoryAxisMap=Ct(),this.coordSysName=t}return a}();function yu(a){var t=a.get("coordinateSystem"),e=new gu(t),r=_u[t];if(r)return r(a,e,e.axisMap,e.categoryAxisMap),e}var _u={cartesian2d:function(a,t,e,r){var n=a.getReferringComponents("xAxis",Dt).models[0],i=a.getReferringComponents("yAxis",Dt).models[0];t.coordSysDims=["x","y"],e.set("x",n),e.set("y",i),Qt(n)&&(r.set("x",n),t.firstCategoryDimIndex=0),Qt(i)&&(r.set("y",i),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(a,t,e,r){var n=a.getReferringComponents("singleAxis",Dt).models[0];t.coordSysDims=["single"],e.set("single",n),Qt(n)&&(r.set("single",n),t.firstCategoryDimIndex=0)},polar:function(a,t,e,r){var n=a.getReferringComponents("polar",Dt).models[0],i=n.findAxisModel("radiusAxis"),s=n.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",i),e.set("angle",s),Qt(i)&&(r.set("radius",i),t.firstCategoryDimIndex=0),Qt(s)&&(r.set("angle",s),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(a,t,e,r){t.coordSysDims=["lng","lat"]},parallel:function(a,t,e,r){var n=a.ecModel,i=n.getComponent("parallel",a.get("parallelIndex")),s=t.coordSysDims=i.dimensions.slice();O(i.parallelAxisIndex,function(o,l){var u=n.getComponent("parallelAxis",o),c=s[l];e.set(c,u),Qt(u)&&(r.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(a,t,e,r){var n=a.getReferringComponents("matrix",Dt).models[0];t.coordSysDims=["x","y"];var i=n.getDimensionModel("x"),s=n.getDimensionModel("y");e.set("x",i),e.set("y",s),r.set("x",i),r.set("y",s)}};function Qt(a){return a.get("type")==="category"}function xu(a,t,e){e=e||{};var r=e.byIndex,n=e.stackedCoordDimension,i,s,o;bu(t)?i=t:(s=t.schema,i=s.dimensions,o=t.store);var l=!!(a&&a.get("stack")),u,c,h,d;if(O(i,function(b,x){st(b)&&(i[x]=b={name:b}),l&&!b.isExtraCoord&&(!r&&!u&&b.ordinalMeta&&(u=b),!c&&b.type!=="ordinal"&&b.type!=="time"&&(!n||n===b.coordDim)&&(c=b))}),c&&!r&&!u&&(r=!0),c){h="__\0ecstackresult_"+a.id,d="__\0ecstackedover_"+a.id,u&&(u.createInvertedIndices=!0);var v=c.coordDim,f=c.type,p=0;O(i,function(b){b.coordDim===v&&p++});var g={name:h,coordDim:v,coordDimIndex:p,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:d,coordDim:d,coordDimIndex:p+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};s?(o&&(g.storeDimIndex=o.ensureCalculationDimension(d,f),y.storeDimIndex=o.ensureCalculationDimension(h,f)),s.appendCalculationDimension(g),s.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:r,stackedOverDimension:d,stackResultDimension:h}}function bu(a){return!Fi(a.schema)}function wr(a,t){return!!t&&t===a.getCalculationInfo("stackedDimension")}function wu(a,t){return wr(a,t)?a.getCalculationInfo("stackResultDimension"):t}function Su(a,t){var e=a.get("coordinateSystem"),r=ro.get(e),n;return t&&t.coordSysDims&&(n=nt(t.coordSysDims,function(i){var s={name:i},o=t.axisMap.get(i);if(o){var l=o.get("type");s.type=iu(l)}return s})),n||(n=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),n}function Cu(a,t,e){var r,n;return e&&O(a,function(i,s){var o=i.coordDim,l=e.categoryAxisMap.get(o);l&&(r==null&&(r=s),i.ordinalMeta=l.getOrdinalMeta(),t&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(n=!0)}),!n&&r!=null&&(a[r].otherDims.itemName=0),r}function Yi(a,t,e){e=e||{};var r=t.getSourceManager(),n,i=!1;n=r.getSource(),i=n.sourceFormat===fr;var s=yu(t),o=Su(t,s),l=e.useEncodeDefaulter,u=J(l)?l:l?ht(ao,o,t):null,c={co
1ordDimensions:o,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},h=vu(n,c),d=Cu(h.dimensions,e.createInvertedIndices,s),v=i?null:r.getSharedDataStore(h),f=xu(t,{schema:h,store:v}),p=new Ui(h,t);p.setCalculationInfo(f);var g=d!=null&&Mu(n)?function(y,b,x,w){return w===d?x:this.defaultDimValueGetter(y,b,x,w)}:null;return p.hasItemOption=!1,p.initData(i?n:v,null,g),p}function Mu(a){if(a.sourceFormat===fr){var t=Tu(a.data||[]);return!Q(no(t))}}function Tu(a){for(var t=0;t<a.length&&a[t]==null;)t++;return a[t]}function Zi(a,t){var e=a.mapDimensionsAll("defaultedLabel"),r=e.length;if(r===1){var n=$r(a,t,e[0]);return n!=null?n+"":null}else if(r){for(var i=[],s=0;s<e.length;s++)i.push($r(a,t,e[s]));return i.join(" ")}}function ku(a,t){var e=a.mapDimensionsAll("defaultedLabel");if(!Q(t))return t+"";for(var r=[],n=0;n<e.length;n++){var i=a.getDimensionIndex(e[n]);i>=0&&r.push(t[i])}return r.join(" ")}var Au=function(a){q(t,a);function t(e,r,n,i){var s=a.call(this)||this;return s.updateData(e,r,n,i),s}return t.prototype._createSymbol=function(e,r,n,i,s,o){this.removeAll();var l=di(e,-1,-1,2,2,null,o);l.attr({z2:ut(s,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),l.drift=Du,this._symbolType=e,this.add(l)},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(){io(this.childAt(0))},t.prototype.downplay=function(){so(this.childAt(0))},t.prototype.setZ=function(e,r){var n=this.childAt(0);n.zlevel=e,n.z=r},t.prototype.setDraggable=function(e,r){var n=this.childAt(0);n.draggable=e,n.cursor=!r&&e?"move":n.cursor},t.prototype.updateData=function(e,r,n,i){this.silent=!1;var s=e.getItemVisual(r,"symbol")||"circle",o=e.hostModel,l=t.getSymbolSize(e,r),u=t.getSymbolZ2(e,r),c=s!==this._symbolType,h=i&&i.disableAnimation;if(c){var d=e.getItemVisual(r,"symbolKeepAspect");this._createSymbol(s,e,r,l,u,d)}else{var v=this.childAt(0);v.silent=!1;var f={scaleX:l[0]/2,scaleY:l[1]/2};h?v.attr(f):zt(v,f,o,r),vi(v)}if(this._updateCommon(e,r,l,n,i),c){var v=this.childAt(0);if(!h){var f={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,ye(v,f,o,r)}}h&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,r,n,i,s){var o=this.childAt(0),l=e.hostModel,u,c,h,d,v,f,p,g,y;if(i&&(u=i.emphasisItemStyle,c=i.blurItemStyle,h=i.selectItemStyle,d=i.focus,v=i.blurScope,p=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,f=i.emphasisDisabled),!i||e.hasItemOption){var b=i&&i.itemModel?i.itemModel:e.getItemModel(r),x=b.getModel("emphasis");u=x.getModel("itemStyle").getItemStyle(),h=b.getModel(["select","itemStyle"]).getItemStyle(),c=b.getModel(["blur","itemStyle"]).getItemStyle(),d=x.get("focus"),v=x.get("blurScope"),f=x.get("disabled"),p=pr(b),g=x.getShallow("scale"),y=b.getShallow("cursor")}var w=e.getItemVisual(r,"symbolRotate");o.attr("rotation",(w||0)*Math.PI/180||0);var S=fi(e.getItemVisual(r,"symbolOffset"),n);S&&(o.x=S[0],o.y=S[1]),y&&o.attr("cursor",y);var C=e.getItemVisual(r,"style"),_=C.fill;if(o instanceof oo){var P=o.style;o.useStyle(at({image:P.image,x:P.x,y:P.y,width:P.width,height:P.height},C))}else o.__isEmptyBrush?o.useStyle(at({},C)):o.useStyle(C),o.style.decal=null,o.setColor(_,s&&s.symbolInnerColor),o.style.strokeNoScale=!0;var k=e.getItemVisual(r,"liftZ"),A=this._z2;k!=null?A==null&&(this._z2=o.z2,o.z2+=k):A!=null&&(o.z2=A,this._z2=null);var L=s&&s.useNameLabel;pi(o,p,{labelFetcher:l,labelDataIndex:r,defaultText:R,inheritColor:_,defaultOpacity:C.opacity});function R(z){return L?e.getName(z):Zi(e,z)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var I=o.ensureState("emphasis");I.style=u,o.ensureState("select").style=h,o.ensureState("blur").style=c;var N=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;I.scaleX=this._sizeX*N,I.scaleY=this._sizeY*N,this.setSymbolScale(1),mi(this,d,v,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,r,n){var i=this.childAt(0),s=mt(this).dataIndex,o=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&Hr(l,{style:{opacity:0}
1},r,{dataIndex:s,removeOpt:o,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Hr(i,{style:{opacity:0},scaleX:0,scaleY:0},r,{dataIndex:s,cb:e,removeOpt:o})},t.getSymbolSize=function(e,r){return lo(e.getItemVisual(r,"symbolSize"))},t.getSymbolZ2=function(e,r){return e.getItemVisual(r,"z2")},t}(Ft);function Du(a,t){this.parent.drift(a,t)}function Ta(a,t,e,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(e))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&a.getItemVisual(e,"symbol")!=="none"}function sn(a){return a!=null&&!pt(a)&&(a={isIgnore:a}),a||{}}function on(a){var t=a.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:pr(t),cursorStyle:t.get("cursor")}}var Lu=function(){function a(t){this.group=new Ft,this._SymbolCtor=t||Au}return a.prototype.updateData=function(t,e){this._progressiveEls=null,e=sn(e);var r=this.group,n=t.hostModel,i=this._data,s=this._SymbolCtor,o=e.disableAnimation,l=on(t),u={disableAnimation:o},c=e.getSymbolPoint||function(h){return t.getItemLayout(h)};i||r.removeAll(),t.diff(i).add(function(h){var d=c(h);if(Ta(t,d,h,e)){var v=new s(t,h,l,u);v.setPosition(d),t.setItemGraphicEl(h,v),r.add(v)}}).update(function(h,d){var v=i.getItemGraphicEl(d),f=c(h);if(!Ta(t,f,h,e)){r.remove(v);return}var p=t.getItemVisual(h,"symbol")||"circle",g=v&&v.getSymbolType&&v.getSymbolType();if(!v||g&&g!==p)r.remove(v),v=new s(t,h,l,u),v.setPosition(f);else{v.updateData(t,h,l,u);var y={x:f[0],y:f[1]};o?v.attr(y):zt(v,y,n)}r.add(v),t.setItemGraphicEl(h,v)}).remove(function(h){var d=i.getItemGraphicEl(h);d&&d.fadeOut(function(){r.remove(d)},n)}).execute(),this._getSymbolPoint=c,this._data=t},a.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(r,n){var i=t._getSymbolPoint(n);r.setPosition(i),r.markRedraw()})},a.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=on(t),this._data=null,this.group.removeAll()},a.prototype.incrementalUpdate=function(t,e,r){this._progressiveEls=[],r=sn(r);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i<t.end;i++){var s=e.getItemLayout(i);if(Ta(e,s,i,r)){var o=new this._SymbolCtor(e,i,this._seriesScope);o.traverse(n),o.setPosition(s),this.group.add(o),e.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},a.prototype.eachRendered=function(t){gi(this._progressiveEls||this.group,t)},a.prototype.remove=function(t){var e=this.group,r=this._data;r&&t?r.eachItemGraphicEl(function(n){n.fadeOut(function(){e.remove(n)},r.hostModel)}):e.removeAll()},a}(),Xi=typeof Float32Array<"u",Iu=Xi?Float32Array:Array;function ka(a){return Q(a)?Xi?new Float32Array(a):a:new Iu(a)}function Pu(a,t,e,r,n){var i=a.getArea(),s=i.x,o=i.y,l=i.width,u=i.height,c=e.get(["lineStyle","width"])||0;s-=c/2,o-=c/2,l+=c,u+=c,l=Math.ceil(l),s!==Math.floor(s)&&(s=Math.floor(s),l++);var h=new Gt({shape:{x:s,y:o,width:l,height:u}});return h}function Ou(a,t,e){var r=a.getArea(),n=gt(r.r0,1),i=gt(r.r,1),s=new mr({shape:{cx:gt(a.cx,1),cy:gt(a.cy,1),r0:n,r:i,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});return s}function Eu(a,t,e,r,n){if(a){if(a.type==="polar")return Ou(a);if(a.type==="cartesian2d")return Pu(a,t,e)}else return null;return null}function Ki(a,t){return a.type===t}var Bu={average:function(a){for(var t=0,e=0,r=0;r<a.length;r++)isNaN(a[r])||(t+=a[r],e++);return e===0?NaN:t/e},sum:function(a){for(var t=0,e=0;e<a.length;e++)t+=a[e]||0;return t},max:function(a){for(var t=-1/0,e=0;e<a.length;e++)a[e]>t&&(t=a[e]);return isFinite(t)?t:NaN},min:function(a){for(var t=1/0,e=0;e<a.length;e++)a[e]<t&&(t=a[e]);return isFinite(t)?t:NaN},nearest:function(a){return a[0]}},Nu=function(a){return Math.round(a.length/2)};function Ru(a){return{seriesType:a,reset:function(t,e,r){var n=t.getData(),i=t.get("sampling"),s=t.coordinateSystem,o=n.count();if(o>10&&s.type==="cartesian2d"&&i){var l=s.getBaseAxis(),u=s.getOtherAxis(l),c=l.getExtent(),h=r.getDevicePixelRatio(),d=Math.abs(c[1]-c[0])*(h||1),v=Math.round(o/d);if(isFinite(v)&&v>1){i==="lttb"?t.setData(n.lttbDownSample(n.mapDimension(u.dim),1/v)):i==="minmax"&&t.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/v));var f=void 0;st(i)?f=Bu[i]:J(i)&&(f=i),f&&t.setData(n.downSample(n.mapDimension(u.dim),1/v,f,Nu))}}}}}var $u="__ec_stack_";function qi(a){return a.get("stack")||$u+a.seriesIndex}function Sr(a){return a.dim+a.index}function ji(a,t){var e=[];return t.eachSeriesByType(a,function(r){Ji(r)&&e.push(r)}),e}function Hu(a){var t={};
1O(a,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var h=l.getData(),d=c.dim+"_"+c.index,v=h.getDimensionIndex(h.mapDimension(c.dim)),f=h.getStore(),p=0,g=f.count();p<g;++p){var y=f.get(v,p);t[d]?t[d].push(y):t[d]=[y]}});var e={};for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];if(n){n.sort(function(l,u){return l-u});for(var i=null,s=1;s<n.length;++s){var o=n[s]-n[s-1];o>0&&(i=i===null?o:Math.min(i,o))}e[r]=i}}return e}function Qi(a){var t=Hu(a),e=[];return O(a,function(r){var n=r.coordinateSystem,i=n.getBaseAxis(),s=i.getExtent(),o;if(i.type==="category")o=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=t[l],c=Math.abs(s[1]-s[0]),h=i.scale.getExtent(),d=Math.abs(h[1]-h[0]);o=u?c/d*u:c}else{var v=r.getData();o=Math.abs(s[1]-s[0])/v.count()}var f=It(r.get("barWidth"),o),p=It(r.get("barMaxWidth"),o),g=It(r.get("barMinWidth")||(ts(r)?.5:1),o),y=r.get("barGap"),b=r.get("barCategoryGap"),x=r.get("defaultBarGap");e.push({bandWidth:o,barWidth:f,barMaxWidth:p,barMinWidth:g,barGap:y,barCategoryGap:b,defaultBarGap:x,axisKey:Sr(i),stackId:qi(r)})}),zu(e)}function zu(a){var t={};O(a,function(r,n){var i=r.axisKey,s=r.bandWidth,o=t[i]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:null,gap:r.defaultBarGap||0,stacks:{}},l=o.stacks;t[i]=o;var u=r.stackId;l[u]||o.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=r.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(o.remainedWidth,c),o.remainedWidth-=c);var h=r.barMaxWidth;h&&(l[u].maxWidth=h);var d=r.barMinWidth;d&&(l[u].minWidth=d);var v=r.barGap;v!=null&&(o.gap=v);var f=r.barCategoryGap;f!=null&&(o.categoryGap=f)});var e={};return O(t,function(r,n){e[n]={};var i=r.stacks,s=r.bandWidth,o=r.categoryGap;if(o==null){var l=pa(i).length;o=Math.max(35-l*4,15)+"%"}var u=It(o,s),c=It(r.gap,1),h=r.remainedWidth,d=r.autoWidthCount,v=(h-u)/(d+(d-1)*c);v=Math.max(v,0),O(i,function(y){var b=y.maxWidth,x=y.minWidth;if(y.width){var w=y.width;b&&(w=Math.min(w,b)),x&&(w=Math.max(w,x)),y.width=w,h-=w+c*w,d--}else{var w=v;b&&b<w&&(w=Math.min(b,h)),x&&x>w&&(w=x),w!==v&&(y.width=w,h-=w+c*w,d--)}}),v=(h-u)/(d+(d-1)*c),v=Math.max(v,0);var f=0,p;O(i,function(y,b){y.width||(y.width=v),p=y,f+=y.width*(1+c)}),p&&(f-=p.width*c);var g=-f/2;O(i,function(y,b){e[n][b]=e[n][b]||{bandWidth:s,offset:g,width:y.width},g+=y.width*(1+c)})}),e}function Fu(a,t,e){if(a&&t){var r=a[Sr(t)];return r}}function Vu(a,t){var e=ji(a,t),r=Qi(e);O(e,function(n){var i=n.getData(),s=n.coordinateSystem,o=s.getBaseAxis(),l=qi(n),u=r[Sr(o)][l],c=u.offset,h=u.width;i.setLayout({bandWidth:u.bandWidth,offset:c,size:h})})}function Gu(a){return{seriesType:a,plan:uo(),reset:function(t){if(Ji(t)){var e=t.getData(),r=t.coordinateSystem,n=r.getBaseAxis(),i=r.getOtherAxis(n),s=e.getDimensionIndex(e.mapDimension(i.dim)),o=e.getDimensionIndex(e.mapDimension(n.dim)),l=t.get("showBackground",!0),u=e.mapDimension(i.dim),c=e.getCalculationInfo("stackResultDimension"),h=wr(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),d=i.isHorizontal(),v=Wu(n,i),f=ts(t),p=t.get("barMinHeight")||0,g=c&&e.getDimensionIndex(c),y=e.getLayout("size"),b=e.getLayout("offset");return{progress:function(x,w){for(var S=x.count,C=f&&ka(S*3),_=f&&l&&ka(S*3),P=f&&ka(S),k=r.master.getRect(),A=d?k.width:k.height,L,R=w.getStore(),I=0;(L=x.next())!=null;){var N=R.get(h?g:s,L),z=R.get(o,L),Z=v,tt=void 0;h&&(tt=+N-R.get(s,L));var V=void 0,K=void 0,Y=void 0,W=void 0;if(d){var U=r.dataToPoint([N,z]);if(h){var ot=r.dataToPoint([tt,z]);Z=ot[0]}V=Z,K=U[1]+b,Y=U[0]-Z,W=y,Math.abs(Y)<p&&(Y=(Y<0?-1:1)*p)}else{var U=r.dataToPoint([z,N]);if(h){var ot=r.dataToPoint([z,tt]);Z=ot[1]}V=U[0]+b,K=Z,Y=y,W=U[1]-Z,Math.abs(W)<p&&(W=(W<=0?-1:1)*p)}f?(C[I]=V,C[I+1]=K,C[I+2]=d?Y:W,_&&(_[I]=d?k.x:V,_[I+1]=d?K:k.y,_[I+2]=A),P[L]=L):w.setItemLayout(L,{x:V,y:K,width:Y,height:W}),I+=3}f&&w.setLayout({largePoints:C,largeDataIndices:P,largeBackgroundPoints:_,valueAxisHorizontal:d})}}}}}}function Ji(a){return a.coordinateSystem&&a.coordinateSystem.type==="cartesian2d"}function ts(a){return a.pipelineContext&&a.pipelineContext.large}function Wu(a,t){var e=t.model.get("startValue");return e||(e=0),t.toGlobalCoord(t.dataToCoord(t.type==="log"?e>0?e:1:e))}var Ja=function(a){q(t,a);function t(){var e=a!==null&&a.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,r){return Yi(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,r,n){var i=this.coordinateSystem;if(i&&i.clampData){var s=i.clampData(e),o=i.dataToPoint(s);if(n)O(i.getAxes(),function(d,v){if(d.type==="category"&&r!=null){var f=d.getTicksCoords(),p=d.getTickModel().get("alignWithLabel"),g=s[v],y=r[v]==="x1"||r[v]==="y1";if(y&&!p&&(g+=1),f.length<2)return;if(f.length===2){o[v]=d.toGlobalCoord(d.getExtent()[y?1:0]);return}for(var b=void 0,x=void 0,w=1,S=0;S<f.length;S++){var C=f[S].coord,_=S===f.length-1?f[S-1].tickValue+w:f[S].tickValue;if(_===g){x=C;break}else if(_<g)b=C;else if(b!=null&&_>g){x=(C+b)/2;break}S===1&&(w=_-f[0].tickValue)}x==null&&(b?b&&(x=f[f.length-1].coord):x=f[0].coord),o[v]=d.toGlobalCoord(x)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),h=i.getBaseAxis().isHorizontal()?0:1;o[h]+=u+c/2}return o}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",defaultBarGap:"10%"},t}(je);je.registerClass(Ja);var Uu=function(a){q(t,a);function t(){var e=a!==null&&a.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return Yi(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"),r=this.get("largeThreshold");return r>e&&(e=r),e},t.prototype.brushSelector=function(e,r,n){return n.rect(r.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=co(Ja.defaultOption,{clip:!0,roundCap:!1,showBackgroun
1d:!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:it.color.primary,borderWidth:2}},realtimeSort:!1}),t}(Ja),Yu=function(){function a(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return a}(),ln=function(a){q(t,a);function t(e){var r=a.call(this,e)||this;return r.type="sausage",r}return t.prototype.getDefaultShape=function(){return new Yu},t.prototype.buildPath=function(e,r){var n=r.cx,i=r.cy,s=Math.max(r.r0||0,0),o=Math.max(r.r,0),l=(o-s)*.5,u=s+l,c=r.startAngle,h=r.endAngle,d=r.clockwise,v=Math.PI*2,f=d?h-c<v:c-h<v;f||(c=h-(d?v:-v));var p=Math.cos(c),g=Math.sin(c),y=Math.cos(h),b=Math.sin(h);f?(e.moveTo(p*s+n,g*s+i),e.arc(p*u+n,g*u+i,l,-Math.PI+c,c,!d)):e.moveTo(p*o+n,g*o+i),e.arc(n,i,o,c,h,!d),e.arc(y*u+n,b*u+i,l,h-Math.PI*2,h-Math.PI,!d),s!==0&&e.arc(n,i,s,h,c,d)},t}(yi);function Zu(a,t){t=t||{};var e=t.isRoundCap;return function(r,n,i){var s=n.position;if(!s||s instanceof Array)return zr(r,n,i);var o=a(s),l=n.distance!=null?n.distance:5,u=this.shape,c=u.cx,h=u.cy,d=u.r,v=u.r0,f=(d+v)/2,p=u.startAngle,g=u.endAngle,y=(p+g)/2,b=e?Math.abs(d-v)/2:0,x=Math.cos,w=Math.sin,S=c+d*x(p),C=h+d*w(p),_="left",P="top";switch(o){case"startArc":S=c+(v-l)*x(y),C=h+(v-l)*w(y),_="center",P="top";break;case"insideStartArc":S=c+(v+l)*x(y),C=h+(v+l)*w(y),_="center",P="bottom";break;case"startAngle":S=c+f*x(p)+Pe(p,l+b,!1),C=h+f*w(p)+Oe(p,l+b,!1),_="right",P="middle";break;case"insideStartAngle":S=c+f*x(p)+Pe(p,-l+b,!1),C=h+f*w(p)+Oe(p,-l+b,!1),_="left",P="middle";break;case"middle":S=c+f*x(y),C=h+f*w(y),_="center",P="middle";break;case"endArc":S=c+(d+l)*x(y),C=h+(d+l)*w(y),_="center",P="bottom";break;case"insideEndArc":S=c+(d-l)*x(y),C=h+(d-l)*w(y),_="center",P="top";break;case"endAngle":S=c+f*x(g)+Pe(g,l+b,!0),C=h+f*w(g)+Oe(g,l+b,!0),_="left",P="middle";break;case"insideEndAngle":S=c+f*x(g)+Pe(g,-l+b,!0),C=h+f*w(g)+Oe(g,-l+b,!0),_="right",P="middle";break;default:return zr(r,n,i)}return r=r||{},r.x=S,r.y=C,r.align=_,r.verticalAlign=P,r}}function Xu(a,t,e,r){if(ge(r)){a.setTextConfig({rotation:r});return}else if(Q(t)){a.setTextConfig({rotation:0});return}var n=a.shape,i=n.clockwise?n.startAngle:n.endAngle,s=n.clockwise?n.endAngle:n.startAngle,o=(i+s)/2,l,u=e(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=o;break;case"startAngle":case"insideStartAngle":l=i;break;case"endAngle":case"insideEndAngle":l=s;break;default:a.setTextConfig({rotation:0});return}var c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),a.setTextConfig({rotation:c})}function Pe(a,t,e){return t*Math.sin(a)*(e?-1:1)}function Oe(a,t,e){return t*Math.cos(a)*(e?1:-1)}function Ku(a,t,e){var r=a.get("borderRadius");if(r==null)return{cornerRadius:0};Q(r)||(r=[r,r,r,r]);var n=Math.abs(t.r||0-t.r0||0);return{cornerRadius:nt(r,function(i){return Wa(i,n)})}}var Aa=Math.max,Da=Math.min;function qu(a,t){var e=a.getArea&&a.getArea();if(Ki(a,"cartesian2d")){var r=a.getBaseAxis();if(r.type!=="category"||!r.onBand){var n=t.getLayout("bandWidth");r.isHorizontal()?(e.x-=n,e.width+=n*2):(e.y-=n,e.height+=n*2)}}return e}var ju=function(a){q(t,a);function t(){var e=a.call(this)||this;return e.type=t.type,e._isFirstFrame=!0,e}return t.prototype.render=function(e,r,n,i){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var s=e.get("coordinateSystem");(s==="cartesian2d"||s==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,r,n):this._renderNormal(e,r,n,i))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,r){this._progressiveEls=[],this._incrementalRenderLarge(e,r)},t.prototype.eachRendered=function(e){gi(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var r=e.pipelineContext.large;(this._isLargeDraw==null||r!==this._isLargeDraw)&&(this._isLargeDraw=r,this._clear())},t.prototype._renderNormal=function(e,r,n,i){var s=this.group,o=e.getData(),l=this._data,u=e.co
1ordinateSystem,c=u.getBaseAxis(),h;u.type==="cartesian2d"?h=c.isHorizontal():u.type==="polar"&&(h=c.dim==="angle");var d=e.isAnimationEnabled()?e:null,v=Qu(e,u);v&&this._enableRealtimeSort(v,o,n);var f=e.get("clip",!0)||v,p=qu(u,o);s.removeClipPath();var g=e.get("roundCap",!0),y=e.get("showBackground",!0),b=e.getModel("backgroundStyle"),x=b.get("borderRadius")||0,w=[],S=this._backgroundEls,C=i&&i.isInitSort,_=i&&i.type==="changeAxisOrder";function P(L){var R=Ee[u.type](o,L);if(!R)return null;var I=ic(u,h,R);return I.useStyle(b.getItemStyle()),u.type==="cartesian2d"?I.setShape("r",x):I.setShape("cornerRadius",x),w[L]=I,I}o.diff(l).add(function(L){var R=o.getItemModel(L),I=Ee[u.type](o,L,R);if(I&&(y&&P(L),!(!o.hasValue(L)||!vn[u.type](I)))){var N=!1;f&&(N=un[u.type](p,I));var z=cn[u.type](e,o,L,I,h,d,c.model,!1,g);v&&(z.forceLabelAnimation=!0),fn(z,o,L,R,I,e,h,u.type==="polar"),C?z.attr({shape:I}):v?hn(v,d,z,I,L,h,!1,!1):ye(z,{shape:I},e,L),o.setItemGraphicEl(L,z),s.add(z),z.ignore=N}}).update(function(L,R){var I=o.getItemModel(L),N=Ee[u.type](o,L,I);if(N){if(y){var z=void 0;S.length===0?z=P(R):(z=S[R],z.useStyle(b.getItemStyle()),u.type==="cartesian2d"?z.setShape("r",x):z.setShape("cornerRadius",x),w[L]=z);var Z=Ee[u.type](o,L),tt=as(h,Z,u);zt(z,{shape:tt},d,L)}var V=l.getItemGraphicEl(R);if(!o.hasValue(L)||!vn[u.type](N)){s.remove(V);return}var K=!1;f&&(K=un[u.type](p,N),K&&s.remove(V));var Y=V&&(V.type==="sector"&&g||V.type==="sausage"&&!g);if(Y&&(V&&ba(V,e,R),V=null),V?vi(V):V=cn[u.type](e,o,L,N,h,d,c.model,!0,g),v&&(V.forceLabelAnimation=!0),_){var W=V.getTextContent();if(W){var U=ho(W);U.prevValue!=null&&(U.prevValue=U.value)}}else fn(V,o,L,I,N,e,h,u.type==="polar");C?V.attr({shape:N}):v?hn(v,d,V,N,L,h,!0,_):zt(V,{shape:N},e,L,null),o.setItemGraphicEl(L,V),V.ignore=K,s.add(V)}}).remove(function(L){var R=l.getItemGraphicEl(L);R&&ba(R,e,L)}).execute();var k=this._backgroundGroup||(this._backgroundGroup=new Ft);k.removeAll();for(var A=0;A<w.length;++A)k.add(w[A]);s.add(k),this._backgroundEls=w,this._data=o},t.prototype._renderLarge=function(e,r,n){this._clear(),mn(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,r){this._removeBackground(),mn(r,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var r=e.get("clip",!0)&&Eu(e.coordinateSystem,!1,e),n=this.group;r?n.setClipPath(r):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,r,n){var i=this;if(r.count()){var s=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(r,e,n),this._isFirstFrame=!1;else{var o=function(l){var u=r.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(s.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){i._updateSortWithinSameData(r,o,s,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,r,n){var i=[];return e.each(e.mapDimension(r.dim),function(s,o){var l=n(o);l=l??NaN,i.push({dataIndex:o,mappedValue:l,ordinalNumber:s})}),i.sort(function(s,o){return o.mappedValue-s.mappedValue}),{ordinalNumbers:nt(i,function(s){return s.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,r,n){for(var i=n.scale,s=e.mapDimension(n.dim),o=Number.MAX_VALUE,l=0,u=i.getOrdinalMeta().categories.length;l<u;++l){var c=e.rawIndexOf(s,i.getRawOrdinalNumber(l)),h=c<0?Number.MIN_VALUE:r(e.indexOfRawIndex(c));if(h>o)return!0;o=h}return!1},t.prototype._isOrderDifferentInView=function(e,r){for(var n=r.scale,i=n.getExtent(),s=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);s<=o;++s)if(e.ordinalNumbers[s]!==n.getRawOrdinalNumber(s))return!0},t.prototype._updateSortWithinSameData=function(e,r,n,i){if(this._isOrderChangedWithinSameData(e,r,n)){var s=this._dataSort(e,n,r);this._isOrderDifferentInView(s,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:s}))}},t.prototype._dispatchInitSort=function(e,r,n){var i=r.baseAxis,s=this._dataSort(e,i,function(o){return e.get(e.mapDimension(r.otherAxis.dim),o)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:s})},t.prototype.remove=function(e,r){this._clear(this._model),this._removeOnRenderedListener(r)},t.prototype.dispose=function(e,r){this._removeOnRenderedListener(r)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var r=this.group,n=this._data;
1e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(i){ba(i,e,mt(i).dataIndex)})):r.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(Ua),un={cartesian2d:function(a,t){var e=t.width<0?-1:1,r=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var n=a.x+a.width,i=a.y+a.height,s=Aa(t.x,a.x),o=Da(t.x+t.width,n),l=Aa(t.y,a.y),u=Da(t.y+t.height,i),c=o<s,h=u<l;return t.x=c&&s>n?o:s,t.y=h&&l>i?u:l,t.width=c?0:o-s,t.height=h?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),c||h},polar:function(a,t){var e=t.r0<=t.r?1:-1;if(e<0){var r=t.r;t.r=t.r0,t.r0=r}var n=Da(t.r,a.r),i=Aa(t.r0,a.r0);t.r=n,t.r0=i;var s=n-i<0;if(e<0){var r=t.r;t.r=t.r0,t.r0=r}return s}},cn={cartesian2d:function(a,t,e,r,n,i,s,o,l){var u=new Gt({shape:at({},r),z2:1});if(u.__dataIndex=e,u.name="item",i){var c=u.shape,h=n?"height":"width";c[h]=0}return u},polar:function(a,t,e,r,n,i,s,o,l){var u=!n&&l?ln:mr,c=new u({shape:r,z2:1});c.name="item";var h=es(n);if(c.calculateTextPosition=Zu(h,{isRoundCap:u===ln}),i){var d=c.shape,v=n?"r":"endAngle",f={};d[v]=n?r.r0:r.startAngle,f[v]=r[v],(o?zt:ye)(c,{shape:f},i)}return c}};function Qu(a,t){var e=a.get("realtimeSort",!0),r=t.getBaseAxis();if(e&&r.type==="category"&&t.type==="cartesian2d")return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function hn(a,t,e,r,n,i,s,o){var l,u;i?(u={x:r.x,width:r.width},l={y:r.y,height:r.height}):(u={y:r.y,height:r.height},l={x:r.x,width:r.width}),o||(s?zt:ye)(e,{shape:l},t,n,null);var c=t?a.baseAxis.model:null;(s?zt:ye)(e,{shape:u},c,n)}function dn(a,t){for(var e=0;e<t.length;e++)if(!isFinite(a[t[e]]))return!0;return!1}var Ju=["x","y","width","height"],tc=["cx","cy","r","startAngle","endAngle"],vn={cartesian2d:function(a){return!dn(a,Ju)},polar:function(a){return!dn(a,tc)}},Ee={cartesian2d:function(a,t,e){var r=a.getItemLayout(t);if(!r)return null;var n=e?ac(e,r):0,i=r.width>0?1:-1,s=r.height>0?1:-1;return{x:r.x+i*n/2,y:r.y+s*n/2,width:r.width-i*n,height:r.height-s*n}},polar:function(a,t,e){var r=a.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function ec(a){return a.startAngle!=null&&a.endAngle!=null&&a.startAngle===a.endAngle}function es(a){return function(t){var e=t?"Arc":"Angle";return function(r){switch(r){case"start":case"insideStart":case"end":case"insideEnd":return r+e;default:return r}}}(a)}function fn(a,t,e,r,n,i,s,o){var l=t.getItemVisual(e,"style");if(o){if(!i.get("roundCap")){var c=a.shape,h=Ku(r.getModel("itemStyle"),c);at(c,h),a.setShape(c)}}else{var u=r.get(["itemStyle","borderRadius"])||0;a.setShape("r",u)}a.useStyle(l);var d=r.getShallow("cursor");d&&a.attr("cursor",d);var v=o?s?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":s?n.height>=0?"bottom":"top":n.width>=0?"right":"left",f=pr(r);pi(a,f,{labelFetcher:i,labelDataIndex:e,defaultText:Zi(i.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var p=a.getTextContent();if(o&&p){var g=r.get(["label","position"]);a.textConfig.inside=g==="middle"?!0:null,Xu(a,g==="outside"?v:g,es(s),r.get(["label","rotate"]))}vo(p,f,i.getRawValue(e),function(b){return ku(t,b)});var y=r.getModel(["emphasis"]);mi(a,y.get("focus"),y.get("blurScope"),y.get("disabled")),fo(a,r),ec(n)&&(a.style.fill="none",a.style.stroke="none",O(a.states,function(b){b.style&&(b.style.fill=b.style.stroke="none")}))}function ac(a,t){var e=a.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var r=a.get(["itemStyle","borderWidth"])||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,n,i)}var rc=function(){function a(){}return a}(),pn=function(a){q(t,a);function t(e){var r=a.call(this,e)||this;return r.type="largeBar",r}return t.prototype.getDefaultShape=function(){return new rc},t.prototype.buildPath=function(e,r){for(var n=r.points,i=this.baseDimIdx,s=1-this.baseDimIdx,o=[],l=[],u=this.barWidth,c=0;c<n.length;c+=3)l[i]=u,l[s]=n[c+2],o[i]=n[c+i],o[s]=n[c+s],e.rect(o[0],o[1],l[0],l[1])},t}(yi);function mn(a,t,e,r){var n=a.getData(),i=n.getLayout("valueAxisHorizontal")?1:0,s=n.getLayout("largeDataIndices"),o=n.getLayout("size"),l=a.getModel("backgroundStyle"),u=n.getLayout("largeBackgroun
1dPoints");if(u){var c=new pn({shape:{points:u},incremental:!!r,silent:!0,z2:0});c.baseDimIdx=i,c.largeDataIndices=s,c.barWidth=o,c.useStyle(l.getItemStyle()),t.add(c),e&&e.push(c)}var h=new pn({shape:{points:n.getLayout("largePoints")},incremental:!!r,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=i,h.largeDataIndices=s,h.barWidth=o,t.add(h),h.useStyle(n.getVisual("style")),h.style.stroke=null,mt(h).seriesIndex=a.seriesIndex,a.get("silent")||(h.on("mousedown",gn),h.on("mousemove",gn)),e&&e.push(h)}var gn=po(function(a){var t=this,e=nc(t,a.offsetX,a.offsetY);mt(t).dataIndex=e>=0?e:null},30,!1);function nc(a,t,e){for(var r=a.baseDimIdx,n=1-r,i=a.shape.points,s=a.largeDataIndices,o=[],l=[],u=a.barWidth,c=0,h=i.length/3;c<h;c++){var d=c*3;if(l[r]=u,l[n]=i[d+2],o[r]=i[d+r],o[n]=i[d+n],l[n]<0&&(o[n]+=l[n],l[n]=-l[n]),t>=o[0]&&t<=o[0]+l[0]&&e>=o[1]&&e<=o[1]+l[1])return s[c]}return-1}function as(a,t,e){if(Ki(e,"cartesian2d")){var r=t,n=e.getArea();return{x:a?r.x:n.x,y:a?n.y:r.y,width:a?r.width:n.width,height:a?n.height:r.height}}else{var n=e.getArea(),i=t;return{cx:n.cx,cy:n.cy,r0:a?n.r0:i.r0,r:a?n.r:i.r,startAngle:a?i.startAngle:0,endAngle:a?i.endAngle:Math.PI*2}}}function ic(a,t,e){var r=a.type==="polar"?mr:Gt;return new r({shape:as(t,e,a),silent:!0,z2:0})}function sc(a){a.registerChartView(ju),a.registerSeriesModel(Uu),a.registerLayout(a.PRIORITY.VISUAL.LAYOUT,ht(Vu,"bar")),a.registerLayout(a.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Gu("bar")),a.registerProcessor(a.PRIORITY.PROCESSOR.STATISTIC,Ru("bar")),a.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var r=t.componentType||"series";e.eachComponent({mainType:r,query:t},function(n){t.sortInfo&&n.axis.setCategorySortInfo(t.sortInfo)})})}var yn=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],oc=1,ua=2,rs=oc|ua;function ca(a,t,e){e=e||rs,t?a.dirty|=e:a.dirty&=~e}function ns(a,t){return t=t||rs,a.dirty==null||!!(a.dirty&t)}function Vt(a){if(a)return ns(a)&&lc(a,a.label,a),a}function lc(a,t,e){var r=t.getComputedTransform();a.transform=_i(a.transform,r);var n=a.localRect=Qe(a.localRect,t.getBoundingRect()),i=t.style,s=i.margin,o=e&&e.marginForce,l=e&&e.minMarginForce,u=e&&e.marginDefault,c=i.__marginType;c==null&&u&&(s=u,c=Ae.textMargin);for(var h=0;h<4;h++)La[h]=c===Ae.minMargin&&l&&l[h]!=null?l[h]:o&&o[h]!=null?o[h]:s?s[h]:0;c===Ae.textMargin&&Ya(n,La,!1,!1);var d=a.rect=Qe(a.rect,n);return r&&d.applyTransform(r),c===Ae.minMargin&&Ya(d,La,!1,!1),a.axisAligned=xi(r),(a.label=a.label||{}).ignore=t.ignore,ca(a,!1),ca(a,!0,ua),a}var La=[0,0,0,0];function uc(a,t,e){return a.transform=_i(a.transform,e),a.localRect=Qe(a.localRect,t),a.rect=Qe(a.rect,t),e&&a.rect.applyTransform(e),a.axisAligned=xi(e),a.obb=void 0,(a.label=a.label||{}).ignore=!1,a}function cc(a,t){if(a){a.label.x+=t.x,a.label.y+=t.y,a.label.markRedraw();var e=a.transform;e&&(e[4]+=t.x,e[5]+=t.y);var r=a.rect;r&&(r.x+=t.x,r.y+=t.y);var n=a.obb;n&&n.fromBoundingRect(a.localRect,e)}}function _n(a,t){for(var e=0;e<yn.length;e++){var r=yn[e];a[r]==null&&(a[r]=t[r])}return Vt(a)}function xn(a){var t=a.obb;return(!t||ns(a,ua))&&(a.obb=t=t||new mo,t.fromBoundingRect(a.localRect,a.transform),ca(a,!1,ua)),t}function hc(a){var t=[];a.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function e(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var r=0;r<a.length;r++){var n=Vt(a[r]);if(!n.label.ignore){for(var i=n.label,s=n.labelLine,o=!1,l=0;l<t.length;l++)if(Cr(n,t[l],null,{touchThreshold:.05})){o=!0;break}o?(e(i),s&&e(s)):t.push(n)}}}function Cr(a,t,e,r){return!a||!t||a.label&&a.label.ignore||t.label&&t.label.ignore||!a.rect.intersect(t.rect,e,r)?!1:a.axisAligned&&t.axisAligned?!0:xn(a).intersect(xn(t),e,r)}var bn=[],dc={registerPreprocessor:Lo,registerProcessor:Do,registerPostInit:Ao,registerPostUpdate:ko,registerUpdateLifecycle:To,registerAction:Mo,registerCoordinateSystem:Co,registerLayout:So,registerVisual:wo,registerTransform:bo,registerLoading:xo,registerMap:_o,registerImpl:yo,PRIORITY:go,ComponentModel:$t,ComponentView:Kt,SeriesModel:je,ChartView:Ua,registerComponentModel:function(a){$t.registerClass(a)},registerComponentView:function(a){Kt.registerClass(a)},registerSeriesModel:function(a){je.registerClass(a)},registerChartView:function(a){Ua.registerClass(a)},registerCustomSeries:function(a,t){},registerSubTypeDefaulter:function(a,t){$t.registerSubTypeDefaulter(a,t)},registerPainter:function(a,t){Io(a,t)}};function we(a){if(Q(a)){O(a,function(t){we(t)});return}xt(bn,a)>
1=0||(bn.push(a),J(a)&&(a={install:a}),a.install(dc))}var is={left:0,right:0,top:0,bottom:0},ha=["25%","25%"],vc=function(a){q(t,a);function t(){return a!==null&&a.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(e,r){var n=bi(e.outerBounds);a.prototype.mergeDefaultAndTheme.apply(this,arguments),n&&e.outerBounds&&Za(e.outerBounds,n)},t.prototype.mergeOption=function(e,r){a.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&e.outerBounds&&Za(this.option.outerBounds,e.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:is,outerBoundsContain:"all",outerBoundsClampWidth:ha[0],outerBoundsClampHeight:ha[1],backgroundColor:it.color.transparent,borderWidth:1,borderColor:it.color.neutral30},t}($t),fc=function(){function a(){}return a.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},a.prototype.getCoordSysModel=function(){},a}(),tr=function(a){q(t,a);function t(){return a!==null&&a.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Dt).models[0]},t.type="cartesian2dAxis",t}($t);wi(tr,fc);var ss={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:it.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},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,color:it.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:it.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[it.color.backgroundTint,it.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:it.color.neutral00,borderColor:it.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},pc=wt({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},ss),Mr=wt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:it.color.axisMinorSplitLine,width:1}}},ss),mc=wt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Mr),gc=kt({logBase:10},Mr);const yc={category:pc,value:Mr,time:mc,log:gc};var _c=0,er=function(){function a(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++_c,this._onCollect=t.onCollect}return a.createByAxisModel=function(t){var e=t.option,r=e.data,n=r&&nt(r,xc);return new a({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})},a.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},a.prototype.parseAndCollect=function(t){var e,r=this._needCollect;if(!st(t)&&!r)return t;if(r&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,this._onCollect&&this._onCollect(t,e),e;var n=this._getOrCreateMap();return e=n.get(t),e==null&&(r?(e=this.categories.length,this.categories[e]=t,n.set(t,e),this._onCollect&&this._onCollect(t,e)):e=NaN),e},a.prototype._getOrCreateMap=function(){return this._map||(this._map=Ct(this.categories))},a}();function xc(a){return pt(a)&&a.value!=null?a.value:a+""}var bc={value:1,category:1,time:1,log:1},wc=null;function Sc(){return wc}function wn(a,t,e,r){O(bc,function(n,i){var s=wt(wt({},yc[i],!0),r,!0),o=function(l){q(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+i,c}return u.prototype.mergeDefaultAndTheme=function(c,h){var d=Po(this),v=d?bi(c):{},f=h.getTheme();wt(c,f.get(i+"Axis")),wt(c,this.getDefaultOption()),c.type=Sn(c),d&&Za(c,v,d)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=er.createByAxisModel(this))},u.prototype.getCategories=function(c){var h=this.option;if(h.type==="category")return c?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){return{breaks:[]}},u.type=t+"Axis."+i,u.defaultOption=s,u}(e);a.registerComponentModel(o)}),a.registerSubTypeDefaulter(t+"Axis",Sn)}function Sn(a){return a.type||(a.data?"category":"value")}function ar(a){return a.type==="interval"||a.type==="log"}function Cc(a,t,e,r,n){var i={},s=i.interval=Si(t/e);r!=null&&s<r&&(s=i.interval=r),n!=null&&s>n&&(s=i.interval=n);var o=i.intervalPrecision=Se(s),l=i.niceTickExtent=[gt(Math.ceil(a[0]/s)*s,o),gt(Math.floor(a[1]/s)*s,o)];return Mc(l,a),i}function Ia(a){var t=Math.pow(10,Oo(a)),e=a/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,gt(e*t)}function Se(a){return ma(a)+2}function Cn(a,t,e){a[t]=Math.max(Math.min(a[t],e[1]),e[0])}function Mc(a,t){!isFinite(a[0])&&(a[0]=t[0]),!isFinite(a[1])&&(a[1]=t[1]),Cn(a,0,t),Cn(a,1,t),a[0]>a[1]&&(a[0]=a[1])}function Tr(a,t){return a>=t[0]&&a<=t[1]}var Tc=function(){function a(){this.normalize=Mn,this.scale=Tn}return a.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=vt(t.normalize,t),this.scale=vt(t.scale,t)):(this.normalize=Mn,this.scale=Tn)},a}();function Mn(a,t){return t[1]===t[0]?.5:(a-t[0])/(t[1]-t[0])}function Tn(a,t){return a*(t[1]-t[0])+t[0]}function rr(a,t,e){var r=Math.log(a);return[Math.log(e?t[0]:Math.max(0,t[0]))/r,Math.log(e?t[1]:Math.max(0,t[1]))/r]}var Ut=function(){function a(t){this._calculator=new Tc,this._setting=t||{},this._extent=[1/0,-1/0]}return a.prototype.getSetting=function(t){return this._setting[t]},a.prototype._innerUnionExtent=function(t){var e=this._extent;this._innerSetExtent(t[0]<e[0]?t[0]:e[0],t[1]>e[1]?t[1]:e[1])},a.prototype.unionExtentFromData=function(t,e){this._innerUnionExtent(t.getApproximateExtent(e))},a.prototype.getExtent=function(){return this._extent.slice()},a.prototype.setExtent=function(t,e){this._innerSetExtent(t,e)},a.prototype._innerSetExtent=function(t,e){var r=this._extent;isNaN(t)||(r[0]=t),isNaN(e)||(r[1]=e),this._brkCtx&&this._brkCtx.update(r)},a.prototype.setBreaksFromOption=function(t){},a.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},a.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},a.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},a.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},a.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},a.prototype.isBlank=function(){return this._isBlank},a.prototype.setBlank=function(t){this._isBlank=t},a}();Eo(Ut);var os=function(a){q(t,a);function t(e){var r=a.call(this,e)||this;r.type="ordinal";var n=r.getSetting("ordinalMeta");return n||(n=new er({})),Q(n)&&(n=new er({categories:nt(n,function(i){return pt(i)?i.value:i})})),r._ordinalMeta=n,r._extent=r.getSetting("extent")||[0,n.categories.length-1],r}return t.prototype.parse=function(e){return e==null?NaN:st(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return Tr(e,this._extent)&&e>=0&&e<this._ordinalMeta.categories.length},t.prototype.normalize=function(e){return e=this._getTickNumber(e),this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(this._calculator.scale(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],r=this._extent,n=r[0];n<=r[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var r=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],s=0,o=this._ordinalMeta.categories.length,l=Math.min(o,r.length);s<l;++s){var u=r[s];n[s]=u,i[u]=s}for(var c=0;s<o;++s){for(;i[c]!=null;)c++;n.push(c),i[c]=s}},t.prototype._getTickNumber=function(e){var r=this._ticksByOrdinalNumber;return r&&e>=0&&e<r.length?r[e]:e},t.prototype.getRawOrdinalNumber=function(e){var r=this._ordinalNumbersByTick;return r&&e>=0&&e<r.length?r[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var r=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[r];return n==null?"":n+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},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}(Ut);Ut.registerClass(os);var Et=gt,re=function(a){q(t,a);function t(){var e=a!==null&&a.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e==null||e===""?NaN:Number(e)},t.prototype.contain=function(e){return Tr(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=Se(e)},t.prototype.getTicks=function(e){e=e||{};var r=this._interval,n=this._extent,i=this._niceExtent,s=this._intervalPrecision,o=Xa(),l=[];
1if(!r)return l;e.breakTicks;var u=1e4;n[0]<i[0]&&(e.expandToNicedExtent?l.push({value:Et(i[0]-r,s)}):l.push({value:n[0]}));for(var c=function(f,p){return Math.round((p-f)/r)},h=i[0];h<=i[1];){if(l.push({value:h}),h=Et(h+r,s),this._brkCtx){var d=this._brkCtx.calcNiceTickMultiple(h,c);d>=0&&(h=Et(h+d*r,s))}if(l.length>0&&h===l[l.length-1].value)break;if(l.length>u)return[]}var v=l.length?l[l.length-1].value:i[1];return n[1]>v&&(e.expandToNicedExtent?l.push({value:Et(v+r,s)}):l.push({value:n[1]})),e.breakTicks,l},t.prototype.getMinorTicks=function(e){for(var r=this.getTicks({expandToNicedExtent:!0}),n=[],i=this.getExtent(),s=1;s<r.length;s++){var o=r[s],l=r[s-1];if(!(l.break||o.break)){for(var u=0,c=[],h=o.value-l.value,d=h/e,v=Se(d);u<e-1;){var f=Et(l.value+(u+1)*d,v);f>i[0]&&f<i[1]&&c.push(f),u++}var p=Xa();p&&p.pruneTicksByBreak("auto",c,this._getNonTransBreaks(),function(g){return g},this._interval,i),n.push(c)}}return n},t.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.getLabel=function(e,r){if(e==null)return"";var n=r&&r.precision;n==null?n=ma(e.value)||0:n==="auto"&&(n=this._intervalPrecision);var i=Et(e.value,n,!0);return Bo(i)},t.prototype.calcNiceTicks=function(e,r,n){e=e||5;var i=this._extent.slice(),s=this._getExtentSpanWithBreaks();if(isFinite(s)){s<0&&(s=-s,i.reverse(),this._innerSetExtent(i[0],i[1]),i=this._extent.slice());var o=Cc(i,s,e,r,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var r=this._extent.slice();if(r[0]===r[1])if(r[0]!==0){var n=Math.abs(r[0]);e.fixMax||(r[1]+=n/2),r[0]-=n/2}else r[1]=1;var i=r[1]-r[0];isFinite(i)||(r[0]=0,r[1]=1),this._innerSetExtent(r[0],r[1]),r=this._extent.slice(),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var s=this._interval,o=this._intervalPrecision;e.fixMin||(r[0]=Et(Math.floor(r[0]/s)*s,o)),e.fixMax||(r[1]=Et(Math.ceil(r[1]/s)*s,o)),this._innerSetExtent(r[0],r[1])},t.prototype.setNiceExtent=function(e,r){this._niceExtent=[e,r]},t.type="interval",t}(Ut);Ut.registerClass(re);var kc=function(a,t,e,r){for(;e<r;){var n=e+r>>>1;a[n][1]<t?e=n+1:r=n}return e},ls=function(a){q(t,a);function t(e){var r=a.call(this,e)||this;return r.type="time",r}return t.prototype.getLabel=function(e){var r=this.getSetting("useUTC");return Ci(e.value,Fr[No(Ye(this._minLevelUnit))]||Fr.second,r,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,r,n){var i=this.getSetting("useUTC"),s=this.getSetting("locale");return Ro(e,r,n,s,i)},t.prototype.getTicks=function(e){var r=this._interval,n=this._extent,i=[];if(!r)return i;var s=this.getSetting("useUTC"),o=Ka(n[1],s);i.push({value:n[0],time:{level:0,upperTimeUnit:o,lowerTimeUnit:o}});var l=Bc(this._minLevelUnit,this._approxInterval,s,n,this._getExtentSpanWithBreaks(),this._brkCtx);i=i.concat(l);var u=Ka(n[1],s);i.push({value:n[1],time:{level:0,upperTimeUnit:u,lowerTimeUnit:u}}),this.getSetting("useUTC");var c=Je.length-1,h=0;return O(i,function(d){c=Math.min(c,xt(Je,d.time.upperTimeUnit)),h=Math.max(h,d.time.level)}),i},t.prototype.calcNiceExtent=function(e){var r=this.getExtent();if(r[0]===r[1]&&(r[0]-=bt,r[1]+=bt),r[1]===-1/0&&r[0]===1/0){var n=new Date;r[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),r[0]=r[1]-bt}this._innerSetExtent(r[0],r[1]),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,r,n){e=e||10;var i=this._getExtentSpanWithBreaks();this._approxInterval=i/e,r!=null&&this._approxInterval<r&&(this._approxInterval=r),n!=null&&this._approxInterval>n&&(this._approxInterval=n);var s=Be.length,o=Math.min(kc(Be,this._approxInterval,0,s),s-1);this._interval=Be[o][1],this._intervalPrecision=Se(this._interval),this._minLevelUnit=Be[Math.max(o-1,0)][0]},t.prototype.parse=function(e){return ge(e)?e:+$o(e)},t.prototype.contain=function(e){return Tr(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.type="time",t}(re),Be=[["second",Mi],["minute",Ti],["hour",Ze],["quarter-day",Ze*6],["half-day",Ze*12],["day",bt*1.2],["half-week",bt*3.5],["week",bt*7],["month",bt*31],["quarter",bt*95],["half-year",Vr/2],["year",Vr]];function Ac(a,t,e,r){return qa(new Date(t),a,r).getTime()===qa(new Date(e),a,r).getTime()}function Dc(a,t){return a/=bt,a>16?16:a>7.5?7:a>3.5?4:a>1.5?2:1}function Lc(a){var t=30*bt;return a/=t,a>6?6:a>3?3:a>2?2:1}function Ic(a){return a/=Ze,a>12?12:a>6?6:a>3.5?4:a>2?2:1}function kn(a,t){return a/=t?Ti:Mi,a>30?30:a>20?20:a>15?15:a>10?10:a>5?5:a>2?2:1}function Pc(a){return Si(a)}function Oc(a,t,e){var r=Math.max(0,xt(Je,t)-1);return qa(new Date(a),Je[r],e).getTime()}function Ec(a,t){var e=new Date(0);e[a](1);var r=e.getTime();e[a](1+t);var n=e.getTime()-r;return function(i,s){return Math.max(0,Math.round((s-i)/n))}}function Bc(a,t,e,r,n,i){var s=1e4,o=Ho,l=0;function u(I,N,z,Z,tt,V,K){for(var Y=Ec(tt,I),W=N,U=new Date(W);W<z&&W<=r[1]&&(K.push({value:W}),!(l++>s));)if(U[tt](U[Z]()+I),W=U.getTime(),i){var ot=i.calcNiceTickMultiple(W,Y);ot>0&&(U[tt](U[Z]()+ot*I),W=U.getTime())}K.push({value:W,notAdd:!0})}function c(I,N,z){var Z=[],tt=!N.length;if(!Ac(Ye(I),r[0],r[1],e)){tt&&(N=[{value:Oc(r[0],I,e)},{value:r[1]}]);for(var V=0;V<N.length-1;V++){var K=N[V].value,Y=N[V+1].value;if(K!==Y){var W=void 0,U=void 0,ot=void 0,se=!1;switch(I){case"year":W=Math.max(1,Math.round(t/bt/365)),U=Jo(e),ot=tl(e);break;case"half-year":case"quarter":case"month":W=Lc(t),U=jo(e),ot=Qo(e);break;case"week":case"half-week":case"day":W=Dc(t),U=Ko(e),ot=qo(e),se=!0;break;case"half-day":case"quarter-day":case"hour":W=Ic(t),U=Zo(e),ot=Xo(e);break;case"minute":W=kn(t,!0),U=Uo(e),ot=Yo(e);break;case"second":W=kn(t,!1),U=Go(e),ot=Wo(e);break;case"millisecond":W=Pc(t),U=Fo(e),ot=Vo(e);break}Y>=r[0]&&K<=r[1]&&u(W,K,Y,U,ot,se,Z),I==="year"&&z.length>1&&V===0&&z.unshift({value:z[0].value-W})}}for(var V=0;V<Z.length;V++)z.push(Z[V])}}for(var h=[],d=[],v=0,f=0,p=0;p<o.length;++p){var g=Ye(o[p]);if(zo(o[p])){c(o[p],h[h.length-1]||[],d);var y=o[p+1]?Ye(o[p+1]):null;if(g!==y){if(d.length){f=v,d.sort(function(I,N){return I.value-N.value});for(var b=[],x=0;x<d.length;++x){var w=d[x].value;(x===0||d[x-1].value!==w)&&(b.push(d[x]),w>=r[0]&&w<=r[1]&&v++)}var S=n/t;if(v>S*1.5&&f>S/1.5||(h.push(b),v>S||a===o[p]))break}d=[]}}}for(var C=qt(nt(h,function(I){return qt(I,function(N){return N.value>=r[0]&&N.value<=r[1]&&!N.notAdd})}),function(I){return I.length>0}),_=[],P=C.length-1,p=0;p<C.length;++p)for(var k=C[p],A=0;A<k.length;++A){var L=Ka(k[A].value,e);_.push({value:k[A].value,time:{level:P-p,upperTimeUnit:L,lowerTimeUnit:L}})}_.sort(function(I,N){return I.value-N.value});for(var R=[],p=0;p<_.length;++p)(p===0||_[p].value!==_[p-1].value)&&R.push(_[p]);return R}Ut.registerClass(ls);var nr=gt,Nc=Math.floor,Rc=Math.ceil,Ne=Math.pow,Re=Math.log,us=function(a){q(t,a);function t(){var e=a!==null&&a.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new re,e}return t.prototype.getTicks=function(e){e=e||{};var r=this._extent.slice(),n=this._originalScale.getExtent(),i=a.prototype.getTicks.call(this,e),s=this.base;return this._originalScale._innerGetBreaks(),nt(i,function(o){var l=o.value,u=null,c=Ne(s,l);l===r[0]&&this._fixMin?u=n[0]:l===r[1]&&this._fixMax&&(u=n[1]);var h;return u!=null&&(c=Pa(c,u)),{value:c,break:h}},this)},t.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},t.prototype.setExtent=function(e,r){this._originalScale.setExtent(e,r);var n=rr(this.base,[e,r]);a.prototype.setExtent.call(this,n[0],n[1])},t.prototype.getExtent=function(){var e=this.base,r=a.prototype.getExtent.call(this);r[0]=Ne(e,r[0]),r[1]=Ne(e,r[1]);var n=this._originalScale.getExtent();return this._fixMin&&(r[0]=Pa(r[0],n[0])),this._fixMax&&(r[1]=Pa(r[1],n[1])),r},t.prototype.unionExtentFromData=function(e,r){this._originalScale.unionExtentFromData(e,r);var n=rr(this.base,e.getApproximateExtent(r),!0);this._innerUnionExtent(n)},t.prototype.calcNiceTicks=function(e){e=e||10;var r=this._extent.slice(),n=this._getExtentSpanWithBreaks();if(!(!isFinite(n)||n<=0)){var i=el(n),s=e/n*i;for(s<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var o=[nr(Rc(r[0]/i)*i),nr(Nc(r[1]/i)*i)];this._interval=i,this._intervalPrecision=Se(i),this._niceExtent=o}},t.prototype.calcNiceExtent=function(e){a.prototype.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.f
1ixMax},t.prototype.contain=function(e){return e=Re(e)/Re(this.base),a.prototype.contain.call(this,e)},t.prototype.normalize=function(e){return e=Re(e)/Re(this.base),a.prototype.normalize.call(this,e)},t.prototype.scale=function(e){return e=a.prototype.scale.call(this,e),Ne(this.base,e)},t.prototype.setBreaksFromOption=function(e){},t.type="log",t}(re);function Pa(a,t){return nr(a,ma(t))}Ut.registerClass(us);var $c=function(){function a(t,e,r){this._prepareParams(t,e,r)}return a.prototype._prepareParams=function(t,e,r){r[1]<r[0]&&(r=[NaN,NaN]),this._dataMin=r[0],this._dataMax=r[1];var n=this._isOrdinal=t.type==="ordinal";this._needCrossZero=t.type==="interval"&&e.getNeedCrossZero&&e.getNeedCrossZero();var i=e.get("min",!0);i==null&&(i=e.get("startValue",!0));var s=this._modelMinRaw=i;J(s)?this._modelMinNum=$e(t,s({min:r[0],max:r[1]})):s!=="dataMin"&&(this._modelMinNum=$e(t,s));var o=this._modelMaxRaw=e.get("max",!0);if(J(o)?this._modelMaxNum=$e(t,o({min:r[0],max:r[1]})):o!=="dataMax"&&(this._modelMaxNum=$e(t,o)),n)this._axisDataLen=e.getCategories().length;else{var l=e.get("boundaryGap"),u=Q(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Wa(u[0],1),Wa(u[1],1)]}},a.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,r=this._dataMax,n=this._axisDataLen,i=this._boundaryGapInner,s=t?null:r-e||Math.abs(e),o=this._modelMinRaw==="dataMin"?e:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?r:this._modelMaxNum,u=o!=null,c=l!=null;o==null&&(o=t?n?0:NaN:e-i[0]*s),l==null&&(l=t?n?n-1:NaN:r+i[1]*s),(o==null||!isFinite(o))&&(o=NaN),(l==null||!isFinite(l))&&(l=NaN);var h=ta(o)||ta(l)||t&&!n;this._needCrossZero&&(o>0&&l>0&&!u&&(o=0),o<0&&l<0&&!c&&(l=0));var d=this._determinedMin,v=this._determinedMax;return d!=null&&(o=d,u=!0),v!=null&&(l=v,c=!0),{min:o,max:l,minFixed:u,maxFixed:c,isBlank:h}},a.prototype.modifyDataMinMax=function(t,e){this[zc[t]]=e},a.prototype.setDeterminedMinMax=function(t,e){var r=Hc[t];this[r]=e},a.prototype.freeze=function(){this.frozen=!0},a}(),Hc={min:"_determinedMin",max:"_determinedMax"},zc={min:"_dataMin",max:"_dataMax"};function Fc(a,t,e){var r=a.rawExtentInfo;return r||(r=new $c(a,t,e),a.rawExtentInfo=r,r)}function $e(a,t){return t==null?null:ta(t)?NaN:a.parse(t)}function cs(a,t){var e=a.type,r=Fc(a,t,a.getExtent()).calculate();a.setBlank(r.isBlank);var n=r.min,i=r.max,s=t.ecModel;if(s&&e==="time"){var o=ji("bar",s),l=!1;if(O(o,function(h){l=l||h.getBaseAxis()===t.axis}),l){var u=Qi(o),c=Vc(n,i,t,u);n=c.min,i=c.max}}return{extent:[n,i],fixMin:r.minFixed,fixMax:r.maxFixed}}function Vc(a,t,e,r){var n=e.axis.getExtent(),i=Math.abs(n[1]-n[0]),s=Fu(r,e.axis);if(s===void 0)return{min:a,max:t};var o=1/0;O(s,function(v){o=Math.min(v.offset,o)});var l=-1/0;O(s,function(v){l=Math.max(v.offset+v.width,l)}),o=Math.abs(o),l=Math.abs(l);var u=o+l,c=t-a,h=1-(o+l)/i,d=c/h-c;return t+=d*(l/u),a-=d*(o/u),{min:a,max:t}}function An(a,t){var e=t,r=cs(a,e),n=r.extent,i=e.get("splitNumber");a instanceof us&&(a.base=e.get("logBase"));var s=a.type,o=e.get("interval"),l=s==="interval"||s==="time";a.setBreaksFromOption(ds(e)),a.setExtent(n[0],n[1]),a.calcNiceExtent({splitNumber:i,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),o!=null&&a.setInterval&&a.setInterval(o)}function Gc(a,t){if(t=t||a.get("type"),t)switch(t){case"category":return new os({ordinalMeta:a.getOrdinalMeta?a.getOrdinalMeta():a.getCategories(),extent:[1/0,-1/0]});
1case"time":return new ls({locale:a.ecModel.getLocaleModel(),useUTC:a.ecModel.get("useUTC")});default:return new(Ut.getClass(t)||re)}}function Wc(a){var t=a.scale.getExtent(),e=t[0],r=t[1];return!(e>0&&r>0||e<0&&r<0)}function ke(a){var t=a.getLabelModel().get("formatter");if(a.type==="time"){var e=al(t);return function(n,i){return a.scale.getFormattedLabel(n,i,e)}}else{if(st(t))return function(n){var i=a.scale.getLabel(n),s=t.replace("{value}",i??"");return s};if(J(t)){if(a.type==="category")return function(n,i){return t(da(a,n),n.value-a.scale.getExtent()[0],null)};var r=Xa();return function(n,i){var s=null;return r&&(s=r.makeAxisLabelFormatterParamBreak(s,n.break)),t(da(a,n),i,s)}}else return function(n){return a.scale.getLabel(n)}}}function da(a,t){return a.type==="category"?a.scale.getLabel(t):t.value}function kr(a){var t=a.get("interval");return t??"auto"}function hs(a){return a.type==="category"&&kr(a.getLabelModel())===0}function Uc(a,t){var e={};return O(a.mapDimensionsAll(t),function(r){e[wu(a,r)]=!0}),pa(e)}function ne(a){return a==="middle"||a==="center"}function Ce(a){return a.getShallow("show")}function ds(a){var t=a.get("breaks",!0);t==null}var Yc=function(){function a(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return a.prototype.getAxis=function(t){return this._axes[t]},a.prototype.getAxes=function(){return nt(this._dimList,function(t){return this._axes[t]},this)},a.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),qt(this.getAxes(),function(e){return e.scale.type===t})},a.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},a}(),ir=["x","y"];function Dn(a){return(a.type==="interval"||a.type==="time")&&!a.hasBreaks()}var Zc=function(a){q(t,a);function t(){var e=a!==null&&a.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=ir,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,r=this.getAxis("y").scale;if(!(!Dn(e)||!Dn(r))){var n=e.getExtent(),i=r.getExtent(),s=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),l=n[1]-n[0],u=i[1]-i[0];if(!(!l||!u)){var c=(o[0]-s[0])/l,h=(o[1]-s[1])/u,d=s[0]-n[0]*c,v=s[1]-i[0]*h,f=this._transform=[c,0,0,h,d,v];this._invTransform=ki([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var r=this.getAxis("x"),n=this.getAxis("y");return r.contain(r.toLocalCoord(e[0]))&&n.contain(n.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,r){var n=this.dataToPoint(e),i=this.dataToPoint(r),s=this.getArea(),o=new St(n[0],n[1],i[0]-n[0],i[1]-n[1]);return s.intersect(o)},t.prototype.dataToPoint=function(e,r,n){n=n||[];var i=e[0],s=e[1];if(this._transform&&i!=null&&isFinite(i)&&s!=null&&isFinite(s))return ee(n,e,this._transform);var o=this.getAxis("x"),l=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i,r)),n[1]=l.toGlobalCoord(l.dataToCoord(s,r)),n},t.prototype.clampData=function(e,r){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,s=n.getExtent(),o=i.getExtent(),l=n.parse(e[0]),u=i.parse(e[1]);return r=r||[],r[0]=Math.min(Math.max(Math.min(s[0],s[1]),l),Math.max(s[0],s[1])),r[1]=Math.min(Math.max(Math.min(o[0],o[1]),u),Math.max(o[0],o[1])),r},t.prototype.pointToData=function(e,r,n){if(n=n||[],this._invTransform)return ee(n,e,this._invTransform);var i=this.getAxis("x"),s=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(e[0]),r),n[1]=s.coordToData(s.toLocalCoord(e[1]),r),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var r=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(r[0],r[1])-e,s=Math.min(n[0],n[1])-e,o=Math.max(r[0],r[1])-i+e,l=Math.max(n[0],n[1])-s+e;return new St(i,s,o,l)},t}(Yc),Xc=Tt(),me=Tt(),Mt={estimate:1,determine:2};function va(a){return{out:{noPxChangeTryDetermine:[]},kind:a}}function vs(a,t){var e=nt(t,function(r){return a.scale.parse(r)});return a.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function Kc(a,t){var e=a.getLabelModel().get("customValues");
1if(e){var r=ke(a),n=a.scale.getExtent(),i=vs(a,e),s=qt(i,function(o){return o>=n[0]&&o<=n[1]});return{labels:nt(s,function(o){var l={value:o};return{formattedLabel:r(l),rawLabel:a.scale.getLabel(l),tickValue:o,time:void 0,break:void 0}})}}return a.type==="category"?jc(a,t):Jc(a)}function qc(a,t,e){var r=a.getTickModel().get("customValues");if(r){var n=a.scale.getExtent(),i=vs(a,r);return{ticks:qt(i,function(s){return s>=n[0]&&s<=n[1]})}}return a.type==="category"?Qc(a,t):{ticks:nt(a.scale.getTicks(e),function(s){return s.value})}}function jc(a,t){var e=a.getLabelModel(),r=fs(a,e,t);return!e.get("show")||a.scale.isBlank()?{labels:[]}:r}function fs(a,t,e){var r=eh(a),n=kr(t),i=e.kind===Mt.estimate;if(!i){var s=ms(r,n);if(s)return s}var o,l;J(n)?o=_s(a,n):(l=n==="auto"?ah(a,e):n,o=ys(a,l));var u={labels:o,labelCategoryInterval:l};return i?e.out.noPxChangeTryDetermine.push(function(){return sr(r,n,u),!0}):sr(r,n,u),u}function Qc(a,t){var e=th(a),r=kr(t),n=ms(e,r);if(n)return n;var i,s;if((!t.get("show")||a.scale.isBlank())&&(i=[]),J(r))i=_s(a,r,!0);else if(r==="auto"){var o=fs(a,a.getLabelModel(),va(Mt.determine));s=o.labelCategoryInterval,i=nt(o.labels,function(l){return l.tickValue})}else s=r,i=ys(a,s,!0);return sr(e,r,{ticks:i,tickCategoryInterval:s})}function Jc(a){var t=a.scale.getTicks(),e=ke(a);return{labels:nt(t,function(r,n){return{formattedLabel:e(r,n),rawLabel:a.scale.getLabel(r),tickValue:r.value,time:r.time,break:r.break}})}}var th=ps("axisTick"),eh=ps("axisLabel");function ps(a){return function(e){return me(e)[a]||(me(e)[a]={list:[]})}}function ms(a,t){for(var e=0;e<a.list.length;e++)if(a.list[e].key===t)return a.list[e].value}function sr(a,t,e){return a.list.push({key:t,value:e}),e}function ah(a,t){if(t.kind===Mt.estimate){var e=a.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return me(a).autoInterval=e,!0}),e}var r=me(a).autoInterval;return r??(me(a).autoInterval=a.calculateCategoryInterval(t))}function rh(a,t){var e=t.kind,r=ih(a),n=ke(a),i=(r.axisRotate-r.labelRotate)/180*Math.PI,s=a.scale,o=s.getExtent(),l=s.count();if(o[1]-o[0]<1)return 0;var u=1,c=40;l>c&&(u=Math.max(1,Math.floor(l/c)));for(var h=o[0],d=a.dataToCoord(h+1)-a.dataToCoord(h),v=Math.abs(d*Math.cos(i)),f=Math.abs(d*Math.sin(i)),p=0,g=0;h<=o[1];h+=u){var y=0,b=0,x=Ai(n({value:h}),r.font,"center","top");y=x.width*1.3,b=x.height*1.3,p=Math.max(p,y,7),g=Math.max(g,b,7)}var w=p/v,S=g/f;isNaN(w)&&(w=1/0),isNaN(S)&&(S=1/0);var C=Math.max(0,Math.floor(Math.min(w,S)));if(e===Mt.estimate)return t.out.noPxChangeTryDetermine.push(vt(nh,null,a,C,l)),C;var _=gs(a,C,l);return _??C}function nh(a,t,e){return gs(a,t,e)==null}function gs(a,t,e){var r=Xc(a.model),n=a.getExtent(),i=r.lastAutoInterval,s=r.lastTickCount;if(i!=null&&s!=null&&Math.abs(i-t)<=1&&Math.abs(s-e)<=1&&i>t&&r.axisExtent0===n[0]&&r.axisExtent1===n[1])return i;r.lastTickCount=e,r.lastAutoInterval=t,r.axisExtent0=n[0],r.axisExtent1=n[1]}function ih(a){var t=a.getLabelModel();return{axisRotate:a.getRotate?a.getRotate():a.isHorizontal&&!a.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function ys(a,t,e){var r=ke(a),n=a.scale,i=n.getExtent(),s=a.getLabelModel(),o=[],l=Math.max((t||0)+1,1),u=i[0],c=n.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=hs(a),d=s.get("showMinLabel")||h,v=s.get("showMaxLabel")||h;d&&u!==i[0]&&p(i[0]);for(var f=u;f<=i[1];f+=l)p(f);v&&f-l!==i[1]&&p(i[1]);function p(g){var y={value:g};o.push(e?g:{formattedLabel:r(y),rawLabel:n.getLabel(y),tickValue:g,time:void 0,break:void 0})}return o}function _s(a,t,e){var r=a.scale,n=ke(a),i=[];return O(r.getTicks(),function(s){var o=r.getLabel(s),l=s.value;t(s.value,o)&&i.push(e?l:{formattedLabel:n(s),rawLabel:o,tickValue:l,time:void 0,break:void 0})}),i}var Ln=[0,1],sh=function(){function a(t,e,r){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=r||[0,0]}return a.prototype.contain=function(t){var e=this._extent,r=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=r&&t<=n},a.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},a.prototype.getExtent=function(){return this._extent.slice()},a.prototype.getPixelPrecision=function(t){return rl(t||this.scale.getExtent(),this._extent)},a.prototype.setExtent=function(t,e){var r=this._extent;r[0]=t,r[1]=e},a.prototype.dataToCoord=function(t,e){var r=this._extent,n=this.scale;return t=n.normalize(n.parse(t)),this.onBand&&n.type==="ordinal"&&(r=r.slice(),In(r,n.count())),Gr(t,Ln,r,e)},a.prototype.coordToData=function(t,e){var r=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(r=r.slice(),In(r,n.count()));var i=Gr(t,r,Ln,e);return this.scale.scale(i)},a.prototype.pointToData=function(t,e){},a.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),r=qc(this,e,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),n=r.ticks,i=nt(n,function(o){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(o):o),tickValue:o}},this),s=e.get("alignWithLabel");return oh(this,i,s,t.clamp),i},a.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 r=this.scale.getMinorTicks(e),n=nt(r,function(i){return nt(i,function(s){return{coord:this.dataToCoord(s),tickValue:s}},this)},this);return n},a.prototype.getViewLabels=function(t){return t=t||va(Mt.determine),Kc(this,t).labels},a.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},a.prototype.getTickModel=function(){return this.model.getModel("axisTick")},a.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),r=e[1]-e[0]+(this.onBand?1:0);r===0&&(r=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/r},a.prototype.calculateCategoryInterval=function(t){return t=t||va(Mt.determine),rh(this,t)},a}();function In(a,t){var e=a[1]-a[0],r=t,n=e/r/2;a[0]+=n,a[1]-=n}function oh(a,t,e,r){var n=t.length;if(!a.onBand||e||!n)return;var i=a.getExtent(),s,o;if(n===1)t[0].coord=i[0],t[0].onBand=!0,s=t[1]={coord:i[1],tickValue:t[0].tickValue,onBand:!0};else{var l=t[n-1].tickValue-t[0].tickValue,u=(t[n-1].coord-t[0].coord)/l;O(t,function(v){v.coord-=u/2,v.onBand=!0});var c=a.scale.getExtent();o=1+c[1]-t[n-1].tickValue,s={coord:t[n-1].coord+u*o,tickValue:c[1]+1,onBand:!0},t.push(s)}var h=i[0]>i[1];d(t[0].coord,i[0])&&(r?t[0].coord=i[0]:t.shift()),r&&d(i[0],t[0].coord)&&t.unshift({coord:i[0],onBand:!0}),d(i[1],s.coord)&&(r?s.coord=i[1]:t.pop()),r&&d(s.coord,i[1])&&t.pu
vendor: 4,223 bytes, line 1
1sh({coord:i[1],onBand:!0});function d(v,f){return v=gt(v),f=gt(f),h?v>f:v<f}}var lh=function(a){q(t,a);function t(e,r,n,i,s){var o=a.call(this,e,r,n)||this;return o.index=0,o.type=i||"value",o.position=s||"bottom",o}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var r=this.getExtent();return r[0]=this.toGlobalCoord(r[0]),r[1]=this.toGlobalCoord(r[1]),e&&r[0]>r[1]&&r.reverse(),r},t.prototype.pointToData=function(e,r){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),r)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(sh),uh="expandAxisBreak",Rt=Math.PI,ch=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],hh=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Me=Tt(),xs=Tt(),bs=function(){function a(t){this.recordMap={},this.resolveAxisNameOverlap=t}return a.prototype.ensureRecord=function(t){var e=t.axis.dim,r=t.componentIndex,n=this.recordMap,i=n[e]||(n[e]=[]);return i[r]||(i[r]={ready:{}})},a}();function dh(a,t,e,r){var n=e.axis,i=t.ensureRecord(e),s=[],o,l=Ar(a.axisName)&&ne(a.nameLocation);O(r,function(f){var p=Vt(f);if(!(!p||p.label.ignore)){s.push(p);var g=i.transGroup;l&&(g.transform?ki(de,g.transform):il(de),p.transform&&sl(de,de,p.transform),St.copy(He,p.localRect),He.applyTransform(de),o?o.union(He):St.copy(o=new St(0,0,0,0),He))}});var u=Math.abs(i.dirVec.x)>.1?"x":"y",c=i.transGroup[u];if(s.sort(function(f,p){return Math.abs(f.label[u]-c)-Math.abs(p.label[u]-c)}),l&&o){var h=n.getExtent(),d=Math.min(h[0],h[1]),v=Math.max(h[0],h[1])-d;o.union(new St(d,0,v,1))}i.stOccupiedRect=o,i.labelInfoList=s}var de=gr(),He=new St(0,0,0,0),ws=function(a,t,e,r,n,i){if(ne(a.nameLocation)){var s=i.stOccupiedRect;s&&Ss(uc({},s,i.transGroup.transform),r,n)}else Cs(i.labelInfoList,i.dirVec,r,n)};function Ss(a,t,e){var r=new _e;Cr(a,t,r,{direction:Math.atan2(e.y,e.x),bidirectional:!1,touchThreshold:.05})&&cc(t,r)}function Cs(a,t,e,r){for(var n=_e.dot(r,t)>=0,i=0,s=a.length;i<s;i++){var o=a[n?i:s-1-i];o.label.ignore||Ss(o,e,r)}}var Ht=function(){function a(t,e,r,n){this.group=new Ft,this._axisModel=t,this._api=e,this._local={},this._shared=n||new bs(ws),this._resetCfgDetermined(r)}return a.prototype.updateCfg=function(t){var e=this._cfg.raw;e.position=t.position,e.labelOffset=t.labelOffset,this._resetCfgDetermined(e)},a.prototype.__getRawCfg=function(){return this._cfg.raw},a.prototype._resetCfgDetermined=function(t){var e=this._axisModel,r=e.getDefaultOption?e.getDefaultOption():{},n=ut(t.axisName,e.get("name")),i=e.get("nameMoveOverlap");(i==null||i==="auto")&&(i=ut(t.defaultNameMoveOverlap,!0));var s={raw:t,position:t.position,rotation:t.rotation,nameDirection:ut(t.nameDirection,1),tickDirection:ut(t.tickDirection,1),labelDirection:ut(t.labelDirection,1),labelOffset:ut(t.labelOffset,0),silent:ut(t.silent,!0),axisName:n,nameLocation:nl(e.get("nameLocation"),r.nameLocation,"end"),shouldNameMoveOverlap:Ar(n)&&i,optionHideOverlap:e.get(["axisLabel","hideOverlap"]),showMinorTicks:e.get(["minorTick","show"])};this._cfg=s;var o=new Ft({x:s.position[0],y:s.position[1],rotation:s.rotation});o.updateTransform(),this._transformGroup=o;var l=this._shared.ensureRecord(e);l.transGroup=this._transformGroup,l.dirVec=new _e(Math.cos(-s.rotation),Math.sin(-s.rotation))},a.prototype.build=function(t,e){var r=this;return t||(t={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),O(vh,function(n){t[n]&&fh[n](r._cfg,r._local,r._shared,r._axisModel,r.group,r._transformGroup,r._api,e||{})}),this},a.innerTextLayout=function(t,e,r){var n=Di(e-t),i,s;return na(n)?(s=r>0?"top":"bottom",i="center"):na(n-Rt)?(s=r>0?"bottom":"top",i="center"):(s="middle",n>0&&n<Rt?i=r>0?"right":"left":i=r>0?"left":"right"),{rotation:n,textAlign:i,textVerticalAlign:s}},a.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},a.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},a}(),vh=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],fh={axisLine
1:function(a,t,e,r,n,i,s){var o=r.get(["axisLine","show"]);if(o==="auto"&&(o=!0,a.raw.axisLineAutoShow!=null&&(o=!!a.raw.axisLineAutoShow)),!!o){var l=r.axis.getExtent(),u=i.transform,c=[l[0],0],h=[l[1],0],d=c[0]>h[0];u&&(ee(c,c,u),ee(h,h,u));var v=at({lineCap:"round"},r.getModel(["axisLine","lineStyle"]).getLineStyle()),f={strokeContainThreshold:a.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(r.get(["axisLine","breakLine"])&&r.axis.scale.hasBreaks())Sc().buildAxisBreakLine(r,n,i,f);else{var p=new aa(at({shape:{x1:c[0],y1:c[1],x2:h[0],y2:h[1]}},f));ra(p.shape,p.style.lineWidth),p.anid="line",n.add(p)}var g=r.get(["axisLine","symbol"]);if(g!=null){var y=r.get(["axisLine","symbolSize"]);st(g)&&(g=[g,g]),(st(y)||ge(y))&&(y=[y,y]);var b=fi(r.get(["axisLine","symbolOffset"])||0,y),x=y[0],w=y[1];O([{rotate:a.rotation+Math.PI/2,offset:b[0],r:0},{rotate:a.rotation-Math.PI/2,offset:b[1],r:Math.sqrt((c[0]-h[0])*(c[0]-h[0])+(c[1]-h[1])*(c[1]-h[1]))}],function(S,C){if(g[C]!=="none"&&g[C]!=null){var _=di(g[C],-x/2,-w/2,x,w,v.stroke,!0),P=S.r+S.offset,k=d?h:c;_.attr({rotation:S.rotate,x:k[0]+P*Math.cos(a.rotation),y:k[1]-P*Math.sin(a.rotation),silent:!0,z2:11}),n.add(_)}})}}},axisTickLabelEstimate:function(a,t,e,r,n,i,s,o){var l=On(t,n,o);l&&Pn(a,t,e,r,n,i,s,Mt.estimate)},axisTickLabelDetermine:function(a,t,e,r,n,i,s,o){var l=On(t,n,o);l&&Pn(a,t,e,r,n,i,s,Mt.determine);var u=yh(a,n,i,r);gh(a,t.labelLayoutList,u),_h(a,n,i,r,a.tickDirection)},axisName:function(a,t,e,r,n,i,s,o){var l=e.ensureRecord(r);t.nameEl&&(n.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var u=a.axisName;if(Ar(u)){var c=a.nameLocation,h=a.nameDirection,d=r.getModel("nameTextStyle"),v=r.get("nameGap")||0,f=r.axis.getExtent(),p=r.axis.inverse?-1:1,g=new _e(0,0),y=new _e(0,0);c==="start"?(g.x=f[0]-p*v,y.x=-p):c==="end"?(g.x=f[1]+p*v,y.x=p):(g.x=(f[0]+f[1])/2,g.y=a.labelOffset+h*v,y.y=h);var b=gr();y.transform(Li(b,b,a.rotation));var x=r.get("nameRotate");x!=null&&(x=x*Rt/180);var w,S;ne(c)?w=Ht.innerTextLayout(a.rotation,x??a.rotation,h):(w=ph(a.rotation,c,x||0,f),S=a.raw.axisNameAvailableWidth,S!=null&&(S=Math.abs(S/Math.sin(w.rotation)),!isFinite(S)&&(S=null)));var C=d.getFont(),_=r.get("nameTruncate",!0)||{},P=_.ellipsis,k=ea(a.raw.nameTruncateMaxWidth,_.maxWidth,S),A=o.nameMarginLevel||0,L=new ga({x:g.x,y:g.y,rotation:w.rotation,silent:Ht.isLabelSilent(r),style:yr(d,{text:u,font:C,overflow:"truncate",width:k,ellipsis:P,fill:d.getTextColor()||r.get(["axisLine","lineStyle","color"]),align:d.get("align")||w.textAlign,verticalAlign:d.get("verticalAlign")||w.textVerticalAlign}),z2:1});if(Ii({el:L,componentModel:r,itemName:u}),L.__fullText=u,L.anid="name",r.get("triggerEvent")){var R=Ht.makeAxisEventDataBase(r);R.targetType="axisName",R.name=u,mt(L).eventData=R}i.add(L),L.updateTransform(),t.nameEl=L;var I=l.nameLayout=Vt({label:L,priority:L.z2,defaultAttr:{ignore:L.ignore},marginDefault:ne(c)?ch[A]:hh[A]});if(l.nameLocation=c,n.add(L),L.decomposeTransform(),a.shouldNameMoveOverlap&&I){var N=e.ensureRecord(r);e.resolveAxisNameOverlap(a,e,r,I,y,N)}}}};function Pn(a,t,e,r,n,i,s,o){Ts(t)||xh(a,t,n,o,r,s);var l=t.labelLayoutList;bh(a,r,l,i),a.rotation;var u=a.optionHideOverlap;mh(r,l,u),u&&hc(qt(l,function(c){return c&&!c.label.ignore})),dh(a,e,r,l)}function ph(a,t,e,r){var n=Di(e-a),i,s,o=r[0]>r[1],l=t==="start"&&!o||t!=="start"&&o;return na(n-Rt/2)?(s=l?"bottom":"top",i="center"):na(n-Rt*1.5)?(s=l?"top":"bottom",i="center"):(s="middle",n<Rt*1.5&&n>Rt/2?i=l?"left":"right":i=l?"right":"left"),{rotation:n,textAlign:i,textVerticalAlign:s}}function mh(a,t,e){if(hs(a.axis))return;function r(o,l,u){var c=Vt(t[l]),h=Vt(t[u]);if(!(!c||!h)){if(o===!1||c.suggestIgnore){fe(c.label);return}if(h.suggestIgnore){fe(h.label);return}var d=.1;if(!e){var v=[0,0,0,0];c=_n({marginForce:v},c),h=_n({marginForce:v},h)}Cr(c,h,null,{touchThreshold:d})&&fe(o?h.label:c.label)}}var n=a.get(["axisLabel","showMinLabel"]),i=a.get(["axisLabel","showMaxLabel"]),s=t.length;r(n,0,1),r(i,s-1,s-2)}function gh(a,t,e){a.showMinorTicks||O(t,function(r){if(r&&r.label.ignore)for(var n=0;n<e.length;n++){var i=e[n],s=xs(i),o=Me(r.label);if(s.tickValue!=null&&!s.onBand&&s.tickValue===o.tickValue){fe(i);return}}})}function fe(a){a&&(a.ignore=!0)}function Ms(a,t,e,r,n){for(var i=[],s=[],o=[],l=0;l<a.length;l++){var u=a[l].coord;
1s[0]=u,s[1]=0,o[0]=u,o[1]=e,t&&(ee(s,s,t),ee(o,o,t));var c=new aa({shape:{x1:s[0],y1:s[1],x2:o[0],y2:o[1]},style:r,z2:2,autoBatch:!0,silent:!0});ra(c.shape,c.style.lineWidth),c.anid=n+"_"+a[l].tickValue,i.push(c);var h=xs(c);h.onBand=!!a[l].onBand,h.tickValue=a[l].tickValue}return i}function yh(a,t,e,r){var n=r.axis,i=r.getModel("axisTick"),s=i.get("show");if(s==="auto"&&(s=!0,a.raw.axisTickAutoShow!=null&&(s=!!a.raw.axisTickAutoShow)),!s||n.scale.isBlank())return[];for(var o=i.getModel("lineStyle"),l=a.tickDirection*i.get("length"),u=n.getTicksCoords(),c=Ms(u,e.transform,l,kt(o.getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<c.length;h++)t.add(c[h]);return c}function _h(a,t,e,r,n){var i=r.axis,s=r.getModel("minorTick");if(!(!a.showMinorTicks||i.scale.isBlank())){var o=i.getMinorTicksCoords();if(o.length)for(var l=s.getModel("lineStyle"),u=n*s.get("length"),c=kt(l.getLineStyle(),kt(r.getModel("axisTick").getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])})),h=0;h<o.length;h++)for(var d=Ms(o[h],e.transform,u,c,"minorticks_"+h),v=0;v<d.length;v++)t.add(d[v])}}function On(a,t,e){if(Ts(a)){var r=a.axisLabelsCreationContext,n=r.out.noPxChangeTryDetermine;if(e.noPxChange){for(var i=!0,s=0;s<n.length;s++)i=i&&n[s]();if(i)return!1}n.length&&(t.remove(a.labelGroup),or(a,null,null,null))}return!0}function xh(a,t,e,r,n,i){var s=n.axis,o=ea(a.raw.axisLabelShow,n.get(["axisLabel","show"])),l=new Ft;e.add(l);var u=va(r);if(!o||s.scale.isBlank()){or(t,[],l,u);return}var c=n.getModel("axisLabel"),h=s.getViewLabels(u),d=(ea(a.raw.labelRotate,c.get("rotate"))||0)*Rt/180,v=Ht.innerTextLayout(a.rotation,d,a.labelDirection),f=n.getCategories&&n.getCategories(!0),p=[],g=n.get("triggerEvent"),y=1/0,b=-1/0;O(h,function(w,S){var C,_=s.scale.type==="ordinal"?s.scale.getRawOrdinalNumber(w.tickValue):w.tickValue,P=w.formattedLabel,k=w.rawLabel,A=c;if(f&&f[_]){var L=f[_];pt(L)&&L.textStyle&&(A=new Xt(L.textStyle,c,n.ecModel))}var R=A.getTextColor()||n.get(["axisLine","lineStyle","color"]),I=A.getShallow("align",!0)||v.textAlign,N=ut(A.getShallow("alignMinLabel",!0),I),z=ut(A.getShallow("alignMaxLabel",!0),I),Z=A.getShallow("verticalAlign",!0)||A.getShallow("baseline",!0)||v.textVerticalAlign,tt=ut(A.getShallow("verticalAlignMinLabel",!0),Z),V=ut(A.getShallow("verticalAlignMaxLabel",!0),Z),K=10+(((C=w.time)===null||C===void 0?void 0:C.level)||0);y=Math.min(y,K),b=Math.max(b,K);var Y=new ga({x:0,y:0,rotation:0,silent:Ht.isLabelSilent(n),z2:K,style:yr(A,{text:P,align:S===0?N:S===h.length-1?z:I,verticalAlign:S===0?tt:S===h.length-1?V:Z,fill:J(R)?R(s.type==="category"?k:s.type==="value"?_+"":_,S):R})});Y.anid="label_"+_;var W=Me(Y);if(W.break=w.break,W.tickValue=_,W.layoutRotation=v.rotation,Ii({el:Y,componentModel:n,itemName:P,formatterParamsExtra:{isTruncated:function(){return Y.isTruncated},value:k,tickIndex:S}}),g){var U=Ht.makeAxisEventDataBase(n);U.targetType="axisLabel",U.value=k,U.tickIndex=S,w.break&&(U.break={start:w.break.parsedBreak.vmin,end:w.break.parsedBreak.vmax}),s.type==="category"&&(U.dataIndex=_),mt(Y).eventData=U,w.break&&Sh(n,i,Y,w.break)}p.push(Y),l.add(Y)});var x=nt(p,function(w){return{label:w,priority:Me(w).break?w.z2+(b-y+1):w.z2,defaultAttr:{ignore:w.ignore}}});or(t,x,l,u)}function Ts(a){return!!a.labelLayoutList}function or(a,t,e,r){a.labelLayoutList=t,a.labelGroup=e,a.axisLabelsCreationContext=r}function bh(a,t,e,r){var n=t.get(["axisLabel","margin"]);O(e,function(i,s){var o=Vt(i);if(o){var l=o.label,u=Me(l);o.suggestIgnore=l.ignore,l.ignore=!1,Wr(At,wh),At.x=t.axis.dataToCoord(u.tickValue),At.y=a.labelOffset+a.labelDirection*n,At.rotation=u.layoutRotation,r.add(At),At.updateTransform(),r.remove(At),At.decomposeTransform(),Wr(l,At),l.markRedraw(),ca(o,!0),Vt(o)}})}var At=new Gt,wh=new Gt;function Ar(a){return!!a}function Sh(a,t,e,r){e.on("click",function(n){var i={type:uh,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[a.axis.dim+"AxisIndex"]=a.componentIndex,t.dispatchAction(i)})}function fa(a,t,e){e=e||{};var r=t.axis,n={},i=r.getAxesOnZeroOf()[0],s=r.position,o=i?"onZero":s,l=r.dim,u=[a.x,a.x+a.width,a.y,a.y+a.height],c={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,d=l==="x"?[u[2]-h,u[3]+h]:[u[0]-h,u[1]+h];if(i){var v=i.toGlobalCoord(i.dataToCoord(0));d[c.onZero]=Math.max(Math.min(v,d[1]),d[0])}n.position=[l==="y"?d[c[o]]:u[0],l==="x"?d[c[o]]:u[3]],n.rotation=Math.PI/2*(l==="x"?0:1);var f={top:-1,bottom:1,left:-1,right:1};n.labelDirection=n.tickDirection=n.nameDirection=f[s],n.labelOffset=i?d[c[s]]-d[c.onZero]:0,t.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),ea(e.labelInside,t.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var p=t.get(["axisLabel","rotate"]);return n.labelRotate=o==="top"?-p:p,n.z2=1,n}function Ch(a){return a.coordinateSystem&&a.coordinateSystem.type==="cartesian2d"}function En(a){var t={xAxisModel:null,yAxisModel:null};return O(t,function(e,r){var n=r.replace(/Model$/,""),i=a.getReferringComponents(n,Dt).models[0];t[r]=i}),t}function Mh(a,t,e,r,n,i){for(var s=fa(a,e),o=!1,l=!1,u=0;u<t.length;u++)ar(t[u].getOtherAxis(e.axis).scale)&&(o=l=!0,e.axis.type==="category"&&e.axis.onBand&&(l=!1));return s.axisLineAutoShow=o,s.axisTickAutoShow=l,s.defaultNameMoveOverlap=i,new Ht(e,r,s,n)}function Th(a,t,e){var r=fa(t,e);a.updateCfg(r)}function kh(a,t,e){var r=re.prototype,n=r.getTicks.call(e),i=r.getTicks.call(e,{expandToNicedExtent:!0}),s=n.length-1,o=r.getInterval.call(e),l=cs(a,t),u=l.extent,c=l.fixMin,h=l.fixMax;a.type==="log"&&(u=rr(a.base,u,!0)),a.setBreaksFromOption(ds(t)),a.setExtent(u[0],u[1]),a.calcNiceExtent({splitNumber:s,fixMin:c,fixMax:h});var d=r.getExtent.call(a);c&&(u[0]=d[0]),h&&(u[1]=d[1]);var v=r.getInterval.call(a),f=u[0],p=u[1];if(c&&h)v=(p-f)/s;else if(c)for(p=u[0]+v*s;p<u[1]&&isFinite(p)&&isFinite(u[1]);)v=Ia(v),p=u[0]+v*s;else if(h)for(f=u[1]-v*s;f>u[0]&&isFinite(f)&&isFinite(u[0]);)v=Ia(v),f=u[1]-v*s;else{var g=a.getTicks().length-1;g>s&&(v=Ia(v));var y=v*s;p=Math.ceil(u[1]/v)*v,f=gt(p-y),f<0&&u[0]>=0?(f=0,p=gt(y)):p>0&&u[1]<=0&&(p=0,f=-gt(y))}var b=(n[0].value-i[0].value)/o,x=(n[s].value-i[s].value)/o;r.setExtent.call(a,f+v*b,p+v*x),r.setInterval.call(a,v),(b||x)&&r.setNiceExtent.call(a,f+v,p-v)}var Bn=[[3,1],[0,2]],Ah=function(){function a(t,e,r){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ir,this._initCartesian(t,e,r),this.model=t}return a.prototype.getRect=function(){return this._rect},a.prototype.update=function(t,e){var r=this._axesMap;this._updateScale(t,this.model);function n(s){var o,l=pa(s),u=l.length;if(u){for(var c=[],h=u-1;h>=0;h--){var d=+l[h],v=s[d],f=v.model,p=v.scale;ar(p)&&f.get("alignTicks")&&f.get("interval")==null?c.push(v):(An(p,f),ar(p)&&(o=v))}c.length&&(o||(o=c.pop(),An(o.scale,o.model)),O(c,function(g){kh(g.scale,g.model,o.scale)}))}}n(r.x),n(r.y);var i={};O(r.x,function(s){Nn(r,"y",s,i)}),O(r.y,function(s){Nn(r,"x",s,i)}),this.resize(this.model,e)},a.prototype.resize=function(t,e,r){var n=ol(t,e),i=this._rect=_r(t.getBoxLayoutParams(),n.refContainer),s=this._axesMap,o=this._coordsList,l=t.get("containLabel");if(ks(s,i),!r){var u=Lh(i,o,s,l,e),c=void 0;if(l)c=Hn(i.clone(),"axisLabel",null,i,s,u,n);else{var h=Ih(t,i,n),d=h.outerBoundsRect,v=h.parsedOuterBoundsContain,f=h.outerBoundsClamp;d&&(c=Hn(d,v,f,i,s,u,n))}As(i,s,Mt.determine,null,c,n)}O(this._coordsList,function(p){p.calcAffineTransform()})},a.prototype.getAxis=function(t,e){var r=this._axesMap[t];if(r!=null)return r[e||0]},a.prototype.getAxes=function(){return this._axesList.slice()},a.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var r="x"+t+"y"+e;return this._coordsMap[r]}pt(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,i=this._coordsList;n<i.length;n++)if(i[n].getAxis("x").index===t||i[n].getAxis("y").index===e)return i[n]},a.prototype.getCartesians=function(){return this._coordsList.slice()},a.prototype.convertToPixel=function(t,e,r){var n=this._findConvertTarget(e);return n.cartesian?n.cartesian.dataToPoint(r):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(r)):null},a.prototype.convertFromPixel=function(t,e,r){var n=this._findConvertTarget(e);return n.cartesian?n.cartesian.pointToData(r):n.axis?n.axis.coordToData(n.axis.toLocalCoord(r)):null},a.prototype._findConvertTarget=function(t){var e=t.seriesModel,r=t.xAxisModel||e&&e.getReferringComponents("xAxis",Dt).models[0],n=t.yAxisModel||e&&e.getReferringComponents("yAxis",Dt).models[0],i=t.gridModel,s=this._coordsList,o,l;if(e)o=e.coordinateSystem,xt(s,o)<0&&(o=null);else if(r&&n)o=this.getCartesian(r.componentIndex,n.componentIndex);else if(r)l=this.getAxis("x",r.componentIndex);else if(n)l=this.getAxis("y",n.componentIndex);else if(i){var u=i.coordinateSystem;u===this&&(o=this._coordsList[0])}return{cartesian:o,axis:l}},a.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},a.prototype._initCartesian=function(t,e,r){var n=this,i=this,s={left:!1,right:!1,top:!1,bottom:!1},o={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=o,O(o.x,function(c,h){O(o.y,function(d,v){var f="x"+h+"y"+v,p=new Zc(f);p.master=n,p.model=t,n._coordsMap[f]=p,n._coordsList.push(p),p.addAxis(c),p.addAxis(d)})});function u(c){return function(h,d){if(Oa(h,t)){var v=h.get("position");c==="x"?v!=="top"&&v!=="bottom"&&(v=s.bottom?"top":"bottom"):v!=="left"&&v!=="right"&&(v=s.left?"right":"left"),s[v]=!0;var f=new lh(c,Gc(h),[0,0],h.get("type"),v),p=f.type==="category";f.onBand=p&&h.get("boundaryGap"),f.inverse=h.get("inverse"),h.axis=f,f.model=h,f.grid=i,f.index=d,i._axesList.push(f),o[c][d]=f,l[c]++}}}},a.prototype._updateScale=function(t,e){O(this._axesList,function(n){if(n.scale.setExtent(1/0,-1/0),n.type==="category"){var i=n.model.get("categorySortInfo");n.scale.setSortInfo(i)}}),t.eachSeries(function(n){if(Ch(n)){var i=En(n),s=i.xAxisModel,o=i.yAxisModel;if(!Oa(s,e)||!Oa(o,e))return;var l=this.getCartesian(s.componentIndex,o.componentIndex),u=n.getData(),c=l.getAxis("x"),h=l.getAxis("y");r(u,c),r(u,h)}},this);function r(n,i){O(Uc(n,i.dim),function(s){i.scale.unionExtentFromData(n,s)})}},a.prototype.getTooltipAxes=function(t){var e=[],r=[];return O(this.getCartesians(),function(n){var i=t!=null&&t!=="auto"?n.getAxis(t):n.getBaseAxis(),s=n.getOtherAxis(i);xt(e,i)<0&&e.push(i),xt(r,s)<0&&r.push(s)}),{baseAxes:e,otherAxes:r}},a.create=function(t,e){var r=[];return t.eachComponent("grid",function(n,i){var s=new a(n,t,e);s.name="grid_"+i,s.resize(n,e,!0),n.coordinateSystem=s,r.push(s)}),t.eachSeries(function(n){ll({targetModel:n,coordSysType:"cartesian2d",coordSysProvider:i});function i(){var s=En(n),o=s.xAxisModel,l=s.yAxisModel,u=o.getCoordSysModel(),c=u.coordinateSystem;return c.getCartesian(o.componentIndex,l.componentIndex)}}),r},a.dimensions=ir,a}();function Oa(a,t){return a.getCoordSysModel()===t}function Nn(a,t,e,r){e.getAxesOnZeroOf=function(){return i?[i]:[]};var n=a[t],i,s=e.model,o=s.get(["axisLine","onZero"]),l=s.get(["axisLine","onZeroAxisIndex"]);if(!o)return;if(l!=null)Rn(n[l])&&(i=n[l]);else for(var u in n)if(n.hasOwnProperty(u)&&Rn(n[u])&&!r[c(n[u])]){i=n[u];break}i&&(r[c(i)]=!0);function c(h){return h.dim+"_"+h.index}}function Rn(a){return a&&a.type!=="category"&&a.type!=="time"&&Wc(a)}function Dh(a,t){var e=a.getExtent(),r=e[0]+e[1];a.toGlobalCoord=a.dim==="x"?function(n){return n+t}:function(n){return r-n+t},a.toLocalCoord=a.dim==="x"?function(n){return n-t}:function(n){return r-n+t}}function ks(a,t){O(a.x,function(e){return $n(e,t.x,t.width)}),O(a.y,function(e){return $n(e,t.y,t.height)})}function $n(a,t,e){var r=[0,e],n=a.inverse?1:0;a.setExtent(r[n],r[1-n]),Dh(a,t)}function Hn(a,t,e,r,n,i,s){As(r,n,Mt.estimate,t,!1,s);var o=[0,0,0,0];u(0),u(1),c(r,0,NaN),c(r,1,NaN);var l=ul(o,function(d){return d>0})==null;return Ya(r,o,!0,!0,e),ks(n,r),l;function u(d){O(n[Jt[d]],function(v){if(Ce(v.model)){var f=i.ensureRecord(v.model),p=f.labelInfoList;if(p)for(var g=0;g<p.length;g++){var y=p[g],b=v.scale.normalize(Me(y.label).tickValue);b=d===1?1-b:b,c(y.rect,d,b),c(y.rect,1-d,NaN)}var x=f.nameLayout;if(x){var b=ne(f.nameLocation)?.5:NaN;c(x.rect,d,b),c(x.rect,1-d,NaN)}}})}function c(d,v,f){var p=a[Jt[v]]-d[Jt[v]],g=d[ia[v]]+d[Jt[v]]-(a[ia[v]]+a[Jt[v]]);p=h(p,1-f),g=h(g,f);var y=Bn[v][0],b=Bn[v][1];o[y]=Ur(o[y],p),o[b]=Ur(o[b],g)}function h(d,v){return d>0&&!ta(v)&&v>1e-4&&(d/=v),d}}function Lh(a,t,e,r,n){var i=new bs(Ph);
1return O(e,function(s){return O(s,function(o){if(Ce(o.model)){var l=!r;o.axisBuilder=Mh(a,t,o.model,n,i,l)}})}),i}function As(a,t,e,r,n,i){var s=e===Mt.determine;O(t,function(u){return O(u,function(c){Ce(c.model)&&(Th(c.axisBuilder,a,c.model),c.axisBuilder.build(s?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:n}))})});var o={x:0,y:0};l(0),l(1);function l(u){o[Jt[1-u]]=a[ia[u]]<=i.refContainer[ia[u]]*.5?0:1-u===1?2:1}O(t,function(u,c){return O(u,function(h){Ce(h.model)&&((r==="all"||s)&&h.axisBuilder.build({axisName:!0},{nameMarginLevel:o[c]}),s&&h.axisBuilder.build({axisLine:!0}))})})}function Ih(a,t,e){var r,n=a.get("outerBoundsMode",!0);n==="same"?r=t.clone():(n==null||n==="auto")&&(r=_r(a.get("outerBounds",!0)||is,e.refContainer));var i=a.get("outerBoundsContain",!0),s;i==null||i==="auto"||xt(["all","axisLabel"],i)<0?s="all":s=i;var o=[Yr(ut(a.get("outerBoundsClampWidth",!0),ha[0]),t.width),Yr(ut(a.get("outerBoundsClampHeight",!0),ha[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:s,outerBoundsClamp:o}}var Ph=function(a,t,e,r,n,i){var s=e.axis.dim==="x"?"y":"x";ws(a,t,e,r,n,i),ne(a.nameLocation)||O(t.recordMap[s],function(o){o&&o.labelInfoList&&o.dirVec&&Cs(o.labelInfoList,o.dirVec,r,n)})};function Oh(a,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return Eh(e,a,t),e.seriesInvolved&&Nh(e,a),e}function Eh(a,t,e){var r=t.getComponent("tooltip"),n=t.getComponent("axisPointer"),i=n.get("link",!0)||[],s=[];O(e.getCoordinateSystems(),function(o){if(!o.axisPointerEnabled)return;var l=Te(o.model),u=a.coordSysAxesInfo[l]={};a.coordSysMap[l]=o;var c=o.model,h=c.getModel("tooltip",r);if(O(o.getAxes(),ht(p,!1,null)),o.getTooltipAxes&&r&&h.get("show")){var d=h.get("trigger")==="axis",v=h.get(["axisPointer","type"])==="cross",f=o.getTooltipAxes(h.get(["axisPointer","axis"]));(d||v)&&O(f.baseAxes,ht(p,v?"cross":!0,d)),v&&O(f.otherAxes,ht(p,"cross",!1))}function p(g,y,b){var x=b.model.getModel("axisPointer",n),w=x.get("show");if(!(!w||w==="auto"&&!g&&!lr(x))){y==null&&(y=x.get("triggerTooltip")),x=g?Bh(b,h,n,t,g,y):x;var S=x.get("snap"),C=x.get("triggerEmphasis"),_=Te(b.model),P=y||S||b.type==="category",k=a.axesInfo[_]={key:_,axis:b,coordSys:o,axisPointerModel:x,triggerTooltip:y,triggerEmphasis:C,involveSeries:P,snap:S,useHandle:lr(x),seriesModels:[],linkGroup:null};u[_]=k,a.seriesInvolved=a.seriesInvolved||P;var A=Rh(i,b);if(A!=null){var L=s[A]||(s[A]={axesInfo:{}});L.axesInfo[_]=k,L.mapper=i[A].mapper,k.linkGroup=L}}}})}function Bh(a,t,e,r,n,i){var s=t.getModel("axisPointer"),o=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};O(o,function(d){l[d]=te(s.get(d))}),l.snap=a.type!=="category"&&!!i,s.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),n==="cross"){var c=s.get(["label","show"]);if(u.show=c??!0,!i){var h=l.lineStyle=s.get("crossStyle");h&&kt(u,h.textStyle)}}return a.model.getModel("axisPointer",new Xt(l,e,r))}function Nh(a,t){t.eachSeries(function(e){var r=e.coordinateSystem,n=e.get(["tooltip","trigger"],!0),i=e.get(["tooltip","show"],!0);!r||!r.model||n==="none"||n===!1||n==="item"||i===!1||e.get(["axisPointer","show"],!0)===!1||O(a.coordSysAxesInfo[Te(r.model)],function(s){var o=s.axis;r.getAxis(o.dim)===o&&(s.seriesModels.push(e),s.seriesDataCount==null&&(s.seriesDataCount=0),s.seriesDataCount+=e.getData().count())})})}function Rh(a,t){for(var e=t.model,r=t.dim,n=0;n<a.length;n++){var i=a[n]||{};if(Ea(i[r+"AxisId"],e.id)||Ea(i[r+"AxisIndex"],e.componentIndex)||Ea(i[r+"AxisName"],e.name))return n}}function Ea(a,t){return a==="all"||Q(a)&&xt(a,t)>=0||a===t}function $h(a){var t=Dr(a);if(t){var e=t.axisPointerModel,r=t.axis.scale,n=e.option,i=e.get("status"),s=e.get("value");s!=null&&(s=r.parse(s));var o=lr(e);i==null&&(n.status=o?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(s==null||s>l[1])&&(s=l[1]),s<l[0]&&(s=l[0]),n.value=s,o&&(n.status=t.axis.scale.isBlank()?"hide":"show")}}function Dr(a){var t=(a.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[Te(a)]}function Hh(a){var t=Dr(a);return t&&t.axisPointerModel}function lr(a){return!!a.get(["handle","show"])}function Te(a){return a.type+"||"+a.id}var zn={},Ds=function(a){q(t,a);function t(){var e=a!==null&&a.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,r,n,i){this.axisPointerClass&&$h(e),a.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,n,!0)},t.prototype.updateAxisPointer=function(e,r,n,i){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,r){var n=this._axisPointer;n&&n.remove(r)},t.prototype.dispose=function(e,r){this._disposeAxisPointer(r),a.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,r,n){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var s=Hh(e);s?(this._axisPointer||(this._axisPointer=new i)).render(e,s,r,n):this._disposeAxisPointer(r)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,r){zn[e]=r},t.getAxisPointerClass=function(e){return e&&zn[e]},t.type="axis",t}(Kt),ur=Tt();function zh(a,t,e,r){var n=e.axis;
1if(!n.scale.isBlank()){var i=e.getModel("splitArea"),s=i.getModel("areaStyle"),o=s.get("color"),l=r.coordinateSystem.getRect(),u=n.getTicksCoords({tickModel:i,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=o.length,h=ur(a).splitAreaColors,d=Ct(),v=0;if(h)for(var f=0;f<u.length;f++){var p=h.get(u[f].tickValue);if(p!=null){v=(p+(c-1)*f)%c;break}}var g=n.toGlobalCoord(u[0].coord),y=s.getAreaStyle();o=Q(o)?o:[o];for(var f=1;f<u.length;f++){var b=n.toGlobalCoord(u[f].coord),x=void 0,w=void 0,S=void 0,C=void 0;n.isHorizontal()?(x=g,w=l.y,S=b-x,C=l.height,g=x+S):(x=l.x,w=g,S=l.width,C=b-w,g=w+C);var _=u[f-1].tickValue;_!=null&&d.set(_,v),t.add(new Gt({anid:_!=null?"area_"+_:null,shape:{x,y:w,width:S,height:C},style:kt({fill:o[v]},y),autoBatch:!0,silent:!0})),v=(v+1)%c}ur(a).splitAreaColors=d}}}function Fh(a){ur(a).splitAreaColors=null}var Vh=["splitArea","splitLine","minorSplitLine","breakArea"],Ls=function(a){q(t,a);function t(){var e=a!==null&&a.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="CartesianAxisPointer",e}return t.prototype.render=function(e,r,n,i){this.group.removeAll();var s=this._axisGroup;if(this._axisGroup=new Ft,this.group.add(this._axisGroup),!!Ce(e)){this._axisGroup.add(e.axis.axisBuilder.group),O(Vh,function(l){e.get([l,"show"])&&Gh[l](this,this._axisGroup,e,e.getCoordSysModel(),n)},this);var o=i&&i.type==="changeAxisOrder"&&i.isInitSort;o||cl(s,this._axisGroup,e),a.prototype.render.call(this,e,r,n,i)}},t.prototype.remove=function(){Fh(this)},t.type="cartesianAxis",t}(Ds),Gh={splitLine:function(a,t,e,r,n){var i=e.axis;if(!i.scale.isBlank()){var s=e.getModel("splitLine"),o=s.getModel("lineStyle"),l=o.get("color"),u=s.get("showMinLine")!==!1,c=s.get("showMaxLine")!==!1;l=Q(l)?l:[l];for(var h=r.coordinateSystem.getRect(),d=i.isHorizontal(),v=0,f=i.getTicksCoords({tickModel:s,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),p=[],g=[],y=o.getLineStyle(),b=0;b<f.length;b++){var x=i.toGlobalCoord(f[b].coord);if(!(b===0&&!u||b===f.length-1&&!c)){var w=f[b].tickValue;d?(p[0]=x,p[1]=h.y,g[0]=x,g[1]=h.y+h.height):(p[0]=h.x,p[1]=x,g[0]=h.x+h.width,g[1]=x);var S=v++%l.length,C=new aa({anid:w!=null?"line_"+w:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:g[0],y2:g[1]},style:kt({stroke:l[S]},y),silent:!0});ra(C.shape,y.lineWidth),t.add(C)}}}},minorSplitLine:function(a,t,e,r,n){var i=e.axis,s=e.getModel("minorSplitLine"),o=s.getModel("lineStyle"),l=r.coordinateSystem.getRect(),u=i.isHorizontal(),c=i.getMinorTicksCoords();if(c.length)for(var h=[],d=[],v=o.getLineStyle(),f=0;f<c.length;f++)for(var p=0;p<c[f].length;p++){var g=i.toGlobalCoord(c[f][p].coord);u?(h[0]=g,h[1]=l.y,d[0]=g,d[1]=l.y+l.height):(h[0]=l.x,h[1]=g,d[0]=l.x+l.width,d[1]=g);var y=new aa({anid:"minor_line_"+c[f][p].tickValue,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:d[0],y2:d[1]},style:v,silent:!0});ra(y.shape,v.lineWidth),t.add(y)}},splitArea:function(a,t,e,r,n){zh(a,t,e,r)},breakArea:function(a,t,e,r,n){e.axis.scale}},Is=function(a){q(t,a);function t(){var e=a!==null&&a.apply(this,arguments)||this;return e.type=t.type,e}return t.type="xAxis",t}(Ls),Wh=function(a){q(t,a);function t(){var e=a!==null&&a.apply(this,arguments)||this;return e.type=Is.type,e}return t.type="yAxis",t}(Ls),Uh=function(a){q(t,a);function t(){var e=a!==null&&a.apply(this,arguments)||this;return e.type="grid",e}return t.prototype.render=function(e,r){this.group.removeAll(),e.get("show")&&this.group.add(new Gt({shape:e.coordinateSystem.getRect(),style:kt({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(Kt),Fn={offset:0};function Yh(a){a.registerComponentView(Uh),a.registerComponentModel(vc),a.registerCoordinateSystem("cartesian2d",Ah),wn(a,"x",tr,Fn),wn(a,"y",tr,Fn),a.registerComponentView(Is),a.registerComponentView(Wh),a.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}var Zt=Tt(),Vn=te,Ba=vt,Zh=function(){function a(){this._dragging=!1,this.animationThreshold=15}return a.prototype.render=function(t,e,r,n){var i=e.get("value"),s=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=r,!(!n&&this._lastValue===i&&this._lastStatus===s)){this._lastValue=i,this._lastStatus=s;var o=this._group,l=this._handle;if(!s||s==="hide"){o&&o.hide(),l&&l.hide();return}o&&o.show(),l&&l.show();var u={};this.makeElOption(u,i,t,e,r);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(r),this._lastGraphicKey=c;var h=this._moveAnimation=this.determineAnimation(t,e);if(!o)o=this._group=new Ft,this.createPointerEl(o,u,t,e),this.createLabelEl(o,u,t,e),r.getZr().add(o);else{var d=ht(Gn,e,h);this.updatePointerEl(o,u,d),this.updateLabelEl(o,u,d,e)}Un(o,e,!0),this._renderHandle(i)}},a.prototype.remove=function(t){this.clear(t)},a.prototype.dispose=function(t){this.clear(t)},a.prototype.determineAnimation=function(t,e){var r=e.get("animation"),n=t.axis,i=n.type==="category",s=e.get("snap");if(!s&&!i)return!1;if(r==="auto"||r==null){var o=this.animationThreshold;if(i&&n.getBandWidth()>o)return!0;
1if(s){var l=Dr(t).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>o}return!1}return r===!0},a.prototype.makeElOption=function(t,e,r,n,i){},a.prototype.createPointerEl=function(t,e,r,n){var i=e.pointer;if(i){var s=Zt(t).pointerEl=new hl[i.type](Vn(e.pointer));t.add(s)}},a.prototype.createLabelEl=function(t,e,r,n){if(e.label){var i=Zt(t).labelEl=new ga(Vn(e.label));t.add(i),Wn(i,n)}},a.prototype.updatePointerEl=function(t,e,r){var n=Zt(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),r(n,{shape:e.pointer.shape}))},a.prototype.updateLabelEl=function(t,e,r,n){var i=Zt(t).labelEl;i&&(i.setStyle(e.label.style),r(i,{x:e.label.x,y:e.label.y}),Wn(i,n))},a.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,r=this._api.getZr(),n=this._handle,i=e.getModel("handle"),s=e.get("status");if(!i.get("show")||!s||s==="hide"){n&&r.remove(n),this._handle=null;return}var o;this._handle||(o=!0,n=this._handle=dl(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){vl(u.event)},onmousedown:Ba(this._onHandleDragMove,this,0,0),drift:Ba(this._onHandleDragMove,this),ondragend:Ba(this._onHandleDragEnd,this)}),r.add(n)),Un(n,e,!1),n.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");Q(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,Pi(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,o)}},a.prototype._moveHandleToValue=function(t,e){Gn(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Na(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},a.prototype._onHandleDragMove=function(t,e){var r=this._handle;if(r){this._dragging=!0;var n=this.updateHandleTransform(Na(r),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,r.stopAnimation(),r.attr(Na(n)),Zt(r).lastProp=null,this._doDispatchAxisPointer()}},a.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,r=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:r.axis.dim,axisIndex:r.componentIndex}]})}},a.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"})}},a.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),r=this._group,n=this._handle;e&&r&&(this._lastGraphicKey=null,r&&e.remove(r),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),ja(this,"_doDispatchAxisPointer")},a.prototype.doClear=function(){},a.prototype.buildLabel=function(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}},a}();function Gn(a,t,e,r){Ps(Zt(e).lastProp,r)||(Zt(e).lastProp=r,t?zt(e,r,a):(e.stopAnimation(),e.attr(r)))}function Ps(a,t){if(pt(a)&&pt(t)){var e=!0;return O(t,function(r,n){e=e&&Ps(a[n],r)}),!!e}else return a===t}function Wn(a,t){a[t.get(["label","show"])?"show":"hide"]()}function Na(a){return{x:a.x||0,y:a.y||0,rotation:a.rotation||0}}function Un(a,t,e){var r=t.get("z"),n=t.get("zlevel");a&&a.traverse(function(i){i.type!=="group"&&(r!=null&&(i.z=r),n!=null&&(i.zlevel=n),i.silent=e)})}function Xh(a){var t=a.get("type"),e=a.getModel(t+"Style"),r;return t==="line"?(r=e.getLineStyle(),r.fill=null):t==="shadow"&&(r=e.getAreaStyle(),r.stroke=null),r}function Kh(a,t,e,r,n){var i=e.get("value"),s=Os(i,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),o=e.getModel("label"),l=Oi(o.get("padding")||0),u=o.getFont(),c=Ai(s,u),h=n.position,d=c.width+l[1]+l[3],v=c.height+l[0]+l[2],f=n.align;f==="right"&&(h[0]-=d),f==="center"&&(h[0]-=d/2);var p=n.verticalAlign;p==="bottom"&&(h[1]-=v),p==="middle"&&(h[1]-=v/2),qh(h,d,v,r);var g=o.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),a.label={x:h[0],y:h[1],style:yr(o,{text:s,font:u,fill:o.getTextColor(),padding:l,backgroundColor:g}),z2:10}}
1function qh(a,t,e,r){var n=r.getWidth(),i=r.getHeight();a[0]=Math.min(a[0]+t,n)-t,a[1]=Math.min(a[1]+e,i)-e,a[0]=Math.max(a[0],0),a[1]=Math.max(a[1],0)}function Os(a,t,e,r,n){a=t.scale.parse(a);var i=t.scale.getLabel({value:a},{precision:n.precision}),s=n.formatter;if(s){var o={value:da(t,{value:a}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};O(r,function(l){var u=e.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,h=u&&u.getDataParams(c);h&&o.seriesData.push(h)}),st(s)?i=s.replace("{value}",i):J(s)&&(i=s(o))}return i}function Es(a,t,e){var r=gr();return Li(r,r,e.rotation),fl(r,r,e.position),pl([a.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],r)}function jh(a,t,e,r,n,i){var s=Ht.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=n.get(["label","margin"]),Kh(t,r,n,i,{position:Es(r.axis,a,e),align:s.textAlign,verticalAlign:s.textVerticalAlign})}function Qh(a,t,e){return e=e||0,{x1:a[e],y1:a[1-e],x2:t[e],y2:t[1-e]}}function Jh(a,t,e){return e=e||0,{x:a[e],y:a[1-e],width:t[e],height:t[1-e]}}var td=function(a){q(t,a);function t(){return a!==null&&a.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,r,n,i,s){var o=n.axis,l=o.grid,u=i.get("type"),c=Yn(l,o).getOtherAxis(o).getGlobalExtent(),h=o.toGlobalCoord(o.dataToCoord(r,!0));if(u&&u!=="none"){var d=Xh(i),v=ed[u](o,h,c);v.style=d,e.graphicKey=v.type,e.pointer=v}var f=fa(l.getRect(),n);jh(r,e,f,n,i,s)},t.prototype.getHandleTransform=function(e,r,n){var i=fa(r.axis.grid.getRect(),r,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var s=Es(r.axis,e,i);return{x:s[0],y:s[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,r,n,i){var s=n.axis,o=s.grid,l=s.getGlobalExtent(!0),u=Yn(o,s).getOtherAxis(s).getGlobalExtent(),c=s.dim==="x"?0:1,h=[e.x,e.y];h[c]+=r[c],h[c]=Math.min(l[1],h[c]),h[c]=Math.max(l[0],h[c]);var d=(u[1]+u[0])/2,v=[d,d];v[c]=h[c];var f=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:e.rotation,cursorPoint:v,tooltipOption:f[c]}},t}(Zh);function Yn(a,t){var e={};return e[t.dim+"AxisIndex"]=t.index,a.getCartesian(e)}var ed={line:function(a,t,e){var r=Qh([t,e[0]],[t,e[1]],Zn(a));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(a,t,e){var r=Math.max(1,a.getBandWidth()),n=e[1]-e[0];return{type:"Rect",shape:Jh([t-r/2,e[0]],[r,n],Zn(a))}}};function Zn(a){return a.dim==="x"?0:1}var ad=function(a){q(t,a);function t(){var e=a!==null&&a.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:it.color.border,width:1,type:"dashed"},shadowStyle:{color:it.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:it.color.neutral00,padding:[5,7,5,7],backgroundColor:it.color.accent60,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:it.color.accent40,throttle:40}},t}($t),Lt=Tt(),rd=O;function Bs(a,t,e){if(!ft.node){var r=t.getZr();Lt(r).records||(Lt(r).records={}),nd(r,t);var n=Lt(r).records[a]||(Lt(r).records[a]={});n.handler=e}}function nd(a,t){if(Lt(a).initialized)return;Lt(a).initialized=!0,e("click",ht(Xn,"click")),e("mousemove",ht(Xn,"mousemove")),e("globalout",sd);function e(r,n){a.on(r,function(i){var s=od(t);rd(Lt(a).records,function(o){o&&n(o,i,s.dispatchAction)}),id(s.pendings,t)})}}function id(a,t){var e=a.showTip.length,r=a.hideTip.length,n;e?n=a.showTip[e-1]:r&&(n=a.hideTip[r-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}function sd(a,t,e){a.handler("leave",null,e)}function Xn(a,t,e,r){t.handler(a,e,r)}function od(a){var t={showTip:[],hideTip:[]},e=function(r){var n=t[r.type];n?n.push(r):(r.dispatchAction=e,a.dispatchAction(r))};return{dispatchAction:e,pendings:t}}function cr(a,t){if(!ft.node){var e=t.getZr(),r=(Lt(e).records||{})[a];r&&(Lt(e).records[a]=null)}}var ld=function(a){q(t,a);function t(){var e=a!==null&&a.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,r,n){var i=r.getComponent("tooltip"),s=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";Bs("axisPointer",n,function(o,l,u){s!=="none"&&(o==="leave"||s.indexOf(o)>
1=0)&&u({type:"updateAxisPointer",currTrigger:o,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,r){cr("axisPointer",r)},t.prototype.dispose=function(e,r){cr("axisPointer",r)},t.type="axisPointer",t}(Kt);function Ns(a,t){var e=[],r=a.seriesIndex,n;if(r==null||!(n=t.getSeriesByIndex(r)))return{point:[]};var i=n.getData(),s=ml(i,a);if(s==null||s<0||Q(s))return{point:[]};var o=i.getItemGraphicEl(s),l=n.coordinateSystem;if(n.getTooltipPosition)e=n.getTooltipPosition(s)||[];else if(l&&l.dataToPoint)if(a.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),h=c.dim,d=u.dim,v=h==="x"||h==="radius"?1:0,f=i.mapDimension(d),p=[];p[v]=i.get(f,s),p[1-v]=i.get(i.getCalculationInfo("stackResultDimension"),s),e=l.dataToPoint(p)||[]}else e=l.dataToPoint(i.getValues(nt(l.dimensions,function(y){return i.mapDimension(y)}),s))||[];else if(o){var g=o.getBoundingRect().clone();g.applyTransform(o.transform),e=[g.x+g.width/2,g.y+g.height/2]}return{point:e,el:o}}var Kn=Tt();function ud(a,t,e){var r=a.currTrigger,n=[a.x,a.y],i=a,s=a.dispatchAction||vt(e.dispatchAction,e),o=t.getComponent("axisPointer").coordSysAxesInfo;if(o){qe(n)&&(n=Ns({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var l=qe(n),u=i.axesInfo,c=o.axesInfo,h=r==="leave"||qe(n),d={},v={},f={list:[],map:{}},p={showPointer:ht(hd,v),showTooltip:ht(dd,f)};O(o.coordSysMap,function(y,b){var x=l||y.containPoint(n);O(o.coordSysAxesInfo[b],function(w,S){var C=w.axis,_=md(u,w);if(!h&&x&&(!u||_)){var P=_&&_.value;P==null&&!l&&(P=C.pointToData(n)),P!=null&&qn(w,P,p,!1,d)}})});var g={};return O(c,function(y,b){var x=y.linkGroup;x&&!v[b]&&O(x.axesInfo,function(w,S){var C=v[S];if(w!==y&&C){var _=C.value;x.mapper&&(_=y.axis.scale.parse(x.mapper(_,jn(w),jn(y)))),g[y.key]=_}})}),O(g,function(y,b){qn(c[b],y,p,!0,d)}),vd(v,c,d),fd(f,n,a,s),pd(c,s,e),d}}function qn(a,t,e,r,n){var i=a.axis;if(!(i.scale.isBlank()||!i.containData(t))){if(!a.involveSeries){e.showPointer(a,t);return}var s=cd(t,a),o=s.payloadBatch,l=s.snapToValue;o[0]&&n.seriesIndex==null&&at(n,o[0]),!r&&a.snap&&i.containData(l)&&l!=null&&(t=l),e.showPointer(a,t,o),e.showTooltip(a,s,l)}}function cd(a,t){var e=t.axis,r=e.dim,n=a,i=[],s=Number.MAX_VALUE,o=-1;return O(t.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(r),h,d;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(c,a,e);d=v.dataIndices,h=v.nestestValue}else{if(d=l.indicesOfNearest(r,c[0],a,e.type==="category"?.5:null),!d.length)return;h=l.getData().get(c[0],d[0])}if(!(h==null||!isFinite(h))){var f=a-h,p=Math.abs(f);p<=s&&((p<s||f>=0&&o<0)&&(s=p,o=f,n=h,i.length=0),O(d,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}
1))}}),{payloadBatch:i,snapToValue:n}}function hd(a,t,e,r){a[t.key]={value:e,payloadBatch:r}}function dd(a,t,e,r){var n=e.payloadBatch,i=t.axis,s=i.model,o=t.axisPointerModel;if(!(!t.triggerTooltip||!n.length)){var l=t.coordSys.model,u=Te(l),c=a.map[u];c||(c=a.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},a.list.push(c)),c.dataByAxis.push({axisDim:i.dim,axisIndex:s.componentIndex,axisType:s.type,axisId:s.id,value:r,valueLabelOpt:{precision:o.get(["label","precision"]),formatter:o.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function vd(a,t,e){var r=e.axesInfo=[];O(t,function(n,i){var s=n.axisPointerModel.option,o=a[i];o?(!n.useHandle&&(s.status="show"),s.value=o.value,s.seriesDataIndices=(o.payloadBatch||[]).slice()):!n.useHandle&&(s.status="hide"),s.status==="show"&&r.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:s.value})})}function fd(a,t,e,r){if(qe(t)||!a.list.length){r({type:"hideTip"});return}var n=((a.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:a.list})}function pd(a,t,e){var r=e.getZr(),n="axisPointerLastHighlights",i=Kn(r)[n]||{},s=Kn(r)[n]={};O(a,function(u,c){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&O(h.seriesDataIndices,function(d){var v=d.seriesIndex+" | "+d.dataIndex;s[v]=d})});var o=[],l=[];O(i,function(u,c){!s[c]&&l.push(u)}),O(s,function(u,c){!i[c]&&o.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),o.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:o})}function md(a,t){for(var e=0;e<(a||[]).length;e++){var r=a[e];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function jn(a){var t=a.axis.model,e={},r=e.axisDim=a.axis.dim;return e.axisIndex=e[r+"AxisIndex"]=t.componentIndex,e.axisName=e[r+"AxisName"]=t.name,e.axisId=e[r+"AxisId"]=t.id,e}function qe(a){return!a||a[0]==null||isNaN(a[0])||a[1]==null||isNaN(a[1])}function Rs(a){Ds.registerAxisPointerClass("CartesianAxisPointer",td),a.registerComponentModel(ad),a.registerComponentView(ld),a.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!Q(e)&&(t.axisPointer.link=[e])}}),a.registerProcessor(a.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Oh(t,e)}),a.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},ud)}function gd(a){we(Yh),we(Rs)}var yd=function(a){q(t,a);function t(){var e=a!==null&&a.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,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:it.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:it.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:it.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:it.color.tertiary,fontSize:14}},t}($t);function $s(a){var t=a.get("confine");return t!=null?!!t:a.get("renderMode")==="richText"}function Hs(a){if(ft.domSupported){for(var t=document.documentElement.style,e=0,r=a.length;e<r;e++)if(a[e]in t)return a[e]}}var zs=Hs(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),_d=Hs(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function Fs(a,t){if(!a)return t;t=Ei(t,!0);var e=a.indexOf(t);return a=e===-1?t:"-"+a.slice(0,e)+"-"+t,a.toLowerCase()}function xd(a,t){var e=a.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(a);return e?e[t]:null}var bd=Fs(_d,"transition"),Lr=Fs(zs,"transform"),wd="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(ft.transform3dSupported?"will-change:transform;":"");
1function Sd(a){return a=a==="left"?"right":a==="right"?"left":a==="top"?"bottom":"top",a}function Cd(a,t,e){if(!st(e)||e==="inside")return"";var r=a.get("backgroundColor"),n=a.get("borderWidth");t=sa(t);var i=Sd(e),s=Math.max(Math.round(n)*1.5,6),o="",l=Lr+":",u;xt(["left","right"],i)>-1?(o+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(o+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var c=u*Math.PI/180,h=s+n,d=h*Math.abs(Math.cos(c))+h*Math.abs(Math.sin(c)),v=Math.round(((d-Math.SQRT2*n)/2+Math.SQRT2*n-(d-h)/2)*100)/100;o+=";"+i+":-"+v+"px";var f=t+" solid "+n+"px;",p=["position:absolute;width:"+s+"px;height:"+s+"px;z-index:-1;",o+";"+l+";","border-bottom:"+f,"border-right:"+f,"background-color:"+r+";"];return'<div style="'+p.join("")+'"></div>'}function Md(a,t,e){var r="cubic-bezier(0.23,1,0.32,1)",n="",i="";return e&&(n=" "+a/2+"s "+r,i="opacity"+n+",visibility"+n),t||(n=" "+a+"s "+r,i+=(i.length?",":"")+(ft.transformSupported?""+Lr+n:",left"+n+",top"+n)),bd+":"+i}function Qn(a,t,e){var r=a.toFixed(0)+"px",n=t.toFixed(0)+"px";if(!ft.transformSupported)return e?"top:"+n+";left:"+r+";":[["top",n],["left",r]];var i=ft.transform3dSupported,s="translate"+(i?"3d":"")+"("+r+","+n+(i?",0":"")+")";return e?"top:0;left:0;"+Lr+":"+s+";":[["top",0],["left",0],[zs,s]]}function Td(a){var t=[],e=a.get("fontSize"),r=a.getTextColor();r&&t.push("color:"+r),t.push("font:"+a.getFont());var n=ut(a.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+n+"px");var i=a.get("textShadowColor"),s=a.get("textShadowBlur")||0,o=a.get("textShadowOffsetX")||0,l=a.get("textShadowOffsetY")||0;return i&&s&&t.push("text-shadow:"+o+"px "+l+"px "+s+"px "+i),O(["decoration","align"],function(u){var c=a.get(u);c&&t.push("text-"+u+":"+c)}),t.join(";")}function kd(a,t,e,r){var n=[],i=a.get("transitionDuration"),s=a.get("backgroundColor"),o=a.get("shadowBlur"),l=a.get("shadowColor"),u=a.get("shadowOffsetX"),c=a.get("shadowOffsetY"),h=a.getModel("textStyle"),d=Bi(a,"html"),v=u+"px "+c+"px "+o+"px "+l;return n.push("box-shadow:"+v),t&&i>0&&n.push(Md(i,e,r)),s&&n.push("background-color:"+s),O(["width","color","radius"],function(f){var p="border-"+f,g=Ei(p),y=a.get(g);y!=null&&n.push(p+":"+y+(f==="color"?"":"px"))}),n.push(Td(h)),d!=null&&n.push("padding:"+Oi(d).join("px ")+"px"),n.join(";")+";"}function Jn(a,t,e,r,n){var i=t&&t.painter;if(e){var s=i&&i.getViewportRoot();s&&yl(a,s,e,r,n)}else{a[0]=r,a[1]=n;var o=i&&i.getViewportRootOffset();o&&(a[0]+=o.offsetLeft,a[1]+=o.offsetTop)}a[2]=a[0]/t.getWidth(),a[3]=a[1]/t.getHeight()}var Ad=function(){function a(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,ft.wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var n=this._zr=t.getZr(),i=e.appendTo,s=i&&(st(i)?document.querySelector(i):Zr(i)?i:J(i)&&i(t.getDom()));Jn(this._styleCoord,n,s,t.getWidth()/2,t.getHeight()/2),(s||t.getDom()).appendChild(r),this._api=t,this._container=s;var o=this;r.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},r.onmousemove=function(l){if(l=l||window.event,!o._enterable){var u=n.handler,c=n.painter.getViewportRoot();gl(c,l,!0),u.dispatch("mousemove",l)}},r.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return a.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),r=xd(e,"position"),n=e.style;n.position!=="absolute"&&r!=="absolute"&&(n.position="relative")}var i=t.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},a.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var r=this.el,n=r.style,i=this._styleCoord;r.innerHTML?n.cssText=wd+kd(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+Qn(i[0],i[1],!0)+("border-color:"+sa(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},a.prototype.setContent=function(t,e,r,n,i){var s=this.el;if(t==null){s.innerHTML="";return}var o="";if(st(i)&&r.get("trigger")==="item"&&!$s(r)&&(o=Cd(r,n,i)),st(t))s.innerHTML=t+o;else if(t){s.innerHTML="",Q(t)||(t=[t]);for(var l=0;l<t.length;l++)Zr(t[l])&&t[l].parentNode!==s&&s.appendChild(t[l]);if(o&&s.childNodes.length){var u=document.createElement("div");u.innerHTML=o,s.appendChild(u)}}},a.prototype.setEnterable=function(t){this._enterable=t},a.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},a.prototype.moveTo=function(t,e){if(this.el){var r=this._styleCoord;if(Jn(r,this._zr,this._container,t,e),r[0]!=null&&r[1]!=null){var n=this.el.style,i=Qn(r[0],r[1]);O(i,function(s){n[s[0]]=s[1]})}}},a.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},a.prototype.hide=function(){var t=this,e=this.el.style;this._enableDisplayTransition?(e.visibility="hidden",e.opacity="0"):e.display="none",ft.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},a.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(vt(this.hide,this),t)):this.hide())},a.prototype.isShow=function(){return this._show},a.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this._zr;_l(t&&t.painter&&t.painter.getViewportRoot(),this._container);var e=this.el;if(e){e.onmouseenter=e.onmousemove=e.onmouseleave=null;var r=e.parentNode;r&&r.removeChild(e)}this.el=this._container=null},a}(),Dd=function(){function a(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),ei(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return a.prototype.update=function(t){var e=t.get("alwaysShowContent");e&&this._moveIfResized(),this._alwaysShowContent=e},a.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},a.prototype.setContent=function(t,e,r,n,i){var s=this;pt(t)&&xl(""),this.el&&this._zr.remove(this.el);var o=r.getModel("textStyle");this.el=new ga({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:n,textShadowColor:o.get("textShadowColor"),fill:r.get(["textStyle","color"]),padding:Bi(r,"richText"),verticalAlign:"top",align:"left"},z:r.get("z")}),O(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){s.el.style[u]=r.get(u)}),O(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){s.el.style[u]=o.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})},a.prototype.setEnterable=function(t){this._enterable=t},a.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect
1(),r=ti(t.style);return[e.width+r.left+r.right,e.height+r.top+r.bottom]},a.prototype.moveTo=function(t,e){var r=this.el;if(r){var n=this._styleCoord;ei(n,this._zr,t,e),t=n[0],e=n[1];var i=r.style,s=Bt(i.borderWidth||0),o=ti(i);r.x=t+s+o.left,r.y=e+s+o.top,r.markRedraw()}},a.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},a.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},a.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(vt(this.hide,this),t)):this.hide())},a.prototype.isShow=function(){return this._show},a.prototype.dispose=function(){this._zr.remove(this.el)},a}();function Bt(a){return Math.max(0,a)}function ti(a){var t=Bt(a.shadowBlur||0),e=Bt(a.shadowOffsetX||0),r=Bt(a.shadowOffsetY||0);return{left:Bt(t-e),right:Bt(t+e),top:Bt(t-r),bottom:Bt(t+r)}}function ei(a,t,e,r){a[0]=e,a[1]=r,a[2]=a[0]/t.getWidth(),a[3]=a[1]/t.getHeight()}var Ld=new Gt({shape:{x:-1,y:-1,width:2,height:2}}),Id=function(a){q(t,a);function t(){var e=a!==null&&a.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,r){if(!(ft.node||!r.getDom())){var n=e.getComponent("tooltip"),i=this._renderMode=bl(n.get("renderMode"));this._tooltipContent=i==="richText"?new Dd(r):new Ad(r,{appendTo:n.get("appendToBody",!0)?"body":n.get("appendTo",!0)})}},t.prototype.render=function(e,r,n){if(!(ft.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=r,this._api=n;var i=this._tooltipContent;i.update(e),i.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&e.get("transitionDuration")?Pi(this,"_updatePosition",50,"fixRate"):ja(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel,r=e.get("triggerOn");Bs("itemTooltip",this._api,vt(function(n,i,s){r!=="none"&&(r.indexOf(n)>=0?this._tryShow(i,s):n==="leave"&&this._hide(s))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,r=this._ecModel,n=this._api,i=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var s=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&s.manuallyShowTip(e,r,n,{x:s._lastX,y:s._lastY,dataByCoordSys:s._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,r,n,i){if(!(i.from===this.uid||ft.node||!n.getDom())){var s=ai(i,n);this._ticket="";var o=i.dataByCoordSys,l=Bd(i,r,n);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:i.position,positionDefault:"bottom"},s)}else if(i.tooltip&&i.x!=null&&i.y!=null){var c=Ld;c.x=i.x,c.y=i.y,c.update(),mt(c).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:c},s)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},s);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(e,r,n,i))return;var h=Ns(i,r),d=h.point[0],v=h.point[1];d!=null&&v!=null&&this._tryShow({offsetX:d,offsetY:v,target:h.el,position:i.position,positionDefault:"bottom"},s)}else i.x!=null&&i.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},s))}},t.prototype.manuallyHideTip=function(e,r,n,i){var s=this._tooltipContent;this._tooltipModel&&s.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(ai(i,n))},t.prototype._manuallyAxisShowTip=function(e,r,n,i){var s=i.seriesIndex,o=i.dataIndex,l=r.getComponent("axisPointer").coordSysAxesInfo;if(!(s==null||o==null||l==null)){var u=r.getSeriesByIndex(s);if(u){var c=u.getData(),h=ve([c.getItemModel(o),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:s,dataIndex:o,position:i.position}),!0}}},t.prototype._tryShow=function(e,r){var n=e.target,i=this._tooltipModel;if(i){this._lastX=e.offsetX,this._lastY=e.offsetY;var s=e.dataByCoordSys;if(s&&s.length)this._showAxisTooltip(s,e);else if(n){var o=mt(n);if(o.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;wl(n,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(mt(c).dataIndex!=null?l=c:mt(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(e,l,r):u?this._showComponentItemTooltip(e,u,r):this._hide(r)}else this._lastDataByCoordSys=null,this._hide(r)}},t.prototype._showOrMove=function(e,r){var n=e.get("showDelay");r=vt(r,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(r,n):r()},t.prototype._showAxisTooltip=function(e,r){var n=this._ecModel,i=this._tooltipModel,s=[r.offsetX,r.offsetY],o=ve([r.tooltipOption],i),l=this._renderMode,u=[],c=oa("section",{blocks:[],noHeader:!0}),h=[],d=new wa;O(e,function(b){O(b.dataByAxis,function(x){var w=n.getComponent(x.axisDim+"Axis",x.axisIndex),S=x.value;if(!(!w||S==null)){var C=Os(S,w.axis,n,x.seriesDataIndices,x.valueLabelOpt),_=oa("section",{header:C,noHeader:!Sl(C),sortBlocks:!0,blocks:[]});c.blocks.push(_),O(x.seriesDataIndices,function(P){var k=n.getSeriesByIndex(P.seriesIndex),A=P.dataIndexInside,L=k.getDataParams(A);if(!(L.dataIndex<0)){L.axisDim=x.axisDim,L.axisIndex=x.axisIndex,L.axisType=x.axisType,L.axisId=x.axisId,L.axisValue=da(w.axis,{value:S}),L.axisValueLabel=C,L.marker=d.makeTooltipMarker("item",sa(L.color),l);var R=Xr(k.formatTooltip(A,!0,null)),I=R.frag;if(I){var N=ve([k],i).get("valueFormatter");_.blocks.push(N?at({valueFormatter:N},I):I)}R.text&&h.push(R.text),u.push(L)}})}})}),c.blocks.reverse(),h.reverse();var v=r.position,f=o.get("order"),p=Kr(c,d,l,f,n.get("useUTC"),o.get("textStyle"));p&&h.unshift(p);var g=l==="richText"?`
2
3`:"<br/>",y=h.join(g);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(o,v,s[0],s[1],this._tooltipContent,u):this._showTooltipContent(o,y,u,Math.random()+"",s[0],s[1],v,null,d)})},t.prototype._showSeriesItemTooltip=function(e,r,n){var i=this._ecModel,s=mt(r),o=s.seriesIndex,l=i.getSeriesByIndex(o),u=s.dataModel||l,c=s.dataIndex,h=s.dataType,d=u.getData(h),v=this._renderMode,f=e.positionDefault,p=ve([d.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(c,h),b=new wa;
3y.marker=b.makeTooltipMarker("item",sa(y.color),v);var x=Xr(u.formatTooltip(c,!1,h)),w=p.get("order"),S=p.get("valueFormatter"),C=x.frag,_=C?Kr(S?at({valueFormatter:S},C):C,b,v,w,i.get("useUTC"),p.get("textStyle")):x.text,P="item_"+u.name+"_"+c;this._showOrMove(p,function(){this._showTooltipContent(p,_,y,P,e.offsetX,e.offsetY,e.position,e.target,b)}),n({type:"showTip",dataIndexInside:c,dataIndex:d.getRawIndex(c),seriesIndex:o,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,r,n){var i=this._renderMode==="html",s=mt(r),o=s.tooltipConfig,l=o.option||{},u=l.encodeHTMLContent;if(st(l)){var c=l;l={content:c,formatter:c},u=!0}u&&i&&l.content&&(l=te(l),l.content=Cl(l.content));var h=[l],d=this._ecModel.getComponent(s.componentMainType,s.componentIndex);d&&h.push(d),h.push({formatter:l.content});var v=e.positionDefault,f=ve(h,this._tooltipModel,v?{position:v}:null),p=f.get("content"),g=Math.random()+"",y=new wa;this._showOrMove(f,function(){var b=te(f.get("formatterParams")||{});this._showTooltipContent(f,p,b,g,e.offsetX,e.offsetY,e.position,r,y)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,r,n,i,s,o,l,u,c){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var h=this._tooltipContent;h.setEnterable(e.get("enterable"));var d=e.get("formatter");l=l||e.get("position");var v=r,f=this._getNearestPoint([s,o],n,e.get("trigger"),e.get("borderColor"),e.get("defaultBorderColor",!0)),p=f.color;if(d)if(st(d)){var g=e.ecModel.get("useUTC"),y=Q(n)?n[0]:n,b=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=d,b&&(v=Ci(y.axisValue,v,g)),v=Ml(v,n,!0)}else if(J(d)){var x=vt(function(w,S){w===this._ticket&&(h.setContent(S,c,e,p,l),this._updatePosition(e,l,s,o,h,n,u))},this);this._ticket=i,v=d(n,i,x)}else v=d;h.setContent(v,c,e,p,l),h.show(e,p),this._updatePosition(e,l,s,o,h,n,u)}},t.prototype._getNearestPoint=function(e,r,n,i,s){if(n==="axis"||Q(r))return{color:i||s};if(!Q(r))return{color:i||r.color||r.borderColor}},t.prototype._updatePosition=function(e,r,n,i,s,o,l){var u=this._api.getWidth(),c=this._api.getHeight();r=r||e.get("position");var h=s.getSize(),d=e.get("align"),v=e.get("verticalAlign"),f=l&&l.getBoundingRect().clone();if(l&&f.applyTransform(l.transform),J(r)&&(r=r([n,i],o,s.el,f,{viewSize:[u,c],contentSize:h.slice()})),Q(r))n=It(r[0],u),i=It(r[1],c);else if(pt(r)){var p=r;p.width=h[0],p.height=h[1];var g=_r(p,{width:u,height:c});n=g.x,i=g.y,d=null,v=null}else if(st(r)&&l){var y=Ed(r,f,h,e.get("borderWidth"));n=y[0],i=y[1]}else{var y=Pd(n,i,s,u,c,d?null:20,v?null:20);n=y[0],i=y[1]}if(d&&(n-=ri(d)?h[0]/2:d==="right"?h[0]:0),v&&(i-=ri(v)?h[1]/2:v==="bottom"?h[1]:0),$s(e)){var y=Od(n,i,s,u,c);n=y[0],i=y[1]}s.moveTo(n,i)},t.prototype._updateContentNotChangedOnAxis=function(e,r){var n=this._lastDataByCoordSys,i=this._cbParamsList,s=!!n&&n.length===e.length;return s&&O(n,function(o,l){var u=o.dataByAxis||[],c=e[l]||{},h=c.dataByAxis||[];s=s&&u.length===h.length,s&&O(u,function(d,v){var f=h[v]||{},p=d.seriesDataIndices||[],g=f.seriesDataIndices||[];s=s&&d.value===f.value&&d.axisType===f.axisType&&d.axisId===f.axisId&&p.length===g.length,s&&O(p,function(y,b){var x=g[b];s=s&&y.seriesIndex===x.seriesIndex&&y.dataIndex===x.dataIndex}),i&&O(d.seriesDataIndices,function(y){var b=y.seriesIndex,x=r[b],w=i[b];x&&w&&w.data!==x.data&&(s=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=r,!!s},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,r){ft.node||!r.getDom()||(ja(this,"_updatePosition"),this._tooltipContent.dispose(),cr("itemTooltip",r))},t.type="tooltip",t}(Kt);function ve(a,t,e){var r=t.ecModel,n;e?(n=new Xt(e,r,r),n=new Xt(t.option,n,r)):n=t;for(var i=a.length-1;i>=0;i--){var s=a[i];s&&(s instanceof Xt&&(s=s.get("tooltip",!0)),st(s)&&(s={formatter:s}),s&&(n=new Xt(s,n,r)))}return n}function ai(a,t){return a.dispatchAction||vt(t.dispatchAction,t)}function Pd(a,t,e,r,n,i,s){var o=e.getSize(),l=o[0],u=o[1];return i!=null&&(a+l+i+2>r?a-=l+i:a+=i),s!=null&&(t+u+s>n?t-=u+s:t+=s),[a,t]}function Od(a,t,e,r,n){var i=e.getSize(),s=i[0],o=i[1];return a=Math.min(a+s,r)-s,t=Math.min(t+o,n)-o,a=Math.max(a,0),t=Math.max(t,0),[a,t]}function Ed(a,t,e,r){var n=e[0],i=e[1],s=Math.ceil(Math.SQRT2*r)+8,o=0,l=0,u=t.width,c=t.height;switch(a){case"inside":o=t.x+u/2-n/2,l=t.y+c/2-i/2;break;case"top":o=t.x+u/2-n/2,l=t.y-i-s;break;case"bottom":o=t.x+u/2-n/2,l=t.y+c+s;break;case"left":o=t.x-n-s,l=t.y+c/2-i/2;break;case"right":o=t.x+u+s,l=t.y+c/2-i/2}return[o,l]}function ri(a){return a==="center"||a==="middle"}function Bd(a,t,e){var r=Tl(a).queryOptionMap,n=r.keys()[0];if(!(!n||n==="series")){var i=kl(t,n,r.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),s=i.models[0];if(s){var o=e.getViewOfComponentModel(s),l;if(o.group.traverse(function(u){var c=mt(u).tooltipConfig;if(c&&c.name===a.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:s.componentIndex,el:l}}}}function Nd(a){we(Rs),a.registerComponentModel(yd),a.registerComponentView(Id),a.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},qr),a.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},qr)}function Rd(a,t){if(!a)return!1;for(var e=Q(a)?a:[a],r=0;r<e.length;r++)if(e[r]&&e[r][t])return!0;return!1}function ze(a){Al(a,"label",["show"])}var Fe=Tt(),ie=function(a){q(t,a);function t(){var e=a!==null&&a.apply(this,arguments)||this;return e.type=t.type,e.createdBySelf=!1,e.preventAutoZ=!0,e}return t.prototype.init=function(e,r,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(ft.node)return!1;var e=this.__hostSeries;
3return this.getShallow("animation")&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,r){this._mergeOption(e,r,!1,!1)},t.prototype._mergeOption=function(e,r,n,i){var s=this.mainType;n||r.eachSeries(function(o){var l=o.get(this.mainType,!0),u=Fe(o)[s];if(!l||!l.data){Fe(o)[s]=null;return}u?u._mergeOption(l,r,!0):(i&&ze(l),O(l.data,function(c){c instanceof Array?(ze(c[0]),ze(c[1])):ze(c)}),u=this.createMarkerModelFromSeries(l,this,r),at(u,{mainType:this.mainType,seriesIndex:o.seriesIndex,name:o.name,createdBySelf:!0}),u.__hostSeries=o),Fe(o)[s]=u},this)},t.prototype.formatTooltip=function(e,r,n){var i=this.getData(),s=this.getRawValue(e),o=i.getName(e);return oa("section",{header:this.name,blocks:[oa("nameValue",{name:o,value:s,noName:!o,noValue:s==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,r){var n=Ni.prototype.getDataParams.call(this,e,r),i=this.__hostSeries;return i&&(n.seriesId=i.id,n.seriesName=i.name,n.seriesType=i.subType),n},t.getMarkerModelFromSeries=function(e,r){return Fe(e)[r]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}($t);wi(ie,Ni.prototype);var $d=function(a){q(t,a);function t(){var e=a!==null&&a.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,r,n){return new t(e,r,n)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(ie);function Hd(a){return!(isNaN(parseFloat(a.x))&&isNaN(parseFloat(a.y)))}function zd(a){return!isNaN(parseFloat(a.x))&&!isNaN(parseFloat(a.y))}function Ve(a,t,e,r,n,i,s){var o=[],l=wr(t,n),u=l?t.getCalculationInfo("stackResultDimension"):n,c=hr(t,u,a),h=t.hostModel,d=h.indicesOfNearest(e,u,c)[0];o[i]=t.get(r,d),o[s]=t.get(u,d);var v=t.get(n,d),f=ma(t.get(n,d));return f=Math.min(f,20),f>=0&&(o[s]=+o[s].toFixed(f)),[o,v]}var Ge={min:ht(Ve,"min"),max:ht(Ve,"max"),average:ht(Ve,"average"),median:ht(Ve,"median")};function Fd(a,t){if(t){var e=a.getData(),r=a.coordinateSystem,n=r&&r.dimensions;if(!zd(t)&&!Q(t.coord)&&Q(n)){var i=Vd(t,e,r,a);if(t=te(t),t.type&&Ge[t.type]&&i.baseAxis&&i.valueAxis){var s=xt(n,i.baseAxis.dim),o=xt(n,i.valueAxis.dim),l=Ge[t.type](e,i.valueAxis.dim,i.baseDataDim,i.valueDataDim,s,o);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!Q(n)){t.coord=[];var u=a.getBaseAxis();if(u&&t.type&&Ge[t.type]){var c=r.getOtherAxis(u);c&&(t.value=hr(e,e.mapDimension(c.dim),t.type))}}else for(var h=t.coord,d=0;d<2;d++)Ge[h[d]]&&(h[d]=hr(e,e.mapDimension(n[d]),h[d]));return t}}function Vd(a,t,e,r){var n={};return a.valueIndex!=null||a.valueDim!=null?(n.valueDataDim=a.valueIndex!=null?t.getDimension(a.valueIndex):a.valueDim,n.valueAxis=e.getAxis(Gd(r,n.valueDataDim)),n.baseAxis=e.getOtherAxis(n.valueAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim)):(n.baseAxis=r.getBaseAxis(),n.valueAxis=e.getOtherAxis(n.baseAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim),n.valueDataDim=t.mapDimension(n.valueAxis.dim)),n}function Gd(a,t){var e=a.getData().getDimensionInfo(t);return e&&e.coordDim}function Wd(a,t){return a&&a.containData&&t.coord&&!Hd(t)?a.containData(t.coord):!0}function Ud(a,t){return a?function(e,r,n,i){var s=i<2?e.coord&&e.coord[i]:e.value;return jr(s,t[i])}:function(e,r,n,i){return jr(e.value,t[i])}}function hr(a,t,e){if(e==="average"){var r=0,n=0;return a.each(t,function(i,s){isNaN(i)||(r+=i,n++)}),r/n}else return e==="median"?a.getMedian(t):a.getDataExtent(t)[e==="max"?1:0]}var Ra=Tt(),Yd=function(a){q(t,a);function t(){var e=a!==null&&a.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this.markerGroupMap=Ct()},t.prototype.render=function(e,r,n){var i=this,s=this.markerGroupMap;s.each(function(o){Ra(o).keep=!1}),r.eachSeries(function(o){var l=ie.getMarkerModelFromSeries(o,i.type);l&&i.renderSeries(o,l,r,n)}),s.each(function(o){!Ra(o).keep&&i.group.remove(o.group)}),Zd(r,s,this.type)},t.prototype.markKeep=function(e){Ra(e).keep=!0},t.prototype.toggleBlurSeries=function(e,r){var n=this;O(e,function(i){var s=ie.getMarkerModelFromSeries(i,n.type);if(s){var o=s.getData();o.eachItemGraphicEl(function(l){l&&(r?Dl(l):Ll(l))})}})},t.type="marker",t}(Kt);function Zd(a,t,e){a.eachSeries(function(r){var n=ie.getMarkerModelFromSeries(r,e),i=t.get(r.id);if(n&&i&&i.group){var s=Il(n),o=s.z,l=s.zlevel;Pl(i.group,o,l)}})}function ni(a,t,e){var r=t.coordinateSystem,n=e.getWidth(),i=e.getHeight(),s=r&&r.getArea&&r.getArea();a.each(function(o){var l=a.getItemModel(o),u=l.get("relativeTo")==="coordinate",c=u?s?s.width:0:n,h=u?s?s.height:0:i,d=u&&s?s.x:0,v=u&&s?s.y:0,f,p=It(l.get("x"),
3c)+d,g=It(l.get("y"),h)+v;if(!isNaN(p)&&!isNaN(g))f=[p,g];else if(t.getMarkerPosition)f=t.getMarkerPosition(a.getValues(a.dimensions,o));else if(r){var y=a.get(r.dimensions[0],o),b=a.get(r.dimensions[1],o);f=r.dataToPoint([y,b])}isNaN(p)||(f[0]=p),isNaN(g)||(f[1]=g),a.setItemLayout(o,f)})}var Xd=function(a){q(t,a);function t(){var e=a!==null&&a.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,r,n){r.eachSeries(function(i){var s=ie.getMarkerModelFromSeries(i,"markPoint");s&&(ni(s.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},t.prototype.renderSeries=function(e,r,n,i){var s=e.coordinateSystem,o=e.id,l=e.getData(),u=this.markerGroupMap,c=u.get(o)||u.set(o,new Lu),h=Kd(s,e,r);r.setData(h),ni(r.getData(),e,i),h.each(function(d){var v=h.getItemModel(d),f=v.getShallow("symbol"),p=v.getShallow("symbolSize"),g=v.getShallow("symbolRotate"),y=v.getShallow("symbolOffset"),b=v.getShallow("symbolKeepAspect");if(J(f)||J(p)||J(g)||J(y)){var x=r.getRawValue(d),w=r.getDataParams(d);J(f)&&(f=f(x,w)),J(p)&&(p=p(x,w)),J(g)&&(g=g(x,w)),J(y)&&(y=y(x,w))}var S=v.getModel("itemStyle").getItemStyle(),C=v.get("z2"),_=Ol(l,"color");S.fill||(S.fill=_),h.setItemVisual(d,{z2:ut(C,0),symbol:f,symbolSize:p,symbolRotate:g,symbolOffset:y,symbolKeepAspect:b,style:S})}),c.updateData(h),this.group.add(c.group),h.eachItemGraphicEl(function(d){d.traverse(function(v){mt(v).dataModel=r})}),this.markKeep(c),c.group.silent=r.get("silent")||e.get("silent")},t.type="markPoint",t}(Yd);function Kd(a,t,e){var r;a?r=nt(a&&a.dimensions,function(o){var l=t.getData().getDimensionInfo(t.getData().mapDimension(o))||{};return at(at({},l),{name:o,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var n=new Ui(r,e),i=nt(e.get("data"),ht(Fd,t));a&&(i=qt(i,ht(Wd,a)));var s=Ud(!!a,r);return n.initData(i,null,s),n}function qd(a){a.registerComponentModel($d),a.registerComponentView(Xd),a.registerPreprocessor(function(t){Rd(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}function ii(a,t,e){var r=Bl.createCanvas(),n=t.getWidth(),i=t.getHeight(),s=r.style;return s&&(s.position="absolute",s.left="0",s.top="0",s.width=n+"px",s.height=i+"px",r.setAttribute("data-zr-dom-id",a)),r.width=n*e,r.height=i*e,r}var $a=function(a){q(t,a);function t(e,r,n){var i=a.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null;var s;n=n||$i,typeof e=="string"?s=ii(e,r,n):pt(e)&&(s=e,e=s.id),i.id=e,i.dom=s;var o=s.style;return o&&(Ri(s),s.onselectstart=function(){return!1},o.padding="0",o.margin="0",o.borderWidth="0"),i.painter=r,i.dpr=n,i}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=ii("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,r,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var s=[],o=this.maxRepaintRectCount,l=!1,u=new St(0,0,0,0);function c(b){if(!(!b.isFinite()||b.isZero()))if(s.length===0){var x=new St(0,0,0,0);x.copy(b),s.push(x)}else{for(var w=!1,S=1/0,C=0,_=0;_<s.length;++_){var P=s[_];if(P.intersect(b)){var k=new St(0,0,0,0);k.copy(P),k.union(b),s[_]=k,w=!0;break}else if(l){u.copy(b),u.union(P);var A=b.width*b.height,L=P.width*P.height,R=u.width*u.height,I=R-A-L;I<S&&(S=I,C=_)}}if(l&&(s[C].union(b),w=!0),!w){var x=new St(0,0,0,0);x.copy(b),s.push(x)}l||(l=s.length>=o)}}for(var h=this.__startIndex;h<this.__endIndex;++h){var d=e[h];if(d){var v=d.shouldBePainted(n,i,!0,!0),f=d.__isRendered&&(d.__dirty&Qa||!v)?d.getPrevPaintRect():null;f&&c(f);var p=v&&(d.__dirty&Qa||!d.__isRendered)?d.getPaintRect():null;
3p&&c(p)}}for(var h=this.__prevStartIndex;h<this.__prevEndIndex;++h){var d=r[h],v=d&&d.shouldBePainted(n,i,!0,!0);if(d&&(!v||!d.__zr)&&d.__isRendered){var f=d.getPrevPaintRect();f&&c(f)}}var g;do{g=!1;for(var h=0;h<s.length;){if(s[h].isZero()){s.splice(h,1);continue}for(var y=h+1;y<s.length;)s[h].intersect(s[y])?(g=!0,s[h].union(s[y]),s.splice(y,1)):y++;h++}}while(g);return this._paintRects=s,s},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,r){var n=this.dpr,i=this.dom,s=i.style,o=this.domBack;s&&(s.width=e+"px",s.height=r+"px"),i.width=e*n,i.height=r*n,o&&(o.width=e*n,o.height=r*n,n!==1&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,r,n){var i=this.dom,s=this.ctx,o=i.width,l=i.height;r=r||this.clearColor;var u=this.motionBlur&&!e,c=this.lastFrameAlpha,h=this.dpr,d=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,o/h,l/h));var v=this.domBack;function f(p,g,y,b){if(s.clearRect(p,g,y,b),r&&r!=="transparent"){var x=void 0;if(Nl(r)){var w=r.global||r.__width===y&&r.__height===b;x=w&&r.__canvasGradient||Rl(s,r,{x:0,y:0,width:y,height:b}),r.__canvasGradient=x,r.__width=y,r.__height=b}else $l(r)&&(r.scaleX=r.scaleX||h,r.scaleY=r.scaleY||h,x=Hl(s,r,{dirty:function(){d.setUnpainted(),d.painter.refresh()}}));s.save(),s.fillStyle=x||r,s.fillRect(p,g,y,b),s.restore()}u&&(s.save(),s.globalAlpha=c,s.drawImage(v,p,g,y,b),s.restore())}!n||u?f(0,0,o,l):n.length&&O(n,function(p){f(p.x*h,p.y*h,p.width*h,p.height*h)})},t}(El),si=1e5,Yt=314159,We=.01,jd=.001;function Qd(a){return a?a.__builtin__?!0:!(typeof a.resize!="function"||typeof a.refresh!="function"):!1}function Jd(a,t){var e=document.createElement("div");return e.style.cssText=["position:relative","width:"+a+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",e}var tv=function(){function a(t,e,r,n){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=r=at({},r||{}),this.dpr=r.devicePixelRatio||$i,this._singleCanvas=i,this.root=t;var s=t.style;s&&(Ri(t),t.innerHTML=""),this.storage=e;var o=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(i){var c=t,h=c.width,d=c.height;r.width!=null&&(h=r.width),r.height!=null&&(d=r.height),this.dpr=r.devicePixelRatio||1,c.width=h*this.dpr,c.height=d*this.dpr,this._width=h,this._height=d;var v=new $a(c,this,this.dpr);v.__builtin__=!0,v.initContext(),l[Yt]=v,v.zlevel=Yt,o.push(Yt),this._domRoot=t}else{this._width=Le(t,0,r),this._height=Le(t,1,r);var u=this._domRoot=Jd(this._width,this._height);t.appendChild(u)}}return a.prototype.getType=function(){return"canvas"},a.prototype.isSingleCanvas=function(){return this._singleCanvas},a.prototype.getViewportRoot=function(){return this._domRoot},a.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},a.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),r=this._prevDisplayList,n=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,r,t,this._redrawId);for(var i=0;i<n.length;i++){var s=n[i],o=this._layers[s];if(!o.__builtin__&&o.refresh){var l=i===0?this._backgroundColor:null;o.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},a.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},a.prototype._paintHoverList=function(t){var e=t.length,r=this._hoverlayer;if(r&&r.clear(),!!e){for(var n={inHover:!0,viewWidth:this._width,viewHeight:this._height},i,s=0;s<e;s++){var o=t[s];o.__inHover&&(r||(r=this._hoverlayer=this.getLayer(si)),i||(i=r.ctx,i.save()),De(i,o,n,s===e-1))}i&&i.restore()}},a.prototype.getHoverLayer=function(){return this.getLayer(si)},a.prototype.paintOne=function(t,e){zl(t,e)},a.prototype._paintList=function(t,e,r,n){if(this._redrawId===n){r=r||!1,this._updateLayerStatus(t);var i=this._doPaintList(t,e,r),s=i.finished,o=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),o&&this._paintHoverList(t),s)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;Fl(function(){l._paintList(t,e,r,n)})}}},a.prototype._compositeManually=function(){var t=this.getLayer(Yt).ctx,e=this._domRoot.width,r=this._domRoot.height;t.clearRect(0,0,e,r),this.eachBuiltinLayer(function(n){n.virtual&&t.drawImage(n.dom,0,0,e,r)})},a.prototype._doPaintList=function(t,e,r){for(var n=this,i=[],s=this._opts.useDirtyRect,o=0;o<this._zlevelList.length;o++){var l=this._zlevelList[o],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||r)&&i.push(u)}for(var c=!0,h=!1,d=function(p){var g=i[p],y=g.ctx,b=s&&g.createRepaintRects(t,e,v._width,v._height),x=r?g.__startIndex:g.__drawIndex,w=!r&&g.incremental&&Date.now,S=w&&Date.now(),C=g.zlevel===v._zlevelList[0]?v._backgroundColor:null;if(g.__startIndex===g.__endIndex)g.clear(!1,C,b);else if(x===g.__startIndex){var _=t[x];(!_.incremental||!_.notClear||r)&&g.clear(!1,C,b)}x===-1&&(console.error("For some unknown reason. drawIndex is -1"),x=g.__startIndex);var P,k=function(I){var N={inHover:!1,allClipped:!1,prevEl:null,viewWidth:n._width,viewHeight:n._height};for(P=x;P<g.__endIndex;P++){var z=t[P];if(z.__inHover&&(h=!0),n._doPaintEl(z,g,s,I,N,P===g.__endIndex-1),w){var Z=Date.now()-S;if(Z>15)break}}
3N.prevElClipPaths&&y.restore()};if(b)if(b.length===0)P=g.__endIndex;else for(var A=v.dpr,L=0;L<b.length;++L){var R=b[L];y.save(),y.beginPath(),y.rect(R.x*A,R.y*A,R.width*A,R.height*A),y.clip(),k(R),y.restore()}else y.save(),k(),y.restore();g.__drawIndex=P,g.__drawIndex<g.__endIndex&&(c=!1)},v=this,f=0;f<i.length;f++)d(f);return ft.wxa&&O(this._layers,function(p){p&&p.ctx&&p.ctx.draw&&p.ctx.draw()}),{finished:c,needsRefreshHover:h}},a.prototype._doPaintEl=function(t,e,r,n,i,s){var o=e.ctx;if(r){var l=t.getPaintRect();(!n||l&&l.intersect(n))&&(De(o,t,i,s),t.setPrevPaintRect(l))}else De(o,t,i,s)},a.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=Yt);var r=this._layers[t];return r||(r=new $a("zr_"+t,this,this.dpr),r.zlevel=t,r.__builtin__=!0,this._layerConfig[t]?wt(r,this._layerConfig[t],!0):this._layerConfig[t-We]&&wt(r,this._layerConfig[t-We],!0),e&&(r.virtual=e),this.insertLayer(t,r),r.initContext()),r},a.prototype.insertLayer=function(t,e){var r=this._layers,n=this._zlevelList,i=n.length,s=this._domRoot,o=null,l=-1;if(!r[t]&&Qd(e)){if(i>0&&t>n[0]){for(l=0;l<i-1&&!(n[l]<t&&n[l+1]>t);l++);o=r[n[l]]}if(n.splice(l+1,0,t),r[t]=e,!e.virtual)if(o){var u=o.dom;u.nextSibling?s.insertBefore(e.dom,u.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom);e.painter||(e.painter=this)}},a.prototype.eachLayer=function(t,e){for(var r=this._zlevelList,n=0;n<r.length;n++){var i=r[n];t.call(e,this._layers[i],i)}},a.prototype.eachBuiltinLayer=function(t,e){for(var r=this._zlevelList,n=0;n<r.length;n++){var i=r[n],s=this._layers[i];s.__builtin__&&t.call(e,s,i)}},a.prototype.eachOtherLayer=function(t,e){for(var r=this._zlevelList,n=0;n<r.length;n++){var i=r[n],s=this._layers[i];s.__builtin__||t.call(e,s,i)}},a.prototype.getLayers=function(){return this._layers},a.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(h,d){h.__dirty=h.__used=!1});function e(h){i&&(i.__endIndex!==h&&(i.__dirty=!0),i.__endIndex=h)}if(this._singleCanvas)for(var r=1;r<t.length;r++){var n=t[r];if(n.zlevel!==t[r-1].zlevel||n.incremental){this._needsManuallyCompositing=!0;break}}var i=null,s=0,o,l;for(l=0;l<t.length;l++){var n=t[l],u=n.zlevel,c=void 0;o!==u&&(o=u,s=0),n.incremental?(c=this.getLayer(u+jd,this._needsManuallyCompositing),
3c.incremental=!0,s=1):c=this.getLayer(u+(s>0?We:0),this._needsManuallyCompositing),c.__builtin__||Vl("ZLevel "+u+" has been used by unkown layer "+c.id),c!==i&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,e(l),i=c),n.__dirty&Qa&&!n.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}e(l),this.eachBuiltinLayer(function(h,d){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},a.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},a.prototype._clearLayer=function(t){t.clear()},a.prototype.setBackgroundColor=function(t){this._backgroundColor=t,O(this._layers,function(e){e.setUnpainted()})},a.prototype.configLayer=function(t,e){if(e){var r=this._layerConfig;r[t]?wt(r[t],e,!0):r[t]=e;for(var n=0;n<this._zlevelList.length;n++){var i=this._zlevelList[n];if(i===t||i===t+We){var s=this._layers[i];wt(s,r[t],!0)}}}},a.prototype.delLayer=function(t){var e=this._layers,r=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],r.splice(xt(r,t),1))},a.prototype.resize=function(t,e){if(this._domRoot.style){var r=this._domRoot;r.style.display="none";var n=this._opts,i=this.root;if(t!=null&&(n.width=t),e!=null&&(n.height=e),t=Le(i,0,n),e=Le(i,1,n),r.style.display="",this._width!==t||e!==this._height){r.style.width=t+"px",r.style.height=e+"px";for(var s in this._layers)this._layers.hasOwnProperty(s)&&this._layers[s].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(Yt).resize(t,e)}return this},a.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},a.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},a.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[Yt].dom;var e=new $a("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var r=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var n=e.dom.width,i=e.dom.height;this.eachLayer(function(h){h.__builtin__?r.drawImage(h.dom,0,0,n,i):h.renderToCanvas&&(r.save(),h.renderToCanvas(r),r.restore())})}else for(var s={inHover:!1,viewWidth:this._width,viewHeight:this._height},o=this.storage.getDisplayList(!0),l=0,u=o.length;l<u;l++){var c=o[l];De(r,c,s,l===u-1)}return e.dom},a.prototype.getWidth=function(){return this._width},a.prototype.getHeight=function(){return this._height},a}();function ev(a){a.registerPainter("canvas",tv)}const av={id:"match-trend-container"},rv={class:"match-trend-team home"},nv={key:1,class:"match-trend-container match-trend-loading-container"},oi="M277.077333 87.466667l469.333334-1.877334A64 64 0 0 1 810.666667 149.589333V874.666667a64 64 0 0 1-64 64h-469.333334A64 64 0 0 1 213.333333 874.666667V151.466667a64 64 0 0 1 63.744-64z",iv='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path d="M511.98464 512.01536m-511.98464 0a511.98464 511.98464 0 1 0 1023.969281 0 511.98464 511.98464 0 1 0-1023.969281 0Z" fill="#FFFFFF"></path><path d="M489.764507 1023.488015l-19.045829-1.126366a513.725388 513.725388 0 0 1-133.116006-28.875934 503.792886 503.792886 0 0 1-95.433937-46.385808l-6.143816-3.788686a432.524624 432.524624 0 0 1-14.540364-9.625312L219.129426 931.842765a408.154155 408.154155 0 0 1-13.311601-9.420518l-5.939021-4.710258a326.543804 326.543804 0 0 1-9.318121-7.270182l-6.6558-5.529434A512.496625 512.496625 0 0 1 35.019749 698.480166L32.459826 695.305861l0.102397-3.379099-3.686289-10.034899A508.810336 508.810336 0 0 1 0 512.01536a511.98464 511.98464 0 1 1 534.204774 511.472655L511.98464 1024l-22.220133-0.511985zM511.98464 42.730238c-125.948222 0-240.427987 49.66251-324.700659 130.453686l-3.583892 5.734228-75.364139 93.488396a466.929992 466.929992 0 0 0-65.534034 228.65234l136.495105 47.00019 89.904503 231.826645-82.32713 70.
3653881a469.285121 469.285121 0 0 0 794.292971-328.079758l-34.302971-8.806136-78.436047-221.177364 15.359539-66.762797A468.568343 468.568343 0 0 0 511.98464 42.730238zM635.475336 647.179305l217.798266 26.827995-35.838925 193.837385-219.33422 93.590792-125.641031-130.760877L635.475336 647.179305zM531.644851 80.617101l167.009389 155.643331-137.211883 196.602102-255.275542-48.638541-7.782167-219.743807 233.260203-83.965481z" fill="#354679"></path></svg>',sv=yt({__name:"MatchTrend",props:{matchId:{},teamAlignment:{default:"vertical"}},setup(a){const t={home:[0,-22],away:[0,25]},e=(w,S)=>{const C=S||document.documentElement;return getComputedStyle(C).getPropertyValue(w).trim()};we([ev,sc,gd,qd,Nd]);const r=a,n=Pt(null),{data:i,isLoading:s}=eu(F(()=>r.matchId)),{data:o}=ya(F(()=>r.matchId)),{data:l}=Wt(F(()=>r.matchId)),u=F(()=>{var w;return(w=i.value)!=null&&w.data?[...(i.value.data[0]||[]).map((S,C)=>[C,S]),...(i.value.data[1]||[]).map((S,C)=>[C+45,S])]:[]}),c=F(()=>{var w;return(w=o.value)!=null&&w.incidents?o.value.incidents.filter(S=>[E.Goal,E.Corner,E.YellowCard,E.RedCard,E.Penalty,E.OwnGoal].includes(S.type)):[]}),h=F(()=>e("--match-trend-home",n.value)||"#2196f3"),d=F(()=>e("--match-trend-away",n.value)||"#ffba5b"),v=F(()=>e("--match-trend-text",n.value)||"rgba(255, 255, 255, 0.05)"),f=F(()=>e("--match-trend-grid",n.value)||"rgba(255, 255, 255, 0.05)"),p=`<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path d="${oi}" fill="#FEBD33" stroke="#000000" stroke-width="32"></path></svg>`,g=`<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path d="${oi}" fill="#ef4444" stroke="#000000" stroke-width="32"></path></svg>`,y={goal:`image://data:image/svg+xml;utf8,${encodeURIComponent(iv)}`,yellowCard:`image://data:image/svg+xml;utf8,${encodeURIComponent(p)}`,redCard:`image://data:image/svg+xml;utf8,${encodeURIComponent(g)}`},b=F(()=>{const w=[];return c.value.forEach(S=>{var V;let C="",_=14;const P=la[S.type]||"Event",k=S.position===1,A=k?115:-100,L=S.add_time??0,R=S.time-L,I=L>0&&R<=45,N=L>0&&R>45,z=I?45:S.time;let Z=`${S.time}'`;I?Z=`45+${L}'`:N&&(Z=`90+${L}'`);let tt=S.player_name;switch(!tt&&((V=l.value)!=null&&V.match)&&(tt=k?l.value.match.homeTeam:l.value.match.guestTeam),S.type){case E.Goal:case E.Penalty:case E.OwnGoal:C=y.goal,_=14;break;case E.Corner:break;case E.YellowCard:C=y.yellowCard,_=14;break;case E.RedCard:C=y.redCard,_=14;break}C?w.push({coord:[z,A],value:"",symbol:C,symbolSize:_,name:P,symbolOffset:k?t.home:t.away,customData:{actor:tt||"Unknown",time:Z,type:S.type,eventName:P,isHome:k},itemStyle:{opacity:1},label:{show:!1}}):S.type===E.Corner&&w.push({coord:[z,A],value:"🚩",name:P,symbolOffset:k?[0,-10]:[0,10],customData:{actor:tt||"Unknown",time:Z,type:S.type,eventName:P},symbol:"circle",symbolSize:1,label:{show:!0,formatter:"🚩",fontSize:14,offset:[0,0]},itemStyle:{color:"transparent"}})}),w}),x=F(()=>{var S;const w=((S=i.value)==null?void 0:S.data.flat().length)||90;return{tooltip:{trigger:"item",confine:!0,formatter:C=>{if(C.componentType==="markPoint"){const _=C.data.customData;return`
4              <div style="font-family: sans-serif; min-width: 150px;">
5                <div style="display: flex; align-items: center; margin-bottom: 4px;">
6                    <span style="font-size: 16px;">${C.value}</span>
7                    <span style="font-weight: bold; font-size: 14px; color: #fff;">${_.eventName}</span>
8                </div>
9                <div style="display: flex; align-items: center; justify-content: space-between;">
10                    <span style="font-size: 12px; color: #cbd5e1; margin-right: 12px;">${_.actor}</span>
11                    <div style="background-color: ${_.isHome?h.value:d.value}; color: #fff; padding: 2px 6px; border-radius: 4px; font-weight: bold; font-size: 12px;">
12                        ${_.time}
13                    </div>
14                </div>
15              </div>
16            `}return""},backgroundColor:"#0f172a",borderColor:"#1e293b",textStyle:{color:"#fff"},padding:8},grid:{left:10,right:10,top:50,bottom:40,show:!0,backgroundColor:f.value,borderWidth:0},xAxis:{type:"value",min:0,max:w>
1690?w:90,interval:15,show:!0,offset:15,axisLine:{show:!0},axisTick:{show:!1},axisLabel:{show:!0,color:v.value,fontSize:10,margin:8,interval:0,formatter:C=>C===45?"HT":C===w?"FT":C+"'"},splitLine:{show:!0,interval:15,lineStyle:{color:"rgba(255, 255, 255, 0.1)",type:"solid"}},splitNumber:6},yAxis:{type:"value",min:-160,max:160,show:!1,splitLine:{show:!1}},series:[{type:"bar",data:u.value,barCategoryGap:"10%",tooltip:{show:!1},itemStyle:{color:C=>C.value[1]>=0?h.value:d.value,borderRadius:0},markArea:{silent:!0,itemStyle:{color:v.value},data:[[{yAxis:100},{yAxis:-100}]]},markLine:{silent:!0,symbol:"none",label:{show:!1},data:[{yAxis:0,lineStyle:{color:"#64748b",width:1}},{yAxis:100,lineStyle:{color:"rgba(255, 255, 255, 0.1)",width:1}},{yAxis:-100,lineStyle:{color:"rgba(255, 255, 255, 0.1)",width:1}}]},markPoint:{symbol:"circle",symbolSize:1,label:{show:!0,position:"inside"},data:b.value,tooltip:{show:!0}}}]}});return(w,S)=>{var C,_,P,k,A;return M(),T("div",av,[(C=B(i))!=null&&C.data?(M(),T("div",{key:0,class:"match-trend-container",ref_key:"matchTrendContainer",ref:n},[m("div",rv,D((P=(_=B(l))==null?void 0:_.match)==null?void 0:P.homeTeam),1),m("div",{class:X(["match-trend-team away",a.teamAlignment])},D((A=(k=B(l))==null?void 0:k.match)==null?void 0:A.guestTeam),3),H(B(Gl),{class:"match-trend-chart",option:x.value,autoresize:"",style:{width:"100%",height:"160px"}},null,8,["option"])],512)):B(s)?(M(),T("div",nv,[...S[0]||(S[0]=[m("div",{class:"match-trend-loading-content"},[m("div",{class:"match-trend-spinner"}),m("span",{class:"match-trend-loading-text"},"Đang tải...")],-1)])])):$("",!0)])}}});/**
17 * @license lucide-vue-next v0.563.0 - ISC
18 *
19 * This source code is licensed under the ISC license.
20 * See the LICENSE file in the root directory of this source tree.
21 */const ov=_a("droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]]);/**
22 * @license lucide-vue-next v0.563.0 - ISC
23 *
24 * This source code is licensed under the ISC license.
25 * See the LICENSE file in the root directory of this source tree.
26 */const lv=_a("gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
27 * @license lucide-vue-next v0.563.0 - ISC
28 *
29 * This source code is licensed under the ISC license.
30 * See the LICENSE file in the root directory of this source tree.
31 */const uv=_a("thermometer",[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]]);/**
32 * @license lucide-vue-next v0.563.0 - ISC
33 *
34 * This source code is licensed under the ISC license.
35 * See the LICENSE file in the root directory of this source tree.
36 */const cv=_a("wind",[["path",{d:"M12.8 19.6A2 2 0 1 0 14 16H2",key:"148xed"}],["path",{d:"M17.5 8a2.5 2.5 0 1 1 2 4H2",key:"1u4tom"}],["path",{d:"M9.8 4.4A2 2 0 1 1 11 8H2",key:"75valh"}]]),hv={key:0,class:"match-info-wrapper"},dv={class:"info-header"},vv={class:"league-name"},fv={class:"match-card"},pv={class:"stick-box home-stick pc-only"},mv=["fill"],gv={class:"center-box"},yv={class:"team-section home"},_v={class:"team-logo-wrapper"},xv={key:0,class:"team-rank"},bv={class:"center-info"},wv={class:"center-top"},Sv={class:"match-time"},Cv={key:0,class:"score-display"},Mv={class:"score-main"},Tv={key:0,class:"score-note"},kv={key:1,class:"score-note"},Av={key:1,class:"status-display"},Dv={class:"days-remaining"},Lv={class:"center-bottom"},Iv={class:"team-section away"},Pv={class:"team-logo-wrapper"},Ov={key:0,class:"team-rank"},Ev={class:"stick-box away-stick pc-only"},Bv=["fill"],Nv={key:1,class:"loading"},Rv=yt({__name:"MatchInfo",props:{matchId:{}},setup(a){const t=Wl(),e=a,r=F(()=>e.matchId),{data:n,isLoading:i}=Wt(r),s=F(()=>{var k;return(k=n.value)!=null&&k.match?Hi(n.value.match):void 0}),o=F(()=>{var k;return(k=n.value)==null?void 0:k.league}),l=F(()=>{var k;return(k=s.value)!=null&&k.matchTime?Nt.utc(s.value.matchTime).local().format("YYYY-MM-DD HH:mm"):""}),u=F(()=>t.canGoBack()),c=F(()=>"VS"),h=F(()=>{var k,A;return((k=s.value)==null?void 0:k.MatchState)!==0&&((A=s.value)==null?void 0:A.MatchState)!==void 0}),d=F(()=>Qr("--wpsport-home",document.getElementById("wp-sport-app"))),v=F(()=>Qr("--wpsport-away",document.getElementById("wp-sport-app"))),f=F(()=>{var k,A;return((k=s.value)==null?void 0:k.HomeOverTimeScore)??((A=s.value)==null?void 0:A.HomeScore)}),p=F(()=>{var k,A;return((k=s.value)==null?void 0:k.GuestOverTimeScore)??((A=s.value)==null?void 0:A.GuestScore)}),g=F(()=>{var k,A;return((k=s.value)==null?void 0:k.HomeOverTimeScore)!==void 0&&((A=s.value)==null?void 0:A.GuestOverTimeScore)!==void 0&&(s.value.HomeOverTimeScore!==s.value.HomeScore||s.value.GuestOverTimeScore!==s.value.GuestScore)}),y=F(()=>{var k,A;return(((k=s.value)==null?void 0:k.Home_Pen)??0)>0||(((A=s.value)==null?void 0:A.Guest_Pen)??0)>0}
36),b=F(()=>{var k,A;return!h.value||f.value===void 0||p.value===void 0?!1:f.value!==p.value?f.value>p.value:(((k=s.value)==null?void 0:k.Home_Pen)??0)>(((A=s.value)==null?void 0:A.Guest_Pen)??0)}),x=F(()=>{var k,A;return!h.value||f.value===void 0||p.value===void 0?!1:f.value!==p.value?p.value>f.value:(((k=s.value)==null?void 0:k.Guest_Pen)??0)>(((A=s.value)==null?void 0:A.Home_Pen)??0)}),w=Pt(Nt());let S;const C=F(()=>{var A;const k=(A=s.value)==null?void 0:A.MatchState;return k===dt.FirstHalf||k===dt.SecondHalf||k===dt.ExtraTime});xr(C,k=>{clearInterval(S),S=void 0,k&&(w.value=Nt(),S=setInterval(()=>{w.value=Nt()},1e3))},{immediate:!0}),Kl(()=>clearInterval(S));const _=F(()=>{var A,L,R;const k=w.value;switch((A=s.value)==null?void 0:A.MatchState){case dt.NotStarted:return"";case dt.Finished:return"FT";case dt.FirstHalf:{const I=Nt.utc((L=s.value)==null?void 0:L.matchTime).local(),N=Math.floor(k.diff(I,"minute"));return N>45?`45+${N-45}'`:N>0?`${N}'`:"Hiệp 1"}case dt.HalfTimeBreak:return"HT";case dt.SecondHalf:{const I=Nt.utc((R=s.value)==null?void 0:R.matchTime2).local(),N=Math.floor(k.diff(I,"minute"))+45;return N>90?`90+${N-90}'`:N>45?`${N}'`:"Hiệp 2"}case dt.ExtraTime:return"Hiệp phụ";case dt.Penalty:return"Pen";case dt.Postponed:case dt.Cancelled:case dt.TBD:case dt.Interrupted:case dt.Terminated:return"Hoãn";default:return""}}),P=F(()=>_.value.includes("'"));return(k,A)=>s.value&&o.value?(M(),T("div",hv,[m("div",dv,[A[1]||(A[1]=m("span",{class:"sport-icon"},"⚽",-1)),m("button",{class:X(["sport-name btn-back",{"btn-back-active":u.value}]),onClick:A[0]||(A[0]=L=>B(t).goBack())}," Quay lại ",2),A[2]||(A[2]=m("span",{class:"divider"},"›",-1)),m("span",vv,D(o.value.leagueName),1)]),m("div",fv,[m("div",pv,[(M(),T("svg",{"data-v-b733a94a":"",width:"158",height:"112",viewBox:"0 0 158 112",fill:d.value,xmlns:"http://www.w3.org/2000/svg"},[...A[3]||(A[3]=[m("path",{"data-v-b733a94a":"",d:"M0 0H137L82.6838 112H0V0Z"},null,-1),m("path",{"data-v-b733a94a":"",opacity:"0.8",d:"M140 0H147L93 112H86L140 0Z"},null,-1),m("path",{"data-v-b733a94a":"",opacity:"0.5",d:"M150 0H157L103 112H96L150 0Z"},null,-1)])],8,mv)),H(et,{src:s.value.HomeImage,alt:s.value.homeTeam,"image-size":"sm",class:"team-logo"},null,8,["src","alt"])]),m("div",gv,[m("div",yv,[m("span",{class:X(["team-name",{lose:x.value}])},D(s.value.homeTeam),3),m("div",_v,[H(et,{src:s.value.HomeImage,alt:s.value.homeTeam,"image-size":"sm",class:"team-logo"},null,8,["src","alt"]),s.value.Home_OrderEn?(M(),T("span",xv,"["+D(s.value.Home_OrderEn)+"]",1)):$("",!0)])]),m("div",bv,[m("div",wv,[m("div",Sv,D(l.value),1)]),h.value?(M(),T("div",Cv,[m("div",Mv,[m("span",{class:X(["score",{lose:x.value}])},D(f.value),3),A[4]||(A[4]=m("span",{class:"vs"},"-",-1)),m("span",{class:X(["score",{lose:b.value}])},D(p.value),3)]),g.value?(M(),T("div",Tv," (Hiệp phụ, FT: "+D(s.value.HomeScore)+"-"+D(s.value.GuestScore)+") ",1)):$("",!0),y.value?(M(),T("div",kv," (Luân lưu: "+D(s.value.Home_Pen)+"-"+D(s.value.Guest_Pen)+") ",1)):$("",!0)])):(M(),T("div",Av,[m("span",Dv,D(c.value),1)])),m("div",Lv,[P.value?(M(),T(G,{key:0},[jt(D(_.value.replace("'","")),1),A[5]||(A[5]=m("span",{class:"minute-symbol"},"'",-1))],64)):(M(),T(G,{key:1},[jt(D(_.value),1)],64))])]),m("div",Iv,[m("div",Pv,[H(et,{src:s.value.GuestImage,alt:s.value.guestTeam,"image-size":"sm",class:"team-logo"},null,8,["src","alt"]),s.value.Guest_OrderEn?(M(),T("span",Ov,"["+D(s.value.Guest_OrderEn)+"]",1)):$("",!0)]),m("span",{class:X(["team-name",{lose:b.value}])},D(s.value.guestTeam),3)])]),m("div",Ev,[(M(),T("svg",{"data-v-b733a94a":"",width:"158",height:"112",viewBox:"0 0 158 112",fill:v.value,xmlns:"http://www.w3.org/2000/svg"},[...A[6]||(A[6]=[m("path",{"data-v-b733a94a":"",d:"M158 0H21L75.3162 112H158V0Z"},null,-1),m("path",{"data-v-b733a94a":"",opacity:"0.8",d:"M18 0H11L65 112H72L18 0Z"},null,-1),m("path",{"data-v-b733a94a":"",opacity:"0.5",d:"M8 0H1L55 112H62L8 0Z"},null,-1)])],8,Bv)),H(et,{src:s.value.GuestImage,alt:s.value.guestTeam,"image-size":"sm",class:"team-logo"},null,8,["src","alt"])])])])):B(i)?(M(),T("div",Nv)):$("",!0)}}),$v=lt(Rv,[["__scopeId","data-v-45965604"]]),Hv={},zv={viewBox:"0 0 1024 1024",class:"icon svg-icon","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg"};function Fv(a,t){return M(),T("svg",zv,[...t[0]||(t[0]=[m("path",{d:"M42.64 933.3l322.93-320s286.87-85.36 572.71 324.75L42.57 933.3z",fill:"#64B78D"},null,-1),m("path",{d:"M339.02 773.19a148.48 148.48 0 0 1 96.55 80.75H254.68l84.26-80.75zm41.4-39.72l51.71-49.44-35.47-37.01-269.31 258.12h645.92v-51.2H490.5a199.75 199.75 0 0 0-110.08-120.47z",fill:"#FFFFFF"},null,-1),m("path",{d:"M133.19 898.85h51.64V403.02H133.12v495.76z",fill:"#E5E2E2"},null,-1),m("path",{d:"M631.81 435.2L133.12 42.64V435.2h498.69z",fill:"#F44B4B"},null,-1)])])}const Vv=lt(Hv,[["render",Fv]]),Gv={class:"match-stats"},Wv={key:0,class:"loading"},Uv={key:0,class:"stat-row ball-possession"},Yv={class:"stat-value home"},Zv={class:"stat-title"},Xv={class:"stat-value away"},Kv={key:1,class:"progress-bar-container",style:{height:"8px"}},qv={class:"icon-stats-row"},jv={class:"icon-stats home"},Qv={class:"icon-value"},Jv={class:"icon-stats away"},tf={class:"icon-value"},ef={class:"stat-row"},af={class:"stat-value home"},rf={class:"stat-title"},nf={class:"stat-value away"},sf={class:"progress-bar-container"}
36,of=yt({__name:"MatchStatsShort",props:{matchId:{}},setup(a){const t=a,{data:e,isLoading:r}=ya(t.matchId),n=[E.BallPossession,E.Attacks,E.DangerousAttack,E.ShotsOnTarget,E.ShotsOffTarget],i=[E.YellowCard,E.RedCard,E.Corner];function s(h,d){const v=h+d;if(v===0)return{a:"0%",b:"0%",aNum:0,bNum:0};const f=Math.round(h/v*100),p=Math.round(d/v*100);return{a:`${f}%`,b:`${p}%`,aNum:f,bNum:p}}const o=F(()=>{var d,v;const h=new Map;if(!((v=(d=e.value)==null?void 0:d.half_team_stats)!=null&&v.ft))return h;for(const f of e.value.half_team_stats.ft)h.set(f.type,{home:f.home,away:f.away});return h}),l=F(()=>i.map(h=>{const d=o.value.get(h);return{type:h,homeValue:(d==null?void 0:d.home)??0,guestValue:(d==null?void 0:d.away)??0}}).sort((h,d)=>h.type-d.type)),u=F(()=>n.map(h=>{const d=o.value.get(h),v=(d==null?void 0:d.home)??0,f=(d==null?void 0:d.away)??0,p=s(v,f),g=h===E.BallPossession;return{type:h,title:la[h]??"",homeValue:g?p.a:v,guestValue:g?p.b:f,homePercent:p.aNum,guestPercent:p.bNum}}).filter(h=>h.title));function c(h){switch(h){case E.Corner:return Vv;case E.RedCard:return be;case E.YellowCard:return xe;default:return null}}return(h,d)=>(M(),T("div",Gv,[B(r)?(M(),T("div",Wv,"Đang tải...")):B(e)?(M(),T(G,{key:1},[u.value.length>0?(M(),T("div",Uv,[m("span",Yv,D(u.value[0].homeValue),1),m("span",Zv,D(u.value[0].title),1),m("span",Xv,D(u.value[0].guestValue),1)])):$("",!0),u.value.length>0?(M(),T("div",Kv,[m("div",{class:"progress-bar home",style:ct({width:u.value[0].homePercent+"%"})},null,4),m("div",{class:"progress-bar away",style:ct({width:u.value[0].guestPercent+"%"})},null,4)])):$("",!0),m("div",qv,[m("div",jv,[(M(!0),T(G,null,rt(l.value,v=>(M(),T("span",{class:"icon-stat",key:v.type},[(M(),_t(Jr(c(v.type)),{class:"stat-icon",style:ct({transform:v.type===B(E).Corner?"":"rotate(10deg)"})},null,8,["style"])),m("span",Qv,D(v.homeValue),1)]))),128))]),m("div",Jv,[(M(!0),T(G,null,rt(l.value,v=>(M(),T("span",{class:"icon-stat",key:v.type},[m("span",tf,D(v.guestValue),1),(M(),_t(Jr(c(v.type)),{class:"stat-icon",style:ct({transform:v.type===B(E).Corner?"":"rotate(10deg)"})},null,8,["style"]))]))),128))])]),(M(!0),T(G,null,rt(u.value.slice(1),v=>(M(),T(G,{key:v.type},[m("div",ef,[m("span",af,D(v.homeValue),1),m("span",rf,D(v.title),1),m("span",nf,D(v.guestValue),1)]),m("div",sf,[m("div",{class:"progress-bar home",style:ct({width:v.homePercent+"%"})},null,4),m("div",{class:"progress-bar away",style:ct({width:v.guestPercent+"%"})},null,4)])],64))),128))],64)):$("",!0)]))}}),lf=lt(of,[["__scopeId","data-v-bca174a0"]]),uf={key:0,class:"env-info"},cf={class:"env-list"},hf={class:"env-item"},df={class:"env-wrapper"},vf={class:"env-icon temp-icon"},ff={class:"env-content"},pf={class:"env-value"},mf={class:"env-item"},gf={class:"env-wrapper"},yf={class:"env-icon humidity-icon"},_f={class:"env-content"},xf={class:"env-value"},bf={class:"env-item"},wf={class:"env-wrapper"},Sf={class:"env-icon wind-icon"},Cf={class:"env-content"},Mf={class:"env-value"},Tf={class:"env-item"},kf={class:"env-wrapper"},Af={class:"env-icon pressure-icon"},Df={class:"env-content"},Lf={class:"env-value"},If=yt({__name:"MatchEnvInfo",props:{matchId:{}},setup(a){const t=a,{data:e}=Wt(t.matchId);return(r,n)=>{var i;return(i=B(e))!=null&&i.environment?(M(),T("div",uf,[m("ul",cf,[m("li",hf,[m("div",df,[m("div",vf,[H(B(uv),{size:20})]),m("div",ff,[n[0]||(n[0]=m("p",{class:"env-label"},"Nhiệt độ",-1)),m("p",pf,D(B(e).environment.temperature),1)])])]),m("li",mf,[m("div",gf,[m("div",yf,[H(B(ov),{size:20})]),m("div",_f,[n[1]||(n[1]=m("p",{class:"env-label"},"Độ ẩm",-1)),m("p",xf,D(B(e).environment.humidity),1)])])]),m("li",bf,[m("div",wf,[m("div",Sf,[H(B(cv),{size:20})]),m("div",Cf,[n[2]||(n[2]=m("p",{class:"env-label"},"Tốc độ gió",-1)),m("p",Mf,D(B(e).environment.wind),1)])])]),m("li",Tf,[m("div",kf,[m("div",Af,[H(B(lv),{size:20})]),m("div",Df,[n[3]||(n[3]=m("p",{class:"env-label"},"Áp suất",-1)),m("p",Lf,D(B(e).environment.pressure),1)])])])])])):$("",!0)}}}),Pf=lt(If,[["__scopeId","data-v-bff6361f"]]),Of={},Ef={viewBox:"0 0 1024 1024",class:"icon svg-icon","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg"};function Bf(a,t){return M(),T("svg",Ef,[...t[0]||(t[0]=[m("path",{d:"M585.14 950.93a329.14 329.14 0 1 0 0-658.36 329.14 329.14 0 0 0 0 658.36z",fill:"#FFFFFF"},null,-1),m("path",{d:"M106.2 7.31a65.83 65.83 0 0 0-48.71 110.08L215.99 291.84l75.78-68.9-102.92-113.23H1002.06V7.31H106.2zM972.8 621.71a387.66 387.66 0 1 1-775.31 0 387.66 387.66 0 0 1 775.31 0zm-204.65 263.39a318.39 318.39 0 0 0 116.08-147.31l-55.52-90.7-117.03-6.22-68.02 109.28 31.45 99.25 93.04 35.69zM409.2 798.06l12.8 99.47c26.26 15.44 54.13 28.6 85.14 36.14 22.6 5.56 45.64 8.26 68.68 8.92l63.49-78.63-33.35-105.32-122.01-30.75-74.75 69.17zm212.11-424.01l-61.44-71.68a318.98 318.98 0 0 0-199.31 89.31l13.17 111.25 103.79 47.84 111.69-45.35 32.1-131.37zm219.43 236.18l54.64-64.07a321.54 321.54 0 0 0-35.84-90.7 318.17 318.17 0 0 0-108.98-107l
36-93.7 38.91-30.28 123.39 77.82 92.16 136.34 7.31zm-571.25-49.37a317.81 317.81 0 0 0 27.87 203.12l77.68 14.56 93.26-86.67-7.9-107.6-120.83-55.74-70.08 32.33z",fill:"#F44B4B"},null,-1)])])}const Ha=lt(Of,[["render",Bf]]),Nf={},Rf={viewBox:"0 0 1024 1024",class:"icon svg-icon","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg"};function $f(a,t){return M(),T("svg",Rf,[...t[0]||(t[0]=[m("path",{d:"M512 950.93a329.14 329.14 0 1 0 0-658.28 329.14 329.14 0 0 0 0 658.28z",fill:"#FFFFFF"},null,-1),m("path",{d:"M146.29 7.31A124.34 124.34 0 0 0 21.94 131.66v219.43h102.4v-219.43a21.94 21.94 0 0 1 21.94-21.94h731.43a21.94 21.94 0 0 1 21.94 21.94v219.43h102.4v-219.43a124.34 124.34 0 0 0-124.34-124.35H146.29z m753.37 614.4a387.66 387.66 0 1 1-775.31 0 387.66 387.66 0 0 1 775.31 0z m-204.65 263.39a318.39 318.39 0 0 0 116.08-147.31l-55.52-90.7-117.03-6.22-68.02 109.28 31.45 99.25 93.04 35.7zM337.04 798.67l12.8 99.47c26.26 15.44 54.13 28.6 85.14 36.14 22.6 5.56 45.64 8.26 68.68 8.92l63.49-78.63-33.35-105.32-122.01-30.75-74.75 69.17zm212.11-424.01l-61.44-71.68a318.98 318.98 0 0 0-199.31 89.31l13.17 111.25 103.79 47.84 111.69-45.35 32.1-131.37zm219.43 236.18l54.64-64.07a321.54 321.54 0 0 0-35.84-90.7 318.17 318.17 0 0 0-108.98-107l-93.7 38.91-30.28 123.39 77.82 92.16 136.34 7.31zm-571.25-49.37a317.81 317.81 0 0 0 27.87 203.12l77.68 14.56 93.26-86.67-7.9-107.6-120.83-55.74-70.08 32.33z",fill:"#52C162"},null,-1)])])}const za=lt(Nf,[["render",$f]]),Hf={},zf={viewBox:"0 0 1024 1024",class:"icon svg-icon","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg"};function Ff(a,t){return M(),T("svg",zf,[...t[0]||(t[0]=[m("path",{d:"M512 950.93a329.14 329.14 0 1 0 0-658.28 329.14 329.14 0 0 0 0 658.28z",fill:"#FFFFFF"},null,-1),m("path",{d:"M146.29 7.31A124.34 124.34 0 0 0 21.94 131.66v219.43h102.4v-219.43a21.94 21.94 0 0 1 21.94-21.94h731.43a21.94 21.94 0 0 1 21.94 21.94v219.43h102.4v-219.43a124.34 124.34 0 0 0-124.34-124.35H146.29z m753.37 614.4a387.66 387.66 0 1 1-775.31 0 387.66 387.66 0 0 1 775.31 0z m-204.65 263.39a318.39 318.39 0 0 0 116.08-147.31l-55.52-90.7-117.03-6.22-68.02 109.28 31.45 99.25 93.04 35.7zM337.04 798.67l12.8 99.47c26.26 15.44 54.13 28.6 85.14 36.14 22.6 5.56 45.64 8.26 68.68 8.92l63.49-78.63-33.35-105.32-122.01-30.75-74.75 69.17zm212.11-424.01l-61.44-71.68a318.98 318.98 0 0 0-199.31 89.31l13.17 111.25 103.79 47.84 111.69-45.35 32.1-131.37zm219.43 236.18l54.64-64.07a321.54 321.54 0 0 0-35.84-90.7 318.17 318.17 0 0 0-108.98-107l-93.7 38.91-30.28 123.39 77.82 92.16 136.34 7.31zm-571.25-49.37a317.81 317.81 0 0 0 27.87 203.12l77.68 14.56 93.26-86.67-7.9-107.6-120.83-55.74-70.08 32.33z",fill:"#52C162"},null,-1),m("path",{d:"M660.48 831.93a61.44 61.44 0 0 1-43.67-18.07L512 709.05l-104.81 104.81a61.51 61.51 0 0 1-87.33 0 61.81 61.81 0 0 1 0-87.26l104.81-104.81-104.81-104.81a61.81 61.81 0 0 1 43.67-105.47c16.46 0 31.96 6.44 43.59 18.14L512 534.45l104.89-104.81a61.29 61.29 0 0 1 43.59-18.14 61.81 61.81 0 0 1 43.67 105.4l-104.81 104.81 104.81 104.81a61.81 61.81 0 0 1-43.67 105.33z",fill:"#E43434"},null,-1),m("path",{d:"M660.48 822.71a52.44 52.44 0 0 0 37.08-89.6L586.24 621.79l111.32-111.4a52.52 52.52 0 0 0-74.17-74.24L512 547.55 400.6 436.15a52.3 52.3 0 0 0-74.17 0 52.52 52.52 0 0 0 0 74.24l111.32 111.4-111.32 111.32a52.44 52.44 0 1 0 74.24 74.24L512 696.03l111.32 111.32c10.24 10.24 23.7 15.36 37.16 15.36z",fill:"#FFFFFF"},null,-1)])])}const Fa=lt(Hf,[["render",Ff]]),Vf={},Gf={viewBox:"0 0 1024 1024",class:"icon svg-icon","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg"};function Wf(a,t){return M(),T("svg",Gf,[...t[0]||(t[0]=[m("path",{d:"M626.75 237.34v154.98L917.39 196.09l-290.5-196.09v110.03H401.9C249.1 110.1 124.91 243.29 124.91 406.99c0 63.69 19.46 126.8 54.98 177.64v.07l29.12 41.83 35.88-36.24 28.83-29.05 24.18-24.69-19.1-28.61a183.45 183.45 0 0 1-30.14-100.95c0-93.54 68.78-169.65 153.24-169.65H626.75z",fill:"#009C5F"},null,-1),m("path",{d:"M787.54 440.1l13.94 17.5.07.07c37.76 47.57 58.75 106.76 58.75 166.6 0 152-129.85 275.68-289.48 275.68H236.9V815.28h333.93c111.62 0 202.33-85.62 202.33-190.93 0-39.73-13.51-79.31-38.13-111.55l-11.91-15.61 14.74-13.07 32.9-29.12 16.7-14.82z",fill:"#E74C5B"},null,-1),m("path",{d:"M818.04 444.46l-27.74-35.15-33.55 29.78-32.9 29.05-29.49 26.14 23.89 31.3c21.79 28.54 33.7 63.62 33.7 98.77 0 93.54-81.19 169.65-181.05 169.65H386.8V627.47L96.3 825.74l290.5 198.34v-102.84h184.03c171.25 0 310.54-133.19 310.54-296.89 0-64.64-22.51-128.4-63.33-179.67v-.21z",fill:"#E74C5B"},null,-1),m("path",{d:"M532.04 653.62h-72.62V544.68h-108.94v-72.62h108.94V363.12h72.62v108.94h108.94v72.62h-108.94v108.94z",fill:"#E74C5B"},null,-1)])])}const Va=lt(Vf,[["render",Wf]]),Uf={key:0,class:"match-events"},Yf={class:"events-timeline"},Zf={class:"event-home"},Xf={key:0,class:"mobile-time"},Kf={key:1,class:"event-card"},qf={class:"goal-score"},jf={class:"player-name"},Qf={class:"goal-score"},Jf={class:"player-name"},tp={class:"goal-score"},ep={class:"player-name"},ap={class:"player-name"},rp={class:"player-name"},np={class:"player-name"},ip={class:"sub-info"},sp={class:"sub-in"},op={class:"sub-out"},lp={class:"event-center"}
36,up={key:0,class:"halftime-marker"},cp={key:1,class:"halftime-marker"},hp={key:2,class:"time-marker"},dp={class:"event-away"},vp={key:0,class:"event-card"},fp={class:"player-name"},pp={class:"goal-score"},mp={class:"player-name"},gp={class:"goal-score"},yp={class:"player-name"},_p={class:"goal-score"},xp={class:"player-name"},bp={class:"player-name"},wp={class:"player-name"},Sp={class:"sub-info"},Cp={class:"sub-in"},Mp={class:"sub-out"},Tp={key:1,class:"mobile-time"},kp={class:"events-legend"},Ap={class:"legend-item"},Dp={class:"legend-item"},Lp={class:"legend-item"},Ip={class:"legend-item"},Pp={class:"legend-item"},Op=yt({__name:"MatchEvents",props:{matchId:{}},setup(a){const t=a,{data:e}=Wt(t.matchId),{data:r}=ya(t.matchId),n=[E.Goal,E.OwnGoal,E.YellowCard,E.RedCard,E.Substitution,E.HalftimeScore,E.Midfield,E.End,E.Penalty,E.PenaltyMissed],i=F(()=>{var S;return(S=r.value)!=null&&S.incidents?r.value.incidents.filter(C=>n.includes(C.type)).sort((C,_)=>_.time-C.time):[]});function s(S){return S.position===1}function o(S){return S.position===2}function l(S){return S.add_time?`${S.time}+${S.add_time}`:String(S.time)}function u(S){return S.type===E.Goal}function c(S){return S.type===E.Penalty}function h(S){return S.type===E.OwnGoal}function d(S){return S.type===E.PenaltyMissed}function v(S){return S.type===E.Substitution}function f(S){return S.type===E.YellowCard}function p(S){return S.type===E.RedCard}function g(S){return S.type===E.HalftimeScore||S.type===E.Midfield}function y(S){return S.type===E.End}function b(){var _,P,k,A;const S=((P=(_=e.value)==null?void 0:_.match)==null?void 0:P.HomeHalfScore)??0,C=((A=(k=e.value)==null?void 0:k.match)==null?void 0:A.GuestHalfScore)??0;return`HT ${S}-${C}`}function x(){var _,P,k,A;const S=((P=(_=e.value)==null?void 0:_.match)==null?void 0:P.HomeScore)??0,C=((A=(k=e.value)==null?void 0:k.match)==null?void 0:A.GuestScore)??0;return`FT ${S}-${C}`}function w(S){return`${S.home_score??0}-${S.away_score??0}`}return(S,C)=>i.value.length>0?(M(),T("div",Uf,[m("div",Yf,[(M(!0),T(G,null,rt(i.value,(_,P)=>(M(),T("div",{key:P,class:X(["event-row",{"event-row-score":y(_)||g(_)}])}
36,[m("div",Zf,[s(_)&&!g(_)&&!y(_)?(M(),T("span",Xf,D(l(_))+"'",1)):$("",!0),s(_)?(M(),T("div",Kf,[u(_)?(M(),T(G,{key:0},[m("span",qf,D(w(_)),1),m("span",jf,D(_.player_name),1),H(pe,{class:"event-icon"})],64)):c(_)?(M(),T(G,{key:1},[m("span",Qf,D(w(_)),1),m("span",Jf,D(_.player_name),1),H(za,{class:"event-icon"})],64)):h(_)?(M(),T(G,{key:2},[m("span",tp,D(w(_)),1),m("span",ep,D(_.player_name),1),H(Ha,{class:"event-icon"})],64)):d(_)?(M(),T(G,{key:3},[m("span",ap,D(_.player_name),1),H(Fa,{class:"event-icon"})],64)):f(_)?(M(),T(G,{key:4},[m("span",rp,D(_.player_name),1),H(xe,{class:"card-icon"})],64)):p(_)?(M(),T(G,{key:5},[m("span",np,D(_.player_name),1),H(be,{class:"card-icon"})],64)):v(_)?(M(),T(G,{key:6},[m("div",ip,[m("div",sp,"Vào: "+D(_.in_player_name),1),m("div",op,"Ra: "+D(_.out_player_name),1)]),H(Va,{class:"sub-icon"})],64)):$("",!0)])):$("",!0)]),m("div",lp,[y(_)?(M(),T("div",up,D(x()),1)):g(_)?(M(),T("div",cp,D(b()),1)):l(_)?(M(),T("div",hp,D(l(_)),1)):$("",!0)]),m("div",dp,[o(_)?(M(),T("div",vp,[u(_)?(M(),T(G,{key:0},[H(pe,{class:"event-icon"}),m("span",fp,D(_.player_name),1),m("span",pp,D(w(_)),1)],64)):c(_)?(M(),T(G,{key:1},[H(za,{class:"event-icon"}),m("span",mp,D(_.player_name),1),m("span",gp,D(w(_)),1)],64)):h(_)?(M(),T(G,{key:2},[H(Ha,{class:"event-icon"}),m("span",yp,D(_.player_name),1),m("span",_p,D(w(_)),1)],64)):d(_)?(M(),T(G,{key:3},[H(Fa,{class:"event-icon"}),m("span",xp,D(_.player_name),1)],64)):f(_)?(M(),T(G,{key:4},[H(xe,{class:"card-icon"}),m("span",bp,D(_.player_name),1)],64)):p(_)?(M(),T(G,{key:5},[H(be,{class:"card-icon"}),m("span",wp,D(_.player_name),1)],64)):v(_)?(M(),T(G,{key:6},[H(Va,{class:"sub-icon"}),m("div",Sp,[m("div",Cp,"In: "+D(_.in_player_name),1),m("div",Mp,"Out: "+D(_.out_player_name),1)])],64)):$("",!0)])):$("",!0),o(_)&&!g(_)&&!y(_)?(M(),T("span",Tp,D(l(_))+"'",1)):$("",!0)])],2))),128))]),m("div",kp,[m("div",Ap,[H(pe,{class:"legend-icon"}),C[0]||(C[0]=m("span",{class:"legend-label"},"Bàn thắng",-1))]),m("div",Dp,[H(za,{class:"legend-icon"}),C[1]||(C[1]=m("span",{class:"legend-label"},"Penalty",-1))]),m("div",Lp,[H(Ha,{class:"legend-icon"}),C[2]||(C[2]=m("span",{class:"legend-label"},"Phản lưới",-1))]),m("div",Ip,[H(Fa,{class:"legend-icon"}),C[3]||(C[3]=m("span",{class:"legend-label"},"Penalty hỏng",-1))]),m("div",Pp,[H(Va,{class:"legend-icon"}),C[4]||(C[4]=m("span",{class:"legend-label"},"Thay người",-1))])])])):$("",!0)}}),Ep=lt(Op,[["__scopeId","data-v-69243ac0"]]),Bp=yt({__name:"MatchOverview",props:{matchId:{}},setup(a){return(t,e)=>(M(),T(G,null,[H(B(sv),{matchId:a.matchId,teamAlignment:"horizontal"},null,8,["matchId"]),H(lf,{matchId:a.matchId},null,8,["matchId"]),H(Ep,{matchId:a.matchId},null,8,["matchId"]),H(Pf,{matchId:a.matchId},null,8,["matchId"])],64))}}),Np={key:0,class:"h2h-section"},Rp={key:0,class:"section-header"},$p={key:0,class:"filters"},Hp={class:"filter-checkbox"},zp={class:"filter-checkbox"},Fp={class:"matches-table"},Vp={key:0,class:"league-row"},Gp={class:"league-name"},Wp={class:"match-row"},Up={class:"match-date"},Yp={class:"match-time"},Zp={class:"match-teams"},Xp={class:"team-row"},Kp={class:"team-row"},qp={class:"match-scores ht"},jp={class:"score"},Qp={class:"score"},Jp={class:"match-scores ft"},tm={class:"match-result"},em={key:1,class:"show-more-container"},am=yt({__name:"MatchH2HTable",props:{matches:{},currentLeagueId:{},targetTeamId:{},title:{},showFilters:{type:Boolean},filterTeamId:{}},setup(a){const t=a,e=Pt(!1),r=Pt(!1),n=F(()=>{let d=t.matches;return e.value&&t.filterTeamId&&(d=d.filter(v=>v.home.id===t.filterTeamId)),r.value&&t.currentLeagueId&&(d=d.filter(v=>v.competition.id===t.currentLeagueId)),d}),i=Pt(5),s=F(()=>n.value.slice(0,i.value));xr([e,r],()=>{i.value=5});function o(){i.value+=5}function l(d){return Nt(d).format("YYYY-MM-DD")}function u(d){return Nt(d).format("HH:mm")}function c(d){const v=d.home.score,f=d.away.score;return v===f?"D":(t.targetTeamId?d.home.id===t.targetTeamId:!0)?v>f?"W":"L":f>v?"W":"L"}function h(d){switch(d){case"W":return"win";case"D":return"draw";case"L":return"lose"}}return(d,v)=>n.value.length>0?(M(),T("section",Np,[a.title?(M(),T("div",Rp,[m("h3",null,D(a.title),1),a.showFilters?(M(),T("div",$p,[m("label",Hp,[tn(m("input",{type:"checkbox","onUpdate:modelValue":v[0]||(v[0]=f=>e.value=f)},null,512),[[en,e.value]]),v[2]||(v[2]=m("span",null,"Chủ nhà",-1))]),m("label",zp,[t
36n(m("input",{type:"checkbox","onUpdate:modelValue":v[1]||(v[1]=f=>r.value=f)},null,512),[[en,r.value]]),v[3]||(v[3]=m("span",null,"Cùng giải đấu",-1))])])):$("",!0)])):$("",!0),m("div",Fp,[(M(!0),T(G,null,rt(s.value,(f,p)=>{var g;return M(),T(G,{key:f.match_id},[p===0||((g=s.value[p-1])==null?void 0:g.competition.id)!==f.competition.id?(M(),T("div",Vp,[H(et,{src:f.competition.logo,alt:f.competition.name,"image-size":"xs",class:"league-logo"},null,8,["src","alt"]),m("span",Gp,D(f.competition.name),1),v[4]||(v[4]=m("span",{class:"score-header"},"HT",-1)),v[5]||(v[5]=m("span",{class:"score-header"},"FT",-1))])):$("",!0),m("div",Wp,[m("div",Up,[m("div",null,D(l(f.match_time)),1),m("div",Yp,D(u(f.match_time)),1)]),m("div",Zp,[m("div",Xp,[H(et,{src:f.home.logo,alt:f.home.name,"image-size":"sm",class:"team-logo"},null,8,["src","alt"]),m("span",{class:X(["team-name",c(f)==="L"?"lose":""])},D(f.home.name),3)]),m("div",Kp,[H(et,{src:f.away.logo,alt:f.away.name,"image-size":"sm",class:"team-logo"},null,8,["src","alt"]),m("span",{class:X(["team-name",c(f)==="W"?"lose":""])},D(f.away.name),3)])]),m("div",qp,[m("div",jp,D(f.home.ht_score),1),m("div",Qp,D(f.away.ht_score),1)]),m("div",Jp,[m("div",{class:X(["score",c(f)==="W"?"lose":""])},D(f.home.score),3),m("div",{class:X(["score ft",c(f)==="L"?"lose":""])},D(f.away.score),3)]),m("div",tm,[m("span",{class:X(["result-badge",h(c(f))])},D(c(f)),3)])])],64)}),128))]),s.value.length<n.value.length?(M(),T("div",em,[m("button",{class:"show-more-btn",onClick:o},[...v[6]||(v[6]=[jt(" Xem thêm ",-1),m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-chevron-down"},[m("path",{d:"m6 9 6 6 6-6"})],-1)])])])):$("",!0)])):$("",!0)}}),Ga=lt(am,[["__scopeId","data-v-e52dc21e"]]),rm={key:0,class:"match-h2h"},nm=yt({__name:"MatchH2H",props:{matchId:{}},setup(a){const t=a,{data:e}=Jl(t.matchId),{data:r}=Wt(t.matchId),n=F(()=>{var h,d;return((d=(h=r.value)==null?void 0:h.match)==null?void 0:d.sclassID)??null}),i=h=>Xe(h,n.value),s=h=>h.map(d=>{var v,f;return{...d,home:{...d.home,name:Xe((v=d.home)==null?void 0:v.name,n.value)},away:{...d.away,name:Xe((f=d.away)==null?void 0:f.name,n.value)}}}),o=F(()=>{var h;return s(((h=e.value)==null?void 0:h.history.vs)??[])}),l=F(()=>{var h;return s(((h=e.value)==null?void 0:h.history.home)??[])}),u=F(()=>{var h;return s(((h=e.value)==null?void 0:h.history.away)??[])}),c=F(()=>{var h,d;return(d=(h=r.value)==null?void 0:h.league)==null?void 0:d.sclassID});return(h,d)=>{var v,f,p,g,y,b,x,w,S,C,_,P,k,A,L,R;return B(e)?(M(),T("div",rm,[H(Ga,{matches:o.value,targetTeamId:(f=(v=B(r))==null?void 0:v.match)==null?void 0:f.HomeTeamID,currentLeagueId:c.value,filterTeamId:(g=(p=B(r))==null?void 0:p.match)==null?void 0:g.HomeTeamID,showFilters:!0,title:"Đối đầu"},null,8,["matches","targetTeamId","currentLeagueId","filterTeamId"]),H(Ga,{matches:l.value,title:`Thành tích gần đây – ${i((b=(y=B(r))==null?void 0:y.match)==null?void 0:b.homeTeam)}`,showFilters:!0,currentLeagueId:c.value,filterTeamId:(w=(x=B(r))==null?void 0:x.match)==null?void 0:w.HomeTeamID,targetTeamId:(C=(S=B(r))==null?void 0:S.match)==null?void 0:C.HomeTeamID},null,8,["matches","title","currentLeagueId","filterTeamId","targetTeamId"]),H(Ga,{matches:u.value,title:`Thành tích gần đây – ${i((P=(_=B(r))==null?void 0:_.match)==null?void 0:P.guestTeam)}`,showFilters:!0,currentLeagueId:c.value,filterTeamId:(A=(k=B(r))==null?void 0:k.match)==null?void 0:A.GuestTeamID,targetTeamId:(R=(L=B(r))==null?void 0:L.match)==null?void 0:R.GuestTeamID},null,8,["matches","title","currentLeagueId","filterTeamId","targetTeamId"])])):$("",!0)}}}),im=lt(nm,[["__scopeId","data-v-129a8acf"]]),sm={},om={width:"100%",height:"100%",viewBox:"0 0 375 776",fill:"none",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid meet"};function lm(a,t){return M(),T("svg",om,[...t[0]||(t[0]=[br('<g clip-path="url(#clip0_stadium)"><rect width="775.583" height="375" transform="matrix(0 -1 1 0 0 775.583)" fill="#659F33"></rect><g clip-path="url(#clip1_stadium)"><path d="M16.1582 706.017L16.1582 759.425H358.822V706.017H16.1582Z" fill="#2852141E"></path><path d="M16.1582 280.974L16.1582 333.27H358.822V280.974H16.1582Z" fill="#2852141E"></path><path d="M16.1582 600.312L16.1582 653.721H358.822V600.312H16.1582Z" fill="#2852141E"></path><path d="M16.1582 174.158L16.1582 227.567L358.822 227.567V174.158L16.1582 174.158Z" fill="#2852141E"></path><path d="M16.1582 494.61L16.1582 548.018H358.822V494.61H16.1582Z" fill="#2852141E"></path><path d="M16.1582 68.4539L16.1582 121.862L358.822 121.862V68.4539L16.1582 68.4539Z" fill="#2852141E"></path><path d="M16.1582 387.79L16.1582 441.199H358.822V387.79H16.1582Z" fill="#2852141E" fill-opacity="0.125977"></path><path d="M16.8258 758.759L16.8258 16.829H358.174L358.174 758.759H16.8258Z" stroke="#95BF70" stroke-width="1.33521"></path><path d="M242.018 387.793C242.018 357.682 217.61 333.272 187.5 333.272C157.391 333.272 132.982 357.682 132.982 387.793C132.982 417.904 157.391 442.314 187.5 442.314C217.61 442.314 242.018 417.904 242.018 387.793Z" stroke="#95BF70" stroke-width="1.33521"></path><path d="M16.1582 388.289L358.842 387.289" stroke="#95BF70" stroke-width="1.33521"></path><path d="M142.996 759.427V727.16H232.005V759.427H142.996Z" stroke="#95BF70" stroke-width="1.33521"></path><path d="M98.4917 759.426V706.017H276.509V759.426H98.4917Z" stroke="#95BF70" stroke-width="1.33521"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M145.221 706.018H229.78C219.978 692.475 204.684 683.764 187.5 683.764C170.316 683.764 155.022 692.475 145.221 706.018Z" stroke="#95BF70" stroke-width="1.33521"></path><path d="M142.996 16.1587V48.4263L232.004 48.4263V16.1587L142.996 16.1587Z" stroke="#95BF70" stroke-width="1.33521"></path><path d="M98.4912 16.1565V69.5649L276.509 69.5649V16.1565L98.4912 16.1565Z" stroke="#95BF70" stroke-width="1.33521"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M145.221 69.5658H229.779C219.978 83.1088 204.684 91.8193 187.5 91.8193C170.316 91.8193 155.022 83.1088 145.221 69.5658Z" stroke="#95BF70" stroke-width="1.33521"></path><path d="M16.1581 29.5089H15.4905V30.1765L16.1581 30.1765L16.1581 29.5089ZM16.1581 16.1572V15.4896H15.4905V16.1572H16.1581ZM29.5093 16.1572L30.1769 16.1573L30.1769 15.4896H29.5093V16.1572ZM16.8257 29.5089V16.1572H15.4905V29.5089H16.8257ZM16.1581 16.8248H29.5093V15.4896H16.1581V16.8248ZM28.8417 16.1572C28.8412 23.1625 23.1627 28.8412 16.1581 28.8413L16.1581 30.1765C23.9002 30.1764 30.1763 23.8998 30.1769 16.1573L28.8417 16.1572Z" fill="#95BF70"></path><path d="M358.842 29.5089H359.509V30.1765L358.842 30.1765L358.842 29.5089ZM358.842 16.1572V15.4896H359.509V16.1572H358.842ZM345.491 16.1572L344.823 16.1573L344.823 15.4896H345.491V16.1572ZM358.174 29.5089V16.1572H359.509V29.5089H358.174ZM358.842 16.8248H345.491V15.4896H358.842V16.8248ZM346.158 16.1572C346.159 23.1625 351.837 28.8412 358.842 28.8413L358.842 30.1765C351.1 30.1764 344.824 23.8999 344.823 16.1573L346.158 16.1572Z" fill="#95BF70"></path></g></g><defs><clipPath id="clip0_stadium">
36<rect width="775.583" height="375" fill="white" transform="matrix(0 -1 1 0 0 775.583)"></rect></clipPath><clipPath id="clip1_stadium"><rect width="743.268" height="342.684" fill="white" transform="matrix(0 -1 1 0 16.1582 759.425)"></rect></clipPath></defs>',2)])])}const um=lt(sm,[["render",lm]]),cm={class:"stadium-field"},hm={class:"players-container"},dm={class:"player-avatar-wrapper"},vm={key:1,class:"player-goal"},fm={key:2,class:"player-yellow-card"},pm={key:3,class:"player-red-card"},mm={class:"player-info"},gm={key:0,class:"player-captain home"},ym={class:"player-avatar-wrapper"},_m={key:1,class:"player-goal"},xm={key:2,class:"player-yellow-card"},bm={key:3,class:"player-red-card"},wm={class:"player-info"},Sm={key:0,class:"player-captain away"},Cm=yt({__name:"StadiumField",props:{homeLineup:{},awayLineup:{}},setup(a){function t(s,o){const l=s.x+"%",u=o?s.y/2+"%":100-s.y/2+"%";return{left:l,top:u,transform:"translate(-50%, -50%)"}}function e(s){const o=parseFloat(s);return o>=8?"rating-excellent":o>=7?"rating-good":o>=6?"rating-average":"rating-poor"}function r(s){var o;return(o=s.incidents)==null?void 0:o.some(l=>l.type===E.Goal)}function n(s){var o;return(o=s.incidents)==null?void 0:o.some(l=>l.type===E.YellowCard)}function i(s){var o;return(o=s.incidents)==null?void 0:o.some(l=>l.type===E.RedCard)}return(s,o)=>(M(),T("div",cm,[H(um,{class:"stadium-bg"}),m("div",hm,[(M(!0),T(G,null,rt(a.homeLineup,(l,u)=>(M(),T(G,{key:"home-row-"+u},[(M(!0),T(G,null,rt(l,c=>(M(),T("div",{key:c.id,class:"player-marker home",style:ct(t(c,!0))},[m("div",dm,[H(et,{src:c.logo,class:"player-photo"},null,8,["src"]),c.rating?(M(),T("span",{key:0,class:X(["player-rating",e(c.rating)])},D(Number(c.rating).toFixed(1)),3)):$("",!0),r(c)?(M(),T("span",vm,[H(pe)])):$("",!0),n(c)?(M(),T("span",fm,[H(xe)])):$("",!0),i(c)?(M(),T("span",pm,[H(be)])):$("",!0)]),m("div",mm,[c.captain?(M(),T("span",gm,"C")):$("",!0),jt(" #"+D(c.shirt_number)+" "+D(c.name),1)])],4))),128))],64))),128)),(M(!0),T(G,null,rt(a.awayLineup,(l,u)=>(M(),T(G,{key:"away-row-"+u},[(M(!0),T(G,null,rt(l,c=>(M(),T("div",{key:c.id,class:"player-marker away",style:ct(t(c,!1))},[m("div",ym,[H(et,{src:c.logo,class:"player-photo"},null,8,["src"]),c.rating?(M(),T("span",{key:0,class:X(["player-rating",e(c.rating)])},D(Number(c.rating).toFixed(1)),3)):$("",!0),r(c)?(M(),T("span",_m,[H(pe)])):$("",!0),n(c)?(M(),T("span",xm,[H(xe)])):$("",!0),i(c)?(M(),T("span",bm,[H(be)])):$("",!0)]),m("div",wm,[c.captain?(M(),T("span",Sm,"C")):$("",!0),jt(" #"+D(c.shirt_number)+" "+D(c.name),1)])],4))),128))],64))),128))])]))}}),li=lt(Cm,[["__scopeId","data-v-d9ecca0b"]]),Mm={},Tm={viewBox:"0 0 1024 1024",class:"icon svg-icon","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg"};function km(a,t){return M(),T("svg",Tm,[...t[0]||(t[0]=[m("path",{d:"M512 1024A512 512 0 1 0 512 0a512 512 0 0 0 0 1024z",fill:"#009C5F"},null,-1),m("path",{d:"M512 950.86A438.86 438.86 0 1 0 512 73.14a438.86 438.86 0 0 0 0 877.72z m512-438.86A512 512 0 1 1 0 512a512 512 0 0 1 1024 0z",fill:"#FFFFFF","fill-opacity":".6"},null,-1),m("path",{d:"M549.81 804.57a32.91 32.91 0 0 0 32.91-32.91V521.51h80.97a32.91 32.91 0 0 0 27.79-50.83L539.79 234.64a32.91 32.91 0 0 0-55.59 0L332.51 470.67a32.91 32.91 0 0 0 27.79 50.83h80.97v250.15c0 18.14 14.85 32.91 32.99 32.91h75.56z",fill:"#FFFFFF"},null,-1)])])}const Ue=lt(Mm,[["render",km]]),Am={key:0,class:"match-lineup"},Dm={class:"lineup-header desktop-only"},Lm={class:"team-info home"},Im={class:"team-details"},Pm={class:"team-name"},Om={class:"formation"},Em={class:"team-info away"},Bm={class:"team-details"},Nm={class:"team-name"},Rm={class:"formation"},$m={class:"lineup-content desktop-only"},Hm={class:"sidebar home-sidebar"},zm={key:0,class:"coach-section"},Fm={class:"coach-row"},Vm={class:"coach-name"},Gm={key:1,class:"substitutes-section"},Wm={class:"player-number"},Um={class:"player-name"},Ym={class:"player-events"},Zm={key:0,class:"event-badge sub-in"},Xm={class:"event-minute"},Km={class:"stadium-container"},qm={class:"sidebar away-sidebar"},jm={key:0,class:"coach-section"},Qm={class:"coach-row"},Jm={class:"coach-name"},tg={key:1,class:"substitutes-section"},eg={class:"player-number"},ag={class:"player-name"},rg={class:"player-events"},ng={key:0,class:"event-badge sub-in"},ig={class:"event-minute"},sg={class:"mobile-layout mobile-only"},og={class:"mobile-stadium-container"},lg={class:"mobile-team-tabs"},ug={class:"tab-team-name"},cg={class:"tab-team-name"},hg={class:"mobile-team-content"},dg={key:0,class:"team-content"},vg={key:0,class:"coach-section"},fg={class:"coach-row"},pg={class:"coach-name"},mg={key:1,class:"substitutes-section"},gg={class:"player-number"},yg={class:"player-name"},_g={class:"player-events"},xg={key:0,class:"event-badge sub-in"},bg={class:"event-minute"},wg={key:1,class:"team-content"},Sg={key:0,class:"coach-section"},Cg={class:"coach-row"},Mg={class:"coach-name"},Tg={key:1,class:"substitutes-section"},kg={class:"player-number"},Ag={class:"player-name"},Dg={class:"player-events"},Lg={key:0,class:"event-badge sub-in"},Ig={class:"event-minute"}
36,Pg=yt({__name:"MatchLineup",props:{matchId:{}},setup(a){const t=a,{lineupData:e,data:r}=tu(t.matchId),{data:n}=Wt(t.matchId),i=F(()=>{var l;return(l=n.value)!=null&&l.match?Hi(n.value.match):void 0}),s=Pt("home");function o(l){var c;const u=(c=l.incidents)==null?void 0:c.find(h=>h.type===E.Substitution);return(u==null?void 0:u.minute)??null}return(l,u)=>{var c,h,d,v,f,p,g,y,b,x,w,S,C,_,P,k,A,L,R,I,N,z,Z,tt,V,K,Y,W,U,ot,se,Ir,Pr,Or,Er,Br;return B(e)?(M(),T("div",Am,[m("div",Dm,[m("div",Lm,[(h=(c=B(n))==null?void 0:c.match)!=null&&h.HomeImage?(M(),_t(et,{key:0,src:B(n).match.HomeImage,"image-size":"sm",class:"team-logo"},null,8,["src"])):$("",!0),m("div",Im,[m("span",Pm,D((d=i.value)==null?void 0:d.homeTeam),1),m("span",Om,D(B(e).homeFormation),1)])]),m("div",Em,[m("div",Bm,[m("span",Nm,D((v=i.value)==null?void 0:v.guestTeam),1),m("span",Rm,D(B(e).awayFormation),1)]),(p=(f=B(n))==null?void 0:f.match)!=null&&p.GuestImage?(M(),_t(et,{key:0,src:B(n).match.GuestImage,"image-size":"sm",class:"team-logo"},null,8,["src"])):$("",!0)])]),m("div",$m,[m("div",Hm,[(y=(g=B(r))==null?void 0:g.coachs)!=null&&y.home?(M(),T("div",zm,[u[2]||(u[2]=m("div",{class:"wps-section-title"},"Huấn luyện viên",-1)),m("div",Fm,[H(et,{src:(x=(b=B(r))==null?void 0:b.coachs)==null?void 0:x.home.logo,"image-size":"xs",class:"player-avatar"},null,8,["src"]),m("span",Vm,D((S=(w=B(r))==null?void 0:w.coachs)==null?void 0:S.home.name),1)])])):$("",!0),B(e).homeSubstitions.length>0?(M(),T("div",Gm,[u[3]||(u[3]=m("div",{class:"wps-section-title"},"Dự bị",-1)),(M(!0),T(G,null,rt(B(e).homeSubstitions,j=>(M(),T("div",{class:"player-row",key:j.id},[H(et,{src:j.logo,"image-size":"xs",class:"player-avatar"},null,8,["src"]),m("span",Wm,"#"+D(j.shirt_number),1),m("span",Um,D(j.name),1),m("div",Ym,[o(j)?(M(),T("span",Zm,[H(Ue,{class:"event-icon"}),m("span",Xm,D(o(j))+"'",1)])):$("",!0)])]))),128))])):$("",!0)]),m("div",Km,[H(li,{homeLineup:B(e).homeLineup,awayLineup:B(e).awayLineup},null,8,["homeLineup","awayLineup"])]),m("div",qm,[(_=(C=B(r))==null?void 0:C.coachs)!=null&&_.away?(M(),T("div",jm,[u[4]||(u[4]=m("div",{class:"wps-section-title"},"Huấn luyện viên",-1)),m("div",Qm,[H(et,{src:(k=(P=B(r))==null?void 0:P.coachs)==null?void 0:k.away.logo,"image-size":"xs",class:"player-avatar"},null,8,["src"]),m("span",Jm,D((L=(A=B(r))==null?void 0:A.coachs)==null?void 0:L.away.name),1)])])):$("",!0),B(e).awaySubstitions.length>0?(M(),T("div",tg,[u[5]||(u[5]=m("div",{class:"wps-section-title"},"Dự bị",-1)),(M(!0),T(G,null,rt(B(e).awaySubstitions,j=>(M(),T("div",{class:"player-row",key:j.id},[H(et,{src:j.logo,"image-size":"xs",class:"player-avatar"},null,8,["src"]),m("span",eg,"#"+D(j.shirt_number),1),m("span",ag,D(j.name),1),m("div",rg,[o(j)?(M(),T("span",ng,[H(Ue,{class:"event-icon"}),m("span",ig,D(o(j))+"'",1)])):$("",!0)])]))),128))])):$("",!0)])]),m("div",sg,[m("div",og,[H(li,{homeLineup:B(e).homeLineup,awayLineup:B(e).awayLineup},null,8,["homeLineup","awayLineup"])]),m("div",lg,[m("button",{class:X(["team-tab",{active:s.value==="home"}]),onClick:u[0]||(u[0]=j=>s.value="home")},[(I=(R=B(n))==null?void 0:R.match)!=null&&I.HomeImage?(M(),_t(et,{key:0,src:B(n).match.HomeImage,class:"tab-team-logo"},null,8,["src"])):$("",!0),m("span",ug,D((N=i.value)==null?void 0:N.homeTeam),1)],2),m("button",{class:X(["team-tab",{active:s.value==="away"}]),onClick:u[1]||(u[1]=j=>s.value="away")},[(Z=(z=B(n))==null?void 0:z.match)!=null&&Z.GuestImage?(M(),_t(et,{key:0,src:B(n).match.GuestImage,class:"tab-team-logo"},null,8,["src"])):$("",!0),m("span",cg,D((tt=i.value)==null?void 0:tt.guestTeam),1)],2)]),m("div",hg,[s.value==="home"?(M(),T("div",dg,[(K=(V=B(r))==null?void 0:V.coachs)!=null&&K.home?(M(),T("div",vg,[u[6]||(u[6]=m("div",{class:"wps-section-title"},"Huấn luyện viên",-1)),m("div",fg,[H(et,{src:(W=(Y=B(r))==null?void 0:Y.coachs)==null?void 0:W.home.logo,"image-size":"xs",class:"player-avatar"},null,8,["src"]),m("span",pg,D((ot=(U=B(r))==null?void 0:U.coachs)==null?void 0:ot.home.name),1)])])):$("",!0),B(e).homeSubstitions.length>0?(M(),T("div",mg,[u[7]||(u[7]=m("div",{class:"wps-section-title"},"Dự bị",-1)),(M(!0),T(G,null,rt(B(e).homeSubstitions,j=>(M(),T("div",{class:"player-row",key:j.id},[H(et,{src:j.logo,"image-size":"xs",class:"player-avatar"}
36,null,8,["src"]),m("span",gg,"#"+D(j.shirt_number),1),m("span",yg,D(j.name),1),m("div",_g,[o(j)?(M(),T("span",xg,[H(Ue,{class:"event-icon"}),m("span",bg,D(o(j))+"'",1)])):$("",!0)])]))),128))])):$("",!0)])):$("",!0),s.value==="away"?(M(),T("div",wg,[(Ir=(se=B(r))==null?void 0:se.coachs)!=null&&Ir.away?(M(),T("div",Sg,[u[8]||(u[8]=m("div",{class:"wps-section-title"},"Huấn luyện viên",-1)),m("div",Cg,[H(et,{src:(Or=(Pr=B(r))==null?void 0:Pr.coachs)==null?void 0:Or.away.logo,"image-size":"xs",class:"player-avatar"},null,8,["src"]),m("span",Mg,D((Br=(Er=B(r))==null?void 0:Er.coachs)==null?void 0:Br.away.name),1)])])):$("",!0),B(e).awaySubstitions.length>0?(M(),T("div",Tg,[u[9]||(u[9]=m("div",{class:"wps-section-title"},"Dự bị",-1)),(M(!0),T(G,null,rt(B(e).awaySubstitions,j=>(M(),T("div",{class:"player-row",key:j.id},[H(et,{src:j.logo,"image-size":"xs",class:"player-avatar"},null,8,["src"]),m("span",kg,"#"+D(j.shirt_number),1),m("span",Ag,D(j.name),1),m("div",Dg,[o(j)?(M(),T("span",Lg,[H(Ue,{class:"event-icon"}),m("span",Ig,D(o(j))+"'",1)])):$("",!0)])]))),128))])):$("",!0)])):$("",!0)])])])):$("",!0)}}}),Og=lt(Pg,[["__scopeId","data-v-25636a06"]]),Eg={class:"stats-tabs"},Bg={class:"match-stats"},Ng={key:0,class:"loading"},Rg={key:1,class:"stats-content"},$g={class:"section-label"},Hg={class:"section-items"},zg={key:0,class:"stat-item ball-possession"},Fg={class:"stat-header mobile-only"},Vg={class:"stat-title center"},Gg={class:"possession-bar-wrapper mobile-only"},Wg={class:"possession-value"},Ug={class:"possession-value"},Yg={class:"stat-header desktop-only"},Zg={class:"stat-title"},Xg={class:"progress-bar-container desktop-only"},Kg={class:"progress-track"},qg={class:"progress-track"},jg={class:"stat-header"},Qg={class:"stat-title"},Jg={class:"progress-bar-container"},t1={class:"progress-track"},e1={class:"progress-track"},a1={key:0,class:"nested-stats mobile-only"},r1={class:"nested-stat-item home"},n1={class:"nested-stat-item away"},i1=yt({__name:"MatchStats",props:{matchId:{}},setup(a){const t=a,{data:e,isLoading:r}=ya(t.matchId),n=Pt("all"),i=[{label:"Chỉ số nổi bật",types:[E.BallPossession]},{label:"Dứt điểm",types:[E.Shots,E.ShotsOnTarget,E.ShotsOffTarget,E.BlockedShots]},{label:"Tình huống cố định",types:[E.Corner,E.Offside,E.Foul,E.FreeKick]},{label:"Thẻ phạt",types:[E.YellowCard,E.RedCard]},{label:"Chuyền bóng",types:[E.Pass,E.KeyPasses,E.PassSuccess,E.LongPass,E.Cross]},{label:"Rê dắt & tranh chấp",types:[E.Dribble,E.PassBroken,E.DuelSuccess]},{label:"Phòng ngự",types:[E.Tackles,E.Intercept,E.Clearances,E.Save]}],s=[{parent:E.Shots,children:[E.ShotsOffTarget,E.ShotsOnTarget]}];function o(c,h){const d=c+h;if(d===0)return{a:"0%",b:"0%",aNum:0,bNum:0};const v=Math.round(c/d*100),f=Math.round(h/d*100);return{a:`${v}%`,b:`${f}%`,aNum:v,bNum:f}}const l=F(()=>{var d;const c=new Map;if(!((d=e.value)!=null&&d.half_team_stats))return c;let h=[];n.value==="all"?h=e.value.half_team_stats.ft||[]:n.value==="p1"?h=e.value.half_team_stats.p1||[]:h=e.value.half_team_stats.p2||[];for(const v of h)c.set(v.type,{home:v.home,away:v.away});return c}),u=F(()=>{const c=new Set;for(const h of s)for(const d of h.children)c.add(d);return i.map(h=>{const d=[];for(const v of h.types){const f=c.has(v),p=l.value.get(v);if(!p)continue;const g=p.home??0,y=p.away??0,b=o(g,y),x=v===E.BallPossession,w=la[v]??"";if(!w)continue;const S=s.find(_=>_.parent===v),C=[];if(S)for(const _ of S.children){const P=l.value.get(_);if(P){const k=o(P.home??0,P.away??0);C.push({type:_,title:la[_]??"",homeValue:P.home??0,guestValue:P.away??0,homePercent:k.aNum,guestPercent:k.bNum,isBallPossession:!1,isNested:!1,isChild:!0})}}d.push({type:v,title:w,homeValue:x?b.a:g,guestValue:x?b.b:y,homePercent:b.aNum,guestPercent:b.bNum,isBallPossession:x,isNested:C.length>0,children:C.length>0?C:void 0,isChild:f})}return{label:h.label,items:d}}).filter(h=>h.items.length>0)});return(c,h)=>(M(),T(G,null,[m("div",Eg,[m("button",{class:X(["stats-tab",{active:n.value==="all"}]),onClick:h[0]||(h[0]=d=>n.value="all")}," Tất cả ",2),m("button",{class:X(["stats-tab",{active:n.value==="p1"}]),onClick:h[1]||(h[1]=d=>n.value="p1")}," Hiệp 1 ",2),m("button",{class:X(["stats-tab",{active:n.value==="p2"}]),onClick:h[2]||(h[2]=d=>n.value="p2")}," Hiệp 2 ",2)]),m("div",Bg,[B(r)?(M(),T("div",Ng,"Đang tải...")):B(e)?(M(),T("div",Rg,[(M(!0),T(G,null,rt(u.value,(d,v)=>(M(),T(G,{key:v},[m("div",$g,D(d.label),1),m("div",Hg,[(M(!0),T(G,null,rt(d.items,f=>(M(),T(G,{key:f.type},[f.isBallPossession?(M(),T("div",zg,[m("div",Fg,[m("span",Vg,D(f.title),
361)]),m("div",Gg,[m("div",{class:"possession-bar home",style:ct({width:f.homePercent+"%"})},[m("span",Wg,D(f.homeValue),1)],4),m("div",{class:"possession-bar away",style:ct({width:f.guestPercent+"%"})},[m("span",Ug,D(f.guestValue),1)],4)]),m("div",Yg,[m("span",{class:X(["stat-value home",{highlight:f.homePercent>f.guestPercent}])},D(f.homeValue),3),m("span",Zg,D(f.title),1),m("span",{class:X(["stat-value away",{highlight:f.guestPercent>f.homePercent}])},D(f.guestValue),3)]),m("div",Xg,[m("div",Kg,[m("div",{class:X(["progress-bar",f.homePercent>f.guestPercent?"higher":"lower"]),style:ct({width:f.homePercent+"%"})},null,6)]),m("div",qg,[m("div",{class:X(["progress-bar",f.guestPercent>f.homePercent?"higher":"lower"]),style:ct({width:f.guestPercent+"%"})},null,6)])])])):(M(),T("div",{key:1,class:X(["stat-item",{"has-nested":f.isNested,"desktop-only":f.isChild}])},[m("div",jg,[m("span",{class:X(["stat-value home",{highlight:f.homePercent>f.guestPercent}])},D(f.homeValue),3),m("span",Qg,D(f.title),1),m("span",{class:X(["stat-value away",{highlight:f.guestPercent>f.homePercent}])},D(f.guestValue),3)]),m("div",Jg,[m("div",t1,[m("div",{class:X(["progress-bar",f.homePercent>f.guestPercent?"higher":"lower"]),style:ct({width:f.homePercent+"%"})},null,6)]),m("div",e1,[m("div",{class:X(["progress-bar",f.guestPercent>f.homePercent?"higher":"lower"]),style:ct({width:f.guestPercent+"%"})},null,6)])]),f.children&&f.children.length?(M(),T("div",a1,[m("div",r1,[(M(!0),T(G,null,rt(f.children,p=>(M(),T("span",{key:p.type,class:"stat-value highlight home"},D(p.homeValue),1))),128))]),m("div",n1,[(M(!0),T(G,null,rt(f.children,p=>(M(),T("span",{key:p.type,class:"stat-value highlight away"},D(p.guestValue),1))),128))]),h[3]||(h[3]=br('<p class="title-off" data-v-b6a6b04b>Sút ra ngoài</p><p class="title-on" data-v-b6a6b04b>Sút trúng đích</p><i class="goal-frame-background" data-v-b6a6b04b></i><i class="goal-frame-left" data-v-b6a6b04b></i><i class="goal-frame-right" data-v-b6a6b04b></i>',5))])):$("",!0)],2))],64))),128))])],64))),128))])):$("",!0)])],64))}}),s1=lt(i1,[["__scopeId","data-v-b6a6b04b"]]),o1={class:"match-standings"},l1={class:"standings-tabs"},u1=["onClick"],c1={key:0,class:"loading"},h1={key:1,class:"standings-table-wrapper"},d1={class:"standings-table"},v1={class:"col-position"},f1={class:"col-team"},p1={class:"team-cell"},m1={class:"team-name"},g1={class:"col-stat"},y1={class:"col-stat main-stat"},_1={class:"col-stat main-stat"},x1={class:"col-stat main-stat"},b1={class:"col-stat"},w1={class:"col-stat"},S1={class:"col-stat"},C1={class:"col-stat col-points main-stat"},M1={class:"col-form"},T1={class:"form-badges"},k1={key:2,class:"no-data"},A1={key:3,class:"standings-legend"},D1={class:"legend-promotions"},L1={class:"legend-label"},I1=yt({__name:"MatchStandings",props:{matchId:{}},setup(a){const t=a,{data:e}=Wt(t.matchId),{data:r,mapper:n,compareTeams:i,isLoading:s}=Ql(F(()=>{var x;return(x=e.value)==null?void 0:x.match.season_id})),o=Pt("all"),l=[{key:"all",label:"Tất cả"},{key:"home",label:"Chủ"},{key:"away",label:"Khách"}],u=F(()=>{var x;return(x=e.value)==null?void 0:x.match.HomeTeamID}),c=F(()=>{var x;return(x=e.value)==null?void 0:x.match.GuestTeamID}),h=F(()=>{var w;const x=(w=r.value)==null?void 0:w.tables;return x!=null&&x.length?x.length===1?x[0]:x.find(S=>S.rows.some(C=>C.team_id===u.value))??x.find(S=>S.rows.some(C=>C.team_id===c.value))??x[0]:null}),d=F(()=>{const x=h.value;return x?{data_rank:x.rows.map(w=>n(w,"")),data_home:x.rows.map(w=>n(w,"home_")).sort(i),data_guest:x.rows.map(w=>n(w,"away_")).sort(i)}:null}),v=F(()=>{var S;if(!d.value)return[];const x=(()=>{switch(o.value){case"home":return d.value.data_home;case"away":return d.value.data_guest;default:return d.value.data_rank}})(),w=((S=e.value)==null?void 0:S.match.sclassID)??null;return x.map(C=>({...C,name:Xe(C.name,w)}))}),f=x=>x===u.value,p=x=>x===c.value,g=x=>{switch(x.toUpperCase()){case"W":return"result-win";case"D":return"result-draw";case"L":return"result-lose";default:return""}},y=x=>{var S;const w=(S=r.value)==null?void 0:S.promotions.find(C=>C.id===x);return w?w.color:""},b=x=>{const w=y(x);return w?Yl(w):""};return(x,w)=>{var S,C;
36return M(),T("div",o1,[m("div",l1,[(M(),T(G,null,rt(l,_=>m("button",{key:_.key,class:X(["standings-tab",{active:o.value===_.key}]),onClick:P=>o.value=_.key},D(_.label),11,u1)),64))]),B(s)?(M(),T("div",c1,"Đang tải...")):v.value.length?(M(),T("div",h1,[m("table",d1,[w[0]||(w[0]=m("thead",null,[m("tr",null,[m("th",{class:"col-position"},"#"),m("th",{class:"col-team"},"Đội bóng"),m("th",{class:"col-stat"},"Tr"),m("th",{class:"col-stat main-stat"},"T"),m("th",{class:"col-stat main-stat"},"H"),m("th",{class:"col-stat main-stat"},"B"),m("th",{class:"col-stat"},"BT"),m("th",{class:"col-stat"},"BB"),m("th",{class:"col-stat"},"HS"),m("th",{class:"col-stat main-stat col-points"},"Đ"),m("th",{class:"col-form"},"5 trận gần nhất")])],-1)),m("tbody",null,[(M(!0),T(G,null,rt(v.value,(_,P)=>(M(),T("tr",{key:_.team_id,class:X({"highlight-home":f(_.team_id),"highlight-away":p(_.team_id)})},[m("td",v1,[m("span",{class:X(["position-badge",{"has-promotion":_.promotion_id}]),style:ct({backgroundColor:y(_.promotion_id),color:b(_.promotion_id)})},D(P+1),7)]),m("td",f1,[m("div",p1,[H(et,{src:_.logo,alt:_.name,"image-size":"sm",class:"team-logo"},null,8,["src","alt"]),m("span",m1,D(_.name),1)])]),m("td",g1,D(_.total),1),m("td",y1,D(_.won),1),m("td",_1,D(_.draw),1),m("td",x1,D(_.loss),1),m("td",b1,D(_.goals),1),m("td",w1,D(_.goals_against),1),m("td",S1,D(_.goal_diff>0?"+"+_.goal_diff:_.goal_diff),1),m("td",C1,D(_.points),1),m("td",M1,[m("div",T1,[(M(!0),T(G,null,rt(_.history.slice(0,5),(k,A)=>(M(),T("span",{key:A,class:X(["form-badge",g(k)])},D(k.toUpperCase()),3))),128))])])],2))),128))])])])):(M(),T("div",k1,"Chưa có dữ liệu")),(C=(S=B(r))==null?void 0:S.promotions)!=null&&C.length?(M(),T("div",A1,[m("div",D1,[(M(!0),T(G,null,rt(B(r).promotions,_=>{var P;return M(),T("div",{key:_.id,class:"legend-item"},[m("span",{class:"legend-dot",style:ct({backgroundColor:_.color})},null,4),m("span",L1,D(B(Ul)(_.name,(P=B(e))==null?void 0:P.match.sclassID)),1)])}
36),128))]),w[1]||(w[1]=br('<div class="legend-abbreviations" data-v-bdf9bc29><div class="legend-row" data-v-bdf9bc29><span class="abbr-item" data-v-bdf9bc29><strong data-v-bdf9bc29>#:</strong> Thứ hạng</span><span class="abbr-item" data-v-bdf9bc29><strong data-v-bdf9bc29>Tr:</strong> Số trận</span><span class="abbr-item" data-v-bdf9bc29><strong data-v-bdf9bc29>T:</strong> Thắng</span></div><div class="legend-row" data-v-bdf9bc29><span class="abbr-item" data-v-bdf9bc29><strong data-v-bdf9bc29>H:</strong> Hòa</span><span class="abbr-item" data-v-bdf9bc29><strong data-v-bdf9bc29>B:</strong> Thua</span><span class="abbr-item" data-v-bdf9bc29><strong data-v-bdf9bc29>BT:</strong> Bàn thắng</span></div><div class="legend-row" data-v-bdf9bc29><span class="abbr-item" data-v-bdf9bc29><strong data-v-bdf9bc29>BB:</strong> Bàn thua</span><span class="abbr-item" data-v-bdf9bc29><strong data-v-bdf9bc29>HS:</strong> Hiệu số</span><span class="abbr-item" data-v-bdf9bc29><strong data-v-bdf9bc29>Đ:</strong> Điểm</span></div></div>',1))])):$("",!0)])}}}),P1=lt(I1,[["__scopeId","data-v-bdf9bc29"]]),O1={class:"page-container"},E1={class:"page-content"},B1={key:0,class:"state-message"},N1={key:2,class:"tabs-container"},R1=["onClick"],$1={class:"tab-label-full"},H1={class:"tab-label-short"},z1={key:3,class:"tab-content"},F1={key:4,class:"state-message"},V1={key:5,class:"state-message error"},G1={key:6,class:"state-message"},W1=yt({__name:"MatchDetailPage",props:{matchId:{},activeTab:{}},setup(a){const t=a,e=F(()=>t.matchId||""),{data:r,isLoading:n,isError:i,error:s}=Wt(e),o=F(()=>{var v;return(v=r.value)==null?void 0:v.match.season_id}),l=F(()=>!!t.matchId),u=Pt(t.activeTab||"overview"),c=v=>Zl(()=>v===u.value?null:Xl.matchDetailTab(v,e.value,{seasonId:o.value})),h={overview:c("overview"),h2h:c("h2h"),lineup:c("lineup"),stats:c("stats"),standings:c("standings")};xr(()=>t.activeTab,v=>{v&&(u.value=v)});const d=[{key:"overview",label:"Tổng quan",shortLabel:"Tổng quan"},{key:"lineup",label:"Đội hình",shortLabel:"Đội hình"},{key:"stats",label:"Thống kê",shortLabel:"Thống kê"},{key:"h2h",label:"Đối đầu",shortLabel:"H2H"},{key:"standings",label:"Bảng xếp hạng",shortLabel:"BXH"}];return(v,f)=>{var p;return M(),T("div",O1,[m("div",E1,[l.value?$("",!0):(M(),T("div",B1,[...f[0]||(f[0]=[m("p",null,"No match ID provided.",-1),m("p",{class:"hint"},[jt(" Use shortcode "),m("code",null,'[widget12 p="detail" id="YOUR_MATCH_ID"]'),jt(" or navigate from the livescore page. ")],-1)])])),l.value?(M(),_t($v,{key:1,matchId:e.value},null,8,["matchId"])):$("",!0),l.value?(M(),T("div",N1,[(M(),T(G,null,rt(d,g=>m("button",ql({key:g.key,class:["tab-button",{active:u.value===g.key}]},jl(h[g.key]),{onClick:y=>u.value=g.key}),[m("span",$1,D(g.label),1),m("span",H1,D(g.shortLabel),1)],16,R1)),64))])):$("",!0),l.value?(M(),T("div",z1,[u.value==="overview"?(M(),_t(Bp,{key:0,matchId:e.value},null,8,["matchId"])):$("",!0),u.value==="h2h"?(M(),_t(im,{key:1,matchId:e.value},null,8,["matchId"])):$("",!0),u.value==="lineup"?(M(),_t(Og,{key:2,matchId:e.value},null,8,["matchId"])):$("",!0),u.value==="stats"?(M(),_t(s1,{key:3,matchId:e.value},null,8,["matchId"])):$("",!0),u.value==="standings"?(M(),_t(P1,{key:4,matchId:e.value},null,8,["matchId"])):$("",!0)])):B(n)?(M(),T("div",F1,"Đang tải dữ liệu trận đấu...")):B(i)?(M(),T("div",V1," Lỗi khi tải dữ liệu trận đấu. "+D((p=B(s))==null?void 0:p.message),1)):(M(),T("div",G1,"Không tìm thấy dữ liệu."))])])}}}),q1=lt(W1,[["__scopeId","data-v-b03b0a26"]]);export{q1 as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.