From ed4b068127530346345ed16b2e79b33bc5b03d57 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Thu, 8 Jan 2026 16:22:57 +0100 Subject: build: remove webjars and use custom build (#238) --- src/main/resources/static/charts.js | 2 + src/main/resources/static/main.css | 2 + src/main/resources/static/main.js | 2 + src/main/resources/static/scripts.js | 159 ------- src/main/resources/static/style.css | 776 ----------------------------------- 5 files changed, 6 insertions(+), 935 deletions(-) create mode 100644 src/main/resources/static/charts.js create mode 100644 src/main/resources/static/main.css create mode 100644 src/main/resources/static/main.js delete mode 100644 src/main/resources/static/scripts.js delete mode 100644 src/main/resources/static/style.css (limited to 'src/main/resources/static') diff --git a/src/main/resources/static/charts.js b/src/main/resources/static/charts.js new file mode 100644 index 0000000..6117187 --- /dev/null +++ b/src/main/resources/static/charts.js @@ -0,0 +1,2 @@ +(()=>{"use strict";var t,e,n,i,r,o,a,s,l,u,h,c,p,d,f,g,v,y,m,_,x,w,b,S,T,M,k,C,D,I,A,L,P,O,N,R,B,E,z,F,V,H,W,G,U,X,Y,q,Z,j,K,$={};$.d=(t,e)=>{for(var n in e)$.o(e,n)&&!$.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},$.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),$.r=t=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var Q={};$.r(Q),$.d(Q,{drawBarChart:()=>_k,drawPieChart:()=>_M});var J={};$.r(J),$.d(J,{Arc:()=>cT,BezierCurve:()=>cw,BoundingRect:()=>e3,Circle:()=>hj,CompoundPath:()=>cM,Ellipse:()=>hQ,Group:()=>rs,Image:()=>al,IncrementalDisplayable:()=>cF,Line:()=>cv,LinearGradient:()=>cC,OrientedBoundingRect:()=>cE,Path:()=>an,Point:()=>eF,Polygon:()=>cu,Polyline:()=>cp,RadialGradient:()=>cD,Rect:()=>av,Ring:()=>co,Sector:()=>cn,Text:()=>aO,WH:()=>c$,XY:()=>cK,applyTransform:()=>pn,calcZ2Range:()=>pw,clipPointsByRect:()=>po,clipRectByRect:()=>pa,createIcon:()=>ps,ensureCopyRect:()=>pm,ensureCopyTransform:()=>p_,expandOrShrinkRect:()=>ph,extendPath:()=>c0,extendShape:()=>cQ,getShapeClass:()=>c2,getTransform:()=>pe,groupTransition:()=>pr,initProps:()=>cG,isBoundingRectAxisAligned:()=>pv,isElementRemoved:()=>cU,lineLineIntersect:()=>pu,linePolygonIntersect:()=>pl,makeImage:()=>c3,makePath:()=>c5,mergePath:()=>c8,registerShape:()=>c1,removeElement:()=>cX,removeElementWithFadeOut:()=>cq,resizePath:()=>c6,retrieveZInfo:()=>px,setTooltipConfig:()=>pd,subPixelOptimize:()=>pt,subPixelOptimizeLine:()=>c9,subPixelOptimizeRect:()=>c7,transformDirection:()=>pi,traverseElements:()=>pg,traverseUpdateZ:()=>pb,updateProps:()=>cW});var tt=function(t,e){return(tt=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function te(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var tn=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},ti=new function(){this.browser=new tn,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="u">typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(ti.wxa=!0,ti.touchEventsSupported=!0):"u"typeof self?ti.worker=!0:!ti.hasGlobalWindow||"Deno"in window||"u">typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Node.js")>-1?(ti.node=!0,ti.svgSupported=!0):function(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);if(i&&(n.firefox=!0,n.version=i[1]),r&&(n.ie=!0,n.version=r[1]),o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18),a&&(n.weChat=!0),e.svgSupported="u">typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="u">typeof document){var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}}(navigator.userAgent,ti);var tr="sans-serif",to="12px "+tr,ta=function(t){var e={};if("u"typeof document&&document.createElement("canvas")},measureText:function(n,i){if(!t){var r=ts.createCanvas();t=r&&r.getContext("2d")}if(t)return e!==i&&(e=t.font=i||to),t.measureText(n);n=n||"",i=i||to;var o=/((?:\d+)?\.?\d*)px/.exec(i),a=o&&+o[1]||12,s=0;if(i.indexOf("mono")>=0)s=a*n.length;else for(var l=0;ltypeof console&&console.error.apply(console,t)}function tw(t){if(null==t||"object"!=typeof t)return t;var e=t,n=th.call(t);if("[object Array]"===n){if(!t[tQ]){e=[];for(var i=0,r=t.length;i>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",r[u]+":0",i[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return e.clearMarkers=function(){tD(n,function(t){t.parentNode&&t.parentNode.removeChild(t)})},n}(e,o),o,r);if(a)return a(t,n,i),!0}return!1}function ey(t){return"CANVAS"===t.nodeName.toUpperCase()}var em=/([&<>"'])/g,e_={"&":"&","<":"<",">":">",'"':""","'":"'"};function ex(t){return null==t?"":(t+"").replace(em,function(t,e){return e_[e]})}var ew=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,eb=[],eS=ti.browser.firefox&&39>+ti.browser.version.split(".")[0];function eT(t,e,n,i){return n=n||{},i?eM(t,e,n):eS&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):eM(t,e,n),n}function eM(t,e,n){if(ti.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(ey(t)){var o=t.getBoundingClientRect();n.zrX=i-o.left,n.zrY=r-o.top;return}if(ev(eb,t,i,r)){n.zrX=eb[0],n.zrY=eb[1];return}}n.zrX=n.zrY=0}function ek(t){return t||window.event}function eC(t,e,n){if(null!=(e=ek(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&eT(t,r,e,n)}else{eT(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;return null==n||null==i?e:3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&ew.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}var eD=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0},eI=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o1&&i&&i.length>1){var o=eA(i)/eA(r);isFinite(o)||(o=1),e.pinchScale=o;var a=[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=a[0],e.pinchY=a[1],{type:"pinch",target:t[0].target,event:e}}}}};function eP(){return[1,0,0,1,0,0]}function eO(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function eN(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function eR(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function eB(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function eE(t,e,n,i){void 0===i&&(i=[0,0]);var r=e[0],o=e[2],a=e[4],s=e[1],l=e[3],u=e[5],h=Math.sin(n),c=Math.cos(n);return t[0]=r*c+s*h,t[1]=-r*h+s*c,t[2]=o*c+l*h,t[3]=-o*h+c*l,t[4]=c*(a-i[0])+h*(u-i[1])+i[0],t[5]=c*(u-i[1])-h*(a-i[0])+i[1],t}function ez(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}let eF=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}();var eV=Math.min,eH=Math.max,eW=Math.abs,eG=["x","y"],eU=["width","height"],eX=new eF,eY=new eF,eq=new eF,eZ=new eF,ej=e5(),eK=ej.minTv,e$=ej.maxTv,eQ=[0,0],eJ=function(){function t(e,n,i,r){t.set(this,e,n,i,r)}return t.set=function(t,e,n,i,r){return i<0&&(e+=i,i=-i),r<0&&(n+=r,r=-r),t.x=e,t.y=n,t.width=i,t.height=r,t},t.prototype.union=function(t){var e=eV(t.x,this.x),n=eV(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=eH(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=eH(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e,n,i,r=t.width/this.width,o=t.height/this.height,a=eP();return eB(a,a,[-this.x,-this.y]),n=(e=[r,o])[0],i=e[1],a[0]=a[0]*n,a[1]=a[1]*i,a[2]=a[2]*n,a[3]=a[3]*i,a[4]=a[4]*n,a[5]=a[5]*i,eB(a,a,[t.x,t.y]),a},t.prototype.intersect=function(e,n,i){return t.intersect(this,e,n,i)},t.intersect=function(e,n,i,r){i&&eF.set(i,0,0);var o=r&&r.outIntersectRect||null,a=r&&r.clamp;if(o&&(o.x=o.y=o.width=o.height=NaN),!e||!n)return!1;e instanceof t||(e=t.set(e0,e.x,e.y,e.width,e.height)),n instanceof t||(n=t.set(e1,n.x,n.y,n.width,n.height));var s=!!i;ej.reset(r,s);var l=ej.touchThreshold,u=e.x+l,h=e.x+e.width-l,c=e.y+l,p=e.y+e.height-l,d=n.x+l,f=n.x+n.width-l,g=n.y+l,v=n.y+n.height-l;if(u>h||c>p||d>f||g>v)return!1;var y=!(h=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},t.prototype.contain=function(e,n){return t.contain(this,e,n)},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){return t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t},t.applyTransform=function(e,n,i){if(!i){e!==n&&t.copy(e,n);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];e.x=n.x*r+a,e.y=n.y*o+s,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}eX.x=eq.x=n.x,eX.y=eZ.y=n.y,eY.x=eZ.x=n.x+n.width,eY.y=eq.y=n.y+n.height,eX.transform(i),eZ.transform(i),eY.transform(i),eq.transform(i),e.x=eV(eX.x,eY.x,eq.x,eZ.x),e.y=eV(eX.y,eY.y,eq.y,eZ.y);var l=eH(eX.x,eY.x,eq.x,eZ.x),u=eH(eX.y,eY.y,eq.y,eZ.y);e.width=l-e.x,e.height=u-e.y},t}(),e0=new eJ(0,0,0,0),e1=new eJ(0,0,0,0);function e2(t,e,n,i,r,o,a,s){var l=eW(e-n),u=eW(i-t),h=eV(l,u),c=eG[r],p=eG[1-r],d=eU[r];e=u||!ej.bidirectional)&&(eK[c]=-u,eK[p]=0,ej.useDir&&ej.calcDirMTV())))}function e5(){var t=0,e=new eF,n=new eF,i={minTv:new eF,maxTv:new eF,useDir:!1,dirMinTv:new eF,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(r,o){i.touchThreshold=0,r&&null!=r.touchThreshold&&(i.touchThreshold=eH(0,r.touchThreshold)),i.negativeSize=!1,o&&(i.minTv.set(1/0,1/0),i.maxTv.set(0,0),i.useDir=!1,r&&null!=r.direction&&(i.useDir=!0,i.dirMinTv.copy(i.minTv),n.copy(i.minTv),t=r.direction,i.bidirectional=null==r.bidirectional||!!r.bidirectional,i.bidirectional||e.set(Math.cos(t),Math.sin(t))))},calcDirMTV:function(){var o=i.minTv,a=i.dirMinTv,s=o.y*o.y+o.x*o.x,l=Math.sin(t),u=Math.cos(t),h=l*o.y+u*o.x;if(r(h)){r(o.x)&&r(o.y)&&a.set(0,0);return}(n.x=s*u/h,n.y=s*l/h,r(n.x)&&r(n.y))?a.set(0,0):(i.bidirectional||e.dot(n)>0)&&n.len()eW(t)}return i}let e3=eJ;var e4="silent";function e8(){eD(this.event)}var e6=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return t9(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(eh),e9=function(t,e){this.x=t,this.y=e},e7=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],nt=new e3(0,0,0,0),ne=function(t){function e(e,n,i,r,o){var a=t.call(this)||this;return a._hovered=new e9(0,0),a.storage=e,a.painter=n,a.painterRoot=r,a._pointerSize=o,i=i||new e6,a.proxy=null,a.setHandlerProxy(i),a._draggingMgr=new eu(a),a}return t9(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(tD(e7,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=ni(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new e9(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new e9(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r,o="on"+e,a={type:e,event:n,target:(r=t).target,topTarget:r.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:e8};i&&(i[o]&&(a.cancelBubble=!!i[o].call(i,a)),i.trigger(e,a),i=i.__hostTarget?i.__hostTarget:i.parent,!a.cancelBubble););!a.cancelBubble&&(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(t){"function"==typeof t[o]&&t[o].call(t,a),t.trigger&&t.trigger(e,a)}))}},e.prototype.findHover=function(t,e,n){var i=this.storage.getDisplayList(),r=new e9(t,e);if(nn(i,r,t,e,n),this._pointerSize&&!r.target){for(var o=[],a=this._pointerSize,s=a/2,l=new e3(t-s,e-s,a,a),u=i.length-1;u>=0;u--){var h=i[u];h===n||h.ignore||h.ignoreCoarsePointer||h.parent&&h.parent.ignoreCoarsePointer||(nt.copy(h.getBoundingRect()),h.transform&&nt.applyTransform(h.transform),nt.intersect(l)&&o.push(h))}if(o.length){for(var c=Math.PI/12,p=2*Math.PI,d=0;d=0;o--){var a=t[o],s=void 0;if(a!==r&&!a.ignore&&(s=function(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1}i.silent&&(r=!0);var s=i.__hostTarget;i=s?i.ignoreHostSilent?null:s:i.parent}return!r||e4}return!1}(a,n,i))&&(e.topTarget||(e.topTarget=a),s!==e4)){e.target=a;break}}}function ni(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}function nr(t,e,n,i){var r=e+1;if(r===n)return 1;if(0>i(t[r++],t[e])){for(;ri(t[r],t[r-1]);)r++;var o=t,a=e,s=r;for(s--;a=0;)r++;return r-e}function no(t,e,n,i,r){for(i===e&&i++;ir(a,t[o=s+l>>>1])?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function na(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;l=o(t,e[n+r-l]);)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function ns(t,e,n,i,r,o){var a=0,s=0,l=1;if(0>o(t,e[n+r])){for(s=r+1;lo(t,e[n+r-l]);)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);0>o(t,e[n+h])?l=h:a=h+1}return l}function nl(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(r<2)){var o=0;if(r<32){o=nr(t,n,i,e),no(t,n,i,n+o,e);return}var a=function(t,e){var n,i,r=7,o=0,a=[];function s(s){var l=n[s],u=i[s],h=n[s+1],c=i[s+1];i[s]=u+c,s===o-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),o--;var p=ns(t[h],t,l,u,0,e);l+=p,0==(u-=p)||0!==(c=na(t[l+u-1],t,h,c,c-1,e))&&(u<=c?function(n,i,o,s){var l,u,h,c=0;for(c=0;ce(t[d],a[p])){if(t[f++]=t[d++],u++,l=0,0==--s){h=!0;break}}else if(t[f++]=a[p++],l++,u=0,1==--i){h=!0;break}while((l|u)=7||u>=7);if(h)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(c=0;c=0;l--)t[d+l]=t[p+l];t[c]=a[h];return}for(var f=r;;){var g=0,v=0,y=!1;do if(0>e(a[h],t[u])){if(t[c--]=t[u--],g++,v=0,0==--i){y=!0;break}}else if(t[c--]=a[h--],v++,g=0,1==--s){y=!0;break}while((g|v)=0;l--)t[d+l]=t[p+l];if(0===i){y=!0;break}}if(t[c--]=a[h--],1==--s){y=!0;break}if(0!=(v=s-na(t[u],a,0,s,s-1,e))){for(c-=v,h-=v,s-=v,d=c+1,p=h+1,l=0;l=7||v>=7);if(y)break;f<0&&(f=0),f+=2}if((r=f)<1&&(r=1),1===s){for(c-=i,u-=i,d=c+1,p=u+1,l=i-1;l>=0;l--)t[d+l]=t[p+l];t[c]=a[h]}else if(0===s)throw Error();else for(l=0,p=c-(s-1);l1;){var t=o-2;if(t>=1&&i[t-1]<=i[t]+i[t+1]||t>=2&&i[t-2]<=i[t]+i[t-1])i[t-1]i[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&i[t-1]=32;)e|=1&t,t>>=1;return t+e}(r);do{if((o=nr(t,n,i,e))s&&(l=s),no(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}tD(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){ne.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,a=ni(this,r,o);if("mouseup"===t&&a||(i=(n=this.findHover(r,o)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||en(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}});var nu=!1;function nh(){nu||(nu=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function nc(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var np=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=nc}return t.prototype.traverse=function(t,e){for(var n=0;n=0&&this._roots.splice(i,1)},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}();h=ti.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var nd={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(t-=1))*Math.sin(2*Math.PI*(t-e)/.4)))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin(2*Math.PI*(t-e)/.4)+1)},elasticInOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),(t*=2)<1)?-.5*(n*Math.pow(2,10*(t-=1))*Math.sin(2*Math.PI*(t-e)/.4)):n*Math.pow(2,-10*(t-=1))*Math.sin(2*Math.PI*(t-e)/.4)*.5+1},backIn:function(t){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){return(t*=2)<1?t*t*(3.5949095*t-2.5949095)*.5:.5*((t-=2)*t*(3.5949095*t+2.5949095)+2)},bounceIn:function(t){return 1-nd.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*nd.bounceIn(2*t):.5*nd.bounceOut(2*t-1)+.5}},nf=Math.pow,ng=Math.sqrt,nv=ng(3),ny=1/3,nm=t7(),n_=t7(),nx=t7();function nw(t){return t>-1e-8&&t<1e-8}function nb(t){return t>1e-8||t<-1e-8}function nS(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function nT(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function nM(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*a*l,c=s*l-9*a*u,p=l*l-3*s*u,d=0;if(nw(h)&&nw(c))if(nw(s))o[0]=0;else{var f=-l/s;f>=0&&f<=1&&(o[d++]=f)}else{var g=c*c-4*h*p;if(nw(g)){var v=c/h,f=-s/a+v,y=-v/2;f>=0&&f<=1&&(o[d++]=f),y>=0&&y<=1&&(o[d++]=y)}else if(g>0){var m=ng(g),_=h*s+1.5*a*(-c+m),x=h*s+1.5*a*(-c-m),f=(-s-((_=_<0?-nf(-_,ny):nf(_,ny))+(x=x<0?-nf(-x,ny):nf(x,ny))))/(3*a);f>=0&&f<=1&&(o[d++]=f)}else{var w=Math.acos((2*h*s-3*a*c)/(2*ng(h*h*h)))/3,b=ng(h),S=Math.cos(w),f=(-s-2*b*S)/(3*a),y=(-s+b*(S+nv*Math.sin(w)))/(3*a),T=(-s+b*(S-nv*Math.sin(w)))/(3*a);f>=0&&f<=1&&(o[d++]=f),y>=0&&y<=1&&(o[d++]=y),T>=0&&T<=1&&(o[d++]=T)}}return d}function nk(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(nw(a)){if(nb(o)){var u=-s/o;u>=0&&u<=1&&(r[l++]=u)}}else{var h=o*o-4*a*s;if(nw(h))r[0]=-o/(2*a);else if(h>0){var c=ng(h),u=(-o+c)/(2*a),p=(-o-c)/(2*a);u>=0&&u<=1&&(r[l++]=u),p>=0&&p<=1&&(r[l++]=p)}}return l}function nC(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function nD(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}function nI(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function nA(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function nL(t,e,n,i,r){var o=(e-t)*i+t,a=(n-e)*i+e,s=(a-o)*i+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=n}var nP=/cubic-bezier\(([0-9,\.e ]+)\)/;function nO(t){var e=t&&nP.exec(t);if(e){var n=e[1].split(","),i=+t$(n[0]),r=+t$(n[1]),o=+t$(n[2]),a=+t$(n[3]);if(isNaN(i+r+o+a))return;var s=[];return function(t){return t<=0?0:t>=1?1:nM(0,i,o,1,t,s)&&nS(0,r,a,1,s[0])}}}var nN=function(){function t(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||t4,this.ondestroy=t.ondestroy||t4,this.onrestart=t.onrestart||t4,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var n=this._life,i=t-this._startTime-this._pausedTime,r=i/n;r<0&&(r=0),r=Math.min(r,1);var o=this.easingFunc,a=o?o(r):r;if(this.onframe(a),1===r)if(!this.loop)return!0;else this._startTime=t-i%n,this._pausedTime=0,this.onrestart();return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=tB(t)?t:nd[t]||nO(t)},t}(),nR=function(t){this.value=t},nB=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new nR(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),nE=function(){function t(t){this._list=new nB,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new nR(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),nz={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function nF(t){return(t=Math.round(t))<0?0:t>255?255:t}function nV(t){return t<0?0:t>1?1:t}function nH(t){return t.length&&"%"===t.charAt(t.length-1)?nF(parseFloat(t)/100*255):nF(parseInt(t,10))}function nW(t){return t.length&&"%"===t.charAt(t.length-1)?nV(parseFloat(t)/100):nV(parseFloat(t))}function nG(t,e,n){return(n<0?n+=1:n>1&&(n-=1),6*n<1)?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function nU(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function nX(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var nY=new nE(20),nq=null;function nZ(t,e){nq&&nX(nq,e),nq=nY.put(t,nq||e.slice())}function nj(t,e){if(t){e=e||[];var n=nY.get(t);if(n)return nX(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in nz)return nX(e,nz[i]),nZ(t,e),e;var r=i.length;if("#"===i.charAt(0)){if(4===r||5===r){var o=parseInt(i.slice(1,4),16);return o>=0&&o<=4095?(nU(e,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===r?parseInt(i.slice(4),16)/15:1),nZ(t,e),e):void nU(e,0,0,0,1)}if(7===r||9===r){var o=parseInt(i.slice(1,7),16);return o>=0&&o<=0xffffff?(nU(e,(0xff0000&o)>>16,(65280&o)>>8,255&o,9===r?parseInt(i.slice(7),16)/255:1),nZ(t,e),e):void nU(e,0,0,0,1)}return}var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===r){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),h=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?nU(e,+u[0],+u[1],+u[2],1):nU(e,0,0,0,1);h=nW(u.pop());case"rgb":if(u.length>=3)return nU(e,nH(u[0]),nH(u[1]),nH(u[2]),3===u.length?h:nW(u[3])),nZ(t,e),e;return void nU(e,0,0,0,1);case"hsla":if(4!==u.length)return void nU(e,0,0,0,1);return u[3]=nW(u[3]),nK(u,e),nZ(t,e),e;case"hsl":if(3!==u.length)return void nU(e,0,0,0,1);return nK(u,e),nZ(t,e),e;default:return}}nU(e,0,0,0,1)}}function nK(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=nW(t[1]),r=nW(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return nU(e=e||[],nF(255*nG(a,o,n+1/3)),nF(255*nG(a,o,n)),nF(255*nG(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function n$(t,e){var n=nj(t);if(n){for(var i=0;i<3;i++)e<0?n[i]=n[i]*(1-e)|0:n[i]=(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return nJ(n,4===n.length?"rgba":"rgb")}}function nQ(t,e,n,i){var r,o=nj(t);if(t)return o=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,p=((s-o)/6+l/2)/l;i===s?e=p-c:r===s?e=1/3+h-p:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var d=[360*e,n,u];return null!=t[3]&&d.push(t[3]),d}}(o),null!=e&&(o[0]=(r=Math.round(r=tB(e)?e(o[0]):e))<0?0:r>360?360:r),null!=n&&(o[1]=nW(tB(n)?n(o[1]):n)),null!=i&&(o[2]=nW(tB(i)?i(o[2]):i)),nJ(nK(o),"rgba")}function nJ(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return("rgba"===e||"hsva"===e||"hsla"===e)&&(n+=","+t[3]),e+"("+n+")"}}function n0(t,e){var n=nj(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}var n1=new nE(100);function n2(t){if(tE(t)){var e=n1.get(t);return e||(e=n$(t,-.1),n1.put(t,e)),e}if(tU(t)){var n=tS({},t);return n.colorStops=tI(t.colorStops,function(t){return{offset:t.offset,color:n$(t.color,-.1)}}),n}return t}var n5=Math.round;function n3(t){var e;if(t&&"transparent"!==t){if("string"==typeof t&&t.indexOf("rgba")>-1){var n=nj(t);n&&(t="rgb("+n[0]+","+n[1]+","+n[2]+")",e=n[3])}}else t="none";return{color:t,opacity:null==e?1:e}}function n4(t){return t<1e-4&&t>-1e-4}function n8(t){return n5(1e3*t)/1e3}function n6(t){return n5(1e4*t)/1e4}var n9={left:"start",right:"end",center:"middle",middle:"middle"};function n7(t){return t&&!!t.image}function it(t){return n7(t)||t&&!!t.svgElement}function ie(t){return"linear"===t.type}function ii(t){return"radial"===t.type}function ir(t){return t&&("linear"===t.type||"radial"===t.type)}function io(t){return"url(#"+t+")"}function ia(t){var e=t.getGlobalScale();return Math.max(Math.ceil(Math.log(Math.max(e[0],e[1]))/Math.log(10)),1)}function is(t){var e=t.x||0,n=t.y||0,i=(t.rotation||0)*t8,r=tY(t.scaleX,1),o=tY(t.scaleY,1),a=t.skewX||0,s=t.skewY||0,l=[];return(e||n)&&l.push("translate("+e+"px,"+n+"px)"),i&&l.push("rotate("+i+")"),(1!==r||1!==o)&&l.push("scale("+r+","+o+")"),(a||s)&&l.push("skew("+n5(a*t8)+"deg, "+n5(s*t8)+"deg)"),l.join(" ")}var il=ti.hasGlobalWindow&&tB(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:"u">typeof Buffer?function(t){return Buffer.from(t).toString("base64")}:function(t){return null},iu=Array.prototype.slice;function ih(t,e,n,i){for(var r,o=e.length,a=0;a=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,r=i.length,o=!1,a=6,s=e;if(tC(e)){var l=tC(e&&e[0])?2:1;a=l,(1!==l||tF(e[0]))&&(2!==l||tF(e[0][0]))||(o=!0)}else if(tF(e)&&e==e)a=0;else if(tE(e))if(isNaN(+e)){var u=nj(e);u&&(s=u,a=3)}else a=0;else if(tU(e)){var h=tS({},s);h.colorStops=tI(e.colorStops,function(t){return{offset:t.offset,color:nj(t.color)}}),ie(e)?a=4:ii(e)&&(a=5),s=h}0===r?this.valType=a:(a!==this.valType||6===a)&&(o=!0),this.discrete=this.discrete||o;var c={time:t,value:s,rawValue:e,percent:0};return n&&(c.easing=n,c.easingFunc=tB(n)?n:nd[n]||nO(n)),i.push(c),c},t.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort(function(t,e){return t.time-e.time});for(var i=this.valType,r=n.length,o=n[r-1],a=this.discrete,s=iy(i),l=iv(i),u=0;ur)t.length=r;else for(var o=i;oi?e:t,o=Math.min(n,i),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;s=0&&!(l[n].percent<=e);n--);n=d(n,u-2)}else{for(n=p;ne);n++);n=d(n-1,u-2)}r=l[n+1],i=l[n]}if(i&&r){this._lastFr=n,this._lastFrP=e;var f=r.percent-i.percent,g=0===f?1:d((e-i.percent)/f,1);r.easingFunc&&(g=r.easingFunc(g));var v=o?this._additiveValue:c?im:t[h];if((iy(s)||c)&&!v&&(v=this._additiveValue=[]),this.discrete)t[h]=g<1?i.rawValue:r.rawValue;else if(iy(s))1===s?ih(v,i[a],r[a],g):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a0&&s.addKeyframe(0,id(l),i),this._trackKeys.push(a)}s.addKeyframe(t,id(e[a]),i)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n0)){this._started=1;for(var e=this,n=[],i=this._maxTime||0,r=0;r1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(this._maxTime,r.getAdditiveTrack())}}}},t}();function iw(){return new Date().getTime()}var ib=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,n.stage=(e=e||{}).stage||{},n}return t9(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._head=n,n?n.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=iw()-this._pausedTime,n=e-this._time,i=this._head;i;){var r=i.next;i.step(e,n)&&(i.ondestroy(),this.removeClip(i)),i=r}this._time=e,!t&&(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,h(function e(){t._running&&(h(e),t._paused||t.update())})},e.prototype.start=function(){this._running||(this._time=iw(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=iw(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=iw()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isFinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new ix(t,e.loop);return this.addAnimator(n),n},e}(eh),iS=ti.domSupported,iT=(i={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},r=tI(n=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],function(t){var e=t.replace("mouse","pointer");return i.hasOwnProperty(e)?e:t}),{mouse:n,touch:["touchstart","touchend","touchmove"],pointer:r}),iM=["mousemove","mouseup"],ik=["pointermove","pointerup"],iC=!1;function iD(t){var e=t.pointerType;return"pen"===e||"touch"===e}function iI(t){t&&(t.zrByTouch=!0)}function iA(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var iL=function(t,e){this.stopPropagation=t4,this.stopImmediatePropagation=t4,this.preventDefault=t4,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},iP={mousedown:function(t){t=eC(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=eC(this.dom,t);var e=this.__mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=eC(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){iA(this,(t=eC(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){iC=!0,t=eC(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){iC||(t=eC(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){iI(t=eC(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),iP.mousemove.call(this,t),iP.mousedown.call(this,t)},touchmove:function(t){iI(t=eC(this.dom,t)),this.handler.processGesture(t,"change"),iP.mousemove.call(this,t)},touchend:function(t){iI(t=eC(this.dom,t)),this.handler.processGesture(t,"end"),iP.mouseup.call(this,t),new Date-this.__lastTouchMoment<300&&iP.click.call(this,t)},pointerdown:function(t){iP.mousedown.call(this,t)},pointermove:function(t){iD(t)||iP.mousemove.call(this,t)},pointerup:function(t){iP.mouseup.call(this,t)},pointerout:function(t){iD(t)||iP.mouseout.call(this,t)}};tD(["click","dblclick","contextmenu"],function(t){iP[t]=function(e){e=eC(this.dom,e),this.trigger(t,e)}});var iO={pointermove:function(t){iD(t)||iO.mousemove.call(this,t)},pointerup:function(t){iO.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function iN(t,e,n,i){var r;t.mounted[e]=n,t.listenerOpts[e]=i,r=t.domTarget,r.addEventListener(e,n,i)}function iR(t){var e,n,i,r=t.mounted;for(var o in r)r.hasOwnProperty(o)&&(e=t.domTarget,n=r[o],i=t.listenerOpts[o],e.removeEventListener(o,n,i));t.mounted={}}var iB=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},iE=function(t){function e(e,n){var i,r,o=t.call(this)||this;return o.__pointerCapturing=!1,o.dom=e,o.painterRoot=n,o._localHandlerScope=new iB(e,iP),iS&&(o._globalHandlerScope=new iB(document,iO)),r=(i=o._localHandlerScope).domHandlers,ti.pointerEventsSupported?tD(iT.pointer,function(t){iN(i,t,function(e){r[t].call(o,e)})}):(ti.touchEventsSupported&&tD(iT.touch,function(t){iN(i,t,function(e){r[t].call(o,e),i.touching=!0,null!=i.touchTimer&&(clearTimeout(i.touchTimer),i.touchTimer=null),i.touchTimer=setTimeout(function(){i.touching=!1,i.touchTimer=null},700)})}),tD(iT.mouse,function(t){iN(i,t,function(e){e=ek(e),i.touching||r[t].call(o,e)})})),o}return t9(e,t),e.prototype.dispose=function(){iR(this._localHandlerScope),iS&&iR(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,iS&&this.__pointerCapturing^t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?function(t,e){ti.pointerEventsSupported?tD(ik,n):ti.touchEventsSupported||tD(iM,n);function n(n){iN(e,n,function(i){if(!iA(t,(i=ek(i)).target)){var r;r=i,i=eC(t.dom,new iL(t,r),!0),e.domHandlers[n].call(t,i)}},{capture:!0})}}(this,e):iR(e)}},e}(eh),iz=1;ti.hasGlobalWindow&&(iz=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var iF=iz,iV="#333",iH="#ccc";function iW(t){return t>5e-5||t<-5e-5}var iG=[],iU=[],iX=eP(),iY=Math.abs,iq=function(){var t;function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},e.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},e.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},e.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},e.prototype.needLocalTransform=function(){return iW(this.rotation)||iW(this.x)||iW(this.y)||iW(this.scaleX-1)||iW(this.scaleY-1)||iW(this.skewX)||iW(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;if(!(e||t)){n&&(eO(n),this.invTransform=null);return}n=n||eP(),e?this.getLocalTransform(n):eO(n),t&&(e?eR(n,t,n):eN(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(iG);var n=iG[0]<0?-1:1,i=iG[1]<0?-1:1,r=((iG[0]-n)*e+n)/iG[0]||0,o=((iG[1]-i)*e+i)/iG[1]||0;t[0]*=r,t[1]*=r,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||eP(),ez(this.invTransform,t)},e.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},e.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),r=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(r),e=Math.sqrt(e),this.skewX=r,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||eP(),eR(iU,t.invTransform,e),e=iU);var n=this.originX,i=this.originY;(n||i)&&(iX[4]=n,iX[5]=i,eR(iU,e,iX),iU[4]-=n,iU[5]-=i,e=iU),this.setLocalTransform(e)}},e.prototype.getGlobalScale=function(t){var e=this.transform;return(t=t||[],e)?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1])):(t[0]=1,t[1]=1),t},e.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&eo(n,n,i),n},e.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&eo(n,n,i),n},e.prototype.getLineScale=function(){var t=this.transform;return t&&iY(t[0]-1)>1e-10&&iY(t[3]-1)>1e-10?Math.sqrt(iY(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){ij(this,t)},e.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,i=t.originY||0,r=t.scaleX,o=t.scaleY,a=t.anchorX,s=t.anchorY,l=t.rotation||0,u=t.x,h=t.y,c=t.skewX?Math.tan(t.skewX):0,p=t.skewY?Math.tan(-t.skewY):0;if(n||i||a||s){var d=n+a,f=i+s;e[4]=-d*r-c*f*o,e[5]=-f*o-p*d*r}else e[4]=e[5]=0;return e[0]=r,e[3]=o,e[1]=p*r,e[2]=c*o,l&&eE(e,e,l),e[4]+=n+u,e[5]+=i+h,e},e.initDefaultProps=void((t=e.prototype).scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0),e}(),iZ=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function ij(t,e){for(var n=0;n=5)){t=t||to;for(var e=[],n=+new Date,i=0;i<=127;i++)e[i]=ts.measureText(String.fromCharCode(i),t).width;var r=new Date-n;return r>16?i$=5:r>2&&i$++,e}}(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?null!=t.asciiWidthMap?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function iJ(t,e){var n=t.strWidthCache,i=n.get(e);return null==i&&(i=ts.measureText(e,t.font).width,n.put(e,i)),i}function i0(t,e,n,i){var r=iJ(iK(e),t),o=i3(e);return new e3(i2(0,r,n),i5(0,o,i),r,o)}function i1(t,e,n,i){var r=((t||"")+"").split("\n");if(1===r.length)return i0(r[0],e,n,i);for(var o=new e3(0,0,0,0),a=0;a=0?parseFloat(t)/100*e:parseFloat(t):t}function i8(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof Array)l+=i4(i[0],n.width),u+=i4(i[1],n.height),h=null,c=null;else switch(i){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+a,u+=s,c="middle";break;case"top":l+=a/2,u-=r,h="center",c="bottom";break;case"bottom":l+=a/2,u+=o+r,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=r,u+=s,c="middle";break;case"insideRight":l+=a-r,u+=s,h="right",c="middle";break;case"insideTop":l+=a/2,u+=r,h="center";break;case"insideBottom":l+=a/2,u+=o-r,h="center",c="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,h="right";break;case"insideBottomLeft":l+=r,u+=o-r,c="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,h="right",c="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=c,t}var i6="__zr_normal__",i9=iZ.concat(["ignore"]),i7=tA(iZ,function(t,e){return t[e]=!0,t},{ignore:!1}),rt={},re=new e3(0,0,0,0),rn=[],ri=function(){function t(t){this.id=t_++,this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.innerTransformable,o=void 0,a=void 0,s=!1;r.parent=i?this:null;var l=!1;r.copyTransform(e);var u=null!=n.position,h=n.autoOverflowArea,c=void 0;if((h||u)&&(c=re,n.layoutRect?c.copy(n.layoutRect):c.copy(this.getBoundingRect()),i||c.applyTransform(this.transform)),u){this.calculateTextPosition?this.calculateTextPosition(rt,n,c):i8(rt,n,c),r.x=rt.x,r.y=rt.y,o=rt.align,a=rt.verticalAlign;var p=n.origin;if(p&&null!=n.rotation){var d=void 0,f=void 0;"center"===p?(d=.5*c.width,f=.5*c.height):(d=i4(p[0],c.width),f=i4(p[1],c.height)),l=!0,r.originX=-r.x+d+(i?0:c.x),r.originY=-r.y+f+(i?0:c.y)}}null!=n.rotation&&(r.rotation=n.rotation);var g=n.offset;g&&(r.x+=g[0],r.y+=g[1],l||(r.originX=-g[0],r.originY=-g[1]));var v=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(h){var y=v.overflowRect=v.overflowRect||new e3(0,0,0,0);r.getLocalTransform(rn),ez(rn,rn),e3.copy(y,c),y.applyTransform(rn)}else v.overflowRect=null;var m=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,_=void 0,x=void 0,w=void 0;m&&this.canBeInsideText()?(_=n.insideFill,x=n.insideStroke,(null==_||"auto"===_)&&(_=this.getInsideTextFill()),(null==x||"auto"===x)&&(x=this.getInsideTextStroke(_),w=!0)):(_=n.outsideFill,x=n.outsideStroke,(null==_||"auto"===_)&&(_=this.getOutsideFill()),(null==x||"auto"===x)&&(x=this.getOutsideStroke(_),w=!0)),((_=_||"#000")!==v.fill||x!==v.stroke||w!==v.autoStroke||o!==v.align||a!==v.verticalAlign)&&(s=!0,v.fill=_,v.stroke=x,v.autoStroke=w,v.align=o,v.verticalAlign=a,e.setDefaultTextStyle(v)),e.__dirty|=1,s&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?iH:iV},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&nj(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+255*!r*(1-i);return n[3]=1,nJ(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},tS(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(tV(t))for(var n=tP(t),i=0;i0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(i6,!1,t)},t.prototype.useState=function(t,e,n,i){var r,o=t===i6;if(this.hasState()||!o){var a=this.currentStates,s=this.stateTransition;if(!(tM(a,t)>=0)||!e&&1!==a.length){if(this.stateProxy&&!o&&(r=this.stateProxy(t)),r||(r=this.states&&this.states[t]),!r&&!o)return void tx("State "+t+" not exists.");o||this.saveCurrentToNormalState(r);var l=!!(r&&r.hoverLayer||i);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,r,this._normalState,e,!n&&!this.__inHover&&s&&s.duration>0,s);var u=this._textContent,h=this._textGuide;return u&&u.useState(t,e,n,l),h&&h.useState(t,e,n,l),o?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),r}}},t.prototype.useStates=function(t,e,n){if(t.length){var i=[],r=this.currentStates,o=t.length,a=o===r.length;if(a){for(var s=0;s0,d);var f=this._textContent,g=this._textGuide;f&&f.useStates(t,e,c),g&&g.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}}else this.clearStates()},t.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var e=t.__hostTarget;t=e?t.ignoreHostSilent?null:e:t.parent}return!1},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=tM(i,t),o=tM(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o0||o.force&&!s.length){var T=void 0,M=void 0,k=void 0;if(l){M={},d&&(T={});for(var w=0;w0&&n.during&&o[0].during(function(t,e){n.during(e)});for(var p=0;p=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,e){var n=tM(this._children,t);return n>=0&&this.replaceAt(e,n),this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=tM(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;nn0(t,1);if(t.colorStops){for(var e=t.colorStops,n=0,i=e.length,r=0;r0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){!this._disposed&&(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},t.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},t.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},t.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e0){if(t<=r)return a;else if(t>=o)return s}else if(t>=r)return a;else if(t<=o)return s}else{if(t===r)return a;if(t===o)return s}return(t-r)/l*u+a}var rv=function(t,e,n){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return ry(t,e,n)};function ry(t,e,n){return tE(t)?t.replace(/^\s+|\s+$/g,"").match(/%$/)?parseFloat(t)/100*e+(n||0):parseFloat(t):null==t?NaN:+t}function rm(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function r_(t){if(isNaN(t*=1))return 0;if(t>1e-14){for(var e,n,i,r,o,a=1,s=0;s<15;s++,a*=10)if(Math.round(t*a)/a===t)return s}return i=(n=(e=t.toString().toLowerCase()).indexOf("e"))>0?+e.slice(n+1):0,r=n>0?n:e.length,Math.max(0,((o=e.indexOf("."))<0?0:r-1-o)-i)}function rx(t){var e=2*Math.PI;return(t%e+e)%e}function rw(t){return t>-1e-4&&t<1e-4}var rb=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function rS(t){if(t instanceof Date)return t;if(tE(t)){var e=rb.exec(t);if(!e)return new Date(NaN);if(!e[8])return new Date(+e[1],(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0);var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}return null==t?new Date(NaN):new Date(Math.round(t))}function rT(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function rM(t,e){var n=rT(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function rk(t){var e=parseFloat(t);return e==t&&(0!==e||!tE(t)||0>=t.indexOf("x"))?e:NaN}function rC(){return Math.round(9*Math.random())}function rD(t,e){return null==t?e:null==e?t:t*e/function t(e,n){return 0===n?e:t(n,e%n)}(t,e)}var rI="series\0";function rA(t){return t instanceof Array?t:null==t?[]:[t]}function rL(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;itM(e.includeMainTypes,s)||(a=a||!!s,(r.get(s)||r.set(s,{}))[l]=t)}),{mainTypeSpecified:a,queryOptionMap:r,others:o}}var rU={useDefault:!0,enableAll:!1,enableNone:!1};function rX(t,e,n,i){i=i||rU;var r=n.index,o=n.id,a=n.name,s={models:null,specified:null!=r||null!=o||null!=a};if(!s.specified){var l=void 0;return s.models=i.useDefault&&(l=t.getComponent(e))?[l]:[],s}if("none"===r||!1===r)if(i.enableNone)return s.models=[],s;else r=-1;return"all"===r&&(r=i.enableAll?o=a=null:-1),s.models=t.queryComponents({mainType:e,index:r,id:o,name:a}),s}function rY(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function rq(){}rq.prototype.reset=function(t,e,n,i){return this._list=t,this._step=i=i||1,this._idx=e,this._end=null!=n?n:i>0?t.length:0,this.item=null,this.key=NaN,this},rq.prototype.next=function(){return(this._step>0?this._idx=this._end)&&(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0)};var rZ="___EC__COMPONENT__CONTAINER___",rj="___EC__EXTENDED_CLASS___";function rK(t){var e={main:"",sub:""};if(t){var n=t.split(".");e.main=n[0]||"",e.sub=n[1]||""}return e}function r$(t,e){t.$constructor=t,t.extend=function(t){var e,n,i=this;if(tB(e=i)&&/^class\s/.test(Function.prototype.toString.call(e)))n=function(t){function e(){return t.apply(this,arguments)||this}return te(e,t),e}(i);else{var r=n=function(){(t.$constructor||i).apply(this,arguments)},o=r.prototype;function a(){}for(var s in a.prototype=this.prototype,r.prototype=new a,o)o.hasOwnProperty(s)&&(r.prototype[s]=o[s]);r.prototype.constructor=r,r.superClass=this}return tS(n.prototype,t),n[rj]=!0,n.extend=this.extend,n.superCall=r0,n.superApply=r1,n.superClass=i,n}}function rQ(t,e){t.extend=e.extend}var rJ=Math.round(10*Math.random());function r0(t,e){for(var n=[],i=2;i=0||r&&0>tM(r,s))){var l=n.getShallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}var r3=r5([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),r4=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return r3(this,t,e)},t}(),r8=new nE(50);function r6(t,e,n,i,r){if(!t)return e;if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!n)return e;var o=r8.get(t),a={hostEl:n,cb:i,cbPayload:r};return o?r7(e=o.image)||o.pending.push(a):((e=ts.loadImage(t,r9,r9)).__zrImageSrc=t,r8.put(t,e.__cachedImgObj={image:e,pending:[a]})),e}function r9(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=s;u++)l-=s;var h=iJ(a,n);return h>l&&(n="",h=0),l=t-h,r.ellipsis=n,r.ellipsisWidth=h,r.contentWidth=l,r.containerWidth=t,r}function on(t,e,n){var i=n.containerWidth,r=n.contentWidth,o=n.fontMeasureInfo;if(!i){t.textLine="",t.isTruncated=!1;return}var a=iJ(o,e);if(a<=i){t.textLine=e,t.isTruncated=!1;return}for(var s=0;;s++){if(a<=r||s>=n.maxIterations){e+=n.ellipsis;break}var l=0===s?function(t,e,n){for(var i=0,r=0,o=t.length;r0?Math.floor(e.length*r/a):0;a=iJ(o,e=e.substr(0,l))}""===e&&(e=n.placeholder),t.textLine=e,t.isTruncated=!0}var oi=function(){},or=function(t){this.tokens=[],t&&(this.tokens=t)},oo=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1};function oa(t,e,n,i,r){var o,a,s=""===e,l=r&&n.rich[r]||{},u=t.lines,h=l.font||n.font,c=!1;if(i){var p=l.padding,d=p?p[1]+p[3]:0;if(null!=l.width&&"auto"!==l.width){var f=i4(l.width,i.width)+d;u.length>0&&f+i.accumWidth>i.width&&(o=e.split("\n"),c=!0),i.accumWidth=f}else{var g=ol(e,h,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+d,a=g.linesWidths,o=g.lines}}o||(o=e.split("\n"));for(var v=iK(h),y=0;y=32)||!(e<=591))&&(!(e>=880)||!(e<=4351))&&(!(e>=4608)||!(e<=5119))&&(!(e>=7680)||!(e<=8303))||!!os[t]}(d);if(o.length?h+f>n:r+h+f>n){h?(s||l)&&(g?(s||(s=l,l="",h=u=0),o.push(s),a.push(h-u),l+=d,u+=f,s="",h=u):(l&&(s+=l,l="",u=0),o.push(s),a.push(h),s=d,h=f)):g?(o.push(l),a.push(u),l=d,u=f):(o.push(d),a.push(f));continue}h+=f,g?(l+=d,u+=f):(l&&(s+=l,l="",u=0),s+=d)}return l&&(s+=l),s&&(o.push(s),a.push(h)),1===o.length&&(h+=r),{accumWidth:h,lines:o,linesWidths:a}}function ou(t,e,n,i,r,o){if(t.baseX=n,t.baseY=i,t.outerWidth=t.outerHeight=null,e){var a=2*e.width,s=2*e.height;e3.set(oh,i2(n,a,r),i5(i,s,o),a,s),e3.intersect(e,oh,null,oc);var l=oc.outIntersectRect;t.outerWidth=l.width,t.outerHeight=l.height,t.baseX=i2(l.x,l.width,r,!0),t.baseY=i5(l.y,l.height,o,!0)}}var oh=new e3(0,0,0,0),oc={outIntersectRect:{},clamp:!0};function op(t){return null!=t?t+="":t=""}function od(t,e,n,i){var r=new e3(i2(t.x||0,e,t.textAlign),i5(t.y||0,n,t.textBaseline),e,n),o=null!=i?i:of(t)?t.lineWidth:0;return o>0&&(r.x-=o/2,r.y-=o/2,r.width+=o,r.height+=o),r}function of(t){var e=t.stroke;return null!=e&&"none"!==e&&t.lineWidth>0}var og="__zr_style_"+Math.round(10*Math.random()),ov={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},oy={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ov[og]=!0;var om=["z","z2","invisible"],o_=["invisible"],ox=function(t){var e;function n(e){return t.call(this,e)||this}return t9(n,t),n.prototype._init=function(e){for(var n=tP(e),i=0;itypeof Float32Array,oj=[];function oK(t){return Math.round(t/oY*1e8)/1e8%2*oY}function o$(t,e){var n=oK(t[0]);n<0&&(n+=oq);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=oq?r=n+oq:e&&n-r>=oq?r=n-oq:!e&&n>r?r=n+(oq-oK(n-r)):e&&n0&&(this._ux=oX(n/iF/t)||0,this._uy=oX(n/iF/e)||0)},e.prototype.setDPR=function(t){this.dpr=t},e.prototype.setContext=function(t){this._ctx=t},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(oN.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},e.prototype.lineTo=function(t,e){var n=oX(t-this._xi),i=oX(e-this._yi),r=n>this._ux||i>this._uy;if(this.addData(oN.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this._drawPendingPt(),this.addData(oN.C,t,e,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,o),this._xi=r,this._yi=o,this},e.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(oN.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},e.prototype.arc=function(t,e,n,i,r,o){this._drawPendingPt(),oj[0]=i,oj[1]=r,o$(oj,o),i=oj[0];var a=(r=oj[1])-i;return this.addData(oN.A,t,e,n,n,i,a,0,+!o),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=oG(r)*n+t,this._yi=oU(r)*n+e,this},e.prototype.arcTo=function(t,e,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},e.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(oN.R,t,e,n,i),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(oN.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},e.prototype.fill=function(t){t&&t.fill(),this.toStatic()},e.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(t){if(this._saveData){var e=t.length;!(this.data&&this.data.length===e)&&oZ&&(this.data=new Float32Array(e));for(var n=0;n0&&o))for(var a=0;au.length&&(this._expandData(),u=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){oE[0]=oE[1]=oF[0]=oF[1]=Number.MAX_VALUE,oz[0]=oz[1]=oV[0]=oV[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,i=0,r=0,o=0;for(t=0;t1e-4){s[0]=t-n,s[1]=e-i,l[0]=t+n,l[1]=e+i;return}if(oD[0]=ok(r)*n+t,oD[1]=oM(r)*i+e,oI[0]=ok(o)*n+t,oI[1]=oM(o)*i+e,ea(s,oD,oI),es(l,oD,oI),(r%=oC)<0&&(r+=oC),(o%=oC)<0&&(o+=oC),r>o&&!a?o+=oC:rr&&(oA[0]=ok(c)*n+t,oA[1]=oM(c)*i+e,ea(s,oA,s),es(l,oA,l))}(l,u,h,c,p,d,f,oF,oV),n=oG(d)*h+l,i=oU(d)*c+u;break;case oN.R:oL(r=n=e[t++],o=i=e[t++],r+e[t++],o+e[t++],oF,oV);break;case oN.Z:n=r,i=o}ea(oE,oE,oF),es(oz,oz,oV)}return 0===t&&(oE[0]=oE[1]=oz[0]=oz[1]=0),new e3(oE[0],oE[1],oz[0]-oE[0],oz[1]-oE[1])},e.prototype._calculateLength=function(){var t=this.data,e=this._len,n=this._ux,i=this._uy,r=0,o=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,u=0,h=0,c=0;cn||oX(m)>i||c===e-1)&&(f=Math.sqrt(y*y+m*m),r=g,o=v);break;case oN.C:var _=t[c++],x=t[c++],g=t[c++],v=t[c++],w=t[c++],b=t[c++];f=function(t,e,n,i,r,o,a,s,l){for(var u=t,h=e,c=0,p=1;p<=10;p++){var d=.1*p,f=nS(t,n,r,a,d),g=nS(e,i,o,s,d),v=f-u,y=g-h;c+=Math.sqrt(v*v+y*y),u=f,h=g}return c}(r,o,_,x,g,v,w,b,0),r=w,o=b;break;case oN.Q:var _=t[c++],x=t[c++],g=t[c++],v=t[c++];f=function(t,e,n,i,r,o,a){for(var s=t,l=e,u=0,h=1;h<=10;h++){var c=.1*h,p=nD(t,n,r,c),d=nD(e,i,o,c),f=p-s,g=d-l;u+=Math.sqrt(f*f+g*g),s=p,l=d}return u}(r,o,_,x,g,v,0),r=g,o=v;break;case oN.A:var S=t[c++],T=t[c++],M=t[c++],k=t[c++],C=t[c++],D=t[c++],I=D+C;c+=1,d&&(a=oG(C)*M+S,s=oU(C)*k+T),f=oW(M,k)*oH(oq,Math.abs(D)),r=oG(I)*M+S,o=oU(I)*k+T;break;case oN.R:a=r=t[c++],s=o=t[c++],f=2*t[c++]+2*t[c++];break;case oN.Z:var y=a-r,m=s-o;f=Math.sqrt(y*y+m*m),r=a,o=s}f>=0&&(l[h++]=f,u+=f)}return this._pathLen=u,u},e.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,h,c,p=this.data,d=this._ux,f=this._uy,g=this._len,v=e<1,y=0,m=0,_=0;if(!v||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var x=0;x0&&(t.lineTo(h,c),_=0),w){case oN.M:n=r=p[x++],i=o=p[x++],t.moveTo(r,o);break;case oN.L:a=p[x++],s=p[x++];var S=oX(a-r),T=oX(s-o);if(S>d||T>f){if(v){var M=l[m++];if(y+M>u){var k=(u-y)/M;t.lineTo(r*(1-k)+a*k,o*(1-k)+s*k);break t}y+=M}t.lineTo(a,s),r=a,o=s,_=0}else{var C=S*S+T*T;C>_&&(h=a,c=s,_=C)}break;case oN.C:var D=p[x++],I=p[x++],A=p[x++],L=p[x++],P=p[x++],O=p[x++];if(v){var M=l[m++];if(y+M>u){var k=(u-y)/M;nC(r,D,A,P,k,oR),nC(o,I,L,O,k,oB),t.bezierCurveTo(oR[1],oB[1],oR[2],oB[2],oR[3],oB[3]);break t}y+=M}t.bezierCurveTo(D,I,A,L,P,O),r=P,o=O;break;case oN.Q:var D=p[x++],I=p[x++],A=p[x++],L=p[x++];if(v){var M=l[m++];if(y+M>u){var k=(u-y)/M;nL(r,D,A,k,oR),nL(o,I,L,k,oB),t.quadraticCurveTo(oR[1],oB[1],oR[2],oB[2]);break t}y+=M}t.quadraticCurveTo(D,I,A,L),r=A,o=L;break;case oN.A:var N=p[x++],R=p[x++],B=p[x++],E=p[x++],z=p[x++],F=p[x++],V=p[x++],H=!p[x++],W=B>E?B:E,G=oX(B-E)>.001,U=z+F,X=!1;if(v){var M=l[m++];y+M>u&&(U=z+F*(u-y)/M,X=!0),y+=M}if(G&&t.ellipse?t.ellipse(N,R,B,E,V,z,U,H):t.arc(N,R,W,z,U,H),X)break t;b&&(n=oG(z)*B+N,i=oU(z)*E+R),r=oG(U)*B+N,o=oU(U)*E+R;break;case oN.R:n=r=p[x],i=o=p[x+1],a=p[x++],s=p[x++];var Y=p[x++],q=p[x++];if(v){var M=l[m++];if(y+M>u){var Z=u-y;t.moveTo(a,s),t.lineTo(a+oH(Z,Y),s),(Z-=Y)>0&&t.lineTo(a+Y,s+oH(Z,q)),(Z-=q)>0&&t.lineTo(a+oW(Y-Z,0),s+q),(Z-=Y)>0&&t.lineTo(a,s+oW(q-Z,0));break t}y+=M}t.rect(a,s,Y,q);break;case oN.Z:if(v){var M=l[m++];if(y+M>u){var k=(u-y)/M;t.lineTo(r*(1-k)+n*k,o*(1-k)+i*k);break t}y+=M}t.closePath(),r=n,o=i}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=oN,e.initDefaultProps=void((t=e.prototype)._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0),e}();function oJ(t,e,n,i,r,o,a){if(0===r)return!1;var s=0,l=t;if(a>e+r&&a>i+r||at+r&&o>n+r||oe&&o>i||or?s:0}var o3=oQ.CMD,o4=2*Math.PI,o8=[-1,-1,-1],o6=[-1,-1];function o9(t,e,n,i,r){for(var o,a,s=t.data,l=t.len(),u=0,h=0,c=0,p=0,d=0,f=0;f1&&!n&&(u+=o5(h,c,p,d,i,r)),A&&(h=s[f],c=s[f+1],p=h,d=c),I){case o3.M:p=s[f++],d=s[f++],h=p,c=d;break;case o3.L:if(n){if(oJ(h,c,s[f],s[f+1],e,i,r))return!0}else u+=o5(h,c,s[f],s[f+1],i,r)||0;h=s[f++],c=s[f++];break;case o3.C:if(n){if(g=h,v=c,y=s[f++],m=s[f++],_=s[f++],x=s[f++],w=s[f],b=s[f+1],0!==e&&(!(r>v+e)||!(r>m+e)||!(r>x+e)||!(r>b+e))&&(!(rg+e)||!(i>y+e)||!(i>_+e)||!(i>w+e))&&(!(i=0&&fe&&u>i&&u>o&&u>s||u1&&function(){var t=o6[0];o6[0]=o6[1],o6[1]=t}(),d=nS(e,i,o,s,o6[0]),p>1&&(f=nS(e,i,o,s,o6[1]))),2===p?vT+e)||!(r>k+e)||!(r>D+e))&&(!(rS+e)||!(i>M+e)||!(i>C+e))&&(!(i=0&&de&&s>i&&s>o||s=0&&u<=1&&(r[l++]=u)}}else{var h=a*a-4*o*s;if(nw(h)){var u=-a/(2*o);u>=0&&u<=1&&(r[l++]=u)}else if(h>0){var c=ng(h),u=(-a+c)/(2*o),p=(-a-c)/(2*o);u>=0&&u<=1&&(r[l++]=u),p>=0&&p<=1&&(r[l++]=p)}}return l}(e,i,o,s,o8);if(0===l)return 0;var u=nA(e,i,o);if(u>=0&&u<=1){for(var h=0,c=nD(e,i,o,u),p=0;pn||u+ar&&(r+=o2);var c=Math.atan2(l,s);return c<0&&(c+=o2),c>=i&&c<=r||c+o2>=i&&c+o2<=r}(L,P,N,R,R+B,E,e,z,r))return!0}else u+=function(t,e,n,i,r,o,a,s){if((s-=e)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);o8[0]=-l,o8[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=o4-1e-4){i=0,r=o4;var h=o?1:-1;return a>=o8[0]+t&&a<=o8[1]+t?h:0}if(i>r){var c=i;i=r,r=c}i<0&&(i+=o4,r+=o4);for(var p=0,d=0;d<2;d++){var f=o8[d];if(f+t>a){var g=Math.atan2(s,f),h=o?1:-1;g<0&&(g=o4+g),(g>=i&&g<=r||g+o4>=i&&g+o4<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(h=-h),p+=h)}}return p}(L,P,N,R,R+B,E,z,r);h=Math.cos(R+B)*O+L,c=Math.sin(R+B)*N+P;break;case o3.R:p=h=s[f++],d=c=s[f++];var F=s[f++],V=s[f++];if(o=p+F,a=d+V,n){if(oJ(p,d,o,d,e,i,r)||oJ(o,d,o,a,e,i,r)||oJ(o,a,p,a,e,i,r)||oJ(p,a,p,d,e,i,r))return!0}else u+=o5(o,d,o,a,i,r),u+=o5(p,a,p,d,i,r);break;case o3.Z:if(n){if(oJ(h,c,p,d,e,i,r))return!0}else u+=o5(h,c,p,d,i,r);h=p,c=d}}return n||1e-4>Math.abs(c-d)||(u+=o5(h,c,p,d,i,r)||0),0!==u}var o7=tT({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},ov),at={style:tT({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},oy.style)},ae=iZ.concat(["invisible","culling","z","z2","zlevel","parent"]);let an=function(t){var e;function n(e){return t.call(this,e)||this}return t9(n,t),n.prototype.update=function(){var e=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new n;r.buildPath===n.prototype.buildPath&&(r.buildPath=function(t){e.buildPath(t,e.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s.5?iV:e>.2?"#eee":iH}else if(t)return iH}return iV},n.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(tE(e)){var n=this.__zr;if(!!(n&&n.isDarkMode())==.4>n0(t,0))return e}},n.prototype.buildPath=function(t,e,n){},n.prototype.pathUpdated=function(){this.__dirty&=-5},n.prototype.getUpdatedPathProxy=function(t){return this.path||this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},n.prototype.createPathProxy=function(){this.path=new oQ(!1)},n.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return null!=e&&"none"!==e&&t.lineWidth>0},n.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},n.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var r=this.path;(i||4&this.__dirty)&&(r.beginPath(),this.buildPath(r,this.shape,!1),this.pathUpdated()),t=r.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){o.copy(t);var a=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},n.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),o9(o,a/s,!0,t,e)))return!0}if(this.hasFill())return o9(o,0,!1,t,e)}return!1},n.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},n.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},n.prototype.animateShape=function(t){return this.animate("shape",t)},n.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},n.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},n.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:tS(n,t),this.dirtyShape(),this},n.prototype.shapeChanged=function(){return!!(4&this.__dirty)},n.prototype.createStyle=function(t){return t5(o7,t)},n.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=tS({},this.shape))},n.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=tS({},i.shape),tS(s,n.shape)):(s=tS({},r?this.shape:i.shape),tS(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=tS({},this.shape);for(var u={},h=tP(s),c=0;ch&&(s=i+r,i*=h/s,r*=h/s),o+a>h&&(s=o+a,o*=h/s,a*=h/s),r+o>c&&(s=r+o,r*=c/s,o*=c/s),i+a>c&&(s=i+a,i*=c/s,a*=c/s),t.moveTo(l+i,u),t.lineTo(l+h-r,u),0!==r&&t.arc(l+h-r,u+r,r,-Math.PI/2,0),t.lineTo(l+h,u+c-o),0!==o&&t.arc(l+h-o,u+c-o,o,0,Math.PI/2),t.lineTo(l+a,u+c),0!==a&&t.arc(l+a,u+c-a,a,Math.PI/2,Math.PI),t.lineTo(l,u+i),0!==i&&t.arc(l+i,u+i,i,Math.PI,1.5*Math.PI)):t.rect(d,f,g,v)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(an);ag.prototype.type="rect";let av=ag;var ay={fill:"#000"},am={},a_={style:tT({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},oy.style)},ax=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=ay,n.attr(e),n}return t9(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;ev&&d){var m=Math.floor(v/p);f=f||r.length>m,y=(r=r.slice(0,m)).length*p}if(o&&"truncate"===a&&null!=g)for(var _=oe(g,h,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),x={},w=0;w0,M=0;Mg&&oa(a,s.substring(g,v),e,f),oa(a,o[2],e,f,o[1]),g=ot.lastIndex}gp){var R=a.lines.length;D>0?(M.tokens=M.tokens.slice(0,D),S(M,C,k),a.lines=a.lines.slice(0,T+1)):a.lines=a.lines.slice(0,T),a.isTruncated=a.isTruncated||a.lines.length=0&&"right"===(C=_[k]).align;)this._placeToken(C,t,w,f,M,"right",v),b-=C.width,M-=C.width,k--;for(T+=(s-(T-d)-(g-M)-b)/2;S<=k;)C=_[S],this._placeToken(C,t,w,f,T+C.width/2,"center",v),T+=C.width,S++;f+=w}},e.prototype._placeToken=function(t,e,n,i,r,o,a){var s=e.rich[t.styleName]||{};s.text=t.text;var l=t.verticalAlign,u=i+n/2;"top"===l?u=i+t.height/2:"bottom"===l&&(u=i+n-t.height/2),!t.isLineHolder&&aP(s)&&this._renderBackground(s,e,"right"===o?r-t.width:"center"===o?r-t.width/2:r,u-t.height/2,t.width,t.height);var h=!!s.backgroundColor,c=t.textPadding;c&&(r=aA(r,o,c),u-=t.height/2-c[0]-t.innerHeight/2);var p=this._getOrCreateChild(ar),d=p.createStyle();p.useStyle(d);var f=this._defaultStyle,g=!1,v=0,y=!1,m=aI("fill"in s?s.fill:"fill"in e?e.fill:(g=!0,f.fill)),_=aD("stroke"in s?s.stroke:"stroke"in e?e.stroke:h||a||f.autoStroke&&!g?null:(v=2,y=!0,f.stroke)),x=s.textShadowBlur>0||e.textShadowBlur>0;d.text=t.text,d.x=r,d.y=u,x&&(d.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,d.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",d.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,d.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),d.textAlign=o,d.textBaseline="middle",d.font=t.font||to,d.opacity=tq(s.opacity,e.opacity,1),aM(d,s),_&&(d.lineWidth=tq(s.lineWidth,e.lineWidth,v),d.lineDash=tY(s.lineDash,e.lineDash),d.lineDashOffset=e.lineDashOffset||0,d.stroke=_),m&&(d.fill=m),p.setBoundingRect(od(d,t.contentWidth,t.contentHeight,y?0:null))},e.prototype._renderBackground=function(t,e,n,i,r,o){var a,s,l=t.backgroundColor,u=t.borderWidth,h=t.borderColor,c=l&&l.image,p=l&&!c,d=t.borderRadius,f=this;if(p||t.lineHeight||u&&h){(a=this._getOrCreateChild(av)).useStyle(a.createStyle()),a.style.fill=null;var g=a.shape;g.x=n,g.y=i,g.width=r,g.height=o,g.r=d,a.dirtyShape()}if(p){var v=a.style;v.fill=l||null,v.fillOpacity=tY(t.fillOpacity,1)}else if(c){(s=this._getOrCreateChild(al)).onload=function(){f.dirtyStyle()};var y=s.style;y.image=l.image,y.x=n,y.y=i,y.width=r,y.height=o}if(u&&h){var v=a.style;v.lineWidth=u,v.stroke=h,v.strokeOpacity=tY(t.strokeOpacity,1),v.lineDash=t.borderDash,v.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(v.strokeFirst=!0,v.lineWidth*=2)}var m=(a||s).style;m.shadowBlur=t.shadowBlur||0,m.shadowColor=t.shadowColor||"transparent",m.shadowOffsetX=t.shadowOffsetX||0,m.shadowOffsetY=t.shadowOffsetY||0,m.opacity=tq(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";return ak(t)&&(e=[t.fontStyle,t.fontWeight,aT(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&t$(e)||t.textFont||t.font},e}(ox),aw={left:!0,right:1,center:1},ab={top:1,bottom:1,middle:1},aS=["fontStyle","fontWeight","fontSize","fontFamily"];function aT(t){return"string"==typeof t&&(-1!==t.indexOf("px")||-1!==t.indexOf("rem")||-1!==t.indexOf("em"))?t:isNaN(+t)?"12px":t+"px"}function aM(t,e){for(var n=0;n=0,o=!1;if(t instanceof an){var a=az(t),s=r&&a.selectFill||a.normalFill,l=r&&a.selectStroke||a.normalStroke;if(aZ(s)||aZ(l)){var u=(i=i||{}).style||{};"inherit"===u.fill?(o=!0,i=tS({},i),(u=tS({},u)).fill=s):!aZ(u.fill)&&aZ(s)?(o=!0,i=tS({},i),(u=tS({},u)).fill=n2(s)):!aZ(u.stroke)&&aZ(l)&&(o||(i=tS({},i),u=tS({},u)),u.stroke=n2(l)),i.style=u}}if(i&&null==i.z2){o||(i=tS({},i));var h=t.z2EmphasisLift;i.z2=t.z2+(null!=h?h:10)}return i}(this,0,e,s);else if("blur"===t)return n=s,i=tM(this.currentStates,t)>=0,r=this.style.opacity,o=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;au.__fromStateTransition.indexOf(n)&&"style"===u.targetName&&u.saveTo(o,e)}return o}(this,["opacity"],t,{opacity:1}),null==(a=(n=n||{}).style||{}).opacity&&(n=tS({},n),a=tS({opacity:i?r:.1*o.opacity},a),n.style=a),n;else if("select"===t){var l=s;if(l&&null==l.z2){l=tS({},l);var u=this.z2SelectLift;l.z2=this.z2+(null!=u?u:9)}return l}}return s}function a3(t){t.stateProxy=a5;var e=t.getTextContent(),n=t.getTextGuideLine();e&&(e.stateProxy=a5),n&&(n.stateProxy=a5)}function a4(t,e){a7(t,e)||t.__highByOuter||a2(t,aK)}function a8(t,e){a7(t,e)||t.__highByOuter||a2(t,a$)}function a6(t,e){t.__highByOuter|=1<<(e||0),a2(t,aK)}function a9(t,e){(t.__highByOuter&=~(1<<(e||0)))||a2(t,a$)}function a7(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function st(t){var e=t.getModel(),n=[],i=[];e.eachComponent(function(e,r){var o=aF(r),a="series"===e,s=a?t.getViewOfSeriesModel(r):t.getViewOfComponentModel(r);a||i.push(s),o.isBlured&&(s.group.traverse(function(t){aJ(t)}),a&&n.push(r)),o.isBlured=!1}),tD(i,function(t){t&&t.toggleBlurSeries&&t.toggleBlurSeries(n,!1,e)})}function se(t,e,n,i){var r=i.getModel();function o(t,e){for(var n=0;n-1?"ZH":"EN";function sH(t,e){sF[t=t.toUpperCase()]=new sR(e),sz[t]=e}function sW(){return null}sH("EN",{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),sH("ZH",{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var sG={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},sU={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},sX="{yyyy}-{MM}-{dd}",sY={year:"{yyyy}",month:"{yyyy}-{MM}",day:sX,hour:sX+" "+sU.hour,minute:sX+" "+sU.minute,second:sX+" "+sU.second,millisecond:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},sq=["year","month","day","hour","minute","second","millisecond"],sZ=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function sj(t,e){return t+="","0000".substr(0,e-t.length)+t}function sK(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function s$(t,e,n,i){var r=rS(t),o=r[s0(n)](),a=r[s1(n)]()+1,s=Math.floor((a-1)/3)+1,l=r[s2(n)](),u=r["get"+(n?"UTC":"")+"Day"](),h=r[s5(n)](),c=(h-1)%12+1,p=r[s3(n)](),d=r[s4(n)](),f=r[s8(n)](),g=h>=12?"pm":"am",v=g.toUpperCase(),y=(i instanceof sR?i:sF[i||sV]||sF.EN).getModel("time"),m=y.get("month"),_=y.get("monthAbbr"),x=y.get("dayOfWeek"),w=y.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,v+"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,sj(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,m[a-1]).replace(/{MMM}/g,_[a-1]).replace(/{MM}/g,sj(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,sj(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,w[u]).replace(/{e}/g,u+"").replace(/{HH}/g,sj(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,sj(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,sj(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,sj(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,sj(f,3)).replace(/{S}/g,f+"")}function sQ(t,e){var n=rS(t),i=n[s1(e)]()+1,r=n[s2(e)](),o=n[s5(e)](),a=n[s3(e)](),s=n[s4(e)](),l=0===n[s8(e)](),u=l&&0===s,h=u&&0===a,c=h&&0===o,p=c&&1===r;if(p&&1===i)return"year";if(p)return"month";if(c)return"day";if(h)return"hour";if(u)return"minute";else if(l)return"second";else return"millisecond"}function sJ(t,e,n){switch(e){case"year":t[s6(n)](0);case"month":t[s9(n)](1);case"day":t[s7(n)](0);case"hour":t[lt(n)](0);case"minute":t[le(n)](0);case"second":t[ln(n)](0)}return t}function s0(t){return t?"getUTCFullYear":"getFullYear"}function s1(t){return t?"getUTCMonth":"getMonth"}function s2(t){return t?"getUTCDate":"getDate"}function s5(t){return t?"getUTCHours":"getHours"}function s3(t){return t?"getUTCMinutes":"getMinutes"}function s4(t){return t?"getUTCSeconds":"getSeconds"}function s8(t){return t?"getUTCMilliseconds":"getMilliseconds"}function s6(t){return t?"setUTCMonth":"setMonth"}function s9(t){return t?"setUTCDate":"setDate"}function s7(t){return t?"setUTCHours":"setHours"}function lt(t){return t?"setUTCMinutes":"setMinutes"}function le(t){return t?"setUTCSeconds":"setSeconds"}function ln(t){return t?"setUTCMilliseconds":"setMilliseconds"}function li(t){if(isNaN(rk(t)))return tE(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function lr(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}function lo(t,e,n){function i(t){return t&&t$(t)?t:"-"}function r(t){return!!(null!=t&&!isNaN(t)&&isFinite(t))}var o="time"===e,a=t instanceof Date;if(o||a){var s=o?rS(t):t;if(!isNaN(+s))return s$(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===e)return tz(t)?i(t):tF(t)&&r(t)?t+"":"-";var l=rk(t);return r(l)?li(l):tz(t)?i(t):"boolean"==typeof t?t+"":"-"}var la=["a","b","c","d","e","f","g"],ls=function(t,e){return"{"+t+(null==e?"":e)+"}"};function ll(t,e,n){tR(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;oi||l.newline?(o=0,h=g,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var v=p.height+(f?-f.y+p.y:0);(c=a+v)>r||l.newline?(o+=s+n,a=0,c=v,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=h+n:a=c+n)})}function lm(t,e,n){n=tj(n||0);var i=e.width,r=e.height,o=rv(t.left,i),a=rv(t.top,r),s=rv(t.right,i),l=rv(t.bottom,r),u=rv(t.width,i),h=rv(t.height,r),c=n[2]+n[0],p=n[1]+n[3],d=t.aspect;switch(isNaN(u)&&(u=i-s-p-o),isNaN(h)&&(h=r-l-c-a),null!=d&&(isNaN(u)&&isNaN(h)&&(d>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=d*h),isNaN(h)&&(h=u/d)),isNaN(o)&&(o=i-s-u-p),isNaN(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-p}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isNaN(u)&&(u=i-p-o-(s||0)),isNaN(h)&&(h=r-c-a-(l||0));var f=new e3((e.x||0)+o+n[3],(e.y||0)+a+n[0],u,h);return f.margin=n,f}tN(ly,"vertical"),tN(ly,"horizontal");var l_=1,lx=2;function lw(t,e,n){var i,r,o,a,s=t.boxCoordinateSystem;if(s){var l=function(t){var e=t.getShallow("coord",!0),n=1;if(null==e){var i=lf.get(t.type);i&&i.getCoord2&&(n=2,e=i.getCoord2(t))}return{coord:e,from:n}}(t),u=l.coord,h=l.from;if(s.dataToLayout){o=l_,a=h;var c=s.dataToLayout(u);i=c.contentRect||c.rect}else n&&n.enableLayoutOnlyByCenter&&s.dataToPoint&&(o=lx,a=h,r=s.dataToPoint(u))}return null==o&&(o=l_),o===l_&&(i||(i={x:0,y:0,width:e.getWidth(),height:e.getHeight()}),r=[i.x+i.width/2,i.y+i.height/2]),{type:o,refContainer:i,refPoint:r,boxCoordFrom:a}}function lb(t){var e=t.layoutMode||t.constructor.layoutMode;return tV(e)?e:e?{type:e}:null}function lS(t,e,n){var i=n&&n.ignoreSize;tR(i)||(i=[i,i]);var r=a(lv[0],0),o=a(lv[1],1);function a(n,r){var o={},a=0,l={},u=0;if(tD(n,function(e){l[e]=t[e]}),tD(n,function(t){t3(e,t)&&(o[t]=l[t]=e[t]),s(o,t)&&a++,s(l,t)&&u++}),i[r])return s(e,n[1])?l[n[2]]=null:s(e,n[2])&&(l[n[1]]=null),l;if(2===u||!a)return l;if(a>=2)return o;for(var h=0;h=0;a--)o=tb(o,n[a],!0);e.defaultOption=o}return e.defaultOption},n.prototype.getReferringComponents=function(t,e){return rX(this.ecModel,t,{index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)},e)},n.prototype.getBoxLayoutParams=function(){return{left:this.getShallow("left",!1),top:this.getShallow("top",!1),right:this.getShallow("right",!1),bottom:this.getShallow("bottom",!1),width:this.getShallow("width",!1),height:this.getShallow("height",!1)}},n.prototype.getZLevelKey=function(){return""},n.prototype.setZLevel=function(t){this.option.zlevel=t},n.protoInitialize=void((e=n.prototype).type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0),n}(sR);rQ(lk,sR),r2(lk),a={},lk.registerSubTypeDefaulter=function(t,e){a[rK(t).main]=e},lk.determineSubType=function(t,e){var n=e.type;if(!n){var i=rK(t).main;lk.hasSubTypes(t)&&a[i]&&(n=a[i](e))}return n};var lC=function(t){var e=[];return tD(lk.getClassesByMainType(t),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=tI(e,function(t){return rK(t).main}),"dataset"!==t&&0>=tM(e,"dataset")&&e.unshift("dataset"),e};function lD(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}lk.topologicalTravel=function(t,e,n,i){if(t.length){var r,o,a,s=(o={},a=[],tD(r=e,function(t){var e,n,i,s=lD(o,t),l=(e=s.originalDeps=lC(t),n=r,i=[],tD(e,function(t){tM(n,t)>=0&&i.push(t)}),i);s.entryCount=l.length,0===s.entryCount&&a.push(t),tD(l,function(e){0>tM(s.predecessor,e)&&s.predecessor.push(e);var n=lD(o,e);0>tM(n.successor,e)&&n.successor.push(t)})}),{graph:o,noEntryList:a}),l=s.graph,u=s.noEntryList,h={};for(tD(t,function(t){h[t]=!0});u.length;){var c=u.pop(),p=l[c],d=!!h[c];d&&(n.call(i,c,p.originalDeps.slice()),delete h[c]),tD(p.successor,d?g:f)}tD(h,function(){throw Error("")})}function f(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function g(t){h[t]=!0,f(t)}};var lI={color:{},darkColor:{},size:{}},lA=lI.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};for(var lL in tS(lA,{primary:lA.neutral80,secondary:lA.neutral70,tertiary:lA.neutral60,quaternary:lA.neutral50,disabled:lA.neutral20,border:lA.neutral30,borderTint:lA.neutral20,borderShade:lA.neutral40,background:lA.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:lA.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:lA.neutral70,axisLineTint:lA.neutral40,axisTick:lA.neutral70,axisTickMinor:lA.neutral60,axisLabel:lA.neutral70,axisSplitLine:lA.neutral15,axisMinorSplitLine:lA.neutral05}),lA)if(lA.hasOwnProperty(lL)){var lP=lA[lL];"theme"===lL?lI.darkColor.theme=lA.theme.slice():"highlight"===lL?lI.darkColor.highlight="rgba(255,231,130,0.4)":0===lL.indexOf("accent")?lI.darkColor[lL]=nQ(lP,null,function(t){return .5*t},function(t){return Math.min(1,1.3-t)}):lI.darkColor[lL]=nQ(lP,null,function(t){return .9*t},function(t){return 1-Math.pow(t,1.5)})}lI.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var lO="";"u">typeof navigator&&(lO=navigator.platform||"");var lN="rgba(0, 0, 0, 0.2)",lR=lI.color.theme["0"],lB=nQ(lR,null,null,.9);let lE={darkMode:"auto",colorBy:"series",color:lI.color.theme,gradientColor:[lB,lR],aria:{decal:{decals:[{color:lN,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:lN,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:lN,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:lN,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:lN,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:lN,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:lO.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var lz=t2(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),lF="original",lV="arrayRows",lH="objectRows",lW="keyedColumns",lG="typedArray",lU="unknown",lX="column",lY=rV();function lq(t,e,n){var i,r,o={},a=lj(e);if(!a||!t)return o;var s=[],l=[],u=lY(e.ecModel).datasetMap,h=a.uid+"_"+n.seriesLayoutBy;tD(t=t.slice(),function(e,n){var a=tV(e)?e:t[n]={name:e};"ordinal"===a.type&&null==i&&(i=n,r=d(a)),o[a.name]=[]});var c=u.get(h)||u.set(h,{categoryWayDim:r,valueWayDim:0});function p(t,e,n){for(var i=0;ie)return t[i];return t[n-1]}(i,a):n;if((h=h||n)&&h.length){var c=h[l];return r&&(u[r]=c),s.paletteIdx=(l+1)%h.length,c}}(this,lJ,rA(this.get("color",!0)),this.get("colorLayer",!0),t,e,n)},t.prototype.clearColorPalette=function(){var t,e;t=this,(e=lJ)(t).paletteIdx=0,e(t).paletteNameMap={}},t}(),l1="\0_ec_inner",l2=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return te(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new sR(i),this._locale=new sR(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){var i=l4(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,l4(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):g(this,r),n=!0}if(("timeline"===t||"media"===t)&&this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,e))}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this);a.length&&tD(a,function(t){n=!0,this._mergeOption(t,e)},this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,o=[],a=t2(),s=e&&e.replaceMergeMainTypeMap;lY(this).datasetMap=t2(),tD(t,function(t,e){null!=t&&(lk.hasClass(e)?e&&(o.push(e),a.set(e,!0)):n[e]=null==n[e]?tw(t):tb(n[e],t,!0))}),s&&s.each(function(t,e){lk.hasClass(e)&&!a.get(e)&&(o.push(e),a.set(e,!0))}),lk.topologicalTravel(o,lk.getAllClassMainTypes(),function(e){var o,a,l,u,h,c,p,f,g,v,y,m,_,x,w,b,S,T,M,k,C=function(t,e,n){var i=lQ.get(e);if(!i)return n;var r=i(t);return r?n.concat(r):n}(this,e,rA(t[e])),D=i.get(e),I=D?s&&s.get(e)?"replaceMerge":"normalMerge":"replaceAll",A=(_=D,x=C,w="normalMerge"===I,b="replaceMerge"===I,S="replaceAll"===I,_=_||[],x=(x||[]).slice(),T=t2(),tD(x,function(t,e){if(!tV(t)){x[e]=null;return}}),M=function(t,e,n){var i=[];if("replaceAll"===n)return i;for(var r=0;r=0;a--)i[a]&&!rz(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}}),delete t[l1],t},e.prototype.setTheme=function(t){this._theme=new sR(t),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e){for(var r=0;r=a:"max"===s?o<=a:o===a)||(r=!1)}}),r})(o[u].query,i,r)&&s.push(u);return!s.length&&a&&(s=[-1]),s.length&&(e=s,n=this._currentMediaIndices,e.join(",")!==n.join(","))&&(l=tI(s,function(t){return tw(-1===t?a.option:o[t].option)})),this._currentMediaIndices=s,l},t}(),ut=tV,ue=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function un(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=ue.length;ntypeof console&&console.warn&&console.log;function uC(t,e){!function(t,e,n){if(uk){if(n){if(uM[e])return;uM[e]=!0}console[t]("[ECharts] "+e)}}("error",t,e)}function uD(t){throw Error(t)}var uI=function(){var t;function e(t,e){var n=um(t)?t:ux(t);this._source=n;var i=this._data=n.data,r=n.sourceFormat;n.seriesLayoutBy,r===lG&&(this._offset=0,this._dimSize=e,this._data=i),w(this,i,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(t,e){},e.prototype.appendData=function(t){},e.prototype.clean=function(){},e.protoInitialize=void((t=e.prototype).pure=!1,t.persistent=!0),e.internalField=function(){w=function(t,r,o){var a=o.sourceFormat,s=o.seriesLayoutBy,l=o.startIndex,u=o.dimensionsDefine;tS(t,x[uE(a,s)]),a===lG?(t.getItem=e,t.count=i,t.fillStorage=n):(t.getItem=tO(function(t,e){return uP[uE(t,e)]}(a,s),null,r,l,u),t.count=tO(function(t,e){return uN[uE(t,e)]}(a,s),null,r,l,u))};var t,e=function(t,e){t-=this._offset,e=e||[];for(var n=this._data,i=this._dimSize,r=i*t,o=0;ou&&(u=d)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""}):void 0},t.prototype.getRawValue=function(t,e){return uz(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,n){},t}();function uH(t){var e,n;return tV(t)?t.type&&(n=t):e=t,{text:e,frag:n}}function uW(t){return new uG(t)}var uG=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n,i,r,o=this._upstream,a=t&&t.skip;if(this._dirty&&o){var s=this.context;s.data=s.outputData=o.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!a&&(i=this._plan(this.context));var l=((e=this._modBy)>=1||(e=1),e),u=this._modDataCount||0,h=((n=t&&t.modBy)>=1||(n=1),n),c=t&&t.modDataCount||0;(l!==h||u!==c)&&(i="reset"),(this._dirty||"reset"===i)&&(this._dirty=!1,r=this._doReset(a)),this._modBy=h,this._modDataCount=c;var p=t&&t.step;if(o?this._dueEnd=o._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=p?this._dueIndex+p:1/0,this._dueEnd);if(!a&&(r||d1&&i>0?s:a}};return o;function a(){return e=t?null:oe},gte:function(t,e){return t>=e}};(function(t,e){tF(e)||uD(""),this._opFn=uY[t],this._rvalFloat=rk(e)}).prototype.evaluate=function(t){return tF(t)?this._opFn(t,this._rvalFloat):this._opFn(rk(t),this._rvalFloat)};var uq=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=tF(t)?t:rk(t),i=tF(e)?e:rk(e),r=isNaN(n),o=isNaN(i);if(r&&(n=this._incomparable),o&&(i=this._incomparable),r&&o){var a=tE(t),s=tE(e);a&&(n=s?t:0),s&&(i=a?e:0)}return ni?-this._resultLT:0},t}();(function(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=rk(e)}).prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n!==this._rvalTypeof&&("number"===n||"number"===this._rvalTypeof)&&(e=rk(t)===this._rvalFloat)}return this._isEQ?e:!e};var uZ=function(){function t(){}return t.prototype.getRawData=function(){throw Error("not supported")},t.prototype.getRawDataItem=function(t){throw Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return uX(t,e)},t}();function uj(t){return u0(t.sourceFormat)||uD(""),t.data}function uK(t){var e=t.sourceFormat,n=t.data;if(u0(e)||uD(""),e===lV){for(var i=[],r=0,o=n.length;r65535?u2:u5}function u9(){return[1/0,-1/0]}function u7(t,e,n,i,r){var o=u8[n||"float"];if(r){var a=t[e],s=a&&a.length;if(s!==i){for(var l=new o(i),u=0;ug[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},t.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,r=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=tI(o,function(t){return t.property}),u=0;uv[1]&&(v[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return -1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return -1},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;r=u&&v<=h||isNaN(v))&&(a[s++]=d),d++}p=!0}else if(2===r){for(var f=c[i[0]],y=c[i[1]],m=t[i[1]][0],_=t[i[1]][1],g=0;g=u&&v<=h||isNaN(v))&&(x>=m&&x<=_||isNaN(x))&&(a[s++]=d),d++}p=!0}}if(!p)if(1===r)for(var g=0;g=u&&v<=h||isNaN(v))&&(a[s++]=w)}else for(var g=0;gt[T][1])&&(b=!1)}b&&(a[s++]=e.getRawIndex(g))}return sv[1]&&(v[1]=g)}}}},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=this.clone([t],!0),a=o._chunks[t],s=this.count(),l=0,u=Math.floor(1/e),h=this.getRawIndex(0),c=new(u6(this._rawCount))(Math.min((Math.ceil(s/u)+2)*2,s));c[l++]=h;for(var p=1;pn&&(n=i,r=m)}M>0&&Ma&&(f=a-u);for(var g=0;gd&&(d=v,p=u+g)}var y=this.getRawIndex(h),m=this.getRawIndex(p);hu-d&&(a.length=s=u-d);for(var f=0;fh[1]&&(h[1]=v),c[p++]=y}return r._count=p,r._indices=c,r._updateGetRawIdx(),r},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();ra&&(a=l)}return e=[o,a],this._extent[t]=e,e},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,r=0;r=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,n,i){return uX(t[i],this._dimensions[i])}b={arrayRows:t,objectRows:function(t,e,n,i){return uX(t[e],this._dimensions[i])},keyedColumns:t,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return uX(r instanceof Array?r[i]:r,this._dimensions[i])},typedArray:function(t,e,n,i){return t[i]}}}(),t}(),he=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,i=this._getUpstreamSourceManagers(),r=!!i.length;if(hi(n)){var o=void 0,a=void 0,s=void 0;if(r){var l=i[0];l.prepareSource(),o=(s=l.getSource()).data,a=s.sourceFormat,e=[l._getVersionSign()]}else a=tW(o=n.get("data",!0))?lG:lF,e=[];var u=this._getSourceMetaRawOption()||{},h=s&&s.metaRawOption||{},c=tY(u.seriesLayoutBy,h.seriesLayoutBy)||null,p=tY(u.sourceHeader,h.sourceHeader),d=tY(u.dimensions,h.dimensions);t=c!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||d?[u_(o,{seriesLayoutBy:c,sourceHeader:p,dimensions:d},a)]:[]}else if(r){var f=this._applyTransform(i);t=f.sourceList,e=f.upstreamSignList}else t=[u_(n.get("source",!0),this._getSourceMetaRawOption(),null)],e=[];this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n,i=this._sourceHost,r=i.get("transform",!0),o=i.get("fromTransformResult",!0);null!=o&&1!==t.length&&hr("");var a=[],s=[];return(tD(t,function(t){t.prepareSource();var e=t.getSource(o||0);null==o||e||hr(""),a.push(e),s.push(t._getVersionSign())}),r)?n=function(t,e,n){var i=rA(t),r=i.length;r||uD("");for(var o=0;o1||i>0&&!e.noHeader;return tD(e.blocks,function(e){var i=t(e);i>=n&&(n=i+ +(r&&(!i||hh(e)&&!e.noHeader)))}),n}return 0}(e)],richText:hl[r]},s=[],l=e.blocks||[];tK(!l||tR(l)),l=l||[];var u=t.orderMode;if(e.sortBlocks&&u){l=l.slice();var h={valueAsc:"asc",valueDesc:"desc"};if(t3(h,u)){var c=new uq(h[u],null);l.sort(function(t,e){return c.evaluate(t.sortParam,e.sortParam)})}else"seriesDesc"===u&&l.reverse()}tD(l,function(n,r){var o=e.valueFormatter,l=(hh(n)?hc:hp)(o?tS(tS({},t),{valueFormatter:o}):t,n,r>0?a.html:0,i);null!=l&&s.push(l)});var p="richText"===t.renderMode?s.join(a.richText):hf(i,s.join(""),o?n:a.html);if(o)return p;var d=lo(e.header,"ordinal",t.useUTC),f=ha(i,t.renderMode).nameStyle,g=ho(i);return"richText"===t.renderMode?hg(t,d,f)+a.richText+p:hf(i,'
'+ex(d)+"
"+p,n)}function hp(t,e,n,i){var r=t.renderMode,o=e.noName,a=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,h=e.valueFormatter||t.valueFormatter||function(t){return tI(t=tR(t)?t:[t],function(t,e){return lo(t,tR(w)?w[e]:w,u)})};if(!o||!a){var c,p,d,f,g,v,y,m,_=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||lI.color.secondary,r),x=o?"":lo(l,"ordinal",u),w=e.valueType,b=a?[]:h(e.value,e.dataIndex),S=!s||!o,T=!s&&o,M=ha(i,r),k=M.nameStyle,C=M.valueStyle;return"richText"===r?(s?"":_)+(o?"":hg(t,x,k))+(a?"":(c=t,p=b,d=S,f=T,g=[C],d&&g.push({padding:[0,0,0,f?10:20],align:"right"}),c.markupStyleCreator.wrapRichTextStyle(tR(p)?p.join(" "):p,g))):hf(i,(s?"":_)+(o?"":''+ex(x)+"")+(a?"":(v=b,y=S,m=T,''+tI(v=tR(v)?v:[v],function(t){return ex(t)}).join("  ")+"")),n)}}function hd(t,e,n,i,r,o){if(t)return(hh(t)?hc:hp)({useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,o)}function hf(t,e,n){return'
'+e+'
'}function hg(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function hv(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var hy=function(){function t(){this.richTextStyles={},this._nextStyleNameId=rC()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var i,r,o,a,s,l,u="richText"===n?this._generateStyleName():null,h=(a=(o=tE(i={color:e,type:t,renderMode:n,markerId:u})?{color:i,extraCssText:r}:i||{}).color,s=o.type,r=o.extraCssText,l=o.renderMode||"html",a?"html"===l?"subItem"===s?'':'':{renderMode:l,content:"{"+(o.markerId||"markerX")+"|} ",style:"subItem"===s?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}:"");return tE(h)?h:(this.richTextStyles[u]=h.style,h.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};tR(e)?tD(e,function(t){return tS(n,t)}):tS(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}(),hm=rV();function h_(t,e){return t.getName(e)||t.getId(e)}var hx=function(t){var e;function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return te(n,t),n.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=uW({count:hb,reset:hS}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(hm(this).sourceManager=new he(this)).prepareSource();var i=this.getInitialData(t,n);hM(i,this),this.dataTask.context.data=i,hm(this).dataBeforeProcessed=i,hw(this),this._initSelectedMapFromData(i)},n.prototype.mergeDefaultAndTheme=function(t,e){var n=lb(this),i=n?lT({},t):{},r=this.subType;lk.hasClass(r)&&(r+="Series"),tb(t,e.getTheme().get(this.subType)),tb(t,this.getDefaultOption()),rL(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&lS(t,i,n)},n.prototype.mergeOption=function(t,e){t=tb(this.option,t,!0),this.fillDataTextStyle(t.data);var n=lb(this);n&&lS(this.option,t,n);var i=hm(this).sourceManager;i.dirty(),i.prepareSource();var r=this.getInitialData(t,e);hM(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,hm(this).dataBeforeProcessed=r,hw(this),this._initSelectedMapFromData(r)},n.prototype.fillDataTextStyle=function(t){if(t&&!tW(t))for(var e=["show"],n=0;n=0&&h<0)&&(u=r,h=n,c=0),n===h&&(l[c++]=e))}),l.length=c,l},n.prototype.formatTooltip=function(t,e,n){return function(t){var e,n,i,r,o=t.series,a=t.dataIndex,s=t.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),h=u.length,c=o.getRawValue(a),p=tR(c),d=lu(o.getData().getItemVisual(a,"style")[o.visualDrawType]);if(h>1||p&&!h){var f=function(t,e,n,i,r){var o=e.getData(),a=tA(t,function(t,e,n){var i=o.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName},!1),s=[],l=[],u=[];function h(t,e){var n=o.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(a?u.push(hu("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:t,valueType:n.type})):(s.push(t),l.push(n.type)))}return i.length?tD(i,function(t){h(uz(o,n,t),t)}):tD(t,h),{inlineValues:s,inlineValueTypes:l,blocks:u}}(c,o,a,u,d);e=f.inlineValues,n=f.inlineValueTypes,i=f.blocks,r=f.inlineValues[0]}else if(h){var g=l.getDimensionInfo(u[0]);r=e=uz(l,a,u[0]),n=g.type}else r=e=p?c[0]:c;var v=rE(o),y=v&&o.name||"",m=l.getName(a),_=s?y:m;return hu("section",{header:y,noHeader:s||!v,sortParam:r,blocks:[hu("nameValue",{markerType:"item",markerColor:d,name:_,noName:!t$(_),value:e,valueType:n,dataIndex:a})].concat(i||[])})}({series:this,dataIndex:t,multipleSeries:e})},n.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(ti.node&&!(t&&t.ssr))return!1;var e=this.getShallow("animation");return e&&this.getData().count()>this.getShallow("animationThreshold")&&(e=!1),!!e},n.prototype.restoreData=function(){this.dataTask.dirty()},n.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=l0.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},n.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},n.prototype.getProgressive=function(){return this.get("progressive")},n.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},n.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},n.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(e);if("series"===i||"all"===n){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var o=0;o=0&&n.push(r)}return n},n.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(e);return("all"===n||n[h_(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},n.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},n.prototype._innerSelect=function(t,e){var n,i,r=this.option,o=r.selectedMode,a=e.length;if(o&&a){if("series"===o)r.selectedMap="all";else if("multiple"===o){tV(r.selectedMap)||(r.selectedMap={});for(var s=r.selectedMap,l=0;l0&&this._innerSelect(t,e)}},n.registerClass=function(t){return lk.registerClass(t)},n.protoInitialize=void((e=n.prototype).type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"),n}(lk);function hw(t){var e,n,i,r=t.name;rE(t)||(t.name=(n=(e=t.getRawData()).mapDimensionsAll("seriesName"),i=[],tD(n,function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)}),i.join(" ")||r))}function hb(t){return t.model.getRawData().count()}function hS(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),hT}function hT(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function hM(t,e){tD(function(t,e){for(var n=new t.constructor(t.length+e.length),i=0;i1&&(a*=hN(f),s*=hN(f));var g=(r===o?-1:1)*hN((a*a*(s*s)-a*a*(d*d)-s*s*(p*p))/(a*a*(d*d)+s*s*(p*p)))||0,v=g*a*d/s,y=-(g*s)*p/a,m=(t+n)/2+hB(c)*v-hR(c)*y,_=(e+i)/2+hR(c)*v+hB(c)*y,x=hV([1,0],[(p-v)/a,(d-y)/s]),w=[(p-v)/a,(d-y)/s],b=[(-1*p-v)/a,(-1*d-y)/s],S=hV(w,b);if(-1>=hF(w,b)&&(S=hE),hF(w,b)>=1&&(S=0),S<0){var T=Math.round(S/hE*1e6)/1e6;S=2*hE+T%2*hE}h.addData(u,m,_,a,s,x,S,c,o)}var hW=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,hG=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,hU=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return t9(e,t),e.prototype.applyTransform=function(t){},e}(an);function hX(t){return null!=t.setData}function hY(t,e){var n=function(t){var e,n=new oQ;if(!t)return n;var i=0,r=0,o=0,a=0,s=oQ.CMD,l=t.match(hW);if(!l)return n;for(var u=0;uA*A+L*L&&(T=k,M=C),{cx:T,cy:M,x0:-h,y0:-c,x1:T*(r/w-1),y1:M*(r/w-1)}}var ct=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},ce=function(t){function e(e){return t.call(this,e)||this}return t9(e,t),e.prototype.getDefaultShape=function(){return new ct},e.prototype.buildPath=function(t,e){!function(t,e){var n,i=h6(e.r,0),r=h6(e.r0||0,0),o=i>0,a=r>0;if(o||a){if(o||(i=r,r=0),r>i){var s=i;i=r,r=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var h=e.cx,c=e.cy,p=!!e.clockwise,d=h4(u-l),f=d>h0&&d%h0;if(f>1e-4&&(d=f),i>1e-4)if(d>h0-1e-4)t.moveTo(h+i*h2(l),c+i*h1(l)),t.arc(h,c,i,l,u,!p),r>1e-4&&(t.moveTo(h+r*h2(u),c+r*h1(u)),t.arc(h,c,r,u,l,p));else{var g=void 0,v=void 0,y=void 0,m=void 0,_=void 0,x=void 0,w=void 0,b=void 0,S=void 0,T=void 0,M=void 0,k=void 0,C=void 0,D=void 0,I=void 0,A=void 0,L=i*h2(l),P=i*h1(l),O=r*h2(u),N=r*h1(u),R=d>1e-4;if(R){var B=e.cornerRadius;B&&(g=(n=function(t){var e;if(tR(t)){var n=t.length;if(!n)return t;e=1===n?[t[0],t[0],0,0]:2===n?[t[0],t[0],t[1],t[1]]:3===n?t.concat(t[2]):t}else e=[t,t,t,t];return e}(B))[0],v=n[1],y=n[2],m=n[3]);var E=h4(i-r)/2;if(_=h9(E,y),x=h9(E,m),w=h9(E,g),b=h9(E,v),M=S=h6(_,x),k=T=h6(w,b),(S>1e-4||T>1e-4)&&(C=i*h2(u),D=i*h1(u),I=r*h2(l),A=r*h1(l),d1e-4){var X=h9(y,M),Y=h9(m,M),q=h7(I,A,L,P,i,X,p),Z=h7(C,D,O,N,i,Y,p);t.moveTo(h+q.cx+q.x0,c+q.cy+q.y0),M0&&t.arc(h+q.cx,c+q.cy,X,h3(q.y0,q.x0),h3(q.y1,q.x1),!p),t.arc(h,c,i,h3(q.cy+q.y1,q.cx+q.x1),h3(Z.cy+Z.y1,Z.cx+Z.x1),!p),Y>0&&t.arc(h+Z.cx,c+Z.cy,Y,h3(Z.y1,Z.x1),h3(Z.y0,Z.x0),!p))}else t.moveTo(h+L,c+P),t.arc(h,c,i,l,u,!p);else t.moveTo(h+L,c+P);if(r>1e-4&&R)if(k>1e-4){var X=h9(g,k),Y=h9(v,k),q=h7(O,N,C,D,r,-Y,p),Z=h7(L,P,I,A,r,-X,p);t.lineTo(h+q.cx+q.x0,c+q.cy+q.y0),k0&&t.arc(h+q.cx,c+q.cy,Y,h3(q.y0,q.x0),h3(q.y1,q.x1),!p),t.arc(h,c,r,h3(q.cy+q.y1,q.cx+q.x1),h3(Z.cy+Z.y1,Z.cx+Z.x1),p),X>0&&t.arc(h+Z.cx,c+Z.cy,X,h3(Z.y1,Z.x1),h3(Z.y0,Z.x0),!p))}else t.lineTo(h+O,c+N),t.arc(h,c,r,u,l,p);else t.lineTo(h+O,c+N)}else t.moveTo(h,c);t.closePath()}}}(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(an);ce.prototype.type="sector";let cn=ce;var ci=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},cr=function(t){function e(e){return t.call(this,e)||this}return t9(e,t),e.prototype.getDefaultShape=function(){return new ci},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)},e}(an);cr.prototype.type="ring";let co=cr;function ca(t,e,n){var i=e.smooth,r=e.points;if(r&&r.length>=2){if(i){var o=function(t,e,n,i){var r,o,a,s,l=[],u=[],h=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,d=t.length;pcO[1]){if(r=!1,cN.negativeSize||n)return r;var s=cL(cO[0]-cP[1]),l=cL(cP[0]-cO[1]);cI(s,l)>cB.len()&&(s=l||!cN.bidirectional)&&(eF.scale(cR,a,-l*i),cN.useDir&&cN.calcDirMTV()))}}return r},t.prototype._getProjMinMaxOnAxis=function(t,e,n){for(var i=this._axes[t],r=this._origin,o=e[0].dot(i)+r[t],a=o,s=o,l=1;l0){var c={duration:h.duration,delay:h.delay||0,easing:h.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:t,during:a};l?e.animateFrom(n,c):e.animateTo(n,c)}else e.stopAnimation(),l||e.attr(n),a&&a(1),o&&o()}function cW(t,e,n,i,r,o){cH("update",t,e,n,i,r,o)}function cG(t,e,n,i,r,o){cH("enter",t,e,n,i,r,o)}function cU(t){if(!t.__zr)return!0;for(var e=0;erf(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function pr(t,e,n){if(t&&e){var i,r=(i={},t.traverse(function(t){!t.isGroup&&t.anid&&(i[t.anid]=t)}),i);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),cW(t,i,n,aN(t).dataIndex)}}})}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return null!=t.shape&&(e.shape=tw(t.shape)),e}}function po(t,e){return tI(t,function(t){var n=t[0];n=rp(n=rd(n,e.x),e.x+e.width);var i=t[1];return[n,i=rp(i=rd(i,e.y),e.y+e.height)]})}function pa(t,e){var n=rd(t.x,e.x),i=rp(t.x+t.width,e.x+e.width),r=rd(t.y,e.y),o=rp(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function ps(t,e,n){var i=tS({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),tT(r,n),new al(i)):c5(t.replace("path://",""),i,n,"center")}function pl(t,e,n,i,r){for(var o=0,a=r[r.length-1];o=-1e-6)return!1;var f=t-r,g=e-o,v=(f*h-u*g)/d;if(v<0||v>1)return!1;var y=(f*p-c*g)/d;return!(y<0)&&!(y>1)}function ph(t,e,n,i,r){return null==e||(tF(e)?pc[0]=pc[1]=pc[2]=pc[3]=e:(pc[0]=e[0],pc[1]=e[1],pc[2]=e[2],pc[3]=e[3]),i&&(pc[0]=rd(0,pc[0]),pc[1]=rd(0,pc[1]),pc[2]=rd(0,pc[2]),pc[3]=rd(0,pc[3])),n&&(pc[0]=-pc[0],pc[1]=-pc[1],pc[2]=-pc[2],pc[3]=-pc[3]),pp(t,pc,"x","width",3,1,r&&r[0]||0),pp(t,pc,"y","height",0,2,r&&r[1]||0)),t}var pc=[0,0,0,0];function pp(t,e,n,i,r,o,a){var s=e[o]+e[r],l=t[i];t[i]+=s,a=rd(0,rp(a,l)),t[i]=0?-e[r]:e[o]>=0?l+e[o]:rf(s)>1e-8?(l-a)*e[r]/s:0):t[n]-=e[r]}function pd(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=tE(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&tD(tP(l),function(t){t3(s,t)||(s[t]=l[t],s.$vars.push(t))});var u=aN(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:tT({content:i,encodeHTMLContent:!0,formatterParams:s},r)}}function pf(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function pg(t,e){if(t)if(tR(t))for(var n=0;ne&&(e=i),ie&&(n=e=0),{min:n,max:e}}function pb(t,e,n){!function t(e,n,i,r){if(e.ignoreModelZ)return r;var o=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var s=e.childrenRef(),l=0;l=0?c():h=setTimeout(c,-r),l=i};return p.clear=function(){h&&(clearTimeout(h),h=null)},p.debounceNextCall=function(t){s=t},p}function pR(t,e,n,i){var r=t[e];if(r){var o=r[pL]||r,a=r[pO];if(r[pP]!==n||a!==i){if(null==n||!i)return t[e]=o;(r=t[e]=pN(o,n,"debounce"===i))[pL]=o,r[pO]=i,r[pP]=n}return r}}function pB(t,e){var n=t[e];n&&n[pL]&&(n.clear&&n.clear(),t[e]=n[pL])}var pE=rV(),pz={itemStyle:r5(sP,!0),lineStyle:r5(sI,!0)},pF={lineStyle:"stroke",itemStyle:"fill"};function pV(t,e){var n=t.visualStyleMapper||pz[e];return n||(console.warn("Unknown style type '"+e+"'."),pz.itemStyle)}function pH(t,e){var n=t.visualDrawType||pF[e];return n||(console.warn("Unknown style type '"+e+"'."),"fill")}var pW=new sR,pG=Math.PI,pU=function(){function t(t,e,n,i){this._stageTaskMap=t2(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount,a=null!=o?Math.ceil(o/r):null;return{step:r,modBy:a,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=t2();t.eachSeries(function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)})},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;tD(this._allHandlers,function(i){var r=t.get(i.uid)||t.set(i.uid,{});tK(!(i.reset&&i.overallReset),""),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)},this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,o=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}tD(t,function(t,s){if(!i.visualType||i.visualType===t.visualType){var l=o._stageTaskMap.get(t.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,p=h.agentStubMap;p.each(function(t){a(i,t)&&(t.dirty(),c=!0)}),c&&h.dirty(),o.updatePayload(h,n);var d=o.getPerformArgs(h,i.block);p.each(function(t){t.perform(d)}),h.perform(d)&&(r=!0)}else u&&u.each(function(s,l){a(i,s)&&s.dirty();var u=o.getPerformArgs(s,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(r=!0)})}}),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,o=e.seriesTaskMap,a=e.seriesTaskMap=t2(),s=t.seriesType,l=t.getTargetSeries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||uW({plan:pj,reset:pK,count:pJ}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,i).each(u)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||uW({reset:pX});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=t2(),l=t.seriesType,u=t.getTargetSeries,h=!0,c=!1;function p(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(c=!0,uW({reset:pY,onDirty:pZ})));n.context={model:t,overallProgress:h},n.agent=o,n.__block=h,r._pipe(t,n)}tK(!t.createOnAllSeries,""),l?n.eachRawSeriesByType(l,p):u?u(n,i).each(p):(h=!1,tD(n.getSeries(),p)),c&&o.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);i.head||(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return tB(t)&&(t={overallReset:t,seriesType:function(t){S=null;try{t(p0,p1)}catch(t){}return S}(t)}),t.uid=sE("stageHandler"),e&&(t.visualType=e),t},t}();function pX(t){t.overallReset(t.ecModel,t.api,t.payload)}function pY(t){return t.overallProgress&&pq}function pq(){this.agent.dirty(),this.getDownstream().dirty()}function pZ(){this.agent&&this.agent.dirty()}function pj(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function pK(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=rA(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?tI(e,function(t,e){return pQ(e)}):p$}var p$=pQ(0);function pQ(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)})}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),p7=["symbol","symbolSize","symbolRotate","symbolOffset"],dt=p7.concat(["symbolKeepAspect"]);function de(t,e,n,i,r){var o=t+e;n.isSilent(o)||i.eachComponent({mainType:"series",subType:"pie"},function(t){for(var e=t.seriesIndex,i=t.option.selectedMap,a=r.selected,s=0;s=0&&dv(l)?l:.5,t.createRadialGradient(a,s,0,a,s,l)):(u=null==e.x?0:e.x,h=null==e.x2?1:e.x2,c=null==e.y?0:e.y,p=null==e.y2?0:e.y2,e.global||(u=u*n.width+n.x,h=h*n.width+n.x,c=c*n.height+n.y,p=p*n.height+n.y),u=dv(u)?u:0,h=dv(h)?h:1,c=dv(c)?c:0,p=dv(p)?p:0,t.createLinearGradient(u,c,h,p)),f=e.colorStops,g=0;g0&&(e=i.lineDash,n=i.lineWidth,e&&"solid"!==e&&n>0?"dashed"===e?[4*n,2*n]:"dotted"===e?[n]:tF(e)?[e]:tR(e)?e:null:null),o=i.lineDashOffset;if(r){var a=i.strokeNoScale&&t.getLineScale?t.getLineScale():1;a&&1!==a&&(r=tI(r,function(t){return t/a}),o/=a)}return[r,o]}var dw=new oQ(!0);function db(t){var e=t.stroke;return null!=e&&"none"!==e&&t.lineWidth>0}function dS(t){return"string"==typeof t&&"none"!==t}function dT(t){var e=t.fill;return null!=e&&"none"!==e}function dM(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function dk(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function dC(t,e,n){var i=r6(e.image,e.__image,n);if(r7(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix&&r&&r.setTransform){var o=new DOMMatrix;o.translateSelf(e.x||0,e.y||0),o.rotateSelf(0,0,(e.rotation||0)*t8),o.scaleSelf(e.scaleX||1,e.scaleY||1),r.setTransform(o)}return r}}var dD=["shadowBlur","shadowOffsetX","shadowOffsetY"],dI=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function dA(t,e,n,i,r){var o=!1;if(!i&&e===(n=n||{}))return!1;if(i||e.opacity!==n.opacity){dO(t,r),o=!0;var a=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(a)?ov.opacity:a}(i||e.blend!==n.blend)&&(o||(dO(t,r),o=!0),t.globalCompositeOperation=e.blend||ov.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,e,n){if(!this[dW]){if(this._disposed)return void this.id;if(tV(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,o=e.transition,e=e.notMerge),this[dW]=!0,W(this),!this._model||e){var i,r,o,a=new l7(this._api),s=this._theme,l=this._model=new l2;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:r},d8);var u={seriesTransition:o,optionChanged:!0};if(n)this[dU]={silent:i,updateParams:u},this[dW]=!1,this.getZr().wakeUp();else{try{T(this),C.update.call(this,null,u)}catch(t){throw this[dU]=null,this[dW]=!1,t}this._ssr||this._zr.flush(),this[dU]=null,this[dW]=!1,L.call(this,i),P.call(this,i)}}},e.prototype.setTheme=function(t,e){if(!this[dW]){if(this._disposed)return void this.id;var n=this._model;if(n){var i=e&&e.silent,r=null;this[dU]&&(null==i&&(i=this[dU].silent),r=this[dU].updateParams,this[dU]=null),this[dW]=!0,W(this);try{this._updateTheme(t),n.setTheme(this._theme),T(this),C.update.call(this,{type:"setTheme"},r)}catch(t){throw this[dW]=!1,t}this[dW]=!1,L.call(this,i),P.call(this,i)}}},e.prototype._updateTheme=function(t){tE(t)&&(t=d9[t]),t&&((t=tw(t))&&uv(t,!0),this._theme=t)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||ti.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){return t=t||{},this._zr.painter.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){return t=t||{},this._zr.painter.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){var t=this._zr;return tD(t.storage.getDisplayList(),function(t){t.stopAnimation(null,!0)}),t.painter.toDataURL()},e.prototype.getDataURL=function(t){if(this._disposed)return void this.id;var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;tD(e,function(t){n.eachComponent({mainType:t},function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)})});var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return tD(i,function(t){t.group.ignore=!1}),o},e.prototype.getConnectedDataURL=function(t){if(this._disposed)return void this.id;var e="svg"===t.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if(!fe[n])return this.getDataURL(t);var a=o,s=o,l=-o,u=-o,h=[],c=t&&t.pixelRatio||this.getDevicePixelRatio();tD(ft,function(o,c){if(o.group===n){var p=e?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(tw(t)),d=o.getDom().getBoundingClientRect();a=i(d.left,a),s=i(d.top,s),l=r(d.right,l),u=r(d.bottom,u),h.push({dom:p,left:d.left,top:d.top})}}),a*=c,s*=c,l*=c,u*=c;var p=l-a,d=u-s,f=ts.createCanvas(),g=rc(f,{renderer:e?"svg":"canvas"});if(g.resize({width:p,height:d}),!e)return t.connectedBackgroundColor&&g.add(new av({shape:{x:0,y:0,width:p,height:d},style:{fill:t.connectedBackgroundColor}})),tD(h,function(t){var e=new al({style:{x:t.left*c-a,y:t.top*c-s,image:t.dom}});g.add(e)}),g.refreshImmediately(),f.toDataURL("image/"+(t&&t.type||"png"));var v="";return tD(h,function(t){var e=t.left-a,n=t.top-s;v+=''+t.dom+""}),g.painter.getSvgRoot().innerHTML=v,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()},e.prototype.convertToPixel=function(t,e,n){return D(this,"convertToPixel",t,e,n)},e.prototype.convertToLayout=function(t,e,n){return D(this,"convertToLayout",t,e,n)},e.prototype.convertFromPixel=function(t,e,n){return D(this,"convertFromPixel",t,e,n)},e.prototype.containPixel=function(t,e){var n;return this._disposed?void this.id:(tD(rW(this._model,t),function(t,i){i.indexOf("Models")>=0&&tD(t,function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}},this)},this),!!n)},e.prototype.getVisual=function(t,e){var n=rW(this._model,t,{defaultMainType:"series"}),i=n.seriesModel.getData(),r=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?i.indexOfRawIndex(n.dataIndex):null;return null!=r?function(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n)}}(i,r,e):function(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}(i,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t,e,n=this;tD(d1,function(t){var e=function(e){var i,r=n.getModel(),o=e.target;if("globalout"===t?i={}:o&&dn(o,function(t){var e=aN(t);if(e&&null!=e.dataIndex){var n=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return i=n&&n.getDataParams(e.dataIndex,e.dataType,o)||{},!0}if(e.eventData)return i=tS({},e.eventData),!0},!0),i){var a=i.componentType,s=i.componentIndex;("markLine"===a||"markPoint"===a||"markArea"===a)&&(a="series",s=i.seriesIndex);var l=a&&null!=s&&r.getComponent(a,s),u=l&&n["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];i.event=e,i.type=t,n._$eventProcessor.eventInfo={targetEl:o,packedEvent:i,model:l,view:u},n.trigger(t,i)}};e.zrEventfulCallAtLast=!0,n._zr.on(t,e,n)});var i=this._messageCenter;tD(d3,function(t,e){i.on(e,function(t){n.trigger(e,t)})}),t=this,e=this._api,i.on("selectchanged",function(n){var i=e.getModel();n.isFromClick?(de("map","selectchanged",t,i,n),de("pie","selectchanged",t,i,n)):"select"===n.fromAction?(de("map","selected",t,i,n),de("pie","selected",t,i,n)):"unselect"===n.fromAction&&(de("map","unselected",t,i,n),de("pie","unselected",t,i,n))})},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)return void this.id;this._disposed=!0,this.getDom()&&rY(this.getDom(),fi,"");var t=this._api,e=this._model;tD(this._componentsViews,function(n){n.dispose(e,t)}),tD(this._chartsViews,function(n){n.dispose(e,t)}),this._zr.dispose(),this._dom=this._model=this._chartsMap=this._componentsMap=this._chartsViews=this._componentsViews=this._scheduler=this._api=this._zr=this._throttledZrFlush=this._theme=this._coordSysMgr=this._messageCenter=null,delete ft[this.id]},e.prototype.resize=function(t){if(!this[dW]){if(this._disposed)return void this.id;this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[dU]&&(null==i&&(i=this[dU].silent),n=!0,this[dU]=null),this[dW]=!0,W(this);try{n&&T(this),C.update.call(this,{type:"resize",animation:tS({duration:0},t&&t.animation)})}catch(t){throw this[dW]=!1,t}this[dW]=!1,L.call(this,i),P.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)return void this.id;if(tV(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),d7[t]){var n=d7[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=tS({},t);return e.type=d5[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)return void this.id;if((tV(e)||(e={silent:!!e}),d2[t.type])&&this._model){if(this[dW])return void this._pendingActions.push(t);var n=e.silent;A.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&ti.browser.weChat&&this._throttledZrFlush(),L.call(this,n),P.call(this,n)}},e.prototype.updateLabelLayout=function(){dV.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)return void this.id;var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function e(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.eachRendered(function(t){if(t.states&&t.states.emphasis&&!cU(t)){if(t instanceof an&&((n=az(t)).normalFill=t.style.fill,n.normalStroke=t.style.stroke,n.selectFill=(i=t.states.select||{}).style&&i.style.fill||null,n.selectStroke=i.style&&i.style.stroke||null),t.__dirty){var n,i,o=t.prevStates;o&&t.useStates(o)}if(r){t.stateTransition=a;var s=t.getTextContent(),l=t.getTextGuideLine();s&&(s.stateTransition=a),l&&(l.stateTransition=a)}t.__dirty&&e(t)}})}T=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),M(t,!0),M(t,!1),e.plan()},M=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;lh.get("hoverLayerThreshold"))||ti.node||ti.worker||h.eachSeries(function(t){if(!t.preventUsingHoverLayer){var e=u._chartsMap[t.__viewId];e.__alive&&e.eachRendered(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})}}),dV.trigger("series:afterupdate",e,o,s)},V=function(t){t[dX]=!0,t.getZr().wakeUp()},W=function(t){t[dG]=(t[dG]+1)%1e3},H=function(t){t[dX]&&(t.getZr().storage.traverse(function(t){cU(t)||e(t)}),t[dX]=!1)},z=function(t){return new(function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return te(n,e),n.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},n.prototype.enterEmphasis=function(e,n){a6(e,n),V(t)},n.prototype.leaveEmphasis=function(e,n){a9(e,n),V(t)},n.prototype.enterBlur=function(e){a2(e,aQ),V(t)},n.prototype.leaveBlur=function(e){a2(e,aJ),V(t)},n.prototype.enterSelect=function(e){a2(e,a0),V(t)},n.prototype.leaveSelect=function(e){a2(e,a1),V(t)},n.prototype.getModel=function(){return t.getModel()},n.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},n.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},n.prototype.getMainProcessVersion=function(){return t[dG]},n}(l6))(t)},F=function(t){function e(t,e){for(var n=0;ntM(d8,t)&&d8.push(t)}function fa(t,e){fc(d4,t,e,2e3)}function fs(t,e){dV.on(t,e)}function fl(t,e,n){function i(t){return t.toLowerCase()}tB(e)&&(n=e,e=""),tV(t)?(r=t.type,l=t.event,a=t.update,s=t.publishNonRefinedEvent,n||(n=t.action),o=t.refineEvent):(r=t,l=e);var r,o,a,s,l=i(l||r),u=o?i(r):l;d2[r]||(tK(dY.test(r)&&dY.test(l)),o&&tK(l!==r),d2[r]={actionType:r,refinedEventType:l,nonRefinedEventType:u,update:a,action:n,refineEvent:o},d3[l]=1,o&&s&&(d3[u]=1),d5[u]=r)}function fu(t,e){fc(d6,t,e,3e3,"visual")}var fh=[];function fc(t,e,n,i,r){if((tB(e)||tV(e))&&(n=e,e=i),!(tM(fh,n)>=0)){fh.push(n);var o=pU.wrapStageHandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function fp(t,e,n,i){var r;return{eventContent:{selected:(r=[],n.eachSeries(function(t){tD(t.getAllData(),function(e){e.data;var n=e.type,i=t.getSelectedDataIndices();if(i.length>0){var o={dataIndex:i,seriesIndex:t.seriesIndex};null!=n&&(o.dataType=n),r.push(o)}})}),r),isFromClick:e.isFromClick||!1}}}fu(2e3,{createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),o=pV(t,i)(r),a=r.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=pH(t,i),l=o[s],u=tB(l)?l:null,h="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||h){var c=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[s]||(o[s]=c,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||tB(o.fill)?c:o.fill,o.stroke="auto"===o.stroke||tB(o.stroke)?c:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!e.isSeriesFiltered(t)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=tS({},o);r[s]=u(i),e.setItemVisual(n,"style",r)}}}}),fu(4500,{createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=pV(t,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){pW.option=n[i];var a=r(pW);tS(t.ensureUniqueItemVisual(e,"style"),a),pW.option.decal&&(t.setItemVisual(e,"decal",pW.option.decal),pW.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}}),fu(4500,{performRawSeries:!0,overallReset:function(t){var e=t2();t.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,r=e.get(i);r||(r={},e.set(i,r)),pE(t).scope=r}}),t.eachSeries(function(e){if(!(e.isColorBySeries()||t.isSeriesFiltered(e))){var n=e.getRawData(),i={},r=e.getData(),o=pE(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=pH(e,a);r.each(function(t){i[r.getRawIndex(t)]=t}),n.each(function(t){var a=i[t];if(r.getItemVisual(a,"colorFromPalette")){var l=r.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",h=n.count();l[s]=e.getColorFromPalette(u,o,h)}})}})}}),fu(2e3,{createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var i={},r={},o=!1,a=0;a0?t[n-1].seriesModel:null)}),tD(e=t,function(t,n){var i=[],r=[NaN,NaN],o=[t.stackResultDimension,t.stackedOverDimension],a=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";a.modify(o,function(o,u,h){var c,p,d=a.get(t.stackedDimension,h);if(isNaN(d))return r;s?p=a.getRawIndex(h):c=a.get(t.stackedByDimension,h);for(var f=NaN,g=n-1;g>=0;g--){var v=e[g];if(s||(p=v.data.rawIndexOf(v.stackedByDimension,c)),p>=0){var y=v.data.getByRawIndex(v.stackResultDimension,p);if("all"===l||"positive"===l&&y>0||"negative"===l&&y<0||"samesign"===l&&d>=0&&y>0||"samesign"===l&&d<=0&&y<0){d=function(t,e){var n=Math.max(r_(t),r_(e)),i=t+e;return n>20?i:rm(i,n)}(d,y),f=y;break}}}return i[0]=d,i[1]=f,i})}))})}),d7.default=function(t,e){tT(e=e||{},{text:"loading",textColor:lI.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:lI.color.theme["0"],spinnerRadius:10,lineWidth:5,zlevel:0});var n,i=new rs,r=new av({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});i.add(r);var o=new aO({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new av({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return i.add(a),e.showSpinner&&((n=new cT({shape:{startAngle:-pG/2,endAngle:-pG/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*pG/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*pG/2}).delay(300).start("circularInOut"),i.add(n)),i.resize=function(){var i=o.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&i?10:0)-i)/2-(e.showSpinner&&i?0:5+i/2)+(e.showSpinner?0:i/2)+(i?0:s),u=t.getHeight()/2;e.showSpinner&&n.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},i.resize(),i},fl({type:aW,event:aW,update:aW},t4),fl({type:aG,event:aG,update:aG},t4),fl({type:aU,event:aq,update:aU,action:t4,refineEvent:fp,publishNonRefinedEvent:!0}),fl({type:aX,event:aq,update:aX,action:t4,refineEvent:fp,publishNonRefinedEvent:!0}),fl({type:aY,event:aq,update:aY,action:t4,refineEvent:fp,publishNonRefinedEvent:!0}),d9.default={},d9.dark=p6;var fd={},ff=[],fg={registerPreprocessor:fo,registerProcessor:fa,registerPostInit:function(t){fs("afterinit",t)},registerPostUpdate:function(t){fs("afterupdate",t)},registerUpdateLifecycle:fs,registerAction:fl,registerCoordinateSystem:function(t,e){ld.register(t,e)},registerLayout:function(t,e){fc(d6,t,e,1e3,"layout")},registerVisual:fu,registerTransform:function(t){var e=(t=tw(t)).type;e||uD("");var n=e.split(":");2!==n.length&&uD("");var i=!1;"echarts"===n[0]&&(e=n[1],i=!0),t.__isBuiltIn=i,uJ.set(e,t)},registerLoading:function(t,e){d7[t]=e},registerMap:function(t,e,n){var i=dH.registerMap;i&&i(t,e,n)},registerImpl:function(t,e){dH[t]=e},PRIORITY:{PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:4500,ARIA:6e3,DECAL:7e3}},ComponentModel:lk,ComponentView:hD,SeriesModel:hx,ChartView:pM,registerComponentModel:function(t){lk.registerClass(t)},registerComponentView:function(t){hD.registerClass(t)},registerSeriesModel:function(t){hx.registerClass(t)},registerChartView:function(t){pM.registerClass(t)},registerCustomSeries:function(t,e){fd[t]=e},registerSubTypeDefaulter:function(t,e){lk.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){rl[t]=e}};function fv(t){tR(t)?tD(t,function(t){fv(t)}):tM(ff,t)>=0||(ff.push(t),tB(t)&&(t={install:t}),t.install(fg))}var fy=rV(),fm={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},f_=function(){function t(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=fb(this.source)))},t.prototype.getSourceDimensionIndex=function(t){return tY(this._dimNameMap.get(t),-1)},t.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},t.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=uT(this.source),n=!(t>30),i="",r=[],o=0,a=0;otypeof Float32Array,fM=fT?Float32Array:Array;function fk(t){return tR(t)?fT?new Float32Array(t):t:new fM(t)}function fC(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function fD(t){return t.dim+t.index}function fI(t,e){var n=[];return e.eachSeriesByType(t,function(t){fP(t)&&n.push(t)}),n}function fA(t){var e,n,i=function(t){var e={};tD(t,function(t){var n=t.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var i=t.getData(),r=n.dim+"_"+n.index,o=i.getDimensionIndex(i.mapDimension(n.dim)),a=i.getStore(),s=0,l=a.count();s0&&(o=null===o?s:Math.min(o,s))}n[i]=o}}return n}(t),r=[];return tD(t,function(t){var e,n=t.coordinateSystem.getBaseAxis(),o=n.getExtent();if("category"===n.type)e=n.getBandWidth();else if("value"===n.type||"time"===n.type){var a=i[n.dim+"_"+n.index],s=Math.abs(o[1]-o[0]),l=n.scale.getExtent(),u=Math.abs(l[1]-l[0]);e=a?s/u*a:s}else{var h=t.getData();e=Math.abs(o[1]-o[0])/h.count()}var c=rv(t.get("barWidth"),e),p=rv(t.get("barMaxWidth"),e),d=rv(t.get("barMinWidth")||(fO(t)?.5:1),e),f=t.get("barGap"),g=t.get("barCategoryGap"),v=t.get("defaultBarGap");r.push({bandWidth:e,barWidth:c,barMaxWidth:p,barMinWidth:d,barGap:f,barCategoryGap:g,defaultBarGap:v,axisKey:fD(n),stackId:fC(t)})}),e={},tD(r,function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:t.defaultBarGap||0,stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;!a[s]&&o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var h=t.barMinWidth;h&&(a[s].minWidth=h);var c=t.barGap;null!=c&&(o.gap=c);var p=t.barCategoryGap;null!=p&&(o.categoryGap=p)}),n={},tD(e,function(t,e){n[e]={};var i,r=t.stacks,o=t.bandWidth,a=t.categoryGap;null==a&&(a=Math.max(35-4*tP(r).length,15)+"%");var s=rv(a,o),l=rv(t.gap,1),u=t.remainedWidth,h=t.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),tD(r,function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){var i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,u-=i+l*i,h--}else{var i=c;e&&ei&&(i=n),i!==c&&(t.width=i,u-=i+l*i,h--)}}),c=Math.max(c=(u-s)/(h+(h-1)*l),0);var p=0;tD(r,function(t,e){t.width||(t.width=c),i=t,p+=t.width*(1+l)}),i&&(p-=i.width*l);var d=-p/2;tD(r,function(t,i){n[e][i]=n[e][i]||{bandWidth:o,offset:d,width:t.width},d+=t.width*(1+l)})}),n}function fL(t,e){var n=fI(t,e),i=fA(n);tD(n,function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),r=fC(t),o=i[fD(n)][r],a=o.offset,s=o.width;e.setLayout({bandWidth:o.bandWidth,offset:a,size:s})})}function fP(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function fO(t){return t.pipelineContext&&t.pipelineContext.large}var fN={average:function(t){for(var e=0,n=0,i=0;ie&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(r,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},r=[],o=[];this._initIndexMap(t,n,r,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var a=0;a1&&1===c)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===h&&c>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===h&&1===c)this._update&&this._update(u,l),i[s]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(u,l),i[s]=null;else if(h>1)for(var p=0;p1)for(var a=0;athis._schema.getSourceDimensionIndex(t)))return+t},t.prototype._getStoreDimIndex=function(t){return this.getDimensionIndex(t)},t.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},t.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(t){return e.hasOwnProperty(t)?e[t]:void 0}:function(t){return e[t]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(t,e){var n=this._dimSummary;if(null==e)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return i?i[e]:null},t.prototype.mapDimensionsAll=function(t){return(this._dimSummary.encode[t]||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(t,e,n){var i,r,o,a,s,l,u,h,c,p,d,f,g,v=this;if(t instanceof ht&&(g=t),!g){var y=this.dimensions,m=um(t)||tC(t)?new uI(t,y.length):t;g=new ht;var _=tI(y,function(t){return{type:v._dimInfos[t].type,property:t}});g.initData(m,_,n)}this._store=g,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,g.count()),this._dimSummary=(i=this,r=this._schema,a=(o={}).encode={},s=t2(),l=[],u=[],h={},tD(i.dimensions,function(t){var e=i.getDimensionInfo(t),n=e.coordDim;if(n){var r,o=e.coordDimIndex;fV(a,n)[o]=t,e.isExtraCoord||(s.set(n,1),"ordinal"!==(r=e.type)&&"time"!==r&&(l[0]=t),fV(h,n)[o]=i.getDimensionIndex(e.name)),e.defaultTooltip&&u.push(t)}lz.each(function(t,n){var i=fV(a,n),r=e.otherDims[n];null!=r&&!1!==r&&(i[r]=e.name)})}),c=[],p={},s.each(function(t,e){var n=a[e];p[e]=n[0],c=c.concat(n)}),o.dataDimsOnCoord=c,o.dataDimIndicesOnCoord=tI(c,function(t){return i.getDimensionInfo(t).storeDimIndex}),o.encodeFirstDimNotExtra=p,(d=a.label)&&d.length&&(l=d.slice()),(f=a.tooltip)&&f.length?u=f.slice():u.length||(u=l.slice()),a.defaultedLabel=l,a.defaultedTooltip=u,o.userOutput=new fF(h,r),o),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},t.prototype.appendValues=function(t,e){var n=this._store.appendValues(t,e&&e.length),i=n.start,r=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var a=i;a=e)){var n=this._store.getProvider();this._updateOrdinalMeta();var i=this._nameList,r=this._idList;if(n.getSource().sourceFormat===lF&&!n.pure)for(var o=[],a=t;a0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(tR(r=this.getVisual(e))?r=r.slice():fW(r)&&(r=tS({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,fW(e)?tS(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){fW(t)?tS(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?tS(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){aR(this.hostModel&&this.hostModel.seriesIndex,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){tD(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:tI(this.dimensions,this._getDimInfo,this),this.hostModel)),q(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];tB(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(tZ(arguments)))})},t.internalField=void(G=function(t){var e=t._invertedIndicesMap;tD(e,function(n,i){var r=t._dimInfos[i],o=r.ordinalMeta,a=t._store;if(o){n=e[i]=new fG(o.categories.length);for(var s=0;s1&&(s+="__ec__"+u),i[e]=s}}),t}();function fq(t,e){um(t)||(t=ux(t));var n,i,r,o,a,s=(e=e||{}).coordDimensions||[],l=e.dimensionsDefine||t.dimensionsDefine||[],u=t2(),h=[],c=(n=t,i=s,r=l,o=e.dimensionsCount,a=Math.max(n.dimensionsDetectedCount||1,i.length,r.length,o||0),tD(i,function(t){var e;tV(t)&&(e=t.dimsDef)&&(a=Math.max(a,e.length))}),a),p=e.canOmitUnusedDimensions&&c>30,d=l===t.dimensionsDefine,f=d?fb(t):fw(l),g=e.encodeDefine;!g&&e.encodeDefaulter&&(g=e.encodeDefaulter(t,c));for(var v=t2(g),y=new u3(c),m=0;m0&&(i.name=r+(o-1)),o++,e.set(r,o)}}(h),new f_({source:t,dimensions:h,fullDimensionCount:c,dimensionOmitted:p})}var fZ=function(t){this.coordSysDims=[],this.axisMap=t2(),this.categoryAxisMap=t2(),this.coordSysName=t},fj={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis",rU).models[0],o=t.getReferringComponents("yAxis",rU).models[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),fK(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),fK(o)&&(i.set("y",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis",rU).models[0];e.coordSysDims=["single"],n.set("single",r),fK(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar",rU).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),fK(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),fK(a)&&(i.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,o=r.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();tD(o.parallelAxisIndex,function(t,o){var s=r.getComponent("parallelAxis",t),l=a[o];n.set(l,s),fK(s)&&(i.set(l,s),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=o))})},matrix:function(t,e,n,i){var r=t.getReferringComponents("matrix",rU).models[0];e.coordSysDims=["x","y"];var o=r.getDimensionModel("x"),a=r.getDimensionModel("y");n.set("x",o),n.set("y",a),i.set("x",o),i.set("y",a)}};function fK(t){return"category"===t.get("type")}let f$=function(t,e,n){n=n||{};var i,r,o,a,s,l,u,h,c=e.getSourceManager(),p=!1;t?(p=!0,h=ux(t)):p=(h=c.getSource()).sourceFormat===lF;var d=function(t){var e=t.get("coordinateSystem"),n=new fZ(e),i=fj[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}(e),f=(r=e.get("coordinateSystem"),o=ld.get(r),d&&d.coordSysDims&&(i=tI(d.coordSysDims,function(t){var e,n={name:t},i=d.axisMap.get(t);return i&&(n.type="category"===(e=i.get("type"))?"ordinal":"time"===e?"time":"float"),n})),i||(i=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]),i),g=n.useEncodeDefaulter,v=tB(g)?g:g?tN(lq,f,e):null,y=fq(h,{coordDimensions:f,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:v,canOmitUnusedDimensions:!p}),m=(a=y.dimensions,s=n.createInvertedIndices,d&&tD(a,function(t,e){var n=t.coordDim,i=d.categoryAxisMap.get(n);i&&(null==l&&(l=e),t.ordinalMeta=i.getOrdinalMeta(),s&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(u=!0)}),u||null==l||(a[l].otherDims.itemName=0),l),_=p?null:c.getSharedDataStore(y),x=function(t,e,n){var i,r,o,a,s,l,u,h=(n=n||{}).byIndex,c=n.stackedCoordDimension;fx(e.schema)?(i=(r=e.schema).dimensions,o=e.store):i=e;var p=!!(t&&t.get("stack"));if(tD(i,function(t,e){tE(t)&&(i[e]=t={name:t}),p&&!t.isExtraCoord&&(h||a||!t.ordinalMeta||(a=t),s||"ordinal"===t.type||"time"===t.type||c&&c!==t.coordDim||(s=t))}),!s||h||a||(h=!0),s){l="__\0ecstackresult_"+t.id,u="__\0ecstackedover_"+t.id,a&&(a.createInvertedIndices=!0);var d=s.coordDim,f=s.type,g=0;tD(i,function(t){t.coordDim===d&&g++});var v={name:l,coordDim:d,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:u,coordDim:u,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};r?(o&&(v.storeDimIndex=o.ensureCalculationDimension(u,f),y.storeDimIndex=o.ensureCalculationDimension(l,f)),r.appendCalculationDimension(v),r.appendCalculationDimension(y)):(i.push(v),i.push(y))}return{stackedDimension:s&&s.name,stackedByDimension:a&&a.name,isStackedByIndex:h,stackedOverDimension:u,stackResultDimension:l}}(e,{schema:y,store:_}),w=new fY(y,e);w.setCalculationInfo(x);var b=null!=m&&function(t){if(t.sourceFormat===lF)return!tR(rO(function(t){for(var e=0;es){h=(d+u)/2;break}1===p&&(c=f-i[0].tickValue)}null==h&&(u?u&&(h=i[i.length-1].coord):h=i[0].coord),o[n]=t.toGlobalCoord(h)}}});else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=+!i.getBaseAxis().isHorizontal();o[u]+=s+l/2}return o}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e}(hx);hx.registerClass(fQ);var fJ=function(t){var e,n;function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=i.type,e}return te(i,t),i.prototype.getInitialData=function(){return f$(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},i.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},i.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},i.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},i.type="series.bar",i.dependencies=["grid","polar"],e=fQ.defaultOption,n={clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:lI.color.primary,borderWidth:2}},realtimeSort:!1},i.defaultOption=tb(tb({},e,!0),n,!0),i}(fQ),f0=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},f1=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return te(e,t),e.prototype.getDefaultShape=function(){return new f0},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=(o-r)*.5,s=r+a,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=2*Math.PI,p=h?u-lo)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(e){cq(e,t,aN(e).dataIndex)})):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(pM),f9={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=f4(e.x,t.x),s=f8(e.x+e.width,r),l=f4(e.y,t.y),u=f8(e.y+e.height,o),h=sr?s:a,e.y=c&&l>o?u:l,e.width=h?0:s-a,e.height=c?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),h||c},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=f8(e.r,t.r),o=f4(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}return a}},f7={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new av({shape:tS({},i),z2:1});return u.__dataIndex=n,u.name="item",o&&(u.shape[r?"height":"width"]=0),u},polar:function(t,e,n,i,r,o,a,s,l){var u,h,c=!r&&l?f1:cn,p=new c({shape:i,z2:1});if(p.name="item",u=ga(r),h=c===f1,p.calculateTextPosition=function(t,e,n){var i=e.position;if(!i||i instanceof Array)return i8(t,e,n);var r=u(i),o=null!=e.distance?e.distance:5,a=this.shape,s=a.cx,l=a.cy,c=a.r,p=a.r0,d=(c+p)/2,f=a.startAngle,g=a.endAngle,v=(f+g)/2,y=h?Math.abs(c-p)/2:0,m=Math.cos,_=Math.sin,x=s+c*m(f),w=l+c*_(f),b="left",S="top";switch(r){case"startArc":x=s+(p-o)*m(v),w=l+(p-o)*_(v),b="center",S="top";break;case"insideStartArc":x=s+(p+o)*m(v),w=l+(p+o)*_(v),b="center",S="bottom";break;case"startAngle":x=s+d*m(f)+f2(f,o+y,!1),w=l+d*_(f)+f5(f,o+y,!1),b="right",S="middle";break;case"insideStartAngle":x=s+d*m(f)+f2(f,-o+y,!1),w=l+d*_(f)+f5(f,-o+y,!1),b="left",S="middle";break;case"middle":x=s+d*m(v),w=l+d*_(v),b="center",S="middle";break;case"endArc":x=s+(c+o)*m(v),w=l+(c+o)*_(v),b="center",S="bottom";break;case"insideEndArc":x=s+(c-o)*m(v),w=l+(c-o)*_(v),b="center",S="top";break;case"endAngle":x=s+d*m(g)+f2(g,o+y,!0),w=l+d*_(g)+f5(g,o+y,!0),b="left",S="middle";break;case"insideEndAngle":x=s+d*m(g)+f2(g,-o+y,!0),w=l+d*_(g)+f5(g,-o+y,!0),b="right",S="middle";break;default:return i8(t,e,n)}return(t=t||{}).x=x,t.y=w,t.align=b,t.verticalAlign=S,t},o){var d=p.shape,f=r?"r":"endAngle",g={};d[f]=r?i.r0:i.startAngle,g[f]=i[f],(s?cW:cG)(p,{shape:g},o)}return p}};function gt(t,e,n,i,r,o,a,s){var l,u;o?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?cW:cG)(n,{shape:l},e,r,null),(a?cW:cG)(n,{shape:u},e?t.baseAxis.model:null,r)}function ge(t,e){for(var n=0;n0?1:-1,u=a.height>0?1:-1;return{x:a.x+l*s/2,y:a.y+u*s/2,width:a.width-l*s,height:a.height-u*s}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function ga(t){var e;return e=t?"Arc":"Angle",function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}}function gs(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=t.shape,h=f3(i.getModel("itemStyle"),u,!0);tS(u,h),t.setShape(u)}}else{var c=i.get(["itemStyle","borderRadius"])||0;t.setShape("r",c)}t.useStyle(l);var p=i.getShallow("cursor");p&&t.attr("cursor",p);var d=s?a?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?r.height>=0?"bottom":"top":r.width>=0?"right":"left",f=sv(i);sg(t,f,{labelFetcher:o,labelDataIndex:n,defaultText:function(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var r=uz(t,e,n[0]);return null!=r?r+"":null}if(i){for(var o=[],a=0;aMath.PI/2&&u<1.5*Math.PI&&(u-=Math.PI),t.setTextConfig({rotation:u})}(t,"outside"===v?d:v,ga(a),i.get(["label","rotate"]))}!function(t,e,n,i){if(t){var r=sS(t);r.prevValue=r.value,r.value=n;var o=e.normal;r.valueAnimation=o.get("valueAnimation"),r.valueAnimation&&(r.precision=o.get("precision"),r.defaultInterpolatedText=i,r.statesModels=e)}}(g,f,o.getRawValue(n),function(t){var n=e.mapDimensionsAll("defaultedLabel");if(!tR(t))return t+"";for(var i=[],r=0;r=0&&i.push(t[o])}return i.join(" ")});var y=i.getModel(["emphasis"]);so(t,y.get("focus"),y.get("blurScope"),y.get("disabled")),sl(t,i),null!=r.startAngle&&null!=r.endAngle&&r.startAngle===r.endAngle&&(t.style.fill="none",t.style.stroke="none",tD(t.states,function(t){t.style&&(t.style.fill=t.style.stroke="none")}))}var gl=function(){},gu=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return te(e,t),e.prototype.getDefaultShape=function(){return new gl},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[h]}return -1}(this,t.offsetX,t.offsetY);aN(this).dataIndex=e>=0?e:null},30,!1);function gp(t,e,n){if("cartesian2d"===n.type){var i=n.getArea();return{x:t?e.x:i.x,y:t?i.y:e.y,width:t?e.width:i.width,height:t?i.height:e.height}}var i=n.getArea();return{cx:i.cx,cy:i.cy,r0:t?i.r0:e.r0,r:t?i.r:e.r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:2*Math.PI}}var gd=2*Math.PI,gf=Math.PI/180;function gg(t,e,n){e.eachSeriesByType(t,function(t){var e,i,r,o,a,s,l,u=t.getData(),h=u.mapDimension("value"),c=(i=(e=function(t,e){var n,i,r=lw(t,e,{enableLayoutOnlyByCenter:!0}),o=t.getBoxLayoutParams();if(r.type===lx)i=r.refPoint,n=lm(o,{width:e.getWidth(),height:e.getHeight()});else{var a=t.get("center"),s=tR(a)?a:[a,a];n=lm(o,r.refContainer),i=2===r.boxCoordFrom?r.refPoint:[rv(s[0],n.width)+n.x,rv(s[1],n.height)+n.y]}return{viewRect:n,center:i}}(t,n)).viewRect,r=e.center,tR(o=t.get("radius"))||(o=[0,o]),a=Math.min(rv(i.width,n.getWidth()),rv(i.height,n.getHeight())),s=rv(o[0],a/2),l=rv(o[1],a/2),{cx:r[0],cy:r[1],r0:s,r:l,viewRect:i}),p=c.cx,d=c.cy,f=c.r,g=c.r0,v=c.viewRect,y=-t.get("startAngle")*gf,m=t.get("endAngle"),_=t.get("padAngle")*gf;m="auto"===m?y-gd:-m*gf;var x=t.get("minAngle")*gf+_,w=0;u.each(h,function(t){!isNaN(t)&&w++});var b=u.getSum(h),S=Math.PI/(b||w)*2,T=t.get("clockwise"),M=t.get("roseType"),k=t.get("stillShowZeroSum"),C=u.getDataExtent(h);C[0]=0;var D=T?1:-1,I=[y,m],A=D*_/2;o$(I,!T),y=I[0],m=I[1];var L=gv(t);L.startAngle=y,L.endAngle=m,L.clockwise=T,L.cx=p,L.cy=d,L.r=f,L.r0=g;var P=Math.abs(m-y),O=P,N=0,R=y;if(u.setLayout({viewRect:v,r:f}),u.each(h,function(t,e){if(isNaN(t))return void u.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:T,cx:p,cy:d,r0:g,r:M?NaN:f});(n="area"!==M?0===b&&k?S:t*S:P/w)n?o=r=R+D*n/2:(r=R+A,o=i-A),u.setItemLayout(e,{angle:n,startAngle:r,endAngle:o,clockwise:T,cx:p,cy:d,r0:g,r:M?rg(t,C,[g,f]):f}),R=i}),O0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function gk(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=en(i[0],i[1]),o=en(i[1],i[2]);if(!r||!o){t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]);return}var a=Math.min(r,o)*n,s=er([],i[1],i[0],a/r),l=er([],i[1],i[2],a/o),u=er([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var h=1;h0){w(i*n,0,l);var r=i+t;r<0&&b(-r*n,1)}else b(-t*n,1)}}function w(e,n,i){0!==e&&(p=!0);for(var r=n;r0)for(var o=0;o0;o--){var p=i[o-1]*c;w(-p,o,l)}}}function S(t){for(var e=t<0?-1:1,n=Math.ceil((t=Math.abs(t))/(l-1)),i=0;i0?w(n,0,i+1):w(-n,l-i-1,l),(t-=n)<=0)return}return _(),a<0&&b(-a,.8),s<0&&b(s,.8),_(),x(a,s,1),x(s,a,-1),_(),a<0&&S(-a),s<0&&S(s),p})(t,0,l,l+a)&&function(t){for(var o={list:[],maxY:0},a={list:[],maxY:0},s=0;sn?a:o,h=Math.abs(l.label.y-n);if(h>=u.maxY){var c=l.label.x-e-l.len2*r,p=i+l.len;u.rB=Math.abs(c)t.unconstrainedWidth?null:p:null;i.setStyle("width",d)}gF(o,i)}}}function gF(t,e){gH.rect=t,gL(gH,e,gV)}var gV={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},gH={};function gW(t){return"center"===t.position}var gG=function(t){function e(e,n,i){var r=t.call(this)||this;r.z2=2;var o=new aO;return r.setTextContent(o),r.updateData(e,n,i,!0),r}return te(e,t),e.prototype.updateData=function(t,e,n,i){var r=t.hostModel,o=t.getItemModel(e),a=o.getModel("emphasis"),s=t.getItemLayout(e),l=tS(f3(o.getModel("itemStyle"),s,!0),s);if(isNaN(l.startAngle))return void this.setShape(l);if(i){this.setShape(l);var u=r.getShallow("animationType");r.ecModel.ssr?(cG(this,{scaleX:0,scaleY:0},r,{dataIndex:e,isFrom:!0}),this.originX=l.cx,this.originY=l.cy):"scale"===u?(this.shape.r=s.r0,cG(this,{shape:{r:s.r}},r,e)):null!=n?(this.setShape({startAngle:n,endAngle:n}),cG(this,{shape:{startAngle:s.startAngle,endAngle:s.endAngle}},r,e)):(this.shape.endAngle=s.startAngle,cW(this,{shape:{endAngle:s.endAngle}},r,e))}else cZ(this),cW(this,{shape:l},r,e);this.useStyle(t.getItemVisual(e,"style")),sl(this,o);var h=(s.startAngle+s.endAngle)/2,c=r.get("selectedOffset"),p=Math.cos(h)*c,d=Math.sin(h)*c,f=o.getShallow("cursor");f&&this.attr("cursor",f),this._updateLabel(r,t,e),this.ensureState("emphasis").shape=tS({r:s.r+(a.get("scale")&&a.get("scaleSize")||0)},f3(a.getModel("itemStyle"),s)),tS(this.ensureState("select"),{x:p,y:d,shape:f3(o.getModel(["select","itemStyle"]),s)}),tS(this.ensureState("blur"),{shape:f3(o.getModel(["blur","itemStyle"]),s)});var g=this.getTextGuideLine(),v=this.getTextContent();g&&tS(g.ensureState("select"),{x:p,y:d}),tS(v.ensureState("select"),{x:p,y:d}),so(this,a.get("focus"),a.get("blurScope"),a.get("disabled"))},e.prototype._updateLabel=function(t,e,n){var i=e.getItemModel(n),r=i.getModel("labelLine"),o=e.getItemVisual(n,"style"),a=o&&o.fill,s=o&&o.opacity;sg(this,sv(i),{labelFetcher:e.hostModel,labelDataIndex:n,inheritColor:a,defaultOpacity:s,defaultText:t.getFormattedLabel(n,"normal")||e.getName(n)});var l=this.getTextContent();this.setTextConfig({position:null,rotation:null}),l.attr({z2:10});var u=i.get(["label","position"]);if("outside"!==u&&"outer"!==u)this.removeTextGuideLine();else{var h=this.getTextGuideLine();h||(h=new cp,this.setTextGuideLine(h)),function(t,e,n){var i=t.getTextGuideLine(),r=t.getTextContent();if(!r){i&&t.removeTextGuideLine();return}for(var o=e.normal,a=o.get("show"),s=r.ignore,l=0;l0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u200?10:2);var C=x.getModel("labelLine"),D=C.get("length");D=rv(D,u);var I=C.get("length2");if(I=rv(I,u),Math.abs(y.endAngle-y.startAngle)0?"right":"left":L>0?"left":"right"}var F=Math.PI,V=0,H=w.get("rotate");if(tF(H))V=F/180*H;else if("center"===b)V=0;else if("radial"===H||!0===H)V=L<0?-A+F:-A;else if("tangential"===H&&"outside"!==b&&"outer"!==b){var W=Math.atan2(L,P);W<0&&(W=2*F+W),P>0&&(W=F+W),V=W-F}if(o=!!V,m.x=s,m.y=c,m.rotation=V,m.setStyle({verticalAlign:"middle"}),O){m.setStyle({align:g});var G=m.states.select;G&&(G.x+=m.x,G.y+=m.y)}else{var U=new e3(0,0,0,0);gF(U,m),r.push({label:m,labelLine:_,position:b,len:D,len2:I,minTurnAngle:C.get("minTurnAngle"),maxSurfaceAngle:C.get("maxSurfaceAngle"),surfaceNormal:new eF(L,P),linePoints:f,textAlign:g,labelDistance:S,labelAlignTo:T,edgeDistance:M,bleedMargin:k,rect:U,unconstrainedWidth:U.width,labelStyleWidth:m.style.width})}v.setTextConfig({inside:O})}}),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;p0){e=e/180*Math.PI,gm.fromArray(t[0]),g_.fromArray(t[1]),gx.fromArray(t[2]),eF.sub(gw,gm,g_),eF.sub(gb,gx,g_);var n=gw.len(),i=gb.len();if(!(n<.001)&&!(i<.001)&&(gw.scale(1/n),gb.scale(1/i),Math.cos(e)1&&eF.copy(gT,gx),gT.toArray(t[1])}}}(x,g.minTurnAngle),function(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,gm.fromArray(t[0]),g_.fromArray(t[1]),gx.fromArray(t[2]),eF.sub(gw,g_,gm),eF.sub(gb,gx,g_);var i=gw.len(),r=gb.len();if(!(i<.001)&&!(r<.001)&&(gw.scale(1/i),gb.scale(1/r),gw.dot(e)=a)eF.copy(gT,gx);else{gT.scaleAndAdd(gb,o/Math.tan(Math.PI/2-s));var l=gx.x!==g_.x?(gT.x-g_.x)/(gx.x-g_.x):(gT.y-g_.y)/(gx.y-g_.y);if(isNaN(l))return;l<0?eF.copy(gT,g_):l>1&&eF.copy(gT,gx)}gT.toArray(t[1])}}}(x,g.surfaceNormal,g.maxSurfaceAngle),y.setShape({points:x}),v.__hostTarget.textGuideLineConfig={anchor:new eF(x[0][0],x[0][1])})}}}(t),"expansion"!==t.get("animationTypeUpdate")&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},e.type="pie",e}(pM),gX=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}(),gY=rV(),gq=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return te(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new gX(tO(this.getData,this),tO(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){var t,e,n;return t=tR(t={coordDimensions:["value"],encodeDefaulter:tN(lZ,this)})&&{coordDimensions:t}||tS({encodeDefine:this.getEncode()},t),(n=new fY(fq(e=this.getSource(),t).dimensions,this)).initData(e,void 0),n},e.prototype.getDataParams=function(e){var n=this.getData(),i=gY(n),r=i.seats;if(!r){var o=[];n.each(n.mapDimension("value"),function(t){o.push(t)}),r=i.seats=function(t,e){var n=tA(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return[];for(var i=Math.pow(10,e),r=tI(t,function(t){return(isNaN(t)?0:t)/n*i*100}),o=100*i,a=tI(r,function(t){return Math.floor(t)}),s=tA(a,function(t,e){return t+e},0),l=tI(r,function(t,e){return t-a[e]});su&&(u=l[c],h=c);++a[h],l[h]=0,++s}return tI(a,function(t){return t/i})}(o,n.hostModel.get("percentPrecision"))}var a=t.prototype.getDataParams.call(this,e);return a.percent=r[e]||0,a.$vars.push("percent"),a},e.prototype._defaultLabelLine=function(t){rL(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(hx);l={fullType:gq.type,getCoord2:function(t){return t.getShallow("center")}},lf.set(l.fullType,{getCoord2:void 0}).getCoord2=l.getCoord2;var gZ=Math.sin,gj=Math.cos,gK=Math.PI,g$=2*Math.PI,gQ=180/gK,gJ=function(){function t(){}return t.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){this._add("C",t,e,n,i,r,o)},t.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},t.prototype.arc=function(t,e,n,i,r,o){this.ellipse(t,e,n,n,0,i,r,o)},t.prototype.ellipse=function(t,e,n,i,r,o,a,s){var l=a-o,u=!s,h=Math.abs(l),c=n4(h-g$)||(u?l>=g$:-l>=g$),p=l>0?l%g$:l%g$+g$,d=!1;d=!!c||!n4(h)&&p>=gK==!!u;var f=t+n*gj(o),g=e+i*gZ(o);this._start&&this._add("M",f,g);var v=Math.round(r*gQ);if(c){var y=1/this._p,m=(u?1:-1)*(g$-y);this._add("A",n,i,v,1,+u,t+n*gj(o+m),e+i*gZ(o+m)),y>.01&&this._add("A",n,i,v,0,+u,f,g)}else{var _=t+n*gj(a),x=e+i*gZ(a);this._add("A",n,i,v,+d,+u,_,x)}},t.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){for(var u=[],h=this._p,c=1;c"}(r,o)+("style"!==r?ex(a):a||"")+(i?""+n+tI(i,function(e){return t(e)}).join(n)+n:"")+""}(t)}function vt(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function ve(t,e,n,i){return g9("svg","root",{width:t,height:e,xmlns:g3,"xmlns:xlink":g4,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var vn=0,vi={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},vr="transform-origin",vo={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function va(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function vs(t){return tE(t)?vi[t]?"cubic-bezier("+vi[t]+")":nO(t)?t:"":""}function vl(t,e,n,i){var r=t.animators,o=r.length,a=[];if(t instanceof cM){var s=function(t,e,n){var i,r,o=t.shape.paths,a={};if(tD(o,function(t){var e=vt(n.zrId);e.animation=!0,vl(t,{},e,!0);var o=e.cssAnims,s=e.cssNodes,l=tP(o),u=l.length;if(u){var h=o[r=l[u-1]];for(var c in h){var p=h[c];a[c]=a[c]||{d:""},a[c].d+=p.d||""}for(var d in s){var f=s[d].animation;f.indexOf(r)>=0&&(i=f)}}}),i){e.d=!1;var s=va(a,n);return i.replace(r,s)}}(t,e,n);if(s)a.push(s);else if(!o)return}else if(!o)return;for(var l={},u=0;u0}).length)return va(c,n)+" "+r[0]+" both"}(l[g]);s&&a.push(s)}if(a.length){var v=n.zrId+"-cls-"+vn++;n.cssNodes["."+v]={animation:a.join(",")},e.class=v}}function vu(t,e,n,i){var r=JSON.stringify(t),o=n.cssStyleCache[r];o||(o=n.zrId+"-cls-"+vn++,n.cssStyleCache[r]=o,n.cssNodes["."+o+(i?":hover":"")]=t),e.class=e.class?e.class+" "+o:o}var vh=Math.round;function vc(t){return t&&tB(t.toDataURL)}function vp(t,e,n,i){!function(t,e,n,i){var r,o,a=null==e.opacity?1:e.opacity;if(n instanceof al)return t("opacity",a);if(null!=(r=e.fill)&&r!==g0){var s=n3(e.fill);t("fill",s.color);var l=null!=e.fillOpacity?e.fillOpacity*s.opacity*a:s.opacity*a;(i||l<1)&&t("fill-opacity",l)}else t("fill",g0);if(null!=(o=e.stroke)&&o!==g0){var u=n3(e.stroke);t("stroke",u.color);var h=e.strokeNoScale?n.getLineScale():1,c=h?(e.lineWidth||0)/h:0,p=null!=e.strokeOpacity?e.strokeOpacity*u.opacity*a:u.opacity*a,d=e.strokeFirst;if((i||1!==c)&&t("stroke-width",c),(i||d)&&t("paint-order",d?"stroke":"fill"),(i||p<1)&&t("stroke-opacity",p),e.lineDash){var f=dx(n),g=f[0],v=f[1];g&&(v=g1(v||0),t("stroke-dasharray",g.join(",")),(v||i)&&t("stroke-dashoffset",v))}else i&&t("stroke-dasharray",g0);for(var y=0;y=0&&s||a;l&&(o=n2(l))}var u=r.lineWidth;u&&(u/=!r.strokeNoScale&&t.transform?t.transform[0]:1);var i={cursor:"pointer"};o&&(i.fill=o),r.stroke&&(i.stroke=r.stroke),u&&(i["stroke-width"]=u),vu(i,e,n,!0)}}(t,o,e),g9(s,t.id+"",o)}function vx(t,e){return t instanceof an?v_(t,e):t instanceof al?function(t,e){var n,i=t.style,r=i.image;if(r&&!tE(r)&&((n=r)&&tE(n.src)?r=r.src:vc(r)&&(r=r.toDataURL())),r){var o=i.x||0,a=i.y||0,s={href:r,width:i.width,height:i.height};return o&&(s.x=o),a&&(s.y=a),vg(s,t.transform),vp(s,i,t,e),vd(s,t),e.animation&&vl(t,s,e),g9("image",t.id+"",s)}}(t,e):t instanceof ar?function(t,e){var n=t.style,i=n.text;if(null!=i&&(i+=""),!(!i||isNaN(n.x)||isNaN(n.y))){var r,o,a,s=n.font||to,l=n.x||0,u=(r=n.y||0,o=i3(s),"top"===(a=n.textBaseline)?r+=o/2:"bottom"===a&&(r-=o/2),r),h={"dominant-baseline":"central","text-anchor":n9[n.textAlign]||n.textAlign};if(ak(n)){var c="",p=n.fontStyle,d=aT(n.fontSize);if(!parseFloat(d))return;var f=n.fontFamily||tr,g=n.fontWeight;c+="font-size:"+d+";font-family:"+f+";",p&&"normal"!==p&&(c+="font-style:"+p+";"),g&&"normal"!==g&&(c+="font-weight:"+g+";"),h.style=c}else h.style="font: "+s;return i.match(/\s/)&&(h["xml:space"]="preserve"),l&&(h.x=l),u&&(h.y=u),vg(h,t.transform),vp(h,n,t,e),vd(h,t),e.animation&&vl(t,h,e),g9("text",t.id+"",h,void 0,i)}}(t,e):void 0}function vw(t,e,n,i){var r,o=t[n],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(ie(o))r="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!ii(o))return;r="radialGradient",a.cx=tY(o.x,.5),a.cy=tY(o.y,.5),a.r=tY(o.r,.5)}for(var s=o.colorStops,l=[],u=0,h=s.length;uu?vR(e,null==i[p+1]?null:i[p+1].elm,i,l,p):vB(e,n,s,u))}(i,r,o):vP(o)?(vP(e.text)&&vI(i,""),vR(i,null,o,0,o.length-1)):vP(r)?vB(i,r,0,r.length-1):vP(e.text)&&vI(i,""):e.text!==n.text&&(vP(r)&&vB(i,r,0,r.length-1),vI(i,n.text)))}(t,e);else{var n=t.elm,i=vC(n);vN(e),null!==i&&(vT(i,e.elm,vD(n)),vB(i,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return vx(t,vt(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._width,i=this._height,r=vt(this._id);r.animation=t.animation,r.willUpdate=t.willUpdate,r.compress=t.compress,r.emphasis=t.emphasis,r.ssr=this._opts.ssr;var o=[],a=this._bgVNode=function(t,e,n,i){var r;if(n&&"none"!==n)if(r=g9("rect","bg",{width:t,height:e,x:"0",y:"0"}),ir(n))vw({fill:n},r.attrs,"fill",i);else if(it(n))vb({style:{fill:n},dirty:t4,getBoundingRect:function(){return{width:t,height:e}}},r.attrs,"fill",i);else{var o=n3(n),a=o.color,s=o.opacity;r.attrs.fill=a,s<1&&(r.attrs["fill-opacity"]=s)}return r}(n,i,this._backgroundColor,r);a&&o.push(a);var s=t.compress?null:this._mainVNode=g9("g","main",{},[]);this._paintList(e,r,s?s.children:o),s&&o.push(s);var l=tI(tP(r.defs),function(t){return r.defs[t]});if(l.length&&o.push(g9("defs","defs",{},l)),t.animation){var u,h,c,p,d,f,g,v,y=(u=r.cssNodes,h=r.cssAnims,d=" {"+(p=(c={newline:!0}).newline?"\n":""),f=p+"}",g=tI(tP(u),function(t){return t+d+tI(tP(u[t]),function(e){return e+":"+u[t][e]+";"}).join(p)+f}).join(p),v=tI(tP(h),function(t){return"@keyframes "+t+d+tI(tP(h[t]),function(e){return e+d+tI(tP(h[t][e]),function(n){var i=h[t][e][n];return"d"===n&&(i='path("'+i+'")'),n+":"+i+";"}).join(p)+f}).join(p)+f}).join(p),g||v?[""].join(p):"");if(y){var m=g9("style","stl",{},[],y);o.push(m)}}return ve(n,i,o,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},g7(this.renderToVNode({animation:tY(t.cssAnimation,!0),emphasis:tY(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:tY(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,n){for(var i,r,o=t.length,a=[],s=0,l=0,u=0;u=0&&(!c||!r||c[f]!==r[f]);f--);for(var g=d-1;g>f;g--)i=a[--s-1];for(var v=f+1;v=0||t===e}function vU(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[vY(t)]}function vX(t){return!!t.get(["handle","show"])}function vY(t){return t.type+"||"+t.id}var vq={},vZ=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return te(e,t),e.prototype.render=function(e,n,i,r){this.axisPointerClass&&function(t){var e=vU(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=vX(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),aa)return!0;if(o){var s=vU(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var o=vj(t).pointerEl=new J[r.type](tw(e.pointer));t.add(o)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=vj(t).labelEl=new aO(tw(e.label));t.add(r),vQ(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=vj(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=vj(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),vQ(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a){r&&i.remove(r),this._handle=null;return}this._handle||(e=!0,r=this._handle=ps(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){eD(t.event)},onmousedown:tO(this._onHandleDragMove,this,0,0),drift:tO(this._onHandleDragMove,this),ondragend:tO(this._onHandleDragEnd,this)}),i.add(r)),v0(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");tR(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,pR(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){v$(this._axisPointerModel,!e&&this._moveAnimation,this._handle,vJ(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(vJ(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(vJ(i)),vj(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),pB(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function v$(t,e,n,i){!function t(e,n){if(!(tV(e)&&tV(n)))return e===n;var i=!0;return tD(n,function(n,r){i=i&&t(e[r],n)}),!!i}(vj(n).lastProp,i)&&(vj(n).lastProp=i,e?cW(n,i,t):(n.stopAnimation(),n.attr(i)))}function vQ(t,e){t[e.get(["label","show"])?"show":"hide"]()}function vJ(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function v0(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)})}function v1(t){return"interval"===t.type||"log"===t.type}function v2(t){var e=Math.pow(10,rT(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,rm(n*e)}function v5(t){return r_(t)+2}function v3(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function v4(t,e){return t>=e[0]&&t<=e[1]}var v8=function(){function t(){this.normalize=v6,this.scale=v9}return t.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=tO(t.normalize,t),this.scale=tO(t.scale,t)):(this.normalize=v6,this.scale=v9)},t}();function v6(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function v9(t,e){return t*(e[1]-e[0])+e[0]}function v7(t,e,n){var i=Math.log(t);return[Math.log(n?e[0]:Math.max(0,e[0]))/i,Math.log(n?e[1]:Math.max(0,e[1]))/i]}var yt=function(){function t(t){this._calculator=new v8,this._setting=t||{},this._extent=[1/0,-1/0];var e=sW();e&&(this._brkCtx=e.createScaleBreakContext(),this._brkCtx.update(this._extent))}return t.prototype.getSetting=function(t){return this._setting[t]},t.prototype._innerUnionExtent=function(t){var e=this._extent;this._innerSetExtent(t[0]e[1]?t[1]:e[1])},t.prototype.unionExtentFromData=function(t,e){this._innerUnionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){this._innerSetExtent(t,e)},t.prototype._innerSetExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e),this._brkCtx&&this._brkCtx.update(n)},t.prototype.setBreaksFromOption=function(t){var e=sW();e&&this._innerSetBreak(e.parseAxisBreakOption(t,tO(this.parse,this)))},t.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},t.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.hasBreaks=function(){return!!this._brkCtx&&this._brkCtx.hasBreaks()},t.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();r2(yt);var ye=0,yn=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++ye,this._onCollect=t.onCollect}return t.createByAxisModel=function(e){var n=e.option,i=n.data,r=i&&tI(i,yi);return new t({categories:r,needCollect:!r,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!tE(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,this._onCollect&&this._onCollect(t,e),e;var i=this._getOrCreateMap();return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e),this._onCollect&&this._onCollect(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=t2(this.categories))},t}();function yi(t){return tV(t)&&null!=t.value?t.value:t+""}var yr=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new yn({})),tR(i)&&(i=new yn({categories:tI(i,function(t){return tV(t)?t.value:t})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return te(e,t),e.prototype.parse=function(t){return null==t?NaN:tE(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return v4(t,this._extent)&&t>=0&&t=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(yt);yt.registerClass(yr);var yo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return te(e,t),e.prototype.parse=function(t){return null==t||""===t?NaN:Number(t)},e.prototype.contain=function(t){return v4(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=v5(t)},e.prototype.getTicks=function(t){t=t||{};var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=sW(),a=[];if(!e)return a;if("only_break"===t.breakTicks&&o)return o.addBreaksToTicks(a,this._brkCtx.breaks,this._extent),a;n[0]=0&&(l=rm(l+u*e,r))}if(a.length>0&&l===a[a.length-1].value)break;if(a.length>1e4)return[]}var h=a.length?a[a.length-1].value:i[1];return n[1]>h&&(t.expandToNicedExtent?a.push({value:rm(h+e,r)}):a.push({value:n[1]})),o&&o.pruneTicksByBreak(t.pruneByBreak,a,this._brkCtx.breaks,function(t){return t.value},this._interval,this._extent),"none"!==t.breakTicks&&o&&o.addBreaksToTicks(a,this._brkCtx.breaks,this._extent),a},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks({expandToNicedExtent:!0}),n=[],i=this.getExtent(),r=1;ri[0]&&cn&&(c=h.interval=n),p=h.intervalPrecision=v5(c),o=h.niceTickExtent=[rm(Math.ceil(s[0]/c)*c,p),rm(Math.floor(s[1]/c)*c,p)],a=s,isFinite(o[0])||(o[0]=a[0]),isFinite(o[1])||(o[1]=a[1]),v3(o,0,a),v3(o,1,a),o[0]>o[1]&&(o[0]=o[1]),h);this._intervalPrecision=d.intervalPrecision,this._interval=d.interval,this._niceExtent=d.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var e=this._extent.slice();if(e[0]===e[1])if(0!==e[0]){var n=Math.abs(e[0]);t.fixMax||(e[1]+=n/2),e[0]-=n/2}else e[1]=1;isFinite(e[1]-e[0])||(e[0]=0,e[1]=1),this._innerSetExtent(e[0],e[1]),e=this._extent.slice(),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var i=this._interval,r=this._intervalPrecision;t.fixMin||(e[0]=rm(Math.floor(e[0]/i)*i,r)),t.fixMax||(e[1]=rm(Math.ceil(e[1]/i)*i,r)),this._innerSetExtent(e[0],e[1])},e.prototype.setNiceExtent=function(t,e){this._niceExtent=[t,e]},e.type="interval",e}(yt);yt.registerClass(yo);var ya=function(t,e,n,i){for(;n>>1;t[r][1]6?6:g>3?3:g>2?2:1,_=s1(n),x=s6(n);break;case"week":case"half-week":case"day":m=(v=e/864e5)>16?16:v>7.5?7:v>3.5?4:v>1.5?2:1,_=s2(n),x=s9(n);break;case"half-day":case"quarter-day":case"hour":m=(y=e/36e5)>12?12:y>6?6:y>3.5?4:y>2?2:1,_=s5(n),x=s7(n);break;case"minute":m=yh(e,!0),_=s3(n),x=lt(n);break;case"second":m=yh(e,!1),_=s4(n),x=le(n);break;case"millisecond":m=rM(e,!0),_=s8(n),x=ln(n)}p>=i[0]&&c<=i[1]&&function(t,e,n,r,s,l,u){for(var h,c,p,d=((h=new Date(0))[s](1),c=h.getTime(),h[s](1+t),p=h.getTime()-c,function(t,e){return Math.max(0,Math.round((e-t)/p))}),f=e,g=new Date(f);f1e4));)if(g[s](g[r]()+t),f=g.getTime(),o){var v=o.calcNiceTickMultiple(f,d);v>0&&(g[s](g[r]()+v*t),f=g.getTime())}u.push({value:f,notAdd:!0})}(m,c,p,_,x,0,l),"year"===t&&s.length>1&&0===h&&s.unshift({value:s[0].value-m})}}for(var h=0;h=i[0]&&v<=i[1]&&u++)}var y=r/e;if(u>1.5*y&&h>y/1.5||(s.push(f),u>y||t===sZ[c]))break}l=[]}}for(var m=tL(tI(s,function(t){return tL(t,function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd})}),function(t){return t.length>0}),_=[],x=m.length-1,c=0;cn&&(this._approxInterval=n);var r=yl.length,o=Math.min(ya(yl,this._approxInterval,0,r),r-1);this._interval=yl[o][1],this._intervalPrecision=v5(this._interval),this._minLevelUnit=yl[Math.max(o-1,0)][0]},e.prototype.parse=function(t){return tF(t)?t:+rS(t)},e.prototype.contain=function(t){return v4(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.type="time",e}(yo),yl=[["second",1e3],["minute",6e4],["hour",36e5],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",15768e6],["year",31536e6]];function yu(t,e,n,i){return sJ(new Date(e),t,i).getTime()===sJ(new Date(n),t,i).getTime()}function yh(t,e){return(t/=e?6e4:1e3)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}yt.registerClass(ys);var yc=Math.floor,yp=Math.ceil,yd=Math.pow,yf=Math.log,yg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new yo,e}return te(e,t),e.prototype.getTicks=function(e){e=e||{};var n=this._extent.slice(),i=this._originalScale.getExtent(),r=t.prototype.getTicks.call(this,e),o=this.base,a=this._originalScale._innerGetBreaks(),s=sW();return tI(r,function(t){var e,r=t.value,l=null,u=yd(o,r);if(r===n[0]&&this._fixMin?l=i[0]:r===n[1]&&this._fixMax&&(l=i[1]),s){var h=s.getTicksLogTransformBreak(t,o,a,yv);e=h.vBreak,null==l&&(l=h.brkRoundingCriterion)}return null!=l&&(u=yv(u,l)),{value:u,break:e}},this)},e.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},e.prototype.setExtent=function(e,n){this._originalScale.setExtent(e,n);var i=v7(this.base,[e,n]);t.prototype.setExtent.call(this,i[0],i[1])},e.prototype.getExtent=function(){var e=this.base,n=t.prototype.getExtent.call(this);n[0]=yd(e,n[0]),n[1]=yd(e,n[1]);var i=this._originalScale.getExtent();return this._fixMin&&(n[0]=yv(n[0],i[0])),this._fixMax&&(n[1]=yv(n[1],i[1])),n},e.prototype.unionExtentFromData=function(t,e){this._originalScale.unionExtentFromData(t,e);var n=v7(this.base,t.getApproximateExtent(e),!0);this._innerUnionExtent(n)},e.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent.slice(),n=this._getExtentSpanWithBreaks();if(isFinite(n)&&!(n<=0)){var i=Math.pow(10,rT(n));for(t/n*i<=.5&&(i*=10);!isNaN(i)&&1>Math.abs(i)&&Math.abs(i)>0;)i*=10;var r=[rm(yp(e[0]/i)*i),rm(yc(e[1]/i)*i)];this._interval=i,this._intervalPrecision=v5(i),this._niceExtent=r}},e.prototype.calcNiceExtent=function(e){t.prototype.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},e.prototype.contain=function(e){return e=yf(e)/yf(this.base),t.prototype.contain.call(this,e)},e.prototype.normalize=function(e){return e=yf(e)/yf(this.base),t.prototype.normalize.call(this,e)},e.prototype.scale=function(e){return e=t.prototype.scale.call(this,e),yd(this.base,e)},e.prototype.setBreaksFromOption=function(t){var e=sW();if(e){var n=e.logarithmicParseBreaksFromOption(t,this.base,tO(this.parse,this)),i=n.parsedOriginal,r=n.parsedLogged;this._originalScale._innerSetBreak(i),this._innerSetBreak(r)}},e.type="log",e}(yo);function yv(t,e){return rm(t,r_(e))}yt.registerClass(yg);var yy=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]0&&u>0&&!h&&(l=0),l<0&&u<0&&!c&&(u=0));var d=this._determinedMin,f=this._determinedMax;return null!=d&&(l=d,h=!0),null!=f&&(u=f,c=!0),{min:l,max:u,minFixed:h,maxFixed:c,isBlank:p}},t.prototype.modifyDataMinMax=function(t,e){this[y_[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[ym[t]]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),ym={min:"_determinedMin",max:"_determinedMax"},y_={min:"_dataMin",max:"_dataMax"};function yx(t,e){return null==e?null:e!=e?NaN:t.parse(e)}function yw(t,e){var n,i,r=t.type,o=(n=t.getExtent(),(i=t.rawExtentInfo)||(i=new yy(t,e,n),t.rawExtentInfo=i),i).calculate();t.setBlank(o.isBlank);var a=o.min,s=o.max,l=e.ecModel;if(l&&"time"===r){var u=fI("bar",l),h=!1;if(tD(u,function(t){h=h||t.getBaseAxis()===e.axis}),h){var c=function(t,e,n,i){var r=n.axis.getExtent(),o=Math.abs(r[1]-r[0]),a=function(t,e,n){if(t&&e)return t[fD(e)]}(i,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;tD(a,function(t){s=Math.min(t.offset,s)});var l=-1/0;tD(a,function(t){l=Math.max(t.offset+t.width,l)});var u=(s=Math.abs(s))+(l=Math.abs(l)),h=e-t,c=h/(1-(s+l)/o)-h;return e+=l/u*c,{min:t-=s/u*c,max:e}}(a,s,e,fA(u));a=c.min,s=c.max}}return{extent:[a,s],fixMin:o.minFixed,fixMax:o.maxFixed}}function yb(t,e){var n=yw(t,e),i=n.extent,r=e.get("splitNumber");t instanceof yg&&(t.base=e.get("logBase"));var o=t.type,a=e.get("interval"),s="interval"===o||"time"===o;t.setBreaksFromOption(yI(e)),t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:r,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:s?e.get("minInterval"):null,maxInterval:s?e.get("maxInterval"):null}),null!=a&&t.setInterval&&t.setInterval(a)}function yS(t){var e=t.getLabelModel().get("formatter");if("time"===t.type){var n,i,r,o=tE(e)||tB(e)?e:(n=(n=e)||{},i={},r=!0,tD(sq,function(t){r&&(r=null==n[t])}),tD(sq,function(t,e){var o=n[t];i[t]={};for(var a=null,s=e;s>=0;s--){var l=sq[s],u=tV(o)&&!tR(o)?o[l]:o,h=void 0;tR(u)?a=(h=u.slice())[0]||"":tE(u)?h=[a=u]:(null==a?a=sU[t]:sG[l].test(a)||(a=i[l][l][0]+" "+a),h=[a],r&&(h[1]="{primary|"+a+"}")),i[t][l]=h}}),i);return function(e,n){return t.scale.getFormattedLabel(e,n,o)}}if(tE(e))return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")};if(!tB(e))return function(e){return t.scale.getLabel(e)};if("category"===t.type)return function(n,i){return e(yT(t,n),n.value-t.scale.getExtent()[0],null)};var a=sW();return function(n,i){var r=null;return a&&(r=a.makeAxisLabelFormatterParamBreak(r,n.break)),e(yT(t,n),i,r)}}function yT(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function yM(t){var e=t.get("interval");return null==e?"auto":e}function yk(t){return"category"===t.type&&0===yM(t.getLabelModel())}function yC(t){return"middle"===t||"center"===t}function yD(t){return t.getShallow("show")}function yI(t){var e,n=t.get("breaks",!0);if(null!=n){return sW()&&("x"===(e=t.axis).dim||"y"===e.dim||"z"===e.dim||"single"===e.dim)&&"category"!==e.type?n:void 0}}var yA=rV(),yL=rV();function yP(t){return{out:{noPxChangeTryDetermine:[]},kind:t}}function yO(t,e){var n=tI(e,function(e){return t.scale.parse(e)});return"time"===t.type&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function yN(t,e,n){var i,r,o=yB(t),a=yM(e),s=1===n.kind;if(!s){var l=yz(o,a);if(l)return l}tB(a)?i=yG(t,a):(r="auto"===a?function(t,e){if(1===e.kind){var n=t.calculateCategoryInterval(e);return e.out.noPxChangeTryDetermine.push(function(){return yL(t).autoInterval=n,!0}),n}var i=yL(t).autoInterval;return null!=i?i:yL(t).autoInterval=t.calculateCategoryInterval(e)}(t,n):a,i=yW(t,r));var u={labels:i,labelCategoryInterval:r};return s?n.out.noPxChangeTryDetermine.push(function(){return yF(o,a,u),!0}):yF(o,a,u),u}var yR=yE("axisTick"),yB=yE("axisLabel");function yE(t){return function(e){return yL(e)[t]||(yL(e)[t]={list:[]})}}function yz(t,e){for(var n=0;n=Math.abs(o-e)&&1>=Math.abs(a-n)&&o>e&&i.axisExtent0===r[0]&&i.axisExtent1===r[1])return o;i.lastTickCount=n,i.lastAutoInterval=e,i.axisExtent0=r[0],i.axisExtent1=r[1]}function yW(t,e,n){var i=yS(t),r=t.scale,o=r.getExtent(),a=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=o[0],h=r.count();0!==u&&l>1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=yk(t),p=a.get("showMinLabel")||c,d=a.get("showMaxLabel")||c;p&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t,time:void 0,break:void 0})}return d&&f-l!==o[1]&&g(o[1]),s}function yG(t,e,n){var i=t.scale,r=yS(t),o=[];return tD(i.getTicks(),function(t){var a=i.getLabel(t),s=t.value;e(t.value,a)&&o.push(n?s:{formattedLabel:r(t),rawLabel:a,tickValue:s,time:void 0,break:void 0})}),o}var yU=Math.PI,yX=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],yY=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],yq=rV(),yZ=rV(),yj=function(){function t(t){this.recordMap={},this.resolveAxisNameOverlap=t}return t.prototype.ensureRecord=function(t){var e=t.axis.dim,n=t.componentIndex,i=this.recordMap,r=i[e]||(i[e]=[]);return r[n]||(r[n]={ready:{}})},t}(),yK=eP(),y$=new e3(0,0,0,0),yQ=function(t,e,n,i,r,o){if(yC(t.nameLocation)){var a,s,l=o.stOccupiedRect;l&&yJ((a={},s=o.transGroup.transform,a.transform=p_(a.transform,s),a.localRect=pm(a.localRect,l),a.rect=pm(a.rect,l),s&&a.rect.applyTransform(s),a.axisAligned=pv(s),a.obb=void 0,(a.label=a.label||{}).ignore=!1,a),i,r)}else y0(o.labelInfoList,o.dirVec,i,r)};function yJ(t,e,n){var i=new eF;gR(t,e,i,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&function(t,e){if(t){t.label.x+=e.x,t.label.y+=e.y,t.label.markRedraw();var n=t.transform;n&&(n[4]+=e.x,n[5]+=e.y);var i=t.rect;i&&(i.x+=e.x,i.y+=e.y);var r=t.obb;r&&r.fromBoundingRect(t.localRect,n)}}(e,i)}function y0(t,e,n,i){for(var r=eF.dot(i,e)>=0,o=0,a=t.length;o0?"top":"bottom",i="center"):rw(o-yU)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),y2=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],y5={axisLine:function(t,e,n,i,r,o,a){var s=i.get(["axisLine","show"]);if("auto"===s&&(s=!0,null!=t.raw.axisLineAutoShow&&(s=!!t.raw.axisLineAutoShow)),s){var l=i.axis.getExtent(),u=o.transform,h=[l[0],0],c=[l[1],0],p=h[0]>c[0];u&&(eo(h,h,u),eo(c,c,u));var d=tS({lineCap:"round"},i.getModel(["axisLine","lineStyle"]).getLineStyle()),f={strokeContainThreshold:t.raw.strokeContainThreshold||5,silent:!0,z2:1,style:d};if(i.get(["axisLine","breakLine"])&&i.axis.scale.hasBreaks())null.buildAxisBreakLine(i,r,o,f);else{var g=new cv(tS({shape:{x1:h[0],y1:h[1],x2:c[0],y2:c[1]}},f));c9(g.shape,g.style.lineWidth),g.anid="line",r.add(g)}var v=i.get(["axisLine","symbol"]);if(null!=v){var y=i.get(["axisLine","symbolSize"]);tE(v)&&(v=[v,v]),(tE(y)||tF(y))&&(y=[y,y]);var m=function(t,e){if(null!=t)return tR(t)||(t=[t,t]),[rv(t[0],e[0])||0,rv(tY(t[1],t[0]),e[1])||0]}(i.get(["axisLine","symbolOffset"])||0,y),_=y[0],x=y[1];tD([{rotate:t.rotation+Math.PI/2,offset:m[0],r:0},{rotate:t.rotation-Math.PI/2,offset:m[1],r:Math.sqrt((h[0]-c[0])*(h[0]-c[0])+(h[1]-c[1])*(h[1]-c[1]))}],function(e,n){if("none"!==v[n]&&null!=v[n]){var i=dg(v[n],-_/2,-x/2,_,x,d.stroke,!0),o=e.r+e.offset,a=p?c:h;i.attr({rotation:e.rotate,x:a[0]+o*Math.cos(t.rotation),y:a[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),r.add(i)}})}}},axisTickLabelEstimate:function(t,e,n,i,r,o,a,s){y6(e,r,s)&&y3(t,e,n,i,r,o,a,1)},axisTickLabelDetermine:function(t,e,n,i,r,o,a,s){y6(e,r,s)&&y3(t,e,n,i,r,o,a,2);var l,u,h,c=function(t,e,n,i){var r=i.axis,o=i.getModel("axisTick"),a=o.get("show");if("auto"===a&&(a=!0,null!=t.raw.axisTickAutoShow&&(a=!!t.raw.axisTickAutoShow)),!a||r.scale.isBlank())return[];for(var s=o.getModel("lineStyle"),l=t.tickDirection*o.get("length"),u=y8(r.getTicksCoords(),n.transform,l,tT(s.getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;hg[1],x="start"===d&&!_||"start"!==d&&_,rw(m-yU/2)?(y=x?"bottom":"top",v="center"):rw(m-1.5*yU)?(y=x?"top":"bottom",v="center"):(y="middle",v=m<1.5*yU&&m>yU/2?x?"left":"right":x?"right":"left"),l={rotation:m,textAlign:v,textVerticalAlign:y},null!=(u=t.raw.axisNameAvailableWidth)&&(isFinite(u=Math.abs(u/Math.sin(l.rotation)))||(u=null)));var L=S.getFont(),P=i.get("nameTruncate",!0)||{},O=P.ellipsis,N=tX(t.raw.nameTruncateMaxWidth,P.maxWidth,u),R=s.nameMarginLevel||0,B=new aO({x:C.x,y:C.y,rotation:l.rotation,silent:y1.isLabelSilent(i),style:sy(S,{text:c,font:L,overflow:"truncate",width:N,ellipsis:O,fill:S.getTextColor()||i.get(["axisLine","lineStyle","color"]),align:S.get("align")||l.textAlign,verticalAlign:S.get("verticalAlign")||l.textVerticalAlign}),z2:1});if(pd({el:B,componentModel:i,itemName:c}),B.__fullText=c,B.anid="name",i.get("triggerEvent")){var E=y1.makeAxisEventDataBase(i);E.targetType="axisName",E.name=c,aN(B).eventData=E}o.add(B),B.updateTransform(),e.nameEl=B;var z=h.nameLayout=gA({label:B,priority:B.z2,defaultAttr:{ignore:B.ignore},marginDefault:yC(w)?yX[R]:yY[R]});if(h.nameLocation=w,r.add(B),B.decomposeTransform(),t.shouldNameMoveOverlap&&z){var F=n.ensureRecord(i);n.resolveAxisNameOverlap(t,n,i,z,D,F)}}}};function y3(t,e,n,i,r,o,a,s){y9(e)||function(t,e,n,i,r,o){var a=r.axis,s=tX(t.raw.axisLabelShow,r.get(["axisLabel","show"])),l=new rs;n.add(l);var u=yP(i);if(!s||a.scale.isBlank())return y7(e,[],l,u);var h=r.getModel("axisLabel"),c=a.getViewLabels(u),p=(tX(t.raw.labelRotate,h.get("rotate"))||0)*yU/180,d=y1.innerTextLayout(t.rotation,p,t.labelDirection),f=r.getCategories&&r.getCategories(!0),g=[],v=r.get("triggerEvent"),y=1/0,m=-1/0;tD(c,function(t,e){var n,i="ordinal"===a.scale.type?a.scale.getRawOrdinalNumber(t.tickValue):t.tickValue,s=t.formattedLabel,u=t.rawLabel,p=h;if(f&&f[i]){var _=f[i];tV(_)&&_.textStyle&&(p=new sR(_.textStyle,h,r.ecModel))}var x=p.getTextColor()||r.get(["axisLine","lineStyle","color"]),w=p.getShallow("align",!0)||d.textAlign,b=tY(p.getShallow("alignMinLabel",!0),w),S=tY(p.getShallow("alignMaxLabel",!0),w),T=p.getShallow("verticalAlign",!0)||p.getShallow("baseline",!0)||d.textVerticalAlign,M=tY(p.getShallow("verticalAlignMinLabel",!0),T),k=tY(p.getShallow("verticalAlignMaxLabel",!0),T),C=10+((null==(n=t.time)?void 0:n.level)||0);y=Math.min(y,C),m=Math.max(m,C);var D=new aO({x:0,y:0,rotation:0,silent:y1.isLabelSilent(r),z2:C,style:sy(p,{text:s,align:0===e?b:e===c.length-1?S:w,verticalAlign:0===e?M:e===c.length-1?k:T,fill:tB(x)?x("category"===a.type?u:"value"===a.type?i+"":i,e):x})});D.anid="label_"+i;var I=yq(D);if(I.break=t.break,I.tickValue=i,I.layoutRotation=d.rotation,pd({el:D,componentModel:r,itemName:s,formatterParamsExtra:{isTruncated:function(){return D.isTruncated},value:u,tickIndex:e}}),v){var A,L,P,O,N=y1.makeAxisEventDataBase(r);N.targetType="axisLabel",N.value=u,N.tickIndex=e,t.break&&(N.break={start:t.break.parsedBreak.vmin,end:t.break.parsedBreak.vmax}),"category"===a.type&&(N.dataIndex=i),aN(D).eventData=N,t.break&&(A=r,L=o,P=D,O=t.break,P.on("click",function(t){var e={type:"expandAxisBreak",breaks:[{start:O.parsedBreak.breakOption.start,end:O.parsedBreak.breakOption.end}]};e[A.axis.dim+"AxisIndex"]=A.componentIndex,L.dispatchAction(e)}))}g.push(D),l.add(D)}),y7(e,tI(g,function(t){return{label:t,priority:yq(t).break?t.z2+(m-y+1):t.z2,defaultAttr:{ignore:t.ignore}}}),l,u)}(t,e,r,s,i,a);var l,u,h,c,p,d=e.labelLayoutList;l=t,u=i,h=d,c=o,p=u.get(["axisLabel","margin"]),tD(h,function(t,e){var n=gA(t);if(n){var i=n.label,r=yq(i);n.suggestIgnore=i.ignore,i.ignore=!1,ij(mt,me),mt.x=u.axis.dataToCoord(r.tickValue),mt.y=l.labelOffset+l.labelDirection*p,mt.rotation=r.layoutRotation,c.add(mt),mt.updateTransform(),c.remove(mt),mt.decomposeTransform(),ij(i,mt),i.markRedraw(),gD(n,!0),gA(n)}}),function(t,e,n){var i=sW();if(i){var r=i.retrieveAxisBreakPairs(n,function(t){return t&&yq(t.label).break},!0),o=t.get(["breakLabelLayout","moveOverlap"],!0);(!0===o||"auto"===o)&&tD(r,function(i){null.adjustBreakLabelPair(t.axis.inverse,e,[gA(n[i[0]]),gA(n[i[1]])])})}}(i,t.rotation,d);var f=t.optionHideOverlap;(function(t,e,n){if(!yk(t.axis)){var i=t.get(["axisLabel","showMinLabel"]),r=t.get(["axisLabel","showMaxLabel"]),o=e.length;a(i,0,1),a(r,o-1,o-2)}function a(t,i,r){var o=gA(e[i]),a=gA(e[r]);if(o&&a){if(!1===t||o.suggestIgnore)return void y4(o.label);if(a.suggestIgnore)return void y4(a.label);if(!n){var s=[0,0,0,0];o=gO({marginForce:s},o),a=gO({marginForce:s},a)}gR(o,a,null,{touchThreshold:.1})&&(t?y4(a.label):y4(o.label))}}})(i,d,f),f&&function(t){var e=[];function n(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}t.sort(function(t,e){return!!e.suggestIgnore-!!t.suggestIgnore||e.priority-t.priority});for(var i=0;i.1?"x":"y",h=a.transGroup[u];if(s.sort(function(t,e){return Math.abs(t.label[u]-h)-Math.abs(e.label[u]-h)}),l&&r){var c=o.getExtent(),p=Math.min(c[0],c[1]),d=Math.max(c[0],c[1])-p;r.union(new e3(p,0,d,1))}a.stOccupiedRect=r,a.labelInfoList=s}(t,n,i,d)}function y4(t){t&&(t.ignore=!0)}function y8(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},e.prototype.remove=function(t,e){mg("axisPointer",e)},e.prototype.dispose=function(t,e){mg("axisPointer",e)},e.type="axisPointer",e}(hD);function my(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=rF(o,t);if(null==a||a<0||tR(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u).dim,c=u.dim,p=+("x"===h||"radius"===h),d=o.mapDimension(c),f=[];f[p]=o.get(d,a),f[1-p]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(f)||[]}else i=l.dataToPoint(o.getValues(tI(l.dimensions,function(t){return o.mapDimension(t)}),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),i=[g.x+g.width/2,g.y+g.height/2]}return{point:i,el:s}}var mm=rV();function m_(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t.dispatchAction||tO(n.dispatchAction,n),a=e.getComponent("axisPointer").coordSysAxesInfo;if(a){mT(r)&&(r=my({seriesIndex:t.seriesIndex,dataIndex:t.dataIndex},e).point);var s,l,u,h,c,p,d,f,g,v,y,m=mT(r),_=t.axesInfo,x=a.axesInfo,w="leave"===i||mT(r),b={},S={},T={list:[],map:{}},M={showPointer:tN(mw,S),showTooltip:tN(mb,T)};tD(a.coordSysMap,function(t,e){var n=m||t.containPoint(r);tD(a.coordSysAxesInfo[e],function(t,e){var i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(_,t);if(!w&&n&&(!_||o)){var a=o&&o.value;null!=a||m||(a=i.pointToData(r)),null!=a&&mx(t,a,M,!1,b)}})});var k={};return tD(x,function(t,e){var n=t.linkGroup;n&&!S[e]&&tD(n.axesInfo,function(e,i){var r=S[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,mS(e),mS(t)))),k[t.key]=o}})}),tD(k,function(t,e){mx(x[e],t,M,!0,b)}),s=S,l=x,u=b.axesInfo=[],tD(l,function(t,e){var n=t.axisPointerModel.option,i=s[e];i?(t.useHandle||(n.status="show"),n.value=i.value,n.seriesDataIndices=(i.payloadBatch||[]).slice()):t.useHandle||(n.status="hide"),"show"===n.status&&u.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),function(t,e,n,i){if(mT(e)||!t.list.length)return i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(T,r,t,o),h=x,p=(c=n).getZr(),d="axisPointerLastHighlights",f=mm(p)[d]||{},g=mm(p)[d]={},tD(h,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&t.triggerEmphasis&&tD(n.seriesDataIndices,function(t){g[t.seriesIndex+" | "+t.dataIndex]=t})}),v=[],y=[],tD(f,function(t,e){g[e]||y.push(t)}),tD(g,function(t,e){f[e]||v.push(t)}),y.length&&c.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:y}),v.length&&c.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:v}),b}}function mx(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e)){if(!t.involveSeries)return void n.showPointer(t,e);var a,s,l,u,h,c,p,d,f=(a=e,u=(l=(s=t).axis).dim,h=a,c=[],p=Number.MAX_VALUE,d=-1,tD(s.seriesModels,function(t,e){var n,i,r=t.getData().mapDimensionsAll(u);if(t.getAxisTooltipData){var o=t.getAxisTooltipData(r,a,l);i=o.dataIndices,n=o.nestestValue}else{if(!(i=t.indicesOfNearest(u,r[0],a,"category"===l.type?.5:null)).length)return;n=t.getData().get(r[0],i[0])}if(null!=n&&isFinite(n)){var s=a-n,f=Math.abs(s);f<=p&&((f=0&&d<0)&&(p=f,d=s,h=n,c.length=0),tD(i,function(e){c.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:c,snapToValue:h}),g=f.payloadBatch,v=f.snapToValue;g[0]&&null==r.seriesIndex&&tS(r,g[0]),!i&&t.snap&&o.containData(v)&&null!=v&&(e=v),n.showPointer(t,e,g),n.showTooltip(t,f,v)}}function mw(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function mb(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=vY(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function mS(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function mT(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function mM(t){vZ.registerAxisPointerClass("CartesianAxisPointer",ma),t.registerComponentModel(mh),t.registerComponentView(mv),t.registerPreprocessor(function(t){if(t){t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={});var e=t.axisPointer.link;e&&!tR(e)&&(t.axisPointer.link=[e])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(t,e){var n,i,r,o,a,s,l,u,h;t.getComponent("axisPointer").coordSysAxesInfo=(i=n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}},r=t,o=e,a=r.getComponent("tooltip"),l=(s=r.getComponent("axisPointer")).get("link",!0)||[],u=[],tD(o.getCoordinateSystems(),function(t){if(t.axisPointerEnabled){var e=vY(t.model),n=i.coordSysAxesInfo[e]={};i.coordSysMap[e]=t;var o=t.model.getModel("tooltip",a);if(tD(t.getAxes(),tN(d,!1,null)),t.getTooltipAxes&&a&&o.get("show")){var h="axis"===o.get("trigger"),c="cross"===o.get(["axisPointer","type"]),p=t.getTooltipAxes(o.get(["axisPointer","axis"]));(h||c)&&tD(p.baseAxes,tN(d,!c||"cross",h)),c&&tD(p.otherAxes,tN(d,"cross",!1))}}function d(e,a,h){var c=h.model.getModel("axisPointer",s),p=c.get("show");if(p&&("auto"!==p||e||vX(c))){null==a&&(a=c.get("triggerTooltip"));var d=(c=e?function(t,e,n,i,r,o){var a=e.getModel("axisPointer"),s={};tD(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=tw(a.get(t))}),s.snap="category"!==t.type&&!!o,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===r){var u=a.get(["label","show"]);if(l.show=null==u||u,!o){var h=s.lineStyle=a.get("crossStyle");h&&tT(l,h.textStyle)}}return t.model.getModel("axisPointer",new sR(s,n,i))}(h,o,s,r,e,a):c).get("snap"),f=c.get("triggerEmphasis"),g=vY(h.model),v=a||d||"category"===h.type,y=i.axesInfo[g]={key:g,axis:h,coordSys:t,axisPointerModel:c,triggerTooltip:a,triggerEmphasis:f,involveSeries:v,snap:d,useHandle:vX(c),seriesModels:[],linkGroup:null};n[g]=y,i.seriesInvolved=i.seriesInvolved||v;var m=function(t,e){for(var n=e.model,i=e.dim,r=0;r0,this.el.className=t.get("className")||""},t.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n,i,r,o,a,s,l,u,h,c,p,d,f,g,v,y,m,_,x,w,b,S,T,M,k=this.el,C=k.style,D=this._styleCoord;k.innerHTML?C.cssText=mO+(n=!this._firstShow,i=this._longHide,r=this._enableDisplayTransition,o=[],a=t.get("transitionDuration"),s=t.get("backgroundColor"),l=t.get("shadowBlur"),u=t.get("shadowColor"),h=t.get("shadowOffsetX"),c=t.get("shadowOffsetY"),p=t.getModel("textStyle"),d=hv(t,"html"),f=h+"px "+c+"px "+l+"px "+u,o.push("box-shadow:"+f),n&&a>0&&o.push((g="cubic-bezier(0.23,1,0.32,1)",v="",y="",r&&(y="opacity"+(v=" "+a/2+"s "+g)+",visibility"+v),i||(v=" "+a+"s "+g,y+=(y.length?",":"")+(ti.transformSupported?""+mP+v:",left"+v+",top"+v)),mL+":"+y)),s&&o.push("background-color:"+s),tD(["width","color","radius"],function(e){var n="border-"+e,i=lr(n),r=t.get(i);null!=r&&o.push(n+":"+r+("color"===e?"":"px"))}),o.push((m=[],_=p.get("fontSize"),(x=p.getTextColor())&&m.push("color:"+x),m.push("font:"+p.getFont()),w=tY(p.get("lineHeight"),Math.round(3*_/2)),_&&m.push("line-height:"+w+"px"),b=p.get("textShadowColor"),S=p.get("textShadowBlur")||0,T=p.get("textShadowOffsetX")||0,M=p.get("textShadowOffsetY")||0,b&&S&&m.push("text-shadow:"+T+"px "+M+"px "+S+"px "+b),tD(["decoration","align"],function(t){var e=p.get(t);e&&m.push("text-"+t+":"+e)}),m.join(";"))),null!=d&&o.push("padding:"+tj(d).join("px ")+"px"),o.join(";")+";")+mN(D[0],D[1],!0)+"border-color:"+lu(e)+";"+(t.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):C.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(t,e,n,i,r){var o=this.el;if(null==t){o.innerHTML="";return}var a="";if(tE(r)&&"item"===n.get("trigger")&&!mC(n)&&(a=function(t,e,n){if(!tE(n)||"inside"===n)return"";var i,r,o=t.get("backgroundColor"),a=t.get("borderWidth");e=lu(e);var s=i="left"===(i=n)?"right":"right"===i?"left":"top"===i?"bottom":"top",l=Math.max(1.5*Math.round(a),6),u="",h=mP+":";tM(["left","right"],s)>-1?(u+="top:50%",h+="translateY(-50%) rotate("+(r="left"===s?-225:-45)+"deg)"):(u+="left:50%",h+="translateX(-50%) rotate("+(r="top"===s?225:45)+"deg)");var c=r*Math.PI/180,p=l+a,d=p*Math.abs(Math.cos(c))+p*Math.abs(Math.sin(c));u+=";"+s+":-"+Math.round(((d-Math.SQRT2*a)/2+Math.SQRT2*a-(d-p)/2)*100)/100+"px";var f=e+" solid "+a+"px;";return'
'}(n,i,r)),tE(t))o.innerHTML=t+a;else if(t){o.innerHTML="",tR(t)||(t=[t]);for(var s=0;s=0?this._tryShow(n,i):"leave"===e&&this._hide(i))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api,i=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){n.isDisposed()||r.manuallyShowTip(t,e,n,{x:r._lastX,y:r._lastY,dataByCoordSys:r._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!ti.node&&n.getDom()){var r=mU(i,n);this._ticket="";var o=i.dataByCoordSys,a=function(t,e,n){var i,r=rG(t).queryOptionMap,o=r.keys()[0];if(o&&"series"!==o){var a=rX(e,o,r.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a&&(n.getViewOfComponentModel(a).group.traverse(function(e){var n=aN(e).tooltipConfig;if(n&&n.name===t.name)return i=e,!0}),i))return{componentMainType:o,componentIndex:a.componentIndex,el:i}}}(i,e,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:i.position,positionDefault:"bottom"},r)}else if(i.tooltip&&null!=i.x&&null!=i.y)mH.x=i.x,mH.y=i.y,mH.update(),aN(mH).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:mH},r);else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var l=my(i,e),u=l.point[0],h=l.point[1];null!=u&&null!=h&&this._tryShow({offsetX:u,offsetY:h,target:l.el,position:i.position,positionDefault:"bottom"},r)}else null!=i.x&&null!=i.y&&(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},r))}},e.prototype.manuallyHideTip=function(t,e,n,i){var r=this._tooltipContent;this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(mU(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s&&"axis"===mG([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i,r,o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(n){if("legend"===aN(n).ssrType)return;this._lastDataByCoordSys=null,dn(n,function(t){if(t.tooltipDisabled)return i=r=null,!0;i||r||(null!=aN(t).dataIndex?i=t:null!=aN(t).tooltipConfig&&(r=t))},!0),i?this._showSeriesItemTooltip(t,i,e):r?this._showComponentItemTooltip(t,r,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=tO(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],o=mG([e.tooltipOption],i),a=this._renderMode,s=[],l=hu("section",{blocks:[],noHeader:!0}),u=[],h=new hy;tD(t,function(t){tD(t.dataByAxis,function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),r=t.value;if(e&&null!=r){var o=mn(r,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),c=hu("section",{header:o,noHeader:!t$(o),sortBlocks:!0,blocks:[]});l.blocks.push(c),tD(t.seriesDataIndices,function(l){var p=n.getSeriesByIndex(l.seriesIndex),d=l.dataIndexInside,f=p.getDataParams(d);if(!(f.dataIndex<0)){f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=yT(e.axis,{value:r}),f.axisValueLabel=o,f.marker=h.makeTooltipMarker("item",lu(f.color),a);var g=uH(p.formatTooltip(d,!0,null)),v=g.frag;if(v){var y=mG([p],i).get("valueFormatter");c.blocks.push(y?tS({valueFormatter:y},v):v)}g.text&&u.push(g.text),s.push(f)}})}})}),l.blocks.reverse(),u.reverse();var c=e.position,p=hd(l,h,a,o.get("order"),n.get("useUTC"),o.get("textStyle"));p&&u.unshift(p);var d="richText"===a?"\n\n":"
",f=u.join(d);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(t,s)?this._updatePosition(o,c,r[0],r[1],this._tooltipContent,s):this._showTooltipContent(o,f,s,Math.random()+"",r[0],r[1],c,null,h)})},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=this._ecModel,r=aN(e),o=r.seriesIndex,a=i.getSeriesByIndex(o),s=r.dataModel||a,l=r.dataIndex,u=r.dataType,h=s.getData(u),c=this._renderMode,p=t.positionDefault,d=mG([h.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),f=d.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),v=new hy;g.marker=v.makeTooltipMarker("item",lu(g.color),c);var y=uH(s.formatTooltip(l,!1,u)),m=d.get("order"),_=d.get("valueFormatter"),x=y.frag,w=x?hd(_?tS({valueFormatter:_},x):x,v,c,m,i.get("useUTC"),d.get("textStyle")):y.text,b="item_"+s.name+"_"+l;this._showOrMove(d,function(){this._showTooltipContent(d,w,g,b,t.offsetX,t.offsetY,t.position,t.target,v)}),n({type:"showTip",dataIndexInside:l,dataIndex:h.getRawIndex(l),seriesIndex:o,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i="html"===this._renderMode,r=aN(e),o=r.tooltipConfig.option||{},a=o.encodeHTMLContent;if(tE(o)){var s=o;o={content:s,formatter:s},a=!0}a&&i&&o.content&&((o=tw(o)).content=ex(o.content));var l=[o],u=this._ecModel.getComponent(r.componentMainType,r.componentIndex);u&&l.push(u),l.push({formatter:o.content});var h=t.positionDefault,c=mG(l,this._tooltipModel,h?{position:h}:null),p=c.get("content"),d=Math.random()+"",f=new hy;this._showOrMove(c,function(){var n=tw(c.get("formatterParams")||{});this._showTooltipContent(c,p,n,d,t.offsetX,t.offsetY,t.position,e,f)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent;u.setEnterable(t.get("enterable"));var h=t.get("formatter");a=a||t.get("position");var c=e,p=this._getNearestPoint([r,o],n,t.get("trigger"),t.get("borderColor"),t.get("defaultBorderColor",!0)).color;if(h)if(tE(h)){var d=t.ecModel.get("useUTC"),f=tR(n)?n[0]:n,g=f&&f.axisType&&f.axisType.indexOf("time")>=0;c=h,g&&(c=s$(f.axisValue,c,d)),c=ll(c,n,!0)}else if(tB(h)){var v=tO(function(e,i){e===this._ticket&&(u.setContent(i,l,t,p,a),this._updatePosition(t,a,r,o,u,n,s))},this);this._ticket=i,c=h(n,i,v)}else c=h;u.setContent(c,l,t,p,a),u.show(t,p),this._updatePosition(t,a,r,o,u,n,s)}},e.prototype._getNearestPoint=function(t,e,n,i,r){return"axis"===n||tR(e)?{color:i||r}:tR(e)?void 0:{color:i||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),h=t.get("align"),c=t.get("verticalAlign"),p=a&&a.getBoundingRect().clone();if(a&&p.applyTransform(a.transform),tB(e)&&(e=e([n,i],o,r.el,p,{viewSize:[s,l],contentSize:u.slice()})),tR(e))n=rv(e[0],s),i=rv(e[1],l);else if(tV(e)){var d=e;d.width=u[0],d.height=u[1];var f=lm(d,{width:s,height:l});n=f.x,i=f.y,h=null,c=null}else if(tE(e)&&a){var g=function(t,e,n,i){var r=n[0],o=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-r/2,l=e.y+h/2-o/2;break;case"top":s=e.x+u/2-r/2,l=e.y-o-a;break;case"bottom":s=e.x+u/2-r/2,l=e.y+h+a;break;case"left":s=e.x-r-a,l=e.y+h/2-o/2;break;case"right":s=e.x+u+a,l=e.y+h/2-o/2}return[s,l]}(e,p,u,t.get("borderWidth"));n=g[0],i=g[1]}else{var v,y,m,_,x,w,b,S,T,M,g=(v=n,y=i,m=r,_=s,x=l,w=h?null:20,b=c?null:20,T=(S=m.getSize())[0],M=S[1],null!=w&&(v+T+w+2>_?v-=T+w:v+=w),null!=b&&(y+M+b>x?y-=M+b:y+=b),[v,y]);n=g[0],i=g[1]}if(h&&(n-=mX(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=mX(c)?u[1]/2:"bottom"===c?u[1]:0),mC(t)){var k,C,D,I,A,L,P,O,g=(k=n,C=i,D=r,I=s,A=l,P=(L=D.getSize())[0],O=L[1],k=Math.min(k+P,I)-P,C=Math.min(C+O,A)-O,[k=Math.max(k,0),C=Math.max(C,0)]);n=g[0],i=g[1]}r.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,e){var n=this._lastDataByCoordSys,i=this._cbParamsList,r=!!n&&n.length===t.length;return r&&tD(n,function(n,o){var a=n.dataByAxis||[],s=(t[o]||{}).dataByAxis||[];(r=r&&a.length===s.length)&&tD(a,function(t,n){var o=s[n]||{},a=t.seriesDataIndices||[],l=o.seriesDataIndices||[];(r=r&&t.value===o.value&&t.axisType===o.axisType&&t.axisId===o.axisId&&a.length===l.length)&&tD(a,function(t,e){var n=l[e];r=r&&t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex}),i&&tD(t.seriesDataIndices,function(t){var n=t.seriesIndex,o=e[n],a=i[n];o&&a&&a.data!==o.data&&(r=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=e,!!r},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){!ti.node&&e.getDom()&&(pB(this,"_updatePosition"),this._tooltipContent.dispose(),mg("itemTooltip",e))},e.type="tooltip",e}(hD);function mG(t,e,n){var i,r=e.ecModel;n?(i=new sR(n,r,r),i=new sR(e.option,i,r)):i=e;for(var o=t.length-1;o>=0;o--){var a=t[o];a&&(a instanceof sR&&(a=a.get("tooltip",!0)),tE(a)&&(a={formatter:a}),a&&(i=new sR(a,i,r)))}return i}function mU(t,e){return t.dispatchAction||tO(e.dispatchAction,e)}function mX(t){return"center"===t||"middle"===t}var mY=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return te(e,t),e.prototype.init=function(e,n,i){t.prototype.init.call(this,e,n,i),this._sourceManager=new he(this),hn(this)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),hn(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:lX},e}(lk),mq=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return te(e,t),e.type="dataset",e}(hD),mZ={left:0,right:0,top:0,bottom:0},mj=["25%","25%"],mK=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return te(e,t),e.prototype.mergeDefaultAndTheme=function(e,n){var i=lT({},e.outerBounds);t.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&e.outerBounds&&lS(e.outerBounds,i)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&e.outerBounds&&lS(this.option.outerBounds,e.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:mZ,outerBoundsContain:"all",outerBoundsClampWidth:"25%",outerBoundsClampHeight:"25%",backgroundColor:lI.color.transparent,borderWidth:1,borderColor:lI.color.neutral30},e}(lk),m$=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}(),mQ=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return te(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",rU).models[0]},e.type="cartesian2dAxis",e}(lk);tk(mQ,m$);var mJ={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:lI.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:lI.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:lI.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[lI.color.backgroundTint,lI.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:lI.color.neutral00,borderColor:lI.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},m0=tb({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},mJ),m1=tb({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:lI.color.axisMinorSplitLine,width:1}}},mJ),m2=tb({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},m1),m5=tT({logBase:10},m1);let m3={category:m0,value:m1,time:m2,log:m5};var m4={value:1,category:1,time:1,log:1};function m8(t,e,n,i){tD(m4,function(r,o){var a=tb(tb({},m3[o],!0),i,!0),s=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+o,n}return te(n,t),n.prototype.mergeDefaultAndTheme=function(t,e){var n=lb(this),i=n?lT({},t):{};tb(t,e.getTheme().get(o+"Axis")),tb(t,this.getDefaultOption()),t.type=m6(t),n&&lS(t,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=yn.createByAxisModel(this))},n.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(t){return{breaks:[]}},n.type=e+"Axis."+o,n.defaultOption=a,n}(n);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",m6)}function m6(t){return t.type||(t.data?"category":"value")}var m9=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return tI(this._dimList,function(t){return this._axes[t]},this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),tL(this.getAxes(),function(e){return e.scale.type===t})},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}(),m7=["x","y"];function _t(t){return("interval"===t.type||"time"===t.type)&&!t.hasBreaks()}var _e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=m7,e}return te(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(_t(t)&&_t(e)){var n=t.getExtent(),i=e.getExtent(),r=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(o[0]-r[0])/a,u=(o[1]-r[1])/s,h=r[0]-n[0]*l,c=r[1]-i[0]*u,p=this._transform=[l,0,0,u,h,c];this._invTransform=ez([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,e){var n=this.dataToPoint(t),i=this.dataToPoint(e),r=this.getArea(),o=new e3(n[0],n[1],i[0]-n[0],i[1]-n[1]);return r.intersect(o)},e.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],r=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=r&&isFinite(r))return eo(n,t,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i,e)),n[1]=a.toGlobalCoord(a.dataToCoord(r,e)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},e.prototype.pointToData=function(t,e,n){if(n=n||[],this._invTransform)return eo(n,t,this._invTransform);var i=this.getAxis("x"),r=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),e),n[1]=r.coordToData(r.toLocalCoord(t[1]),e),n},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(t){t=t||0;var e=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(e[0],e[1])-t,r=Math.min(n[0],n[1])-t,o=Math.max(e[0],e[1])-i+t,a=Math.max(n[0],n[1])-r+t;return new e3(i,r,o,a)},e}(m9),_n=[0,1];function _i(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}var _r=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.index=0,a.type=r||"value",a.position=o||"bottom",a}return te(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t[+("x"!==this.dim)]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){var e,n,i,r,o;return e=t||this.scale.getExtent(),n=this._extent,i=Math.log,r=Math.LN10,isFinite(o=Math.min(Math.max(-Math.floor(i(e[1]-e[0])/r)+Math.round(i(rf(n[1]-n[0]))/r),0),20))?o:20},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(i.parse(t)),this.onBand&&"ordinal"===i.type&&_i(n=n.slice(),i.count()),rg(t,_n,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&_i(n=n.slice(),i.count());var r=rg(t,n,_n,e);return this.scale.scale(r)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=function(t,e,n){var i=t.getTickModel().get("customValues");if(i){var r=t.scale.getExtent();return{ticks:tL(yO(t,i),function(t){return t>=r[0]&&t<=r[1]})}}return"category"===t.type?function(t,e){var n,i,r=yR(t),o=yM(e),a=yz(r,o);if(a)return a;if((!e.get("show")||t.scale.isBlank())&&(n=[]),tB(o))n=yG(t,o,!0);else if("auto"===o){var s=yN(t,t.getLabelModel(),yP(2));i=s.labelCategoryInterval,n=tI(s.labels,function(t){return t.tickValue})}else n=yW(t,i=o,!0);return yF(r,o,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:tI(t.scale.getTicks(n),function(t){return t.value})}}(this,e,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}).ticks,i=tI(n,function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}},this);return function(t,e,n,i){var r,o,a=e.length;if(t.onBand&&!n&&a){var s=t.getExtent();if(1===a)e[0].coord=s[0],e[0].onBand=!0,r=e[1]={coord:s[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[a-1].tickValue-e[0].tickValue,u=(e[a-1].coord-e[0].coord)/l;tD(e,function(t){t.coord-=u/2,t.onBand=!0});var h=t.scale.getExtent();o=1+h[1]-e[a-1].tickValue,r={coord:e[a-1].coord+u*o,tickValue:h[1]+1,onBand:!0},e.push(r)}var c=s[0]>s[1];p(e[0].coord,s[0])&&(i?e[0].coord=s[0]:e.shift()),i&&p(s[0],e[0].coord)&&e.unshift({coord:s[0],onBand:!0}),p(s[1],r.coord)&&(i?r.coord=s[1]:e.pop()),i&&p(r.coord,s[1])&&e.push({coord:s[1],onBand:!0})}function p(t,e){return t=rm(t),e=rm(e),c?t>e:t0&&t<100||(t=5),tI(this.scale.getMinorTicks(t),function(t){return tI(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this)},t.prototype.getViewLabels=function(t){return function(t,e){var n,i,r,o,a,s,l,u=t.getLabelModel().get("customValues");if(u){var h=yS(t),c=t.scale.getExtent();return{labels:tI(tL(yO(t,u),function(t){return t>=c[0]&&t<=c[1]}),function(e){var n={value:e};return{formattedLabel:h(n),rawLabel:t.scale.getLabel(n),tickValue:e,time:void 0,break:void 0}})}}return"category"===t.type?(n=t,i=e,r=n.getLabelModel(),o=yN(n,r,i),!r.get("show")||n.scale.isBlank()?{labels:[]}:o):(s=(a=t).scale.getTicks(),l=yS(a),{labels:tI(s,function(t,e){return{formattedLabel:l(t,e),rawLabel:a.scale.getLabel(t),tickValue:t.value,time:t.time,break:t.break}})})}(this,t=t||yP(2)).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+ +!!this.onBand;return 0===n&&(n=1),Math.abs(Math.abs(t[1]-t[0]))/n},t.prototype.calculateCategoryInterval=function(t){return function(t,e){var n,i,r=e.kind,o=(i=(n=t).getLabelModel(),{axisRotate:n.getRotate?n.getRotate():n.isHorizontal&&!n.isHorizontal()?90:0,labelRotate:i.get("rotate")||0,font:i.getFont()}),a=yS(t),s=(o.axisRotate-o.labelRotate)/180*Math.PI,l=t.scale,u=l.getExtent(),h=l.count();if(u[1]-u[0]<1)return 0;var c=1;h>40&&(c=Math.max(1,Math.floor(h/40)));for(var p=u[0],d=t.dataToCoord(p+1)-t.dataToCoord(p),f=Math.abs(d*Math.cos(s)),g=Math.abs(d*Math.sin(s)),v=0,y=0;p<=u[1];p+=c){var m=0,_=0,x=i1(a({value:p}),o.font,"center","top");m=1.3*x.width,_=1.3*x.height,v=Math.max(v,m,7),y=Math.max(y,_,7)}var w=v/f,b=y/g;isNaN(w)&&(w=1/0),isNaN(b)&&(b=1/0);var S=Math.max(0,Math.floor(Math.min(w,b)));if(1===r)return e.out.noPxChangeTryDetermine.push(tO(yV,null,t,S,h)),S;var T=yH(t,S,h);return null!=T?T:S}(this,t=t||yP(2))},t}()),_o=[[3,1],[0,2]],_a=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=m7,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;function i(t){var e,n=tP(t),i=n.length;if(i){for(var r=[],o=i-1;o>=0;o--){var a=t[+n[o]],s=a.model,l=a.scale;v1(l)&&s.get("alignTicks")&&null==s.get("interval")?r.push(a):(yb(l,s),v1(l)&&(e=a))}r.length&&(e||yb((e=r.pop()).scale,e.model),tD(r,function(t){!function(t,e,n){var i=yo.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,{expandToNicedExtent:!0}),a=r.length-1,s=i.getInterval.call(n),l=yw(t,e),u=l.extent,h=l.fixMin,c=l.fixMax;"log"===t.type&&(u=v7(t.base,u,!0)),t.setBreaksFromOption(yI(e)),t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:a,fixMin:h,fixMax:c});var p=i.getExtent.call(t);h&&(u[0]=p[0]),c&&(u[1]=p[1]);var d=i.getInterval.call(t),f=u[0],g=u[1];if(h&&c)d=(g-f)/a;else if(h)for(g=u[0]+d*a;gu[0]&&isFinite(f)&&isFinite(u[0]);)d=v2(d),f=u[1]-d*a;else{t.getTicks().length-1>a&&(d=v2(d));var v=d*a;(f=rm((g=Math.ceil(u[1]/d)*d)-v))<0&&u[0]>=0?(f=0,g=rm(v)):g>0&&u[1]<=0&&(g=0,f=-rm(v))}var y=(r[0].value-o[0].value)/s,m=(r[a].value-o[a].value)/s;i.setExtent.call(t,f+d*y,g+d*m),i.setInterval.call(t,d),(y||m)&&i.setNiceExtent.call(t,f+d,g-d)}(t.scale,t.model,e.scale)}))}}this._updateScale(t,this.model),i(n.x),i(n.y);var r={};tD(n.x,function(t){_l(n,"y",t,r)}),tD(n.y,function(t){_l(n,"x",t,r)}),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=lw(t,e),r=this._rect=lm(t.getBoxLayoutParams(),i.refContainer),o=this._axesMap,a=this._coordsList,s=t.get("containLabel");if(_h(o,r),!n){var l=(h=r,c=a,p=o,d=s,f=e,g=new yj(_f),tD(p,function(t){return tD(t,function(t){yD(t.model)&&(t.axisBuilder=function(t,e,n,i,r,o){for(var a=mr(t,n),s=!1,l=!1,u=0;utM(["all","axisLabel"],w)?"all":w,outerBoundsClamp:[ry(tY(v.get("outerBoundsClampWidth",!0),mj["0"]),y.width),ry(tY(v.get("outerBoundsClampHeight",!0),mj["1"]),y.height)]}),S=b.outerBoundsRect,T=b.parsedOuterBoundsContain,M=b.outerBoundsClamp;S&&(u=_p(S,T,M,r,o,l,i))}_d(r,o,2,null,u,i)}tD(this._coordsList,function(t){t.calcAffineTransform()})},t.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n)return n[e||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}tV(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;itM(s,e=i.coordinateSystem)&&(e=null):r&&o?e=this.getCartesian(r.componentIndex,o.componentIndex):r?n=this.getAxis("x",r.componentIndex):o?n=this.getAxis("y",o.componentIndex):a&&a.coordinateSystem===this&&(e=this._coordsList[0]),{cartesian:e,axis:n}},t.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},t.prototype._initCartesian=function(t,e,n){var i=this,r=this,o={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},s={x:0,y:0};if(e.eachComponent("xAxis",l("x"),this),e.eachComponent("yAxis",l("y"),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}function l(e){return function(n,i){if(_s(n,t)){var l=n.get("position");"x"===e?"top"!==l&&"bottom"!==l&&(l=o.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=o.left?"right":"left"),o[l]=!0;var u=new _r(e,function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new yr({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new ys({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(yt.getClass(e)||yo)}}(n),[0,0],n.get("type"),l),h="category"===u.type;u.onBand=h&&n.get("boundaryGap"),u.inverse=n.get("inverse"),n.axis=u,u.model=n,u.grid=r,u.index=i,r._axesList.push(u),a[e][i]=u,s[e]++}}}this._axesMap=a,tD(a.x,function(e,n){tD(a.y,function(r,o){var a="x"+n+"y"+o,s=new _e(a);s.master=i,s.model=t,i._coordsMap[a]=s,i._coordsList.push(s),s.addAxis(e),s.addAxis(r)})})},t.prototype._updateScale=function(t,e){function n(t,e){var n,i;tD((n=e.dim,i={},tD(t.mapDimensionsAll(n),function(e){i[fS(t,e)?t.getCalculationInfo("stackResultDimension"):e]=!0}),tP(i)),function(n){e.scale.unionExtentFromData(t,n)})}tD(this._axesList,function(t){if(t.scale.setExtent(1/0,-1/0),"category"===t.type){var e=t.model.get("categorySortInfo");t.scale.setSortInfo(e)}}),t.eachSeries(function(t){if(t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type){var i=mo(t),r=i.xAxisModel,o=i.yAxisModel;if(_s(r,e)&&_s(o,e)){var a=this.getCartesian(r.componentIndex,o.componentIndex),s=t.getData(),l=a.getAxis("x"),u=a.getAxis("y");n(s,l),n(s,u)}}},this)},t.prototype.getTooltipAxes=function(t){var e=[],n=[];return tD(this.getCartesians(),function(i){var r=null!=t&&"auto"!==t?i.getAxis(t):i.getBaseAxis(),o=i.getOtherAxis(r);0>tM(e,r)&&e.push(r),0>tM(n,o)&&n.push(o)}),{baseAxes:e,otherAxes:n}},t.create=function(e,n){var i=[];return e.eachComponent("grid",function(r,o){var a=new t(r,e,n);a.name="grid_"+o,a.resize(r,n,!0),r.coordinateSystem=a,i.push(a)}),e.eachSeries(function(t){!function(t){var e=t.targetModel,n=t.coordSysType,i=t.coordSysProvider,r=t.isDefaultDataCoordSys;t.allowNotFound;var o=function(t,e){var n=t.getShallow("coordinateSystem"),i=t.getShallow("coordinateSystemUsage",!0),r=0;if(n){var o="series"===t.mainType;(null==i&&(i=o?"data":"box"),"data"===i)?(r=1,o||(r=0)):"box"!==i||(r=2,o||lc[n])||(r=0)}return{coordSysType:n,kind:r}}(e,0),a=o.kind,s=o.coordSysType;if(r&&1!==a&&(a=1,s=n),0!==a&&s===n){var l=i(n,e);l&&(1===a?e.coordinateSystem=l:e.boxCoordinateSystem=l)}}({targetModel:t,coordSysType:"cartesian2d",coordSysProvider:function(){var e=mo(t),n=e.xAxisModel,i=e.yAxisModel;return n.getCoordSysModel().coordinateSystem.getCartesian(n.componentIndex,i.componentIndex)}})}),i},t.dimensions=m7,t}();function _s(t,e){return t.getCoordSysModel()===e}function _l(t,e,n,i){n.getAxesOnZeroOf=function(){return r?[r]:[]};var r,o=t[e],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)_u(o[l])&&(r=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&_u(o[u])&&!i[h(o[u])]){r=o[u];break}r&&(i[h(r)]=!0)}function h(t){return t.dim+"_"+t.index}}function _u(t){var e,n,i;return t&&"category"!==t.type&&"time"!==t.type&&(n=(e=t.scale.getExtent())[0],i=e[1],!(n>0&&i>0||n<0&&i<0))}function _h(t,e){tD(t.x,function(t){return _c(t,e.x,e.width)}),tD(t.y,function(t){return _c(t,e.y,e.height)})}function _c(t,e,n){var i,r,o=[0,n],a=+!!t.inverse;t.setExtent(o[a],o[1-a]),r=(i=t.getExtent())[0]+i[1],t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return r-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return r-t+e}}function _p(t,e,n,i,r,o,a){_d(i,r,1,e,!1,a);var s=[0,0,0,0];u(0),u(1),h(i,0,NaN),h(i,1,NaN);var l=null==function(t,e,n){if(t&&e){for(var i=0,r=t.length;i0});return ph(i,s,!0,!0,n),_h(r,i),l;function u(t){tD(r[cK[t]],function(e){if(yD(e.model)){var n=o.ensureRecord(e.model),i=n.labelInfoList;if(i)for(var r=0;r0&&e==e&&e>1e-4&&(t/=e),t}}function _d(t,e,n,i,r,o){var a=2===n;tD(e,function(e){return tD(e,function(e){if(yD(e.model)){var n,i;n=e.axisBuilder,i=mr(t,e.model),n.updateCfg(i),e.axisBuilder.build(a?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:r})}})});var s={x:0,y:0};function l(e){s[cK[1-e]]=t[c$[e]]<=.5*o.refContainer[c$[e]]?0:1-e==1?2:1}l(0),l(1),tD(e,function(t,e){return tD(t,function(t){yD(t.model)&&(("all"===i||a)&&t.axisBuilder.build({axisName:!0},{nameMarginLevel:s[e]}),a&&t.axisBuilder.build({axisLine:!0}))})})}var _f=function(t,e,n,i,r,o){var a="x"===n.axis.dim?"y":"x";yQ(t,e,n,i,r,o),yC(t.nameLocation)||tD(e.recordMap[a],function(t){t&&t.labelInfoList&&t.dirVec&&y0(t.labelInfoList,t.dirVec,i,r)})},_g=rV(),_v=["splitArea","splitLine","minorSplitLine","breakArea"],_y=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="CartesianAxisPointer",n}return te(e,t),e.prototype.render=function(e,n,i,r){this.group.removeAll();var o=this._axisGroup;this._axisGroup=new rs,this.group.add(this._axisGroup),yD(e)&&(this._axisGroup.add(e.axis.axisBuilder.group),tD(_v,function(t){e.get([t,"show"])&&_m[t](this,this._axisGroup,e,e.getCoordSysModel(),i)},this),r&&"changeAxisOrder"===r.type&&r.isInitSort||pr(o,this._axisGroup,e),t.prototype.render.call(this,e,n,i,r))},e.prototype.remove=function(){_g(this).splitAreaColors=null},e.type="cartesianAxis",e}(vZ),_m={splitLine:function(t,e,n,i,r){var o=n.axis;if(!o.scale.isBlank()){var a=n.getModel("splitLine"),s=a.getModel("lineStyle"),l=s.get("color"),u=!1!==a.get("showMinLine"),h=!1!==a.get("showMaxLine");l=tR(l)?l:[l];for(var c=i.coordinateSystem.getRect(),p=o.isHorizontal(),d=0,f=o.getTicksCoords({tickModel:a,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),g=[],v=[],y=s.getLineStyle(),m=0;m0?i:1:i))),v=fO(t),y=t.get("barMinHeight")||0,m=p&&r.getDimensionIndex(p),_=r.getLayout("size"),x=r.getLayout("offset");return{progress:function(t,e){for(var n,i=t.count,r=v&&fk(3*i),a=v&&h&&fk(3*i),s=v&&fk(i),c=o.master.getRect(),p=f?c.width:c.height,w=e.getStore(),b=0;null!=(n=t.next());){var S=w.get(d?m:l,n),T=w.get(u,n),M=g,k=void 0;d&&(k=S-w.get(l,n));var C=void 0,D=void 0,I=void 0,A=void 0;if(f){var L=o.dataToPoint([S,T]);if(d){var P=o.dataToPoint([k,T]);M=P[0]}C=M,D=L[1]+x,I=L[0]-M,A=_,Math.abs(I)10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),h=n.getDevicePixelRatio(),c=Math.round(a/(Math.abs(u[1]-u[0])*(h||1)));if(isFinite(c)&&c>1){"lttb"===r?t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/c)):"minmax"===r&&t.setData(i.minmaxDownSample(i.mapDimension(l.dim),1/c));var p=void 0;tE(r)?p=fN[r]:tB(r)&&(p=r),p&&t.setData(i.downSample(i.mapDimension(l.dim),1/c,p,fR))}}}}),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},function(e){t.sortInfo&&e.axis.setCategorySortInfo(t.sortInfo)})})},function(t){var e;t.registerChartView(gU),t.registerSeriesModel(gq),e=t.registerAction,tD([["pieToggleSelect","toggleSelect"],["pieSelect","select"],["pieUnSelect","unselect"]],function(t){e(t[0],function(e,n,i){var r,o;e=tS({},e),i.dispatchAction(tS(e,{type:t[1],seriesIndex:(r=e,o=[],n.eachComponent({mainType:"series",subType:"pie",query:r},function(t){o.push(t.seriesIndex)}),o)}))})}),t.registerLayout(tN(gg,"pie")),t.registerProcessor({seriesType:"pie",reset:function(t,e){var n=e.findComponents({mainType:"legend"});if(n&&n.length){var i=t.getData();i.filterSelf(function(t){for(var e=i.getName(t),r=0;r{_M("statistics/requeststates","piechart1","Statusverteilung aller Anfragen"),_M("statistics/requestpatientstates","piechart2","Statusverteilung nach Patient"),_k("statistics/requestslastmonth","barchart","Anfragen der letzten 30 Tage"),_M("statistics/requeststates?delete=true","piechartdel1","Statusverteilung aller Anfragen"),_M("statistics/requestpatientstates?delete=true","piechartdel2","Statusverteilung nach Patient"),_k("statistics/requestslastmonth?delete=true","barchartdel","Anfragen der letzten 30 Tage");let t=new EventSource("statistics/events");t.addEventListener("requeststates",t=>{_M("statistics/requeststates","piechart1","Statusverteilung aller Anfragen",JSON.parse(t.data))}),t.addEventListener("requestpatientstates",t=>{_M("statistics/requestpatientstates","piechart2","Statusverteilung nach Patient",JSON.parse(t.data))}),t.addEventListener("requestslastmonth",t=>{_k("statistics/requestslastmonth","barchart","Anfragen des letzten Monats",JSON.parse(t.data))}),t.addEventListener("deleterequeststates",t=>{_M("statistics/requeststates?delete=true","piechartdel1","Statusverteilung aller Anfragen",JSON.parse(t.data))}),t.addEventListener("deleterequestpatientstates",t=>{_M("statistics/requestpatientstates?delete=true","piechartdel2","Statusverteilung nach Patient",JSON.parse(t.data))}),t.addEventListener("deleterequestslastmonth",t=>{_k("statistics/requestslastmonth?delete=true","barchartdel","Anfragen des letzten Monats",JSON.parse(t.data))})};let _T=new Intl.DateTimeFormat("de-DE",{year:"numeric",month:"2-digit",day:"2-digit"});function _M(t,e,n,i){function r(t,e){let n=fr(document.getElementById(t),null,{renderer:"svg"}),i={color:e.map(t=>t.color),animationDuration:250,animationDurationUpdate:250,series:[{type:"pie",radius:["40%","70%"],avoidLabelOverlap:!1,label:{show:!1,position:"center"},labelLine:{show:!1},data:e}]};i&&n.setOption(i)}i?r(e,i):fetch(t).then(t=>t.json()).then(t=>{var i,o,a;let s,l;i=e,o=n,a=t,s=fr(document.getElementById(i),null,{renderer:"svg"}),l={title:{text:o,left:"center"},tooltip:{trigger:"item"},color:a.map(t=>t.color),animationDuration:250,animationDurationUpdate:250},s.setOption(l),r(e,t)})}function _k(t,e,n,i){function r(t,e){let n=fr(document.getElementById(t),null,{renderer:"svg"}),i={series:[{name:"UNKNOWN",type:"bar",stack:"total",data:e.map(t=>t.nameValues.unknown)},{name:"ERROR",type:"bar",stack:"total",data:e.map(t=>t.nameValues.error)},{name:"WARNING",type:"bar",stack:"total",data:e.map(t=>t.nameValues.warning)},{name:"SUCCESS",type:"bar",stack:"total",data:e.map(t=>t.nameValues.success)},{name:"DUPLICATION",type:"bar",stack:"total",data:e.map(t=>t.nameValues.duplication)}]};i&&n.setOption(i)}i?r(e,i):fetch(t).then(t=>t.json()).then(t=>{var i,o,a;let s,l;i=e,o=n,a=t,s=fr(document.getElementById(i),null,{renderer:"svg"}),l={title:{text:o,left:"center"},xAxis:{type:"category",data:a.map(t=>_T.format(Date.parse(t.date)))},yAxis:{type:"value",minInterval:1},tooltip:{trigger:"item"},color:["slategray","red","darkorange","green","slategray"],animationDuration:250,animationDurationUpdate:250},s.setOption(l),r(e,t)})}var _C=window;for(var _D in Q)_C[_D]=Q[_D];Q.__esModule&&Object.defineProperty(_C,"__esModule",{value:!0})})(); +//# sourceMappingURL=charts.js.map \ No newline at end of file diff --git a/src/main/resources/static/main.css b/src/main/resources/static/main.css new file mode 100644 index 0000000..8f7c6cb --- /dev/null +++ b/src/main/resources/static/main.css @@ -0,0 +1,2 @@ +:root{--text:#333;--table-border:rgba(16,24,40,.1);--dark:brightness(.9);--bg-blue:#004a9d;--bg-blue-op:rgba(0,74,157,.35);--bg-green:green;--bg-green-op:rgba(0,128,0,.35);--bg-yellow:#ff8c00;--bg-yellow-op:rgba(255,140,0,.35);--bg-red:red;--bg-red-op:rgba(255,0,0,.35);--bg-gray:#708090;--bg-gray-op:rgba(112,128,144,.35)}*{box-sizing:border-box;font-family:sans-serif}html{background:linear-gradient(transparent 30rem,#fff 50rem),linear-gradient(-135deg,transparent 20vw,rgba(0,77,110,.063) 25vw,transparent 30vw),linear-gradient(-135deg,transparent 30vw,rgba(112,111,111,.063) 35vw,transparent 40vw),linear-gradient(-135deg,transparent 40vw,rgba(245,158,0,.063) 45vw,transparent 50vw);overflow-y:scroll}body{color:var(--text);background-size:contain;margin:0;font-size:.8rem}div.headline{z-index:1000;border-bottom:1px solid var(--table-border);background:#fff;align-content:center;width:100%;height:5rem;display:block;position:fixed;top:0}nav{max-width:1140px;margin:0 auto;line-height:1.5rem;display:flex}nav a.nav-home{color:var(--text);margin:auto 0;font-size:2rem;font-weight:700;line-height:1.5rem;text-decoration:none}nav a.nav-home>img{vertical-align:middle;width:1.5rem}nav>ul{width:-webkit-max-content;width:-moz-max-content;width:max-content;margin:0 0 0 auto;padding:0;display:block}nav>ul>li{padding:0 1rem;display:inline-block}nav>ul>li.login{border-left:1px solid var(--table-border);margin:0 0 0 1rem;padding:0 0 0 2rem;line-height:3.5rem}nav>ul>li.login a{text-transform:none;padding:1rem;text-decoration:none}nav .login .user-name{font-weight:700}nav>ul>li.login>span{margin:0 .5rem;display:inline-block}nav>ul>li.login .user-icon{vertical-align:middle;flex-direction:column;width:4rem;display:inline-flex}nav>ul>li.login .user-icon img{align-self:center;width:80%;margin:0 0 -1em}nav>ul>li.login .user-icon span{color:#fff;text-align:center;border-radius:4px;padding:0 .6em;font-size:.8rem;font-weight:700;line-height:normal}nav>ul>li.login .user-icon span.guest{background:#2f4f4f}nav>ul>li.login .user-icon span.user{background:#006400}nav>ul>li.login .user-icon span.admin{background:#8b0000}nav li a{color:var(--bg-blue);text-transform:uppercase;font-weight:700;text-decoration:none}nav li a:hover{text-decoration:underline}a{color:var(--bg-blue)}.breadcrumps{max-width:1140px;margin:0 auto}.breadcrumps ul{background:#eee;margin:2px 0;padding:.4rem 1rem;list-style:none}.breadcrumps ul li{display:inline}.breadcrumps ul li+li:before{color:gray;content:"/ ";padding:.4rem}.breadcrumps ul li a{color:var(--text);text-decoration:none}.centered{text-align:center}.container{margin:auto}main{min-height:calc(100dvh - 10rem);margin:6rem auto 0}main,.container{max-width:1140px}footer{border-top:1px solid var(--table-border);background:var(--bg-blue);color:#fff;align-content:center;width:100%;height:4rem;padding:1rem 0;display:flex;position:relative;bottom:0}footer>.container>div{max-width:1140px;margin:0 auto;display:inline-block}footer>.container>div,footer>.container>div:after{content:"-";padding-left:1rem}footer>.container>div:last-child,footer>.container>div:last-child:after{content:""}footer svg{color:#fff;vertical-align:text-bottom;height:1.4rem}section{margin:3rem 0}form{text-align:center;background:#eee;border:1px solid #d3d3d3;border-radius:3px;margin:1rem 0;padding:1rem}form>h2{margin:0}form.samplecode-input>div{background:#fff;border:1px solid #d3d3d3;border-radius:3px;padding:.6rem;display:inline-block}form.samplecode-input input{text-align:left;-webkit-appearance:textfield;-moz-appearance:textfield;-ms-appearance:textfield;appearance:textfield;border:none;outline:none;padding:0;font-size:1.2rem;font-weight:700}form.samplecode-input input:focus-visible{background:#90ee90}.login-form{border:1px solid var(--table-border);background:#fff;border-radius:.5rem;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:3rem auto;padding:2em 5rem}.login-form form{grid-gap:.5rem;background:0 0;border:none;width:20rem;margin:0 auto;display:grid}.login-form img{width:4rem;margin:0 auto;display:block}.userrole-form{display:inline-block}.userrole-form form{text-align:inherit;background:0 0;border:none;border-radius:0;margin:0;padding:0}.login-form form *,.token-form form *{border:1px solid var(--table-border);border-radius:3px;padding:.5rem}.login-form form hr,.token-form form hr,.userrole-form form hr{width:100%;padding:0}.login-form button,.login-form a.btn,.token-form button{background:var(--bg-blue);color:#fff;border:none;margin:1rem 0}.userrole-form form select{border:none;border-radius:3px;padding:.5rem;font-size:.8rem;line-height:1.2rem}.border{border:1px solid var(--table-border);background:#fff;border-radius:.5rem;padding:1rem}table,.chart{border:1px solid var(--table-border);border-spacing:0;background:#fff;border-radius:.5rem;padding:1.5rem}table{min-width:100%;font-family:sans-serif}table.config-table td:first-child{width:26rem;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}table.config-table td>button:last-of-type{float:right}.border>table{background:0 0;border:none;padding:0}.page-control{text-align:center;border-radius:.5rem;padding:1rem 2rem;line-height:1.75em}.page-control a{color:var(--bg-gray);padding:0 .25rem;font-size:1.75rem;text-decoration:none}.page-control a[href]{color:var(--bg-blue)}.page-control span{vertical-align:text-bottom;padding:0 .5rem}#samples-table.max{background:#fff;width:100vw;min-height:100vh;padding:1rem;position:fixed;top:0;left:0}table.samples{max-width:100%;display:block;overflow-x:scroll}th,td{text-align:left;white-space:nowrap;vertical-align:top;padding:.4rem .2rem;line-height:2rem}th{border-bottom:1px solid var(--bg-gray)}td{border-bottom:1px solid var(--bg-gray-op)}td,td>a{font-family:monospace}tr:last-of-type>td{border-bottom:none}td>small{text-align:center;display:block}td.patient-id{text-overflow:ellipsis;min-width:20rem;overflow:hidden}td.bg-blue,th.bg-blue,td.bg-green,th.bg-green,td.bg-yellow,th.bg-yellow,td.bg-red,th.bg-red,td.bg-gray,th.bg-gray{width:8rem}td.bg-blue>small,th.bg-blue>small{background:var(--bg-blue);color:#fff;border-radius:.4rem}td.bg-green>small,th.bg-green>small{background:var(--bg-green);color:#fff;border-radius:.4rem}td.bg-yellow>small,th.bg-yellow>small{background:var(--bg-yellow);color:#fff;border-radius:.4rem}td.bg-red>small,th.bg-red>small{background:var(--bg-red);color:#fff;border-radius:.4rem}td.bg-gray>small,th.bg-gray>small{background:var(--bg-gray);color:#fff;border-radius:.4rem}.bg-path{background:var(--bg-gray-op)}.bg-from{background:var(--bg-red-op)}.bg-to{background:var(--bg-green-op)}.bg-path,.bg-from,.bg-to{border-radius:3px;padding:.25rem .5rem;font-family:monospace}td.bg-shaded,th.bg-shaded{background:repeating-linear-gradient(140deg,#fff,#e5e5f5 4px,#fff 8px)}td.clipboard{cursor:copy}td.clipboard.clipped{box-shadow:inset 0 0 1rem #90ee90}.btn{cursor:pointer;border:0 solid transparent;border-radius:3px;margin:4px;padding:4px 8px;font-size:.8rem;font-weight:400;line-height:1.2rem;text-decoration:none}.btn:active,.btn:hover{-webkit-filter:drop-shadow(0px 1px 1px var(--bg-gray))var(--dark);filter:drop-shadow(0px 1px 1px var(--bg-gray))var(--dark)}.btn:active{translate:0 1px}.btn.btn-red{background:var(--bg-red);color:#fff}.btn.btn-yellow{background:var(--bg-yellow);color:#fff}.btn.btn-green{background:var(--bg-green);color:#fff}.btn.btn-blue{background:var(--bg-blue);color:#fff}.btn.btn-delete:before{content:"🗑";padding:.2rem}button:disabled,.btn:disabled{color:#d3d3d3;-webkit-filter:none;filter:none;cursor:default;background:#708090!important}input.inline{border:none;outline:none;font-size:1.1rem}input.inline:focus-visible{background:#90ee90}.monospace{color:#333;font-family:monospace;border-bottom:1px dotted gray!important}.help{color:#fff;background:#708090;border:1px solid #2f4f4f;border-radius:3px;padding:1rem}.help.error{background:#ff8c00;border:3px dashed red}.help .help-header{font-size:1.2rem;font-weight:700}.charts{grid-gap:1em;grid-template:"a b"28rem"c c"28rem/1fr 1fr;display:grid}.charts>.grid-left{grid-area:a}.charts>.grid-right{grid-area:b}.charts>.grid-full{grid-area:c}.connection-display{grid-template-columns:10rem 16rem 10rem;align-items:center;justify-items:center;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:1em auto;display:grid}.connection-display>*{text-align:center;margin:auto 0}.connection-display .connection{background:repeating-linear-gradient(to left,white,white 2px,transparent 2px,transparent 8px,white 8px)var(--bg-red);width:100%;height:4px;display:block}.connection-display .connection.available{background:var(--bg-green)}.notification{text-align:center;border-radius:3px;margin:1rem;padding:.5rem}.notification.info{color:var(--bg-blue)}.notification.success{color:var(--bg-green)}.notification.notice{color:var(--bg-yellow)}.notification.error{color:var(--bg-red)}.tab{cursor:pointer;border:none;border-radius:3px 3px 0 0;padding:1rem;font-weight:700;transition:all .2s}.tab:hover,.tab.active{background:var(--bg-gray);color:#fff}.tabcontent{border:2px solid var(--bg-gray);background:#fff;border-radius:0 .5rem .5rem;padding:1rem;display:none}.tabcontent.active{display:block}a.reload{vertical-align:top;border-radius:1.4rem;margin:0;display:none}a.reload:before{content:"⟳";vertical-align:top;font-size:1.2rem}a.reload span{display:none}a.reload:hover span{display:inline}.new-token{background:var(--bg-green-op);padding:1rem}.new-token>pre{border:1px solid var(--bg-green);width:-webkit-max-content;width:-moz-max-content;width:max-content;margin:0;padding:.5rem;display:inline-block}.no-token{background:var(--bg-red-op);padding:1rem}.issue-message{font-family:monospace;font-weight:bolder}.issue-path{font-family:monospace;line-height:1rem} +/*# sourceMappingURL=main.css.map*/ \ No newline at end of file diff --git a/src/main/resources/static/main.js b/src/main/resources/static/main.js new file mode 100644 index 0000000..4a23e45 --- /dev/null +++ b/src/main/resources/static/main.js @@ -0,0 +1,2 @@ +(()=>{"use strict";var __webpack_modules__={37(){var htmx=function(){let currentPathForHistory,htmx={onLoad:null,process:null,on:null,off:null,trigger:null,ajax:null,find:null,findAll:null,closest:null,values:function(e,t){return getInputValues(e,t||"post").values},remove:null,addClass:null,removeClass:null,toggleClass:null,takeClass:null,swap:null,defineExtension:null,removeExtension:null,logAll:null,logNone:null,logger:null,config:{historyEnabled:!0,historyCacheSize:10,refreshOnHistoryMiss:!1,defaultSwapStyle:"innerHTML",defaultSwapDelay:0,defaultSettleDelay:20,includeIndicatorStyles:!0,indicatorClass:"htmx-indicator",requestClass:"htmx-request",addedClass:"htmx-added",settlingClass:"htmx-settling",swappingClass:"htmx-swapping",allowEval:!0,allowScriptTags:!0,inlineScriptNonce:"",inlineStyleNonce:"",attributesToSettle:["class","style","width","height"],withCredentials:!1,timeout:0,wsReconnectDelay:"full-jitter",wsBinaryType:"blob",disableSelector:"[hx-disable], [data-hx-disable]",scrollBehavior:"instant",defaultFocusScroll:!1,getCacheBusterParam:!1,globalViewTransitions:!1,methodsThatUseUrlParams:["get","delete"],selfRequestsOnly:!0,ignoreTitle:!1,scrollIntoViewOnBoost:!0,triggerSpecsCache:null,disableInheritance:!1,responseHandling:[{code:"204",swap:!1},{code:"[23]..",swap:!0},{code:"[45]..",swap:!1,error:!0}],allowNestedOobSwaps:!0,historyRestoreAsHxRequest:!0,reportValidityOfForms:!1},parseInterval:null,location,_:null,version:"2.0.8"};htmx.onLoad=onLoadHelper,htmx.process=processNode,htmx.on=addEventListenerImpl,htmx.off=removeEventListenerImpl,htmx.trigger=triggerEvent,htmx.ajax=ajaxHelper,htmx.find=find,htmx.findAll=findAll,htmx.closest=closest,htmx.remove=removeElement,htmx.addClass=addClassToElement,htmx.removeClass=removeClassFromElement,htmx.toggleClass=toggleClassOnElement,htmx.takeClass=takeClassForElement,htmx.swap=swap,htmx.defineExtension=defineExtension,htmx.removeExtension=removeExtension,htmx.logAll=logAll,htmx.logNone=logNone,htmx.parseInterval=parseInterval,htmx._=internalEval;let internalAPI={addTriggerHandler,bodyContains,canAccessLocalStorage,findThisElement,filterValues,swap,hasAttribute,getAttributeValue,getClosestAttributeValue,getClosestMatch,getExpressionVars,getHeaders,getInputValues,getInternalData,getSwapSpecification,getTriggerSpecs,getTarget,makeFragment,mergeObjects,makeSettleInfo,oobSwap,querySelectorExt,settleImmediately,shouldCancel,triggerEvent,triggerErrorEvent,withExtensions},VERBS=["get","post","put","delete","patch"],VERB_SELECTOR=VERBS.map(function(e){return"[hx-"+e+"], [data-hx-"+e+"]"}).join(", ");function parseInterval(e){if(void 0==e)return;let t=NaN;return isNaN(t="ms"==e.slice(-2)?parseFloat(e.slice(0,-2)):"s"==e.slice(-1)?1e3*parseFloat(e.slice(0,-1)):"m"==e.slice(-1)?1e3*parseFloat(e.slice(0,-1))*60:parseFloat(e))?void 0:t}function getRawAttribute(e,t){return e instanceof Element&&e.getAttribute(t)}function hasAttribute(e,t){return!!e.hasAttribute&&(e.hasAttribute(t)||e.hasAttribute("data-"+t))}function getAttributeValue(e,t){return getRawAttribute(e,t)||getRawAttribute(e,"data-"+t)}function parentElt(e){let t=e.parentElement;return!t&&e.parentNode instanceof ShadowRoot?e.parentNode:t}function getDocument(){return document}function getRootNode(e,t){return e.getRootNode?e.getRootNode({composed:t}):getDocument()}function getClosestMatch(e,t){for(;e&&!t(e);)e=parentElt(e);return e||null}function getAttributeValueWithDisinheritance(e,t,n){let r=getAttributeValue(t,n),o=getAttributeValue(t,"hx-disinherit");var i=getAttributeValue(t,"hx-inherit");if(e!==t){if(htmx.config.disableInheritance)if(i&&("*"===i||i.split(" ").indexOf(n)>=0))return r;else return null;if(o&&("*"===o||o.split(" ").indexOf(n)>=0))return"unset"}return r}function getClosestAttributeValue(e,t){let n=null;if(getClosestMatch(e,function(r){return!!(n=getAttributeValueWithDisinheritance(e,asElement(r),t))}),"unset"!==n)return n}function matches(e,t){return e instanceof Element&&e.matches(t)}function getStartTag(e){let t=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i.exec(e);return t?t[1].toLowerCase():""}function parseHTML(e){return"parseHTMLUnsafe"in Document?Document.parseHTMLUnsafe(e):new DOMParser().parseFromString(e,"text/html")}function takeChildrenFor(e,t){for(;t.childNodes.length>0;)e.append(t.childNodes[0])}function duplicateScript(e){let t=getDocument().createElement("script");return forEach(e.attributes,function(e){t.setAttribute(e.name,e.value)}),t.textContent=e.textContent,t.async=!1,htmx.config.inlineScriptNonce&&(t.nonce=htmx.config.inlineScriptNonce),t}function isJavaScriptScriptNode(e){return e.matches("script")&&("text/javascript"===e.type||"module"===e.type||""===e.type)}function normalizeScriptTags(e){Array.from(e.querySelectorAll("script")).forEach(e=>{if(isJavaScriptScriptNode(e)){let t=duplicateScript(e),n=e.parentNode;try{n.insertBefore(t,e)}catch(e){logError(e)}finally{e.remove()}}})}function makeFragment(e){let t,n=e.replace(/]*)?>[\s\S]*?<\/head>/i,""),r=getStartTag(n);if("html"===r){t=new DocumentFragment;let n=parseHTML(e);takeChildrenFor(t,n.body),t.title=n.title}else if("body"===r){t=new DocumentFragment;let e=parseHTML(n);takeChildrenFor(t,e.body),t.title=e.title}else{let e=parseHTML('");(t=e.querySelector("template").content).title=e.title;var o=t.querySelector("title");o&&o.parentNode===t&&(o.remove(),t.title=o.innerText)}return t&&(htmx.config.allowScriptTags?normalizeScriptTags(t):t.querySelectorAll("script").forEach(e=>e.remove())),t}function maybeCall(e){e&&e()}function isType(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function isFunction(e){return"function"==typeof e}function isRawObject(e){return isType(e,"Object")}function getInternalData(e){let t="htmx-internal-data",n=e[t];return n||(n=e[t]={}),n}function toArray(e){let t=[];if(e)for(let n=0;n=0}function bodyContains(e){return e.getRootNode({composed:!0})===document}function splitOnWhitespace(e){return e.trim().split(/\s+/)}function mergeObjects(e,t){for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function parseJSON(e){try{return JSON.parse(e)}catch(e){return logError(e),null}}function canAccessLocalStorage(){let e="htmx:sessionStorageTest";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){return!1}}function normalizePath(e){let t=new URL(e,"http://x");return t&&(e=t.pathname+t.search),"/"!=e&&(e=e.replace(/\/+$/,"")),e}function internalEval(str){return maybeEval(getDocument().body,function(){return eval(str)})}function onLoadHelper(e){return htmx.on("htmx:load",function(t){e(t.detail.elt)})}function logAll(){htmx.logger=function(e,t,n){console&&console.log(t,e,n)}}function logNone(){htmx.logger=null}function find(e,t){return"string"!=typeof e?e.querySelector(t):find(getDocument(),e)}function findAll(e,t){return"string"!=typeof e?e.querySelectorAll(t):findAll(getDocument(),e)}function getWindow(){return window}function removeElement(e,t){e=resolveTarget(e),t?getWindow().setTimeout(function(){removeElement(e),e=null},t):parentElt(e).removeChild(e)}function asElement(e){return e instanceof Element?e:null}function asHtmlElement(e){return e instanceof HTMLElement?e:null}function asString(e){return"string"==typeof e?e:null}function asParentNode(e){return e instanceof Element||e instanceof Document||e instanceof DocumentFragment?e:null}function addClassToElement(e,t,n){(e=asElement(resolveTarget(e)))&&(n?getWindow().setTimeout(function(){addClassToElement(e,t),e=null},n):e.classList&&e.classList.add(t))}function removeClassFromElement(e,t,n){let r=asElement(resolveTarget(e));r&&(n?getWindow().setTimeout(function(){removeClassFromElement(r,t),r=null},n):r.classList&&(r.classList.remove(t),0===r.classList.length&&r.removeAttribute("class")))}function toggleClassOnElement(e,t){(e=resolveTarget(e)).classList.toggle(t)}function takeClassForElement(e,t){forEach((e=resolveTarget(e)).parentElement.children,function(e){removeClassFromElement(e,t)}),addClassToElement(asElement(e),t)}function closest(e,t){return(e=asElement(resolveTarget(e)))?e.closest(t):null}function startsWith(e,t){return e.substring(0,t.length)===t}function endsWith(e,t){return e.substring(e.length-t.length)===t}function normalizeSelector(e){let t=e.trim();return startsWith(t,"<")&&endsWith(t,"/>")?t.substring(1,t.length-2):t}function querySelectorAllExt(e,t,n){if(0===t.indexOf("global "))return querySelectorAllExt(e,t.slice(7),!0);e=resolveTarget(e);let r=[];{let e=0,n=0;for(let o=0;o"===t[o+1]&&e--}n0;){let t,l=normalizeSelector(r.shift());0===l.indexOf("closest ")?t=closest(asElement(e),normalizeSelector(l.slice(8))):0===l.indexOf("find ")?t=find(asParentNode(e),normalizeSelector(l.slice(5))):"next"===l||"nextElementSibling"===l?t=asElement(e).nextElementSibling:0===l.indexOf("next ")?t=scanForwardQuery(e,normalizeSelector(l.slice(5)),!!n):"previous"===l||"previousElementSibling"===l?t=asElement(e).previousElementSibling:0===l.indexOf("previous ")?t=scanBackwardsQuery(e,normalizeSelector(l.slice(9)),!!n):"document"===l?t=document:"window"===l?t=window:"body"===l?t=document.body:"root"===l?t=getRootNode(e,!!n):"host"===l?t=e.getRootNode().host:i.push(l),t&&o.push(t)}if(i.length>0){let t=i.join(","),r=asParentNode(getRootNode(e,!!n));o.push(...toArray(r.querySelectorAll(t)))}return o}var scanForwardQuery=function(e,t,n){let r=asParentNode(getRootNode(e,n)).querySelectorAll(t);for(let t=0;t=0;t--){let n=r[t];if(n.compareDocumentPosition(e)===Node.DOCUMENT_POSITION_FOLLOWING)return n}};function querySelectorExt(e,t){return"string"!=typeof e?querySelectorAllExt(e,t)[0]:querySelectorAllExt(getDocument().body,e)[0]}function resolveTarget(e,t){return"string"==typeof e?find(asParentNode(t)||document,e):e}function processEventArgs(e,t,n,r){return isFunction(t)?{target:getDocument().body,event:asString(e),listener:t,options:n}:{target:resolveTarget(e),event:asString(t),listener:n,options:r}}function addEventListenerImpl(e,t,n,r){return ready(function(){let o=processEventArgs(e,t,n,r);o.target.addEventListener(o.event,o.listener,o.options)}),isFunction(t)?t:n}function removeEventListenerImpl(e,t,n){return ready(function(){let r=processEventArgs(e,t,n);r.target.removeEventListener(r.event,r.listener)}),isFunction(t)?t:n}let DUMMY_ELT=getDocument().createElement("output");function findAttributeTargets(e,t){let n=getClosestAttributeValue(e,t);if(n)if("this"===n)return[findThisElement(e,t)];else{let r=querySelectorAllExt(e,n);if(/(^|,)(\s*)inherit(\s*)($|,)/.test(n)){let n=asElement(getClosestMatch(e,function(n){return n!==e&&hasAttribute(asElement(n),t)}));n&&r.push(...findAttributeTargets(n,t))}return 0===r.length?(logError('The selector "'+n+'" on '+t+" returned no matches!"),[DUMMY_ELT]):r}}function findThisElement(e,t){return asElement(getClosestMatch(e,function(e){return null!=getAttributeValue(asElement(e),t)}))}function getTarget(e){let t=getClosestAttributeValue(e,"hx-target");if(t)if("this"===t)return findThisElement(e,"hx-target");else return querySelectorExt(e,t);return getInternalData(e).boosted?getDocument().body:e}function shouldSettleAttribute(e){return htmx.config.attributesToSettle.includes(e)}function cloneAttributes(e,t){forEach(Array.from(e.attributes),function(n){!t.hasAttribute(n.name)&&shouldSettleAttribute(n.name)&&e.removeAttribute(n.name)}),forEach(t.attributes,function(t){shouldSettleAttribute(t.name)&&e.setAttribute(t.name,t.value)})}function isInlineSwap(e,t){let n=getExtensions(t);for(let t=0;t0?(i=e.substring(0,e.indexOf(":")),o=e.substring(e.indexOf(":")+1)):i=e),t.removeAttribute("hx-swap-oob"),t.removeAttribute("data-hx-swap-oob");let l=querySelectorAllExt(r,o,!1);return l.length?(forEach(l,function(e){let r,o=t.cloneNode(!0);(r=getDocument().createDocumentFragment()).appendChild(o),isInlineSwap(i,e)||(r=asParentNode(o));let l={shouldSwap:!0,target:e,fragment:r};triggerEvent(e,"htmx:oobBeforeSwap",l)&&(e=l.target,l.shouldSwap&&(handlePreservedElements(r),swapWithStyle(i,e,e,r,n),restorePreservedElements()),forEach(n.elts,function(e){triggerEvent(e,"htmx:oobAfterSwap",l)}))}),t.parentNode.removeChild(t)):(t.parentNode.removeChild(t),triggerErrorEvent(getDocument().body,"htmx:oobErrorNoTarget",{content:t})),e}function restorePreservedElements(){let e=find("#--htmx-preserve-pantry--");if(e){for(let t of[...e.children]){let e=find("#"+t.id);e.parentNode.moveBefore(t,e),e.remove()}e.remove()}}function handlePreservedElements(e){forEach(findAll(e,"[hx-preserve], [data-hx-preserve]"),function(e){let t=getAttributeValue(e,"id"),n=getDocument().getElementById(t);if(null!=n)if(e.moveBefore){let e=find("#--htmx-preserve-pantry--");null==e&&(getDocument().body.insertAdjacentHTML("afterend","
"),e=find("#--htmx-preserve-pantry--")),e.moveBefore(n,null)}else e.parentNode.replaceChild(n,e)})}function handleAttributes(e,t,n){forEach(t.querySelectorAll("[id]"),function(t){let r=getRawAttribute(t,"id");if(r&&r.length>0){let o=r.replace("'","\\'"),i=t.tagName.replace(":","\\:"),l=asParentNode(e),s=l&&l.querySelector(i+"[id='"+o+"']");if(s&&s!==l){let e=t.cloneNode();cloneAttributes(t,s),n.tasks.push(function(){cloneAttributes(t,e)})}}})}function makeAjaxLoadTask(e){return function(){removeClassFromElement(e,htmx.config.addedClass),processNode(asElement(e)),processFocus(asParentNode(e)),triggerEvent(e,"htmx:load")}}function processFocus(e){let t="[autofocus]",n=asHtmlElement(matches(e,t)?e:e.querySelector(t));null!=n&&n.focus()}function insertNodesBefore(e,t,n,r){for(handleAttributes(e,n,r);n.childNodes.length>0;){let o=n.firstChild;addClassToElement(asElement(o),htmx.config.addedClass),e.insertBefore(o,t),o.nodeType!==Node.TEXT_NODE&&o.nodeType!==Node.COMMENT_NODE&&r.tasks.push(makeAjaxLoadTask(o))}}function stringHash(e,t){let n=0;for(;n0}function swap(e,t,n,r){r||(r={});let o=null,i=null,l=function(){maybeCall(r.beforeSwapCallback),e=resolveTarget(e);let i=r.contextElement?getRootNode(r.contextElement,!1):getDocument(),l=document.activeElement,s={};s={elt:l,start:l?l.selectionStart:null,end:l?l.selectionEnd:null};let a=makeSettleInfo(e);if("textContent"===n.swapStyle)e.textContent=t;else{let o=makeFragment(t);if(a.title=r.title||o.title,r.historyRequest&&(o=o.querySelector("[hx-history-elt],[data-hx-history-elt]")||o),r.selectOOB){let e=r.selectOOB.split(",");for(let t=0;t0?getWindow().setTimeout(u,n.settleDelay):u()},s=htmx.config.globalViewTransitions;n.hasOwnProperty("transition")&&(s=n.transition);let a=r.contextElement||getDocument();if(s&&triggerEvent(a,"htmx:beforeTransition",r.eventInfo)&&"u">typeof Promise&&document.startViewTransition){let e=new Promise(function(e,t){o=e,i=t}),t=l;l=function(){document.startViewTransition(function(){return t(),e})}}try{n?.swapDelay&&n.swapDelay>0?getWindow().setTimeout(l,n.swapDelay):l()}catch(e){throw triggerErrorEvent(a,"htmx:swapError",r.eventInfo),maybeCall(i),e}}function handleTriggerHeader(e,t,n){let r=e.getResponseHeader(t);if(0===r.indexOf("{")){let e=parseJSON(r);for(let t in e)if(e.hasOwnProperty(t)){let r=e[t];isRawObject(r)?n=void 0!==r.target?r.target:n:r={value:r},triggerEvent(n,t,r)}}else{let e=r.split(",");for(let t=0;t0;){let l=t[0];if("]"===l){if(0==--r){null===i&&(o+="true"),t.shift(),o+=")})";try{let t=maybeEval(e,function(){return Function(o)()},function(){return!0});return t.source=o,t}catch(e){return triggerErrorEvent(getDocument().body,"htmx:syntax:error",{error:e,source:o}),null}}}else"["===l&&r++;isPossibleRelativeReference(l,i,n)?o+="(("+n+"."+l+") ? ("+n+"."+l+") : (window."+l+"))":o+=l,i=t.shift()}}}function consumeUntil(e,t){let n="";for(;e.length>0&&!t.test(e[0]);)n+=e.shift();return n}function consumeCSSSelector(e){let t;return e.length>0&&COMBINED_SELECTOR_START.test(e[0])?(e.shift(),t=consumeUntil(e,COMBINED_SELECTOR_END).trim(),e.shift()):t=consumeUntil(e,WHITESPACE_OR_COMMA),t}let INPUT_SELECTOR="input, textarea, select";function parseAndCacheTrigger(e,t,n){let r=[],o=tokenizeString(t);do{consumeUntil(o,NOT_WHITESPACE);let t=o.length,n=consumeUntil(o,/[,\[\s]/);if(""!==n)if("every"===n){let t={trigger:"every"};consumeUntil(o,NOT_WHITESPACE),t.pollInterval=parseInterval(consumeUntil(o,/[,\[\s]/)),consumeUntil(o,NOT_WHITESPACE);var i=maybeGenerateConditional(e,o,"event");i&&(t.eventFilter=i),r.push(t)}else{let t={trigger:n};var i=maybeGenerateConditional(e,o,"event");for(i&&(t.eventFilter=i),consumeUntil(o,NOT_WHITESPACE);o.length>0&&","!==o[0];){let n=o.shift();if("changed"===n)t.changed=!0;else if("once"===n)t.once=!0;else if("consume"===n)t.consume=!0;else if("delay"===n&&":"===o[0])o.shift(),t.delay=parseInterval(consumeUntil(o,WHITESPACE_OR_COMMA));else if("from"===n&&":"===o[0]){if(o.shift(),COMBINED_SELECTOR_START.test(o[0]))var l=consumeCSSSelector(o);else{var l=consumeUntil(o,WHITESPACE_OR_COMMA);if("closest"===l||"find"===l||"next"===l||"previous"===l){o.shift();let e=consumeCSSSelector(o);e.length>0&&(l+=" "+e)}}t.from=l}else"target"===n&&":"===o[0]?(o.shift(),t.target=consumeCSSSelector(o)):"throttle"===n&&":"===o[0]?(o.shift(),t.throttle=parseInterval(consumeUntil(o,WHITESPACE_OR_COMMA))):"queue"===n&&":"===o[0]?(o.shift(),t.queue=consumeUntil(o,WHITESPACE_OR_COMMA)):"root"===n&&":"===o[0]?(o.shift(),t[n]=consumeCSSSelector(o)):"threshold"===n&&":"===o[0]?(o.shift(),t[n]=consumeUntil(o,WHITESPACE_OR_COMMA)):triggerErrorEvent(e,"htmx:syntax:error",{token:o.shift()});consumeUntil(o,NOT_WHITESPACE)}r.push(t)}o.length===t&&triggerErrorEvent(e,"htmx:syntax:error",{token:o.shift()}),consumeUntil(o,NOT_WHITESPACE)}while(","===o[0]&&o.shift());return n&&(n[t]=r),r}function getTriggerSpecs(e){let t=getAttributeValue(e,"hx-trigger"),n=[];if(t){let r=htmx.config.triggerSpecsCache;n=r&&r[t]||parseAndCacheTrigger(e,t,r)}return n.length>0?n:matches(e,"form")?[{trigger:"submit"}]:matches(e,'input[type="button"], input[type="submit"]')?[{trigger:"click"}]:matches(e,INPUT_SELECTOR)?[{trigger:"change"}]:[{trigger:"click"}]}function cancelPolling(e){getInternalData(e).cancelled=!0}function processPolling(e,t,n){let r=getInternalData(e);r.timeout=getWindow().setTimeout(function(){bodyContains(e)&&!0!==r.cancelled&&(maybeFilterEvent(n,e,makeEvent("hx:poll:trigger",{triggerSpec:n,target:e}))||t(e),processPolling(e,t,n))},n.pollInterval)}function isLocalLink(e){return location.hostname===e.hostname&&getRawAttribute(e,"href")&&0!==getRawAttribute(e,"href").indexOf("#")}function eltIsDisabled(e){return closest(e,htmx.config.disableSelector)}function boostElement(e,t,n){if(e instanceof HTMLAnchorElement&&isLocalLink(e)&&(""===e.target||"_self"===e.target)||"FORM"===e.tagName&&"dialog"!==String(getRawAttribute(e,"method")).toLowerCase()){let r,o;if(t.boosted=!0,"A"===e.tagName)r="get",o=getRawAttribute(e,"href");else{let t=getRawAttribute(e,"method");r=t?t.toLowerCase():"get",(null==(o=getRawAttribute(e,"action"))||""===o)&&(o=location.href),"get"===r&&o.includes("?")&&(o=o.replace(/\?[^#]+/,""))}n.forEach(function(n){addEventListener(e,function(e,t){let n=asElement(e);eltIsDisabled(n)?cleanUpElement(n):issueAjaxRequest(r,o,n,t)},t,n,!0)})}}function shouldCancel(e,t){if("submit"===e.type&&"FORM"===t.tagName)return!0;if("click"===e.type){let e=t.closest('input[type="submit"], button');if(e&&e.form&&"submit"===e.type)return!0;let n=t.closest("a"),r=/^#.+/;if(n&&n.href&&!r.test(n.getAttribute("href")))return!0}return!1}function ignoreBoostedAnchorCtrlClick(e,t){return getInternalData(e).boosted&&e instanceof HTMLAnchorElement&&"click"===t.type&&(t.ctrlKey||t.metaKey)}function maybeFilterEvent(e,t,n){let r=e.eventFilter;if(r)try{return!0!==r.call(t,n)}catch(t){let e=r.source;return triggerErrorEvent(getDocument().body,"htmx:eventFilter:error",{error:t,source:e}),!0}return!1}function addEventListener(e,t,n,r,o){let i,l=getInternalData(e);i=r.from?querySelectorAllExt(e,r.from):[e],r.changed&&("lastValue"in l||(l.lastValue=new WeakMap),i.forEach(function(e){l.lastValue.has(r)||l.lastValue.set(r,new WeakMap),l.lastValue.get(r).set(e,e.value)})),forEach(i,function(i){let s=function(n){if(!bodyContains(e))return void i.removeEventListener(r.trigger,s);if(ignoreBoostedAnchorCtrlClick(e,n)||((o||shouldCancel(n,i))&&n.preventDefault(),maybeFilterEvent(r,e,n)))return;let a=getInternalData(n);if(a.triggerSpec=r,null==a.handledFor&&(a.handledFor=[]),0>a.handledFor.indexOf(e)){if(a.handledFor.push(e),r.consume&&n.stopPropagation(),r.target&&n.target&&!matches(asElement(n.target),r.target))return;if(r.once)if(l.triggeredOnce)return;else l.triggeredOnce=!0;if(r.changed){let e=n.target,t=e.value,o=l.lastValue.get(r);if(o.has(e)&&o.get(e)===t)return;o.set(e,t)}if(l.delayed&&clearTimeout(l.delayed),l.throttle)return;r.throttle>0?l.throttle||(triggerEvent(e,"htmx:trigger"),t(e,n),l.throttle=getWindow().setTimeout(function(){l.throttle=null},r.throttle)):r.delay>0?l.delayed=getWindow().setTimeout(function(){triggerEvent(e,"htmx:trigger"),t(e,n)},r.delay):(triggerEvent(e,"htmx:trigger"),t(e,n))}};null==n.listenerInfos&&(n.listenerInfos=[]),n.listenerInfos.push({trigger:r.trigger,listener:s,on:i}),i.addEventListener(r.trigger,s)})}let windowIsScrolling=!1,scrollHandler=null;function initScrollHandler(){scrollHandler||(scrollHandler=function(){windowIsScrolling=!0},window.addEventListener("scroll",scrollHandler),window.addEventListener("resize",scrollHandler),setInterval(function(){windowIsScrolling&&(windowIsScrolling=!1,forEach(getDocument().querySelectorAll("[hx-trigger*='revealed'],[data-hx-trigger*='revealed']"),function(e){maybeReveal(e)}))},200))}function maybeReveal(e){!hasAttribute(e,"data-hx-revealed")&&isScrolledIntoView(e)&&(e.setAttribute("data-hx-revealed","true"),getInternalData(e).initHash?triggerEvent(e,"revealed"):e.addEventListener("htmx:afterProcessNode",function(){triggerEvent(e,"revealed")},{once:!0}))}function loadImmediately(e,t,n,r){let o=function(){n.loaded||(n.loaded=!0,triggerEvent(e,"htmx:trigger"),t(e))};r>0?getWindow().setTimeout(o,r):o()}function processVerbs(e,t,n){let r=!1;return forEach(VERBS,function(o){if(hasAttribute(e,"hx-"+o)){let i=getAttributeValue(e,"hx-"+o);r=!0,t.path=i,t.verb=o,n.forEach(function(n){addTriggerHandler(e,n,t,function(e,t){let n=asElement(e);eltIsDisabled(n)?cleanUpElement(n):issueAjaxRequest(o,i,n,t)})})}}),r}function addTriggerHandler(e,t,n,r){if("revealed"===t.trigger)initScrollHandler(),addEventListener(e,r,n,t),maybeReveal(asElement(e));else if("intersect"===t.trigger){let o={};t.root&&(o.root=querySelectorExt(e,t.root)),t.threshold&&(o.threshold=parseFloat(t.threshold)),new IntersectionObserver(function(t){for(let n=0;n0?(n.polling=!0,processPolling(asElement(e),r,t)):addEventListener(e,r,n,t):maybeFilterEvent(t,e,makeEvent("load",{elt:e}))||loadImmediately(asElement(e),r,n,t.delay)}function shouldProcessHxOn(e){let t=asElement(e);if(!t)return!1;let n=t.attributes;for(let e=0;e", "+e).join(""))}}function maybeSetLastButtonClicked(e){let t=getTargetButton(e.target),n=getRelatedFormData(e);n&&(n.lastButtonClicked=t)}function maybeUnsetLastButtonClicked(e){let t=getRelatedFormData(e);t&&(t.lastButtonClicked=null)}function getTargetButton(e){return closest(asElement(e),"button, input[type='submit']")}function getRelatedForm(e){return e.form||closest(e,"form")}function getRelatedFormData(e){let t=getTargetButton(e.target);if(!t)return;let n=getRelatedForm(t);if(n)return getInternalData(n)}function initButtonTracking(e){e.addEventListener("click",maybeSetLastButtonClicked),e.addEventListener("focusin",maybeSetLastButtonClicked),e.addEventListener("focusout",maybeUnsetLastButtonClicked)}function addHxOnEventHandler(e,t,n){let r,o=getInternalData(e);Array.isArray(o.onHandlers)||(o.onHandlers=[]);let i=function(t){maybeEval(e,function(){eltIsDisabled(e)||(r||(r=Function("event",n)),r.call(e,t))})};e.addEventListener(t,i),o.onHandlers.push({event:t,listener:i})}function processHxOnWildcard(e){deInitOnHandlers(e);for(let t=0;thtmx.config.historyCacheSize;)i.shift();for(;i.length>0;)try{sessionStorage.setItem("htmx-history-cache",JSON.stringify(i));break}catch(e){triggerErrorEvent(getDocument().body,"htmx:historyCacheError",{cause:e,cache:i}),i.shift()}}function getCachedHistory(e){if(!canAccessLocalStorage())return null;e=normalizePath(e);let t=parseJSON(sessionStorage.getItem("htmx-history-cache"))||[];for(let n=0;n=200&&this.status<400?(r.response=this.response,triggerEvent(getDocument().body,"htmx:historyCacheMissLoad",r),swap(r.historyElt,r.response,n,{contextElement:r.historyElt,historyRequest:!0}),setCurrentPathForHistory(r.path),triggerEvent(getDocument().body,"htmx:historyRestore",{path:e,cacheMiss:!0,serverResponse:r.response})):triggerErrorEvent(getDocument().body,"htmx:historyCacheMissLoadError",r)},triggerEvent(getDocument().body,"htmx:historyCacheMiss",r)&&t.send()}function restoreHistory(e){saveCurrentPageToHistory();let t=getCachedHistory(e=e||location.pathname+location.search);if(t){let n={swapStyle:"innerHTML",swapDelay:0,settleDelay:0,scroll:t.scroll},r={path:e,item:t,historyElt:getHistoryElement(),swapSpec:n};triggerEvent(getDocument().body,"htmx:historyCacheHit",r)&&(swap(r.historyElt,t.content,n,{contextElement:r.historyElt,title:t.title}),setCurrentPathForHistory(r.path),triggerEvent(getDocument().body,"htmx:historyRestore",r))}else htmx.config.refreshOnHistoryMiss?htmx.location.reload(!0):loadHistoryFromServer(e)}function addRequestIndicatorClasses(e){let t=findAttributeTargets(e,"hx-indicator");return null==t&&(t=[e]),forEach(t,function(e){let t=getInternalData(e);t.requestCount=(t.requestCount||0)+1,e.classList.add.call(e.classList,htmx.config.requestClass)}),t}function disableElements(e){let t=findAttributeTargets(e,"hx-disabled-elt");return null==t&&(t=[]),forEach(t,function(e){let t=getInternalData(e);t.requestCount=(t.requestCount||0)+1,e.setAttribute("disabled",""),e.setAttribute("data-disabled-by-htmx","")}),t}function removeRequestIndicators(e,t){forEach(e.concat(t),function(e){let t=getInternalData(e);t.requestCount=(t.requestCount||1)-1}),forEach(e,function(e){0===getInternalData(e).requestCount&&e.classList.remove.call(e.classList,htmx.config.requestClass)}),forEach(t,function(e){0===getInternalData(e).requestCount&&(e.removeAttribute("disabled"),e.removeAttribute("data-disabled-by-htmx"))})}function haveSeenNode(e,t){for(let n=0;n0>t.indexOf(e)):r.filter(e=>e!==t),n.delete(e),forEach(r,t=>n.append(e,t))}}function getValueFromInput(e){return e instanceof HTMLSelectElement&&e.multiple?toArray(e.querySelectorAll("option:checked")).map(function(e){return e.value}):e instanceof HTMLInputElement&&e.files?toArray(e.files):e.value}function processInputValue(e,t,n,r,o){!(null==r||haveSeenNode(e,r))&&(e.push(r),shouldInclude(r)&&(addValueToFormData(getRawAttribute(r,"name"),getValueFromInput(r),t),o&&validateElement(r,n)),r instanceof HTMLFormElement&&(forEach(r.elements,function(r){e.indexOf(r)>=0?removeValueFromFormData(r.name,getValueFromInput(r),t):e.push(r),o&&validateElement(r,n)}),new FormData(r).forEach(function(e,n){e instanceof File&&""===e.name||addValueToFormData(n,e,t)})))}function validateElement(e,t){let n=e;n.willValidate&&(triggerEvent(n,"htmx:validation:validate"),n.checkValidity()||(triggerEvent(n,"htmx:validation:failed",{message:n.validationMessage,validity:n.validity})&&!t.length&&htmx.config.reportValidityOfForms&&n.reportValidity(),t.push({elt:n,message:n.validationMessage,validity:n.validity})))}function overrideFormData(e,t){for(let n of t.keys())e.delete(n);return t.forEach(function(t,n){e.append(n,t)}),e}function getInputValues(e,t){let n=[],r=new FormData,o=new FormData,i=[],l=getInternalData(e);l.lastButtonClicked&&!bodyContains(l.lastButtonClicked)&&(l.lastButtonClicked=null);let s=e instanceof HTMLFormElement&&!0!==e.noValidate||"true"===getAttributeValue(e,"hx-validate");if(l.lastButtonClicked&&(s=s&&!0!==l.lastButtonClicked.formNoValidate),"get"!==t&&processInputValue(n,o,i,getRelatedForm(e),s),processInputValue(n,r,i,e,s),l.lastButtonClicked||"BUTTON"===e.tagName||"INPUT"===e.tagName&&"submit"===getRawAttribute(e,"type")){let t=l.lastButtonClicked||e;addValueToFormData(getRawAttribute(t,"name"),t.value,o)}return forEach(findAttributeTargets(e,"hx-include"),function(e){processInputValue(n,r,i,asElement(e),s),matches(e,"form")||forEach(asParentNode(e).querySelectorAll(INPUT_SELECTOR),function(e){processInputValue(n,r,i,e,s)})}),overrideFormData(r,o),{errors:i,formData:r,values:formDataProxy(r)}}function appendParam(e,t,n){""!==e&&(e+="&"),"[object Object]"===String(n)&&(n=JSON.stringify(n));let r=encodeURIComponent(n);return e+(encodeURIComponent(t)+"="+r)}function urlEncode(e){e=formDataFromObject(e);let t="";return e.forEach(function(e,n){t=appendParam(t,n,e)}),t}function getHeaders(e,t,n){let r={"HX-Request":"true","HX-Trigger":getRawAttribute(e,"id"),"HX-Trigger-Name":getRawAttribute(e,"name"),"HX-Target":getAttributeValue(t,"id"),"HX-Current-URL":location.href};return getValuesForElement(e,"hx-headers",!1,r),void 0!==n&&(r["HX-Prompt"]=n),getInternalData(e).boosted&&(r["HX-Boosted"]="true"),r}function filterValues(e,t){let n=getClosestAttributeValue(t,"hx-params");if(!n)return e;if("none"===n)return new FormData;if("*"===n)return e;{if(0===n.indexOf("not "))return forEach(n.slice(4).split(","),function(t){t=t.trim(),e.delete(t)}),e;let t=new FormData;return forEach(n.split(","),function(n){n=n.trim(),e.has(n)&&e.getAll(n).forEach(function(e){t.append(n,e)})}),t}}function isAnchorLink(e){return!!getRawAttribute(e,"href")&&getRawAttribute(e,"href").indexOf("#")>=0}function getSwapSpecification(e,t){let n=t||getClosestAttributeValue(e,"hx-swap"),r={swapStyle:getInternalData(e).boosted?"innerHTML":htmx.config.defaultSwapStyle,swapDelay:htmx.config.defaultSwapDelay,settleDelay:htmx.config.defaultSettleDelay};if(htmx.config.scrollIntoViewOnBoost&&getInternalData(e).boosted&&!isAnchorLink(e)&&(r.show="top"),n){let e=splitOnWhitespace(n);if(e.length>0)for(let t=0;t0?o.join(":"):null;r.scroll=e,r.scrollTarget=i}else if(0===n.indexOf("show:")){var o=n.slice(5).split(":");let e=o.pop();var i=o.length>0?o.join(":"):null;r.show=e,r.showTarget=i}else 0===n.indexOf("focus-scroll:")?r.focusScroll="true"==n.slice(13):0==t?r.swapStyle=n:logError("Unknown modifier in hx-swap: "+n)}}return r}function usesFormData(e){return"multipart/form-data"===getClosestAttributeValue(e,"hx-encoding")||matches(e,"form")&&"multipart/form-data"===getRawAttribute(e,"enctype")}function encodeParamsForBody(e,t,n){let r=null;return(withExtensions(t,function(o){null==r&&(r=o.encodeParameters(e,n,t))}),null!=r)?r:usesFormData(t)?overrideFormData(new FormData,formDataFromObject(n)):urlEncode(n)}function makeSettleInfo(e){return{tasks:[],elts:[e]}}function updateScrollState(e,t){let n=e[0],r=e[e.length-1];if(t.scroll){var o=null;t.scrollTarget&&(o=asElement(querySelectorExt(n,t.scrollTarget))),"top"===t.scroll&&(n||o)&&((o=o||n).scrollTop=0),"bottom"===t.scroll&&(r||o)&&((o=o||r).scrollTop=o.scrollHeight),"number"==typeof t.scroll&&getWindow().setTimeout(function(){window.scrollTo(0,t.scroll)},0)}if(t.show){var o=null;if(t.showTarget){let e=t.showTarget;"window"===t.showTarget&&(e="body"),o=asElement(querySelectorExt(n,e))}"top"===t.show&&(n||o)&&(o=o||n).scrollIntoView({block:"start",behavior:htmx.config.scrollBehavior}),"bottom"===t.show&&(r||o)&&(o=o||r).scrollIntoView({block:"end",behavior:htmx.config.scrollBehavior})}}function getValuesForElement(e,t,n,r,o){if(null==r&&(r={}),null==e)return r;let i=getAttributeValue(e,t);if(i){let t,l=i.trim(),s=n;if("unset"===l)return null;for(let n in 0===l.indexOf("javascript:")?(l=l.slice(11),s=!0):0===l.indexOf("js:")&&(l=l.slice(3),s=!0),0!==l.indexOf("{")&&(l="{"+l+"}"),t=s?maybeEval(e,function(){return o?Function("event","return ("+l+")").call(e,o):Function("return ("+l+")").call(e)},{}):parseJSON(l))t.hasOwnProperty(n)&&null==r[n]&&(r[n]=t[n])}return getValuesForElement(asElement(parentElt(e)),t,n,r,o)}function maybeEval(e,t,n){return htmx.config.allowEval?t():(triggerErrorEvent(e,"htmx:evalDisallowedError"),n)}function getHXVarsForElement(e,t,n){return getValuesForElement(e,"hx-vars",!0,n,t)}function getHXValsForElement(e,t,n){return getValuesForElement(e,"hx-vals",!1,n,t)}function getExpressionVars(e,t){return mergeObjects(getHXVarsForElement(e,t),getHXValsForElement(e,t))}function safelySetHeaderValue(e,t,n){if(null!==n)try{e.setRequestHeader(t,n)}catch(r){e.setRequestHeader(t,encodeURIComponent(n)),e.setRequestHeader(t+"-URI-AutoEncoded","true")}}function getPathFromResponse(e){if(e.responseURL)try{let t=new URL(e.responseURL);return t.pathname+t.search}catch(t){triggerErrorEvent(getDocument().body,"htmx:badResponseUrl",{url:e.responseURL})}}function hasHeader(e,t){return t.test(e.getAllResponseHeaders())}function ajaxHelper(e,t,n){if(e=e.toLowerCase(),!n)return issueAjaxRequest(e,t,null,null,{returnPromise:!0});if(n instanceof Element||"string"==typeof n)return issueAjaxRequest(e,t,null,null,{targetOverride:resolveTarget(n)||DUMMY_ELT,returnPromise:!0});{let r=resolveTarget(n.target);return(!n.target||r)&&(!n.source||r||resolveTarget(n.source))||(r=DUMMY_ELT),issueAjaxRequest(e,t,resolveTarget(n.source),n.event,{handler:n.handler,headers:n.headers,values:n.values,targetOverride:r,swapOverride:n.swap,select:n.select,returnPromise:!0,push:n.push,replace:n.replace,selectOOB:n.selectOOB})}}function hierarchyForElt(e){let t=[];for(;e;)t.push(e),e=e.parentElement;return t}function verifyPath(e,t,n){let r=new URL(t,"about:"!==location.protocol?location.href:window.origin),o=("about:"!==location.protocol?location.origin:window.origin)===r.origin;return(!htmx.config.selfRequestsOnly||!!o)&&triggerEvent(e,"htmx:validateUrl",mergeObjects({url:r,sameHost:o},n))}function formDataFromObject(e){if(e instanceof FormData)return e;let t=new FormData;for(let n in e)e.hasOwnProperty(n)&&(e[n]&&"function"==typeof e[n].forEach?e[n].forEach(function(e){t.append(n,e)}):"object"!=typeof e[n]||e[n]instanceof Blob?t.append(n,e[n]):t.append(n,JSON.stringify(e[n])));return t}function formDataArrayProxy(e,t,n){return new Proxy(n,{get:function(n,r){return"number"==typeof r?n[r]:"length"===r?n.length:"push"===r?function(r){n.push(r),e.append(t,r)}:"function"==typeof n[r]?function(){n[r].apply(n,arguments),e.delete(t),n.forEach(function(n){e.append(t,n)})}:n[r]&&1===n[r].length?n[r][0]:n[r]},set:function(n,r,o){return n[r]=o,e.delete(t),n.forEach(function(n){e.append(t,n)}),!0}})}function formDataProxy(e){return new Proxy(e,{get:function(t,n){if("symbol"==typeof n){let r=Reflect.get(t,n);return"function"==typeof r?function(){return r.apply(e,arguments)}:r}if("toJSON"===n)return()=>Object.fromEntries(e);if(n in t&&"function"==typeof t[n])return function(){return e[n].apply(e,arguments)};let r=e.getAll(n);return 0===r.length?void 0:1===r.length?r[0]:formDataArrayProxy(t,n,r)},set:function(e,t,n){return"string"==typeof t&&(e.delete(t),n&&"function"==typeof n.forEach?n.forEach(function(n){e.append(t,n)}):"object"!=typeof n||n instanceof Blob?e.append(t,n):e.append(t,JSON.stringify(n)),!0)},deleteProperty:function(e,t){return"string"==typeof t&&e.delete(t),!0},ownKeys:function(e){return Reflect.ownKeys(Object.fromEntries(e))},getOwnPropertyDescriptor:function(e,t){return Reflect.getOwnPropertyDescriptor(Object.fromEntries(e),t)}})}function issueAjaxRequest(e,t,n,r,o,i){let l=null,s=null;if((o=null!=o?o:{}).returnPromise&&"u">typeof Promise)var a=new Promise(function(e,t){l=e,s=t});null==n&&(n=getDocument().body);let u=o.handler||handleAjaxResponse,c=o.select||null;if(!bodyContains(n))return maybeCall(l),a;let f=o.targetOverride||asElement(getTarget(n));if(null==f||f==DUMMY_ELT)return triggerErrorEvent(n,"htmx:targetError",{target:getClosestAttributeValue(n,"hx-target")}),maybeCall(s),a;let h=getInternalData(n),d=h.lastButtonClicked;if(d){let n=getRawAttribute(d,"formaction");null!=n&&(t=n);let r=getRawAttribute(d,"formmethod");if(null!=r)if(!VERBS.includes(r.toLowerCase()))return maybeCall(l),a;else e=r}let p=getClosestAttributeValue(n,"hx-confirm");if(void 0===i){let i=function(i){return issueAjaxRequest(e,t,n,r,o,!!i)},s={target:f,elt:n,path:t,verb:e,triggeringEvent:r,etc:o,issueRequest:i,question:p};if(!1===triggerEvent(n,"htmx:confirm",s))return maybeCall(l),a}let g=n,m=getClosestAttributeValue(n,"hx-sync"),y=null,x=!1;if(m){let e=m.split(":"),t=e[0].trim();if(g="this"===t?findThisElement(n,"hx-sync"):asElement(querySelectorExt(n,t)),m=(e[1]||"drop").trim(),h=getInternalData(g),"drop"===m&&h.xhr&&!0!==h.abortable)return maybeCall(l),a;if("abort"===m)if(h.xhr)return maybeCall(l),a;else x=!0;else"replace"===m?triggerEvent(g,"htmx:abort"):0===m.indexOf("queue")&&(y=(m.split(" ")[1]||"last").trim())}if(h.xhr)if(h.abortable)triggerEvent(g,"htmx:abort");else{if(null==y){if(r){let e=getInternalData(r);e&&e.triggerSpec&&e.triggerSpec.queue&&(y=e.triggerSpec.queue)}null==y&&(y="last")}return null==h.queuedRequests&&(h.queuedRequests=[]),"first"===y&&0===h.queuedRequests.length?h.queuedRequests.push(function(){issueAjaxRequest(e,t,n,r,o)}):"all"===y?h.queuedRequests.push(function(){issueAjaxRequest(e,t,n,r,o)}):"last"===y&&(h.queuedRequests=[],h.queuedRequests.push(function(){issueAjaxRequest(e,t,n,r,o)})),maybeCall(l),a}let b=new XMLHttpRequest;h.xhr=b,h.abortable=x;let v=function(){h.xhr=null,h.abortable=!1,null!=h.queuedRequests&&h.queuedRequests.length>0&&h.queuedRequests.shift()()},w=getClosestAttributeValue(n,"hx-prompt");if(w){var S=prompt(w);if(null===S||!triggerEvent(n,"htmx:prompt",{prompt:S,target:f}))return maybeCall(l),v(),a}if(p&&!i&&!confirm(p))return maybeCall(l),v(),a;let E=getHeaders(n,f,S);"get"===e||usesFormData(n)||(E["Content-Type"]="application/x-www-form-urlencoded"),o.headers&&(E=mergeObjects(E,o.headers));let O=getInputValues(n,e),C=O.errors,T=O.formData;o.values&&overrideFormData(T,formDataFromObject(o.values));let R=overrideFormData(T,formDataFromObject(getExpressionVars(n,r))),H=filterValues(R,n);htmx.config.getCacheBusterParam&&"get"===e&&H.set("org.htmx.cache-buster",getRawAttribute(f,"id")||"true"),(null==t||""===t)&&(t=location.href);let q=getValuesForElement(n,"hx-request"),L=getInternalData(n).boosted,N=htmx.config.methodsThatUseUrlParams.indexOf(e)>=0,A={boosted:L,useUrlParams:N,formData:H,parameters:formDataProxy(H),unfilteredFormData:R,unfilteredParameters:formDataProxy(R),headers:E,elt:n,target:f,verb:e,errors:C,withCredentials:o.credentials||q.credentials||htmx.config.withCredentials,timeout:o.timeout||q.timeout||htmx.config.timeout,path:t,triggeringEvent:r};if(!triggerEvent(n,"htmx:configRequest",A))return maybeCall(l),v(),a;if(t=A.path,e=A.verb,E=A.headers,H=formDataFromObject(A.parameters),C=A.errors,N=A.useUrlParams,C&&C.length>0)return triggerEvent(n,"htmx:validation:halted",A),maybeCall(l),v(),a;let I=t.split("#"),P=I[0],D=I[1],k=t;if(N&&(k=P,!H.keys().next().done&&(0>k.indexOf("?")?k+="?":k+="&",k+=urlEncode(H),D&&(k+="#"+D))),!verifyPath(n,k,A))return triggerErrorEvent(n,"htmx:invalidPath",A),maybeCall(s),v(),a;if(b.open(e.toUpperCase(),k,!0),b.overrideMimeType("text/html"),b.withCredentials=A.withCredentials,b.timeout=A.timeout,q.noHeaders);else for(let e in E)if(E.hasOwnProperty(e)){let t=E[e];safelySetHeaderValue(b,e,t)}let M={xhr:b,target:f,requestConfig:A,etc:o,boosted:L,select:c,pathInfo:{requestPath:t,finalRequestPath:k,responsePath:null,anchor:D}};if(b.onload=function(){try{let e=hierarchyForElt(n);if(M.pathInfo.responsePath=getPathFromResponse(b),u(n,M),!0!==M.keepIndicators&&removeRequestIndicators(F,B),triggerEvent(n,"htmx:afterRequest",M),triggerEvent(n,"htmx:afterOnLoad",M),!bodyContains(n)){let t=null;for(;e.length>0&&null==t;){let n=e.shift();bodyContains(n)&&(t=n)}t&&(triggerEvent(t,"htmx:afterRequest",M),triggerEvent(t,"htmx:afterOnLoad",M))}maybeCall(l)}catch(e){throw triggerErrorEvent(n,"htmx:onLoadError",mergeObjects({error:e},M)),e}finally{v()}},b.onerror=function(){removeRequestIndicators(F,B),triggerErrorEvent(n,"htmx:afterRequest",M),triggerErrorEvent(n,"htmx:sendError",M),maybeCall(s),v()},b.onabort=function(){removeRequestIndicators(F,B),triggerErrorEvent(n,"htmx:afterRequest",M),triggerErrorEvent(n,"htmx:sendAbort",M),maybeCall(s),v()},b.ontimeout=function(){removeRequestIndicators(F,B),triggerErrorEvent(n,"htmx:afterRequest",M),triggerErrorEvent(n,"htmx:timeout",M),maybeCall(s),v()},!triggerEvent(n,"htmx:beforeRequest",M))return maybeCall(l),v(),a;var F=addRequestIndicatorClasses(n),B=disableElements(n);forEach(["loadstart","loadend","progress","abort"],function(e){forEach([b,b.upload],function(t){t.addEventListener(e,function(t){triggerEvent(n,"htmx:xhr:"+e,{lengthComputable:t.lengthComputable,loaded:t.loaded,total:t.total})})})}),triggerEvent(n,"htmx:beforeSend",M);let X=N?null:encodeParamsForBody(b,n,H);return b.send(X),a}function determineHistoryUpdates(e,t){let n=t.xhr,r=null,o=null;if(hasHeader(n,/HX-Push:/i)?(r=n.getResponseHeader("HX-Push"),o="push"):hasHeader(n,/HX-Push-Url:/i)?(r=n.getResponseHeader("HX-Push-Url"),o="push"):hasHeader(n,/HX-Replace-Url:/i)&&(r=n.getResponseHeader("HX-Replace-Url"),o="replace"),r)if("false"===r)return{};else return{type:o,path:r};let i=t.pathInfo.finalRequestPath,l=t.pathInfo.responsePath,s=t.etc.push||getClosestAttributeValue(e,"hx-push-url"),a=t.etc.replace||getClosestAttributeValue(e,"hx-replace-url"),u=getInternalData(e).boosted,c=null,f=null;return(s?(c="push",f=s):a?(c="replace",f=a):u&&(c="push",f=l||i),f)?"false"===f?{}:("true"===f&&(f=l||i),t.pathInfo.anchor&&-1===f.indexOf("#")&&(f=f+"#"+t.pathInfo.anchor),{type:c,path:f}):{}}function codeMatches(e,t){return new RegExp(e.code).test(t.toString(10))}function resolveResponseHandling(e){for(var t=0;tn.indexOf(e)){let n=extensions[e];n&&0>t.indexOf(n)&&t.push(n)}}),getExtensions(asElement(parentElt(e)),t,n)}var isReady=!1;function ready(e){isReady||"complete"===getDocument().readyState?e():getDocument().addEventListener("DOMContentLoaded",e)}function insertIndicatorStyles(){if(!1!==htmx.config.includeIndicatorStyles){let e=htmx.config.inlineStyleNonce?` nonce="${htmx.config.inlineStyleNonce}"`:"",t=htmx.config.indicatorClass,n=htmx.config.requestClass;getDocument().head.insertAdjacentHTML("beforeend",`.${t}{opacity:0;visibility: hidden} .${n} .${t}, .${n}.${t}{opacity:1;visibility: visible;transition: opacity 200ms ease-in}`)}}function getMetaConfig(){let e=getDocument().querySelector('meta[name="htmx-config"]');return e?parseJSON(e.content):null}function mergeMetaConfig(){let e=getMetaConfig();e&&(htmx.config=mergeObjects(htmx.config,e))}return getDocument().addEventListener("DOMContentLoaded",function(){isReady=!0}),ready(function(){mergeMetaConfig(),insertIndicatorStyles();let e=getDocument().body;processNode(e);let t=getDocument().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");e.addEventListener("htmx:abort",function(e){let t=getInternalData(e.detail.elt||e.target);t&&t.xhr&&t.xhr.abort()});let n=window.onpopstate?window.onpopstate.bind(window):null;window.onpopstate=function(e){e.state&&e.state.htmx?(restoreHistory(),forEach(t,function(e){triggerEvent(e,"htmx:restored",{document:getDocument(),triggerEvent})})):n&&n(e)},getWindow().setTimeout(function(){triggerEvent(e,"htmx:load",{}),e=null},0)}),htmx}(),__rspack_default_export=htmx}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.m=__webpack_modules__,(()=>{__webpack_require__.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var __webpack_exports__={};(()=>{__webpack_require__.r(__webpack_exports__),__webpack_require__(37);let e={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"numeric",second:"numeric"},t=new Intl.DateTimeFormat("de-DE",e),n=()=>{Array.from(document.getElementsByTagName("time")).forEach(e=>{let n=Date.parse(e.getAttribute("datetime"));isNaN(n)||(e.innerText=t.format(n))})};window.addEventListener("load",n),window.addEventListener("htmx:afterRequest",n)})();var __rspack_exports_target=window;for(var __rspack_i in __webpack_exports__)__rspack_exports_target[__rspack_i]=__webpack_exports__[__rspack_i];__webpack_exports__.__esModule&&Object.defineProperty(__rspack_exports_target,"__esModule",{value:!0})})(); +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git a/src/main/resources/static/scripts.js b/src/main/resources/static/scripts.js deleted file mode 100644 index fdd3f52..0000000 --- a/src/main/resources/static/scripts.js +++ /dev/null @@ -1,159 +0,0 @@ -const dateFormatOptions = { year: 'numeric', month: '2-digit', day: '2-digit' }; -const dateFormat = new Intl.DateTimeFormat('de-DE', dateFormatOptions); - -const dateTimeFormatOptions = { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: 'numeric', second: 'numeric' }; -const dateTimeFormat = new Intl.DateTimeFormat('de-DE', dateTimeFormatOptions); - -const formatTimeElements = () => { - Array.from(document.getElementsByTagName('time')).forEach((timeTag) => { - let date = Date.parse(timeTag.getAttribute('datetime')); - if (! isNaN(date)) { - timeTag.innerText = dateTimeFormat.format(date); - } - }); -}; - -window.addEventListener('load', formatTimeElements); -window.addEventListener('htmx:afterRequest', formatTimeElements); - -function drawPieChart(url, elemId, title, data) { - if (data) { - update(elemId, data); - } else { - fetch(url) - .then(resp => resp.json()) - .then(d => { - draw(elemId, title, d); - update(elemId, d); - }); - } - - function update(elemId, data) { - let chartDom = document.getElementById(elemId); - let chart = echarts.init(chartDom); - - let option = { - color: data.map(i => i.color), - animationDuration: 250, - animationDurationUpdate: 250, - series: [ - { - type: 'pie', - radius: ['40%', '70%'], - avoidLabelOverlap: false, - label: { - show: false, - position: 'center' - }, - labelLine: { - show: false - }, - data: data - } - ] - }; - - option && chart.setOption(option); - } - - function draw(elemId, title, data) { - let chartDom = document.getElementById(elemId); - let chart = echarts.init(chartDom); - let option= { - title: { - text: title, - left: 'center' - }, - tooltip: { - trigger: 'item' - }, - color: data.map(i => i.color), - animationDuration: 250, - animationDurationUpdate: 250 - }; - - option && chart.setOption(option); - } -} - -function drawBarChart(url, elemId, title, data) { - if (data) { - update(elemId, data); - } else { - fetch(url) - .then(resp => resp.json()) - .then(data => { - draw(elemId, title, data); - update(elemId, data); - }); - } - - function update(elemId, data) { - let chartDom = document.getElementById(elemId); - let chart = echarts.init(chartDom); - - let option = { - series: [ - { - name: 'UNKNOWN', - type: 'bar', - stack: 'total', - data: data.map(i => i.nameValues.unknown) - }, - { - name: 'ERROR', - type: 'bar', - stack: 'total', - data: data.map(i => i.nameValues.error) - }, - { - name: 'WARNING', - type: 'bar', - stack: 'total', - data: data.map(i => i.nameValues.warning) - }, - { - name: 'SUCCESS', - type: 'bar', - stack: 'total', - data: data.map(i => i.nameValues.success) - }, - { - name: 'DUPLICATION', - type: 'bar', - stack: 'total', - data: data.map(i => i.nameValues.duplication) - } - ] - }; - - option && chart.setOption(option); - } - - function draw(elemId, title, data) { - let chartDom = document.getElementById(elemId); - let chart = echarts.init(chartDom); - let option= { - title: { - text: title, - left: 'center' - }, - xAxis: { - type: 'category', - data: data.map(i => dateFormat.format(Date.parse(i.date))) - }, - yAxis: { - type: 'value', - minInterval: 1 - }, - tooltip: { - trigger: 'item' - }, - color: ['slategray', 'red', 'darkorange', 'green', 'slategray'], - animationDuration: 250, - animationDurationUpdate: 250 - }; - - option && chart.setOption(option); - } -} \ No newline at end of file diff --git a/src/main/resources/static/style.css b/src/main/resources/static/style.css deleted file mode 100644 index ba85d45..0000000 --- a/src/main/resources/static/style.css +++ /dev/null @@ -1,776 +0,0 @@ -:root { - --text: #333; - --table-border: rgba(16, 24, 40, .1); - - --dark: brightness(.90); - - --bg-blue: rgb(0, 74, 157); - --bg-blue-op: rgba(0, 74, 157, .35); - - --bg-green: rgb(0, 128, 0); - --bg-green-op: rgba(0, 128, 0, .35); - - - --bg-yellow: rgb(255, 140, 0); - --bg-yellow-op: rgba(255, 140, 0, .35); - - - --bg-red: rgb(255, 0, 0); - --bg-red-op: rgba(255, 0, 0, .35); - - --bg-gray: rgb(112, 128, 144); - --bg-gray-op: rgba(112, 128, 144, .35); -} - -* { - font-family: sans-serif; - box-sizing: border-box; -} - -html { - background: - linear-gradient(transparent 30rem, white 50rem), - linear-gradient(-135deg, transparent 20vw, #004d6e10 25vw, transparent 30vw), - linear-gradient(-135deg, transparent 30vw, #706f6f10 35vw, transparent 40vw), - linear-gradient(-135deg, transparent 40vw, #f59e0010 45vw, transparent 50vw); - overflow-y: scroll; -} - -body { - margin: 0; - font-size: .8rem; - color: var(--text); - background-size: contain; -} - -div.headline { - position: fixed; - display: block; - top: 0; - z-index: 1000; - width: 100%; - height: 5rem; - align-content: center; - background: white; - border-bottom: 1px solid var(--table-border); -} - -nav { - display: flex; - margin: 0 auto; - line-height: 1.5rem; - max-width: 1140px; -} - -nav a.nav-home { - margin: auto 0; - - color: var(--text); - line-height: 1.5rem; - text-decoration: none; - - font-size: 2rem; - font-weight: bold; -} - -nav a.nav-home > img { - width: 1.5rem; - vertical-align: middle; -} - -nav > ul { - display: block; - margin: 0 0 0 auto; - padding: 0; - width: max-content; -} - -nav > ul > li { - display: inline-block; - padding: 0 1rem; -} - -nav > ul > li.login { - margin: 0 0 0 1rem; - padding: 0 0 0 2rem; - border-left: 1px solid var(--table-border); - line-height: 3.5rem; -} - -nav > ul > li.login a { - text-decoration: none; - text-transform: none; - padding: 1rem; -} - -nav .login .user-name { - font-weight: bold; -} - -nav > ul > li.login > span { - display: inline-block; - margin: 0 .5rem; -} - -nav > ul > li.login .user-icon { - flex-direction: column; - display: inline flex; - vertical-align: middle; - inline-size: 4rem; -} - -nav > ul > li.login .user-icon img { - margin: 0 0 -1em 0; - width: 80%; - align-self: center; -} - -nav > ul > li.login .user-icon span { - padding: 0 .6em; - color: white; - font-size: .8rem; - font-weight: bold; - border-radius: 4px; - line-height: normal; - text-align: center; -} - -nav > ul > li.login .user-icon span.guest { - background: darkslategray; -} - -nav > ul > li.login .user-icon span.user { - background: darkgreen; -} - -nav > ul > li.login .user-icon span.admin { - background: darkred; -} - -nav li a { - color: var(--bg-blue); - text-transform: uppercase; - text-decoration: none; - font-weight: 700; -} - -nav li a:hover { - text-decoration: underline; -} - -a { - color: var(--bg-blue); -} - -.breadcrumps { - margin: 0 auto; - max-width: 1140px; -} - -.breadcrumps ul { - margin: 2px 0; - padding: .4rem 1rem; - list-style: none; - background: #eee; -} - -.breadcrumps ul li { - display: inline; -} - -.breadcrumps ul li + li:before { - padding: .4rem; - color: gray; - content: "/\00a0"; -} - -.breadcrumps ul li a { - color: var(--text); - text-decoration: none; -} - -.centered { - text-align: center; -} - -.container { - margin: auto; -} - -main { - margin: 6rem auto 0; - min-height: calc(100dvh - 10rem); -} - -main, .container { - max-width: 1140px; -} - -footer { - width: 100%; - height: 4rem; - position: relative; - align-content: center; - display: flex; - bottom: 0; - padding: 1rem 0; - border-top: 1px solid var(--table-border); - background: var(--bg-blue); - color: white; -} - -footer > .container > div { - margin: 0 auto; - max-width: 1140px; - display: inline-block; -} - -footer > .container > div, -footer > .container > div:after { - content: "-"; - padding-left: 1rem; -} - -footer > .container > div:last-child, -footer > .container > div:last-child:after { - content: ""; -} - -footer svg { - height: 1.4rem; - color: white; - vertical-align: text-bottom; -} - -section { - margin: 3rem 0; -} - -form { - margin: 1rem 0; - padding: 1rem; - - border: 1px solid lightgray; - border-radius: 3px; - background: #eee; - - text-align: center; -} - -form > h2 { - margin: 0; -} - -form.samplecode-input > div { - padding: 0.6rem; - display: inline-block; - - border: 1px solid lightgray; - border-radius: 3px; - - background: white; -} - -form.samplecode-input input { - padding: 0; - - border: none; - outline: none; - - text-align: left; - appearance: textfield; - font-size: 1.2rem; - font-weight: bold; -} - -form.samplecode-input input:focus-visible { - background: lightgreen; -} - -.login-form { - width: fit-content; - margin: 3rem auto; - padding: 2em 5rem; - - border: 1px solid var(--table-border); - border-radius: .5rem; - background: white; -} - -.login-form form { - width: 20rem; - margin: 0 auto; - display: grid; - grid-gap: .5rem; - - border: none; - background: none; -} - -.login-form img { - margin: 0 auto; - width: 4rem; - display: block; -} - -.userrole-form { - display: inline-block; -} - -.userrole-form form { - margin: 0; - padding: 0; - - border: none; - border-radius: 0; - background: none; - - text-align: inherit; -} - -.login-form form *, -.token-form form * { - padding: 0.5rem; - border: 1px solid var(--table-border); - border-radius: 3px; -} - -.login-form form hr, -.token-form form hr, -.userrole-form form hr { - padding: 0; - width: 100%; -} - -.login-form button, -.login-form a.btn, -.token-form button { - margin: 1rem 0; - background: var(--bg-blue); - color: white; - border: none; -} - -.userrole-form form select { - padding: 0.5rem; - border: none; - border-radius: 3px; - line-height: 1.2rem; - font-size: 0.8rem; -} - -.border { - padding: 1rem; - border: 1px solid var(--table-border); - border-radius: .5rem; - background: white; -} - -table, .chart { - border: 1px solid var(--table-border); - padding: 1.5rem; - - border-spacing: 0; - border-radius: .5rem; - - background: white; -} - -table { - min-width: 100%; - font-family: sans-serif; -} - -table.config-table td:first-child { - width: 26rem; - min-width: fit-content; -} - -table.config-table td > button:last-of-type { - float: right; -} - -.border > table { - padding: 0; - border: none; - background: transparent; -} - -.page-control { - border-radius: .5rem; - padding: 1rem 2rem; - text-align: center; - - line-height: 1.75em; -} - -.page-control a { - padding: 0 .25rem; - font-size: 1.75rem; - color: var(--bg-gray); - text-decoration: none; -} - -.page-control a[href] { - color: var(--bg-blue); -} - -.page-control span { - padding: 0 .5rem; - vertical-align: text-bottom; -} - -#samples-table.max { - width: 100vw; - position: fixed; - padding: 1rem; - top: 0; - left: 0; - background: white; - min-height: 100vh; -} - -table.samples { - max-width: 100%; - overflow-x: scroll; - display: block; -} - -th, td { - padding: 0.4rem .2rem; - - line-height: 2rem; - - text-align: left; - white-space: nowrap; - vertical-align: top; -} - -th { - border-bottom: 1px solid var(--bg-gray); -} - -td { - border-bottom: 1px solid var(--bg-gray-op); -} - -td, td > a { - font-family: monospace; -} - -tr:last-of-type > td { - border-bottom: none; -} - -td > small { - display: block; - text-align: center; -} - -td.patient-id { - min-width: 20rem; - text-overflow: ellipsis; - overflow: hidden; -} - -td.bg-blue, th.bg-blue, -td.bg-green, th.bg-green, -td.bg-yellow, th.bg-yellow, -td.bg-red, th.bg-red, -td.bg-gray, th.bg-gray -{ - width: 8rem; -} - -td.bg-blue > small, th.bg-blue > small { - background: var(--bg-blue); - color: white; - border-radius: 0.4rem; -} - -td.bg-green > small, th.bg-green > small { - background: var(--bg-green); - color: white; - border-radius: 0.4rem; -} - -td.bg-yellow > small, th.bg-yellow > small { - background: var(--bg-yellow); - color: white; - border-radius: 0.4rem; -} - -td.bg-red > small, th.bg-red > small { - background: var(--bg-red); - color: white; - border-radius: 0.4rem; -} - -td.bg-gray > small, th.bg-gray > small { - background: var(--bg-gray); - color: white; - border-radius: 0.4rem; -} - -.bg-path { - background: var(--bg-gray-op); -} - -.bg-from { - background: var(--bg-red-op); -} - -.bg-to { - background: var(--bg-green-op); -} - -.bg-path, .bg-from, .bg-to { - padding: 0.25rem 0.5rem; - border-radius: 3px; - - font-family: monospace; -} - -td.bg-shaded, th.bg-shaded { - background: repeating-linear-gradient(140deg, white, #e5e5f5 4px, white 8px); -} - -td.clipboard { - cursor: copy; -} - -td.clipboard.clipped { - box-shadow: 0 0 1rem lightgreen inset; -} - -.btn { - margin: 4px; - padding: 4px 8px; - - line-height: 1.2rem; - - border: 0 solid transparent; - border-radius: 3px; - - text-decoration: none; - font-size: 0.8rem; - font-weight: normal; - - cursor: pointer; -} - -.btn:active, -.btn:hover { - filter: drop-shadow(0px 1px 1px var(--bg-gray)) var(--dark); -} - -.btn:active { - translate: 0 1px; -} - -.btn.btn-red { - background: var(--bg-red); - color: white; -} - -.btn.btn-green { - background: var(--bg-green); - color: white; -} - -.btn.btn-blue { - background: var(--bg-blue); - color: white; -} - -.btn.btn-delete:before { - content: '\1F5D1'; - padding: .2rem; -} - -button:disabled, -.btn:disabled { - background: slategray !important; - color: lightgray; - filter: none; - cursor: default; -} - -input.inline { - border: none; - font-size: 1.1rem; - outline: none; -} - -input.inline:focus-visible { - background: lightgreen; -} - -.monospace { - font-family: monospace; - color: #333333; - border-bottom: 1px dotted gray !important; -} - -.help { - padding: 1rem; - - border: 1px solid darkslategray; - border-radius: 3px; - background: slategray; - color: white; -} - -.help.error { - border: 3px dashed red; - background: darkorange; -} - -.help .help-header { - font-size: 1.2rem; - font-weight: bold; -} - -.charts { - display: grid; - grid-gap: 1em; - grid-template: - "a b" 28rem - "c c" 28rem / 1fr 1fr; -} - -.charts > .grid-left { - grid-area: a; -} - -.charts > .grid-right { - grid-area: b; -} - -.charts > .grid-full { - grid-area: c; -} - -.connection-display { - display: grid; - grid-template-columns: 10rem 16rem 10rem; - place-items: center; - width: fit-content; - margin: 1em auto; -} - -.connection-display > * { - text-align: center; - margin: auto 0; -} - -.connection-display .connection { - display: block; - width: 100%; - height: 4px; - background: repeating-linear-gradient(to left, white, white 2px, transparent 2px, transparent 8px, white 8px) var(--bg-red); -} - -.connection-display .connection.available { - background: var(--bg-green); -} - -.notification { - margin: 1rem; - padding: .5rem; - border-radius: 3px; - text-align: center; -} - -.notification.info { - color: var(--bg-blue); -} - -.notification.success { - color: var(--bg-green); -} - -.notification.notice { - color: var(--bg-yellow); -} - -.notification.error { - color: var(--bg-red); -} - -.tab { - padding: 1rem; - border: none; - border-radius: 3px 3px 0 0; - cursor: pointer; - transition: all 0.2s; - - font-weight: bold; -} - -.tab:hover, -.tab.active { - background: var(--bg-gray); - color: white; -} - -.tabcontent { - border: 2px solid var(--bg-gray); - border-radius: 0 .5rem .5rem .5rem; - display: none; - padding: 1rem; - background: white; -} - -.tabcontent.active { - display: block; -} - -a.reload { - display: none; - margin: 0; - vertical-align: top; - border-radius: 1.4rem; -} - -a.reload::before { - content: "⟳"; - font-size: 1.2rem; - vertical-align: top; -} - -a.reload span { - display: none; -} - -a.reload:hover span { - display: inline; -} - -.new-token { - padding: 1rem; - background: var(--bg-green-op); -} - -.new-token > pre { - margin: 0; - border: 1px solid var(--bg-green); - padding: .5rem; - width: max-content; - display: inline-block; -} - -.no-token { - padding: 1rem; - background: var(--bg-red-op); -} - -.issue-message { - font-family: monospace; - font-weight: bolder; -} - -.issue-path { - font-family: monospace; - line-height: 1rem; -} -- cgit v1.2.3